apeiros changed the topic of #ruby to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
<xybre> I've worked with Rails for 7 years and I just feel it steers people the wrong way and encourages bad habits.
<xybre> Especially noobs.
<epochwolf> xybre: noobs will always noob.
poga has quit [Remote host closed the connection]
<xybre> epochwolf: of course. But Rails gives them the rope with which to hang themselves.
<epochwolf> if you give them a box cutter instead of safety scissors, they'll do stupid things.
<rien> xybre: I agree, but I'd be interested to know from you which bad habits you think it encourages.
mklappstuhl has quit [Ping timeout: 276 seconds]
<epochwolf> xybre: counter point: let'em hang
efrainolivares has quit [Read error: Connection reset by peer]
<xybre> If you've been doing it a while and understand object oriented programming and you work on a team that understands Ruby, you can work around it, but Rails will not make it easy.
efrainolivares has joined #ruby
<xybre> epochwolf: Yeah, that'd be great, but they're hanging the whole team, including myself.
Dwarf_ has joined #ruby
<epochwolf> xybre: you're saying there's a mismatch between rails and good practices?
<rien> xybre: wow you seem to be in a similar situation to mine
<epochwolf> in general
<xybre> Yes
predator117 has quit [Ping timeout: 264 seconds]
<epochwolf> I'd tend to agree.
sambao21 has joined #ruby
<epochwolf> forms -> AR is not a good idea.
<rien> why?
<xybre> ActiveRecord is really neat and quick for prototyping, but for the real world it encourages you to put everything in your model. People will honestly have no idea where to put code if it can't go in the model.
<epochwolf> rien: the data you need to collect on a particular form won't match the database representation in most apps.
<xybre> The USER model. The USER. Thoe horror. The cyclopean horror.
<epochwolf> The model shouldn't need to compensate for that.
<xybre> Every system the User becomes a god object.
<rien> xybre: That is one of the most important reasons I want to switch away from Rails (models encourage incorrect modeling of the business domain)
<epochwolf> ^^^^^^^^^^^^^^^^^^^^^
<epochwolf> It would be nice if rails could have a better way to seperate that stuff out.
<rien> I always hear that but I don't have the USer-god problem
baroquebobcat has quit [Quit: baroquebobcat]
ehc has quit [Quit: ehc]
<xybre> ActiveRecord::Base objects are not "models". They are allll kinds of things, but not actual models. If you use them like repositories (as per Object ORiented Rails) things get much better.
<epochwolf> rien: I've worked on several enterprise apps, it's a problem.
fgo has joined #ruby
* xybre nods
<rien> epochwolf: maybe I'm misidentifying. what's a clue that I have a god object?
lucazi_ has quit [Ping timeout: 276 seconds]
<heftig> it contains 50% of your code
<rien> oh....
<rien> that's Fulfillment for me
<epochwolf> rien: models become messes containing view <-> database mapping, business logics, and querying.
<rien> yep, Fulfillment then :)
narcan has joined #ruby
<epochwolf> rien: models should never contain business logic beyond basic database validation.
RichardBaker has quit [Quit: RichardBaker]
<entelechios> Hello all
<epochwolf> unfortunaetly rails doesn't have a good way to split taht up
Lewix has joined #ruby
<rien> xybre: agree, ::Base aren't "domain" models
<entelechios> I'm running into an error trying to install the bcrypt-ruby gem
Giorgio has quit [Remote host closed the connection]
<xybre> And people start saying "this model is too big.. lets put everything in modules!"
<entelechios> seems someone's having a similar issue here
<xybre> And now you have 3896 problems.
sambao21 has quit [Ping timeout: 264 seconds]
<entelechios> If anyone has any tips as to what might be something close to finding a solution that'd be highly regarded :)
dankest has joined #ruby
<rien> epochwolf: that's my hang up with it. Rails does not encourage proper modeling, division of concerns, etc. it thinks tables have a 1-to-1 relationship with models. ugh.
efrainolivares has quit [Quit: efrainolivares]
<rien> luckily I didn't let it taint the word "model" in my team.
<rien> we design the proper domain models around rails
<heftig> well, activerecord classes map tables
<heftig> but those need not be your only model classes
_bart has quit [Remote host closed the connection]
ehc has joined #ruby
<rien> xybre: any tips for when I migrate (rewrite in) to sinatra? things you miss the most, or new ways to think about things? (I've never been deep into Rails so not much unlearning to be done I guess)
fenicks has quit [Remote host closed the connection]
yfeldblum has joined #ruby
lucazi has joined #ruby
<rien> heftig: it's like epochwolf said, people don't know where to put their stuff so they shove it into the models for the tables
<rien> it doesn't provide the right encouragement and it misconstrues what a model is.
<rien> xybre: another reason I'm moving away is all the implicit magic Rails is so fond of, that gives me so much pain when troubleshooting, as Rails loves to throw exceptions left and right and often its exceptions mask the real exception that I'm interested in
emanu has quit [Quit: emanu]
renderful has joined #ruby
<rien> so I might use DataMapper instead of AR when I switch.
sanitypassing has quit [Quit: WeeChat 0.4.1]
<rien> as it's less magical
ehc has quit [Client Quit]
<rien> epochwolf: the app I work on is not customer facing, so that's probably why User isn't a god object here
<xybre> rien: there's no router helpers in Sinatra, but then again its also trivial to figure out whats going on because the Sinatra DSL lets you define them inline. There's no hard "controller" object, but you can make them if you want.
shiroginne has joined #ruby
<rien> xybre: I've always thought Rails handling of routing so opaque. I really like Sinatra's approach in that regard.
<xybre> rien: You'll need an ORM of some sort, if you can lend a hand with development I recommend Ruby Object Mapper, and if not, take a look at Sequel (I assume you're using SQL).
<rien> ruby object mapper, never heard of it, googling it now
Kricir has quit [Remote host closed the connection]
<xybre> rien: it's being built by the Datamapper guys, completely rewritten and modular
tabolario has joined #ruby
<rien> rom-rb.org ?
<rien> oh wow interesting... why are the datamapper guys doing this? (what's the motive)
tommyvyo has quit [Quit:]
dEPy has quit [Remote host closed the connection]
Sporer has joined #ruby
<xybre> It's a pure agnostic library. One of the devs mentioned they ran into a guy at a meetup who was using the Axiom lookup language they developed (sorta like Arel) to query data he loaded from files he parsed (no DB, jsut querying raw ruby objects).
x1337807x has joined #ruby
Fractional has quit [Ping timeout: 256 seconds]
<epochwolf> I like the way rail's routes work
<epochwolf> It's very nice to be able to seperate the names from the urls.
<xybre> rien: They wanted to release a new version of Datamapper but they took it back to the drawing board, and realized they could make each component stand alone, it resulted in a completely new set of gems that they've been working on for the last 3 years.
ccolorado has joined #ruby
ccolorado has left #ruby [#ruby]
<xybre> epochwolf: There's no relationship between URL and object name in Sinatra.
<rien> epochwolf: I say it's opaque because I don't like the stuff like new/member/collection... I'd rather see the url in the open
<rien> cognitive load is then lower
wmoxam has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
renderful has quit [Remote host closed the connection]
renderful has joined #ruby
zeade has quit [Quit: Leaving.]
<rien> xybre: I wonder why they decided to have explicit schema in ROM. Datamapper doesn't (afaik) and it's very nice also because of that
kaspergrubbe has joined #ruby
<rien> xybre: the very first example in rom-rb.org already shows code duplication :/
mansi has joined #ruby
Dwarf has quit [Excess Flood]
Dwarf_ is now known as Dwarf
bricker is now known as bricker-away
Dwarf_ has joined #ruby
Dwarf_ has quit [Max SendQ exceeded]
lucazi has quit [Remote host closed the connection]
Dwarf_ has joined #ruby
Dwarf_ has quit [Max SendQ exceeded]
gazarsgo has quit [Quit: gazarsgo]
hogeo has joined #ruby
centr0 has quit [Quit: centr0]
Dwarf_ has joined #ruby
gstamp has joined #ruby
pyrac has quit [Quit: pyrac]
smathieu_ has quit [Remote host closed the connection]
jjbohn has joined #ruby
dayepa has quit [Quit: dayepa]
renderful has quit [Read error: Operation timed out]
dayepa has joined #ruby
<xybre> rien: Datamapper has the schema defined in every object, similar to how Mongoid does it.
etman has joined #ruby
kaspergrubbe has quit [Ping timeout: 245 seconds]
<rien> xybre: right, just once.
<epochwolf> xybre: I would miss migrations.
iliketurtles has quit [Quit: zzzzz…..]
krainboltgreene has joined #ruby
<rien> epochwolf: why? I never understood the point.
Kruppe has joined #ruby
<epochwolf> rien: migrations make life a lot easier.
<xybre> epochwolf: I'd miss migrations if any company I'd worked for kept them up to date
<rien> I feel your answer will finally make me understand it
<rien> what palpable advantage do they provide?
<epochwolf> xybre: the apps I used always used migrations to upgrade the schema
<xybre> Our mgirations here won't even run, you have to load the schema.
<rien> maybe I'm takingsomething for granted as I do use migrations now and I keep them up to date
rbento has quit [Quit: ZZZzzz…]
<xybre> rien: thats not actually duplication you're seeing, they're demonstrating how mapping works
<epochwolf> xybre: oh, the migrations never ran from beginning to end. We just used them to migrate from development to production.
poga has joined #ruby
<rien> epochwolf: how do they make life easier? I could never understand the triplication of data between migrations, schema.rb and AR
<epochwolf> rien: schema.rb isn't duplicated.
<epochwolf> it's a cache
<rien> xybre: ah, ok. I'll look deeper in the docs.
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<epochwolf> schema.rb is generated form the database.
<xybre> epochwolf: yeah, but you can always do what migrations do .. Datamapper does it implicitly, for instance.
<epochwolf> xybre: that only works if you add columns.
<epochwolf> if you do anything more than that, you need manual scripts.
smathieu has joined #ruby
<rien> epochwolf: schema.rb I can understand, but what about the migrations themselves?
m8 has quit [Quit: Sto andando via]
<xybre> Migrations are just helpers.
<epochwolf> rien: they are scripts to change the schema.
rickruby has joined #ruby
<epochwolf> rien: migrations are 100% detached from AR.
<rien> I didn't know they were detached, interesting.
<rien> oh, all migrations are are scripts to change schema.rb ?
<epochwolf> no.,
<epochwolf> They edit the database directly.
x1337807x has joined #ruby
<epochwolf> Schema.rb is generated from the database.
<rien> why is schema.rb not enough, though?
<epochwolf> schema.rb is used to built the database for tests.
twoism has joined #ruby
<epochwolf> rien: schema.rb is a cache for the tests. AFAIK, it's never used outside of tests.
<rien> ok I get schema.rb, I don't have a problem with it as it's generated automatically anyway :)
<epochwolf> rien: schema.rb is a cache file.
<rien> But I don't see the advantage of writing migrations, nor do I see the point, and I'm honestly trying to understand because clearly I'm missing something if you think they're helpful
etman has quit [Quit: etman]
<rien> and I already respect your opinions from your previosu messages :)
<epochwolf> rien: migrations are sql scripts in a different format. That's all.
pipework has joined #ruby
twoism has quit [Remote host closed the connection]
<epochwolf> rien: it's a formalized way to make database changes. That's actually really important.
<epochwolf> Otherwise you need to find another solution for making database schema changes.
jjbohn has quit [Quit: Leaving...]
twoism has joined #ruby
etman has joined #ruby
<epochwolf> Given the idiots I've worked with, rails migrations save hundreds of hours of trouble shooting per year.
<epochwolf> if not thousnads.
bklane has joined #ruby
<rien> epochwolf: if a given team documents their changes to the database in a file changes-db.txt and commits that file to source control diligently, would it be the same advantage?
fyz1x has joined #ruby
echevemaster has joined #ruby
<epochwolf> rien: not quite.
<epochwolf> rien: you'd need to save a script that makes the db changes.
<epochwolf> both up and down for every change.
<epochwolf> and a way to record which migrations have been applied.
rickruby has quit [Ping timeout: 276 seconds]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<rien> epochwolf: we never write the down ones... why are they useful?
<epochwolf> rien: if you need to roll back.
<rien> well we test stuff before deploying
<epochwolf> rien: that works in theory
<epochwolf> in practice, something can go really wrong.
jjbohn has joined #ruby
<epochwolf> If you can rollback with one command, you can get services back up quickly.
<epochwolf> okay, I need to go eat dinner.
<epochwolf> rien: rails provides a ton of things you don't realize you need until everything goes to shit.
<rien> epochwolf: thanks for taking the time to explain
randomautomator has quit [Ping timeout: 245 seconds]
<rien> epochwolf: I'll hit some SO articles to get a better picture of it
Diranged has joined #ruby
Deele has quit [Ping timeout: 240 seconds]
<epochwolf> rien: read the rails guides instead
hogeo has quit [Remote host closed the connection]
<rien> epochwolf: yes that's exactly why I was asking. I need to know what I'll miss if I switch from Sinatra
<Diranged> In ruby, can i configure my object class so that its never instantiated more than once?
<Diranged> similar to a singleton type object in python?
<rien> like I said, I am probably taking for granted the advantages of migrations because I do use them
hogeo has joined #ruby
<epochwolf> rien: I did a php app the other weekend
<rien> epochwolf: well I'm more looking for a synthesized explanation of why migrations save your bacon
<rien> some SO articles sometimes hitthat spot nicely
<epochwolf> rien: https://github.com/epochwolf/simple-paste there is so much shit rails does...
<rien> epochwolf: wait, what should I pay attention to as I look at that code you wrote?
<epochwolf> rien: https://github.com/epochwolf/simple-paste/blob/master/create.php#L4 that if statement covers stuff rails does 100% automatic on every post.
<rien> oh nice, looking now
zastern has quit [Remote host closed the connection]
buzzybron has joined #ruby
rgbdev has joined #ruby
<epochwolf> rien: rails has built in crypot available, php requires me to compile extra modules.
hamakn has joined #ruby
<epochwolf> openssl_random_pseudo_bytes isn't in stock php
<rien> epochwolf: I understand your point, but I prefer to have control over that instead of delegating it to any framework. I, however, am biased towards configuration over convention.
hamakn has quit [Read error: Connection reset by peer]
<epochwolf> my server's packaged version has it.
hamakn has joined #ruby
<epochwolf> rien: I used to be until I did some php, some lua, and some sinatra and realized everything rails provides for free.
havenwood has quit [Remote host closed the connection]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<epochwolf> rien: rails is pretty damn secure by default. Everything else requires constant awareness of security issues.
Spooner has quit [Remote host closed the connection]
Kricir has joined #ruby
<rien> epochwolf: I should first qualify my project is not customer facing, so security is not a priority, but point well taken
<epochwolf> okay, I need foodz
<rien> I'll keep that in mind, definitely
<epochwolf> rien: I don't ever design without security.
<rien> epochwolf: nice chatting, bon appetit!
tkuchiki has joined #ruby
<rien> they don't pay me enough to be concerned about security, hah
<rien> or rather, they themselves don't care about it.
<epochwolf> rien: I'm a professional. Not some hack.
<rien> me too. all my time is taken by delivering stuff that works.
<epochwolf> If I can avoid it, I don't work for a company that doesn't care.
hamakn has quit [Remote host closed the connection]
<epochwolf> rien: yeah, I know the feeling.
<epochwolf> still, security is automatic for me.
hamakn has joined #ruby
kreeves has joined #ruby
wesside has quit [Quit: I think I heard an ice cream truck..]
<epochwolf> When I take shortcuts, I quanfity them and design them carefully.
cougarten has joined #ruby
buzzybron1 has joined #ruby
<epochwolf> It's just not in my nature to bang out code without thinking. I got out of that 4 years ago.
Cyrus has joined #ruby
<rien> epochwolf: I think I need to pick up a book on how to design with security in mind, then.
<epochwolf> rien: eh… I learned it over time.
<rien> epochwolf: I never bang out code either. my coworkers and I go to the whiteboard to model stuff first
buzzybron has quit [Ping timeout: 268 seconds]
fgo has quit [Remote host closed the connection]
<epochwolf> rien: there's just a few small things to remember.
<rien> epochwolf: I'm a book rat, I only learn over time stuff there's no books for :)
<epochwolf> rien: a book on web security would be too broad.
cowgarden has quit [Read error: Operation timed out]
tkuchiki has quit [Remote host closed the connection]
buzzybron1 has quit [Client Quit]
<rien> I believe I might have come across a thin tome on "security for developers"
<epochwolf> you just need basic web app security and basic server security
<rien> can't remember the name now of course
<epochwolf> k
* epochwolf tries to leave again
tkuchiki has joined #ruby
<rien> epochwolf: I know for instance not to use md5 and other easy hash algos for passwords
redmenace has quit [Ping timeout: 256 seconds]
<epochwolf> rien: one of several things.
<rien> epochwolf: we can talk more later :)
c0rn has quit [Ping timeout: 264 seconds]
<epochwolf> no, I don' thave time.
snovak has joined #ruby
<epochwolf> I need to be taking care of moving to my new job.
<rien> oh wow, congrat
<rien> s
<rien> you should go then. thanks for the nice convo.
hamakn has quit [Ping timeout: 256 seconds]
<epochwolf> I'm really stressed right now and it's not going to get better if I can't do some writing.
<epochwolf> okay, out
<rien> see ya!
cowgarden has joined #ruby
brbcoding has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
snovak has quit [Ping timeout: 264 seconds]
cougarten has quit [Ping timeout: 264 seconds]
terrellt has quit [Ping timeout: 264 seconds]
chuk has quit [Ping timeout: 264 seconds]
guilleiguaran_ has quit [Ping timeout: 264 seconds]
Guest85414__ has quit [Ping timeout: 264 seconds]
aryaching has joined #ruby
ilyam has quit [Quit: ilyam]
aaroncm has quit [Quit: No Ping reply in 180 seconds.]
aaroncm_ has joined #ruby
cowgarden has quit [Ping timeout: 245 seconds]
marcgg_ has quit [Read error: Connection reset by peer]
Astralum has quit [Read error: Connection reset by peer]
marcgg has joined #ruby
Astralum has joined #ruby
buzzybron has joined #ruby
pen has quit [Remote host closed the connection]
Vivekananda has quit [Ping timeout: 245 seconds]
justsee has quit [Ping timeout: 276 seconds]
ner0x has quit [Quit: Leaving]
Rezwan has quit [Ping timeout: 246 seconds]
wmoxam has quit [Ping timeout: 264 seconds]
moses_m has quit [Ping timeout: 268 seconds]
Es0teric has joined #ruby
cantonic_ has joined #ruby
St_Marx has quit [Remote host closed the connection]
butblack has joined #ruby
cantonic has quit [Ping timeout: 264 seconds]
cantonic_ is now known as cantonic
St_Marx has joined #ruby
jjbohn has quit [Quit: Leaving...]
sevenseacat has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dagnachew has joined #ruby
wesside has joined #ruby
bklane has quit [Remote host closed the connection]
brennanMKE has joined #ruby
Targen has quit [Read error: Connection reset by peer]
ColKurtz has quit [Quit: Textual IRC Client: www.textualapp.com]
<Kol> how do i check if a string could be a valid date for Date.parse?
<Kol> feeding it into Date.parse throws the error invalid date
<Kol> i don't wanna stop all script execution if it's in fact invalid
tacos1de has quit [Ping timeout: 240 seconds]
tacos1de has joined #ruby
bzitzow has quit [Ping timeout: 276 seconds]
<Kol> i've checked the docs, tehre doesn't seem to be a valid date checker for strings to be parsed
[Neurotic] has quit [Ping timeout: 264 seconds]
sarkis has quit [Ping timeout: 245 seconds]
efrainolivares has joined #ruby
pitzips has quit [Ping timeout: 276 seconds]
hamakn has joined #ruby
[Neurotic] has joined #ruby
jjbohn has joined #ruby
poga has quit [Remote host closed the connection]
madumo has joined #ruby
poga has joined #ruby
sarkis has joined #ruby
thepumpkin has quit [Remote host closed the connection]
poga has quit [Remote host closed the connection]
jonathanwallace has quit [Ping timeout: 245 seconds]
poga has joined #ruby
<rien> Kol: there's no alternative that doesn't throw an exception?
dankest has quit [Quit: dankest]
krawchyk has joined #ruby
<rien> Kol: I'm guessing you don't want to rescue it?
Kricir has quit [Remote host closed the connection]
Senjai has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
St_Marx has quit [Ping timeout: 240 seconds]
banister has quit [Remote host closed the connection]
<Kol> rien, i don't really want to but it seems like the only way
St_Marx has joined #ruby
<rien> Kol: which ruby version? which Date method?
<rien> Date.parse("invalid") ?
iliketurtles has joined #ruby
<rien> ok
<Kol> yeah
<Kol> u
<Kol> uh
<Kol> how do i check version again
<rien> rruby -v
marcdel has joined #ruby
marcdel has quit [Client Quit]
<Kol> 1.9.3
marcdel has joined #ruby
<Kol> yeah i saw that one too
stuartrexking has quit [Quit: Leaving...]
<Kol> not too happy with the thought, but it'sseems to be the only way to exactly replicate that behavior
<Kol> which is kinda ridiculous imo
stuartrexking has joined #ruby
<rien> Kol: DateTime.valid_date?
braincra- has joined #ruby
braincrash has quit [Read error: Operation timed out]
endash has quit [Quit: endash]
<rien> no, not that either, sorry
marcdel has quit [Ping timeout: 256 seconds]
tommyvyo has joined #ruby
mando has joined #ruby
renderful has joined #ruby
ziggles has joined #ruby
<rien> every solution in that page is misguided
ner0x has joined #ruby
marcdel has joined #ruby
JZTech101 is now known as JZ|Zzz
<ziggles> I'm currently writing a gem that scrapes a data source for different kinds of data. Right now it's a bunch of scrapers and im realizing that a good solution would be to have "models" that basically provide consumers with normalized data... and then "scrapers" that do the dirty work of getting data off pages... Any suggestions for existing gems or patterns i should consider before diving in?
madumo has quit [Quit: madumo]
tjad has joined #ruby
gazarsgo has joined #ruby
<ziggles> Right now i was simply going to use PORO and go to town but figured i'd ask before.
renderful has quit [Ping timeout: 245 seconds]
<sevenseacat> ive done something similar - have an object that represents the scraped page, and another object that builds data records based off that page
<ziggles> sevenseacat: yeah pretty much. Like if you wanted to scrape twitter.. you might have a scraper for TweetScraper, UserScraper, SearchScraper etc...
<ziggles> Then obviously some models like Tweet, User, Search etc.
<ziggles> Maybe a client that u can do like TwitterClient.search("whatever") and it returns a bunch of Tweet objects
<ziggles> sevenseacat: it seems really common so I was thinking maybe there's already an established way of doing similar things or a gem specifically for scraping in that fashion
tgunr has quit [Ping timeout: 264 seconds]
mando has quit [Remote host closed the connection]
twoism has quit [Remote host closed the connection]
<sevenseacat> i dont know
twoism has joined #ruby
Godd2 has joined #ruby
Lewix has quit [Remote host closed the connection]
smathieu has quit [Remote host closed the connection]
twoism has quit [Ping timeout: 245 seconds]
butblack has quit [Quit: butblack]
Davey has joined #ruby
cantonic has quit [Quit: cantonic]
<rien> ziggles: may I ask what is your tooling for scraping those pages?
<ziggles> rien: you're asking about my tooling and you don't even buy my dinner?
BillCriswell has quit [Remote host closed the connection]
<ziggles> lol
rbento has joined #ruby
<ziggles> rien: I'm not sure exactly what you mean, but i'm just basically pulling page data out with nokogiri
<Godd2> I'm having trouble with the File#pos method: https://gist.github.com/nicklink483/6227367
<Godd2> It seems to report the wrong position...?
Sporer has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Domon has joined #ruby
osvico has quit [Ping timeout: 256 seconds]
snovak has joined #ruby
sarkis has quit [Ping timeout: 276 seconds]
baroquebobcat has joined #ruby
mercwithamouth has joined #ruby
Voodoofish430 has quit [Quit: Leaving.]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
snovak has quit [Ping timeout: 276 seconds]
xpirator has joined #ruby
tgunr has joined #ruby
resting has joined #ruby
<rien> ziggles: yeah I meant how you parse/navigate the DOM
aryaching_ has joined #ruby
<rien> so just nokogiri and xpath, got it. do you ever need to do a POST?
<resting> when i do po.dirname.inspect, i get => "#<Pathname:app/Config>" (in irb). what do you guys call this output? "#<Pathname:app/Config>
<ziggles> rien: not yet. but i expect i may in the future
<sevenseacat> mechanize would probably be better then
rgbdev has quit [Quit: rgbdev]
<Godd2> nvm, it was some \r\n bs
<rien> or capybara
archer_ has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
<ziggles> sevenseacat: that's true. It shouldn't be hard to switch over considering that mechanize is built on nokogiri.
<ziggles> at least the scrapes that do "reads" would be ok i think
archer_ is now known as Guest47068
<ziggles> rien: why capybara instead of Mechanize?
<rien> ziggles: sometimes it's easier to just say which button to click on a page, instead of coding the POST yourself
narcan has joined #ruby
aryaching has quit [Ping timeout: 264 seconds]
<rien> I think I read about someone using capybara for scraping
<ziggles> rien: that's true but im pretty sure mechanize can do that too?
Lewix has joined #ruby
raul782_ has joined #ruby
<rien> ziggles: I'm honestly not well versed, but the fact that cucumber uses it would make me curious to investigate (if I'm not mistaken)
Inside is now known as dolangarchy
ilyam has joined #ruby
dolangarchy is now known as Inside
<Paradox> lol Banistergalaxy
fgo has joined #ruby
<Paradox> Banistergalaxy, i just saw http://i.imgur.com/nxcKA9B.jpg
thepumpkin has joined #ruby
Guest47068 has quit [Remote host closed the connection]
newUser1234 has joined #ruby
dankest has joined #ruby
rclanan has quit [Read error: Connection reset by peer]
hackingoff has quit [Ping timeout: 240 seconds]
ziggles has quit [Remote host closed the connection]
jjbohn has quit [Quit: Leaving...]
rickmasta has joined #ruby
fyz1x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nari has joined #ruby
dankest has quit [Client Quit]
wmoxam has joined #ruby
orion has joined #ruby
tanema has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
<orion> Hi. Assuming that the [] operator for a class is overloaded, what will happen if I do the following?: def mymethod(blah) [blah] end
ilyam has quit [Ping timeout: 268 seconds]
<orion> Where `mymethod' is an instance method in the same class that the [] operator is overloaded in.
jjbohn has joined #ruby
iliketurtles has joined #ruby
nadirvar_ has quit [Ping timeout: 264 seconds]
Rubba has joined #ruby
<sevenseacat> try it and see? :)
nari has quit [Ping timeout: 256 seconds]
hackingoff has joined #ruby
krawchyk has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
Kol has quit [Ping timeout: 248 seconds]
radic__ has quit [Ping timeout: 246 seconds]
<xybre> irb.is_a? Friend
<sevenseacat> > true
nari has joined #ruby
jds has quit [Ping timeout: 245 seconds]
iliketurtles has quit [Ping timeout: 246 seconds]
<orion> bah
<orion> Ok, that doesn't do what I want.
mansi has quit [Remote host closed the connection]
<popl> ludo.is_a? Friend
<popl> :P
Monie has joined #ruby
<orion> How can I call the [] operator from within an instance method?
dodosan has quit [Remote host closed the connection]
slash_nick has quit [Read error: Connection reset by peer]
<sevenseacat> haha
<sevenseacat> ludo frieeeeend
jjbohn has quit [Quit: Leaving...]
dagnachew has quit [Read error: Connection reset by peer]
nari has quit [Read error: Connection reset by peer]
nari has joined #ruby
<heftig> orion: self[1]
aryaching has joined #ruby
mansi_ has joined #ruby
iliketurtles has joined #ruby
mansi_ has quit [Remote host closed the connection]
aryaching_ has quit [Ping timeout: 256 seconds]
<orion> Thank you!
mansi has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
orion has left #ruby [#ruby]
ukd1 has quit [Remote host closed the connection]
banghouse has quit [Remote host closed the connection]
Kricir has joined #ruby
girija has joined #ruby
radic__ has joined #ruby
mercwithamouth has quit [Ping timeout: 276 seconds]
mansi has quit [Ping timeout: 264 seconds]
efrainolivares has quit [Quit: efrainolivares]
ixti has quit [Quit: WeeChat 0.4.1]
nari has quit [Ping timeout: 245 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
ukd1 has joined #ruby
zacts has quit [Quit: leaving]
rgbdev has joined #ruby
krainboltgreene has quit [Ping timeout: 245 seconds]
baroquebobcat has joined #ruby
Kricir has quit [Ping timeout: 246 seconds]
krainboltgreene has joined #ruby
vlad_starkov has joined #ruby
girija has quit [Ping timeout: 256 seconds]
robscomputer has quit [Remote host closed the connection]
krainboltgreene has quit [Client Quit]
robscomputer has joined #ruby
Kol has joined #ruby
hiyosi has quit [Ping timeout: 264 seconds]
Rubba has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Ping timeout: 256 seconds]
bklane has joined #ruby
mansi has joined #ruby
sarkis has joined #ruby
robscomputer has quit [Ping timeout: 276 seconds]
zeade has joined #ruby
mansi has quit [Remote host closed the connection]
krz has joined #ruby
mansi has joined #ruby
rgbdev has quit [Quit: rgbdev]
aryaching_ has joined #ruby
jds has joined #ruby
efrainolivares has joined #ruby
wmoxam has quit [Ping timeout: 276 seconds]
mansi has quit [Ping timeout: 264 seconds]
aryaching has quit [Ping timeout: 256 seconds]
io_syl has quit [Read error: Operation timed out]
fyz1x has joined #ruby
kung has joined #ruby
rgbdev has joined #ruby
kobain has quit [Ping timeout: 246 seconds]
snovak has joined #ruby
aryaching has joined #ruby
kobain has joined #ruby
chuk has joined #ruby
allanm has quit [Ping timeout: 260 seconds]
aryaching_ has quit [Ping timeout: 246 seconds]
julweber has joined #ruby
guilleiguaran_ has joined #ruby
Davey has joined #ruby
Guest85414__ has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
bklane_ has joined #ruby
zeade has quit [Ping timeout: 246 seconds]
snovak has quit [Ping timeout: 245 seconds]
nari has joined #ruby
bklane has quit [Ping timeout: 245 seconds]
_veer has quit [Ping timeout: 256 seconds]
Es0teric has quit [Ping timeout: 264 seconds]
julweber has quit [Ping timeout: 256 seconds]
labrat__ has joined #ruby
DanKnox is now known as DanKnox_away
mikepack has joined #ruby
Es0teric has joined #ruby
hackingoff has quit [Ping timeout: 264 seconds]
allanm has joined #ruby
calmyournerves has quit [Ping timeout: 245 seconds]
<Godd2> If I have a .wav file loaded, and I run file.getc, shouldn't file.pos only change by one?
<Paradox> only if the potato is called by FFI
nisstyre has quit [Ping timeout: 245 seconds]
<sevenseacat> lol
Kricir has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
<xybre> Godd2: are you sure getc is what you want?
nari has quit [Ping timeout: 246 seconds]
gommo has joined #ruby
dmiller has joined #ruby
tommyvyo has quit [Quit:]
<Godd2> xybre: I'm trying to code a RIFF parser, and I want to grab the characters individually
<Godd2> Well, I was grabbing them 4 at a time with file.each_char.first(4).join, but the same problem with file.pos was happening.
etman has quit [Quit: etman]
<xybre> Godd2: Hmm. Let me check the behaviour here.
moos3 has quit [Quit: Computer has gone to sleep.]
allanm has quit [Ping timeout: 268 seconds]
<Godd2> mmk
moos3 has joined #ruby
tabolario has quit [Quit: Textual IRC Client: www.textualapp.com]
saarinen has joined #ruby
<xybre> Godd2: works fine here
dodosan has joined #ruby
ewnd9 has quit [Ping timeout: 246 seconds]
<xybre> Godd2: I'm on Ruby 2.0.0p247, I don't know if that makes a difference.
<Godd2> I am as well, but Im on Win7
<xybre> I'm running this on OSX, I don't know if I even have Ruby installed on my Windows7 box.
rgbdev has quit [Quit: rgbdev]
saarinen has quit [Client Quit]
<Godd2> This was mine for that small test: https://gist.github.com/nicklink483/6227723
ewnd9 has joined #ruby
julian-delphiki has joined #ruby
efrainolivares has quit [Quit: efrainolivares]
<xybre> Godd2: weird. Try getbyte.
saarinen has joined #ruby
allanm has joined #ruby
BSaboia has joined #ruby
<Godd2> same thing, to the digit: https://gist.github.com/nicklink483/6227735
stuartrexking has quit [Quit: Leaving...]
gommo has quit [Remote host closed the connection]
bean has quit [Ping timeout: 256 seconds]
<Godd2> and with each_char.first
rbwsam has joined #ruby
kreeves has quit [Ping timeout: 276 seconds]
<xybre> Godd2: Well, I'd probably jsut build my own cursor at this point.
<Godd2> Seems like it. K, thanks for lookin into that.
rbwsam has left #ruby [#ruby]
love_color_text has joined #ruby
<xybre> Godd2: what does the second character give you?
rgbdev has joined #ruby
<Godd2> Presumably the character at 6722: https://gist.github.com/nicklink483/6227754
bean has joined #ruby
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kreeves has joined #ruby
aryaching has quit []
<resting> what is this output from inspect called? "#<Pathname:app/Config>" .. an object?
<resting> i mean what data type
Randomage has quit [Ping timeout: 256 seconds]
efrainolivares has joined #ruby
julian-delphiki has quit [Ping timeout: 245 seconds]
<sevenseacat> resting: looks like a Pathname.
Evixion has quit []
<sevenseacat> Pathname representation in a string.
<Godd2> Opening it in "rt" mode fixed it: https://gist.github.com/nicklink483/6227770
Monie has joined #ruby
<xybre> It does say it right there resting. And yes, everything in Ruby is an object, even numbers, booleans, and strings.
zeade has joined #ruby
<xybre> Godd2: that seems.. bad.
stuartrexking has joined #ruby
<xybre> Especially on Windows.
<Godd2> bad as in I shouldn't do that? or bad as in I shouldn't use Windows?
<resting> sevenseacat: i tried po (the object that i inspected), po.dirname.downcase, irb reports there's no downcase method, that why i inspected it, but have no clue what type it is
tjad has quit [Ping timeout: 276 seconds]
rbento has quit [Quit: ┐('~`;)┌]
etman has joined #ruby
nari has joined #ruby
<resting> sevenseacat: i'm learning ruby, so in these cases, we would usually convert them to strings with .to_s ? i'm just trying to know the underlyings so i avoid trial and errors
amacgregor_ has joined #ruby
<sevenseacat> im confused.
<resting> lol..hm..
saarinen has quit [Quit: saarinen]
<xybre> Godd2: well, "t" mode is text mode, which could have really weird repucussions on a binary file. Give it a shot, but be careful.
amacgregor has quit [Ping timeout: 246 seconds]
<resting> what i'm trying to say, how do i know what data type Pathname::dirname returns? i dont think its a string
<xybre> resting: when you call .inspect a lot of objects will straight up TELL you what they are. "#<ThisIsWhatIAm:23423>"
tommyvyo has joined #ruby
tommyvyo has quit [Client Quit]
Randomage has joined #ruby
<xybre> resting: Or.. you could, you know jsut call po.class and it will give you the object's class.
ner0x has quit [Quit: Leaving]
<sevenseacat> +1
tommyvyo has joined #ruby
tommyvyo has quit [Client Quit]
Gooder has joined #ruby
<xybre> And then you can sue the magic of http://apidock.com/ruby to search for the class (if its Core or Standard library) to find out more info.
<xybre> s/sue/use
<resting> xybre, sevenseacat thanks..while trying to explain i think i can call the notation of "#<ThisIsWhatIAm:23423>" as an object?
<resting> well..everything in ruby is an object..but to do downcase, i need to convert that Pathname object to a string object?
vlad_starkov has joined #ruby
<xybre> resting: its just a description of an object
<resting> xybre: thanks..that clears things up for a noobie..lol..
bklane_ has quit [Remote host closed the connection]
<xybre> resting: If you want to downcase a Pathname, you have to convert it to a string with .to_s
AndChat| has joined #ruby
nari has quit [Read error: Connection reset by peer]
<Godd2> xybre: alright, I'll keep that in mind. thanks for your help
<xybre> resting: .inspect sends a messageto the object saying "tell me about yourself" and the string you get back is the object's way of describing what it is. But if you just want the string representation of it (not always the same thing) you can call .to_s on it.
<xybre> Godd2: np :)
<resting> xybre: sure :)
Banistergalaxy has quit [Ping timeout: 245 seconds]
nari has joined #ruby
kW_ has quit [Quit: Konversation terminated!]
vlad_starkov has quit [Ping timeout: 264 seconds]
zeade has quit [Ping timeout: 264 seconds]
efrainolivares has quit [Quit: efrainolivares]
<epitron> aHHH what is that magic "11" for! https://github.com/ruby/ruby/blob/trunk/dir.c#L1868
newUser1234 has quit [Remote host closed the connection]
Tricon has quit [Quit: Linkinus - http://linkinus.com]
chriskk has quit [Read error: Connection reset by peer]
araujo has quit [Read error: Connection reset by peer]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
<Nilium> epitron: The first 1 is the number of required arguments, the second is the number of optional arguments.
<epitron> o_O
<epitron> thanks for the tip
brennanMKE has quit [Remote host closed the connection]
<epitron> i wonder why that isn't two arguments
<Nilium> I suspect it's just a case of bad design persisting.
<epitron> rb_scan_args(argc, argv, required_args, optional_args, &str, &rflags)
stevenrockarts has joined #ruby
<epitron> i'm trying to imagine why it ever existed :)
<epitron> maybe matz had plans for an advanced argument DSL
<Nilium> Or someone just wrote it and then people used it and then woops it's stuck
<epitron> oh, maybe you can use "*"
parzo has quit [Remote host closed the connection]
<epitron> ?
parzo has joined #ruby
<epitron> i dunno :)
<Nilium> I think that's possible, I can't remember, but that's doable via constants.
rgbdev has quit [Quit: rgbdev]
<epitron> yeah, i guess -1 could be *
<Nilium> Granted, you've already got argv, so why you'd need to take an array and make an array from the array is beyond me
efrainolivares has joined #ruby
<epitron> haha
<epitron> i think i'm going to give up... there's so many macros and weird voodoo going on here
<Nilium> You get used to it after a while.
<epitron> i just wanted to try hacking it to add a "/" after directories when you do "Dir["*"]"
<epitron> (without 'lstat'ing every file)
baroquebobcat has joined #ruby
swordsmanz has quit [Quit: swordsmanz]
tanema has quit [Remote host closed the connection]
fgo has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
fgo has joined #ruby
anay has joined #ruby
nari has quit [Read error: Connection reset by peer]
snovak has joined #ruby
nari has joined #ruby
Lewix has quit [Remote host closed the connection]
Kricir has quit [Remote host closed the connection]
mansi has joined #ruby
fgo has quit [Ping timeout: 264 seconds]
snovak has quit [Read error: Operation timed out]
tjad has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Read error: Operation timed out]
horofox has joined #ruby
bluOxigen has joined #ruby
eka has joined #ruby
anay has quit [Remote host closed the connection]
tommyvyo has joined #ruby
viszu has joined #ruby
nari has quit [Ping timeout: 256 seconds]
tommyvyo has quit [Client Quit]
BSaboia has quit [Quit: Leaving]
<Godd2> xybre: YES. It's working for any file! https://gist.github.com/nicklink483/6227916
tjbiddle has quit [Read error: Connection reset by peer]
tjbiddle_ has joined #ruby
stuartrexking has quit [Ping timeout: 245 seconds]
diegoviola has joined #ruby
macmartine has joined #ruby
DanKnox_away is now known as DanKnox
fridim_ has quit [Ping timeout: 245 seconds]
tommyvyo has joined #ruby
butblack has joined #ruby
fyz1x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Yakko has joined #ruby
<xybre> Godd2: woot!
agjacome has joined #ruby
<xybre> Godd2: what are you going to do with your wav reader?
Spami has joined #ruby
zeropx has quit [Quit: has left the room … Or did he?]
<Godd2> I'm not sure yet. I made it because I wanted to help out the guys who made win32-sound: http://rubydoc.info/gems/win32-sound/0.5.1/frames
<Godd2> They had a future plan to add Wav reading capabilities
zeade has joined #ruby
<Godd2> So I'm gonna make this thing into a much more robust gem
MisterE has joined #ruby
MisterE has left #ruby ["The purpose of war is to serve political ends but the true nature of war is to serve itself."]
brennanMKE has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
tommyvyo has quit [Quit:]
<xybre> Hmm, can you read the wav and send it to an output?
<xybre> Can you get a list of outputs?
Lewix has joined #ruby
<Godd2> My program can only display a cursory amount of RIFF metadata, but the win32-sound gem can tell Windows to play an arbitrary wav file.
ewnd9 has quit [Remote host closed the connection]
DanKnox is now known as DanKnox_away
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sayan has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<Godd2> I'm only just now going to code the wav attributes parser for sampling, channels, bits per sample, etc.
<xybre> I make electronic music, yet I never really considered using Ruby to do anything. I wonder how much low level access it could get.
saarinen has joined #ruby
<Godd2> Well I'll keep you informed on my progress :)
saarinen has quit [Client Quit]
diegoviola has quit [Ping timeout: 245 seconds]
ffranz has quit [Quit: Leaving]
<xybre> :D
viszu has quit [Quit: Leaving.]
<Godd2> The only project that generates music in Ruby is archeopteryx
<Godd2> And he hasn't developed on it in 5 years
saarinen has joined #ruby
brennanMKE has quit [Ping timeout: 245 seconds]
devoldmx has quit [Remote host closed the connection]
zeade has quit [Ping timeout: 264 seconds]
<xybre> Bastard.
<xybre> There's a project this guy was working on that integrated Ruby with Csound.
<xybre> And then there's the Ruby game libraries, but I assume they're not doing much audio work.
<zendeavor> just write pulseaudio bindings
<zendeavor> ;]
Monie has joined #ruby
saarinen has quit [Quit: saarinen]
<xybre> Jack audio might be more useful since its cross platform.
<Nilium> I'd assume anything game-related is probably using OpenAL.
<zendeavor> pulse is cross-platform
jonahR has quit [Quit: jonahR]
Kruppe has quit [Remote host closed the connection]
aganov has joined #ruby
Monie has quit [Client Quit]
<zendeavor> perhaps pulse doesn't have osx stuff?
<Nilium> Speaking of which, the only OpenAL bindings for Ruby are now 6 years old.
<zendeavor> i know it works on windows somehow, never tried it though
<Nilium> I should probably look into writing some of my own.
<xybre> cross platform in this case doesn't mean "works on linux and solaris" :p
fgo has joined #ruby
<zendeavor> yah i'm saying pulse isn't linux-specific
amacgregor has joined #ruby
<zendeavor> works everywhere ESD and alsa do
<xybre> I'd like it to work on Linux/OSX/Windows.
<zendeavor> supposed to anyway.
amacgregor_ has quit [Ping timeout: 246 seconds]
narcan has joined #ruby
<xybre> Nilium: OpenAL might be a good idea.
<xybre> On Windows you'd need ASIO support or its kind of pointless though.
vlad_starkov has joined #ruby
randomautomator has joined #ruby
<zendeavor> xybre: http://is.gd/0BW760 supported operating systems
tonini has joined #ruby
orion has joined #ruby
<orion> Hi. Is there a shorthand way to rewrite this?: options[:primary_key] => request[options[:primary_key]]
<heftig> don't bother with pulse
rickmasta has quit [Quit: Leaving...]
<xybre> zendeavor: relevent to my interests
randomautomator has quit [Remote host closed the connection]
<heftig> xybre: use a higher-level library like OpenAL, SDL, Bass, FMOD
<xybre> orion: what are you trying to do?
dmiller has quit [Remote host closed the connection]
<zendeavor> i won't say it's any easier to get end-users on pulse than it is to get them on jack2 though
randomautomator has joined #ruby
siera08 has joined #ruby
macmartine has quit [Read error: Connection reset by peer]
<orion> xybre: Exactly what I just wrote.
<zendeavor> but you probably have to jump through hoops in both cases
<xybre> heftig: not for low latency. pulse might not even be good enough on some systems.
<xybre> orion: okay.
tonini has quit [Client Quit]
<heftig> xybre: you wouldn't be using ruby then, either
Badreddin has quit [Ping timeout: 245 seconds]
<zendeavor> aha it's heftig !
tonini has joined #ruby
Monie has joined #ruby
<heftig> eww, it's zendeavor
<xybre> heftig: okay :)
tonini has quit [Client Quit]
<zendeavor> i just said write pulseaudio bindings, that's all ;D
dwype has quit [Quit: Leaving.]
Inside has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Ping timeout: 276 seconds]
<zendeavor> heftig: don't h8, appreshee8
dwype has joined #ruby
<xybre> Anyway, I'm worried about the latency and CPU overhead that the Windows mixer adds, its always been a problem, so ASIO is the way to go.
<heftig> that's only good for platforms that ship pulseaudio
etman has quit [Quit: etman]
<zendeavor> mhmm
ntus1017 has joined #ruby
<heftig> windows and mac osx don't
<zendeavor> of course not
ukd1 has quit [Remote host closed the connection]
stevenrockarts has quit [Quit: stevenrockarts]
fgo has quit [Remote host closed the connection]
mosez has quit [Ping timeout: 264 seconds]
dwype has quit [Ping timeout: 264 seconds]
JohnBat26|2 has joined #ruby
parzo has quit [Remote host closed the connection]
ukd1 has joined #ruby
anay has joined #ruby
tommyvyo has joined #ruby
ananthakumaran has joined #ruby
ukd1 has quit [Remote host closed the connection]
chasep_work has quit [Write error: Connection reset by peer]
chasep_work has joined #ruby
kobain has quit [Quit: El motor por excelencia http://www.europio.org/]
efrainolivares has quit [Quit: efrainolivares]
SeySayux has quit [Ping timeout: 240 seconds]
lunarjar has quit [Ping timeout: 240 seconds]
rshetty has joined #ruby
newUser1234 has joined #ruby
snovak has joined #ruby
stevenrockarts has joined #ruby
SeySayux has joined #ruby
lunarjar has joined #ruby
zeade has joined #ruby
newUser1234 has quit [Ping timeout: 245 seconds]
snovak has quit [Ping timeout: 264 seconds]
postmodern has quit [Quit: Leaving]
Diranged has quit [Quit: Leaving.]
stevenrockarts has quit [Quit: stevenrockarts]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x1337807x has joined #ruby
browndawg has joined #ruby
Kricir has joined #ruby
sonne has quit [Ping timeout: 256 seconds]
tommyvyo has quit [Quit:]
intuxicated has joined #ruby
macmartine has joined #ruby
kevinykchan has joined #ruby
robscomputer has joined #ruby
txdv has quit [Read error: Operation timed out]
Kricir has quit [Ping timeout: 276 seconds]
nmabry has joined #ruby
julweber has joined #ruby
zeade has quit [Read error: Connection timed out]
siera08 has quit [Quit: ChatZilla 0.9.90.1 [Firefox 22.0/20130618035212]]
stevenrockarts has joined #ruby
alpha123 has quit [Quit: sleeps]
robscomputer has quit [Remote host closed the connection]
gazarsgo has quit [Quit: gazarsgo]
diegoviola has joined #ruby
robscomputer has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
Spami has quit [Quit: This computer has gone to sleep]
julweber has quit [Ping timeout: 245 seconds]
apeiros has joined #ruby
tommyvyo has joined #ruby
tonini has joined #ruby
amacgregor_ has joined #ruby
apeiros has quit [Remote host closed the connection]
amacgregor has quit [Ping timeout: 246 seconds]
staafl has joined #ruby
apeiros has joined #ruby
pumper has quit [Ping timeout: 264 seconds]
Guest73293 has joined #ruby
Guest73293 has quit [Quit: Leaving]
io_syl has joined #ruby
l34ch has joined #ruby
<l34ch> hey guys
yacks has quit [Ping timeout: 256 seconds]
Badreddin has joined #ruby
Zolo has quit [Remote host closed the connection]
Kol has quit [Ping timeout: 245 seconds]
ananthakumaran has quit [Quit: Leaving.]
<Godd2> mornin
apeiros has quit [Remote host closed the connection]
orion has left #ruby [#ruby]
Diranged has joined #ruby
tomzx_mac has quit [Ping timeout: 264 seconds]
thebastl has joined #ruby
Kol has joined #ruby
sonne has joined #ruby
l34ch has quit [Ping timeout: 245 seconds]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
marcdel has joined #ruby
julweber has joined #ruby
raul782_ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
Evixion has joined #ruby
tagrudev has joined #ruby
julweber has quit [Remote host closed the connection]
yacks has joined #ruby
enroxorz has joined #ruby
rickmasta has joined #ruby
vlad_starkov has quit [Ping timeout: 256 seconds]
ArchBeOS has quit [Ping timeout: 268 seconds]
enroxorz is now known as ArchBeOS
workmad3 has joined #ruby
ArchBeOS has quit [Read error: Connection reset by peer]
ArchBeOS has joined #ruby
parzo has joined #ruby
tommyvyo has quit [Quit:]
zeade has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.1]
sarkis has quit [Ping timeout: 245 seconds]
amacgregor_ has quit [Read error: Connection reset by peer]
amacgregor has joined #ruby
goleldar has quit [Ping timeout: 264 seconds]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
butblack has left #ruby [#ruby]
macmartine has quit [Quit: Computer has gone to sleep.]
apeiros has joined #ruby
snovak has joined #ruby
ccolorado has joined #ruby
marcdel has joined #ruby
maasdesigner1 has joined #ruby
ananthakumaran has joined #ruby
maasdesigner1 is now known as maasdesigner
JDHankle has quit [Remote host closed the connection]
rezzack has joined #ruby
rurufufuss has joined #ruby
<ccolorado> Hi, i want to "consume" the trailing words from a string if they are within a list of words. The string is a movie record which contains the name followed by a set of keywords that specify if the movie is on 3D, imax and so on.
snovak has quit [Ping timeout: 246 seconds]
Levin_22 has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
<ccolorado> I can't think of a mechanism to substract in reverse that doesn't involve splitting the string by each word
apeiros has quit [Ping timeout: 264 seconds]
tjbiddle_ has quit [Quit: tjbiddle_]
St_Marx has quit [Quit: Leaving]
sayan has quit [Ping timeout: 276 seconds]
<rien> ccolorado: can you provide example data and what they'd look like after the transformation you're proposing?
zeade1 has joined #ruby
zeade has quit [Ping timeout: 246 seconds]
_honning_ has joined #ruby
tommyvyo has joined #ruby
wudofyr has quit [Remote host closed the connection]
wudofyr has joined #ruby
threesome has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sevenseacat> where did Dig go
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cj3kim has quit [Remote host closed the connection]
St_Marx has joined #ruby
stef_204 has joined #ruby
zoee has joined #ruby
kiri has joined #ruby
disgrntld has joined #ruby
bigkevmcd has quit [Remote host closed the connection]
<rien> ccolorado: uhm... can you please write in the way I just illustrated in the gist?
tonni has quit [Remote host closed the connection]
<rien> sevenseacat: maybe it's some new crazy file format where the word Dig (typecased just so) is the string delimiter :P
stevenrockarts has quit [Quit: stevenrockarts]
bigkevmcd has joined #ruby
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
_Andres has joined #ruby
<ccolorado> rien: here is what I got, Althought i am not entirely sure it is what you asked :(
renderful has joined #ruby
<sevenseacat> looks like you just want the first word then?
blaxter_ has joined #ruby
noop has joined #ruby
<ccolorado> sevenseacat: it certantly looks like that, perhaps not the best example, "Wolvering the inmortal Dig 3D Dolby" , this would idealy return result { :title => "Wolvering the inmortal", :specs => [3D, Dolby] }
<sevenseacat> so where did Dig go and why?
tonini has quit [Ping timeout: 264 seconds]
<ccolorado> sevenseacat: typo
<ccolorado> First I thougth you where looking for user 'Dig'
<sevenseacat> well that helps
jds has quit [Ping timeout: 256 seconds]
apeiros has joined #ruby
tonini has joined #ruby
zeade1 has quit [Quit: Leaving.]
<ccolorado> it should have been result = { :title => "Wolvering the inmortal", :specs => [Dig, 3D, Dolby] } #order of result["specs"] doesn't really matter
JZ|Zzz has quit [Ping timeout: 264 seconds]
horofox has quit [Ping timeout: 245 seconds]
jarray52 has left #ruby [#ruby]
noop is now known as noopq
<sevenseacat> but Dig isnt in your list of stopword-type things
Kelet has quit [Quit: Leaving]
tommyvyo has quit [Quit:]
ntus1017 has quit [Remote host closed the connection]
JZ|Zzz has joined #ruby
JZ|Zzz is now known as JZTech101
jds has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
apeiros has quit [Ping timeout: 246 seconds]
Gooder has quit [Remote host closed the connection]
<rien> ccolorado: is Dig always the word that divids the title from the tags?
<rien> sevenseacat: what's the bot sigil here?
ebanoid has joined #ruby
<sevenseacat> bot sigil?
amacgregor has quit [Read error: Connection reset by peer]
<rien> > 1 + 1
amacgregor_ has joined #ruby
<rien> ! 1 + 1
<rien> the symbol we type for the bot to run some code... that should be in the /topic
relix has joined #ruby
<sevenseacat> >> puts 'foo'
<eval-in> sevenseacat => foo ... (https://eval.in/43144)
<ccolorado> sevenseacat: rien: sorry that was sloppines, Dig was one of the keywords
<sevenseacat> sorry, i misunderstood
<ccolorado> "Wolverine: Inmortal Dig 3D Dolby".method_I_don't_have([ Dig, 3D, IMAX, Sub, Dolby])
havenwood has joined #ruby
<ccolorado> # => result { :title => "Wolverine: Inmortal", :specs => [Dig, 3D, Dolby] }
rickmasta has quit [Quit: Leaving...]
itcharlie has joined #ruby
<ccolorado> sevenseacat: that was probably my fault
<rien> ccolorado: ok you want this: "Wolverine is immortal Dig 3D Dolby".split.split_at_index("Dig"){|title,specs| # do something with title and spec)
<rien> ccolorado: all you need to do now is code split_at_index... just find the first index for the parameter given, then pass those two arrays to a yield block
tonni has joined #ruby
cj3kim has joined #ruby
<rien> "those two arrays" being the two arrays you'll get when you do yield array[0..index-1], array[index..-1]
<ccolorado> rien: The keword list in the record do not allways start with Dig
julweber has joined #ruby
<rien> then do .... split_at_index(/(Dig|Dag|Dog)/){|title,specs| .... same deal
<rien> this top down approach will take you far. now you know which method you need to code, and how it needs to behave
JZTech101 has quit [Ping timeout: 246 seconds]
persand has joined #ruby
Senjai has quit [Ping timeout: 268 seconds]
rickmasta has joined #ruby
<ccolorado> rien: I see now, thanks so much rien & sevenseacat
aryaching has joined #ruby
tonini_ has joined #ruby
wallerdev has quit [Quit: wallerdev]
<rien> ccolorado: :)
Lewix has quit [Remote host closed the connection]
alem0lars has joined #ruby
kreisys has quit [Quit: Textual IRC Client: www.textualapp.com]
aryaching has quit [Client Quit]
sayan has joined #ruby
tonni has quit [Ping timeout: 245 seconds]
Levin_22 has quit [Quit: Levin_22]
agjacome has quit [Quit: leaving]
<rien> lol just notice the nice symmetry between [0..index-1] and [index..-1]
zachrab has joined #ruby
cj3kim has quit [Ping timeout: 245 seconds]
filipe has joined #ruby
julweber has quit [Remote host closed the connection]
tonni has joined #ruby
julweber has joined #ruby
Godd2 has quit [Ping timeout: 250 seconds]
dash_ has joined #ruby
dagobah has joined #ruby
huevon has joined #ruby
snovak has joined #ruby
tatsuya_o has joined #ruby
khushildep has joined #ruby
anay has quit [Read error: Connection reset by peer]
anay has joined #ruby
julweber has quit [Ping timeout: 245 seconds]
tjbiddle has joined #ruby
snovak has quit [Ping timeout: 268 seconds]
dweeb has joined #ruby
tjbiddle has quit [Client Quit]
threesome has quit [Ping timeout: 245 seconds]
itcharlie has left #ruby [#ruby]
anay has quit [Remote host closed the connection]
echevemaster has quit [Quit: Leaving]
anay has joined #ruby
hopheady has joined #ruby
v8energy has quit [Ping timeout: 276 seconds]
huoxito has quit [Quit: Leaving]
e3r98gh35t has joined #ruby
e3r98gh35t has quit [Read error: Connection reset by peer]
yy-nm has joined #ruby
canton7 has joined #ruby
e3r98gh35t has joined #ruby
julweber has joined #ruby
intuxicated has quit [Ping timeout: 268 seconds]
avril14th has joined #ruby
huevon has quit [Read error: Connection reset by peer]
Es0teric has quit [Quit: Computer has gone to sleep.]
anay has quit [Read error: Connection reset by peer]
anay has joined #ruby
huevon has joined #ruby
tonini has quit [Quit: leaving]
labrat__ has quit [Ping timeout: 276 seconds]
Kricir has joined #ruby
staafl has quit [Ping timeout: 256 seconds]
ahawkins has joined #ruby
vlad_starkov has joined #ruby
huevon has quit [Read error: Connection reset by peer]
labrat__ has joined #ruby
maxmanders has joined #ruby
huevon has joined #ruby
e3r98gh35t has quit [Read error: Connection reset by peer]
arturaz has joined #ruby
tonini_ has quit [Quit: Lost terminal]
Peej has quit [Quit: Research is what I'm doing when I don't know what I'm doing.]
Kricir has quit [Ping timeout: 246 seconds]
maz-dev has joined #ruby
aryaching has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
jprovazn has joined #ruby
intuxicated has joined #ruby
rshetty has quit [Quit: Sleeping]
Diranged has quit [Ping timeout: 276 seconds]
huevon has quit [Read error: Connection reset by peer]
tatsuya_o has quit [Remote host closed the connection]
maniacal has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
ephemerian has joined #ruby
julweber has quit [Ping timeout: 256 seconds]
parzo has quit [Remote host closed the connection]
marius has quit [Ping timeout: 245 seconds]
threesome has joined #ruby
_Andres has quit [Ping timeout: 264 seconds]
warnabas has joined #ruby
tonini has joined #ruby
mneorr has joined #ruby
tesuji has joined #ruby
love_color_text has quit [Read error: No route to host]
robscomputer has quit [Ping timeout: 264 seconds]
tonini has quit [Client Quit]
tonini has joined #ruby
hopheady has quit [Remote host closed the connection]
hopheady has joined #ruby
julweber has joined #ruby
tonini has quit [Client Quit]
tonini has joined #ruby
love_color_text has joined #ruby
jds has quit [Remote host closed the connection]
kevinykchan has joined #ruby
pyrac has joined #ruby
jds has joined #ruby
Al_ has joined #ruby
browndawg has quit [Ping timeout: 264 seconds]
tonini has quit [Client Quit]
tonini has joined #ruby
_Andres has joined #ruby
tonini has quit [Client Quit]
tonini has joined #ruby
tonini has quit [Client Quit]
tonini has joined #ruby
s2013 has quit [Ping timeout: 256 seconds]
zachrab has quit [Remote host closed the connection]
jds has quit [Ping timeout: 264 seconds]
cj3kim has joined #ruby
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
tonini has quit [Client Quit]
tonini has joined #ruby
Coffers has joined #ruby
amacgregor has joined #ruby
hyperscion has quit [Ping timeout: 250 seconds]
amacgregor_ has quit [Ping timeout: 256 seconds]
aryaching has quit []
tonini has quit [Client Quit]
tonini has joined #ruby
devdazed has quit [Ping timeout: 240 seconds]
rubyrubyruby has joined #ruby
Diranged has joined #ruby
devdazed has joined #ruby
Domon has quit [Remote host closed the connection]
tonni has quit [Remote host closed the connection]
Domon has joined #ruby
Deele has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
julweber has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
ryandeussing has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
ryandeussing has joined #ruby
Domon_ has joined #ruby
Domon has quit [Read error: Connection reset by peer]
wildroman has quit [Read error: Operation timed out]
barratt has joined #ruby
Steve009 has joined #ruby
<Steve009> I am trying to use Nori gem to parse xml
randomautomator has quit [Remote host closed the connection]
<Steve009> xml looks like: <str name="fs_fdid">7FF5646A-9116-4765-85BE-F032459E9332</str>
vince_prignano has joined #ruby
randomautomator has joined #ruby
<Steve009> by default the fact that the node names are like <str name>
<Steve009> causes a prob
<Steve009> its looking for node names that are more like strName>
<Steve009> <strName>
yy-nm has quit [Read error: Connection reset by peer]
disgrntld has quit [Quit: Leaving.]
<Steve009> any ideas on how have nori accommodate this?
randomau_ has joined #ruby
<sevenseacat> well the node name isnt str name, its str
zombiebit has joined #ruby
<sevenseacat> name is an attribute of the node
<jrobeson> that's because that's valid xml as <str name="whatever"
<jrobeson> the name is an attribute
tmi has joined #ruby
hopheady has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
<jrobeson> Steve009, i think you need to read up on how xml works
<Steve009> what i am saying is that when nori parses it drops everything after str
<jrobeson> as it should
<jrobeson> because name is an attribute
snovak has joined #ruby
<jrobeson> you get the attribute on each <str>
<jrobeson> if you want the value of name
<Steve009> attribute names are dropped
<sevenseacat> unlikely
<jrobeson> they aren't dropped..
<Steve009> lol
yy-nm has joined #ruby
jim0thy_ has joined #ruby
randomautomator has quit [Ping timeout: 256 seconds]
<jrobeson> it's not valid xml to have <str name>
Davey has quit [Quit: Computer has gone to sleep.]
hamakn_ has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
<Steve009> ya its a very poorly designed old system that is outputting this crap
huevon has joined #ruby
<jrobeson> then you should fix it.. and then pass it to nori
zacts has joined #ruby
BizarreCake has joined #ruby
companion is now known as Companion
snovak has quit [Ping timeout: 264 seconds]
<jrobeson> seems like it shouldn't be hard to fix it up .. as long as there aren't too many baddies..
Matriks has joined #ruby
joonty has quit [Ping timeout: 248 seconds]
<Steve009> Cant adjust the source. Will have to fix it on the nori side. I think i found a issue similar on the issue queue
justsee has joined #ruby
jds has joined #ruby
browndawg has joined #ruby
daniel_hinojosa has quit [Quit: Leaving.]
niceguyjames has joined #ruby
mklappstuhl has joined #ruby
tonni has joined #ruby
jim0thy_ has quit [Quit: jim0thy_]
joonty has joined #ruby
Xeago has joined #ruby
mneorr has quit [Remote host closed the connection]
<jrobeson> Steve009, i meant like run a preprocessing script on it
<Steve009> agreed
jim0thy_ has joined #ruby
tvw has joined #ruby
Heskie has joined #ruby
<Steve009> going to try a few different gems first
bean has quit [Read error: Connection reset by peer]
fgo has joined #ruby
rshetty has joined #ruby
randomau_ has quit [Read error: Connection reset by peer]
ebanoid has quit [Quit: brbomgwtfbbq]
randomautomator has joined #ruby
randomautomator has quit [Read error: No route to host]
randomautomator has joined #ruby
randomautomator has quit [Remote host closed the connection]
jefflyne has joined #ruby
randomautomator has joined #ruby
jefflyne has quit [Max SendQ exceeded]
marr has joined #ruby
jefflyne has joined #ruby
jefflyne has quit [Max SendQ exceeded]
mneorr has joined #ruby
jefflyne has joined #ruby
pyrac has quit [Ping timeout: 256 seconds]
ebanoid has joined #ruby
hackingoff has joined #ruby
brennanMKE has joined #ruby
<Steve009> looks like xml attributes is a common problem with ruby xml parsers
mercwithamouth has joined #ruby
randomautomator has quit [Ping timeout: 256 seconds]
pyrac has joined #ruby
vlad_starkov has joined #ruby
tatsuya_o has joined #ruby
<Xeago> Steve009: any language really
labrat__ has quit [Ping timeout: 245 seconds]
brennanMKE has quit [Ping timeout: 256 seconds]
anay has quit [Read error: Connection reset by peer]
anay has joined #ruby
<Steve009> this looks like it may have potential https://github.com/msievers/cobravsmongoose
codecop has joined #ruby
<sevenseacat> a 7 year old gem?
vlad_starkov has quit [Ping timeout: 246 seconds]
Yakko has quit [Read error: Connection reset by peer]
noname001 has joined #ruby
elaptics`away is now known as elaptics
e3r98gh35t has joined #ruby
aryaching has joined #ruby
<Steve009> works better than the others
<Steve009> but still has some issues
obs has joined #ruby
<Steve009> The problem is to find a pattern/convention for the conversion into a hash
sqd has joined #ruby
nmabry has quit [Quit: nmabry]
amacgregor_ has joined #ruby
tonini has quit [Quit: leaving]
tonini has joined #ruby
lkba has quit [Ping timeout: 256 seconds]
anay has quit [Remote host closed the connection]
Steve009 has quit [Quit: Steve009]
ferdev has joined #ruby
vlad_starkov has joined #ruby
tonini has quit [Client Quit]
tonini has joined #ruby
ehaliewicz has quit [Remote host closed the connection]
iIlL10Oo has joined #ruby
<iIlL10Oo> a=[1] ; why a[1,1].class != a[3,1].class
lesliewen has joined #ruby
tonini has quit [Client Quit]
amacgregor has quit [Ping timeout: 276 seconds]
tonini has joined #ruby
<tobiasvl> a[3,1].class == NilClass
<tobiasvl> a[3,1] is nil
<tobiasvl> not an array
<tobiasvl> iIlL10Oo: ^
boblu has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
Quest has joined #ruby
<Quest> hi
<Quest> any help with this error http://pastebin.com/z5BQ5muA ?
<iIlL10Oo> tobiasvl: ok
dwype has joined #ruby
justsee has quit [Ping timeout: 256 seconds]
_honning_ has quit [Ping timeout: 246 seconds]
dwype has quit [Max SendQ exceeded]
ferdev_ has joined #ruby
parzo has joined #ruby
<tobiasvl> iIlL10Oo: why did you think they would have the same class? what were you trying to do?
ferdev has quit [Ping timeout: 268 seconds]
dwype has joined #ruby
ferdev_ is now known as ferdev
dwype has quit [Max SendQ exceeded]
graydot has joined #ruby
troessner has joined #ruby
dwype has joined #ruby
dwype has quit [Max SendQ exceeded]
dsaravel has joined #ruby
jefflyne has quit [Ping timeout: 268 seconds]
love_color_text has quit [Read error: Connection reset by peer]
mbuf has joined #ruby
e3r98gh35t has quit [Remote host closed the connection]
e3r98gh35t has joined #ruby
<mbuf> is there an example on how to use begin..rescue..end for system commands executed within backquote? or is there any other recommended option?
dwype has joined #ruby
e3r98gh35t has quit [Remote host closed the connection]
dwype has quit [Max SendQ exceeded]
e3r98gh35t has joined #ruby
dwype has joined #ruby
dwype has quit [Max SendQ exceeded]
<iIlL10Oo> tobiasvl: I just thinking , not realy doing something
jefflyne has joined #ruby
zeropx has joined #ruby
nomenkun has joined #ruby
<tobiasvl> ok
dwype has joined #ruby
browndawg has quit [Ping timeout: 246 seconds]
klaut has joined #ruby
dwype has quit [Max SendQ exceeded]
dwype has joined #ruby
dwype has quit [Max SendQ exceeded]
ezotrank has joined #ruby
jonkri has joined #ruby
jonkri has quit [Changing host]
jonkri has joined #ruby
iIlL10Oo has left #ruby [#ruby]
maasdesigner has quit [Read error: Connection reset by peer]
dwype has joined #ruby
maasdesigner has joined #ruby
dwype has quit [Max SendQ exceeded]
dwype has joined #ruby
e3r98gh35t has quit [Read error: Connection reset by peer]
dwype has quit [Max SendQ exceeded]
dwype has joined #ruby
troessner has quit [Ping timeout: 245 seconds]
dwype has quit [Max SendQ exceeded]
dwype has joined #ruby
ezotrank has quit [Client Quit]
dwype has quit [Max SendQ exceeded]
hamakn_ has quit [Remote host closed the connection]
troessner has joined #ruby
dwype has joined #ruby
dwype has quit [Max SendQ exceeded]
hamakn has joined #ruby
snovak has joined #ruby
dwype has joined #ruby
Inside has joined #ruby
anay has joined #ruby
e3r98gh35t has joined #ruby
e3r98gh35t has quit [Read error: Connection reset by peer]
browndawg has joined #ruby
julweber has joined #ruby
anay has quit [Remote host closed the connection]
hamakn has quit [Ping timeout: 246 seconds]
devoldmx has joined #ruby
troessner has quit [Ping timeout: 256 seconds]
snovak has quit [Ping timeout: 268 seconds]
apeiros has joined #ruby
mercwithamouth has quit [Quit: leaving]
troessner has joined #ruby
troessner has quit [Max SendQ exceeded]
mercwithamouth has joined #ruby
troessner has joined #ruby
julweber has quit [Ping timeout: 276 seconds]
julweber has joined #ruby
shiroginne has quit []
postmodern has joined #ruby
maasdesigner has quit [Read error: Connection reset by peer]
mneorr has quit [Remote host closed the connection]
maasdesigner has joined #ruby
renothing has joined #ruby
<bnagy> mbuf: backtick commands won't raise
<bnagy> ever, as far as I know
<eliasp> does Mocha provide a way, to ignore any invokations of an .expect()-ed method besides the one matching the specified .with() params, e.g. Dir.expects(:exists?).with('/sys/class/net').returns(true)
<bnagy> if you want the error status look at something in Open3 imo
<eliasp> right now, it monitors all invokations of Dir.exists? even with completely different params than specified in .with()
aaronmcadam has joined #ruby
<eliasp> btw: Mocha: http://gofreerange.com/mocha/
obs has quit [Remote host closed the connection]
<mbuf> bnagy: thanks
browndawg1 has joined #ruby
aryaching_ has joined #ruby
troessner has quit [Ping timeout: 246 seconds]
browndawg has quit [Ping timeout: 264 seconds]
sevenseacat has quit [Quit: Leaving.]
camilasan has joined #ruby
<Quest> any help with this error http://pastebin.com/z5BQ5muA ?
colonolGron has joined #ruby
relix has joined #ruby
<bnagy> Quest: you probably don't have dev tools
aryaching has quit [Ping timeout: 246 seconds]
<bnagy> depending on your distro that might mean you just need OS build tools package, or it might mean you need a ruby-dev package, depending how you installed ruby
Alina-malina has quit [Read error: Connection reset by peer]
smathieu has joined #ruby
<Quest> bnagy, nope. iam using linux
<Quest> ubuntu
mbuf has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
Alina-malina has joined #ruby
<Quest> bnagy, istalled it by package manager
<bnagy> ok. Like I said, for some distros, which I think includes ubuntu, the 'normal' package doesn't install the ruby dev stuff, which is kinda lame
<Quest> bnagy, going to install ruby-dev
e3r98gh35t has joined #ruby
<bnagy> I would recommend installing it via chruby or something, fwiw, but try ruby-dev
e3r98gh35t has quit [Read error: Connection reset by peer]
julweber has quit [Ping timeout: 245 seconds]
<bnagy> maybe ubuntu has a ruby-xxx-full package as well.. I forget
anay has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
e3r98gh35t has joined #ruby
mneorr has joined #ruby
<Quest> k
smathieu has quit [Ping timeout: 276 seconds]
e3r98gh35t has quit [Read error: Connection reset by peer]
jds has quit [Ping timeout: 276 seconds]
bluOxigen has quit [Read error: Network is unreachable]
bluOxigen has joined #ruby
e3r98gh35t has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
mneorr has quit [Remote host closed the connection]
e3r98gh35t has quit [Read error: Connection reset by peer]
e3r98gh35t has joined #ruby
allsystemsarego has joined #ruby
allsystemsarego has quit [Changing host]
allsystemsarego has joined #ruby
<dagobah> How can I get the previous object in an iteration, the opposite of next?
aryaching has joined #ruby
<bnagy> you can't
<bnagy> gone forever
e3r98gh35t has quit [Read error: Connection reset by peer]
jim0thy_ has quit [Quit: jim0thy_]
<bnagy> you can use each_with_index, or you could use inject or something horrible
e3r98gh35t has joined #ruby
<Quest> bnagy, its working but giving dependancy problem too.
Inside has quit [Read error: Connection reset by peer]
<Quest> bnagy, do you know scss / sass ? error main.scss (Line 3: Undefined variable: "$h-shadow".)
<Quest> for @nixin boxShadow($h-shadow:0px, $v-shadow:2px, $blur:2px, $spread:0px, $color:black, $inset:outset) {
vadelius has quit [Ping timeout: 268 seconds]
<bnagy> nope, means nothin to me
<Quest> nothing?
<Quest> k
intuxicated has quit [Ping timeout: 245 seconds]
sjltaylor has joined #ruby
<dagobah> bnagy: How can I use each with index? Just decrement the index?
<apeiros> Quest: shouldn't that be @mixin ?
e3r98gh35t has quit [Read error: Connection reset by peer]
<apeiros> dagobah: each_cons { |previous, current|
<Quest> lols
e3r98gh35t has joined #ruby
<Quest> apeiros, thanks
aryaching_ has quit [Ping timeout: 268 seconds]
<bnagy> ooh, that's a good idea ( each_cons )
<apeiros> dagobah: if you need the first item too (with previous = nil) then you'd need to prepend the array with a nil (assuming it's an array)
<dagobah> Didn't know about each_cons!
<apeiros> oh, each_cons(2) of course
<dagobah> Thanks
dwype has left #ruby [#ruby]
khushildep has quit [Quit: khushildep]
* apeiros thinks one could create a padded_each_cons(2)
<apeiros> or rather prefixed_each_cons
aryaching_ has joined #ruby
<Quest> apeiros, too bad aim using netbeans IDE and it has not code hinting for sass/ ruby
<apeiros> Quest: too bad you're using an IDE, indeed :-p
robaman has joined #ruby
blackmesa has joined #ruby
banister has joined #ruby
e3r98gh35t has quit [Ping timeout: 246 seconds]
aryaching has quit [Ping timeout: 245 seconds]
lkba has joined #ruby
mneorr has joined #ruby
<Quest> apeiros, am.. why bad?
m8 has joined #ruby
vadelius has joined #ruby
zmike1234 has joined #ruby
Speed has joined #ruby
aryaching has joined #ruby
e-dard has joined #ruby
<e-dard> Hi all, wondered if anyone had any thoughts on Sinatra versus Rails-API?
codecop has quit [Ping timeout: 276 seconds]
aryaching_ has quit [Ping timeout: 264 seconds]
thebastl has quit [Ping timeout: 245 seconds]
<apeiros> Quest: I'm anti-IDE-biased. just not a fan of them. not that you'd have to take that serious ;-)
<Quest> ides help you to most extend
<Quest> oik
<lupine> rails-api isn't the only option for wsapi frameworkiness
<lupine> you can get ones that slap on top of sinatra too
resting has quit [Quit: Leaving.]
<lupine> honestly, I'm not a huge fan of rails-api, I kind of prefer the HAL approach
Matriks has quit [Remote host closed the connection]
jds has joined #ruby
agjacome has joined #ruby
julweber has joined #ruby
browndawg1 has quit [Ping timeout: 256 seconds]
tonini has quit [Quit: leaving]
tonini has joined #ruby
aryaching_ has joined #ruby
browndawg1 has joined #ruby
cads2 has quit [Ping timeout: 245 seconds]
shaunbaker has joined #ruby
wchun has quit [Quit: Leaving]
aryaching has quit [Ping timeout: 264 seconds]
mfridh has quit [Ping timeout: 240 seconds]
parzo has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
sr78ger has joined #ruby
codecop has joined #ruby
staafl has joined #ruby
popl has quit [Quit: We must make an idol of our fear, and call it God.]
sonofben has joined #ruby
yy-nm has quit [Quit: ChatZilla 0.9.90.1 [Firefox 23.0/20130730113002]]
Lewix has joined #ruby
snovak has joined #ruby
apeiros has quit [Ping timeout: 245 seconds]
blaxter_ is now known as blaxter
aryaching_ has quit [Ping timeout: 256 seconds]
jds has quit [Ping timeout: 264 seconds]
Lewix has quit [Ping timeout: 264 seconds]
snovak has quit [Ping timeout: 245 seconds]
sonofben has left #ruby [#ruby]
aryaching has joined #ruby
anay_ has joined #ruby
mklappstuhl has quit [Read error: Connection reset by peer]
banister has quit [Remote host closed the connection]
codecop has quit [Ping timeout: 245 seconds]
ffio has joined #ruby
banister has joined #ruby
Es0teric has joined #ruby
ezotrank has joined #ruby
<buzzybron> looking at the documentation for pg gem at http://deveiate.org/code/pg/
<buzzybron> whats the difference between the PGconn & PG::Connection under Classes/Modules?
anay has quit [Read error: Connection reset by peer]
sqd has quit [Quit: sqd]
anay has joined #ruby
dodosan has quit [Remote host closed the connection]
BRMatt has joined #ruby
aryaching_ has joined #ruby
maasdesigner is now known as maasdesigner1
maasdesigner1 is now known as maasdesigner
maxmanders has quit [Quit: Computer has gone to sleep.]
eldariof has joined #ruby
anay_ has quit [Ping timeout: 264 seconds]
havenwood has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 256 seconds]
_bart has joined #ruby
mklappstuhl has joined #ruby
tkuchiki has quit [Remote host closed the connection]
vadelius has quit [Ping timeout: 268 seconds]
callmeivan has joined #ruby
browndawg1 has quit [Ping timeout: 256 seconds]
jim0thy_ has joined #ruby
<callmeivan> does somebody know how i can save my regex command into a string so i can pass it to my function? it does not seem to work as soon as i save the regex into a variable and pass it to my function
<callmeivan> regex_result = summary.match /"MHS av":(\d*.\d*),/
shaunbaker has quit [Remote host closed the connection]
codecop has joined #ruby
<callmeivan> so i guess there is some special way to escape it? i thought test = '/"MHS av":(\d*.\d*),/' is literal
<bnagy> wat
mneorr has quit [Remote host closed the connection]
<bnagy> you can pass a Regex, it's just an object
<bnagy> but regex_result will be a MatchData
<callmeivan> works: regex_result = summary.match /"MHS av":(\d*.\d*),/
<callmeivan> does not work: regex_result = summary.match test
<bnagy> then make test a regex
<callmeivan> what do you mean?
cads2 has joined #ruby
<bnagy> >> t = /foo/; t.class
<eval-in> bnagy => Regexp (https://eval.in/43184)
BizarreCake has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
Companion is now known as companion
wchun has joined #ruby
mansi has joined #ruby
jds has joined #ruby
mansi has quit [Remote host closed the connection]
camilasan has quit [Remote host closed the connection]
eka has quit [Quit: Textual IRC Client: www.textualapp.com]
mansi has joined #ruby
camilasan has joined #ruby
Neomex has joined #ruby
<Quest> how do I create a generic @mixin in sass for multiple values with comma , and i might now know how many values would each include of mixin would have? http://pastebin.com/nP4DBGFX
shaunbak_ has joined #ruby
vadelius has joined #ruby
<callmeivan> ah, i did not realize / .... / could not be in the object
eka has joined #ruby
<tobiasvl> the slashes are the regexp delimiters
<tobiasvl> like the quotation marks are string delimiters
mansi has quit [Ping timeout: 264 seconds]
agjacome has quit [Ping timeout: 264 seconds]
cj3kim has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
khushildep has joined #ruby
jeekl has quit [Remote host closed the connection]
<callmeivan> yes, thank you
jeekl has joined #ruby
apeiros has joined #ruby
codecop has quit [Read error: Operation timed out]
anay has quit [Remote host closed the connection]
jds has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Ping timeout: 264 seconds]
ghr has quit [Quit: Textual IRC Client: www.textualapp.com]
blackmesa has quit [Ping timeout: 240 seconds]
zets has joined #ruby
agjacome has joined #ruby
tjad has quit [Ping timeout: 245 seconds]
smathieu has joined #ruby
Kol has quit [Quit: Death to all fanatics!]
tjad has joined #ruby
xpirator has quit [Quit: Leaving...]
mneorr has joined #ruby
jleishman has joined #ruby
Domon_ has quit [Remote host closed the connection]
smathieu has quit [Ping timeout: 246 seconds]
Domon has joined #ruby
tanema has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
ice has quit [Remote host closed the connection]
ice has joined #ruby
Fractional has joined #ruby
sjltaylor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
codecop has joined #ruby
mansi has joined #ruby
Domon has quit [Ping timeout: 256 seconds]
Neomex has quit [Quit: Neomex]
rurufufuss has quit [Ping timeout: 245 seconds]
camilasa_ has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
mansi has quit [Remote host closed the connection]
fgo has quit [Remote host closed the connection]
mansi has joined #ruby
mupkoo has joined #ruby
atmosx has joined #ruby
apeiros has quit [Ping timeout: 245 seconds]
sergicles has quit [Quit: sergicles]
ice has quit [Ping timeout: 264 seconds]
camilasa_ has quit [Remote host closed the connection]
camilasan has joined #ruby
keen___ has quit [Ping timeout: 256 seconds]
mansi has quit [Ping timeout: 256 seconds]
realDAB has joined #ruby
ice has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
tonini_ has joined #ruby
tonini_ has quit [Client Quit]
osvico has joined #ruby
oceanbreeze has joined #ruby
rismoney has quit [Remote host closed the connection]
hogeo_ has joined #ruby
maxmanders has joined #ruby
hogeo has quit [Ping timeout: 276 seconds]
julweber has quit [Remote host closed the connection]
Quest has quit [Ping timeout: 268 seconds]
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
buzzybron has quit [Quit: Leaving.]
dsaravel has quit [Quit: bye]
Evixion has quit [Read error: Connection reset by peer]
niceguyjames has joined #ruby
atmosx has joined #ruby
codecop has quit [Ping timeout: 268 seconds]
yacks has quit [Ping timeout: 276 seconds]
dodosan has joined #ruby
renothing has quit [Ping timeout: 245 seconds]
Evixion has joined #ruby
jefflyne has joined #ruby
jefflyne has quit [Max SendQ exceeded]
jefflyne has joined #ruby
jefflyne has quit [Max SendQ exceeded]
jefflyne has joined #ruby
Quest has joined #ruby
Quest is now known as Guest92545
endash has joined #ruby
dodosan has quit [Read error: Operation timed out]
fgo has joined #ruby
realDAB has quit [Quit: realDAB]
Guest92545 is now known as Quest
yfeldblum has joined #ruby
vlad_starkov has joined #ruby
ffio has quit [Ping timeout: 268 seconds]
khushildep_ has joined #ruby
butblack has joined #ruby
kaspergr_ has joined #ruby
codecop has joined #ruby
khushildep has quit [Ping timeout: 245 seconds]
khushildep_ is now known as khushildep
kaspergrubbe has quit [Read error: Operation timed out]
Fractional has quit [Ping timeout: 268 seconds]
khushildep_ has joined #ruby
tealmage has quit [Remote host closed the connection]
jjbohn has joined #ruby
khushildep has quit [Ping timeout: 245 seconds]
khushildep_ is now known as khushildep
cads has joined #ruby
Banistergalaxy has joined #ruby
yacks has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
ffio has joined #ruby
persand has quit [Quit: persand]
AndChat| has quit [Ping timeout: 256 seconds]
mklappstuhl has quit [Remote host closed the connection]
Deele has quit [Ping timeout: 240 seconds]
persand has joined #ruby
julweber has joined #ruby
cads2 has quit [Quit: Leaving]
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
JohnBat26|2 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
troessner has joined #ruby
butblack has quit [Quit: butblack]
realDAB has joined #ruby
mmitchell has joined #ruby
emergion has joined #ruby
<shevy> hmmmmm
jonathanwallace has joined #ruby
Deele has joined #ruby
adambeynon has joined #ruby
codecop has quit [Ping timeout: 245 seconds]
troessner has quit [Ping timeout: 268 seconds]
julweber has quit [Ping timeout: 246 seconds]
aryaching_ has quit []
niceguyjames has joined #ruby
<shevy> I want to check whether cmake is available from within a ruby script
<shevy> is x = system 'cmake' an ok way to do so? x seems to be nil when the argument given could not be found
cj3kim has joined #ruby
IceyEC has joined #ruby
ferdev has quit [Quit: ferdev]
realDAB has quit [Quit: realDAB]
n00b2 has joined #ruby
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
cj3kim has quit [Ping timeout: 245 seconds]
jdenen has joined #ruby
snovak has joined #ruby
<n00b2> please help. Why is 'while 1\n ret = myloop(arg) \n arg = ret' not working as I expected. I'm new to ruby, please forgive my perhaps stupid question
mbenson3 has joined #ruby
shaunbak_ has quit [Remote host closed the connection]
<tobiasvl> n00b2: use ; instead of \n for readability
<tobiasvl> why are you using an endless while loops?
<tobiasvl> ruby doesn't use loops a lot
emergion has quit [Quit: Computer has gone to sleep.]
tanema has quit [Remote host closed the connection]
codecop has joined #ruby
nari has joined #ruby
<n00b2> that's not the problem. but the problem is the loop keeps looping with the arg (=string) defined before the while loop
<tobiasvl> please post the whole code in a gist (see topic)
persand has quit [Quit: persand]
eka has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
renothing has joined #ruby
postmodern has quit [Quit: Leaving]
<shevy> n00b2 you don't show where arg is defined
<shevy> btw if you want to use a loop like this, use loop { } rather than while 1, that is just ugly
snovak has quit [Ping timeout: 256 seconds]
fjeeer has joined #ruby
hamakn has joined #ruby
persand has joined #ruby
<fjeeer> http://www.fjeer.me FREE SMS Worldwide!
fjeeer has quit [Client Quit]
<n00b2> arg is defined before the while loop like so: arg = "a" -> then the myloop returns "ab" for example and I want the myloop("ab") in the second run
ntus1017 has joined #ruby
mlpinit has joined #ruby
fermion has joined #ruby
<tobiasvl> n00b2: please post the whole code in a gist (see topic)
julweber has joined #ruby
<tobiasvl> i don't want to have to piece together the code you're running from your implications
vince_prignano has quit [Remote host closed the connection]
<shevy> n00b2 you need to show all code that is relevant to your problem, ideally as little as possible, in one pastie, including the error message there
<shevy> also "not working as I expected" does not really describe much, what else did you expect, what error do you recieve etc...
jjbohn has quit [Quit: Leaving...]
Banistergalaxy has quit [Ping timeout: 246 seconds]
<n00b2> striped down it comes down to this...
<n00b2> def myloop(a); return a + "b"; end; arg="x";while 1;ret=myloop(arg);arg=ret;end
sjltaylor has joined #ruby
<shevy> well the code works as expected
<shevy> you are running the loop ;)
tanema has joined #ruby
nomenkun has quit [Remote host closed the connection]
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
<shevy> hmm is there an easy way to remove array entry 5 from an array?
<shevy> array = %w( a b c d e f g h i j )
nomenkun has joined #ruby
tanema has quit [Remote host closed the connection]
<tobiasvl> shevy: delete_at
<shevy> ah cool, thanks
d45h has joined #ruby
freeayu has joined #ruby
<n00b2> damn! sorry guys! my mistake was returning the wrong value! Thanks for your help anyway!! I was looking for the error in the wrong place :-(
browndawg has joined #ruby
dash_ has quit [Ping timeout: 264 seconds]
<tobiasvl> n00b2: great!
eldariof has quit [Ping timeout: 264 seconds]
mark_locklear has joined #ruby
Tricon has joined #ruby
<tobiasvl> shevy: remember that indices start at 0 ;)
mdaubs has joined #ruby
<shevy> hmmm damn yeah
JDHankle has joined #ruby
n00b2 has left #ruby [#ruby]
<shevy> I am trying to map pure "linux commands" to ruby commands
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<shevy> so "ln foo bar" but also "ln -v foo bar"
<shevy> or "cp" etc... so that these things can work on windows too when one has installed only ruby
emergion has joined #ruby
<shevy> I did split at ' ' though, and then "ln -v foo bar" was different to "ln foo bar", leading to a small bug
jonahR has joined #ruby
JDHankle has quit [Ping timeout: 268 seconds]
Badreddin has quit [Ping timeout: 268 seconds]
jp- has joined #ruby
ferdev has joined #ruby
sevenseacat has joined #ruby
headius has joined #ruby
linux_noob_666 has joined #ruby
<jp-> shevy, i'd use the which command or check in $PATH with ruby.
mdaubs has quit [Remote host closed the connection]
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
khushildep has quit [Ping timeout: 245 seconds]
gyzmodo has joined #ruby
codecop has quit [Ping timeout: 245 seconds]
ctp has joined #ruby
elux has joined #ruby
troessner has joined #ruby
banister has quit [Remote host closed the connection]
billy_ran_away has quit [Quit: ZNC - http://znc.in]
<jp-> shevy, something like this: ENV["PATH"].split(":").each { |path| puts "Found!" if File.exists?("#{path}/cmake") }
Dwarf_ has quit [Max SendQ exceeded]
ewnd9 has joined #ruby
devoldmx3 has joined #ruby
Dwarf_ has joined #ruby
Dwarf_ has quit [Max SendQ exceeded]
cody-- has joined #ruby
Dwarf_ has joined #ruby
Dwarf_ has quit [Max SendQ exceeded]
tmi has quit [Read error: Operation timed out]
elux has quit [Ping timeout: 245 seconds]
hogeo_ has quit [Remote host closed the connection]
zetaspartan2552 has joined #ruby
devoldmx has quit [Ping timeout: 245 seconds]
khushildep has joined #ruby
Gimli has joined #ruby
Dwarf has quit [Disconnected by services]
Gimli has quit [Excess Flood]
malcolmva has quit [Read error: Connection reset by peer]
Dwarf has joined #ruby
Dwarf has quit [Max SendQ exceeded]
justsee has quit [Ping timeout: 268 seconds]
malcolmva has joined #ruby
Dwarf has joined #ruby
sjltaylor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jlast has joined #ruby
krz has quit [Quit: krz]
codecop has joined #ruby
mklappstuhl has joined #ruby
lebek has joined #ruby
idoru has joined #ruby
zetaspartan2552 has quit [Remote host closed the connection]
sqd has joined #ruby
tanema has joined #ruby
zetaspartan2552 has joined #ruby
wmoxam has joined #ruby
johnkary has joined #ruby
elux has joined #ruby
hiyosi has joined #ruby
ArchBeOS has quit [Quit: ChatZilla 0.9.90.1 [Firefox 23.0/20130730113002]]
breakingthings has joined #ruby
mansi has joined #ruby
snath has quit [Ping timeout: 264 seconds]
wmoxam has quit [Ping timeout: 256 seconds]
v0n has joined #ruby
pipework has quit [Read error: Connection reset by peer]
devoldmx3 has quit [Ping timeout: 264 seconds]
Dwarf has quit [Quit: brb]
thebastl has joined #ruby
Dwarf has joined #ruby
Dwarf has quit [Max SendQ exceeded]
Banistergalaxy has joined #ruby
kaldrenon has joined #ruby
Dwarf has joined #ruby
shaunbaker has joined #ruby
Dwarf has quit [Max SendQ exceeded]
shaunbak_ has joined #ruby
troessner has quit [Ping timeout: 256 seconds]
Dwarf has joined #ruby
mansi has quit [Remote host closed the connection]
Dwarf has quit [Excess Flood]
Dwarf has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
mansi has joined #ruby
Dwarf has left #ruby [#ruby]
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Matriks has joined #ruby
relix has joined #ruby
Joel_re has joined #ruby
<Joel_re> hey, a noob question
<Joel_re> if I initialize abunch of variables with @var = someval
lebek has joined #ruby
blackmesa has joined #ruby
<Joel_re> do I need to interpolate/expand the variables using @var ?
<Joel_re> ex puts @var
<Joel_re> do I need to do that, within the class method
<tobiasvl> yes
<Joel_re> or is puts var just fine
shaunbaker has quit [Ping timeout: 264 seconds]
<tobiasvl> you need the @
geekbri has joined #ruby
rshetty has quit [Quit: Sleeping]
framling has quit [Quit: Lost terminal]
Squarepy has joined #ruby
framling has joined #ruby
mansi has quit [Ping timeout: 245 seconds]
snovak has joined #ruby
Dwarf has joined #ruby
julweber has quit [Read error: Connection reset by peer]
<tobiasvl> you mean instance method? not class method? @var is an instance variable
brtdv has joined #ruby
julweber has joined #ruby
brtdv has quit [Max SendQ exceeded]
brtdv has joined #ruby
cmarques has joined #ruby
JZTech101 has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
thebastl has quit [Remote host closed the connection]
julweber has quit [Read error: No route to host]
Fire-Dragon-DoL has joined #ruby
intuxicated has joined #ruby
Uranio has joined #ruby
julweber has joined #ruby
tonni has quit [Remote host closed the connection]
jaynewstrom has quit [Remote host closed the connection]
Diranged has quit [Read error: Connection reset by peer]
jaynewstrom has joined #ruby
mary5030 has joined #ruby
GeissT has quit [Read error: Connection reset by peer]
GeissT has joined #ruby
thebastl has joined #ruby
Xiti` has quit [Read error: Connection reset by peer]
Xiti` has joined #ruby
tmi has joined #ruby
fridim_ has joined #ruby
<Joel_re> tobiasvl: yes sorry, instance method
maasdesigner has quit [Quit: maasdesigner.com]
JDHankle_ has joined #ruby
mercwithamouth has quit [Ping timeout: 268 seconds]
Liothen has quit [Quit: System of a down……]
hamed_r has joined #ruby
rshetty has joined #ruby
headius has quit [Quit: headius]
tmi has quit [Ping timeout: 264 seconds]
tonni has joined #ruby
devoldmx has joined #ruby
jlebrech has joined #ruby
mklappst_ has joined #ruby
headius has joined #ruby
interactionjaxsn has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phantummm has joined #ruby
moosya has joined #ruby
jerius has joined #ruby
lucazi has joined #ruby
banister has joined #ruby
johnkary has quit [Quit: @johnkary]
ehc has joined #ruby
mklappstuhl has quit [Ping timeout: 264 seconds]
mercwithamouth has joined #ruby
justsee has quit [Ping timeout: 245 seconds]
companion is now known as Companion
JohnBat26 has joined #ruby
jerius has quit [Client Quit]
jerius has joined #ruby
Guest4362 is now known as DefV
gazarsgo has joined #ruby
sambao21 has joined #ruby
wmoxam has joined #ruby
rshetty has quit [Quit: Sleeping]
pentameter has joined #ruby
<jlebrech> how do you check for a blank or nil in a string?
<jlebrech> lol blank
nfk has quit [Ping timeout: 245 seconds]
diegok has quit [Ping timeout: 256 seconds]
<tobiasvl> in a string?
<tobiasvl> strings can't "contain" nil, variables can have nil as value
<jlebrech> yeah but the string might be a nil object, want it to count as blank too
tomzx_mac has joined #ruby
moosya has quit [Quit: moosya]
<zets> just check if the object is nil
eka has quit [Ping timeout: 264 seconds]
<jp-> puts "It's nil!" if foo.nil?
moosya has joined #ruby
<tobiasvl> ok, what about the blank? if the string just contains a blank anywhere? if it's one character which is a blank? var == ' '
<banister> jlebrech: str.to_s.empty?
momomomomo has joined #ruby
<tobiasvl> why to_s ?
diegok has joined #ruby
<tobiasvl> oh, for nil
<banister> tobiasvl: so that it also checks for str == nil
codecop has quit [Remote host closed the connection]
kreeves has quit [Ping timeout: 268 seconds]
<tobiasvl> ah, "blank" means empty string...
<tobiasvl> thought it meant space
<tobiasvl> or whitespace
eka has joined #ruby
<tobiasvl> in that case banister's way is best
Fire-Dragon-DoL has quit [Quit: Leaving.]
JDHankle_ has quit [Remote host closed the connection]
weeb1e has quit [Quit: No Ping reply in 180 seconds.]
<_br_> banister: Intersting article! Thanks for that. Psych papers have to be taken really skeptical these days... Need to ask my remote-prof about this :)
wu_lmao has quit [Quit: wu_lmao]
sergicles has joined #ruby
<banister> _br_: it reminded me of what you were saying, they also indicate in that article that there is currently a re-evaluation going on a large number of psych studies (just as you said) :)
mklappst_ has quit [Remote host closed the connection]
<_br_> banister: Yeah, that will be really interesting. I suspect they will come back and knock out maybe 30-50% of papers as faked data, false math etc. terrible. Certainly going to hurt the field, but bad science is bad science.
headius has quit [Ping timeout: 276 seconds]
DrShoggoth has quit [Read error: No route to host]
Fire-Dragon-DoL has joined #ruby
<banister> _br_: seems a lot of it might have been brought on by http://en.wikipedia.org/wiki/Physics_envy
<banister> oh, it was you who linked that to me
hakunin has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Read error: Connection reset by peer]
hakunin_ has joined #ruby
<banister> hehe
vlad_sta_ has joined #ruby
<banister> brb lunch
tealmage has joined #ruby
troessner has joined #ruby
pyrac has quit [Ping timeout: 245 seconds]
mikecmpbll has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
ezotrank has quit [Quit: ezotrank]
mmitchell has quit [Remote host closed the connection]
troessner has quit [Max SendQ exceeded]
<_br_> banister: yep.. have a good one
troessner has joined #ruby
pyrac has joined #ruby
Spami has joined #ruby
niklasb has joined #ruby
workmad3 has joined #ruby
nucatus has joined #ruby
hamed_r has quit [Quit: Ex-Chat]
cj3kim has joined #ruby
Coolhand has quit [Ping timeout: 240 seconds]
fridim_ has quit [Ping timeout: 264 seconds]
Coolhand has joined #ruby
tealmage has quit [Ping timeout: 264 seconds]
cj3kim has quit [Read error: Connection reset by peer]
jlebrech has quit [Quit: Konversation terminated!]
DrShoggoth has joined #ruby
ravster has joined #ruby
renothing has quit [Read error: Connection reset by peer]
Guest58999 is now known as yebyen
tealmage has joined #ruby
sambao21 has quit [Quit: Quitter]
fernandoaleman has joined #ruby
ezotrank has joined #ruby
fernandoaleman has left #ruby [#ruby]
troessner has quit [Ping timeout: 268 seconds]
sambao21 has joined #ruby
jonahR has quit [Quit: jonahR]
brbcoding has joined #ruby
momomomomo has quit [Quit: momomomomo]
workmad3 has quit [Ping timeout: 246 seconds]
s2013 has joined #ruby
mary5030 has quit [Remote host closed the connection]
thebastl has quit [Remote host closed the connection]
peregrine81 has joined #ruby
coveira has joined #ruby
nucatus_ has joined #ruby
tealmage has quit [Ping timeout: 256 seconds]
Kricir has joined #ruby
nucatus has quit [Read error: Connection reset by peer]
oceanbreeze has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
intuxicated has quit [Ping timeout: 246 seconds]
Appineer has joined #ruby
Appineer has left #ruby [#ruby]
bsdbandit has quit [Ping timeout: 264 seconds]
wallerdev has joined #ruby
eka has quit [Ping timeout: 256 seconds]
tomzx_mac has quit [Ping timeout: 246 seconds]
Davey has joined #ruby
splittingred has joined #ruby
failshell has joined #ruby
v8energy has joined #ruby
newUser1234 has joined #ruby
<Donovan> slightly off topic, but are there any Atlanta, GA ruby enthusiasts here? There's a meetup tonight, I'm debating if I should attend.
eka has joined #ruby
Quest has quit [Ping timeout: 276 seconds]
aganov has quit [Quit: aganov]
ezotrank has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pipework has joined #ruby
Quest has joined #ruby
Quest is now known as Guest87977
Stelian1 has joined #ruby
devoldmx3 has joined #ruby
<Stelian1> hello guys, how can I escape a shell command output?
troessner has joined #ruby
<Stelian1> I am getting [36;1m instead of the color
Randomage has quit [Ping timeout: 268 seconds]
devoldmx has quit [Ping timeout: 246 seconds]
Xiti` has quit [Read error: Connection reset by peer]
Kricir has quit [Remote host closed the connection]
troessner has quit [Max SendQ exceeded]
ravster has quit [Quit: Leaving.]
kaldreno_ has joined #ruby
Xiti` has joined #ruby
madhatter has quit [Ping timeout: 264 seconds]
evenix has joined #ruby
Geison_Bequer has joined #ruby
camilasan has quit [Remote host closed the connection]
iFire_ has joined #ruby
camilasan has joined #ruby
Guest87977 has quit [Ping timeout: 264 seconds]
weeb1e has joined #ruby
kaldrenon has quit [Ping timeout: 246 seconds]
Haya has quit [Ping timeout: 246 seconds]
codecop has joined #ruby
<_br_> Stelian1: Isn't there a nice gem for this kind of stuff?
snath has joined #ruby
iFire has quit [Ping timeout: 246 seconds]
<Stelian1> _br_: if only I knew :)
<Stelian1> but gem aside, how does one do it in ruby? (to be read not rails)
<_br_> Stelian1: Rubytoolbox?
troessner has joined #ruby
_honning_ has joined #ruby
mary5030 has joined #ruby
mansi has joined #ruby
cj3kim has joined #ruby
aryaching has joined #ruby
mansi has joined #ruby
mary5030 has quit [Remote host closed the connection]
camilasa_ has joined #ruby
mary5030 has joined #ruby
khushildep has quit [Quit: khushildep]
BillCriswell has joined #ruby
tonni has quit [Ping timeout: 241 seconds]
weeb1e has quit [Read error: Operation timed out]
coveira has quit [Ping timeout: 276 seconds]
cj3kim has quit [Ping timeout: 245 seconds]
camilasan has quit [Ping timeout: 241 seconds]
niceguyjames has quit [Quit: Computer has gone to sleep.]
brennanMKE has joined #ruby
jjbohn has joined #ruby
freerobby has joined #ruby
eka has quit [Quit: Textual IRC Client: www.textualapp.com]
eka has joined #ruby
<shevy> Stelian1 you mean, you want to escape these escape codes from a string
<shevy> I think there is no easy way to do that in standard ruby without writing a method that does that for you
ManAmongHippos has joined #ruby
JDHankle has joined #ruby
nucatus_ is now known as nucatus
tommyvyo has joined #ruby
v0yager has joined #ruby
mansi has quit [Remote host closed the connection]
<Stelian1> shevy: thank you, and no disrespect for rails, I just want to learn the language before the framework
<Stelian1> will look at the rails implementaiton
dayepa has quit [Ping timeout: 264 seconds]
<shevy> Stelian1 I dont use rails myself
<Stelian1> _br_: thank you
<_br_> rails? this is #ruby here :)
<Stelian1> :)
<shevy> :D
<Stelian1> I take it #ruby don't love #rails that much? :)
<_br_> Well, I don't really care. Its just yet another framework.
<Donovan> I see a lot of people dive into rails without understanding ruby first. IMO.
<Stelian1> Donovan: that makes 0 sense
<Donovan> well, meaning they learn just enough ruby to code in rails.
huoxito has joined #ruby
Guest87977 has joined #ruby
<Donovan> they don't really understand the nuances of ruby and what you can do with it.
* Donovan shrugs
<Stelian1> I find that to be retarded...
<Stelian1> than again I come from a php background where people don't understand types
<Stelian1> or computers
<_br_> Anyone remember the days when Zed Shaw used to write alot of fun articles about the "Rails is a Ghetto" ? :)
jefflyne has joined #ruby
jefflyne has quit [Max SendQ exceeded]
<Donovan> heh
<shevy> I remember it was a good day for he switched to python
jefflyne has joined #ruby
tonni has joined #ruby
<_br_> hehe
tagrudev has quit [Remote host closed the connection]
mansi has joined #ruby
<shevy> Stelian1 the two communities partially overlap, but also partially do not overlap. If I would have to pull out a number, I would say that about 50% of the people here on #ruby do not use rails
<_br_> well, he is quite a character. The mongrel2 codebase is quite interesting though.
Fire-Dragon-DoL has quit [Quit: Leaving.]
zoee has quit [Quit: zoee]
s2013 has quit [Ping timeout: 240 seconds]
acrussell has joined #ruby
d45h has quit [Ping timeout: 256 seconds]
<shevy> rails indeed attracted a lot of people to ruby
asterite has joined #ruby
<Donovan> it did me
<_br_> tell me about it. Have a guy here working, who recently learned abit of rails and speaks of it as it having "god powers" --- wth.
<Donovan> I was a perl/python programmer... dove into rails to see what the hubub was all about, that launched me into ruby. Never looked back.
<shevy> hehe
troessner has quit [Ping timeout: 264 seconds]
<shevy> god powers?
<shevy> that almost sounds like a religion :)
dash_ has joined #ruby
<Donovan> isn't it?
<Donovan> =)
tonni has quit [Remote host closed the connection]
<_br_> ahh rails as a religion. get off my lawn.. :]
freerobby has quit [Quit: Leaving.]
<Donovan> heh
thebastl has joined #ruby
<shevy> Donovan, why did you not stay with python instead?
<Donovan> people tend to get very emotional about their chosen paths in life, be it programming language de jour
<Donovan> or whatnot
dayepa has joined #ruby
freerobby has joined #ruby
camilasa_ has quit [Read error: Connection reset by peer]
<Donovan> shevy: I found ruby more to my syntactic liking
<Donovan> something pure about it, can't really put my finger on it
camilasan has joined #ruby
freeayu has quit [Remote host closed the connection]
jjbohn is now known as jjbohn|afk
<_br_> Sugar, everyone loves the sugar.
<Donovan> yeah, I suppose so
acrussell has left #ruby [#ruby]
weeb1e has joined #ruby
<shevy> hmm
<shevy> it is more than sugar alone, it helps my brain think
v0yager has quit [Remote host closed the connection]
JDHankle has quit [Remote host closed the connection]
<Donovan> yeah. When I was first starting out, if I wanted to code something I would just code it the way I thought it should be... and more often than not, it either worked, or was very close.
v0yager has joined #ruby
<Donovan> so me, that's elegant
asterite has left #ruby [#ruby]
<shevy> yeah
sarkis has joined #ruby
<shevy> syntactically ruby is rather flexible
<_br_> yep, classical TMTOWTDI
<_br_> got that from perl I think.
<Donovan> yeah
<Donovan> which is why I prefer it to python
Badreddi1 has joined #ruby
<shevy> perl is syntactically a mess though
<Donovan> but, also, the code it readable.
mengu has joined #ruby
<shevy> foreach my $key (keys %apip) {
Badreddi1 has quit [Client Quit]
<shevy> $wd{$apip{$key}} = "!!!!MISSING!!!!";
<Donovan> I would often find myself going back over perl code I wrote just months earlier trying to figure out what I was doing. Even with comments, it was a pain.
<_br_> quite right, in perl you can build which is after a couple of days really unreadable.
<shevy> printf $fnl ("%-20s %-40s %-30s\n", $apip{$key}, $apname{$key}." #Model: ".$apmodel{$key},defined($wd{$apip{$key}})?$wd{$apip{$key}}:"undef");
v0yager has quit [Ping timeout: 246 seconds]
<Donovan> ruby I can see almost immediately what the intent was.
rubyrubyruby has quit [Remote host closed the connection]
<shevy> hehe this is from a pastie, from #perl :)
<_br_> hehe :)
weeb1e has quit [Ping timeout: 268 seconds]
<shevy> it would have been interesting if they would have managed to realize perl 6
<_br_> In that sense its a mess, but CPAN is quite nice actually.
<Donovan> well, ruby and perl is not a fair comparison. Perl is not OOP, for instance.
<diegok> shevy: try to translate that to ruby. You can and it looks almost the same I thing...
<shevy> diegok almost the same thing despite all the $ gone? and I would not use the {} either
JDHankle has joined #ruby
teddyp1cker has joined #ruby
<diegok> _br_: CPAN++, that's perl gem :)
Badreddi1 has joined #ruby
_honning_ has quit [Ping timeout: 264 seconds]
marr has quit [Ping timeout: 256 seconds]
mklappstuhl has joined #ruby
<diegok> shevy: sure. I prefer ruby, but we had perl as a real option for production code loong before and it can do almost the same as ruby (and still faster in many aspects)
troessner has joined #ruby
<diegok> also, gems are still not there to CPAN
huoxito has quit [Quit: Leaving]
<diegok> hope it will some day
<Donovan> I'm a long-time perl developer. I never use it anymore.
ahawkins has quit [Quit: leaving]
<Donovan> but yes, CPAN is very nice.
<Donovan> however, bundler is quite nice too
ahawkins has joined #ruby
coveira has joined #ruby
<Donovan> along with rvm
<diegok> Donovan: I still do lot of things in perl because very fast XS extensions from CPAN
<Donovan> I suppose it depends on what you need to do
<Donovan> the right tool for the job, right?
<diegok> I really love ruby because it takes lot of things I love from perl in deed :)
<_br_> For what its worth.. perl is getting less and less popular .. http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html
<diegok> Donovan: right!
ravster has joined #ruby
<shevy> perl used to have less competition back in the days
jprovazn has quit [Quit: Leaving]
Cyrus has quit [Quit: Cyrus.sleep()]
<Donovan> diegok: write a faster XS gem for ruby. ;-)
<_br_> Btw. for all you polyglots out there some fun https://github.com/mame/quine-relay
mklappstuhl has quit [Read error: Operation timed out]
<diegok> then I won't be picking the best tool for the job :-/
<Donovan> LOL
<diegok> Donovan: other thing I really love of working with perl is module support and docs.
rhys has joined #ruby
<Donovan> ruby has that too, I don't miss that at all
<banister> blocks in ruby annoy me though
huoxito has joined #ruby
<_br_> why?
<diegok> ruby blocks rock's!
yacks has quit [Ping timeout: 245 seconds]
<Donovan> yeah, I like blocks in ruby too
persand has quit [Quit: persand]
fantazo has joined #ruby
<banister> because they're special-cased, they're not normal arguments. So you have to treat them differently
tealmage has joined #ruby
<banister> but that is also their greatest strength, so it's a double edged sword :)
<diegok> my point is that perl still is a really GOOD tool on my toolbox and being a ruby programmer is super easy to use/copy from perl/CPAN stuff :)
weeb1e has joined #ruby
nucatus has quit [Read error: Connection reset by peer]
<diegok> I've ported resque to perl/CPAN and I can mix both of my loves into my daily work :)
<banister> _br_: if you start trying to do functional programming in ruby, then you get a lot of incidental complexity managing blocks, so recently i've just started passing explicit lambdas instead, which almost look as good
nucatus has joined #ruby
<banister> my_method ->(x) { "hi boys!" }
<Donovan> diegok: that's great. Doing that would hurt my head. =)
go|dfish has quit [Remote host closed the connection]
<diegok> oh!, BTW, in some stupid tests I did, it was faster over resque on 1.9 :-)
ananthakumaran has quit [Quit: Leaving.]
<diegok> Donovan: :)
blaxter has quit [Quit: foo]
<_br_> banister: Well, thats the lisp inheritance. There is much in ruby which is certainly not perfect... hopefully getting there ... 3.0 4.0 :)
vlad_sta_ has quit [Remote host closed the connection]
banister has quit [Read error: Connection reset by peer]
maz-dev has quit [Read error: Connection reset by peer]
banister has joined #ruby
go|dfish has joined #ruby
<waxjar> does anyone else think "functional programming" is a terrible name? :p
<_br_> how would you else call it?
Kricir has joined #ruby
<waxjar> no clue
<Donovan> heya waxjar
troessner has quit [Ping timeout: 240 seconds]
<_br_> Logical, Procedural, Object Orientated, Aspect Orientated, Functional, ... I think I'm still missing some
<waxjar> hi Donovan
Taranis has left #ruby [#ruby]
nadirvar_ has joined #ruby
mklappstuhl has joined #ruby
<Donovan> let the marketing folks come up with the press jargon. =)
tommyvyo has quit [Quit:]
coderhut has joined #ruby
<_br_> Anyone here using AOP these days?
codecop_ has joined #ruby
<waxjar> i dont even know what that is
<_br_> Rather fun actually, supposed to be the next big thing after OOP.
<shevy> I heard it a few times like 6 years ago
<_br_> Mah. I'm getting old.
tealmage has quit [Ping timeout: 268 seconds]
jerius_ has joined #ruby
vlad_starkov has joined #ruby
Kricir has quit [Read error: Connection reset by peer]
Kricir has joined #ruby
Guest87977 has quit [Ping timeout: 264 seconds]
<_br_> Not sure if the ruby libs are adequate. Used to originate from the Java world imo.
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
camilasan has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
camilasan has joined #ruby
threesome has quit [Ping timeout: 276 seconds]
fmcgeough has joined #ruby
jerius has quit [Ping timeout: 245 seconds]
Tricon has quit [Quit: Bye!]
ner0x has joined #ruby
Tricon has joined #ruby
codecop has quit [Ping timeout: 256 seconds]
popcornlover has joined #ruby
tjbiddle has joined #ruby
noopq has quit [Ping timeout: 246 seconds]
<banister> _br_: have you seen the way functional languages do AOP? it's quite beautiful
tabolario has joined #ruby
colonolGron has quit [Quit: Lost terminal]
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
pumper has joined #ruby
graydot has quit [Quit: graydot]
<shevy> array = %w( abc def ghi$ ).include? '$' # => false
cj3kim has joined #ruby
<shevy> ohhh
<shevy> .any?
_maes_ has joined #ruby
renderful has quit [Remote host closed the connection]
nfk has joined #ruby
dlind has quit [Ping timeout: 248 seconds]
julweber_ has joined #ruby
renderful has joined #ruby
Kricir has quit [Remote host closed the connection]
jjbohn|afk is now known as jjbohn
newUser1234 has quit [Remote host closed the connection]
ryannielson has joined #ruby
julweber has quit [Ping timeout: 246 seconds]
tesuji has quit [Read error: Connection reset by peer]
kevinykchan has joined #ruby
Kricir has joined #ruby
mercwith1mouth has joined #ruby
geggam has joined #ruby
<YaNakilon> %w().grep(/\$/)
kaldreno_ is now known as kaldrenon
<YaNakilon> %w().join[?$]
<shevy> cool
<_br_> banister: totally agree, hence my puzzlement that its not really moved further seems to other $langs
ManAmongHippos has left #ruby ["Using Circe, the loveliest of all IRC clients"]
<speakingcode-wor> is there a way to reference a variable based on a string value? for instance if the string is 'foo' reference @foo?
ahawkins has quit [Quit: Lost terminal]
<banister> speakingcode-wor: instance_variable_get("@#{str}")
Guest87977 has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
<speakingcode-wor> banister: thanks
<Xeago> banister: weird that you ahve to specify the @ sign in there
itcharlie has joined #ruby
<Xeago> what can it return if you omit it?
nanoxd_ has quit [Ping timeout: 256 seconds]
<banister> Xeago: i dont know, try it :P
zetaspartan2552 has quit [Quit: zetaspartan2552]
agjacome has quit [Ping timeout: 256 seconds]
<speakingcode-wor> banister: anything similar for local variables, class variables, etc?
renderfu_ has joined #ruby
<banister> speakingcode-wor: local variables you just use eval()
<speakingcode-wor> ah
<banister> speakingcode-wor: class variables, maybe, but who cares about those
cmarques has quit [Ping timeout: 256 seconds]
arturaz has quit [Ping timeout: 245 seconds]
nfk has quit [Quit: yawn]
mercwithamouth has quit [Ping timeout: 276 seconds]
nanoxd has joined #ruby
pjeide has joined #ruby
pjeide has quit [Changing host]
pjeide has joined #ruby
<speakingcode-wor> banister: thanks. one more question. how can i assign a value to the var returned by instance_variable_get? doing instance_variable_get(...) = value doesn't seem to work
<banister> speakingcode-wor: instance_variable_set
asterite has joined #ruby
<speakingcode-wor> lol
<speakingcode-wor> thanks
x1337807x has joined #ruby
asterite has left #ruby [#ruby]
theRoUS has joined #ruby
<banister> speakingcode-wor: if in doubt...try the obvious ;) it usually works in ruby :P
renderful has quit [Ping timeout: 256 seconds]
pitzips has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
Es0teric has quit [Quit: Computer has gone to sleep.]
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
interact_ has joined #ruby
pyrac has quit [Quit: pyrac]
Kricir has quit [Remote host closed the connection]
Jake_ has joined #ruby
tommyvyo has joined #ruby
<Jake_> hello
i_s has joined #ruby
Jake_ is now known as l34ch
<l34ch> hey
weeb1e has quit [Ping timeout: 264 seconds]
devoldmx3 has quit [Read error: Connection reset by peer]
vadelius has quit [Ping timeout: 245 seconds]
devoldmx3 has joined #ruby
vince_prignano has joined #ruby
thebastl has quit [Remote host closed the connection]
boblu has quit [Ping timeout: 268 seconds]
etman has joined #ruby
thebastl has joined #ruby
kobain has joined #ruby
weeb1e has joined #ruby
davedev24 has joined #ruby
niceguyjames has joined #ruby
<ravster> Hey, how do I catch connection-refused and connection-timeout errors in faraday?
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
codecop_ has quit [Ping timeout: 264 seconds]
newUser1234 has joined #ruby
thebastl has quit [Remote host closed the connection]
RichardBaker has joined #ruby
vadelius has joined #ruby
baordog has joined #ruby
thebastl_ has joined #ruby
madumo has joined #ruby
sevenseacat has quit [Quit: Leaving.]
zeade has joined #ruby
khushildep has joined #ruby
thebastl has joined #ruby
nadirvar_ has quit [Quit: Computer has gone to sleep.]
yacks has joined #ruby
jjbohn is now known as jjbohn|afk
baroquebobcat has joined #ruby
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
mansi_ has joined #ruby
mansi has quit [Read error: Connection reset by peer]
ezotrank has joined #ruby
weeb1e has quit [Quit: No Ping reply in 180 seconds.]
l34ch has quit [Read error: Connection reset by peer]
jjbohn|afk is now known as jjbohn
mikecmpbll has joined #ruby
Coffers has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
Spami has quit [Quit: This computer has gone to sleep]
tonni has joined #ruby
etman has quit [Quit: etman]
vadelius has quit [Ping timeout: 245 seconds]
stkowski has quit [Quit: stkowski]
mansi_ has quit [Remote host closed the connection]
Kricir has joined #ruby
codecop_ has joined #ruby
devoldmx3 has joined #ruby
thebastl_ has quit [Remote host closed the connection]
mansi has joined #ruby
thebastl_ has joined #ruby
jerius_ has quit [Quit: jerius_]
tonni has quit [Ping timeout: 240 seconds]
gz0 has quit [Quit: leaving]
Spooner has joined #ruby
jefflyne has joined #ruby
ffranz has joined #ruby
sayan has quit [Ping timeout: 276 seconds]
brisbin has quit [Read error: Connection reset by peer]
vadelius has joined #ruby
jefflyne has quit [Client Quit]
dtcrshr has joined #ruby
dtcrshr has quit [Changing host]
dtcrshr has joined #ruby
soukihei has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ezotrank has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thebastl_ has quit [Remote host closed the connection]
slash_nick has joined #ruby
r4nd0m1 has joined #ruby
Solnse has joined #ruby
ezotrank has joined #ruby
brtdv has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikepack has joined #ruby
tealmage has joined #ruby
soukihei has joined #ruby
ExxKA has joined #ruby
codecop_ has quit [Ping timeout: 276 seconds]
Squarepy has quit [Quit: Leaving]
marr has joined #ruby
Lewix has joined #ruby
SweeT_PoTaTo has joined #ruby
Xeago has quit [Remote host closed the connection]
SweeT_PoTaTo has left #ruby [#ruby]
Megtastique has joined #ruby
Lewix has quit [Remote host closed the connection]
<_br_> ravster: Something like this will spit out HTTP status codes for you. Doesn't do perfectly what you want, its just a snipped I took from a local gem here we made. @app.call(env).on_complete { |response| status_code = response[:status].to_i }
chasep_work has quit [Remote host closed the connection]
<_br_> ravster: inside that block we have a case statment which throws custom exceptions for us
RichardBaker has quit [Quit: RichardBaker]
marcgg has quit [Remote host closed the connection]
jefflyne has joined #ruby
RichardBaker has joined #ruby
jerius has joined #ruby
alem0lars has quit [Ping timeout: 246 seconds]
tealmage has quit [Ping timeout: 256 seconds]
gyzmodo has quit [Ping timeout: 245 seconds]
justinweiss has joined #ruby
nadirvar_ has joined #ruby
tjad has quit [Ping timeout: 264 seconds]
randomautomator has joined #ruby
davedev24 has quit [Read error: Connection reset by peer]
bzitzow has joined #ruby
davedev24 has joined #ruby
io_syl has quit [Quit: io_syl]
tjbiddle has quit [Quit: tjbiddle]
codecop_ has joined #ruby
_jesse_ has joined #ruby
ananthakumaran has joined #ruby
macmartine has joined #ruby
bluOxigen has quit [Ping timeout: 256 seconds]
mmitchell has joined #ruby
moses_m has joined #ruby
Kricir has quit [Remote host closed the connection]
ghr has joined #ruby
kevinykchan has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
filipe has quit [Read error: Connection reset by peer]
efrainolivares has joined #ruby
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Vivekananda has joined #ruby
jefflyne has joined #ruby
jefflyne has quit [Client Quit]
ephemerian has quit [Quit: Leaving.]
rbwsam has joined #ruby
vadelius has quit [Ping timeout: 264 seconds]
Lewix has joined #ruby
noname001 has quit [Ping timeout: 245 seconds]
r4nd0m1_ has joined #ruby
alex__c2022 has joined #ruby
kevinykchan has joined #ruby
pel_daniel has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
r4nd0m1 has quit [Ping timeout: 264 seconds]
nomenkun has quit [Remote host closed the connection]
ryandeussing has quit [Remote host closed the connection]
<ravster> How do I find out what http error codes match to faraday errors?
moses_m has quit [Ping timeout: 240 seconds]
kpshek has joined #ruby
<ravster> I'm trying to confirm that a ClientError isn't thrown when the server responds with a HTTP-422.
<Guest87977> this seems to opacify correct but doesnt lightens the color. background-color: opacify(lighten( rgba($baseColorRed,$baseColorGreen,$baseColorBlue, 0.3), 10%),0.8); why is that?
<Guest87977> sass ^
Diranged has joined #ruby
mikeg has joined #ruby
HJvortex has joined #ruby
<HJvortex> hi
<HJvortex> can someone please help me in this small problem . i have explained it in gits
<_br_> Guest87977: Well this isn't #css or #sass here, but opacity controls the alpha channel, not the luminance. RGB does not support that. For luminance you would need the data in e.g. HSV format
jefflyne has joined #ruby
<Guest87977> _br_, i have done darken() and lighten() on rbga. it works fine.
<Guest87977> but its not working ok in combination with opacity
RichardBaker has quit [Quit: RichardBaker]
Voodoofish430 has joined #ruby
<_br_> HJvortex: Don't use "$" in your variable names. That is probably your issue.
<_br_> HJvortex: That is perlism. In ruby $ variables are globals and use is discouraged.
vadelius has joined #ruby
dagobah has quit [Remote host closed the connection]
codecop_ has quit [Ping timeout: 264 seconds]
jim0thy_ has quit [Quit: jim0thy_]
ryandeussing has joined #ruby
threesome has joined #ruby
<_br_> Guest87977: Opacity is not luminance.
ezotrank has quit [Quit: Textual IRC Client: www.textualapp.com]
spider-mario has joined #ruby
rupee has joined #ruby
lesliewen has quit [Quit: Leaving.]
<Guest87977> _br_, i mean that if i do seperatly opacify(rgba()) or lighten(rgba()) . the work. but not in combination. why?
mikecmpbll has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<HJvortex> _br_: so what should i use then
mklappstuhl has joined #ruby
fgo has quit [Remote host closed the connection]
<HJvortex> _br_: btw thanks for looking into this
brtdv has joined #ruby
r4nd0m1_ has quit [Ping timeout: 245 seconds]
<HJvortex> _br_: so if i remove the $ then what should i use in the puts to evaluate the final value
r4nd0m1 has joined #ruby
<ravster> _jesse_: thanks
<_br_> HJvortex: Your example is a bit weird you coded there. You are trying to get the value of a new variable which name you constructed?
Kricir has joined #ruby
<_br_> Guest87977: Go to #sass or #css
<HJvortex> _br_: yes
tjad has joined #ruby
<Guest87977> ok
jim0thy_ has joined #ruby
<HJvortex> _br_: so the idea is to construct the variable from what user input and then print out the value of that variable which is pre set
luke has joined #ruby
banister has quit [Remote host closed the connection]
marius has joined #ruby
<_br_> HJvortex: I think you are trying to do something like this (guessing here) @actualvalue = 100 ; abc = "act" ; xyz = "ual"; result = instance_variable_get( "@#{abc}#{xyz}value" )
<_br_> (according to your example)
luke is now known as Guest9567
<HJvortex> _br_: ill try that :)
<_br_> have fun
JohnBat26 has quit [Ping timeout: 245 seconds]
brtdv has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has joined #ruby
love_color_text has joined #ruby
yfoo has joined #ruby
yfoo has left #ruby [#ruby]
mark_locklear has quit [Ping timeout: 276 seconds]
sarkis has quit [Ping timeout: 240 seconds]
echevemaster has joined #ruby
tatsuya__ has joined #ruby
khushildep has quit [Quit: khushildep]
moses_m has joined #ruby
julweber_ has quit [Remote host closed the connection]
barratt has quit [Ping timeout: 245 seconds]
codecop_ has joined #ruby
asterite has joined #ruby
asterite has left #ruby [#ruby]
echevemaster has quit [Client Quit]
Guest9567 has quit [Ping timeout: 245 seconds]
Kelet has joined #ruby
PanPan has joined #ruby
<HJvortex> _br_: no luck its printing out an empty string
_bart has quit [Remote host closed the connection]
<_br_> HJvortex: paste "@actualvalue = 100 ; abc = "act" ; xyz = "ual"; result = instance_variable_get( "@#{abc}#{xyz}value" )" into your irb and look at the result variable
tatsuya_o has quit [Ping timeout: 264 seconds]
dweeb has quit [Quit: Computer has gone to sleep.]
newUser1234 has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 264 seconds]
<HJvortex> _br_: ahaaa missed the @ sign
Kricir has quit [Remote host closed the connection]
efrainolivares has quit [Quit: efrainolivares]
DrCode has quit [Ping timeout: 240 seconds]
brain_shim has joined #ruby
Astral_ has joined #ruby
sayan has joined #ruby
pothibo has joined #ruby
ericmathison has joined #ruby
amacgregor__ has joined #ruby
moosya_ has joined #ruby
zombiebi_ has joined #ruby
mneorr_ has joined #ruby
geekbri_ has joined #ruby
ryandeus_ has joined #ruby
zombiebit has quit [Read error: Connection reset by peer]
efrainolivares has joined #ruby
ryandeussing has quit [Read error: Connection reset by peer]
moosya has quit [Read error: Connection reset by peer]
tjbiddle has joined #ruby
shaunbak_ has quit [Remote host closed the connection]
havenwood has joined #ruby
moosya_ is now known as moosya
stkowski has joined #ruby
niceguyjames has quit [Quit: Computer has gone to sleep.]
DrCode has joined #ruby
chrisja has joined #ruby
jim0thy_ has quit [Quit: jim0thy_]
jerius has quit [Ping timeout: 240 seconds]
mneorr has quit [Ping timeout: 264 seconds]
geekbri has quit [Ping timeout: 264 seconds]
amacgregor_ has quit [Ping timeout: 263 seconds]
Astralum has quit [Ping timeout: 263 seconds]
jerius has joined #ruby
ghr has quit [Quit: Textual IRC Client: www.textualapp.com]
efrainolivares has quit [Client Quit]
marius has quit [Ping timeout: 246 seconds]
ExxKA has quit [Quit: This computer has gone to sleep]
mengu has quit [Quit: This computer has gone to sleep]
RichardBaker has joined #ruby
etman has joined #ruby
alem0lars has joined #ruby
rippa has joined #ruby
codecop_ has quit [Ping timeout: 245 seconds]
lucazi_ has joined #ruby
popl has joined #ruby
newUser1234 has joined #ruby
lucazi has quit [Ping timeout: 264 seconds]
camilasan has quit [Remote host closed the connection]
yacks has quit [Read error: Operation timed out]
moses_m has quit [Ping timeout: 240 seconds]
apeiros has joined #ruby
iliketurtles has joined #ruby
tealmage has joined #ruby
splittingred has quit [Ping timeout: 240 seconds]
r4nd0m1_ has joined #ruby
love_color_text has quit [Read error: Connection reset by peer]
efrainolivares has joined #ruby
tatsuya__ has quit [Remote host closed the connection]
alex__c2022 has quit [Quit: alex__c2022]
mansi has quit [Remote host closed the connection]
cmarques has joined #ruby
mansi has joined #ruby
moses_m has joined #ruby
havenwood has quit [Remote host closed the connection]
r4nd0m1 has quit [Ping timeout: 276 seconds]
havenwood has joined #ruby
io_syl has joined #ruby
mumble has joined #ruby
robscomputer has joined #ruby
marius has joined #ruby
Monie has joined #ruby
Spooner has quit [Remote host closed the connection]
fyz1x has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
Megtastique has quit [Quit: Megtastique]
tealmage has quit [Ping timeout: 241 seconds]
zeade has quit [Quit: Leaving.]
sergicles has quit [Quit: sergicles]
zmansiv has quit [Ping timeout: 264 seconds]
Xeago has joined #ruby
<rien> Banistergalaxy: hey banister? what's that pry gem that is equivalent to hammer time again?
etman has quit [Quit: etman]
codecop_ has joined #ruby
graydot has joined #ruby
DanKnox_away is now known as DanKnox
zeade has joined #ruby
<Banistergalaxy> Pry-rescue
Megtastique has joined #ruby
JZTech101 is now known as JZ|Zzz
Megtastique has quit [Client Quit]
twoism has joined #ruby
<rien> Banistergalaxy: ah yes just found it through pry-exception-explorer :) thanks!
moses_m has quit [Ping timeout: 256 seconds]
ananthakumaran has quit [Read error: Connection reset by peer]
ananthakumaran1 has joined #ruby
graydot has quit [Client Quit]
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
cortexman has quit [Quit: Leaving.]
smathieu has joined #ruby
cortexman has joined #ruby
tylersmith has joined #ruby
zombiebi_ has quit [Remote host closed the connection]
zmansiv has joined #ruby
etman has joined #ruby
ananthakumaran1 has quit [Ping timeout: 245 seconds]
v0n has quit [Read error: Operation timed out]
jrobeson has quit [Remote host closed the connection]
ananthakumaran has joined #ruby
madumo has quit [Quit: Dumb message bragging about my macbook pro]
Kricir has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<choobie> whats the difference between .sort and .sort! when using it on an array? they seem to have the same outcome
johnnyfuchs has joined #ruby
ctp has quit [Quit: Leaving...]
<Kelet> choobie, .sort is not in place. .sort! is. Meaning, .sort! modifies the array you're using it on. .sort does not.
klaut has quit [Remote host closed the connection]
<Kelet> >> a = [3,5,1]; a.sort; a
<eval-in> Kelet => [3, 5, 1] (https://eval.in/43259)
<Kelet> a = [3,5,1]; a.sort!; a
<Kelet> >> a = [3,5,1]; a.sort!; a
<eval-in> Kelet => [1, 3, 5] (https://eval.in/43260)
ntus1017 has quit [Remote host closed the connection]
<Kelet> a.sort! is equivalent to a = a.sort
madumo has joined #ruby
<choobie> Kelet, ty ty
<Kelet> (And the explanation point almost always means that)
Kricir has quit [Ping timeout: 256 seconds]
c0rn has joined #ruby
<davidcelis> >> [3, 5, 1].sort!
<eval-in> davidcelis => [1, 3, 5] (https://eval.in/43261)
<davidcelis> >> [1, 3, 5].sort!
<eval-in> davidcelis => [1, 3, 5] (https://eval.in/43262)
<davidcelis> errr
Joel_re has quit [Ping timeout: 256 seconds]
<davidcelis> ah, yeah. so the return values are the same too
miah has joined #ruby
<davidcelis> sometimes they arent
tonni has joined #ruby
<Kelet> ! methods by convention should return self (thus, sort! should return itself, which is what you're saying)
ColKurtz has joined #ruby
<Kelet> Although all standard library stuff that has ! returns self, it might be worth testing libraries that implement ! methods, because you can't trust everyone to follow convention.
neg_01 has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
moosya has quit [Quit: moosya]
Al_ has quit [Quit: Al_]
Heskie has quit []
zeade has quit [Quit: Leaving.]
marius has quit [Ping timeout: 256 seconds]
Astral__ has joined #ruby
Peej has joined #ruby
xpirator has joined #ruby
xpirator has quit [Remote host closed the connection]
agjacome has joined #ruby
<bzitzow> I'm looking for an open source library to contribute to
_honning_ has joined #ruby
lkba has quit [Ping timeout: 256 seconds]
gazarsgo has quit [Quit: gazarsgo]
<neg_01> I have rspec Automation script, I am searching continues integration with hudson, any suggestion?
kpshek has quit []
stkowski has quit [Quit: stkowski]
mrsolo has joined #ruby
kaldrenon has quit [Remote host closed the connection]
stkowski has joined #ruby
Astral_ has quit [Ping timeout: 246 seconds]
aaronmcadam has quit [Quit: Leaving...]
phreax_ has quit [Ping timeout: 264 seconds]
brennanMKE has quit [Remote host closed the connection]
zeade has joined #ruby
v0n has joined #ruby
<davidcelis> bzitzow: ok
kpshek has joined #ruby
mansi has joined #ruby
<YaNakilon> Kelet ! methods should return nil sometimes
mansi has quit [Remote host closed the connection]
HJvortex has quit [Ping timeout: 250 seconds]
<davidcelis> >> "Hello".gsub!("nope", "wrong")
<eval-in> davidcelis => nil (https://eval.in/43264)
mansi has joined #ruby
<davidcelis> String bang methods tend to return `nil` if nothing was done
elaptics is now known as elaptics`away
<YaNakilon> while smth1.gsub!(recursively_aaplied_regex, smth2) do ; end
<YaNakilon> would be nice to have nil here actually [21:23:03] <davidcelis> >> [1, 3, 5].sort!
Demo_of_doom_ has joined #ruby
<davidcelis> YaNakilon: It's Ruby; fuck consistency
<YaNakilon> "fuck consistency" is about python, not ruby
<pjeide> as long as it is pythonic :P
<davidcelis> there's definitely some inconsistency in ruby
<davidcelis> we just saw one
jrobeson has joined #ruby
alex__c2022 has joined #ruby
<davidcelis> here's another dumb one http://bugs.ruby-lang.org/issues/8507
spider-mario has quit [Read error: Connection reset by peer]
<davidcelis> why coerce a nil *args into an empty array, but not a nil **args into an empty hash?
ebanoid has quit [Quit: brbomgwtfbbq]
<bzitzow> I should specify, I'm new to ruby and looking for some low hanging fruit on an open source project or two to contribute
mansi has quit [Ping timeout: 276 seconds]
<YaNakilon> "I hate consistency" (c) matz lol
<pjeide> ".. as a reason to change."
mansi has joined #ruby
DanKnox is now known as DanKnox_away
neg_01 has left #ruby [#ruby]
<YaNakilon> btw i never used nil.to_a
spider-mario has joined #ruby
<jp-> is it just me or is using ruby for development with anything other than the standard library un-necessarily difficult on centos 6? gems seem either unavailable through the package manager or just won't install using gem.
vlad_starkov has joined #ruby
<jp-> maybe it's the antiquated version it ships with.
gazarsgo has joined #ruby
kaldrenon has joined #ruby
<_br_> bzitzow: Just find some project you like and see if there are open issues you can tackle. Try to fix it and (in case its on github) send a pull-request.
BRMatt has quit [Ping timeout: 245 seconds]
<bzitzow> okay
<bzitzow> jp- rvm?
dodosan has joined #ruby
nari has quit [Ping timeout: 245 seconds]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<_br_> bzitzow: Not many issues seems. https://github.com/wayneeseguin/rvm/issues I think that contains tons of shell scripting though.
codecop_ has quit [Ping timeout: 264 seconds]
<bzitzow> _br_: heh that was addresssed to jp- comment about gems
brennanMKE has joined #ruby
mmitchell has quit [Ping timeout: 276 seconds]
ffio_ has joined #ruby
<_br_> bzitzow: Low on caffene here ;)
yebyen has quit [Quit: rebooting]
RichardBaker has quit [Quit: RichardBaker]
callmeivan has quit [Ping timeout: 276 seconds]
jonahR has joined #ruby
ctp has joined #ruby
ffio has quit [Ping timeout: 264 seconds]
RichardBaker has joined #ruby
spider-mario has quit [Remote host closed the connection]
efrainolivares has quit [Quit: efrainolivares]
spider-mario has joined #ruby
ctp has quit [Read error: Connection reset by peer]
ctp_ has joined #ruby
tylersmi_ has joined #ruby
banister has joined #ruby
coderhut_ has joined #ruby
tylersmith has quit [Read error: No route to host]
julweber has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
jonahR has quit [Client Quit]
tatsuya_o has joined #ruby
vlad_starkov has joined #ruby
alpha123 has joined #ruby
mateuspontes has joined #ruby
callmeivan has joined #ruby
x1337807x has joined #ruby
mateuspontes has left #ruby [#ruby]
mark_locklear has joined #ruby
davedev24 has quit [Remote host closed the connection]
julweber has quit [Ping timeout: 264 seconds]
mansi has quit [Remote host closed the connection]
<apeiros> hah, pry debugger is nice
codecop_ has joined #ruby
<apeiros> great to show my wife how code is executed
<apeiros> (she learns to code)
phreax has joined #ruby
orionstein_away is now known as orionstein
atyz has joined #ruby
mansi has joined #ruby
kpshek has quit []
DanKnox_away is now known as DanKnox
x1337807x has quit [Ping timeout: 240 seconds]
benlieb has joined #ruby
Zolo has joined #ruby
noopq has joined #ruby
benlieb has quit [Client Quit]
kaspergr_ has quit [Remote host closed the connection]
tvw has quit []
workmad3 has joined #ruby
Wildhoney has joined #ruby
tealmage has joined #ruby
robscomputer has quit [Read error: Connection reset by peer]
robscomputer has joined #ruby
mansi has quit [Ping timeout: 246 seconds]
interact_ has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
robscomputer_ has joined #ruby
robscomputer has quit [Read error: Connection reset by peer]
Nisstyre-laptop has joined #ruby
alem0lars has quit [Quit: Leaving]
efrainolivares has joined #ruby
kpshek has joined #ruby
interactionjaxsn has quit [Ping timeout: 240 seconds]
tealmage has quit [Ping timeout: 264 seconds]
macmartine has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
brtdv has joined #ruby
brtdv has quit [Max SendQ exceeded]
fantazo has quit [Remote host closed the connection]
nitish has joined #ruby
mansi has joined #ruby
graydot has joined #ruby
ctp_ has quit [Quit: Leaving...]
codecop_ has quit [Ping timeout: 264 seconds]
lkba has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
Kricir has joined #ruby
<_br_> apeiros: Nice, whats the project? Anything she wants to build?
saarinen has joined #ruby
tobiasvl has quit [Ping timeout: 245 seconds]
tobiasvl has joined #ruby
saarinen has quit [Client Quit]
<apeiros> the thing she wants to build she'll do on her own. an app to learn words.
<apeiros> foreign language word training
vlad_starkov has quit [Read error: Connection reset by peer]
Kricir has quit [Ping timeout: 268 seconds]
<_br_> ah nice, some gui? green shoes?
mansi has quit [Read error: Connection reset by peer]
zmike1234 has quit [Quit: ~]
tatsuya_o has quit [Remote host closed the connection]
mansi has joined #ruby
lkba has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
coveira has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby
saarinen has joined #ruby
<apeiros> CLI for now
moses_m has joined #ruby
woolite64 has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
dankest has joined #ruby
efrainolivares has quit [Quit: efrainolivares]
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Senjai has joined #ruby
Senjai has joined #ruby
mklappstuhl has joined #ruby
interactionjaxsn has joined #ruby
codecop_ has joined #ruby
nucatus has quit [Remote host closed the connection]
lkba has joined #ruby
altivec has joined #ruby
Fire-Dragon-DoL has joined #ruby
altivec has quit [Client Quit]
mklappstuhl has quit [Remote host closed the connection]
hiyosi has quit [Ping timeout: 245 seconds]
<_br_> Well, good luck. Tried it here too, didn't like ruby.
<apeiros> well, the alternative would be HTML+CSS+JS
<apeiros> and the last one would be java
<apeiros> anything else I wouldn't want to teach her. and java isn't really my domain…
tommyvyo has quit [Quit:]
<_br_> html/css/js? Uff, thats too much for a total beginner imo. If its not fun, its useless I think.
JohnBat26 has joined #ruby
<apeiros> I think that combination can be fun
<apeiros> fun is a lot about immediate feedback
<apeiros> html gives you that and is relatively easy
<apeiros> I mean, what do you need? 10 tags?
yacks has joined #ruby
JZ|Zzz is now known as JZTech101
<apeiros> css: not necessary to teach the full set. that's pretty explorable.
<apeiros> just enough to draw some boxes.
<apeiros> and then start with js
<apeiros> the problem here IMO is more about the missing persistence layer
<Guest87977> is this correctg sass syntax @mixin gradient($gradient... $percent...){ ?
<apeiros> Guest87977: #sass ?
<Guest87977> k
ananthakumaran has quit [Quit: Leaving.]
<banister> Guest87977: if you continue to ask off-topics questions here I will ban you and your entire family
<banister> ...forever
browndawg has quit [Quit: Leaving.]
<banister> ;)
* Guest87977 slaps banister
<apeiros> forever ever?
<_br_> Guest87977: Sass has no {} it uses indent. Do you mean SCSS ?
<Guest87977> thats slaping for ever
<Guest87977> _br_, yes
<Guest87977> scss
saarinen has quit [Quit: saarinen]
<Guest87977> _br_, i guess scss is better and latest?
<_br_> Guest87977: Please follow the advice of apeiros and banister. This is not #sass, this is #ruby.
Nisstyre-laptop is now known as Nisstyre
geekbri has joined #ruby
<Guest87977> _br_, if they asked politely. sure.
<Guest87977> _br_, thanks. and no problem if you cant help
<_br_> Dangerious waters.
Guest87977 was kicked from #ruby by apeiros [polite enough?]
<apeiros> what a douche
<_br_> jep.
c0rn has quit [Quit: Computer has gone to sleep.]
<apeiros> I mean at the very least you, _br_, asked him politely.
<Diranged> Hey I'm working on some ruby code and trying to build a unit test, but I've got a bit of a problem..
Guest87977 has joined #ruby
* Guest87977 slaps apeiros
<matti> Who
Guest87977 has left #ruby ["Leaving"]
<matti> I missed kicking.
<matti> apeiros: ;]
<_br_> apeiros: I think I told him that before several times already.
<apeiros> well, guess then…
JZTech101 is now known as JZ|Zzz
<_br_> Quite justified.
c0rn has joined #ruby
<Diranged> The unit=testing framework is rspec-puppet, and we create a function in puppet called 'getsecret'. I can unit-test that function just fine. However, that function creates an object of class 'Thycotic' and I'm not sure how to mock that class..
<Diranged> I'm more of a python person, so i'm a little stuck here
geekbri_ has quit [Ping timeout: 245 seconds]
YaNakilon has quit [Ping timeout: 276 seconds]
<apeiros> Diranged: would depend on the mock/stub framework you use
Ry0_ has joined #ruby
<apeiros> and pretty sure its documents show how to mock a class
<Diranged> I'm a bit confused about how to mock it though when its created from within the puppet function?
nucatus has joined #ruby
<spike|spiegel> poor little Guest87977
<Diranged> In python, I can just access the variables inside the first package, get the object its created, and then mock parts of that object..
geekbri has quit [Remote host closed the connection]
diegoviola has joined #ruby
alvaro_o has joined #ruby
popcornlover has quit []
YaNakilon has joined #ruby
codecop_ has quit [Ping timeout: 245 seconds]
Fire-Dragon-DoL1 has joined #ruby
workmad3 has joined #ruby
Badreddi1 has quit [Ping timeout: 268 seconds]
Fire-Dragon-DoL has quit [Ping timeout: 276 seconds]
banister has quit [Remote host closed the connection]
RichardBaker has quit [Quit: RichardBaker]
iliketurtles has quit [Quit: zzzzz…..]
niceguyjames has joined #ruby
Travis-42 has joined #ruby
<Travis-42> What memory profiling tools are there for ruby 2.0? Most seem to be for 1.8
r4nd0m1 has joined #ruby
maxmanders has joined #ruby
noopq has quit [Ping timeout: 256 seconds]
SHyx0rmZ has joined #ruby
graydot has quit [Quit: graydot]
Kricir has joined #ruby
r4nd0m1_ has quit [Ping timeout: 240 seconds]
mmitchell has joined #ruby
robscomputer_ has quit [Read error: Connection reset by peer]
robscomputer has joined #ruby
kirun has joined #ruby
efrainolivares has joined #ruby
robscomputer has quit [Read error: Connection reset by peer]
robscomputer_ has joined #ruby
neg_01 has joined #ruby
<shevy> good old 1.8
coderhut has quit [Quit: Page closed]
niceguyjames has quit [Quit: Textual IRC Client: www.textualapp.com]
jlast has quit [Remote host closed the connection]
mmitchell has quit [Ping timeout: 256 seconds]
devoldmx3 has quit [Ping timeout: 240 seconds]
<_br_> Travis-42: I suppose RubyProf::MEMORY ? Or here are maybe some hints? http://www.atdot.net/~ko1/activities/rubyconf2009_ko1_pub.pdf Interesting question though.
coderhut_ has quit [Quit: Page closed]
Wildhoney has quit [Quit: Wildhoney]
sambao21 has quit [Quit: Computer has gone to sleep.]
codecop has joined #ruby
<_br_> shevy: yeah MRI ftw
<spike|spiegel> Travis-42: pretty much forget about profiling.
banister has joined #ruby
postmodern has joined #ruby
<Travis-42> spike|spiegel: Is there a good approach to identifying memory leaks without profiling? I've got a process that grows from 100MB of memory to 500MB over several hours, but am having trouble figuring out where the mistake is.
Kricir has quit [Remote host closed the connection]
<_br_> Travis-42: You can use RubyProf::Memory and Kcachegrind I think.
<Travis-42> I'll look at them br, thanks
mumble has quit [Ping timeout: 240 seconds]
<spike|spiegel> not on 2.0 AFAIK
<_br_> Hm, long running ruby processes, always seem to be a source of pain.
sambao21 has joined #ruby
neg_01 has left #ruby [#ruby]
Kricir has joined #ruby
tealmage has joined #ruby
ctp has joined #ruby
gazarsgo has quit [Quit: gazarsgo]
_honning_ has quit [Ping timeout: 264 seconds]
devoldmx3 has joined #ruby
robbyoconnor has quit [Max SendQ exceeded]
<spike|spiegel> Travis-42: the question is: does it keep growing or halts at 500?
jlast has joined #ruby
<spike|spiegel> rails is horrible in that regard, it hogs in hunderds quite easily
gazarsgo has joined #ruby
<Travis-42> spike|spiegel: That's the memory limit of the instance it's in (512). But the graph is a linear increase.
robbyoconnor has joined #ruby
ryandeus_ has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 245 seconds]
mumble has joined #ruby
ryandeussing has joined #ruby
stevefink has joined #ruby
_honning_ has joined #ruby
kaspergrubbe has joined #ruby
tealmage has quit [Ping timeout: 276 seconds]
mansi has quit [Read error: Connection reset by peer]
mansi has joined #ruby
kaspergr_ has joined #ruby
kaspergrubbe has quit [Read error: Connection reset by peer]
JZ|Zzz is now known as JZTech101
jarray52 has joined #ruby
cheenpo_ has joined #ruby
<cheenpo_> anybody run into...
<cheenpo_> mysql.h is missing. please check your installation of mysql and try again.
<cheenpo_> when trying to install the mysql2 gem with MariaDB?
cool has joined #ruby
<cool> hello everyone
andikr has joined #ruby
Es0teric has joined #ruby
<havenwood> cheenpo_: What OS?
<cheenpo_> centos 6.4
mmitchell has joined #ruby
<cheenpo_> havenwood: but what is weird...
<cheenpo_> $ locate mysql.h /usr/include/mysql/mysql.h
sarkis has joined #ruby
zeromodulus has joined #ruby
zeromodulus has quit [Changing host]
zeromodulus has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
tjad has quit [Ping timeout: 246 seconds]
swordsmanz has joined #ruby
efrainolivares has quit [Quit: efrainolivares]
bluOxigen has joined #ruby
mercwith1mouth has quit [Ping timeout: 240 seconds]
b00stfr3ak has joined #ruby
b00stfr3ak has quit [Changing host]
b00stfr3ak has joined #ruby
jjbohn is now known as jjbohn|afk
bmn has quit [Quit: obai]
Travis-42 has left #ruby [#ruby]
bmn has joined #ruby
elux has quit [Read error: Connection reset by peer]
elux_ has joined #ruby
slash_nick has joined #ruby
slash_nick has quit [Changing host]
kilophoton has joined #ruby
jjbohn|afk is now known as jjbohn
JohnBat26 has quit [Remote host closed the connection]
blueOxigen has joined #ruby
Speed has joined #ruby
bluOxigen has quit [Ping timeout: 240 seconds]
Fire-Dragon-DoL1 has quit [Quit: Leaving.]
Fire-Dragon-DoL has joined #ruby
HardFu has quit [Quit: Linkinus - http://linkinus.com]
etman has quit [Quit: etman]
tobiasvl has quit [Ping timeout: 245 seconds]
tobiasvl has joined #ruby
SHyx0rmZ has quit [Read error: Connection reset by peer]
RichardBaker has joined #ruby
stkowski_ has joined #ruby
stkowski has quit [Ping timeout: 256 seconds]
stkowski_ is now known as stkowski
fermion has quit [Quit: Textual IRC Client: www.textualapp.com]
splittingred has joined #ruby
Kricir has joined #ruby
diegoviola has quit [Ping timeout: 276 seconds]
<shevy> cheenpo_ could be a bogus check
<shevy> I sometimes have this when another error happens before, and the reporting is then too stupid to give me the real error, often enough this can be seen in a file though like config.log or similar logs
kaspergr_ has quit [Remote host closed the connection]
<cool> Guys, I am solving Problem Euler problems to learn ruby & I am stuck at problem #8. can anyone point out what I am doing wrong? https://gist.github.com/anonymous/6234753
<shevy> I dont know what is problem euler, I am not sure what problem you have either
codecop has quit [Read error: Operation timed out]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<Mon_Ouie> cool: You're not adding the solution to your result array
<cool> shevy: I am referring to http://projecteuler.net. basically, there is a 1000digit number, we have find greatest product of five consecutive digits
Zolo has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 246 seconds]
<shevy> ok
laurone16 has quit [Quit: laurone16]
<shevy> yeah, realized that then ... five_digit_pair.map {|elem| elem.to_i}.reject(&:zero?).inject(:*) # => 360, you indeed do not seem to collect these results
robustus has quit [Ping timeout: 245 seconds]
Spami has quit [Quit: This computer has gone to sleep]
SHyx0rmZ has joined #ruby
<cool> now i get 31752 as answer but site says its wrong. where did I go wrong? should I be accounting for zeros?
<cool> or there is some other error I am making
robustus has joined #ruby
<apeiros> reject zero?
<apeiros> is that allowed by the question?
<shevy> why do you reject zeros
<apeiros> the product of the five consecutive digits "74902" is 0
<Nilium> Is this that one where it's got like eight rows of digits?
Peej has quit [Remote host closed the connection]
<Nilium> Just use your eyeballs.
<apeiros> not 504
saarinen has joined #ruby
towelette55 has joined #ruby
Megtastique has joined #ruby
Guest77690 has joined #ruby
<shevy> good point
<apeiros> cool: also to_i only once and work from the resulting array -> faster
<apeiros> cool: and Array#each_cons ;-)
<Nilium> Also, if you've got a zero anywhere in your five digits, the answer is incorrect, just so you know.
<apeiros> basically, #8 is a nice 1 liner without any bad code in it
<cool> apeiros: I removed request zero call but still same wrong result. 31752
* cool checks Array#check_cons
mneorr_ has quit [Remote host closed the connection]
<snovak> Ooo - each_cons.
<snovak> I forgot about that.
intuxicated has joined #ruby
kaspergrubbe has joined #ruby
<apeiros> cool: I can give you a hint: it's too small
Guest77690 is now known as diegoviola
<apeiros> cool: the other thing you go wrong:
<Mon_Ouie> Yeah, the fastest way to find it is probably just to Ctrl+F "99…"
<apeiros> with your approach, in "1234567890" there's only 2 products
<apeiros> Mon_Ouie: only because they badly distributed their factors :-p
<cool> yes, I want to divide everything into 200pices of 5 each. Sum them & get the max
<apeiros> cool: yeah, that's wrong
Xeago has joined #ruby
thebastl has quit [Quit: Ex-Chat]
<cool> oh
<apeiros> in "1234567890" there's 5 times 5 consecutive digits
Peej has joined #ruby
<apeiros> "12345", then "23456", then "34567" etc.
<apeiros> but you make it "12345", then "67890". you miss 3.
shunt has joined #ruby
<apeiros> oh, actually in 10 digits, there's 6 groups of 5 consecutive digits.
ryannielson has quit [Quit: ryannielson]
<cool> Right, that's mean I will have to try out all the permutations of that 1000digit number!
<apeiros> no
<apeiros> only consecutive ones
foohey_ has quit [Quit: leaving]
<apeiros> you start at string[0,5], move on to string[1,5], then string[2,5] etc.
<apeiros> s/string/numbers/
<Xeago> How would this fare as an recruitment filter: https://www.filepicker.io/api/file/kbxwKx9ITJWPTX8GqoKo
<cool> right, makes sense. let me try to implement this :)
<apeiros> not all permutations. that too would be wrong and not be according to the question.
blueOxigen has quit [Read error: Connection reset by peer]
<Xeago> Summary: simple profile web site on which users have a profile picture
bluOxigen has joined #ruby
<Xeago> profile picture needs to be cropped in the background
BRMatt has joined #ruby
kobain_ has joined #ruby
Nisstyre has quit [Quit: Leaving]
etman has joined #ruby
codecop has joined #ruby
Fuzai has quit [Remote host closed the connection]
efrainolivares has joined #ruby
atyz has quit [Quit: Leaving...]
kiri has quit [Ping timeout: 245 seconds]
kobain has quit [Ping timeout: 246 seconds]
dlind has joined #ruby
tealmage has joined #ruby
colonolGron has joined #ruby
Ry0_ has quit [Remote host closed the connection]
i_s has quit [Remote host closed the connection]
Wildhoney has joined #ruby
atyz has joined #ruby
colonolGron has quit [Client Quit]
colonolGron has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
i_s has joined #ruby
ffio_ has quit [Quit: WeeChat 0.4.1]
agjacome has quit [Ping timeout: 264 seconds]
saarinen has quit [Quit: saarinen]
sambao21 has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
browndawg has joined #ruby
rbento has joined #ruby
banister is now known as banisterfiend
c0rn has joined #ruby
stkowski has quit [Quit: stkowski]
mosez has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
jhn has joined #ruby
chrisja has quit [Quit: leaving]
brennanMKE has quit [Ping timeout: 245 seconds]
rickmasta has quit [Quit: Leaving...]
<jhn> This might be a long shot but I have an extra ticket to Steel Ruby Conf. I'm selling it face value ($50). Thanks!
<jhn> *Steel City Ruby conf
<Nilium> It's got a surprising lack of web dev talks.
tonni has quit [Remote host closed the connection]
iliketurtles has joined #ruby
<Nilium> That said, its talk names are also largely gibberish or nondescriptive too..
<jhn> Ah shoot. Forgot to mention that I'm in NYC...
allsystemsarego has quit [Quit: Leaving]
<Nilium> I'm in Idaho, so I couldn't go if I wanted to, since the cost alone of getting there would be really bad for me.
Wildhoney has quit [Quit: Wildhoney]
zorg24 has joined #ruby
thepumpkin has quit [Remote host closed the connection]
<jhn> Nilium: Well technically it's a Ruby conference. Not a web dev talk. ;-)
Bry8Star{T2_ has joined #ruby
<Nilium> I know.
dash_ has quit [Quit: dash_]
sambao21 has joined #ruby
<Nilium> If it were a web dev one, it'd be RailsConf, but I automatically assume most of the people talking about Ruby are icky web developers.
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
devoldmx3 has quit [Ping timeout: 240 seconds]
sambao21 has quit [Client Quit]
<Donovan> icky?
* Donovan huffs
sr78ger has quit [Ping timeout: 264 seconds]
rbwsam has quit [Quit: Leaving.]
devoldmx3 has joined #ruby
<Nilium> Hopefully the word choice there worked.
<lewellyn> ew, cooties! ;)
machuga is now known as machuga|away
<Nilium> Yep, totally worked.
* Donovan huffs some more
<Nilium> I should probably not code by sitting on my futon and using my chair as a desk. Likely not good for my back.
nomenkun has joined #ruby
<Donovan> is there another way?
<Donovan> =)
<Nilium> Yep: glue mac to wall.
<Nilium> Or just use the desk in front of me.
<Nilium> The one that's like 5 feet away.
<Donovan> I do my best programming sitting on the couch watching something inane on TV
<lewellyn> i just lie in bed. easier on my back than sitting in a chair or whatever for 12+ hours
<Nilium> I do something similar, albeit with streams of people playing games and such.
<Nilium> The downside is I also have to do that to fall asleep.
<lewellyn> sleep is overrated.
sambao21 has joined #ruby
<Nilium> Was trying to figure out why I recognized your name, lewellyn, then I remember I had you on the twitters at some point.
<Nilium> Also probably from the blackberry channel.
<Nilium> +-dev
goleldar has joined #ruby
<Nilium> *remembered
brennanMKE has joined #ruby
<Nilium> Clearly haven't had enough coffee yet if I'm forgetting to use tense suffixes.
mneorr has joined #ruby
ebanoid has joined #ruby
fcahoon has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
<lewellyn> Donovan: i prefer a laptop.
<lewellyn> Nilium: i'm everywhere.
fcahoon has quit [Client Quit]
<Donovan> lewellyn: probably not as much a liability either. =)
<Nilium> This is clearly untrue, seeing as you're not inside my cat.
<cool> apeiros: I solved it, you were right its just a one liner
<cool> n.chars.to_a.map{ |i| i.to_i }.each_cons(5){ |a| result << a.inject(:*) }
<cool> apeiros: thanks :)
<apeiros> o0
<apeiros> that's not a oneliner, though :-p
<lewellyn> Nilium: when i leave your cat, it will not be alive nor dead. so it's best i keep observing it.
<apeiros> you still need to find the max in result
<Nilium> Enumerable is the most awesome module.
<popl> the cat will, however, need therapy.
MrZYX|off is now known as MrZYX
<cool> apeiros: yeah, that's obvious. result.max
<canton7> why not do each_const(5).map{ |a| a.inject(:*) }
<apeiros> cool: n.scan(/\d/).map(&:to_i).map { |n| n.inject(:*) }.max
<canton7> *each_cons
<apeiros> whoops, + each_cons(5)
<Nilium> apeiros: Beat me to it. -_-
<Nilium> Well, except I wouldn't have used scan.
b00stfr3ak has quit [Ping timeout: 256 seconds]
<apeiros> with the scan, you can also take the input in whatever form you want. no preprocessing needed.
<cool> apeiros: Awesome! I learned some new today :D
<Nilium> Anyway, again, Enumerable's the most awesome thing in Ruby.
<cool> +1
kaspergrubbe has quit [Remote host closed the connection]
efrainolivares_ has joined #ruby
tonni has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
<Nilium> I'm kind of surprised there's no bitset in the stdlib.
<Nilium> Or if there is, I just haven't found it yet
tealmage has quit [Remote host closed the connection]
<cool> apeiros: your code gives NoMethodError --> undefined method `inject' for 7:Fixnum (NoMethodError)
<banisterfiend> Nilium: Enumerable is cool, Enumerator needs work!
<banisterfiend> though it's cooler in 2.0
<Nilium> Indeed.
<Nilium> I guess the upshot is that bitsets are easy to implement.
efrainolivares__ has joined #ruby
saarinen has joined #ruby
<Nilium> I use 2.0, so I'm safe.
<cool> apeiros: for some reason, n in map { |n| n.inject(:*) } doesn't seem to be an array but a number
<banisterfiend> what's a bitset?
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
Pixi__ has joined #ruby
kiri has joined #ruby
nitish has quit [Remote host closed the connection]
chrisja has joined #ruby
efrainolivares has quit [Ping timeout: 264 seconds]
browndawg has left #ruby [#ruby]
<canton7> cool, apeiros missed the each_cons(5), like he said on the next line
Lewix has quit [Remote host closed the connection]
<canton7> so n.scan(/\d/).map(&:to_i).each_cons(5).map { |n| n.inject(:*) }.max
<banisterfiend> Nilium: so you'd just wrap a fixnum and do a bunch of bitwise operations on it but expose a nice interface?
<Nilium> A fixnum or an array of fixnums.
<cool> canton7: Right!
<cool> works now!
mansi has quit [Remote host closed the connection]
Demo_of_doom_ has quit [Remote host closed the connection]
efrainolivares_ has quit [Ping timeout: 256 seconds]
mumble has quit [Ping timeout: 268 seconds]
evenix has quit [Remote host closed the connection]
mansi has joined #ruby
Xiti` has quit [Ping timeout: 243 seconds]
anderson has joined #ruby
<Nilium> A bignum could probably be used as a bitset if it had a []= method to match its [], but I'm not sure how bignum's implemented, so it might not be possible to modify one.
jaimef has quit [Excess Flood]
<Nilium> A Fixnum provides [] to access bits, but you can't modify those.
mansi_ has joined #ruby
mansi has quit [Read error: Connection reset by peer]
<Nilium> So an array of Fixnums is usually the best bet.
<diegoviola> gotta love chruby, finally something that makes sense
brbcoding has quit [Ping timeout: 256 seconds]
<Mon_Ouie> I'd think String would be the best way to implement it
<canton7> Nilium, why not use the old bitwise operators? mybignum |= (1 << whatever)
<Nilium> That's what I do.
mark_locklear has quit [Ping timeout: 240 seconds]
<Nilium> Well, for fixnums, anyway.
Neomex has joined #ruby
<Nilium> Doing it for a bignum would probably result in a new bignum being allocated per bitwise op.
codecop has quit [Read error: Operation timed out]
<banisterfiend> Mon_Ouie: Nope.
Kricir has joined #ruby
cads has quit [Ping timeout: 276 seconds]
jaimef has joined #ruby
Companion is now known as companion
<Mon_Ouie> banisterfiend: It's not the same when you do it.
IceyEC has quit [Quit: IceyEC]
<banisterfiend> Mon_Ouie: I'm still learning :P
Senjai is now known as sirsenjai
sirsenjai is now known as Senjai
gyre007 has joined #ruby
<shevy> lol.... errno.h documentation:
<shevy> "EGRATUITOUS: This error code has no purpose."
<Nilium> You could do it with a string, too, just by using set/getbyte.
rurufufuss has joined #ruby
Kricir has quit [Ping timeout: 264 seconds]
ssvo has joined #ruby
spider-mario has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
anonymuse has joined #ruby
popl has quit [Quit: We must make an idol of our fear, and call it God.]
Megtastique has quit [Quit: Megtastique]
<Nilium> Thinking about it more, yeah, definitely use a string.
<Nilium> Should sort of ensure cache locality and you don't lose a bit to a fixnum.
<banisterfiend> Nilium: btw when you were evaluating ruby gaming libraries, did you look at Mon_Ouie's one?
<banisterfiend> (ray)
<Nilium> No.
<Nilium> I haven't evaluated them in the first place.
Matriks has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
<Nilium> I evaluated the options for GL bindings and GL context/window creation libs, and if the gem went beyond the scope of that I ignoredi t.
<Nilium> *ignored it
tommyvyo has joined #ruby
mansi_ has quit [Remote host closed the connection]
ukd1 has joined #ruby
agjacome has joined #ruby
mansi has joined #ruby
Neomex has quit [Quit: Neomex]
saarinen has quit [Quit: saarinen]
mansi_ has joined #ruby
mansi has quit [Read error: Connection reset by peer]
arietis has joined #ruby
pipework has quit [Remote host closed the connection]
jim0thy_ has joined #ruby
<zorg24> how does one get the current URI in rspec?
codecop has joined #ruby
<Nilium> A current URI for what?
tatsuya_o has joined #ruby
<zorg24> I'm writing tests for a rails app
<Mon_Ouie> I assume you're talking about some web framework that you didn't mention
<Mon_Ouie> (Well, now you did)
<Nilium> A current URI for a test or something?
<Nilium> Like URI(__FILE__)?
<Mon_Ouie> Asking on #rubyonrails would probably make more sense
<zorg24> ok thanks
Wildhoney has joined #ruby
Solnse has quit [Ping timeout: 276 seconds]
saarinen has joined #ruby
Lewix has joined #ruby
jim0thy_ has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
stkowski has joined #ruby
Solnse has joined #ruby
sjltaylor has joined #ruby
devoldmx3 has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
differentSmoke has joined #ruby
Solnse has quit [Read error: Connection reset by peer]
sjltaylor has quit [Client Quit]
<differentSmoke> hello
ner0x has quit [Remote host closed the connection]
zz_dbRenaud is now known as dbRenaud
ice has quit [Remote host closed the connection]
<differentSmoke> I got a short rails related but ultimately core ruby question
kaldrenon has quit [Remote host closed the connection]
<shevy> ack
bdscvr has joined #ruby
efrainolivares__ has quit [Read error: Operation timed out]
<differentSmoke> yes!
<Nilium> Well, ask and then we'll maybe tell you to ask the rails channel.
<differentSmoke> is there a way from preventing ruby from escaping strings?
<apeiros> differentSmoke: ruby does not escape strings
<differentSmoke> a way OF preventing
<Nilium> What do you mean by ruby escaping strings?
<apeiros> are you confusing inspect output with print output?
<Nilium> Are you confusing interpolation with escapes?
<differentSmoke> maybe.
<Nilium> Give us an example string that is being escaped, as it were.
<zets> are you talking about rails?
<Nilium> He is, but he seems to think it's a core ruby thing, and I have no idea what he's actually talking about
codecop has quit [Ping timeout: 246 seconds]
<differentSmoke> well, I was given the impression for reading a large number of stack overflow posts that ruby did indeed escaped strings
breakingthings has quit [Quit: breakingthings]
<Nilium> What do you mean by escape?
thepumpkin has joined #ruby
<Nilium> You really, really need to clarify that first.
Cyrus has joined #ruby
<apeiros> >> puts "foo\t\"bar\""
<eval-in> apeiros => foo"bar" ... (https://eval.in/43279)
arietis has quit [Quit: Computer has gone to sleep.]
freerobby has quit [Quit: Leaving.]
<differentSmoke> that if I retrieve "{"thing":"stuff"}" and store it in a variable, the variable when accessed will be "{\"thing\":\"stuff\"}"
<apeiros> >> puts "foo\t\"bar\"".inspect
<eval-in> apeiros => "foo\t\"bar\"" ... (https://eval.in/43280)
<apeiros> differentSmoke: yes, you're confusing inspect with print
sjltaylor has joined #ruby
<Nilium> Yeeeeaaah.
<canton7> (note: 'p foo' has the same effect as 'puts foo.inspect'
<apeiros> differentSmoke: "{\"thing\":\"stuff\"}" means you have a string
<apeiros> and because " would terminate the string, ruby escapes it in the *inspect*
<differentSmoke> yeah, kinda realized that as I was writing it
vlad_sta_ has joined #ruby
<apeiros> because otherwise *you* can't tell where which object starts and ends
jim0thy_ has joined #ruby
<differentSmoke> again, my apologies. I got the impression that it was an issue of "preventing escaping" from stack overflow
ebanoid has quit [Quit: brbomgwtfbbq]
jlebrech has joined #ruby
<Nilium> Well, now that that's cleared up, I should get lunch maybe.
Kricir has joined #ruby
mbenson3 has quit [Quit: leaving]
<differentSmoke> I would not have come with such a vague question in other case
fuzzy has joined #ruby
ebanoid has joined #ruby
fuzzy is now known as Fuzai
<apeiros> well, at least you managed to clarify :-p
sqd has quit [Quit: sqd]
<differentSmoke> can I convert it to some sort of raw string?
<apeiros> it is a raw string
<apeiros> it's a string in exactly the way you'd write it in ruby source code
vlad_starkov has quit [Ping timeout: 268 seconds]
<apeiros> i.e. `puts <copy & paste the inspected string>` is valid ruby code
<apeiros> >> puts "{\"thing\":\"stuff\"}"
<eval-in> apeiros => {"thing":"stuff"} ... (https://eval.in/43281)
<differentSmoke> can I pass the output of puts to a function?
<apeiros> you don't get it…
<apeiros> >> x = "{\"thing\":\"stuff\"}"; puts x
<eval-in> apeiros => {"thing":"stuff"} ... (https://eval.in/43282)
<differentSmoke> yes, if it wasn't escaped it wouldn't be a string
<differentSmoke> I get that
nomenkun has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 246 seconds]
<jrobeson> >> x = "{'thing' : 'stuff' }"; puts x
<eval-in> jrobeson => {'thing' : 'stuff' } ... (https://eval.in/43283)
<differentSmoke> the internal representation of the string is with the backslashes
<jrobeson> differentSmoke, notice the difference .. with " or '
jim0thy_ has quit [Ping timeout: 264 seconds]
<apeiros> differentSmoke: no
<canton7> differentSmoke, no. the internal representation doesn't have the backslashes. The backslashes are put in by the 'inspect' method on String
<differentSmoke> ok ok.
deviantlinux has joined #ruby
<apeiros> and the backslashes are needed when you write a string literal. "\"" does not internally consist of "backslash followed by quote". it's just "quote".
<differentSmoke> so "blabla""blabla" is a vaild string?
<apeiros> no
<apeiros> well, yes, but not the way you mean
<deviantlinux> In a "rescue" block inside a begin/end block, Can I use any valid Ruby code, such as an if statement, or can you only use certain things there?
<orionstein> "blabla\"\"blabla"
rickmasta has joined #ruby
<apeiros> deviantlinux: rescue code can contain any ruby code.
<differentSmoke> but what get's stored is "blabla""blabla"
<canton7> no, it gets stored as blabla""blabla
<differentSmoke> oh, yes
<apeiros> no
<orionstein> for "blabla""blabla"
<apeiros> >> "blabla""blabla"
<eval-in> apeiros => "blablablabla" (https://eval.in/43284)
<canton7> the quotes around the whole thing are needed so that ruby knows that you want to store a string, as opposed to an int, value of another variable, etc
<apeiros> this is a special case
<orionstein> "\"blabla\"\"blabla\""
freerobby has joined #ruby
<apeiros> your first string is "blabla", your second is "blabla", and ruby concatenates them
<deviantlinux> apeiros: thanks.
<apeiros> that's really a special case
<apeiros> and a bad example
saarinen has quit [Quit: saarinen]
<differentSmoke> haha, sorry
<jrobeson> *special*
<differentSmoke> ok. I guess a rails method is passing the result of inspect rather than the actual string
slash_nick is now known as slash_nickcomple
<apeiros> differentSmoke: almost certainly not
<apeiros> differentSmoke: but since you said "backtrace" - in a backtrace you would *of course* use inspect
mneorr has quit [Ping timeout: 240 seconds]
<apeiros> anything else makes no sense.
<differentSmoke> I said backtrace?
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
<apeiros> oh, no, you said stack *overflow*
<deviantlinux> Are variables inside a begin/end only available in the begin/end, or can I use them outside of it?
sambao21 has joined #ruby
<apeiros> somehow overread that as stack trace
<differentSmoke> could they get inspected when retrieved from an Array?
tylersmi_ has quit [Read error: Connection reset by peer]
<apeiros> differentSmoke: dude, what *actual* problem do you experience
tylersmith has joined #ruby
v0n has joined #ruby
<apeiros> deviantlinux: begin/end does not introduce a new lexical scope. variables are visible outside.
mneorr has joined #ruby
codecop has joined #ruby
<differentSmoke> json stored as a string in a MySQL database gets passed to a render json: arrayofrecords, and instead of getting a json array containing json objects, I get a json array containing strings
devoldmx3 has joined #ruby
<apeiros> differentSmoke: my bet is on you doing a double to_json
fyz1x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<differentSmoke> uhm, yes now that you mention it that sounds pretty logical
<deviantlinux> apeiros: Any idea why this http://pastebin.com/0P9j4ZCP (see Line 25-28) causes code below that line (the reply ERROR) not to be executed? Something's wrong there
<differentSmoke> is there a to_unjson? (trying to be funny, hope I convey my meaning)
<apeiros> deviantlinux: use something non-ad ridden and I'll look at it. e.g. gist.github.com
<apeiros> differentSmoke: yes. don't call to_json twice :-p
<apeiros> and the other (stupid) way would be plain JSON.parse.
<differentSmoke> well, there is an implicit to json
<apeiros> yeah, you use render :json
<apeiros> don't
<apeiros> use render :text
<apeiros> and set the proper headers.
<differentSmoke> ok, will investigate. thanks!
<apeiros> also, that part would be #rubyonrails
<apeiros> as in "how do I render a json string without it getting called to_json on it again" (or somesuch)
Nisstyre-laptop has joined #ruby
dtcrshr has quit [Quit: poff]
<differentSmoke> yes yes, I apologize
<apeiros> no need to apologize. just pointing out.
<differentSmoke> now I understand why all the "how do I prevent ruby from escaping..." in StackOverflow were always left unanswered or the subject was changed
robscomputer has joined #ruby
newUser1234 has quit [Remote host closed the connection]
zorg24 has quit [Ping timeout: 256 seconds]
seich- has quit [Ping timeout: 245 seconds]
rickmasta has quit [Quit: Leaving...]
axiak has joined #ruby
<deviantlinux> apeiros: ads? Adblocker plugins are your friend, but ok, sec
<apeiros> deviantlinux: adblocker plugins are for suckers
bdscvr has left #ruby [#ruby]
<apeiros> I understand that the content I want needs ads to survive
<deviantlinux> saves lives, man
<differentSmoke> :/
<differentSmoke> render text: still gives me the escaped representation
axiak has left #ruby [#ruby]
<deviantlinux> there ya go
JZTech101 is now known as JZTech101_
JZTech101_ is now known as JZTech101
robscomputer_ has quit [Ping timeout: 256 seconds]
coveira has joined #ruby
sparq_ has joined #ruby
<apeiros> differentSmoke: then your double to_json happens earlier
Spooner has joined #ruby
Nisstyre-laptop is now known as Nisstyre
<cheenpo_> anybody here have the mysql2 gem with MariaDB on centos 6.4 ?
pskosinski has joined #ruby
newUser1234 has joined #ruby
<apeiros> differentSmoke: looking at my own controllers, render :json does not actually call to_json
<differentSmoke> uhm...
coveira has quit [Excess Flood]
<apeiros> at least not on a string
robscomputer has quit [Remote host closed the connection]
robscomputer has joined #ruby
elux_ has quit [Quit: Bye!]
robscomputer has quit [Read error: Connection reset by peer]
<apeiros> deviantlinux: other than that code itself erroring out, I see no reason why it would
robscomputer has joined #ruby
seich- has joined #ruby
<deviantlinux> apeiros: it seems like simply having the if statement there causes the issue. Like it doesn't like my variable.
<apeiros> deviantlinux: well, do you get an exception? if not, wrap it into a begin/rescue and see whether it errors out?
rickmasta has joined #ruby
<apeiros> you only show a part of your code, there's various reasons line 25-28 could raise
<differentSmoke> Ok. This only works when I pass it the json field of one record, directly. So render json: MyModel.first.json_record works as I want, but if i render json: MyModel.first what I get is the whole row as json, with the json_record field being a large string.
<apeiros> differentSmoke: errr… yes, of course
<apeiros> what'd you expect?
<apeiros> AR::Base#to_json will invoke to_json on all members.
mmitchell has quit [Ping timeout: 245 seconds]
<apeiros> write a proper as_json method in MyModel
<differentSmoke> ok, so there is a to_json
<differentSmoke> happening
butblack has joined #ruby
andikr has quit [Remote host closed the connection]
codecop_ has joined #ruby
andikr has joined #ruby
stuff has quit [Read error: Connection reset by peer]
oz has quit [Ping timeout: 264 seconds]
JDHankle has quit [Remote host closed the connection]
stuff has joined #ruby
awarner_ has joined #ruby
reset has joined #ruby
<differentSmoke> well, thanks a lot, it's been dishearteningly clarifying but ultimately very helpful
codecop has quit [Ping timeout: 264 seconds]
madumo has quit [Quit: madumo]
tealmage has joined #ruby
oz has joined #ruby
awarner__ has joined #ruby
<apeiros> o0
* apeiros decides to stop reading after "thanks a lot". the rest is just confusing :-p
<apeiros> yw
mneorr has quit [Remote host closed the connection]
atyz has quit [Quit: Linkinus - http://linkinus.com]
failshell has quit [Ping timeout: 276 seconds]
awarner has quit [Ping timeout: 276 seconds]
<deviantlinux> apeiros: hard to see if I get an exception since this is run through puppet.. herm.
<apeiros> well, can't help with puppet
<apeiros> I'd assume it has a way of logging stuff…
ebanoid has quit [Quit: brbomgwtfbbq]
mikepack has quit [Remote host closed the connection]
<apeiros> in the worst case, you can also deduce what causes the error. after all the code isn't big.
awarner_ has quit [Ping timeout: 276 seconds]
pothibo has quit [Ping timeout: 245 seconds]
alpha123 has quit [Quit: Lost terminal]
nucatus has quit [Read error: Connection reset by peer]
nucatus has joined #ruby
pothibo has joined #ruby
andikr has quit [Remote host closed the connection]
snovak has quit [Remote host closed the connection]
snovak has joined #ruby
tealmage has quit [Ping timeout: 256 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maxmanders has quit [Quit: Computer has gone to sleep.]
shredding has joined #ruby
jonathanwallace has quit [Quit: WeeChat 0.4.1]
<shredding> In other words: How would I mock Httparty here?
brianpWins has joined #ruby
<shredding> In python, i can monkey patch the import, but i guess that's not possible in ruby?
codecop_ has quit [Ping timeout: 256 seconds]
<apeiros> wow
<apeiros> I was answering this
snovak has quit [Ping timeout: 240 seconds]
codecop has joined #ruby
<apeiros> now I think I'll just leave it
Diranged has left #ruby [#ruby]
<shredding> apeiros: why?
<apeiros> attitude.
Kricir has quit [Remote host closed the connection]
<shredding> apeiros: Ok, leave it.
<apeiros> I'll only address your claim: yes, it is possible to mock out Httparty in ruby. Pretty easily so even.
ctp has quit [Quit: Leaving...]
tanema has quit [Remote host closed the connection]
<apeiros> and on several levels even too.
Kricir has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
newUser1234 has quit [Remote host closed the connection]
iliketurtles has joined #ruby
<shredding> Yeah, you know I'm really tired of people who right sentences like "attitude.", so I'd rather ask someone else.
<shredding> *write
<apeiros> yeah, and I'm tired of people with your attitude. I rather spend my time helping other people.
devoldmx27 has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
Tricon has quit [Quit: Linkinus - http://linkinus.com]
<shredding> apeiros: To give it a fresh start, what's wrong with my attitude=
<shredding> Attitude towards what?
tacos1de has quit [Ping timeout: 240 seconds]
rickmasta has quit [Quit: Leaving...]
<apeiros> "this so easy in python, but impossible in ruby". what's the point of that claim? the only one I see is "come on, feel provoked! prove me wrong!"
Astral__ has quit [Ping timeout: 240 seconds]
<apeiros> and you know what? I'm not playing along.
<shredding> apeiros: You really got that wrong.
Kricir has quit [Ping timeout: 245 seconds]
<shredding> I'm coming from python and am learning ruby.
BillCriswell has quit [Remote host closed the connection]
IceyEC has joined #ruby
<differentSmoke> I hear you brother!
<apeiros> shredding: so?
<shredding> I'm coming as well from php and everyones provoking me all the time just because of that.
tylersmi_ has joined #ruby
go|dfish has quit [Remote host closed the connection]
tylersmith has quit [Read error: Connection reset by peer]
<apeiros> again: so? you didn't show me what the point of that claim is.
<shredding> Why on earth should i come into ruby irc with a problem and provoke someone?
<apeiros> probably because you somewhere learnt that it works.
<apeiros> that you can push peoples buttons that way.
<shredding> My point was: Hey guys, I'm new to ruby i know a bit of python i do it there this way, how to do it in ruby?
rbwsam has joined #ruby
<apeiros> shredding: with *that*, I wouldn't have had a single issue.
<apeiros> but that's not what you said.
<differentSmoke> apeiros, I think you are reading an intention that wasn't there. I think it was an honest question like "maybe monkey patching is not the ruby way and you have to try something else?"
<shredding> apeiros: yeah, maybe you read a bit to much between the lines.
tacos1de has joined #ruby
qhartman_ has joined #ruby
<cheenpo_> can I provoke somebody about a mysql2 gem install question? (he asked, to ease the tension) ahahahaa
<apeiros> differentSmoke: no.
<apeiros> differentSmoke: shredding may not have intended to offend anybody.
<finges> shredding: It's how you posed the question... when you say something is doable in python.. and impossible in ruby... it comes off confrontational.
<apeiros> differentSmoke: but it totally is a "I push peoples buttons" move.
go|dfish has joined #ruby
<apeiros> and I call him out for it
<shredding> basically i did not even say that you can't monkey patch in ruby, as I already learned you can.
interactionjaxsn has quit [Remote host closed the connection]
<shredding> I asked, because "require()" is a method call.
<shredding> Whatever.
ericmathison has quit [Ping timeout: 245 seconds]
<apeiros> basically you said "i guess that's not possible in ruby"
interactionjaxsn has joined #ruby
newUser1234 has joined #ruby
<apeiros> anyway, I told you whats wrong with your attitude.
qhartman has quit [Ping timeout: 264 seconds]
<apeiros> up to you to use that information, or toss it away and hope for somebody else to answer.
<apeiros> idc
<shredding> I really do not believe that something is wrond with my attitude.
<apeiros> that was expected.
kirun has quit [Remote host closed the connection]
<yfeldblum> even if someone asks a question in a confrontational tone, it's still cool to answer in a way that will be seen by the questioner as kind
sayan has quit [Ping timeout: 256 seconds]
<apeiros> yfeldblum: nobody stops you.
<shevy> shredding I think python's import functionality may be more advanced than ruby's load/require actions
<shredding> I really did not mean to have a confrontational tone!
<shredding> Sorry, if that came out wrong.
<shredding> I'm not even natural english speaker.
<shevy> you can see the chaos that happens in ruby land with the introduction of require_relative
theRoUS has quit [Ping timeout: 268 seconds]
<shredding> native
<shevy> nor are the japanese devs of ruby :P
devoldmx27 has quit [Read error: Connection reset by peer]
devoldmx3 has joined #ruby
<apeiros> yfeldblum: again, go ahead.
<apeiros> nobody stopping you.
<shevy> I like it
<shevy> "Other people's code is often bad."
<shredding> shevy: Basically, in python it's not really mocking what you're doing on imports, you just overwrite. That's why i'm unsure if it's even the right hook point to "mock" out the httparty gem
interactionjaxsn has quit [Ping timeout: 240 seconds]
<yfeldblum> shredding, in ruby, you can replace a class with another class, or a method with another method; there are plenty of mocking frameworks and libraries around to use or to learn from
Speed has joined #ruby
shunt has quit [Ping timeout: 256 seconds]
dllama has joined #ruby
<shredding> yfeldblum: Ok, that's the functionality I'm looking for!
<yfeldblum> shredding, however, modifying Kernel#require is not generally a good approach
sambao21 has quit [Quit: Computer has gone to sleep.]
wmoxam has quit [Ping timeout: 268 seconds]
<shevy> shredding you should be able to do something similar, in ruby you can always reopen and change existing classes and methods or just load/require a .rb file again (hmm... I think load() actually... one of them loads only once...)
<shevy> shredding you can also keep an alias to the original method
mansi_ has quit [Remote host closed the connection]
swordsmanz_ has joined #ruby
Guest6856 has joined #ruby
Astralum has joined #ruby
swordsmanz has quit [Read error: Connection reset by peer]
swordsmanz_ is now known as swordsmanz
ravster has left #ruby [#ruby]
<shevy> hmm and somewhere on the web there are examples with Kernel#require
<shevy> but to be honest I think it's kinda rare that people do that
mansi has joined #ruby
diegoviola has quit [Ping timeout: 240 seconds]
<shredding> shevy: Yeah, it does not feel ruby to me, but my ruby feeling is not that settled.
<shevy> btw shredding a nice overview is on this blog https://practicingruby.com/articles/shared/tmxmprhfrpwq
<shevy> but I hate require_relative ... I'd wish it would die
<shevy> and autoload, which will actually die hehe
robscomputer_ has joined #ruby
ner0x has joined #ruby
<shredding> shevy: So basically, how would one put a class that uses a gem? This overwriding of require does not feel like the way to go ...
<shevy> "So I hereby declare the future deprecation of autoload. Ruby will keep autoload for a while, since 2.0 should keep compatibility to 1.9. But you don't expect it will survive further future, e.g. 3.0." - matz
<shevy> shredding wait...
<shredding> shevy: Ok, i haven't yet heared of autoload.
<shevy> a gem I equal with a project, ok?
<shredding> Okay, i do not have the words right.
<shredding> The thing i require is a gem
<shevy> in general the easiest convention is to have "name_of_project" become require "name_of_project"
maroloccio has joined #ruby
<shevy> ok, let's say you do: require 'bla', where bla is the name of the gem
mlpinit has quit [Remote host closed the connection]
<shevy> then usually, depending on how complex that gem project is, you may pull in lots of different .rb files
tgunr has quit [Quit: Nity nite]
devoldmx3 has quit [Read error: Connection reset by peer]
<shevy> in most examples, they will reside in a namespace
<shevy> usually in that case, module Bla
<yfeldblum> shevy, yeah, avoid autoload ...
<shevy> except for apeiros who often uses class Bla ;-)
<shredding> yfeldblum: interesting approach
robscomp_ has joined #ruby
cody-- has quit [Quit: Computer has gone to sleep.]
<shredding> shevy: in my case it's just this require 'httparty'
<shevy> shredding within your project, you could either then do include Bla, to make the namespace available in your module/class
<yfeldblum> shredding, it's just a very simple example of what i said before: "in ruby, you can replace a class with another class"
baordog has quit [Remote host closed the connection]
<shredding> As all is depending on that
<shevy> hmm I am not familiar with httparty
jerius has quit [Ping timeout: 240 seconds]
robscomputer has quit [Ping timeout: 264 seconds]
robscomputer_ has quit [Read error: Connection reset by peer]
<shevy> let me install that gem
<shredding> Okay, i think i can figure the details out.
<shredding> shevy:
<shredding> shevy: you don't have to
<shredding> the code works fine.
mansi has quit [Ping timeout: 264 seconds]
<shredding> I just wonder how to test the code.
<dllama> hi guys. noob question here if u dont mind. how would i go about treating attr_accessor as an array? Preferably w/o overriding active record initializer ?
Davey_ has joined #ruby
<shevy> shredding hehe yeah, I often wonder how I should test myself
peregrine81 has quit [Quit: peregrine81]
<shredding> I guess i can figure out the details, I just wondered what is the "ruby way to go"
twoism has quit [Read error: Connection reset by peer]
itcharlie has left #ruby [#ruby]
twoism has joined #ruby
<virtualize|work> dllama just assign it as an array
<virtualize|work> attr_accessor :foo
<virtualize|work> foo = [1,2,3]
<shredding> So, if "replacing the class with your fake class" is the ruby way (which is what i did a lot in python btw), I'll try that.
<shevy> ok... seems the main module there is module HTTParty
<shredding> Thanks for your help.
<shredding> shevy: Yes!
<shevy> it has some spec test code in spec/ not sure if that is of any help
ferdev has quit [Read error: Connection reset by peer]
ferdev has joined #ruby
ColKurtz has quit [Ping timeout: 276 seconds]
<dllama> virtualize|work, I did that, however, when trying to build a form and have :foo["bar"], it returned errors. So i thought i had setup the accessor wrong
kobain has joined #ruby
Guest6856 has quit [Ping timeout: 264 seconds]
<shevy> hmm is :foo["bar"] even valid syntax?
kobain_ has quit [Ping timeout: 276 seconds]
jlast has quit [Remote host closed the connection]
<apeiros> shevy: valid syntax yes, otherwise not so much
<dllama> :foo[:bar]*
<apeiros> it calls [] on :foo, with an argument "bar"
<dllama> hmm, hopefully smilie didn't pass in
<shevy> hehe
<shredding> I'll just try to read into this exchange classes.
Davey has quit [Ping timeout: 276 seconds]
devoldmx3 has joined #ruby
rismoney has joined #ruby
Sp4rKy has quit [Ping timeout: 276 seconds]
<apeiros> well, actually since 1.9, Symbol has String methods on it, so it might even work
<shredding> My book "eloquent ruby" just arrives at "metaprogramming", so that may be of help :)
fridim_ has joined #ruby
<shevy> cool... I did not even know symbols have []
<virtualize|work> shevy: you might need to provide some code in order to diagnose it a little more
<apeiros> shevy: it even works. it's the same as String#[] on Symbol
<apeiros> basically Symbol#[] is like to_s[]
ColKurtz has joined #ruby
bdscvr has joined #ruby
orionstein is now known as orionstein_away
Sp4rKy has joined #ruby
ctp has joined #ruby
hamakn has quit [Remote host closed the connection]
hamakn has joined #ruby
ctp has quit [Client Quit]
sjltaylor has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tgunr has joined #ruby
bluOxigen has quit [Ping timeout: 264 seconds]
apeiros_ has joined #ruby
codecop has quit [Remote host closed the connection]
tatsuya_o has quit [Remote host closed the connection]
AndChat|677369 has joined #ruby
shredding has quit [Quit: shredding]
workmad3 has quit [Ping timeout: 268 seconds]
jjbohn has quit [Quit: Leaving...]
sparr has joined #ruby
DanKnox is now known as DanKnox_away
mengu has joined #ruby
slash_nickcomple is now known as slash_quit
hamakn has quit [Ping timeout: 264 seconds]
mengu has quit [Read error: Connection reset by peer]
c0rn has quit [Quit: Computer has gone to sleep.]
mengu has joined #ruby
<sparr> is an empty array true or false?
<apeiros_> true-ish
<apeiros_> everything but nil/false is true-ish
bdscvr has quit [Ping timeout: 256 seconds]
dankest has quit [Quit: dankest]
DanKnox_away is now known as DanKnox
nomenkun has joined #ruby
twoism has quit [Remote host closed the connection]
Tricon has joined #ruby
twoism has joined #ruby
newUser1234 has quit [Remote host closed the connection]
sjltaylor has joined #ruby
pskosinski_ has joined #ruby
twoism_ has joined #ruby
twoism has quit [Read error: Connection reset by peer]
mikepack has joined #ruby
nucatus has quit [Remote host closed the connection]
jdenen has quit [Quit: Leaving.]
freerobby has quit [Quit: Leaving.]
splittingred_ has joined #ruby
splittingred has quit [Ping timeout: 268 seconds]
splittingred_ is now known as splittingred
alex__c2022 has quit [Quit: alex__c2022]
nomenkun has quit [Ping timeout: 245 seconds]
pskosinski has quit [Ping timeout: 240 seconds]
agjacome has quit [Remote host closed the connection]
devoldmx27 has joined #ruby
pskosinski_ has quit [Client Quit]
Tricon has quit [Quit: Leaving...]
freerobby has joined #ruby
rhys has quit [Quit: Leaving]
jonkri has quit [Quit: jonkri]
devoldmx3 has quit [Ping timeout: 245 seconds]
brennanMKE has quit [Read error: Connection reset by peer]
rbwsam has left #ruby [#ruby]
Tricon has joined #ruby
brennanMKE has joined #ruby
ericmathison has joined #ruby
evenix has joined #ruby
snath has quit [Ping timeout: 246 seconds]
gazarsgo has quit [Quit: gazarsgo]
JDHankle has joined #ruby
apeiros_ has quit [Ping timeout: 245 seconds]
zorg24 has joined #ruby
_honning_ has quit [Ping timeout: 276 seconds]
brisbin has joined #ruby
anderson has quit [Quit: Leaving]
brennanMKE has quit [Ping timeout: 245 seconds]
brisbin has quit [Client Quit]
splittingred has quit [Quit: splittingred]
brisbin has joined #ruby
saarinen has joined #ruby
julweber has joined #ruby
Megtastique has joined #ruby
evenix has quit [Ping timeout: 268 seconds]
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rickmasta has joined #ruby
geggam has quit [Remote host closed the connection]
rickruby has joined #ruby
johnnyfuchs has quit [Remote host closed the connection]
tealmage has joined #ruby
failshell has joined #ruby
huevon has quit [Quit: WeeChat 0.4.1]
Wildhoney has quit [Quit: Wildhoney]
Wildhoney has joined #ruby
tommyvyo has quit [Quit:]
deviantlinux has quit [Quit: Leaving.]
jhn has quit [Ping timeout: 264 seconds]
jonahR has joined #ruby
differentSmoke has quit [Quit: ChatZilla 0.9.90.1 [Firefox 23.0/20130730113002]]
pentameter has quit [Read error: Connection reset by peer]
failshell has quit [Remote host closed the connection]
seich- has quit [Ping timeout: 264 seconds]
milardovich has joined #ruby
snovak has joined #ruby
Bry8Star{T2_ has quit [Remote host closed the connection]
phantummm has quit [Quit: phantummm]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
m8 has quit [Quit: Sto andando via]
Bry8Star{T2 has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
c0rn has joined #ruby
tealmage has quit [Ping timeout: 240 seconds]
rickruby has quit [Remote host closed the connection]
Neener54 has joined #ruby
deviantlinux has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
sjltaylor has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snovak has quit [Ping timeout: 276 seconds]
MrZYX is now known as MrZYX|off
Davey_ is now known as Davey
butblack has quit [Quit: butblack]
vince_prignano has quit [Remote host closed the connection]
vince_prignano has joined #ruby
apeiros has joined #ruby
vince_prignano has quit [Client Quit]
iliketurtles has quit [Quit: zzzzz…..]
vince_prignano has joined #ruby
vince_prignano has quit [Max SendQ exceeded]
rupee has quit [Quit: Leaving]
vince_prignano has joined #ruby
IceyEC has quit [Quit: IceyEC]
<xybre> sparr: open irb and run `if Array.new then; puts "truthy"; else; puts "falsey"; end` and replace `Array.new` with whatever object you want.
stkowski has quit [Quit: stkowski]
mansi has joined #ruby
<xybre> sparr: If you do that, you'll see apeiros is correct, only nil + false will return "falsey".
Megtastique has quit [Quit: Megtastique]
iliketurtles has joined #ruby
vince_prignano has quit [Client Quit]
apeiros has quit [Ping timeout: 276 seconds]
tanema has joined #ruby
v0n has quit [Ping timeout: 264 seconds]
vince_prignano has joined #ruby
jlebrech has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
sparr has quit [Ping timeout: 245 seconds]
pel_daniel has left #ruby [#ruby]
tomzx_mac has joined #ruby
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
devoldmx27 has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
dllama has left #ruby [#ruby]
Megtastique has joined #ruby
tanema has quit [Ping timeout: 276 seconds]
mlpinit has joined #ruby
robscomp_ has quit [Read error: Connection reset by peer]
robscomputer has joined #ruby
Lewix has quit [Remote host closed the connection]
tylersmi_ has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby
vince_prignano has quit [Quit: vince_prignano]
L8D has joined #ruby
<L8D> Where is the documentation on the %*{} things
iamdre has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
kpshek has quit []
Geison_Bequer has quit [Ping timeout: 245 seconds]
milardovich has quit [Read error: Connection reset by peer]
<L8D> Thanks
<L8D> I couldn't find it for the life of me.
<waxjar> note that %i only works in ≥ 2.0
Guest____ has joined #ruby
<L8D> What was their original purpose?
chuck has joined #ruby
snath has joined #ruby
apeiros has joined #ruby
anonymuse has quit [Remote host closed the connection]
emergion has joined #ruby
gstamp has joined #ruby
Guest____ has quit [Client Quit]
<chuck> Is there any way to simplify this code? https://gist.github.com/cmelbye/6236679
<chuck> I find myself having to write nested conditionals like that occasionally and I always wonder if there's a cleaner or shorter way to write it
iamdre has quit [Read error: Connection reset by peer]
<waxjar> the same as today i guess L8D, dunno
<chuck> I could do "if existing_user && existing_user.unclaimed; ...; elsif existing_user; ..." but that's not really any better
<waxjar> whats wrong with that?
Haya has joined #ruby
<chuck> It just doesn't look very good to me
freerobby has quit [Quit: Leaving.]
<waxjar> you can return early: https://gist.github.com/britishtea/6236709
<waxjar> or implement nullobjects
emergion has quit [Ping timeout: 260 seconds]
narcan has joined #ruby
tealmage has joined #ruby
awarner__ has quit [Remote host closed the connection]
tealmage has quit [Remote host closed the connection]
awarner has joined #ruby
l34ch has joined #ruby
mengu has quit [Quit: This computer has gone to sleep]
l34ch has left #ruby [#ruby]
poga has quit [Remote host closed the connection]
hiyosi has joined #ruby
Neener54 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
superscott[8] has joined #ruby
<eka> anyone here knows dragonfly? I have an app that stores image urls… I would like to use DragonFly in rails for those, I have entry.image_url …. the file is not stored locally though
tylersmith has quit [Read error: Connection reset by peer]
tylersmi_ has joined #ruby
<superscott[8]> anybody have any generic guidelines on when to use include vs. extending a Ruby class?
Nisstyre has quit [Ping timeout: 240 seconds]
<eka> superscott[8]: "is a" vs "has a"
<eka> superscott[8]: a car "has a door" etc..
<eka> superscott[8]: an apple "is a" fruit
<superscott[8]> eka, ah, good example. i know what you're saying
<eka> that's the simplest explanation
tylersmi_ has quit [Read error: Connection reset by peer]
<zets> superscott: the other thing to take into account is that you can only have one immediate superclass, whereas you can have multiple mixins
hamakn has joined #ruby
tylersmith has joined #ruby
<zets> I typically lean towards using mixins, less messy if the classes eventually diverge
<superscott[8]> zets: true dat
nucatus has joined #ruby
<eka> zets: superscott[8]: imho mixing doesn't provide identity but a subset of services… (can't describe well sorry)
tylersmi_ has joined #ruby
tylersmith has quit [Read error: Connection reset by peer]
<zets> eka: yeah I know what you mean
<superscott[8]> yeah, i'm with you
tealmage has joined #ruby
seich- has joined #ruby
aalmenar has quit [Ping timeout: 264 seconds]
hamakn has quit [Ping timeout: 256 seconds]
<eka> I like OOP more cause it can describe the problem I'm trying to solve… still trying to gasp on functional though
<eka> "pure functional"
ereslibre has quit [Ping timeout: 264 seconds]
tealmage has quit [Remote host closed the connection]
<superscott[8]> eka which one you working with currently?
<eka> superscott[8]: none… just looking at elixir for fun… love ruby though
marius has joined #ruby
<superscott[8]> yeah word, i was checking that out a bit too. cause of the RR podcast?
<eka> RR?
<superscott[8]> ruby rogues
<eka> ah… no.. cause valim. got the book, also there is a video on peepcode
<superscott[8]> ah word.
<eka> got subscription to peepcode
<eka> so
<superscott[8]> you like it?
<eka> but still, not much time
<eka> if I like what?
nucatus has quit [Ping timeout: 245 seconds]
<superscott[8]> peepcode
kobain_ has joined #ruby
staafl has quit [Ping timeout: 245 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
pjeide has quit [Ping timeout: 256 seconds]
aalmenar has joined #ruby
aalmenar has joined #ruby
ereslibre has joined #ruby
ereslibre has joined #ruby
<zets> superscott: how is RR? I just heard about it a bit ago, been meaning to check it out
<eka> superscott[8]: yes and no… little disappointed… my problem is, most of the ppl there says "if I would do it right I would do it other way" why they don't do it right for peepcode?
brisbin has quit [Read error: Connection reset by peer]
<superscott[8]> zets: majority of episodes are pretty fantastic.
<zets> sweet :D
<superscott[8]> eka: ah =/
rickruby has joined #ruby
kobain has quit [Ping timeout: 245 seconds]
justsee has quit [Ping timeout: 240 seconds]
heftig has quit [Quit: Quitting]
brisbin has joined #ruby
heftig has joined #ruby
ereslibre has quit [Remote host closed the connection]
aalmenar has quit [Remote host closed the connection]
devoldmx has joined #ruby
rickruby has quit [Ping timeout: 264 seconds]
ereslibre has joined #ruby
ereslibre has joined #ruby
aalmenar has joined #ruby
aalmenar has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
tylersmi_ has quit [Read error: Connection reset by peer]
tylersmith has joined #ruby
Wildhoney has quit [Quit: Wildhoney]
Gnubie is now known as Guest41314
YaNakilon has quit [Ping timeout: 256 seconds]
Cyrus has quit [Quit: Cyrus.sleep()]
c0rn has joined #ruby
ehc has quit [Quit: ehc]
colonolGron has quit [Quit: peace]
snovak has joined #ruby
optimusprimem has quit [Ping timeout: 245 seconds]
dankest has joined #ruby
vlad_starkov has joined #ruby
YaNakilon has joined #ruby
mlpinit has quit [Remote host closed the connection]
mlpinit has joined #ruby
ccolorado has left #ruby [#ruby]
mlpinit has quit [Read error: Connection reset by peer]
tabolario has joined #ruby
mlpinit has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
snovak has quit [Ping timeout: 276 seconds]
vlad_starkov has quit [Ping timeout: 268 seconds]
nignaztic has quit [Read error: Connection reset by peer]
tealmage has joined #ruby
llirkaz has joined #ruby
nignaztic has joined #ruby
vince_prignano has joined #ruby
vince_prignano has quit [Max SendQ exceeded]
b00stfr3ak has joined #ruby
b00stfr3ak has joined #ruby
butblack has joined #ruby
vince_prignano has joined #ruby
ner0x has quit [Quit: Leaving]
St_Marx has quit [Ping timeout: 240 seconds]
marius has quit [Quit: -]
predator117 has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
justsee has quit [Changing host]
AndChat|677369 has quit [Remote host closed the connection]
BRMatt has quit [Ping timeout: 245 seconds]
tabolario has quit [Ping timeout: 264 seconds]