apeiros changed the topic of #ruby to: Ruby 2.1.1; 2.0.0-p451; 1.9.3-p545: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Fyyr13_ has joined #ruby
YamakasY_ has quit [Ping timeout: 240 seconds]
snuffeluffegus has joined #ruby
eiei has joined #ruby
<RubyPanther> I like having a little extra delegation, so that things are less coupled
<eiei> So, I am considering moving away from Ruby for a bit and learning Java so I can learn android dev.
<eiei> I started learning ruby a while back, and was going to move onto RoR.
<eiei> But, I am really interested in trying out android dev.
<havenwood> eiei: Why not use Roboto?
<eiei> Is this a bad idea?
<RubyPanther> if I just need the ivar now, but a standard sort of feature request might need a method, then it is better to have the method from the start
<eiei> What is roboto?
Fyyr13_ has quit [Ping timeout: 244 seconds]
<havenwood> eiei: http://ruboto.org/
<havenwood> eiei: you might query in #jruby as well
<RubyPanther> You still need to learn Java to use ruboto
<eiei> wow.
<RubyPanther> At least a little bit
<eiei> Is this legit, aka I could build a full blown app that way just as good as Java?
<RubyPanther> less, obviously. but you're calling java methods from Ruby
<eiei> Sigh...
<eiei> IDK, here is my thing.
<eiei> I feel I understand ruby pretty nicely, of course still have lots to learn still though.
<RubyPanther> eiei: It is legit, you can make real apps, no it is not just as good, it runs slower... of course for a Rubyist the dev time is quicker
<eiei> So, should I take a few months to learn Java and then do SDK thourhg Java?
<RubyPanther> But Java is one of the basic languages, you should probably learn it even if you're not going to try to remember and use it :)
<eiei> Or maybe just stick with ruby and give it a shot through ruboto?
<eiei> RubyPanther: I did do Java in college when I took a CS class.
<RubyPanther> eiei: just give ruboto a try and get your feet wet :)
<eiei> I'm familiar with Java, even built a android app in the class.
<eiei> using the SDK thing.
predator117 has joined #ruby
<RubyPanther> ruboto uses the SDK for you, and connects jruby to it
toastynerd has quit [Remote host closed the connection]
[gmi] has quit [Read error: Connection reset by peer]
<eiei> Well, the big problem I see is with the SDK.
<eiei> I remember it would do everythign in Java.
Rober9393 has joined #ruby
<eiei> android SDK that is.
<RubyPanther> like for me I'm making tablet apps, not really "phone" apps, so there is always enough CPU that I jruby is fast enough and I can't tell the difference
<eiei> Unless I'm confused.
pfg has joined #ruby
<RubyPanther> eiei: with jruby, the ruby interpreter is in java, so everything is java under the hood, but your app code is in Ruby
nateberkopec has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.3]
<havenwood> eiei: the jruby channel is #jruby and its site is http://jruby.org/
<eiei> Right, but lets say I'm using the android SDK thing. I know there was a feature where you could just "add" a button on the screen. And the code would auto be put in for you.
<eiei> Wouldn't that be done in Java though?
<bnagy> although, fair warning, #jruby is not really noob friendly
<bnagy> it's really mostly a project-internal dev channel
<RubyPanther> no, that isn't the SDK that must be some tool it comes with. But no, you write it in Ruby.
sailias has quit [Ping timeout: 240 seconds]
predator217 has quit [Ping timeout: 244 seconds]
<eiei> I'm going to go cook dinner, but IDK.
mojjojo has joined #ruby
<RubyPanther> Honestly if the difference between the code you write and the code that a framework generates isn't clear, you should just write it all in Java the way you learned
<eiei> I'm tempted just to delay things and learn Java again. But I worry I will forget all of ruby then too.
<eiei> Even though both are OOP.
srji_ has joined #ruby
<bnagy> :/
<bnagy> Java is what OOP becomes if you don't guard against overengineering insanity
mercwithamouth has joined #ruby
<bnagy> its main function is as a salutory lesson
<havenwood> <3 JRuby
<RubyPanther> Java was originally intended to be run on special CPUs where the Java bytecode would be like ASM, so it is no surprise that for the uses it has now it is over-engineered
nateberkopec has quit [Ping timeout: 240 seconds]
<bnagy> well I'm all in favour of the JVM
<bnagy> just not Java
mojjojo has quit [Client Quit]
<RubyPanther> well android gives you a different VM, but keeps the Java lol
srji has quit [Ping timeout: 252 seconds]
<eiei> I just want to build an android app is all, and am tempted just to relearn Java to do so, because that is how I was familiar building the last android app.
<eiei> But, that was 2 years ago I think.
<eiei> So, I really need to relearn Java.
mojjojo has joined #ruby
burgess has quit [Quit: ^zzz]
werdnativ has joined #ruby
axsuul has quit [Ping timeout: 264 seconds]
burgess has joined #ruby
matti_ is now known as matti
matti has quit [Changing host]
matti has joined #ruby
newbie1r has joined #ruby
mlpinit has joined #ruby
jwest has quit [Quit: WeeChat 0.4.1]
bbloom has joined #ruby
hiyosi has joined #ruby
lolmaus has quit [Ping timeout: 240 seconds]
joelroa has joined #ruby
oneawayman has quit [Ping timeout: 252 seconds]
hiyosi has quit [Ping timeout: 240 seconds]
S0da has joined #ruby
aspires has joined #ruby
ankushio has joined #ruby
yasushi has joined #ruby
<ankushio> Any recommendations for Comprehensive books on learning Ruby
lw has quit [Ping timeout: 244 seconds]
duggiefresh has quit [Remote host closed the connection]
pskosinski_ has joined #ruby
duggiefresh has joined #ruby
bbloom has quit [Quit: Computer has gone to sleep.]
jjbohn is now known as jjbohn|afk
jwest has joined #ruby
lantis has quit [Ping timeout: 244 seconds]
lw has joined #ruby
yasushi has quit [Ping timeout: 240 seconds]
ndrei has quit [Ping timeout: 265 seconds]
marcdel has quit []
i8igmac has quit [Ping timeout: 244 seconds]
pskosinski has quit [Ping timeout: 265 seconds]
ankushio has quit [Quit: Leaving...]
momigi has joined #ruby
whowantstolivefo has joined #ruby
duggiefresh has quit [Ping timeout: 244 seconds]
tvw has quit []
jjbohn|afk is now known as jjbohn
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Geniack has quit [Disconnected by services]
Geniack_ has joined #ruby
<ddd> The Well-Grounded Rubyist
<ddd> That and the Programming Ruby 1.9/20 book
Sawbones has joined #ruby
cjsarette has joined #ruby
bbloom has joined #ruby
<Nyyx> eiei: java isn't that hard, all you really need to know is how to read their docs
Hanmac1 has joined #ruby
angoragoats has joined #ruby
_lynX has joined #ruby
<ddd> I was in a class for java and found it a bit difficult with the graphics, but beyond that it was *fairly* straight forward
Hanmac has quit [Ping timeout: 240 seconds]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
lyubent has joined #ruby
<centrx> Ja...va...?
<bnagy> no, it's je vais
<centrx> ohhhh
<centrx> merci
<bnagy> prego
peret has joined #ruby
koell has quit [Ping timeout: 240 seconds]
lolmaus has joined #ruby
yubrew has joined #ruby
albedoa has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
HelloWorld has joined #ruby
baroquebobcat has joined #ruby
markalanevans has joined #ruby
BuSerD has joined #ruby
<markalanevans> Hey guys, i have a sinatra app. its littered w/ "require" statements.
<markalanevans> For non gems
<markalanevans> and bundler for gems
<markalanevans> whats a better way to organize file includes?
jjbohn is now known as jjbohn|afk
yubrew has quit [Read error: Operation timed out]
<bnagy> you can require all your stuff in one .rb and then require that
<bnagy> but I don't know anything about bundler
<markalanevans> hm. For example, php has composer
<bnagy> uh.. ok?
<centrx> markalanevans, bundler is good for gem dependency management
<markalanevans> I can't believe there isn't a nice way to manage dependencies in ruby
<markalanevans> Right, but what about the rest of all my classes.
<centrx> markalanevans, What is your goal with this?
<markalanevans> I have a few PHP apps and composer cleans all that up.
<ddd> err? gems do that. and you don't need bundler for that. Bundler just makes specification easier without having to have it all in a gem (and its deps lists)
<centrx> markalanevans, You might be looking for autoload
<bnagy> oh please no
<bnagy> bundler is already ditzy enough without adding autoload
<markalanevans> i'm not talking about gems. ddd. I"m talking about a nice organize way to load all the classess and files that i need for my app to run, outside of gems.
<ddd> wow, first time i've heard autoload advocated
<bnagy> ddd: centrx is tainted by rails
<xybre> like.. "require"?
<ddd> markalanevans use an .each on a Dir.glob
Xeago has quit [Remote host closed the connection]
<centrx> markalanevans, Based on this https://getcomposer.org/doc/00-intro.md#declaring-dependencies I would say this is a Gemfile
<markalanevans> centrx: it works like a gem file for php packages
<bnagy> markalanevans: why not just gemify your app?
<bnagy> just write a gemspec etc.
<markalanevans> but if i have classess or directories with logs of file in them, that i want to load. I can say load all these files in this folder
mikepack has joined #ruby
<bnagy> plus it forces you to write a manifest and all that good stuff
havenwood has quit []
<xybre> "This idea is not new and Composer is strongly inspired by node's npm and ruby's bundler."
<markalanevans> xybre: except that ruby's bundler doesn't load regular files in your app
<ddd> markalanevans https://gist.github.com/ddd/9441426 working examples (this one loads models)
<markalanevans> it just makes it easy to manage ruby gems
<bnagy> hahaah only PHP could be inspired by npm :D
<ddd> morph as needed. put in your config
<xybre> markalanevans: it does if you make your app a gem
<ddd> singular example, sorry
<markalanevans> xybre: so if i made my app a gem, don't i still have to have some file that does all the "loads/requires" etc
jzig has quit []
<ddd> bnagy ahh. makes sense (rails comment). I started with rails, didn't grok it because i didn't know ruby, stopped rails, learned ruby, tried to go back to rails and now I don't really like it. my tricks are non-rails centric
<centrx> markalanevans, So instead of doing: { "require": { "monolog/monolog": "1.2.*" } } you just do: require 'monolog/monolog'
<bnagy> a common pattern is to make the requireable file mygem.rb basically just an empty shell that does all the internal requires
jjbohn|afk is now known as jjbohn
<ddd> hahah see that centrx? centric, get it? bwahahah! Now, bitcoin me 6 bitcoins for the REALLY bad joke
<centrx> You are very wise
<centrx> ddd, Have you heard of Bitcom?
<ddd> yes
<centrx> ddd, Do you like model trains, free lunches, and Danish butter cookies?
<ddd> amazingly, yes to all 3
<xybre> markalanevans: What is your use case? Can I get some more detail?
<centrx> ddd, So join my new channel #bitcom !!
<markalanevans> Ok. Well it sounds like i'm correct, in that there isn't some gem or tool that is the defacto way to load all of the classess/files in my app
mojjojo has quit [Quit: mojjojo]
<centrx> markalanevans, Why do you need a tool for it, you just create a file
<ddd> channel purpose? :)
mikepack has quit [Ping timeout: 252 seconds]
AlSquire has quit [Quit: This computer has gone to sleep]
blackmesa has quit [Ping timeout: 264 seconds]
<xybre> "load all the things" isnt a solution to dependencies. but Rails does do something of the sort.
baroquebobcat has quit [Quit: baroquebobcat]
lw has quit [Quit: s]
<xybre> In any language its a bad idea though.
<markalanevans> centrx: mostly for simplicity. For all the reasons that php's composer exists.
Fyyr13_ has joined #ruby
<centrx> ddd, Evangelizing the new Bitcom Product! We aren't sure what it is yet, but we know who our glorious leader is, Dorian Nakamoto
<ddd> stop trying to apply PHP thinking to ruby
<ddd> centrx hehehe
<markalanevans> ha
<ddd> no, you laugh. i'm being serious
eMBee has left #ruby [#ruby]
<centrx> markalanevans, I don't understand. In Composer, you create a file where you "require" the dependencies. In Ruby, you do the same thing, but you don't need any extra tool to do it.
<centrx> xybre, Rails has its own version of autoload
koell has joined #ruby
<xybre> centrx: right
<xybre> Its nasty in Rails too
pskosinski_ is now known as pskosinski
robustus has quit [Read error: Connection reset by peer]
<markalanevans> Ok. So lets say i'm goign to just have a single file where i define all my includes
<markalanevans> why would i use load vs require
<markalanevans> your example used load
<tongcx> hi guys, in file 'main.rb' i required 'one.rb', and in 'one.rb' i required a module Test, does Test also got poured into global namespace of 'main.rb'?
bw_ has quit [Ping timeout: 264 seconds]
<bnagy> tongcx: if you mean you defined a module Test then yes
intnsity has joined #ruby
Fyyr13_ has quit [Ping timeout: 240 seconds]
intnsity has left #ruby ["Leaving"]
<tongcx> bnagy: that seems insane to me, every module will got poured into global namespace even if it was required by some distant module that I required?
<bnagy> tongcx: require is pretty much like just typing all the source from the required file into the requiring file
aep has quit [Ping timeout: 264 seconds]
<bnagy> tongcx: where would you like them to be namespaced?
<bnagy> most modules manage their own namespaces, if they're written by people that can code
<xybre> markalanevans: require makes sure you only load a file once. load doesnt.
<markalanevans> so why use load?
<xybre> Dont.
<markalanevans> ok
<tongcx> bnagy: something like nodejs seems very good, you have total control
<tongcx> bnagy: things are never poured into global namespace
* bnagy rolls eyes
<bnagy> ok whatever you say
axl_ has joined #ruby
<bufferloss> tongcx, so go back to node.js
<bnagy> how do you get a reference to them them?
shevy has quit [Ping timeout: 240 seconds]
robustus has joined #ruby
nateberkopec has joined #ruby
<bnagy> oh WAIT I guess they have a stub that's available from the global namespace!
carif has joined #ruby
bw_ has joined #ruby
axsuul has joined #ruby
nateberkopec has quit [Read error: No route to host]
<tongcx> bufferloss: no offence, man, just wondering why they designed it so
nateberkopec has joined #ruby
aep has joined #ruby
mojjojo has joined #ruby
<bufferloss> just wondering why you wonder that
<xybre> tongcx: You need to namespace your own objects :)
<bnagy> tongcx: it's just the ruby OO model. Toplevel -> namespaces
<xybre> Node does it that way because JS is so awful about it
<bnagy> you have to have able to get to the Module object from somewhere
<tongcx> bnagy: i c, so the best practice is to put my code under some module and hopefully no other people is using the same name?
<bnagy> IRL 'global namespace' pollution isn't really a problem
<tongcx> bnagy: i c, so the best practice is to put my code under some module and hopefully no other people is using the same name?
<bnagy> yeah if someone else is using the same module name you've got an issue
<xybre> JS tries to put literally everything in global. node needed to do that to build projects of appreciable complexity. Ruby namespaces everything by convention and its very easy to do correctly so its not as much of an issue.
marcdel has joined #ruby
bbloom has quit [Quit: Computer has gone to sleep.]
Sawbones has quit [Remote host closed the connection]
carif has quit [Quit: Ex-Chat]
<xybre> tongcx: If its a gem, you'll know, if its a private app you'll know. So yes.
<tongcx> xybre: i c, makes sense
Sawbones has joined #ruby
nateberkopec has quit [Ping timeout: 269 seconds]
bbloom has joined #ruby
MrJoshua has quit [Quit: MrJoshua]
<xybre> tongcx: I totally see the utility of namespacing files, but since its so ingrained in Ruby development to name everything by hand, its actually rarely an issue.
Axsuul_ has joined #ruby
axsuul has quit [Ping timeout: 264 seconds]
Axsuul_ has quit [Read error: Connection reset by peer]
hiyosi has joined #ruby
axsuul has joined #ruby
xmon has joined #ruby
<xybre> There's some pros and cons to each. The implicit namespacing means you can't *see* it, you have to know it, whereas explicitly you have to see it and know it and can control it.
<bnagy> also, ruby stuff can be spread across many files more easily with this approach
<Radar> tongcx: I doubt that anyone else is going to use the "Tongcx" module if that's what you're asking ;)
<bnagy> not saying there's no downside, but I can implement 5 classes that are part of MyProject in 5 separate files
Sawbones has quit [Ping timeout: 252 seconds]
<Radar> The upside with namespacing in Ruby is that my code won't override your code :)
<bnagy> I wouldn't be totally opposed to require const, fname
<bnagy> but I've just never had a need for it
<Radar> bnagy: Sounds similar to ActiveSupport::AutoLoad?
<Radar> Autoload*
<Radar> autoload Const, filename
<bnagy> orly? sandboxes everything in Const ?
james_d_h has joined #ruby
<Radar> no, it loads that file if it can't find that const
<Radar> Actually it's autoload :Const, filename
<Radar> The code is gnarly
<bnagy> oh, no I mean something that enforces a namespace
<Radar> Oh, that is called "coding standards"
aspires has quit []
shevy has joined #ruby
<xybre> Yeah, even with coding standards it doesn't catch everything.
<bnagy> so all of the required code would have to be accessed by Sandbox::TheirTopNamespace
<xybre> But still, its less than 5% of the cases so I haven't worried about it too much in Ruby.
<bnagy> ditto
<xybre> But I'd still like the possibility.
<bnagy> you can fake it with instance_evaling into a module I think
<bnagy> but it makes me throw up in my mouth
<jhass> What about set_const / remove_const?
mojjojo has quit [Quit: mojjojo]
CorySimmons has joined #ruby
<CorySimmons> Hey guys, what's wrong with this has_method? syntax? http://pastie.org/8899841
tylersmith has quit [Remote host closed the connection]
marcdel has quit [Ping timeout: 240 seconds]
james_d_h has quit [Ping timeout: 264 seconds]
mojjojo has joined #ruby
<CorySimmons> What I'm trying to do is say "if this doesn't have the method node_name, then do this bit of code"
marcdel has joined #ruby
<CorySimmons> New to ruby =)
<jhass> module Sandbox; def self.sandbox mod; const_set mod, Object.const_get mod; Object.remove_const mod; end; Sandbox.sandbox :Whatever
<bnagy> CorySimmons: respond_to?
mesamoo has joined #ruby
j0xf has joined #ruby
<CorySimmons> bnagy: But the syntax looks good?
<bnagy> didn't look
<CorySimmons> I'm just using the wrong method?
<CorySimmons> hehe
<CorySimmons> It's only a couple lines, care to peak?
<j0xf> I'm new to ruby but sure I'll take a look. Why not
aspires has joined #ruby
<CorySimmons> Thanks =)
<bnagy> jhass: uh.. I don't really see what you're getting a
<bnagy> t
<jhass> bnagy: I guess I just didn't follow the initial discussion
newbie1r has quit [Quit: brb]
<bnagy> I'm wondering about a require version that forcibly namespaces everything in the required file
<bnagy> for when you have collisions ( hypothetically )
<xybre> CorySimmons: you probably want ot use object.respond_to?(:method_name)
<jhass> well, require is about files, not about constants in those files
timonv has joined #ruby
<bnagy> once it has been required I don't think you can unscramble your eggs
francisfish has joined #ruby
germsvel has joined #ruby
<bnagy> I think what I have in my head more or less is Sandbox.instance_eval File.read('foo.rb') tbh :/
<xybre> bnagy: Pretty much. Nasty though. And probably slow.
<tongcx> hi guys, say i want to write a module to talk to database in my app, should i write a module with methods initializing and talking to db, or should i write a class and then new it and put it in some namespace in setup code?
<xybre> And there might be side effects.
orangey has joined #ruby
<orangey> hello all!
jjbohn is now known as jjbohn|afk
<bnagy> tongcx: if it needs state it should be a class. DB connections usually do ( address, port or filename or whatever )
<CorySimmons> xybre bnagy: Thanks :)
<tongcx> the state can also be local variable in a module, right?
timonv has quit [Ping timeout: 264 seconds]
mehlah has quit [Quit: Leaving...]
<Radar> uh
<tongcx> bnagy: the difference seems to be do I need more than one connection
<Radar> why
<Radar> would you
<Radar> write your own DB connection code?
<CorySimmons> Thanks guys, works perfect
<Radar> When pg, mysql, etc. already exist?
<tongcx> Radar: no, just some helper function
francisfish has quit [Ping timeout: 265 seconds]
<Radar> tongcx: Use the Sequel library.
<Rober9393> Anyone has a beta invite for Atom editor left ? :-p
<bnagy> tongcx: it's always possible to write code like an idiot, yes
<bnagy> but if it needs state, it should be a class
<tongcx> bnagy: then it new it in setup and put it under some namespace?
Emmanuel_Chanel has quit [Ping timeout: 265 seconds]
<bnagy> I am not looking at your code, nor can I read minds
<bnagy> so I can't answer that question
<tongcx> Radar: sorry, i'm talking to neo4j
bbloom has quit [Quit: Computer has gone to sleep.]
* Radar suddenly finds the carpet more interesting
chrisseaton has quit []
<tongcx> bnagy: i mean if it's a class, then there are two ways to let other parts of app access it, 1. put it under some namespace 2. pass it to everyone who needs it
<tongcx> bnagy: do you think 1 is better?
<Radar> wat
<Radar> Put it under some namespace. This cannot still be up for debate :(
<Radar> Not namespacing your code is careless.
pfg has joined #ruby
j0xf has quit [Quit: Leaving.]
shevy has quit [Ping timeout: 252 seconds]
bbloom has joined #ruby
<tongcx> Radar: yea, alternative is to pass it to a lot of function call
chrisseaton has joined #ruby
<tongcx> Radar: i feel the alternative is too verbose
<tongcx> Radar: but it has less side effects
Emmanuel_Chanel has joined #ruby
shevy has joined #ruby
<Radar> tongcx: you're still thinking with functions, which is nodejs speak
<bnagy> I would normally just do db = MyNotInventedHereConnector.new('localhost:31337') then use db for whatever I need it for
<Radar> +1 bnagy
IceDragon has quit [Quit: Space~~~]
<tongcx> bnagy: yea, how do other parts access db?
<bnagy> they make their own connections
<tongcx> Radar: interesting, there is a neo4j gem, I installed it through pacman
<tongcx> bnagy: aha, i c
<tongcx> bnagy: thanks
BuSerD is now known as BuSerD_zzzz
BuSerD_zzzz is now known as BuSerD
<bnagy> or otherwise I make one object that does ALL the DB work, and have it talk to Queues
<bnagy> if the DB is unthreadsafe or slow or whatever
j0xf has joined #ruby
BuSerD is now known as BuSerD_zzzz
<bnagy> but this is kind of All Been Done
<tongcx> bnagy: that seems very reasonable
yubrew has joined #ruby
<bnagy> IRL most of my DB talkers are totally separate processes
<bnagy> I do mostly distributed stuff
j0xf has quit [Client Quit]
<bnagy> so the Queue model abstracts out well for that
rjk808 has joined #ruby
<bnagy> anyway concurrent DB access is hard. Don't do it yourself, you are guaranteed to mess it up
DrShoggoth has joined #ruby
sski has quit [Remote host closed the connection]
<orangey> Hello all. I can't seem to connect to my local MySQL via socket.. My database seems to be setup correctly, but I can't quite figure out the issue. Here's all of the relevant files: https://gist.github.com/tareko/9441740 ; The database.yml: https://gist.github.com/tareko/9441740#file-database-yml ; The My.cnf https://gist.github.com/tareko/9441740#file-my-cnf
DrShoggoth has quit [Client Quit]
Elico1 has joined #ruby
sski has joined #ruby
<bnagy> orangey: which one is the actual error?
jeregrine has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
<bnagy> uh.. wait .. I don't know mysql but that looks goofy
<bnagy> why are you trying to connect to the .sock file instead of 127.0.0.1:3306 ?
CreativeEmbassy has joined #ruby
<orangey> bnagy: I don't know. How do I switch?
<bnagy> it's not doing some crazy named pipe stuff is it?
<orangey> I couldn't find any configuration help on getting it to connect through the port
<bnagy> I have no idea, there are probably docs for that
<jhass> bnagy: unix sockets are a pretty standard thing
<jhass> orangey: are you sure mysql is running and your user has read and write access to the socket?
segimondu is now known as segmond
sski has quit [Ping timeout: 240 seconds]
<orangey> aha! Fixed the problem: https://gist.github.com/tareko/9441740#file-database-yml-L27 ; Instead of socket: mysql socket path (/var/run/mysqld/mysqld.sock) , it should read: socket: /var/run/mysqld/mysqld.sock
<orangey> how odd
<jhass> oh, you literally had that there?
<jhass> it looked edited for the gist
<bnagy> :)
<orangey> I literally had that there. It's what the default file had.
sentinal8473 has quit [Quit: Textual IRC Client: www.textualapp.com]
Sawbones has joined #ruby
<jhass> was quite clearly a example for me
BuSerD_zzzz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cya]
BuSerD has joined #ruby
xmon has quit [Quit: Leaving]
<bnagy> jhass: is there actually a perf boost for using unix sockets? I haven't seen them IRL for many years ( since local networking gor fixed )
<bnagy> or is it just to get the ACLs on the socket?
<tongcx> hi guys, what does 'attr_accessor' do in under a module, not a class
<orangey> Ok, another question.
<tongcx> is there any usage of that?
<orangey> how do I change the rack_env / rails_env to production?
<jhass> bnagy: I'm not sure how optimized the current kernel is for loopback connections, but in theory there's less network stack overhead. ACLs is a reason too of course
<orangey> not just a shell variable, eh?
werdnativ has quit [Quit: werdnativ]
<orangey> oh, it is..
toastynerd has joined #ruby
<jhass> orangey: btw there's #RubyOnRails for rails questions
<orangey> jhass: I'm guessing ruby =/= rails?
<orangey> This is the problem with not being a proper programmer ; )
<jhass> rails is a framework running on ruby
CorySimmons has left #ruby [#ruby]
<bnagy> tongcx: it would create a reader on anything the module is included into
<tongcx> bnagy: i say, only for mixin purpose
<bnagy> *on instances of any Class the module is included into, to be clear
tylersmith has joined #ruby
<bnagy> attr_* create instance methods. Modules are instances of Module, but they can't be instantiated
<bnagy> so instance methods make no sense for them
jjbohn|afk is now known as jjbohn
axsuul has quit [Ping timeout: 241 seconds]
sski has joined #ruby
<bnagy> this is usually where someone feels compelled to be confusing by pointing out that class / module methods are really instance methods anyway
j0xf has joined #ruby
<bnagy> and it's turtles all the way down
<tongcx> bnagy: right, seems mattr_accessor is rails extension
pu22l3r has joined #ruby
HelloWorld has quit [Quit: Leaving]
sparrovv has quit [Remote host closed the connection]
<bnagy> Rail - making Ruby more insane since 2008!
<shevy> :D
godd2 has joined #ruby
marcdel has quit [Ping timeout: 265 seconds]
<godd2> hello all
Fyyr13_ has joined #ruby
<bnagy> godd2: #rubyonrails
_lynX has quit [Quit: Leaving]
axsuul has joined #ruby
<godd2> bnagy: lol what about it?
<bnagy> unless by some incredible coincidence you're NOT here to talk about rails
<bnagy> cause it seems everyone else is, today
<godd2> lol oh no, Im just chillin.
marcdel has joined #ruby
<godd2> I FINALLY got Ruby to play arbitrary made-up PCM data through FFI on my windows box so I'm takin a break
<bnagy> fine, as long as you're not planning to autoload Chill or bundle install Chill ~>1
<bnagy> ooh windows FFI now we're talking
<godd2> nah my brain is swarming with attach_function :chill, [:uint, :string], :pointer
Hobogrammer_ has joined #ruby
<godd2> I couldn't find any existing Ruby solution to play multiple asynchronous audio streams, so I embarked on doing it myself. I got the base work done, but it's not polished or extensible yet
yfeldblu_ has joined #ruby
shevy has quit [Ping timeout: 240 seconds]
<bnagy> almost nobody works on native windows stuff
chrisseaton has quit []
Fyyr13_ has quit [Ping timeout: 252 seconds]
Hobogrammer has quit [Ping timeout: 252 seconds]
shevy has joined #ruby
<centrx> Win...dows?
<Radar> I'm currently looking out a set right now. Sun's gone down at SFO and so there's not much to see besides more airport.
Mongey has joined #ruby
<Radar> centrx: I think that's what bnagy and godd2 are talking about, anwyay
<godd2> something, something, defenestration
Hanmac has joined #ruby
jrhe has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
Mongey has quit [Client Quit]
<centrx> You guys are a bunch of wise-asses today
<centrx> s/wise-asses/wise-guys
<popl> s/ today//
axsuul has joined #ruby
<centrx> s/bunch/potatoe
yfeldblum has quit [Ping timeout: 264 seconds]
<godd2> s/potatoe/potahto
nateberkopec has joined #ruby
<RubyPanther> if you use autoconf and regular C stuff like Ruby API, apache apr, or glib/Gtk then you can compile on windows without worry or consideration
<jrhe> Is it bad practice to assert that a method returns an array?
<RubyPanther> you plug your nose, push the button, and then it is ready
Hanmac1 has quit [Ping timeout: 240 seconds]
Mongey has joined #ruby
<jrhe> Should I be asserting that it returns something enumerable instead
mojjojo has quit [Quit: mojjojo]
<jhass> jrhe: assert that the method you want to call is there. Or just call it
<bnagy> jrhe: or just ducktype
<RubyPanther> jrhe: you're generally supposed to check with respond_to? :to_ary
<RubyPanther> if it has that that it is explicitly claiming to be some sort of "real" array
Fyyr13_ has joined #ruby
<jrhe> Case in point, I have a method which fetches an array of Course objects using mechanize and scraping. I have a method called Course.all but then I'm not sure which assertions should be in the test for that method.
<jrhe> RubyPanther: I'm not asserting any sort of order on it, it just has to act like an array so I guess :to_ary is what I want.
<RubyPanther> jrhe: if you duck type then the test will survive any refactoring, but a lot of people don't duck type in tests
nateberkopec has quit [Ping timeout: 241 seconds]
DrShoggoth has joined #ruby
<jrhe> RubyPanther: Ducktyping would be your test for respond_to? :to_ary right?
<RubyPanther> yeah
<jrhe> Cheers :)
Sawbones has quit [Remote host closed the connection]
monzie has joined #ruby
<monzie> Hello all
<pontiki> hey folkes
yfeldblu_ has quit [Read error: Connection reset by peer]
Fyyr13_ has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby
Sawbones_ has joined #ruby
ankushio has joined #ruby
<ankushio> Is there any difference b/w a = String.new("hello") and a = String("hello")
evenix has quit [Remote host closed the connection]
thomasxie has joined #ruby
pu22l3r has quit [Remote host closed the connection]
axsuul has quit [Ping timeout: 240 seconds]
shevy has quit [Ping timeout: 240 seconds]
toastynerd has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
lw has joined #ruby
werdnativ has joined #ruby
shevy has joined #ruby
jjbohn is now known as jjbohn|afk
Sawbones_ has quit [Remote host closed the connection]
<jrhe> ankushio: I don't believe there should be. Do you know what they both mean?
<RubyPanther> ankushio: String() will convert
<RubyPanther> >> String.new(1)
<eval-in> RubyPanther => no implicit conversion of Fixnum into String (TypeError) ... (https://eval.in/116234)
<RubyPanther> >> String(1)
<eval-in> RubyPanther => "1" (https://eval.in/116235)
Sawbones has joined #ruby
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
chipotle has joined #ruby
<jrhe> >> Number.new("1")
<eval-in> jrhe => uninitialized constant Number (NameError) ... (https://eval.in/116236)
<jrhe> >> Number("1")
<eval-in> jrhe => undefined method `Number' for main:Object (NoMethodError) ... (https://eval.in/116237)
<ankushio> I understand that the .new class method creates and returns a new object
<ankushio> I was not sure what the String() does
Avahey_ has joined #ruby
<RubyPanther> There isn't Number() but there is Integer() and Float()
<shevy> see how old RubyPanther is
<shevy> he is the only one to remember :)
<ankushio> RubyPanther: Where are these defined?
<ankushio> RubyPanther: are they part of the class definition?
<RubyPanther> ankushio: I'm not sure, I can't get ri to tell me about String() I had to poke it with a stick in irb
<ankushio> RubyPanther: oh, ok
Sawbones has quit [Ping timeout: 252 seconds]
<RubyPanther> but Integer() and Float() are commonly used because they raise an exception on mixed data like "1a" whereas #to_i #to_f will take the 1 and ignore the rest
<RubyPanther> String I don't see the point, except for example in a case statement where you're testing with Integer() or Float()
<ankushio> RubyPanther: ok. I am just curious as to understand "what" exactly are Integer() or Float(). Are they built-in functions or something?
<RubyPanther> yeah, from the Float and Integer classes
mgomezch_ has joined #ruby
<RubyPanther> hpricot has an example of it in a C extension, with Hpricot()
<jhass> Integer() and Float() are methods on Kernel
mgomezch has quit [Ping timeout: 240 seconds]
<godd2> bnagy: Here's the code I've worked on for the past two days if you want to take a gander https://gist.github.com/nicklink483/9442127
<ankushio> jhass: THanks
<ankushio> RubyPanther: Thank you for the examples. It's all so clear now!
yubrew has joined #ruby
diegoviola has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
yfeldblu_ has joined #ruby
thomasxie has quit [Remote host closed the connection]
thomasxie has joined #ruby
jhass is now known as jhass|off
Nyyx has quit [Ping timeout: 244 seconds]
yubrew has quit [Ping timeout: 240 seconds]
ankushio has left #ruby ["Leaving..."]
yfeldblum has quit [Ping timeout: 252 seconds]
yeticry has quit [Quit: leaving]
<shevy> he is a helpful panther after all
yeticry has joined #ruby
j0xf has quit [Quit: Leaving.]
<jrhe> Damn ankushio has left already. Was going to send http://devblog.avdi.org/2012/05/07/a-ruby-conversion-idiom/
not_a_guest has quit [Quit: Connection closed for inactivity]
Hanmac1 has joined #ruby
eka has joined #ruby
Hanmac has quit [Ping timeout: 244 seconds]
<jrhe> Is there an rspec matcher for checking if an array of things matches a condition? I wan't to check an entire array of objects are of a given type.
<jrhe> Perhaps it would be more appropriate to just check one.
axsuul has joined #ruby
Nyyx has joined #ruby
jjbohn|afk is now known as jjbohn
senayar_ has joined #ruby
<werdnativ> jrhe: array.all? { |i| i.is_a? Type }.should be_true
fluxxed has quit [Ping timeout: 245 seconds]
<jrhe> werdnativ: Nice way of doing that with the expect syntax?
<werdnativ> yeah, you can do that too.
senayar has quit [Ping timeout: 264 seconds]
<jrhe> werdnativ: Ignore me. Only just realised how you did it. I thought you were looping and checking each rather than using all?
<werdnativ> yeah, all? just reduces the array to a true or false...
<jrhe> and an array of trues is true?
<shevy> all or nothing!
<werdnativ> jrhe: not exactly. It depends what you put in the block. It should return a boolean for each item. [true, true].all? { |i| i.is_a? Fixnum } #=> false
BuSerD has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eka has quit [Quit: Textual IRC Client: www.textualapp.com]
<jrhe> It doesn't seem to be working
<jrhe> expect(courses.all? { |i| i.is_a? Course }).to be_true
<jrhe> courses is [Course.new]
<jrhe> undefined method `true?' for true:TrueClass
alexju has joined #ruby
<werdnativ> ah, sorry == true
<jrhe> I guess I can reduce on the array with :&
<werdnativ> or ` be true`
<jrhe> How is that different from be_true ? Sorry I'm a total rspec noob. its stuff like this which has been putting me off learning it (that and laziness)
<werdnativ> jrhe: be_true tries to do `true.true?` which is not a thing.
<werdnativ> true is a singleton TrueClass
<werdnativ> it doesn't have a .true? method which is what rspec's be_true translates to.
<jrhe> Ahh right. So be_true is checking for True. be true is checking for truthiness?
Hanmac has joined #ruby
<werdnativ> however `x should be true` compares object identity.
<werdnativ> object1 should be object1 # same instance
<werdnativ> object1 should == object2 # compares identity
<werdnativ> sorry, * compares value
<werdnativ> "be" compares identity, "==" or "eq" compares value.
<jrhe> sweet, gotcha. Cheers for your help!
Hanmac1 has quit [Ping timeout: 240 seconds]
<werdnativ> "be_something" calls ".something?" and sees if it's true.
<werdnativ> no prob.
thomasxie has quit [Remote host closed the connection]
thomasxie has joined #ruby
bbloom has quit [Quit: Computer has gone to sleep.]
cover_ has joined #ruby
Deele has quit [Ping timeout: 240 seconds]
axl_ has joined #ruby
_mtr has joined #ruby
nateberkopec has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
cover has quit [Ping timeout: 265 seconds]
morenoh149 has quit [Ping timeout: 244 seconds]
aspires has quit []
axsuul has quit [Read error: Connection reset by peer]
nateberkopec has quit [Ping timeout: 240 seconds]
foredoomed has joined #ruby
james_d_h has joined #ruby
timonv has joined #ruby
senayar_ has quit [Remote host closed the connection]
Jdubs has joined #ruby
jjbohn is now known as jjbohn|afk
zorak has joined #ruby
ctp has quit [Ping timeout: 244 seconds]
bogeyd6 has joined #ruby
thomasxie has quit [Ping timeout: 264 seconds]
timonv has quit [Ping timeout: 240 seconds]
Raboo has quit [Ping timeout: 240 seconds]
Hanmac1 has joined #ruby
mgorbach has quit [Max SendQ exceeded]
mgorbach has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
markisonfire has quit [Quit: markisonfire]
Jamo_ is now known as Jamo
TripTastic has joined #ruby
germsvel has quit []
JBreit has quit [Ping timeout: 252 seconds]
jjbohn|afk is now known as jjbohn
TripTastic is now known as JBreit
yubrew has joined #ruby
cover_ has quit [Changing host]
cover_ has joined #ruby
francisfish has joined #ruby
cover_ is now known as cover__
cover__ has quit [Quit: Gone]
cover has joined #ruby
NicholasFlamel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nateberkopec has joined #ruby
werdnativ has quit [Quit: werdnativ]
yubrew has quit [Ping timeout: 240 seconds]
mlpinit has quit [Remote host closed the connection]
Rober9393 has quit [Quit: Lingo - http://www.lingoirc.com]
pwh_ has joined #ruby
francisfish has quit [Ping timeout: 252 seconds]
werdnativ has joined #ruby
pwh has quit [Ping timeout: 244 seconds]
monzie has quit [Ping timeout: 265 seconds]
browndawg has joined #ruby
absolutezeroff has quit [Remote host closed the connection]
_mtr has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jjbohn is now known as jjbohn|afk
aspires has joined #ruby
keen_____ has joined #ruby
jetblack_ has joined #ruby
pskosinski has quit [Quit: Til rivido Idisti!]
keen____ has quit [Ping timeout: 240 seconds]
michael_lee has quit [Quit: Ex-Chat]
mois3x has quit [Quit: mois3x]
jetblack has quit [Read error: Operation timed out]
radic has joined #ruby
cjsarette has quit [Ping timeout: 245 seconds]
radic_ has quit [Ping timeout: 240 seconds]
cjsarette has joined #ruby
bodie_ has left #ruby ["Leaving"]
jeregrine has quit [Quit: Connection closed for inactivity]
Solnse has quit [Quit: Leaving.]
cover has quit [Remote host closed the connection]
Fyyr13_ has joined #ruby
CreativeEmbassy has joined #ruby
aspires has quit []
jjbohn|afk is now known as jjbohn
jjbohn has quit [Quit: Leaving...]
cloud|nix has joined #ruby
bigmac has joined #ruby
gener1c has quit [Disconnected by services]
gener1c_ has joined #ruby
bigmac is now known as i8igmac
UebaUobaUba has joined #ruby
whowantstolivefo has quit [Ping timeout: 264 seconds]
evenix has joined #ruby
angoragoats has quit [Quit: angoragoats]
braincrash has quit [Quit: bye bye]
<i8igmac> can you run a system application from irb, if that application ask you to type (YES or NO)....
<i8igmac> can this be done from ruby?
mary5030 has joined #ruby
redlines has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Ping timeout: 244 seconds]
redlines has joined #ruby
<i8igmac> IO.popen("rm /file")
marcdel has quit []
<i8igmac> rm: remove write-protected regular empty file `/file'? (Yes or no)
mlpinit has joined #ruby
thomasxie has joined #ruby
<i8igmac> maybe i need stdin or something
braincrash has joined #ruby
marcdel has joined #ruby
mlpinit has quit [Ping timeout: 240 seconds]
cjsarette has quit [Ping timeout: 245 seconds]
cjsarette has joined #ruby
whomp has joined #ruby
eiei has quit [Quit: Page closed]
cjsarette has quit [Ping timeout: 245 seconds]
Mongey has quit [Quit: Mongey]
cjsarette has joined #ruby
<centrx> i8igmac, You want to pipe in something to the stdin of the process
<centrx> i8igmac, Open3 might be useful (stdlib)
<i8igmac> i found a working example
<i8igmac> IO.popen("ruby input.rb > log", "r+") {|io| puts io.write("here is some data")}
sski has quit [Remote host closed the connection]
<i8igmac> but how would i read the io after i write
forced_request has quit [Read error: Connection reset by peer]
<i8igmac> IO.popen("ruby input.rb > input", "r+") {|io| puts io.read}
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
marcdel has quit []
cjsarette has quit [Ping timeout: 245 seconds]
marcdel has joined #ruby
Hanmac1 has quit [Ping timeout: 252 seconds]
yubrew has joined #ruby
nateberkopec has quit [Quit: Leaving...]
mesamoo has quit [Excess Flood]
mesamoo has joined #ruby
Hobogrammer_ has quit [Quit: WeeChat 0.4.3]
cjsarette has joined #ruby
whomp has quit [Ping timeout: 252 seconds]
Hobogrammer has joined #ruby
crystal77 has quit [Quit: Computer has gone to sleep.]
yubrew has quit [Ping timeout: 244 seconds]
geggam has quit [Ping timeout: 244 seconds]
meatherly has joined #ruby
dapz has joined #ruby
JBreit has quit [Excess Flood]
gtech has joined #ruby
gtech_ has quit [Remote host closed the connection]
kyle___ has joined #ruby
camt has quit [Remote host closed the connection]
JBreit has joined #ruby
kyle__ has quit [Write error: Broken pipe]
circuit has quit [Write error: Broken pipe]
mikepack has joined #ruby
Vovko has joined #ruby
thomasxie has quit [Ping timeout: 240 seconds]
agarie has quit [Quit: Leaving...]
browndawg has left #ruby [#ruby]
yacks has joined #ruby
godd2 has quit [Ping timeout: 245 seconds]
cjsarette has quit [Ping timeout: 245 seconds]
fgo has joined #ruby
Vovko has quit [Ping timeout: 265 seconds]
cjsarette has joined #ruby
cjsarette has quit [Excess Flood]
cjsarette has joined #ruby
crystal77 has joined #ruby
diegovio1 has joined #ruby
michael_lee has joined #ruby
weaksauce has joined #ruby
matchaw_ has joined #ruby
cjsarette has quit [Ping timeout: 245 seconds]
stephenmac7_ has joined #ruby
cjsarette has joined #ruby
montyboy has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
alexju has quit [Remote host closed the connection]
xibalba_ has joined #ruby
i8igmac has quit [Ping timeout: 265 seconds]
Fyyr13_ has quit [Remote host closed the connection]
cjsarette has quit [Ping timeout: 245 seconds]
The_Doctor has joined #ruby
cjsarette has joined #ruby
crystal77 has quit [Quit: Computer has gone to sleep.]
bigmac has joined #ruby
bigmac is now known as i8igmac
closures999 has joined #ruby
closures999 has quit [Remote host closed the connection]
Oog has joined #ruby
<Oog> im writing a script that runs every hours and for each fo my users based on their timezone when it is midnight int heir timezone it does stuff
<Oog> im having trouble figuring out how based on the current time i figure out what gmt offset is currently midnight
<Oog> it seems the gmt offsets go from -11 to +13 but that is 25 hours how is that possible
NicholasFlamel has joined #ruby
timonv has joined #ruby
morenoh149 has joined #ruby
<weaksauce> not sure about that but the gmt offsets are def -12 to +12
<RubyPanther> Oog: Dayling saving time
<Oog> im seeing samoa is +13
<weaksauce> yeah that's gotta be it
ValicekB has quit [Read error: Operation timed out]
cjsarette has quit [Ping timeout: 245 seconds]
<Oog> look on the left
lyubent has quit [Quit: Leaving.]
<Oog> llol there is a +14
<Oog> line islands...
<Oog> very left right below center of map
<RubyPanther> You shouldn't even be adding up the hours to get 25, all you have to do is figure out the local time, round, check if it is 0
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cjsarette has joined #ruby
<Oog> i dont want to loop through every user in the db though right?
jetblack has joined #ruby
<weaksauce> oh wow
<Oog> i store the gmt offset in teh timezone field of each user
<weaksauce> never would have guessed that
<RubyPanther> You can use date/time math in SQL, it is part of the language
diegoviola is now known as Guest59671
<Oog> ah
<Oog> or i just realized i could loop through the timezones
<Oog> and if it is midnight local ime query for thos eusers
<Oog> thats what ill do
<Oog> 25 timezone calculations will be fast
<weaksauce> so what is everyone's preference on version managing?
<RubyPanther> if you're using postgres, you can make columns that are timestamp with time zone, and it is pretty easy. You don't even have to calculate
morenoh149 has quit [Ping timeout: 240 seconds]
timonv has quit [Ping timeout: 240 seconds]
<weaksauce> I use rvm + bundler but how is rbenv?
<weaksauce> + bundler
<RubyPanther> weaksauce: (rbenv >= chruby >= rvm) + bundler
<Oog> RubyPanther: i dont want to mess with the db - i'm storing the timezone as a string right now
<Oog> probably not the best
<RubyPanther> Oog: You can give the zone to the db as a string also
<weaksauce> any reason RubyPanther? link for the weary ruby traveler?
jetblack_ has quit [Ping timeout: 265 seconds]
rjk808 has quit []
<Oog> hhmm ok ill look at it
<RubyPanther> weaksauce: rvm is out of fashion for various reasons, rbenv uses "shims" that hand off to the correct program, chruby munges your PATH. They all work.
<RubyPanther> some people hate shims (they're just short scripts, I dunno why) some people don't like their PATH munged
<weaksauce> i see. do you use any of the rbenv add ons that make it use bundler by default or do you just relegate yourself to use bundle exec ruby every time
<weaksauce> or am I off base about hta
<weaksauce> that*
<RubyPanther> weaksauce: I don't use any addons, and I don't have to run bundle exec either, because the apps know to run their Bundle.require stuff
hello has joined #ruby
<weaksauce> is rails one of those?
<RubyPanther> well, I do use ruby-build for installation
<weaksauce> oh
<RubyPanther> yeah, rails works transparently
Hanmac has joined #ruby
fgo has quit [Remote host closed the connection]
<RubyPanther> it was only like, a few months when bundler first came out that you had to do the bundle exec stuff
NicholasFlamel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<weaksauce> that's good to know
<weaksauce> I will try to migrate over to the good stuff. I am a little irritated with rvm not letting me script it.
weaksauce has left #ruby [#ruby]
fgo has joined #ruby
Hanmac is now known as 7JTAAI9OQ
Hanmac has joined #ruby
ScalaClient has joined #ruby
Oog is now known as 1JTAANIGS
mlpinit has joined #ruby
mlpinit has quit [Ping timeout: 244 seconds]
Hanmac has quit [Ping timeout: 244 seconds]
george2 has quit [Excess Flood]
Beoran_ has quit [Excess Flood]
Guest59671 has quit [Quit: WeeChat 0.4.3]
xibalba has quit [Excess Flood]
xibalba_ is now known as xibalba
xibalba has quit [Changing host]
xibalba has joined #ruby
Beoran_ has joined #ruby
hello has quit [Remote host closed the connection]
hello has joined #ruby
gnephiak has joined #ruby
yarou has quit [Excess Flood]
danshult_ has quit [Excess Flood]
kennym has quit [Excess Flood]
stephenmac7 has quit [Write error: Connection timed out]
UebaUobaUba has quit [Write error: Connection reset by peer]
matchaw has quit [Write error: Connection timed out]
Jdubs has quit [Write error: Broken pipe]
zorak has quit [Excess Flood]
george2 has joined #ruby
yarou_ has joined #ruby
zorak_ has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
machuga has quit [Excess Flood]
machuga has joined #ruby
i8igmac has quit [Ping timeout: 265 seconds]
kennym1 has joined #ruby
danshultz has joined #ruby
mikepack has quit [Remote host closed the connection]
nateberkopec has joined #ruby
Adran has quit [Quit: Este é o fim.]
nateberkopec has quit [Ping timeout: 240 seconds]
mary5030 has quit [Remote host closed the connection]
burgess has quit [Quit: ^zzz]
pu22l3r has joined #ruby
yubrew has joined #ruby
ValicekB_ has joined #ruby
decoponio has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
orangey has left #ruby [#ruby]
The_Doctor is now known as Adran
weaksauce has joined #ruby
Dreamer3 has quit [Ping timeout: 252 seconds]
Fyyr13_ has joined #ruby
diegovio1 has quit [Quit: WeeChat 0.4.3]
ValicekB_ is now known as ValicekB
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
camt has joined #ruby
pu22l3r has quit [Remote host closed the connection]
Fyyr13__ has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
dapz has quit [Ping timeout: 264 seconds]
<1JTAANIGS> Sun, 09 Mar 2014 01:00:00 -0500 should == Sun, 09 Mar 2014 00:00:00 GYT -04:00 right?
Fyyr13__ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
<tongcx> hi guys, i have a script and i want to use 'irb' and just copy paste that script to irb console
Fyyr13_ has quit [Read error: Connection reset by peer]
<tongcx> then i can play with things
<tongcx> is there a easier way than copy paste?
Fyyr13_ has joined #ruby
<centrx> Do load 'filename'
Dreamer3 has joined #ruby
bufferloss has left #ruby ["Leaving"]
<tongcx> centrx: thanks
francisfish has joined #ruby
gigs has joined #ruby
circuit has joined #ruby
<tongcx> centrx: what's diff require vs load vs include?
jack_rabbit has quit [Quit: SIGSEGV (core dumped)]
<mnemon> 1JTAANIGS: -5 01:00 = -4 02:00
<centrx> tongcx, require will look in your LOAD_PATH, and will not load the file again if it iwas already loaded
toastynerd has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13__ has joined #ruby
<centrx> tongcx, include is to include modules within a class, completely different
<tongcx> centrx: i c, thanks
Fyyr13__ has quit [Read error: Connection reset by peer]
<hello> Howdy
kitak has joined #ruby
Fyyr13_ has joined #ruby
evenix has quit [Remote host closed the connection]
<tongcx> centrx: if i have 'a=5' in some a.rb, how could i do 'irb a.rb' and then stop at prompt with variable 'a' exist and equal 5?
evenix has joined #ruby
emergion has joined #ruby
francisfish has quit [Ping timeout: 240 seconds]
gigs is now known as _gigs_
Hanmac has joined #ruby
Avahey_ has quit [Quit: Connection closed for inactivity]
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13__ has joined #ruby
amclain has quit [Quit: Leaving]
<centrx> tongcx, "stop at prompt with variable" ?
<centrx> tongcx, The variablesin the file should be @instance_variables
meatherly has quit [Remote host closed the connection]
Fyyr13__ has quit [Read error: Connection reset by peer]
<tongcx> centrx: i would like sth like literally run a.rb in irb
Fyyr13_ has joined #ruby
<tongcx> centrx: like line by line
meatherly has joined #ruby
<tongcx> centrx: then i can start typing stuff at the end of running that script
7JTAAI9OQ has quit [Ping timeout: 264 seconds]
<tongcx> centrx: like python -i
fgo has quit [Remote host closed the connection]
Fyyr13__ has joined #ruby
bricker has quit [Quit: leaving]
evenix has quit [Ping timeout: 265 seconds]
<centrx> tongcx, Yeah I don't know, maybe pry can do it
<centrx> tongcx, pry is an alternative to irb
NicholasFlamel has joined #ruby
dkamioka has joined #ruby
emergion has quit [Ping timeout: 260 seconds]
Fyyr13___ has joined #ruby
Celm has joined #ruby
bbloom has joined #ruby
meatherly has quit [Ping timeout: 252 seconds]
skkeeper has quit [Ping timeout: 246 seconds]
Fyyr13_ has quit [Ping timeout: 264 seconds]
Fyyr13___ has quit [Read error: Connection reset by peer]
<tongcx> centrx: i c, thanks a lot
Fyyr13_ has joined #ruby
evenix has joined #ruby
Fyyr13__ has quit [Ping timeout: 264 seconds]
pfg has joined #ruby
<centrx> tongcx, If you do: echo "a = 5" | irb
morenoh149 has joined #ruby
<ryanf> pry does have that feature for some reason
<centrx> tongcx, It will run it, but irb exits, so that might also be another starting point
NicholasFlamel has quit [Ping timeout: 240 seconds]
<ryanf> tbh I kind of feel like it's bloat, but it's there
Fyyr13__ has joined #ruby
cjsarette has quit [Ping timeout: 245 seconds]
<ryanf> oh nvm, it's not released yet. but you can run "pry file.rb" to go through the script line by line and dump you into a console if there's an error
etqqkoiflwhb has joined #ruby
<ryanf> and if you make the last line of the file "binding.pry", it will do the rest of what you wanted
Fyyr13___ has joined #ruby
m104 has joined #ruby
cjsarette has joined #ruby
skkeeper has joined #ruby
Fyyr13_ has quit [Ping timeout: 264 seconds]
duggiefresh has joined #ruby
etqqkoiflwhb has quit [Remote host closed the connection]
Fyyr13__ has quit [Ping timeout: 264 seconds]
etqqkoiflwhb has joined #ruby
craigp has joined #ruby
invinceable has joined #ruby
werdnativ has quit [Quit: werdnativ]
Fyyr13___ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
Fyyr13__ has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
hello has quit [Quit: Leaving]
duggiefresh has quit [Remote host closed the connection]
koderok has joined #ruby
Fyyr13__ has quit [Read error: Connection reset by peer]
endash has quit [Read error: No route to host]
duggiefresh has joined #ruby
Fyyr13_ has joined #ruby
jjbohn has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
1JTAANIGS has quit []
Fyyr13_ has joined #ruby
endash has joined #ruby
etqqkoiflwhb has left #ruby [#ruby]
toastynerd has quit [Remote host closed the connection]
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
duggiefresh has quit [Ping timeout: 240 seconds]
jjbohn has quit [Ping timeout: 240 seconds]
browndawg has joined #ruby
dapz has joined #ruby
etqqkoiflwhb has joined #ruby
browndawg has quit [Client Quit]
Fyyr13_ has quit [Read error: Connection reset by peer]
zz_jrhorn424 has quit [Quit: ZNC - http://znc.in]
Fyyr13_ has joined #ruby
dexter_ has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
cjsarette has quit [Ping timeout: 245 seconds]
Fyyr13_ has joined #ruby
zz_jrhorn424 has joined #ruby
mlpinit has joined #ruby
Fyyr13__ has joined #ruby
lxsameer has joined #ruby
nateberkopec has joined #ruby
Fyyr13__ has quit [Read error: Connection reset by peer]
Fyyr13__ has joined #ruby
dkamioka has quit [Ping timeout: 240 seconds]
cjsarette has joined #ruby
kobain has quit []
Fyyr13_ has quit [Ping timeout: 264 seconds]
mlpinit has quit [Ping timeout: 244 seconds]
Fyyr13_ has joined #ruby
fgo has joined #ruby
yubrew has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
Fyyr13__ has quit [Ping timeout: 264 seconds]
lolmaus has quit [Quit: No Ping reply in 180 seconds.]
lolmaus has joined #ruby
Fyyr13__ has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
Fyyr13__ has quit [Read error: Connection reset by peer]
cjsarette has quit [Ping timeout: 245 seconds]
Fyyr13__ has joined #ruby
Fyyr13_ has quit [Ping timeout: 264 seconds]
fgo has quit [Ping timeout: 264 seconds]
axsuul has joined #ruby
yarou_ has quit [Remote host closed the connection]
tesuji has joined #ruby
Fyyr13__ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
Fyyr13__ has joined #ruby
cjsarette has joined #ruby
petunkina has quit [Remote host closed the connection]
Fyyr13___ has joined #ruby
Glyphik has quit []
Fyyr13_ has quit [Ping timeout: 264 seconds]
Fyyr13_ has joined #ruby
Fyyr13___ has quit [Read error: Connection reset by peer]
Fyyr13__ has quit [Ping timeout: 264 seconds]
cjsarette has quit [Ping timeout: 245 seconds]
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
jdjd has joined #ruby
jdjd_ has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
cjsarette has joined #ruby
eieie has joined #ruby
<eieie> hello?
Hanmac has quit [Ping timeout: 240 seconds]
<eieie> Anyone in here do android dev?
absolutezeroff has joined #ruby
Fyyr13__ has joined #ruby
inversesquarelaw has quit [Ping timeout: 244 seconds]
CorySimmons has joined #ruby
Fyyr13__ has quit [Read error: Connection reset by peer]
jdjd has quit [Ping timeout: 245 seconds]
Celm has quit [Remote host closed the connection]
Fyyr13__ has joined #ruby
<centrx> Not I
jdjd_ has quit [Ping timeout: 245 seconds]
Fyyr13_ has quit [Ping timeout: 264 seconds]
Fyyr13__ has quit [Read error: Connection reset by peer]
Celm has joined #ruby
Fyyr13_ has joined #ruby
axl_ has quit [Quit: axl_]
tylersmith has quit []
Fyyr13_ has quit [Read error: Connection reset by peer]
CorySimmons has quit [Ping timeout: 240 seconds]
Celm has quit [Remote host closed the connection]
tylersmith has joined #ruby
Fyyr13_ has joined #ruby
phansch has joined #ruby
tylersmith has quit [Remote host closed the connection]
Hanmac has joined #ruby
ikaros has joined #ruby
dkamioka has joined #ruby
Celm has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
CreativeEmbassy has joined #ruby
eieie has quit [Quit: Page closed]
tylersmith has joined #ruby
Maitiu has quit [Read error: Connection reset by peer]
Fyyr13__ has joined #ruby
CreativeEmbassy has quit [Client Quit]
Fyyr13__ has quit [Read error: Connection reset by peer]
Fyyr13__ has joined #ruby
Fyyr13_ has quit [Ping timeout: 264 seconds]
Fyyr13__ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
Maitiu has joined #ruby
Fyyr13__ has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
circuit has quit [Quit: Lost terminal]
etqqkoiflwhb has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
niklasb has quit [Ping timeout: 265 seconds]
Fyyr13_ has quit [Read error: Connection reset by peer]
nadirvardar has joined #ruby
Fyyr13_ has joined #ruby
Fyyr13__ has quit [Ping timeout: 264 seconds]
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
recurrence has joined #ruby
<markalanevans> How can i loop through an array of hashes an delete each hash until a certain condition is met.
<markalanevans> resulting in a new / modified array where i have the first element starting with the condition I require.
yasushi has joined #ruby
<markalanevans> Is there a fancy array block method I can use to do this?
Fyyr13__ has joined #ruby
kewubenduben has joined #ruby
<centrx> Presumably
<markalanevans> o snap. its like they knew i would need that
<markalanevans> tnx!
Fyyr13__ has quit [Read error: Connection reset by peer]
Fyyr13__ has joined #ruby
toastynerd has joined #ruby
Fyyr13_ has quit [Ping timeout: 244 seconds]
Fyyr13__ has quit [Read error: Connection reset by peer]
Overlordz has quit [Read error: Operation timed out]
lxsameer has quit [Ping timeout: 264 seconds]
Fyyr13_ has joined #ruby
jrhe has quit [Quit: Connection closed for inactivity]
timonv has joined #ruby
dkamioka has quit [Ping timeout: 265 seconds]
browndawg has joined #ruby
dexter_ has quit [Ping timeout: 240 seconds]
dexter_ has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
lw has quit [Quit: s]
timonv has quit [Ping timeout: 265 seconds]
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
niklasb has joined #ruby
sigurding has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13__ has joined #ruby
arubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yubrew has joined #ruby
lxsameer has joined #ruby
Fyyr13__ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
mlpinit has joined #ruby
<jle`> markalanevans: they knew
Overlordz has joined #ruby
Fyyr13__ has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
Fyyr13__ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
yubrew has quit [Ping timeout: 265 seconds]
<markalanevans> Ok. So i'm trying to do a comparison
<markalanevans> if product[:affiliate_network_id] == 8
<markalanevans> product[:affiliate_network_id] is a FixNum
<markalanevans> but the comparison is not evaluating to true.
<markalanevans> Why not?
Fyyr13_ has quit [Read error: Connection reset by peer]
<markalanevans> And it does = 8
mlpinit has quit [Ping timeout: 240 seconds]
Fyyr13_ has joined #ruby
zorak_ has quit [Ping timeout: 240 seconds]
Celm has quit [Remote host closed the connection]
fgo has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
Fyyr13__ has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
toastynerd has quit [Remote host closed the connection]
S0da has quit [Remote host closed the connection]
Fyyr13__ has quit [Read error: Connection reset by peer]
<popl> markalanevans: Paste your code to the pastebin URL in the topic.
Fyyr13_ has joined #ruby
inversesquarelaw has joined #ruby
NicholasFlamel has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
Fyyr13__ has joined #ruby
<Hanmac> markalanevans: are you 1000% sure that product[:affiliate_network_id] is a fixnum? "8" and 8 are not the same in ruby
<markalanevans> popl: in my case the first elemen in the array has an affiliate_network_id of 8
chris_thomson has quit [Quit: Zzz...]
<popl> that doesn't help me
<popl> where is product[:affiliate_network_id] assigned?
toastynerd has joined #ruby
Fyyr13__ has quit [Read error: Connection reset by peer]
Fyyr13__ has joined #ruby
<markalanevans> popl: i updated the gist
marcdel_ has joined #ruby
<markalanevans> popl: http://pastie.org/8900271
<markalanevans> that is the log output
Fyyr13_ has quit [Ping timeout: 265 seconds]
marcdel has quit [Ping timeout: 264 seconds]
nouitfvf_ has quit [Ping timeout: 240 seconds]
<markalanevans> As you can see the first value it spits out is an 8
<markalanevans> its class is FixNum
<markalanevans> but it drops into the "Match" code block
<popl> ok
Fyyr13_ has joined #ruby
Fyyr13__ has quit [Read error: Connection reset by peer]
<popl> because it matches
<popl> that is, you're testing for inequality
<markalanevans> yea.
dkamioka has joined #ruby
<centrx> >> 8 != 8
<eval-in> centrx => false (https://eval.in/116277)
<popl> so it's not inequal to 8, so the program flows to the else branch
Fyyr13_ has quit [Read error: Connection reset by peer]
<popl> It's doing what you told it to do.
<markalanevans> gonna check somethign
<markalanevans> one sec
Fyyr13_ has joined #ruby
<markalanevans> I think i see whats going on
Fyyr13_ has quit [Read error: Connection reset by peer]
dkamioka_ has joined #ruby
evenix_ has joined #ruby
<centrx> >> "==" == "!="
<eval-in> centrx => false (https://eval.in/116278)
Fyyr13_ has joined #ruby
recurrence has quit [Quit: Textual IRC Client: www.textualapp.com]
yasushi has quit [Remote host closed the connection]
<popl> markalanevans: what's that?
<n88_> whats the best way to deal with an object i'm saving to the database that has one of its attributes as a hash
Fyyr13_ has quit [Read error: Connection reset by peer]
<n88_> mysql
ikaros has quit [Quit: Ex-Chat]
Fyyr13_ has joined #ruby
<craigp> n88_: serialize to yaml?
<craigp> or switch to postgres :P
<n88_> switching to postgres is an option
<n88_> hstore ?
evenix has quit [Ping timeout: 244 seconds]
kate_r has joined #ruby
<craigp> yeah
<craigp> just as easily serialize to json or yaml and store it like that
dkamioka has quit [Ping timeout: 264 seconds]
<craigp> assuming you don't need to query it
<n88_> well
<n88_> i actually won't be query'ing that attribute now that i think about it
Fyyr13__ has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
koderok has quit [Ping timeout: 265 seconds]
CorySimmons has joined #ruby
toastynerd has quit [Remote host closed the connection]
Fyyr13__ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
m104 has quit [Quit: brb]
Fyyr13_ has quit [Read error: Connection reset by peer]
dapz has quit [Quit: Textual IRC Client: www.textualapp.com]
Fyyr13_ has joined #ruby
francisfish has joined #ruby
<markalanevans> popl: so it seems that what is happen, is that in that drop while block
<markalanevans> In the case where the value != 8
<markalanevans> i have a return false
phansch has quit [Quit: WeeChat 0.4.2]
CorySimmons has quit [Ping timeout: 265 seconds]
<markalanevans> but what is happening, is that the function that contains this drop_while block is actually returning, rather than the block just ending
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
<markalanevans> Does that make sense
dkamioka_ has quit [Ping timeout: 264 seconds]
zachallett has joined #ruby
<n88_> craigp: so if i serialize the JSON to mysql
<n88_> when i'm pulling it back out will it still preserve the key value relationship
<n88_> or will it just be a text blob
<centrx> markalanevans, Yes, you need to "next" in a block
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
<centrx> n88_, It will be a JSON string that needs to be parsed with JSON.parse
<n88_> ok, easy enough
<centrx> n88_, What ORM are you using?
<n88_> eventually it's going to be active record
burgess has joined #ruby
zachallett has quit [Remote host closed the connection]
<n88_> right now i'm just writing a simple web/css scraper
twiceaday has quit [Ping timeout: 264 seconds]
<n88_> sending it into the db as its scraped
francisfish has quit [Ping timeout: 240 seconds]
<n88_> and then repackaging it into a rails app
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
twiceaday has joined #ruby
<centrx> n88_, I seems like it would be a lot easier to use an ORM now, instead of re-writing all the database connectivity later?
<Hanmac> markalanevans: arw you sure you want drop_while and not take_while ?
<markalanevans> Hanmac: yes.
<n88_> I will be scraping/inserting millions and millions of lines
<markalanevans> I want to keep removing elements until i get to the first case where the condition is met
<markalanevans> keeping the element at that location
<markalanevans> so yea it seems in a ruby block you shouldn't "Return"
momigi has quit [Remote host closed the connection]
Fyyr13_ has quit [Read error: Connection reset by peer]
<markalanevans> but rather break or next...
Fyyr13_ has joined #ruby
Fyyr13__ has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
<markalanevans> hmm. i'm still missing something
<jle`> next is such a weird keyword as a return replacement
<jle`> sometimes it makes sense but sometimes it doesn't
<jle`> idk
<centrx> it's a block, not a return replacement
<jle`> i mean as the semantic equivalent of a return inside a block
<jle`> the "pop out of this block now at this point with this value"
Fyyr13_ has joined #ruby
<centrx> It's analogous an enumerator/generator, next means go to the next
<centrx> It doesn't pop out of the block, it continues with the next iteration of the block
<centrx> break pops out of the block
<jle`> it brings the control flow back to the beginning of the block
<jle`> with the next thing
arubin has joined #ruby
<jle`> but it's not obvious that "next x" also means "go to the next...and the return value of this iteration is x"
Fyyr13___ has joined #ruby
Fyyr13__ has quit [Read error: Connection reset by peer]
Fyyr13_ has quit [Read error: Connection reset by peer]
alexju has joined #ruby
etqqkoiflwhb has joined #ruby
lolmaus has quit [Quit: No Ping reply in 180 seconds.]
lolmaus has joined #ruby
<markalanevans> right
<markalanevans> its very confusing and the docs don't really help w/ the understanding
sigurding has quit [Quit: sigurding]
<markalanevans> But i just now figured it out.
Fyyr13_ has joined #ruby
<markalanevans> All i really needed to do was have this inside my block
<markalanevans> product[:affiliate_network_id] == 8
<centrx> exactly
<markalanevans> as long as that kept being true it kept dropping
vlad_starkov has joined #ruby
<markalanevans> but the moment it was false, bam. the dropping of elements stop.
<markalanevans> and i get what i want.
<markalanevans> makes sense now.
<markalanevans> Moving on. Thanks guys.
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13__ has joined #ruby
koderok has joined #ruby
Hobogrammer has quit [Quit: WeeChat 0.4.3]
Fyyr13___ has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Client Quit]
vlad_starkov has joined #ruby
Fyyr13_ has joined #ruby
Hobogrammer has joined #ruby
Fyyr13___ has joined #ruby
koderok has quit [Ping timeout: 240 seconds]
koderok1 has joined #ruby
Fyyr13__ has quit [Ping timeout: 264 seconds]
Fyyr13___ has quit [Read error: Connection reset by peer]
Fyyr13__ has joined #ruby
MattStratton has joined #ruby
Fyyr13_ has quit [Ping timeout: 264 seconds]
koderok1 has quit [Client Quit]
Fyyr13_ has joined #ruby
koderok has joined #ruby
MattStratton has quit [Client Quit]
Fyyr13_ has quit [Read error: Connection reset by peer]
fgo has joined #ruby
Fyyr13_ has joined #ruby
koderok has quit [Client Quit]
koderok has joined #ruby
senayar has joined #ruby
Fyyr13__ has quit [Ping timeout: 264 seconds]
koderok has quit [Client Quit]
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13__ has joined #ruby
yubrew has joined #ruby
<mostlybadfly> hi guys just looking for suggestions if there is a more elegant way I should be writing this. https://gist.github.com/mostlybadfly/963fd8f2da6cffc04732
<mostlybadfly> i did print ingredients just to make sure my input was inserted into the array
<centrx> mostlybadfly, I wouldn't change it except some minor style things
<centrx> mostlybadfly, Remove the parentheses around the if-statement in the break if
<centrx> mostlybadfly, And move the puts inside the loop to the bottom so it doesn't look like it is related to the append array when it is actually asking for the _next_ input
Fyyr13__ has quit [Read error: Connection reset by peer]
timonv has joined #ruby
<centrx> mostlybadfly, Mix single and double quotes so you don't have to escape the quotes with \"done\"
Fyyr13_ has joined #ruby
<centrx> mostlybadfly, Actually here's an idea
lyubent has joined #ruby
echevemaster has quit [Remote host closed the connection]
Fyyr13_ has quit [Read error: Connection reset by peer]
dkamioka has joined #ruby
<mostlybadfly> thanks for those so far, i couldn't quite remember the mixing the quotes idea
Fyyr13_ has joined #ruby
yubrew has quit [Ping timeout: 265 seconds]
<mostlybadfly> this is my first little bit of code i'm writing myself for a project after taking a few tutorials :D so i'm excited and hoping i'm doing things kinda right
arietis has joined #ruby
<centrx> mostlybadfly, Yes, it looks good
quatron has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
Wolland has joined #ruby
FDj has quit [Ping timeout: 245 seconds]
<centrx> mostlybadfly, There is another way you could do it, but it's hard to say that it's better than what you have
Fyyr13_ has joined #ruby
nadirvardar has quit [Ping timeout: 240 seconds]
mlpinit has joined #ruby
<mostlybadfly> oh wow cool
Fyyr13_ has quit [Read error: Connection reset by peer]
<mostlybadfly> thanks centrx i'm going to look at both, this will come in useful either way , the more ways I know to do something the better
<mostlybadfly> :)
nateberkopec has joined #ruby
Fyyr13_ has joined #ruby
tvw has joined #ruby
<centrx> mostlybadfly, begin...end while is what's called a "do-while loop"
morenoh149 has quit [Ping timeout: 264 seconds]
etqqkoiflwhb_ has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
<mostlybadfly> ah ok, that is interesting. i haven't come across that specifically yet but it immediately makes sense
Fyyr13_ has joined #ruby
etqqkoiflwhb has quit [Read error: Connection reset by peer]
Hanmac has quit [Ping timeout: 252 seconds]
skaflem has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
mlpinit has quit [Ping timeout: 264 seconds]
<centrx> I must be going now
<centrx> Good luck
nateberkopec has quit [Ping timeout: 240 seconds]
<centrx> Fare thee well
toastynerd has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
rs0 has joined #ruby
Fyyr13_ has joined #ruby
<rs0> I don't understand the behavior of http://pastebin.com/k1cGxkzz (closing a pipe across process vs across Ruby threads). Can someone explain what the story is here?
centrx has quit [Quit: All this computer hacking is making me thirsty]
dkamioka has quit [Remote host closed the connection]
<etqqkoiflwhb_> mostlybadfly: I think, you should separate reading from processing part
Fyyr13__ has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
<mostlybadfly> etqqkoiflwhb_: what do you mean?
<etqqkoiflwhb_> give me a minute, I'm jolting down it down in a different way
Fyyr13__ has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
invinceable has quit [Ping timeout: 244 seconds]
<mostlybadfly> thanks
Fyyr13_ has joined #ruby
dkamioka_ has joined #ruby
Hanmac has joined #ruby
CharlieG has joined #ruby
<CharlieG> Hello
nadirvardar has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
<CharlieG> Can someone help me with a beginner ruby problem?
Fyyr13_ has joined #ruby
koderok has joined #ruby
<CharlieG> Trying to convert json to xml
<etqqkoiflwhb_> mostlybadfly: https://gist.github.com/anonymous/9444431
arubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Fyyr13_ has quit [Read error: Connection reset by peer]
toastynerd has quit [Remote host closed the connection]
nadirvardar has quit [Client Quit]
Fyyr13_ has joined #ruby
<mostlybadfly> hmmmm wow
<etqqkoiflwhb_> It has a few typos, but the gist you have to separate iteration over input from the logic, just like Ennumerable#map
Vovko has joined #ruby
testuser12345 has joined #ruby
Fyyr13__ has joined #ruby
bluepojo has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
andrewlio has joined #ruby
chipotle has joined #ruby
<Hanmac> etqqkoiflwhb_: you define perform as a instance method, but call it as a class method
Fyyr13__ has quit [Read error: Connection reset by peer]
Fyyr13__ has joined #ruby
<Hanmac> etqqkoiflwhb_: and if you dont use an instance, not use class, use module
relix has joined #ruby
<etqqkoiflwhb_> Hanmac: yea, typos, i had written it down in like 20 seconds or so, let me update it
<etqqkoiflwhb_> yea, a module with a method on it is a better idea
Fyyr13_ has quit [Ping timeout: 265 seconds]
Fyyr13__ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
Vovko has quit [Ping timeout: 252 seconds]
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
<etqqkoiflwhb_> and i should something like each_with_object
<etqqkoiflwhb_> instead of declaring ingredients outside
nouitfvf has joined #ruby
CorySimmons has joined #ruby
S0da has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
bcavileer_ has quit [Ping timeout: 244 seconds]
ceej has quit [Ping timeout: 244 seconds]
davorb has quit [Ping timeout: 245 seconds]
charles81 has quit [Ping timeout: 245 seconds]
supershabam has quit [Ping timeout: 240 seconds]
burgess has quit [Quit: ^zzz]
adambeynon has quit [Ping timeout: 265 seconds]
antonishen has quit [Ping timeout: 240 seconds]
vcoinminer_ has quit [Ping timeout: 245 seconds]
zzak has quit [Ping timeout: 245 seconds]
pusewicz__ has quit [Ping timeout: 240 seconds]
BaconOverflow has quit [Ping timeout: 265 seconds]
gyre007__ has quit [Ping timeout: 265 seconds]
alol has quit [Ping timeout: 240 seconds]
bedouin_ has quit [Ping timeout: 244 seconds]
Tranquility has quit [Ping timeout: 240 seconds]
mattmcclure has quit [Ping timeout: 245 seconds]
rickenharp_ has quit [Ping timeout: 245 seconds]
Fyyr13__ has joined #ruby
schaary has quit [Ping timeout: 240 seconds]
drjblouse__ has quit [Ping timeout: 265 seconds]
mourest has joined #ruby
timonv has quit [Remote host closed the connection]
<etqqkoiflwhb_> mostlybadfly: I think Ennumerable module expects you to define each, which yields a value each time its called, you can google, if you can do it, you can use all Ennumerable methods on ReadIngredient
CorySimmons has quit [Ping timeout: 240 seconds]
Fyyr13__ has quit [Read error: Connection reset by peer]
<etqqkoiflwhb_> so ReadIngredient.each_with_object([]) { .. }
Fyyr13__ has joined #ruby
Fyyr13_ has quit [Ping timeout: 264 seconds]
lyubent has quit [Quit: Leaving.]
yasushi has joined #ruby
FDj has joined #ruby
Fyyr13_ has joined #ruby
dkamioka_ has quit [Remote host closed the connection]
User458764 has joined #ruby
<markalanevans> Hey guys, my api, that my app uses relies on multiple 3rd party api's.
<markalanevans> Requests need to come in very quickly.
<mostlybadfly> thanks etqqkoiflwhb_ , i seem to be getting an error on the last line but i'm not sure why
Fyyr13___ has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
senayar has quit [Remote host closed the connection]
<mostlybadfly> syntax error, unexpected '}', expecting =>
<markalanevans> So i want to learn about strategies for having methods that call web services, but if those services take to long to response(ms) my main method will handle that gracefully and still return
senayar has joined #ruby
<markalanevans> These are not back ground process.
<markalanevans> What strategies / words should I be googling for?
<etqqkoiflwhb_> mostlybadfly: I didn;t run it, i just wanted to show the separation of concerns, of looping, and executing you logic over each input, you should be able to figure out the syntax errors
Fyyr13___ has quit [Read error: Connection reset by peer]
Fyyr13__ has quit [Ping timeout: 264 seconds]
marcdel_ has quit []
koderok_ has joined #ruby
<mostlybadfly> ok thanks
Fyyr13_ has joined #ruby
visof has joined #ruby
<visof> hello
evenix_ has quit []
yasushi has quit [Ping timeout: 265 seconds]
closures999 has joined #ruby
<mostlybadfly> gotta go to bed, goodnight everyone
<visof> i have list of 7000 elements which try to use threads for each element but i got `initialize': can't create Thread (11) (ThreadError) , when i decrease the size to 100 it works, it's failling even with 300 elements
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
<certainty> visof: we need more information, like code
<etqqkoiflwhb_> mostlybadfly: https://gist.github.com/nisanth074/9444421, purged out the errors, mostly ruby syntax errors
Fyyr13_ has quit [Read error: Connection reset by peer]
testuser12345 has left #ruby [#ruby]
Fyyr13_ has joined #ruby
niklasb has quit [Ping timeout: 244 seconds]
snuffeluffegus has quit [Quit: Leaving]
<etqqkoiflwhb_> markalanevans: may be, ruby's timeout module, http://ruby-doc.org/stdlib-1.9.3/libdoc/timeout/rdoc/Timeout.html
<visof> certainty: http://pastie.org/8900377
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13__ has joined #ruby
<markalanevans> etqqkoiflwhb_: is that the best way to handle thigns like that?
<markalanevans> With a simple timeout
dexter_ has quit [Ping timeout: 240 seconds]
<etqqkoiflwhb_> most likely not, depends on the context, I mostly use background processes for long running tasks
<markalanevans> In my case its not long running
Fyyr13_ has joined #ruby
<markalanevans> for example a customer says get me a list of who has a given product
<markalanevans> i might query amazon, ebay, bestbuy, ...
zachallett has joined #ruby
<markalanevans> I need to return to the user in less than 3 seconds
<visof> certainty: ?
<etqqkoiflwhb_> yea, you can use celluloid for parallel http requests
<markalanevans> so ideally i could make these requests in paralle a
<markalanevans> once they all return or fail, then i could return to my customer
Fyyr13_ has quit [Read error: Connection reset by peer]
<markalanevans> and if some don't return, i just need to note that
Fyyr13_ has joined #ruby
<etqqkoiflwhb_> popl: nice gem
timonv has joined #ruby
dexter_ has joined #ruby
Fyyr13__ has quit [Ping timeout: 264 seconds]
<markalanevans> hmmm.
<certainty> visof: works here as i'd expect it. That's a strange error. You might want to add threads.map(&:join) at the end, but that doesn't explain the error
<markalanevans> both sound interesting
monkegjinni has joined #ruby
<markalanevans> popl: have you used either?
<popl> no
<popl> futures/promises all generally work similarly, though
<popl> I've used them in Java and Perl
Fyyr13__ has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
<markalanevans> Ok. Any thing else come to mind before i start diving in?
<Nilium> Set a potted plant on fire to keep you warm.
Fyyr13__ has quit [Read error: Connection reset by peer]
<popl> Don't trust whitey.
<certainty> visof: which ruby is that?
zachallett has quit [Ping timeout: 265 seconds]
Fyyr13_ has joined #ruby
<visof> certainty: ruby 1.9.3
<etqqkoiflwhb_> visof: would having so many threads help? unless each thread does some IO
<certainty> visof: mri i suspect?
<certainty> etqqkoiflwhb_: i think that's just a simplified example
banister has joined #ruby
yubrew has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
<visof> certainty: yeah
Fyyr13_ has joined #ruby
<Nilium> Go is a pretty fun programming language.
<visof> isn't ruby threads very bad?
<visof> Nilium: i agree
banister has quit [Client Quit]
yfeldblu_ has quit [Ping timeout: 264 seconds]
<etqqkoiflwhb_> visof: No, they are fun, but I personally feel, for ruby, Threading is too low level
<etqqkoiflwhb_> It should be message passing for concurrent code
yfeldblum has joined #ruby
<etqqkoiflwhb_> instead of threads or a higher level abstraction like message passing
sparrovv has joined #ruby
koderok has quit [Read error: Connection reset by peer]
<popl> message passing instead of message passing?
<popl> huh? :)
Fyyr13__ has joined #ruby
koderok has joined #ruby
<Nilium> Somewhere a robot's head exploded
<visof> etqqkoiflwhb_: what do you think about the code i have posted , how can i fix this?
<certainty> visof: why would it be bad? because they're green or because of the GIL?
<certainty> anyway, gotta run
<certainty> me &
<certainty> erm
oneawayman has joined #ruby
<visof> certainty: you got limited threads
etqqkoiflwhb_ has quit [Read error: Connection reset by peer]
claymore has joined #ruby
koderok has quit [Client Quit]
Fyyr13__ has quit [Read error: Connection reset by peer]
etqqkoiflwhb_ has joined #ruby
Fyyr13___ has joined #ruby
koderok has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
Fyyr13_ has quit [Ping timeout: 264 seconds]
Fyyr13___ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
monkegjinni has quit [Remote host closed the connection]
mary5030 has joined #ruby
<etqqkoiflwhb_> visof: too small a code to comment, depends on what you plan to do, if you have http requests, you can use celluloid for concurrent requests, not sure, haven;t experimented much with threads yet
monkegjinni has joined #ruby
monkegjinni has quit [Read error: No route to host]
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13__ has joined #ruby
timonv has quit [Remote host closed the connection]
Xuerian has quit [Quit: No Ping reply in 180 seconds.]
davedev24 has quit [Remote host closed the connection]
<etqqkoiflwhb_> just a generic question, what would be a good next language after ruby, asking this with functional programming in mind
Fyyr13__ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
nisstyre_ has quit [Quit: WeeChat 0.4.3]
glosoli has joined #ruby
Fyyr13__ has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
dkamioka has joined #ruby
timonv has joined #ruby
Fyyr13__ has quit [Read error: Connection reset by peer]
mary5030 has quit [Remote host closed the connection]
Fyyr13_ has joined #ruby
deadlock has joined #ruby
nateberkopec has joined #ruby
mlpinit has joined #ruby
postmodern has joined #ruby
<koderok> etqqkoiflwhb_: You can take a look at Haskell. It's the most popular functional language today IMO & widely called the language of the future mostly bcoz of its parallelism.
dkamioka_ has joined #ruby
dkamioka has quit [Read error: Connection reset by peer]
koderok_ has quit [Remote host closed the connection]
<glosoli> Clojure is also some functional fun :)
nateberkopec has quit [Read error: No route to host]
nateberkopec has joined #ruby
Fyyr13__ has joined #ruby
timonv has quit [Remote host closed the connection]
Fyyr13__ has quit [Read error: Connection reset by peer]
<certainty> etqqkoiflwhb_: i'd go with clojure or elixir if you come from ruby. Haskell is certainly a great language, but the learning curve is much steaper if you don't have some understanding of functional programming. If you have however, haskell is a great choice lots of libraries and a cutting edge compiler
<mozzarella> isn't erlang better at that?
Fyyr13__ has joined #ruby
<mozzarella> and how can a "language of the future" be 24 years old? lol
quatron has quit [Quit: ChatZilla 0.9.90.1 [Firefox 27.0.1/20140212131424]]
mlpinit has quit [Ping timeout: 265 seconds]
Fyyr13_ has quit [Ping timeout: 264 seconds]
<certainty> mozzarella: because it took some time to make it fast enough, and we now have a need for languages that work well in concurrent context as cpus wont get signicantly faster.
Fyyr13__ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
dkamioka_ has quit [Ping timeout: 265 seconds]
<mozzarella> what about erlang?
<visof> mozzarella: Erlang is more mature on messaging passing and concurrency
nateberkopec has quit [Ping timeout: 240 seconds]
<certainty> i like clojure because it's a lisp and because it has very well designed abstractions for dealing with multi threaded programs
Slavox is now known as Slavox|AFK
hiyosi has quit [Ping timeout: 240 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<certainty> i love haskell because of its neat ideas and the general robustness of its programs
<etqqkoiflwhb_> certainity: some of colleagues are picking up elixir, I can learn from them, I'm looking at haskell, but I don't know where to start from, clojure is cool, but has the runtime takes a bit of time to start up
<etqqkoiflwhb_> not cool for command line tools
jackneill has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
<certainty> etqqkoiflwhb_: yes that's certainly true the vm has to warm up
<mozzarella> etqqkoiflwhb_: elixir is close to erlang, no?
Fyyr13_ has joined #ruby
<certainty> etqqkoiflwhb_: OTOH you have all of java at your disposal
<etqqkoiflwhb_> certainty: any advice on where to pick haskell from?
<certainty> mozzarella: yes
<certainty> etqqkoiflwhb_: yes, real world haskell and learn you a haskell for great good are awesome resources
<mozzarella> I want to learn elixir and erlang…
<etqqkoiflwhb_> mozzarella: Its based of the erlang beam vm, pragdave gave a introductory talk at bangalore ruby users group meetup, the videos should be up in a couple of days, you can have a look
burgess has joined #ruby
User458764 has joined #ruby
<certainty> mozzarella: elixir has erlang interop and targets the erlang vm so knowing both will give you most
<popl> erlang :)
tkuchiki has quit [Remote host closed the connection]
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
<etqqkoiflwhb_> certainly: thanks, what should my the next steps, after pickup up haskell from those books
<etqqkoiflwhb_> be the*
<certainty> etqqkoiflwhb_: build real stuff with it and join #haskell
<certainty> etqqkoiflwhb_: http://www.haskell.org/haskellwiki/Haskell is a great site with lots of haskell related resources
Fyyr13_ has quit [Read error: Connection reset by peer]
<visof> etqqkoiflwhb_: that the best book for beginneres i guess http://learnyouahaskell.com/
<certainty> etqqkoiflwhb_: at some point you will likely want to learn some category theory
Fyyr13_ has joined #ruby
rjk808 has joined #ruby
<mozzarella> should I learn erlang and elixir, or haskell, or some lisp?
<visof> certainty: i guess no, dealing with types and monads don't need category theory , it's not for mathematicians only
<certainty> mozzarella: depends on your need. I can't predict the future but I suspect that clojure has a good future with quite some industry around it. Elixir might be hot too in the future. Haskell has always been badass, but little companies leverage it yet
<etqqkoiflwhb_> certainty: any moderately complex haskell projects on github where I can learn from reading the source, like xmonad, unfortunately I'm not using it these days, so if there's anything interesting to explore, which works on osx
<certainty> visof: yes you don't need it from a programmer's point of view but it certainly helps to understand the principles. At least it made things clearer to me
Fyyr13__ has joined #ruby
kendzior has joined #ruby
<certainty> etqqkoiflwhb_: i like husk-scheme, but there are certainly others. The problem with real world haskell programs that are of a decent size, is that they tend to use advanced abstractions that are not easy to follow for a beginner
Fyyr13__ has quit [Read error: Connection reset by peer]
browndawg has quit [Ping timeout: 240 seconds]
glosoli has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Fyyr13__ has joined #ruby
spider-mario has joined #ruby
<etqqkoiflwhb_> certainty: would one be able to wade through them after LYAH, real world haskell?
Fyyr13_ has quit [Ping timeout: 264 seconds]
<certainty> etqqkoiflwhb_: yes, with some reading as you go by, to understand the libraries
Fyyr13__ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
ktosiek has joined #ruby
kitak has quit [Remote host closed the connection]
monkegjinni has joined #ruby
<certainty> you should be fluent with monads and monadtransformers at the least
<etqqkoiflwhb_> certainty: one last question, is tdd in haskell as beneficial as it is in ruby?
<certainty> etqqkoiflwhb_: in haskell we don't do classic unit testing most of the time. Instead we check invariants of functions with quickcheck
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13__ has joined #ruby
<etqqkoiflwhb_> certainty: thanks for your inputs, they are of massive help
<certainty> etqqkoiflwhb_: in haskell we have several phases. First we make sure that the program typechecks and once it does we test function properties
<etqqkoiflwhb_> oh
<certainty> at least that's how i do stuff and i'm certainly a beginner haskeller
railly has joined #ruby
railly has quit [Max SendQ exceeded]
railly has joined #ruby
Fyyr13_ has joined #ruby
railly has quit [Max SendQ exceeded]
Fyyr13__ has quit [Read error: Connection reset by peer]
CorySimmons has joined #ruby
<certainty> etqqkoiflwhb_: that's an interleaved process. Most haskell functions are tiny and "obviously correct" at least if we follow best practices. Those can be tested interactively one by one. Also as most of them will be pure, it's very easy to test them in the repl
etqqkoiflwhb_ has quit [Read error: Connection reset by peer]
railly has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
Wolland has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railly has quit [Max SendQ exceeded]
Fyyr13_ has joined #ruby
railly has joined #ruby
fgo has quit [Remote host closed the connection]
railly has quit [Max SendQ exceeded]
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
francisfish has joined #ruby
railly has joined #ruby
railly has quit [Max SendQ exceeded]
peterhellberg has joined #ruby
CorySimmons has quit [Ping timeout: 240 seconds]
monkegjinni has quit [Remote host closed the connection]
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
lolmaus has quit [Read error: Operation timed out]
railly has joined #ruby
monkegjinni has joined #ruby
railly has quit [Max SendQ exceeded]
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
Lewix has quit [Remote host closed the connection]
<chridal> Tried posting something in #rubyonrails,but it seems no one is around. Anyone mind me asking a rails/rspec issue?
francisfish has quit [Ping timeout: 240 seconds]
Packardnode has quit [Remote host closed the connection]
lolmaus has joined #ruby
<bnagy> people that care about rails will also be over there
railly has joined #ruby
<bnagy> this is a slow time
<chridal> ah, ok
railly has quit [Max SendQ exceeded]
<chridal> I'll hang around then
Fyyr13__ has joined #ruby
<certainty> chridal: just ask
<chridal> So, I'm trying to test my controller with rspec, but I can't seem to get a hold of the instance variable inside one of the actions.
<chridal> For some reason it is returning nil?
monkegjinni has quit [Ping timeout: 252 seconds]
Fyyr13__ has quit [Read error: Connection reset by peer]
Lewix has joined #ruby
Fyyr13___ has joined #ruby
railly has joined #ruby
ktosiek_ has joined #ruby
Packardnode has joined #ruby
railly has quit [Max SendQ exceeded]
Fyyr13_ has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
Fyyr13___ has quit [Read error: Connection reset by peer]
banister has joined #ruby
User458764 has joined #ruby
User458764 has quit [Max SendQ exceeded]
Fyyr13_ has joined #ruby
<certainty> chridal: are sure it gets assigned? (As an aside, you generall want to isolate controller tests from the storage layer (activerecord))
railly has joined #ruby
ktosiek has quit [Ping timeout: 244 seconds]
railly has quit [Max SendQ exceeded]
<chridal> certainty: https://gist.github.com/9445335 this is my controller, it should be getting assigned
<chridal> hm, so what exactly should I test for in the controller test?
railly has joined #ruby
railly has quit [Max SendQ exceeded]
Fyyr13__ has joined #ruby
<certainty> chridal: all of the controller concerns. You know what the controller's job is?
<chridal> would it make more sense to write controller tests as API tests basically? Check for JSON return and status codes?
DouweM has quit [Ping timeout: 240 seconds]
railly has joined #ruby
railly has quit [Max SendQ exceeded]
<chridal> I was thinking of maybe separating those into a set of 'api tests'
Vovko has joined #ruby
<chridal> well, my best guess is that the controller is responsible for co-ordinating between the client and the data
Fyyr13__ has quit [Read error: Connection reset by peer]
<certainty> chridal: my guess is that you didn't create a User with that name before the test runs? (You shouldn't be, instead you should stub the call that finds the user by name)
railly has joined #ruby
Fyyr13__ has joined #ruby
railly has quit [Max SendQ exceeded]
<chridal> aha! yea, I didn't. So that's why it's nil.
railly has joined #ruby
railly has quit [Max SendQ exceeded]
tesuji has quit [Ping timeout: 265 seconds]
Fyyr13_ has quit [Ping timeout: 264 seconds]
rjk808 has quit []
<certainty> chridal: almost. It's job is to extract parameters and pass them to the apropriate model(s), then take the results back and hand it over to the correct view(s), practically speaking
railly has joined #ruby
yubrew has joined #ruby
newbie1r has joined #ruby
railly has quit [Max SendQ exceeded]
railly has joined #ruby
james_d_h has quit [Ping timeout: 240 seconds]
railly has quit [Max SendQ exceeded]
Fyyr13_ has joined #ruby
newbie1r|2 has joined #ruby
newbie1r has quit [Client Quit]
blackmesa has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13___ has joined #ruby
railly has joined #ruby
railly has quit [Max SendQ exceeded]
<chridal> certainty: So I shouldn't be testing whether vars get set or not? But just what is returned?
Fyyr13__ has quit [Ping timeout: 264 seconds]
Fyyr13___ has quit [Read error: Connection reset by peer]
yubrew has quit [Ping timeout: 244 seconds]
Fyyr13_ has joined #ruby
railly has joined #ruby
railly has quit [Max SendQ exceeded]
ndrei has joined #ruby
railly has joined #ruby
railly has quit [Max SendQ exceeded]
Zebroid has joined #ruby
<chridal> certainty: also, shouldn't this work then: https://gist.github.com/9445449 ?
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13__ has joined #ruby
newbie1r|2 has quit [Ping timeout: 240 seconds]
<certainty> chridal: testing assins is fine since that's the interface to the view
<certainty> you shouln't be querying the database
railly has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
railly has quit [Max SendQ exceeded]
<certainty> instead you verify that the correct method on the model is invoked with the correct arguments
YamakasY has joined #ruby
Fyyr13_ has joined #ruby
<certainty> chridal: you want something like User.should_receive(:find_by_name).with("theuser").and_return
nari has joined #ruby
newbie1r has joined #ruby
m8 has joined #ruby
railly has joined #ruby
<certainty> gotta run now
railly has quit [Max SendQ exceeded]
<chridal> aha! Well thanks a lot for your help.
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
Fyyr13__ has quit [Ping timeout: 264 seconds]
<certainty> chridal: the real story is that you shouldn't stub that but a method on your own class instead that uses activerecord. The rule is "only stub what you own", because you need to be able to change
Fyyr13__ has joined #ruby
<chridal> certainty: Do you know of any resources that I should be reading to learn this stuff?
shredding has joined #ruby
Fyyr13___ has joined #ruby
Fyyr13_ has quit [Ping timeout: 264 seconds]
Fyyr13___ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
klaut_ has joined #ruby
mengu has joined #ruby
Fyyr13__ has quit [Ping timeout: 264 seconds]
jtza8 has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13__ has joined #ruby
Fyyr13_ has joined #ruby
Fyyr13__ has quit [Read error: Connection reset by peer]
ScalaClient has quit [Ping timeout: 244 seconds]
dkamioka has joined #ruby
nateberkopec has joined #ruby
oneawayman has quit [Read error: Connection reset by peer]
Fyyr13_ has quit [Read error: Connection reset by peer]
oneawayman has joined #ruby
compleatang has quit [Remote host closed the connection]
mlpinit has joined #ruby
Fyyr13_ has joined #ruby
compleatang has joined #ruby
Fyyr13__ has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
<Robbo_> anyone got some time to give some basic advice? (im not asking to ask, typing out question now)
Fyyr13__ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
<Robbo_> I am using middleman and midldeman-blog (https://github.com/middleman/middleman-blog). The blog needs extra features and some of those features are extending current features. For example I need to add a new local here - https://github.com/middleman/middleman-blog/blob/master/lib/middleman-blog/paginator.rb#L114
mojjojo has joined #ruby
<Robbo_> My question is what is the best way to extend this stuff? It is just a gem with an entry point for middleman extensions
mlpinit has quit [Ping timeout: 240 seconds]
ankushio has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
<ankushio> In ruby, what does "a:" mean. I know that ":a" is a symbol, but what's "a:" ?
Fyyr13_ has joined #ruby
<Robbo_> Should I require that file, extend it, use parent (or whatever it is in ruby) to get the data there and add what I want and then have middleman config point to the new gem?
mojjojo has quit [Client Quit]
<Robbo_> This is how I would do it in other languages however is there any tricks I can do in ruby to make it a little simpler?
kate_r has quit [Remote host closed the connection]
railly has joined #ruby
<Robbo_> This question is sounding stupid and rubber ducky
railly has quit [Max SendQ exceeded]
eka has joined #ruby
Fyyr13__ has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
railly has joined #ruby
railly has quit [Max SendQ exceeded]
Fyyr13__ has quit [Read error: Connection reset by peer]
dkamioka has quit [Ping timeout: 240 seconds]
railly has joined #ruby
railly has quit [Max SendQ exceeded]
Fyyr13_ has joined #ruby
mary5030 has joined #ruby
SHyx0rmZ has joined #ruby
WormDrink has quit [Ping timeout: 252 seconds]
railly has joined #ruby
railly has quit [Max SendQ exceeded]
jhass|off is now known as jhass
railly has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
dexter_ has quit [Ping timeout: 240 seconds]
railly has quit [Max SendQ exceeded]
Fyyr13_ has joined #ruby
railly has joined #ruby
Fyyr13_ has quit [Read error: Connection reset by peer]
railly has quit [Max SendQ exceeded]
<ankushio> RubyPanther: In ruby, what does "a:" mean. I know that ":a" is a symbol, but what's "a:" ?
Fyyr13_ has joined #ruby
workmad3 has joined #ruby
burgess has quit [Quit: ^zzz]
<apeiros> ankushio: depends o the context
railly has joined #ruby
<apeiros> in {a: 1} it's a symbol too
<Hanmac> ankushio: named agrument or special snytax in Hash
shabgard has joined #ruby
shabgard has joined #ruby
railly has quit [Max SendQ exceeded]
<apeiros> in def foo(a: 1) it's a named argument, and as such a local variable.
mary5030 has quit [Ping timeout: 265 seconds]
<ankushio> I saw this line : "protect_from_forgery with: :exception"
<apeiros> yes, there it's a symbol
dexter_ has joined #ruby
pusewicz__ has joined #ruby
<apeiros> `protect_from_forgery with: :exception` is a short form of `protect_from_forgery({with: :exception})`
<ankushio> ahh
<apeiros> and `{with: :exception}` is as said equivalent to `{:with => :exception}`
<ankushio> Thanks apeiros and Hanmac
<apeiros> yw
hiyosi has joined #ruby
_2_tiapatrick2 has joined #ruby
<Hanmac> apeiros: about the protect_from_forgery, depends if the function wants key arguments or not ...
<_2_tiapatrick2> hello:D
St_Marx has quit [Ping timeout: 245 seconds]
skkeeper has quit [Quit: ZNC - http://znc.in]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
_2_tiapatrick2 has quit [Remote host closed the connection]
<apeiros> Hanmac: on the calling side, it's always a hash and hash keys
<ankushio> apeiros: This gives me an exception a = b: :c
<ankushio> shouldn't it be equal to a = {:b => :c}
<apeiros> ankushio: because there you can't leave off the {}
<apeiros> ankushio: no, only in method calls, for the last argument
<ankushio> ok
arietis has quit [Quit: Computer has gone to sleep.]
<apeiros> foo a: 1, b: 2 # <- valid
<apeiros> foo a: 1, 2, 3 # <- invalid, because the hash is not the last argument
skkeeper has joined #ruby
mojjojo has joined #ruby
<ankushio> apeiros: That makes it very clear. Thank you
Umschwung has joined #ruby
Umschwung has quit [Max SendQ exceeded]
Vivekananda has joined #ruby
vcoinminer_ has joined #ruby
mercwithamouth has joined #ruby
oneawayman has quit [Ping timeout: 265 seconds]
ankushio has quit [Quit: Leaving...]
alexherbo2 has joined #ruby
mehlah has joined #ruby
nomenkun has joined #ruby
mojjojo has quit [Client Quit]
dexter_ has quit [Ping timeout: 252 seconds]
WormDrink has joined #ruby
WormDrink has quit [Changing host]
WormDrink has joined #ruby
inversesquarelaw has quit [Ping timeout: 252 seconds]
Czupa has joined #ruby
alol has joined #ruby
emergion has joined #ruby
dexter_ has joined #ruby
rhys has quit [Ping timeout: 244 seconds]
WormDr1nk has joined #ruby
kirun has joined #ruby
vlad_starkov has joined #ruby
Tranquility has joined #ruby
antonishen has joined #ruby
WormDrink has quit [Ping timeout: 240 seconds]
mojjojo has joined #ruby
etqqkoiflwhb_ has joined #ruby
St_Marx has joined #ruby
bluOxigen has joined #ruby
yubrew has joined #ruby
oneawayman has joined #ruby
michael_lee has quit [Read error: Connection reset by peer]
Speed has joined #ruby
tylersmith has quit [Remote host closed the connection]
yubrew has quit [Read error: Operation timed out]
bedouin_ has joined #ruby
csmrfx has joined #ruby
pinage404 has quit [Excess Flood]
mojjojo has quit [Quit: mojjojo]
etqqkoiflwhb_ has quit [Quit: Computer has gone to sleep.]
marcdel has joined #ruby
toastynerd has joined #ruby
Zebroid has quit [Remote host closed the connection]
Umschwung has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
thomasxie has joined #ruby
schaary has joined #ruby
<shevy> test
adambeynon has joined #ruby
marcdel has quit [Ping timeout: 264 seconds]
<jhass> shevy: stop testing, it'll never work
shredding has quit [Quit: shredding]
toastynerd has quit [Ping timeout: 252 seconds]
withnale has joined #ruby
pinage404 has joined #ruby
<shevy> my connection is too often down as of late :(
withnale has quit [Remote host closed the connection]
<jhass> get a bouncer
<shevy> what should he do, guard my door?
dmyers has joined #ruby
phansch has joined #ruby
<Morrolan> Guard your packets from being dropped.
<csmrfx> reconns
<csmrfx> then again, one could just get a shell account
withnale has joined #ruby
Aquilo has left #ruby [#ruby]
<Morrolan> Though then you'd have to use a console-based IRC client. *shudders*
<csmrfx> <3 irssi
etqqkoiflwhb_ has joined #ruby
davorb has joined #ruby
<Morrolan> 's fine, I don't judge. Just don't make me use it. :P
<csmrfx> the only way to ride
<withnale> Hello. Can anyone tell me if it's possible to work with the underlying OptionParser object when usiing GLI?
<csmrfx> ssh, bash, screen, irssi, irb, ri, all in the same terminal
quatron has joined #ruby
BaconOverflow has joined #ruby
<csmrfx> withnale: sorry for intercepting, but why not just ARGV
timonv has joined #ruby
tgkokk has joined #ruby
koell has quit [Read error: Connection reset by peer]
<csmrfx> withnale: anyway, from the look of GLI, it is 100% possible to use OP
<peterhellberg> @csmrfx Yeah, irssi is a really nice command line client.
michael_lee has joined #ruby
<withnale> csmrfx: I've written a command suite using GLI and I'm getting frustrated at some points where I don't have the same level of control of the option parsing.
<peterhellberg> withnale: From the README: "without restricting you in any way from the power of OptionParser."
<csmrfx> withnale: but, I do not know from experience how GLI and OP work together
peret has quit [Remote host closed the connection]
mattmcclure has joined #ruby
mojjojo has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
supershabam has joined #ruby
mourest has quit [Remote host closed the connection]
alexju has quit [Remote host closed the connection]
banister has joined #ruby
mojjojo has quit [Client Quit]
nolic has joined #ruby
mojjojo has joined #ruby
nomenkun has quit [Remote host closed the connection]
nateberkopec has joined #ruby
WormDr1nk has quit [Ping timeout: 240 seconds]
WormDrink has joined #ruby
mlpinit has joined #ruby
Thanatermesis has joined #ruby
Vovko has quit [Remote host closed the connection]
<apeiros> is GLI short for Gommand Line Interface? :D
sparrovv has quit [Remote host closed the connection]
aryaching has joined #ruby
<shevy> lol
nateberkopec has quit [Ping timeout: 240 seconds]
<shevy> or perhaps Goman Line Interference
<shevy> "Elite-Feature: Randomly insert characters into your commands as you type them."
dkamioka has joined #ruby
tgkokk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mlpinit has quit [Ping timeout: 265 seconds]
mojjojo has quit [Quit: mojjojo]
dexter_ has quit [Ping timeout: 244 seconds]
mojjojo has joined #ruby
aagdbl has joined #ruby
dkamioka has quit [Ping timeout: 240 seconds]
dexter_ has joined #ruby
Deele has joined #ruby
etqqkoiflwhb__ has joined #ruby
aagdbl has quit [Client Quit]
mojjojo has quit [Client Quit]
etqqkoiflwhb_ has quit [Ping timeout: 240 seconds]
arietis has joined #ruby
ceej has joined #ruby
gyre007__ has joined #ruby
dexter_ has quit [Ping timeout: 264 seconds]
mojjojo has joined #ruby
CorySimmons has joined #ruby
Mon_Ouie has quit [Quit: WeeChat 0.4.3]
francisfish has joined #ruby
mojjojo has quit [Client Quit]
CorySimmons has quit [Ping timeout: 240 seconds]
yubrew has joined #ruby
nomenkun has joined #ruby
francisfish has quit [Ping timeout: 240 seconds]
Speed has quit [Ping timeout: 264 seconds]
emergion has quit [Ping timeout: 260 seconds]
yubrew has quit [Ping timeout: 240 seconds]
dexter_ has joined #ruby
etqqkoiflwhb___ has joined #ruby
etqqkoiflwhb__ has quit [Read error: Connection reset by peer]
newbie1r has quit [Quit: Changing server...]
james_d_h has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
rickenharp_ has joined #ruby
zzak has joined #ruby
nomenkun has quit [Remote host closed the connection]
nomenkun has joined #ruby
newbie1r|2 has joined #ruby
vlad_starkov has joined #ruby
drjblouse__ has joined #ruby
james_d_h has quit [Ping timeout: 240 seconds]
Zespre has quit [Remote host closed the connection]
thomasxie has left #ruby [#ruby]
marcdel has joined #ruby
Speed has joined #ruby
nomenkun has quit [Ping timeout: 240 seconds]
marcdel has quit [Read error: Connection reset by peer]
marcdel has joined #ruby
nomenkun has joined #ruby
dexter_ has quit [Ping timeout: 240 seconds]
nomenkun has quit [Remote host closed the connection]
nomenkun has joined #ruby
Hanmac1 has joined #ruby
dexter_ has joined #ruby
kewubenduben has quit []
marcdel has quit [Ping timeout: 252 seconds]
lilltiger_ is now known as lilltiger
Hanmac has quit [Ping timeout: 252 seconds]
charles81 has joined #ruby
nomenkun has quit [Read error: Operation timed out]
bcavileer_ has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Lewix has quit [Remote host closed the connection]
chrisseaton has joined #ruby
bthesorceror has quit [Remote host closed the connection]
etqqkoiflwhb___ has quit [Quit: Computer has gone to sleep.]
hyperboreean has joined #ruby
Mon_Ouie has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kendzior has quit [Remote host closed the connection]
yasushi has joined #ruby
DouweM has joined #ruby
nateberkopec has joined #ruby
phansch has quit [Quit: WeeChat 0.4.2]
vlad_starkov has quit [Remote host closed the connection]
mlpinit has joined #ruby
Vovko has joined #ruby
marcdel has joined #ruby
inversesquarelaw has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
inversesquarelaw has quit [Client Quit]
mlpinit has quit [Ping timeout: 240 seconds]
banister has joined #ruby
marcdel has quit [Ping timeout: 264 seconds]
UserNameInvalid has joined #ruby
IceDragon has joined #ruby
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
peterhellberg has quit [Remote host closed the connection]
peterhellberg has joined #ruby
Vovko has quit [Ping timeout: 265 seconds]
shredding has joined #ruby
popl has quit [Ping timeout: 240 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
_maes_ has joined #ruby
kate_r has joined #ruby
AlSquire has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
senayar has quit [Remote host closed the connection]
toretore has joined #ruby
NovapaX has joined #ruby
<mozzarella> WHY am I getting this:
<mozzarella> mkmf.rb can't find header files for ruby at /usr/share/include/ruby.h
blackmesa has quit [Ping timeout: 264 seconds]
claymore has quit [Ping timeout: 264 seconds]
postmodern has quit [Quit: Leaving]
mostlybadfly has joined #ruby
yubrew has joined #ruby
klaut_ has quit [Remote host closed the connection]
<Morrolan> If you installed Ruby via your system's package manager, make sure to install its development headers, too.
<Morrolan> For some distributions that's a second package.
<Morrolan> (e.g Debian and its derivatives)
CorySimmons has joined #ruby
dexter_ has quit [Ping timeout: 265 seconds]
<mozzarella> thanks man
yubrew has quit [Ping timeout: 240 seconds]
mojjojo has joined #ruby
CorySimmons has quit [Ping timeout: 244 seconds]
gnephiak has quit [Remote host closed the connection]
shredding has quit [Quit: shredding]
carraroj has joined #ruby
gsvolt_ has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
gsvolt has joined #ruby
UserNameInvalid has quit [Read error: No route to host]
cjsarette has quit [Ping timeout: 245 seconds]
claymore has joined #ruby
cjsarette has joined #ruby
dexter_ has joined #ruby
shredding has joined #ruby
browndawg has joined #ruby
shevy has quit [Ping timeout: 252 seconds]
spider-mario has quit [Ping timeout: 240 seconds]
shevy has joined #ruby
timonv has joined #ruby
sailias has joined #ruby
bthesorceror has joined #ruby
UserNameInvalid has joined #ruby
Xeago has joined #ruby
Advocation has joined #ruby
knigitz has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
Hanmac1 is now known as Hanmac
armyriad has joined #ruby
sailias has quit [Ping timeout: 240 seconds]
dexter_ has quit [Ping timeout: 240 seconds]
sailias has joined #ruby
NovapaX has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
senayar has joined #ruby
spider-mario has joined #ruby
senayar has quit [Read error: No route to host]
senayar has joined #ruby
dexter_ has joined #ruby
Squarepy has joined #ruby
ktosiek_ is now known as ktosiek
glosoli has joined #ruby
browndawg has quit [Ping timeout: 240 seconds]
Hanmac1 has joined #ruby
mojjojo has quit [Quit: mojjojo]
bthesorceror has quit [Remote host closed the connection]
<Dwarf> How would I tackle DEPRECATION WARNING: Relation#first with finder options is deprecated. Please build a scope and then call #first on it instead.
Hanmac has quit [Ping timeout: 244 seconds]
<Dwarf> Google isn't really helpful oddly
Xeago has quit [Remote host closed the connection]
dayepa has joined #ruby
senayar has quit [Ping timeout: 244 seconds]
peterhellberg has quit [Remote host closed the connection]
Hanmac has joined #ruby
<jhass> Dwarf: one would follow what the message says (which is quite clear) and if that doesn't help ask rails questions in #RubyOnRails ;)
<Dwarf> You can use activerecord without rails...
shredding has quit [Quit: shredding]
<Dwarf> And if I knew how to build a scope I wouldn't be here
<jhass> still all the AR expertise is over there
<Dwarf> But they scare me
<jhass> whatever.where(stuff).first instead of whatever.first(stuff)
klaut_ has joined #ruby
WormDrink has quit [Ping timeout: 264 seconds]
<Dwarf> So..
sailias has quit [Ping timeout: 240 seconds]
<Dwarf> I'm going to google some more stuff I suppose
<Dwarf> Thanks!
Hanmac1 has quit [Ping timeout: 244 seconds]
lyubent has joined #ruby
dmyers has quit [Quit: Connection closed for inactivity]
<Dwarf> Would
<Dwarf> def self.first(stuff)
<Dwarf> where(stuff).first
<Dwarf> end
<Dwarf> Work?
tgkokk has joined #ruby
<jhass> it would but be extremely ugly
leonidlm has joined #ruby
shevy has quit [Ping timeout: 244 seconds]
sigurding has joined #ruby
nateberkopec has joined #ruby
<jhass> just port to the new api
klaut_ has quit [Ping timeout: 240 seconds]
<Dwarf> Aye I suppose that's better
<jhass> I mean you could probably fix it with sed
<jhass> sed -i 's/first\((.+)\)/where(\1).first/ or something like that
<Dwarf> Yea, gotta love regex
<Dwarf> Oh joy
<Dwarf> could not obtain a database connection within 5.000 seconds (waited 5.001 seconds) (ActiveRecord::ConnectionTimeoutError)
<Dwarf> That's weird tho cause it works with selecting but updating does that
mlpinit has joined #ruby
<Dwarf> Oh well
<jhass> sounds like a lock
mengu has quit []
<Dwarf> There shouldn't be any locks
<jhass> your dbms should lock
nateberkopec has quit [Ping timeout: 240 seconds]
shevy has joined #ruby
bogeyd6 has quit [Ping timeout: 240 seconds]
zorak_ has joined #ruby
dayepa has quit [Quit: dayepa]
dkamioka has joined #ruby
weie has quit [Quit: Leaving...]
Vovko has joined #ruby
akitada has joined #ruby
mlpinit has quit [Ping timeout: 240 seconds]
klaut_ has joined #ruby
WormDrink has joined #ruby
mourest has joined #ruby
Fyyr13_ has quit [Remote host closed the connection]
<Dwarf> Thanks a bunch, managed to solve it!
Fyyr13_ has joined #ruby
weie has joined #ruby
dkamioka has quit [Ping timeout: 240 seconds]
Vovko has quit [Ping timeout: 265 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
Fyyr13__ has joined #ruby
Fyyr13__ has quit [Remote host closed the connection]
Fyyr13_ has quit [Read error: Connection reset by peer]
Fyyr13_ has joined #ruby
jtza8 has quit [Ping timeout: 240 seconds]
shredding has joined #ruby
Fyyr13__ has joined #ruby
yubrew has joined #ruby
<sigurding> anyone may tell me, how I am able to convert a nested object into a Hash, without specifying each property manually?
Fyyr13_ has quit [Ping timeout: 252 seconds]
peterhellberg has joined #ruby
<jhass> sigurding: nested object?
sepp2k has joined #ruby
<Squarepy> ^^
<sigurding> what's funny about it?
<sigurding> Classes containing others classes
<sigurding> Squarepy: you should not laugh about others, only cause you don't know/get the concept
<sigurding> show a little more respect
<jhass> nested object is very vague
<jhass> best is to implement #to_h on each
<Squarepy> sigurding, that was not humor, just pointing to a relevant question, sry for confusion
timonv has joined #ruby
shevy has quit [Ping timeout: 264 seconds]
<sigurding> jhass: that's what I have seen. Thought of doing it recursively
maximski has joined #ruby
yubrew has quit [Ping timeout: 244 seconds]
<sigurding> so something like to_h and to_dh (deep hash)
<jhass> you still didn't tell anything about your objects though. Is there a way to enumerate all fields? do you even want to include all fields? etc.
<jhass> have the nested objects the same type as the parents?
<jhass> maybe look at the composite pattern
mojjojo has joined #ruby
tils has joined #ruby
<sigurding> jhass: yes, I want to post them via json, so I want all fields
<jhass> typically you'd implement a as_json then
<sigurding> found something interesting: http://rubygems.org/gems/hashable
<sigurding> seems to do exactly what I was looking for
<jhass> def as_json; {field1: @field1.as_json, field2: @field2.as_json}; end
UserNameInvalid has quit [Read error: Connection reset by peer]
<sigurding> jhass: yep one way to go, keeping things generic is more convenient for me
<jhass> I'm rather explicit about what to serialize instead of accidentally leaking private data
coderhs has joined #ruby
zorak_ has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 240 seconds]
<sigurding> jhass: all object properties are defined
mojjojo has quit [Client Quit]
francisfish has joined #ruby
no0code has joined #ruby
WillAmes has joined #ruby
<Squarepy> there are serialization libraries for objects, does the nesting make you roll your own?
<Squarepy> libraries/methods
coderhs has quit [Client Quit]
<no0code> hello, is there a sinatra alternative to send_data? i read it is not supported anymore
roolo has joined #ruby
sparrovv has joined #ruby
shredding has quit [Quit: shredding]
francisfish has quit [Ping timeout: 264 seconds]
shredding has joined #ruby
jgoss has quit [Ping timeout: 264 seconds]
lyubent has quit [Quit: Leaving.]
jtza8 has joined #ruby
koderok has quit [Ping timeout: 240 seconds]
pskosinski has joined #ruby
james_d_h has joined #ruby
IceDragon has quit [Ping timeout: 244 seconds]
sigurding has quit [Quit: sigurding]
aryaching has quit [Ping timeout: 240 seconds]
james_d_h has quit [Ping timeout: 240 seconds]
mercwithamouth has quit [Ping timeout: 240 seconds]
Fyyr13__ has quit [Remote host closed the connection]
Fyyr13_ has joined #ruby
stnly has joined #ruby
davedev24 has joined #ruby
mojjojo has joined #ruby
nomenkun has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
shevy has joined #ruby
tanathos has joined #ruby
nateberkopec has joined #ruby
relix has joined #ruby
koderok has joined #ruby
fantazo has joined #ruby
cjsarette has quit [Ping timeout: 245 seconds]
senayar has joined #ruby
henry1 has joined #ruby
klaut_ has quit []
klaut_ has joined #ruby
cjsarette has joined #ruby
senayar has quit [Ping timeout: 240 seconds]
nomenkun_ has joined #ruby
nomenkun_ has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 265 seconds]
nomenkun has quit [Ping timeout: 265 seconds]
timonv has joined #ruby
_maes_ has joined #ruby
_gigs_ has quit [Ping timeout: 245 seconds]
lkba has joined #ruby
senayar has joined #ruby
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
mlpinit has joined #ruby
marcdel has joined #ruby
<Packardnode> hey. i have debian 7 32bit running and wanted to run a .rb file. but when i do sudo gem install cinch i get " Unable to convert U+2026 from UTF-8 to US-ASCII for lib/.... "
<Packardnode> how do i fix this ?
<soahccc> Packardnode: which ruby version do you have?
nomenkun has joined #ruby
dkamioka has joined #ruby
mlpinit has quit [Ping timeout: 240 seconds]
aryaching has joined #ruby
marcdel has quit [Ping timeout: 240 seconds]
glosoli has quit [Quit: Textual IRC Client: www.textualapp.com]
einarj has joined #ruby
yubrew has joined #ruby
senayar has quit [Remote host closed the connection]
dkamioka has quit [Ping timeout: 244 seconds]
nfk has quit [Quit: yawn]
<newbie1r|2> hello people. I'm an absolute beginner to programming and interested in making GUI linux apps, so looking for an easy language that is also fast. I like the syntax of ruby, but heard it's slow so I looked and people online say PyPy and stuff is fast. is there any ruby-based language like that that's good?
<newbie1r|2> and that has a good ide suitable for beginners
yubrew has quit [Ping timeout: 240 seconds]
nomenkun has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
henry1 has quit [Quit: WeeChat 0.4.3]
timonv has joined #ruby
nomenkun_ has joined #ruby
senayar has joined #ruby
poguez has joined #ruby
thiagomds has joined #ruby
tkuchiki has joined #ruby
dexter_ has quit [Ping timeout: 240 seconds]
tvw has quit []
<thiagomds> Hello my name is Thiago. I'm from Brazil, Rio de Janeiro
<thiagomds> I have one question about of Ruby
<thiagomds> for example.
<thiagomds> can i make one system ERP to using ruby?
<thiagomds> is secure create one system ERP to using ruby?
thiagomds has left #ruby ["WeeChat 0.4.3"]
nfk has joined #ruby
jamto11 has joined #ruby
CorySimmons has joined #ruby
cover has joined #ruby
Umschwung has quit [Ping timeout: 240 seconds]
<shevy> what is ERP
<DouweM> Google says Enterprise Resource Planning
<DouweM> But that doesn't help me a lot
timonv has quit [Remote host closed the connection]
mojjojo has quit [Quit: mojjojo]
<certainty> that's a huge topic
CorySimmons has quit [Ping timeout: 240 seconds]
<certainty> SAP is an ERP system for example
aryaching has quit [Quit: Sayonara ^_^]
etqqkoiflwhb___ has joined #ruby
mojjojo has joined #ruby
claymore has quit [Ping timeout: 240 seconds]
predator117 has quit [Ping timeout: 240 seconds]
<certainty> newbie1r|2: there are binding for GUI toolkits for ruby, but i don't know their status. You might want to have a look here https://www.ruby-toolbox.com/categories/GUI_Frameworks
pu22l3r has joined #ruby
predator117 has joined #ruby
<shevy> lol DouweM
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
<certainty> newbie1r|2: dunno about the IDE, i don't use one
sailias has joined #ruby
S0da has quit [Remote host closed the connection]
claymore has joined #ruby
<shevy> newbie1r|2 either you want speed, then you go towards the C-family, or you want ease of useness, then you use ruby or python. both are rather equivalent; ruby-gnome works, but you should not underestimate the amount of time you have to spend to learn
<certainty> any language
lyubent has joined #ruby
estebanrules|awa has quit [Quit: Be back soon...]
lxsameer has quit [Quit: Leaving]
<Packardnode> soahccc ; how can i test that ?
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
<Packardnode> or find that*
aryaching has joined #ruby
dexter_ has joined #ruby
sailias has quit [Ping timeout: 240 seconds]
NicholasFlamel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phansch has joined #ruby
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
mojjojo has quit [Quit: mojjojo]
yasushi has quit [Remote host closed the connection]
<newbie1r|2> thanks for the info
Emmanuel_Chanel has joined #ruby
lolmaus has quit [Quit: No Ping reply in 180 seconds.]
lolmaus has joined #ruby
CharlieG has quit [Ping timeout: 264 seconds]
jonr22 has joined #ruby
Hanmac1 has joined #ruby
ShadySQL has joined #ruby
<ShadySQL> hi guys
<ShadySQL> I am no developer
<ShadySQL> just a SysAdmin
Hanmac has quit [Ping timeout: 241 seconds]
<ShadySQL> trying to work with Ruby and Vagrant
<ShadySQL> for Chef
<ShadySQL> I am on a MAC
<ShadySQL> I am trying to run a command
<ShadySQL> that throws a very bad exception
duggiefresh has joined #ruby
einarj has quit [Remote host closed the connection]
<ShadySQL> could anyone give me a hand
kennym1 has quit [Quit: Leaving.]
einarj has joined #ruby
<DouweM> ShadySQL: looks like log4r is not installed.
<tanathos> ShadySQL, it seems that you are missing a gem
<ShadySQL> let me install it
Kilo`byte has quit [Ping timeout: 240 seconds]
Fyyr13__ has joined #ruby
<ShadySQL> that was it!
<ShadySQL> thank you guys
<tanathos> :), good luck
<DouweM> :)
alexherbo2 has joined #ruby
etqqkoiflwhb___ has quit [Remote host closed the connection]
etqqkoiflwhb___ has joined #ruby
relix has joined #ruby
Fyyr13_ has quit [Ping timeout: 264 seconds]
alexherbo2 has quit [Client Quit]
einarj has quit [Ping timeout: 240 seconds]
Kilo`byte has joined #ruby
koderok has quit [Ping timeout: 264 seconds]
browndawg has joined #ruby
<shevy> test
CharlieG has joined #ruby
<tanathos> test back to you shevy
<DouweM> tanathos: shouldn't your username by thanatos
<DouweM> *be
<tanathos> DouweM, actually yes
<DouweM> Assuming you're going for the Greek word for death
newbie1r|2 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<tanathos> but I registered wrong, and I kind of sticked to it in the past 10 years
newbie1r has joined #ruby
<DouweM> hah, all right
newbie1r has quit [Client Quit]
<tanathos> let me put it this way, young and dumb
sparrovv has quit [Remote host closed the connection]
<DouweM> :P
<tanathos> but hey, I'm not a quitter :d
<DouweM> How many times has your error been pointed out to you?
lyubent has quit [Quit: Leaving.]
Mongey has joined #ruby
<tanathos> should we consider this to the sum?
<DouweM> sure
<ShadySQL> thats what she said tanathos :P
<tanathos> my calc givves a timeout error
Avahey_ has joined #ruby
<tanathos> something like twice / week x 52 weeks x 10 years
<DouweM> haha
<DouweM> that's a cool 1000 times, not bad
<tanathos> + the bastard friend that's always pointing it out
<shevy> I dont understand it ... on IRC I seem to be semi-connected more regularly but almost all websites are down for me :(
<DouweM> shevy: YES I have that all the time as well
<DouweM> shevy: IRC is like a fucking roach
CharlieG has quit [Ping timeout: 241 seconds]
Hanmac1 has quit [Ping timeout: 264 seconds]
<tanathos> shevy, I actually have another problem, while ssh-ing if I ll a folder I only get half of the content
mlpinit has joined #ruby
<DouweM> tanathos: that figure does leave me impressed by the number of people with some knowledge of Greek
<tanathos> DouweM, you would be impressed by the number of people clueless why I have this nickname
CharlieG has joined #ruby
<DouweM> as in they don't know what it means, or does it have some special meaning to you?
<tanathos> they have no ideea what it means
<tanathos> and when I say it's a greek god, they think of a salad
ndrei has joined #ruby
Hanmac has joined #ruby
jjbohn has joined #ruby
<DouweM> lol
dkamioka has joined #ruby
mlpinit has quit [Ping timeout: 240 seconds]
kennym has joined #ruby
<DouweM> I had Ancient Greek in high school, loved all the mythology
<DouweM> And it helped some when I was in Athens for EuRuKo last year :)
timonv has joined #ruby
<tanathos> nice
nari has quit [Ping timeout: 264 seconds]
<shevy> lol tanathos only half the content?
<shevy> that's kinda hilarious :)
arietis has joined #ruby
<shevy> "man I downloaded this video but only the first half"
<tanathos> it's quite annoying to be hones
<shevy> I shall kill my ISP the coming week
lw has joined #ruby
<tanathos> erm, that's not what I mean
<tanathos> I ssh in any linux server, and type ll, which is ls -al, but it stops in the middle of the listing
DrShoggoth has quit [Ping timeout: 265 seconds]
nomenkun_ has quit [Remote host closed the connection]
dkamioka has quit [Ping timeout: 240 seconds]
<shevy> it's so weird, without a fast connection I don't even feel like coding anything at all
nomenkun has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
away_ has joined #ruby
<tanathos> shevy, the secret is I am not coding, I'm a sys admin :d
<DouweM> shevy: how so? what does your connection have to do with coding
codeitagile has joined #ruby
<certainty> tanathos: flaky connection?
<tanathos> certainty, not sure, it's a fact, same machine same server with another connection works perfectly
CharlieG has quit [Ping timeout: 240 seconds]
<shevy> DouweM dunno, I don't really sit before my computer when I can't access the www
<DouweM> shevy: you never sit down just to code/work?
crystal77 has joined #ruby
twiceaday has quit [Ping timeout: 240 seconds]
no0code has quit [Remote host closed the connection]
peterhellberg has quit [Remote host closed the connection]
peterhellberg has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Gues_____ has joined #ruby
shevy has quit [Ping timeout: 265 seconds]
Gues_____ is now known as CorpusCallosum
nomenkun has quit [Remote host closed the connection]
shevy has joined #ruby
DrShoggoth has joined #ruby
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
<certainty> tanathos: strange
einarj has joined #ruby
<certainty> op around to ban away_?
banister has joined #ruby
eka has joined #ruby
hello has joined #ruby
<tanathos> certainty, I just found come cns=0 option that seems to do the trick
hello is now known as Xuis_
<certainty> DouweM: he doesn't know how, without the www :p
niklasb has joined #ruby
<certainty> tanathos: never heard of that. what does it do?
einarj has quit [Read error: Operation timed out]
nomenkun has joined #ruby
CorySimmons has joined #ruby
<tanathos> seems like no idle
<tanathos> or similar
<tanathos> I actually need to change ISP
LadyRainicorn has joined #ruby
IceDragon has joined #ruby
glosoli has joined #ruby
francisfish has joined #ruby
Mongey has quit [Quit: Mongey]
Hanmac1 has joined #ruby
jph98 has joined #ruby
Fyyr13__ has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 240 seconds]
Squarepy has quit [Quit: Leaving]
leonidlm has quit [Ping timeout: 240 seconds]
CorySimmons has quit [Ping timeout: 240 seconds]
closures999 has quit [Remote host closed the connection]
godd2 has joined #ruby
Hanmac has joined #ruby
<shevy> DouweM hmm not really, I only code when I have specific needs, like yesterday when I extended class Extracter which extracts archives for me; I needed that mostly just so I can download remote packages, and re-package them locally. Without internet connection, this is almost totally useless though
<shevy> I just got reconnected :\
minasmazar has joined #ruby
<shevy> <DouweM> shevy: you never sit down just to code/work?
<shevy> * Disconnected (Remote host closed socket).
<shevy> -ChanServ- [#ruby] Welcome to #ruby. || http://www.ruby-lang.org || http://www.modruby.net
<shevy> I guess I need to find another ISP
<DouweM> right, makes sense if it's just hobby coding and writing scripts to solve your own problems
francisfish has quit [Ping timeout: 240 seconds]
closures999 has joined #ruby
<certainty> i must say though that I frequently need to look something up as well while I code
Hanmac1 has quit [Ping timeout: 265 seconds]
<DouweM> oh, definitely
Umschwung has joined #ruby
Umschwung has quit [Max SendQ exceeded]
jamto11 has quit [Remote host closed the connection]
Umschwung has joined #ruby
Umschwung has quit [Max SendQ exceeded]
<DouweM> but I'm still reasonably productive without it (possibly even more, without distractions like reddit and IRC), and with work I don't really have the choice to not code :P
<LadyRainicorn> Reading documentation is 90% of coding.
<LadyRainicorn> shevy: You lost internet*
<DouweM> LadyRainicorn: docs can be downloaded though :)
<LadyRainicorn> True.
Umschwung has joined #ruby
<certainty> DouweM: oh yeah, I concentrate on the things I need. My irc session is in another console and I shutdown my email client etc.
ruby-lang665 has joined #ruby
<shevy> yeah I can code without www connection, I have a lot of local docu; but the fun isn't there when I can not connect :(
billy_ran_away has quit [Ping timeout: 252 seconds]
toastynerd has joined #ruby
closures999 has quit [Ping timeout: 240 seconds]
lw has quit [Quit: s]
<LadyRainicorn> Do people ever not have internet anymore?
<certainty> shevy: does not from time to time :p
<shevy> yes! when they have shitty providers for instance!
james_d_h has joined #ruby
foredoomed has quit [Remote host closed the connection]
<DouweM> I like to work at night, and for "maintenance reasons" my connection goes down from like 1AM to 4AM every couple of weeks
<DouweM> So that's annoying
bluenemo has joined #ruby
<DouweM> But as I said, without distractions I'm actually surprisingly productive
<shevy> hehe
<certainty> all of us are
<DouweM> :)
<shevy> I am not, I only get sad without distractions :(
<certainty> we have smileys at work that signal our coworkers the current tolerance for distractions
<DouweM> But I make pretty heavy use of OS X desktop. I have one for Casual stuff, Work stuff and School stuff, and stuff like Reddit and IRC are only on the Casual one
<shevy> certainty really?
<certainty> shevy: yeah
<DouweM> certainty: ah, I need that. Nothing is more annoying than being deep in the trenches with some problem and being called over by a coworker to help with some inane problem
<certainty> it's super annoying when supporters step in and ask something
CharlieG has joined #ruby
<shevy> hehehe
<certainty> our boss is cool in that regard. He used to be a developer too
<certainty> so he knows that programmers need time to get in a mental state where they have everything they need
<shevy> and what is he now
<shevy> chief monkey?
<shevy> DRUGS
<shevy> GIRLS
<shevy> COFFEE
codeitagile has quit [Remote host closed the connection]
<shevy> WORKING INTERNET CONNECTION
<ruby-lang665> I need some help with a text-editorish thing I'm making
closures999 has joined #ruby
<certainty> shevy: CEO
<shevy> ruby-lang665 describe
james_d_h has quit [Ping timeout: 252 seconds]
tgkokk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<LadyRainicorn> Ooh drugs girls coffee and internet yay!
<DouweM> certainty: yeah, my colleagues respect that as well, I just need some way to signal to them that I'm busy *before* they call for my attention
<ruby-lang665> My code at the moment basically reads: str = gets.chomp \n filename.syswrite(str)
<ruby-lang665> So at the moment it's limited to just one line
<certainty> DouweM: fair enough
codeitagile has joined #ruby
<ruby-lang665> Anyway I could make it multi-line?
<LadyRainicorn> That isn't valid Ruby, at all.
<shevy> ruby-lang665 .chomp with \n wants "", so it should be changed to "\n"
<certainty> DouweM: for us that little smiley system workes great
<DouweM> certainty: how exactly does it work?
<ruby-lang665> nah the comps doesnt actually have a \n in it at all, i was just using it to show 2 seperate lines of code
monsieurp has joined #ruby
<shevy> ruby-lang665 not sure what you mean with limited to just one line; your editor makes a newline if you hit the enter key? I also am not sure what is syswrite or basically - what is your intent with that code
<shevy> ruby-lang665 use ; instead even on IRC
<certainty> DouweM: we have piece of paper with smileys on it and an arrow that points to the currently active one. Much like a clock
<shevy> and if it is already 2 lines, it is multi-line, is it not? :)
<ruby-lang665> I meant the input/output is only one line
<DouweM> certainty: ha, that's awesome. I was thinking some digital system
timonv has quit [Remote host closed the connection]
<ruby-lang665> jhass: that looks like it should work, thank you
<DouweM> certainty: but they'd need to walk over to see the "status"?
crystal77 has quit [Quit: Computer has gone to sleep.]
<certainty> DouweM: they open the door which we barely realize anymore and look at the signs
monsieurp has quit [Client Quit]
Xuis_ has quit [Quit: Leaving]
<DouweM> certainty: ah, right. we're all in one room, so there's no walking over, just shouting my name
<shevy> DOUWEEEEEEEEEEEEEEEEEEEEEEEEM!
<DouweM> drop the M, and yeah, pretty much
<certainty> DouweM: eww that's bad. Put it on the wall somewhere
<shevy> I would be a very annoying co-worker :)
<certainty> i can imagine
<shevy> hah I would just call you duuuuuuuuuuuude
<DouweM> certainty: meh, we're only in the office one day a week, so the other days my productivity and concentration are great :P
<shevy> "duuuuuuuuuude I have a problem can you heeeeeeeelp!"
<certainty> DouweM: hah, then it's not as much of a problem
<DouweM> shevy: shad ahp
etqqkoiflwhb___ has quit [Remote host closed the connection]
pu22l3r has quit [Remote host closed the connection]
<shevy> haha :)
<DouweM> certainty: communication during the rest of the week goes over skype, which has a digital equivalent of your smiley system in the form of a status :p
<certainty> besides coworkers that aren't programmers know that it doesn't make much sense to disturb us while we're working on something. I remember when a coworker told me that he talked to me while I was noding and he literally was able to see that my mind was not present for like 30 seconds
aryaching has quit [Ping timeout: 252 seconds]
<DouweM> :)
<certainty> also i get mad :p
cover has quit [Remote host closed the connection]
mikepack has joined #ruby
<certainty> of course we grant the same rights to our ops, so we're all equal there
cover has joined #ruby
<DouweM> certainty: where do you work?
<certainty> DouweM: a webhoster in the north of germany
<DouweM> what do they use ruby for?
<shevy> p0rn
<DouweM> :')
<certainty> that too :p
<shevy> and selling fish
<shevy> which needs a webshop
redlines has quit [Ping timeout: 240 seconds]
arubin has joined #ruby
redlines has joined #ruby
<shevy> and the leftovers become fish and chips
<ruby-lang665> Okay, everything seems to work except it's just coming out as one long string
<ruby-lang665> how do include line breaks?
<shevy> which gets imported into the UK
<DouweM> ruby-lang665: show all of your code
<certainty> DouweM: mostly to enable automation of our processes. Also we have two big internal rails apps that we use to manage our datacenter and our customers. Another rails app is facing the public as the customer interface
<DouweM> certainty: ah, interesting
godd2 has quit [Ping timeout: 245 seconds]
<DouweM> certainty: what's the ISP called? I'm from the Netherlands so maybe I know them
<shevy> ruby-lang665 You must formulate your questions more accurately. If your question is: "How do I include line breaks in a string?", the answer could be via adding "\n". Like: puts "Hello\n world!"
<certainty> and most importantly the irc bot in our internal network
Hanmac has quit [Ping timeout: 240 seconds]
<certainty> DouweM: omc.net, i doubt you know it though.
<DouweM> correct, never heard of it
<certainty> heh
chipotle has quit [Quit: cya]
<DouweM> your domains are hella expensive ;)
<certainty> DouweM: yeah it's not the mass market we target as a company of our size can't compete with the big ones like Strato
CharlieG has quit [Ping timeout: 240 seconds]
<DouweM> who do you target?
<certainty> DouweM: we concentrate on managed dedicated servers and ha clusters
<DouweM> ah all right
carif has joined #ruby
<DouweM> ruby-lang665: your constant chomping removes the newline
<DouweM> ruby-lang665: why chomp at all?
bluenemo has quit [Ping timeout: 240 seconds]
Hanmac has joined #ruby
<jhass> ruby-lang665: first things first: indent your code! (use two spaces), use proper variable names! (@filename, not @flnm)
LinearInterpol has joined #ruby
<ruby-lang665> To be honest, i don't know anything other then gets.chomp for input
<ruby-lang665> What else is there?
<certainty> could also mean @fullname
<certainty> maybe i should look at the gist
<ruby-lang665> My problem is that if my input is 1;2;3; it come back as 123 and not 1 2 3 on 3 seperate lines
<jhass> ruby-lang665: gets (http://rubydoc.info/stdlib/core/Kernel#gets-instance_method) is a method that returns a string, on which you call the chomp method (http://rubydoc.info/stdlib/core/String#chomp-instance_method)
fagianijunior has joined #ruby
<DouweM> ruby-lang665: just use gets
<DouweM> ruby-lang665: like jhass says, you're calling two methods there, gets followed by chomp on its return value
s00pcan has joined #ruby
Hello has joined #ruby
Mongey has joined #ruby
fagianijunior has quit [Read error: Connection reset by peer]
<jhass> ruby-lang665: also don't use :: to call methods, File::exists? -> File.exists?
mlpinit has joined #ruby
alexherbo2 has joined #ruby
<jhass> apeiros: Mon_Ouie away_ spams
sparrovv has joined #ruby
<ruby-lang665> I've just been following tutorialspoint and that's how they did it
<DouweM> seconding that, away_ deserves a kick or ban
<DouweM> ruby-lang665: then the tutorial is bad
<ruby-lang665> Just with regards to the :: versus .
nomenkun has quit [Remote host closed the connection]
Hello has quit [Client Quit]
<DouweM> ruby-lang665: if they're doing that, the rest can't be trusted either
<DouweM> let's say it doesn't speak to the quality of the tutorial
<DouweM> shut up away_
timonv has joined #ruby
<ruby-lang665> Okay, I get you
skaflem has quit [Quit: Leaving]
<ruby-lang665> Any idea how to fix my main problem though?
<DouweM> ruby-lang665: as said, get rid of the chomp. and figure out what your code is actually doing by checking the links jhass provided
Advocation has quit [Quit: Advocation]
Vovko has joined #ruby
<certainty> ruby-lang665: oneofy ourpr oble msmig htbe t heoddfor mat tin g
<jhass> ruby-lang665: as a last tip, always use the block form of File.open (File.open(..) do |file| file.read / file.write end) or the File.read/File.write to read/write the whole file at once
<DouweM> certainty: :)
ndrst has quit [Ping timeout: 264 seconds]
mlpinit has quit [Ping timeout: 244 seconds]
Mongey has quit [Quit: Mongey]
toastynerd has quit [Remote host closed the connection]
tvw has joined #ruby
godd2 has joined #ruby
<ruby-lang665> Now !EXIT no longer does anything in the write method
<jhass> ruby-lang665: what does chomp do?
<jhass> explain that to us
<DouweM> jhass, asking the hard questions
<ruby-lang665> Not a novice I swear :L
<DouweM> *tough was the word I was looking for. please accept this correction
<DouweM> ruby-lang665: you sure about that?
<ruby-lang665> Heavy sarcasm. I will admit, I honestly have no idea what chomp does. I just saw it, used it, went "Hey this works" and went on my merry way.
jonr22 has quit [Remote host closed the connection]
<apeiros> jhass: what what what?
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<DouweM> ruby-lang665: that might be your problem. read the chomp docs
<jhass> ruby-lang665: did you yet read the documentation I linked you?
toastynerd has joined #ruby
<DouweM> ruby-lang665: and the gets docs while you're at it
<jhass> apeiros: away_ does query spam
FOSScookie has joined #ruby
<ruby-lang665> Will do
<apeiros> jhass: can't police queries, sorry. use /ignore
Vovko has quit [Ping timeout: 265 seconds]
yarou has joined #ruby
<DouweM> apeiros: blocking them here may stop them from finding out about our existence?
<ruby-lang665> Still, can you tell me why !EXIT no longer works if I still don't understand after reading the docs?
<jhass> pretty sure it's a bot, but okay, I'll ask #freenode
datacrusher has joined #ruby
<apeiros> DouweM: pointless. next step is to just have two bots. one collect the nicks, one spamming.
<apeiros> but asking #freenode is a good idea. they can verify whether it is a bot an kline it.
deadlock has quit [Read error: No route to host]
<DouweM> ruby-lang665: what does gets return? more specifically, what is the last character? what did chomp change about the return value of gets? why was it equal to "!EXIT" then, but now no longer?
<DouweM> apeiros: fair enough
chrisseaton has quit []
<DouweM> ruby-lang665: and following from that, what would you need to compare it to now, rather than to "!EXIT"?
CorpusCallosum has quit [Ping timeout: 264 seconds]
Waheedi has joined #ruby
MrPopinjay has joined #ruby
maximski has quit []
mikepack has quit [Remote host closed the connection]
shevy has quit [Remote host closed the connection]
<ruby-lang665> The "\n" is in gets but not in chomp
Salve has quit [Remote host closed the connection]
<MrPopinjay> Hello all. Is there a good clean way to expand an array to a certain size if it is too small?
Salve has joined #ruby
duggiefresh has quit []
cina has joined #ruby
foredoomed has joined #ruby
<DouweM> ruby-lang665: Yay! So what would you need to compare gets to now?
<DouweM> ruby-lang665: note that removing that \n is exactly what chomp does
<jhass> MrPopinjay: what do you mean with too small?
sski has joined #ruby
<MrPopinjay> Smaller than that certain size.
<DouweM> jhass: why would you care about expanding the size of the array? reading values out of bounds returns nil anyway
<LadyRainicorn> a += Array.new(desired-a.length) if a.length < desired
<DouweM> LadyRainicorn: WHY though
BackEndCoder has joined #ruby
<ruby-lang665> Got it! break if str == "!EXIT\n"
CharlieG has joined #ruby
<DouweM> ruby-lang665: yay
<ruby-lang665> I have the stupidest smile on my face right now
Hello has joined #ruby
<jhass> MrPopinjay: you can assign arbitrary indicies, a = []; a[20] = "whatever". So it's really about your usecase
<DouweM> ruby-lang665: note that in this case you could still use str.chomp == "!EXIT"
<DouweM> ruby-lang665: it doesn't affect the str itself which does contain the "\n" at the end, so it'd still add the right string to your file
vlad_starkov has joined #ruby
<MrPopinjay> This library I'm using outputs arrays of length 2 sometimes, but it wants an array of size 3 back. The input doesn't match the output... So I was wondering if there was a simple way to pad out arrays to a certain size
Hanmac1 has joined #ruby
<DouweM> MrPopinjay: why do you care about the exact size of the array?
<LadyRainicorn> Oh, a[desired] = a[desired]
<DouweM> LadyRainicorn: nice
<MrPopinjay> Because the library does. It drops 0s from these arrays it returns, yet it wants them back with the 0s in.
<MrPopinjay> I think
vlad_starkov has quit [Remote host closed the connection]
lw has joined #ruby
<ruby-lang665> IT LIVES
<DouweM> MrPopinjay: strange. but yeah, if you really need it, use LadyRainicorn's suggestion
<ruby-lang665> Thank you so much for your help!
<DouweM> ruby-lang665: hahaha
Salve has quit [Ping timeout: 265 seconds]
CaptainJet has joined #ruby
maximski has joined #ruby
maximski has quit [Max SendQ exceeded]
foredoomed has quit [Ping timeout: 240 seconds]
<ruby-lang665> A few touches I need to do for navigating dirs and displaying files but that's easy enough
<MrPopinjay> LadyRainicorn, DouweM Thank you
Hanmac has quit [Ping timeout: 252 seconds]
<MrPopinjay> This is annoying.
<DouweM> ruby-lang665: also, get with indentation
<ruby-lang665> Once again, thank you very much!
<LadyRainicorn> It sounds like an annoying sort of library.
<ruby-lang665> The reason for no indentation is I've been doing coding over ssh in nano
<DouweM> ruby-lang665: nano doesn't support space bar?
<ruby-lang665> Wanted to see if I could and then I got carried away
<ruby-lang665> Not automatically
<DouweM> yeah, I'm just kidding :P
<LadyRainicorn> Wow.
<ruby-lang665> I mean no automatic indentation
<LadyRainicorn> Use a better editor.
<DouweM> but still, don't try to code using nano
<LadyRainicorn> Like ed.
<ruby-lang665> inb4 vim
<LadyRainicorn> ;p
<MrPopinjay> what about vi- damnit
<DouweM> why are you devving over ssh anyway
<LadyRainicorn> ed ftw.
<ruby-lang665> Proof of concept
vlad_starkov has joined #ruby
Hello has quit [Remote host closed the connection]
FOSScookie has left #ruby [#ruby]
alexju has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
<jhass> ruby-lang665: I manually indent in nano all the time
<ruby-lang665> The machine I'm sshing into is 5 feet away from me
<jhass> that's no excuse at all
<ruby-lang665> It's just been a slow day
cina has quit [Quit: leaving]
<ruby-lang665> But yeah, I'll make sure to indent next time
<LadyRainicorn> betterrthannano() { cat > $1 }
cina has joined #ruby
<certainty> :)
glosoli has quit [Quit: Textual IRC Client: www.textualapp.com]
browndawg has quit [Quit: Leaving.]
<ruby-lang665> Although I see no idea why I would code in nano/over ssh again
UserNameInvalid has joined #ruby
pu22l3r has joined #ruby
Mongey has joined #ruby
<DouweM> ruby-lang665: what platform are you on?
Graawr has joined #ruby
<ruby-lang665> Currently windows, sshing with putty into crunchbang
chrisseaton has joined #ruby
<ruby-lang665> I prefer devving on linux much much more than windows
<certainty> where is shevy when you need him
<LadyRainicorn> SHEVY.
<DouweM> certainty: has that every happaned
<LadyRainicorn> I SUMMON THEE.
<DouweM> *happened
<DouweM> *ever
<DouweM> jesus
ruby-lang665 has quit [Quit: Page closed]
<certainty> DouweM: yeah just now. I wanted to show him that he's not alone
<certainty> i mean sshing into putty
<DouweM> hah
<certainty> erm
<certainty> from putty
browndawg has joined #ruby
<LadyRainicorn> sshing into putty would be awful.
<certainty> don't they have server thingy also?
IceDragon has quit [Ping timeout: 269 seconds]
toastynerd has quit [Remote host closed the connection]
<havenwood> MrPopinjay: another option would be along these lines: a = [1, 2]; (3 - a.size).times { a << nil }; a #=> [1, 2, nil]
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
CharlieG has quit [Ping timeout: 240 seconds]
morenoh149 has joined #ruby
nouitfvf_ has joined #ruby
shevy has joined #ruby
nouitfvf has quit [Ping timeout: 252 seconds]
koderok has joined #ruby
<shevy> test
toastynerd has joined #ruby
saarinen has joined #ruby
bthesorceror has joined #ruby
User458764 has joined #ruby
<certainty> for the specific case of a two element array that always has to be padded to three elements, one could simply do a | [nil]
<certainty> screw that
<certainty> i need a shot
<certainty> not 6pm yet
* shevy shoots at certainty
crystal77 has joined #ruby
pu22l3r has quit [Remote host closed the connection]
<Hanmac1> havenwood: what about this: (i used 6-size array)
<Hanmac1> >> a = [1, 2]; a[5] ||= nil; a
<eval-in> Hanmac1 => [1, 2, nil, nil, nil, nil] (https://eval.in/116472)
Hanmac1 is now known as Hanmac
CharlieG has joined #ruby
<certainty> shevy: ruby-lang665 does ssh into his dev box from windows via putty just like you
koderok has quit [Client Quit]
<shevy> oh man
<shevy> he has my pity
cina has quit [Quit: leaving]
koderok has joined #ruby
<havenwood> Hanmac: ah, nice trick to take advantage of filling in nils!
<havenwood> Hanmac: i like
pfg has joined #ruby
klaut_ has quit [Remote host closed the connection]
browndawg has left #ruby [#ruby]
deadlock has joined #ruby
<Hanmac> havenwood: "if you liked that, then you will love that:
<Hanmac> >> a=[1,2]; a.fill(nil,a.size...6)
<eval-in> Hanmac => [1, 2, nil, nil, nil, nil] (https://eval.in/116475)
cina has joined #ruby
shevy has quit [Ping timeout: 240 seconds]
<havenwood> Hanmac: reads more clearly :)
jefflyne has quit [Ping timeout: 265 seconds]
CharlieG_ has joined #ruby
alexju has quit [Remote host closed the connection]
nomenkun has joined #ruby
CharlieG has quit [Ping timeout: 265 seconds]
jefflyne has joined #ruby
Mongey has quit [Read error: Connection reset by peer]
lyubent has joined #ruby
Mongey has joined #ruby
Salve_ has joined #ruby
NicholasFlamel has joined #ruby
zorak has joined #ruby
amclain has joined #ruby
newbie1r has joined #ruby
s00pcan has quit [Remote host closed the connection]
oneawaymann has joined #ruby
oneawayman has quit [Read error: Connection reset by peer]
nomenkun has quit [Ping timeout: 265 seconds]
Umschwung has quit [Ping timeout: 244 seconds]
CharlieG_ has quit [Ping timeout: 240 seconds]
Graawr has quit [Quit: Bye :)]
carif has quit [Ping timeout: 244 seconds]
HelloWorld has joined #ruby
glosoli has joined #ruby
yubrew has joined #ruby
markalanevans has quit [Quit: markalanevans]
User458764 is now known as User458764_NotHe
<LadyRainicorn> Be careful with ||= as it will overwrite false.
mlpinit has joined #ruby
godd2 has quit [Ping timeout: 245 seconds]
<zorak> im getting this error, know what it means?
<zorak> SyntaxError: Documentos/Ruby/movies.rb:40: invalid multibyte char (US-ASCII)
<zorak> Documentos/Ruby/movies.rb:40: invalid multibyte char (US-ASCII)
<zorak> Documentos/Ruby/movies.rb:40: syntax error, unexpected $end, expecting keyword_end
<zorak> ^
<zorak> puts "Se a actualizado la información sobre #{title}"
<zorak> from /usr/bin/irb:12:in `<main>'
yubrew has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Ping timeout: 240 seconds]
newbie1r has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
oneawaymann has quit [Ping timeout: 240 seconds]
<zorak> solved
<zorak> :) # encoding: utf-8
shredding has quit [Quit: shredding]
ndrst has joined #ruby
<zorak> who is the moderator of this chat?
<havenwood> zorak: /msg ChanServ ACCESS #ruby LIST
<zorak> away_ is spamming me with a "weebcam en diiirecto"
<HelloWorld> howdy havenwood
MrPopinjay has quit [Quit: leaving]
<havenwood> HelloWorld: hi
LinearInterpol has quit [Remote host closed the connection]
jjbohn has quit [Quit: Leaving...]
<zorak> havenwood: away_ is spamming me with a weebcam en diiirecto [LINK] message
tjr9898__ has quit [Remote host closed the connection]
Wolland has joined #ruby
<certainty> zorak: ignore it
<droptone> question: we're interested in usig jplayer in our rails 3.2 app, I've deployed the jplayer gem that adds it to the asset pipeline, but I cannot find any demonstraitons of how to actually implement jplayer in ruby code.
<havenwood> zorak: i meant that is the command to see the channel operators, do /ignore away_
chuk has joined #ruby
<droptone> Does anyone have any examples of how to implement jplayer?
toastynerd has quit [Remote host closed the connection]
visof has quit [Ping timeout: 240 seconds]
chrisseaton has quit []
Ziarkaen has joined #ruby
<LadyRainicorn> jplayer is all JS.
<LadyRainicorn> You don't use any Ruby code, except maybe to serve the video.
<LadyRainicorn> http://jplayer.org/ has docs
timonv has quit [Remote host closed the connection]
oneawayman has joined #ruby
chuk has quit [Client Quit]
ggherdov_ has quit [Changing host]
ggherdov_ has joined #ruby
ggherdov_ has quit [Changing host]
ggherdov_ has joined #ruby
kennym has quit [Quit: Leaving.]
HelloWorld has quit [Quit: Leaving]
foredoomed has joined #ruby
timonv has joined #ruby
cina has quit [Quit: leaving]
klaut_ has joined #ruby
perlsyntax has joined #ruby
tjr9898 has joined #ruby
marcdel has joined #ruby
foredoomed has quit [Ping timeout: 244 seconds]
Hanmac1 has joined #ruby
Mongey has quit [Quit: Mongey]
chipotle has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
klaut_ has quit [Ping timeout: 240 seconds]
Mongey has joined #ruby
marcdel has quit [Ping timeout: 240 seconds]
Umschwung has joined #ruby
User458764_NotHe is now known as User458764
lyubent has quit [Quit: Leaving.]
timonv has quit [Remote host closed the connection]
sparrovv has quit [Remote host closed the connection]
marcdel has joined #ruby
banister has joined #ruby
CharlieG has joined #ruby
armyriad has quit [Ping timeout: 240 seconds]
BackEndCoder has quit [Read error: Connection reset by peer]
Xaitec has joined #ruby
crystal77 has quit [Quit: Computer has gone to sleep.]
tjr9898 has quit [Remote host closed the connection]
sambao21 has joined #ruby
CaptainJet has quit []
iliketurtles has joined #ruby
sigurding has joined #ruby
einarj has joined #ruby
BuSerD has joined #ruby
CorySimmons has joined #ruby
vjt_ has quit [Quit: reboot]
iliketurtles has quit [Client Quit]
sambao21 has quit [Client Quit]
francisfish has joined #ruby
montyboy has joined #ruby
armyriad has joined #ruby
sambao21 has joined #ruby
CorySimmons has quit [Ping timeout: 240 seconds]
CaptainJet has joined #ruby
einarj has quit [Ping timeout: 244 seconds]
francisfish has quit [Ping timeout: 244 seconds]
sambao21 has quit [Remote host closed the connection]
weems has quit [Read error: Connection reset by peer]
iliketurtles has joined #ruby
CharlieG has quit [Ping timeout: 240 seconds]
vjt has joined #ruby
workmad3 has joined #ruby
yacks has quit [Ping timeout: 264 seconds]
jph98 has quit [Quit: jph98]
njs126 has joined #ruby
BackEndCoder has joined #ruby
UserNameInvalid has quit [Ping timeout: 240 seconds]
TuxLyn has joined #ruby
<TuxLyn> Does ruby have error ignore something like @ in php ?
User458764 is now known as User458764_NotHe
bthesorceror has quit [Remote host closed the connection]
weems has joined #ruby
codeitagile has quit [Quit: Leaving.]
nisstyre has joined #ruby
toastynerd has joined #ruby
chipotle has quit [Quit: cya]
crystal77 has joined #ruby
User458764_NotHe is now known as User458764
decoponio has quit [Quit: Leaving...]
hidensoft has joined #ruby
<hidensoft> hi guys, i'm trying to install ruby with rbenv , i got this , uncommon.mk:180: recipe for target 'build-ext' failed ,what is that mean ? archlinux/x86_64
chris_thomson has joined #ruby
codeitagile has joined #ruby
chipotle has joined #ruby
chipotle has quit [Client Quit]
<atmosx> TuxLyn: rescue
<TuxLyn> atmosx, thanks I just got it ^_^
<atmosx> TuxLyn: begin/rescue/end
<TuxLyn> I used rescue Exception => e
<atmosx> TuxLyn: es, that's generic. Can be way more specific
sigurding has quit [Quit: sigurding]
<vjt> TuxLyn: be careful with rescue Exception, as that will swallow all possible errors, and is not what you want
<TuxLyn> actually I just needed rescue Exception :)
<TuxLyn> to ignore any errors :)
yubrew has joined #ruby
<TuxLyn> because my match's was trowing errors if its empty
<TuxLyn> so now it ignores when there is no value
<vjt> then a better approach is to better build your match :)
Speed has joined #ruby
<TuxLyn> what is all this private messages from away_ ?
<TuxLyn> some kind of webcam crap
<TuxLyn> this >>>>> <away_> weebcam en diiirecto --> http://s422803032.mialojamiento.es/
<TuxLyn> O_o
<vjt> you could, e.g., do not run the match at all if the value is blank
<TuxLyn> yeah rescue worked for me thanks all
Xaitec has left #ruby [#ruby]
jph98 has joined #ruby
Mongey has quit [Quit: Mongey]
<hidensoft> i couldn't find anything on google :S
tjr9898 has joined #ruby
<Hanmac1> ping apeiros
<TuxLyn> Any OPs here ?
Hanmac1 is now known as Hanmac
<TuxLyn> please BAN > away_
<Hanmac> TuxLyn: i already ping'd one
<TuxLyn> keeps spamming me with away messages
<TuxLyn> I mean with private messages
Mongey has joined #ruby
<TuxLyn> keeps sending me that link above ^
<hidensoft> TuxLyn, ignore him
<TuxLyn> away_, yo dumb ass stop spamming me!!!
<vjt> TuxLyn: /ignore away_ :)
<TuxLyn> perfect
<TuxLyn> thanks vjt
Lewix has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
klaut_ has joined #ruby
yubrew has quit [Ping timeout: 265 seconds]
<vjt> ^_^
<TuxLyn> did not know I could do that awesome ^_^
UserNameInvalid has joined #ruby
glosoli has quit [Quit: Textual IRC Client: www.textualapp.com]
choomalot is now known as bluntman
<apeiros> what's up?
<vjt> apeiros: /kb away_ spammer
<TuxLyn> yeah
<TuxLyn> apeiros, away_ needs to go away!
<apeiros> vjt, TuxLyn: I can't/don't police private messages. sorry.
<apeiros> you can inform #freenode about it
<TuxLyn> apeiros, np just ignoring him now ^_^
codeitagile has quit [Remote host closed the connection]
<TuxLyn> I wish there where legal way to DDoS spammers/scammers to stone ages.
User458764 is now known as User458764_NotHe
<certainty> DDoS is a bad measure and even worse counter measure
tjr9898 has quit [Remote host closed the connection]
<certainty> it disrupts the flow of information
<hidensoft> anyone got this before ? "uncommon.mk:180: recipe for target 'build-ext' failed" ?
<hidensoft> i'm trying to install ruby 2.1-1 with rbenv
lw has quit [Quit: s]
minasmazar has quit [Ping timeout: 252 seconds]
User458764_NotHe is now known as User458764
tgkokk has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
<hidensoft> pff, gotta install ruby with packages
lw has joined #ruby
User458764 is now known as User458764_NotHe
User458764_NotHe has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dseitz has joined #ruby
wshobson has joined #ruby
NicholasFlamel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nfk has quit [Quit: yawn]
davedev2_ has joined #ruby
iliketurtles has joined #ruby
Waheedi has quit [Quit: Waheedi]
Mongey has quit [Quit: Mongey]
naturtrunken has joined #ruby
mary5030 has joined #ruby
davedev24 has quit [Ping timeout: 265 seconds]
Vovko has joined #ruby
wshobson has left #ruby [#ruby]
mary5030 has quit [Remote host closed the connection]
datacrusher has quit [Remote host closed the connection]
zcreative has joined #ruby
akitada has quit [Quit: Connection closed for inactivity]
MatthewsFace has joined #ruby
sigurding has joined #ruby
MatthewsFace has quit [Client Quit]
lw has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
lw has joined #ruby
sparrovv has joined #ruby
CharlieG has joined #ruby
Shidash has joined #ruby
MatthewsFace has joined #ruby
chris_thomson has quit []
<TuxLyn> certainty, yes you're right, perhpas something more direct :)
ktosiek has quit [Read error: Operation timed out]
iliketurtles has quit [Quit: zzzzz…..]
NicholasFlamel has joined #ruby
koderok has quit [Quit: koderok]
perlsyntax has quit [Quit: Textual IRC Client: www.textualapp.com]
Speed has quit [Ping timeout: 253 seconds]
dkamioka has joined #ruby
ktosiek has joined #ruby
lyubent has joined #ruby
lyubent has left #ruby [#ruby]
jjbohn has joined #ruby
Slavox|AFK is now known as Slavox
kemist has joined #ruby
afreidah has joined #ruby
sdouglas has joined #ruby
minasmazar has joined #ruby
sigurding has quit [Quit: sigurding]
mourest has quit [Remote host closed the connection]
jackneill has quit [Ping timeout: 240 seconds]
glosoli has joined #ruby
<certainty> TuxLyn: ignoring is quite direct
mojjojo has joined #ruby
axl_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<TuxLyn> ^_^ indeed
tectonic has joined #ruby
Vovko has quit [Remote host closed the connection]
chris_thomson has joined #ruby
CharlieG_ has joined #ruby
sepp2k1 has joined #ruby
<pontiki> although it does not have the visceral appeal that would ease one's bloodlust
<apeiros> certainty: it's missing the screaming due to burning of the spammer, though
<pontiki> that's another way of saying it
* apeiros gets killed in skyrim :(
sepp2k has quit [Ping timeout: 244 seconds]
<certainty> apeiros: yeah, didn't say it was as much as fun ;)
albedoa has joined #ruby
<apeiros> how come they give you missions in the very first town which you can't possibly beat the next 15 levels? :-S
<pontiki> arrow to the fricken knee, man, arrow to the fricken knee
<TuxLyn> Any one knows how to do file-based ignore list ? Something like filter list based on array or a list.
Speed has joined #ruby
<TuxLyn> I want to have a list of keywords that will be ignored.
diegoviola has joined #ruby
jamto11 has joined #ruby
<pontiki> not quite sure what you're asking there
toastynerd has quit [Remote host closed the connection]
<pontiki> you'd need the list in your code to do the compare
<TuxLyn> for example if I have ignore.txt file and have keywords there like one, two, three
<pontiki> do just want a way to save it between executions?
lw has quit [Read error: Connection reset by peer]
CharlieG has quit [Ping timeout: 240 seconds]
<pontiki> you could use a yaml file, forexample
<TuxLyn> then when I do my match's in code I then do something like; next if title =~ /key/i
CorySimmons has joined #ruby
lw has joined #ruby
sambao21 has joined #ruby
<TuxLyn> haven't tried yaml, but still I just want to have simple txt file of keywords that I can use as ignore list.
marcdel has quit []
Klumben has quit [Remote host closed the connection]
<TuxLyn> So whenever I do match's it checks agains this list and skips
Hobogrammer has quit [Read error: Connection reset by peer]
<pontiki> no matter, you still need to have the list of words in an array
CharlieG_ has quit [Ping timeout: 240 seconds]
<TuxLyn> yeah
<pontiki> figure that out first, then you can figure out how to store/retrieve the list of words
Fyyr13_ has joined #ruby
<TuxLyn> actually I have something simular I use already in one of my scripts, I will try to use same aproach for this
pskosinski has quit [Quit: Til rivido Idisti!]
<TuxLyn> in other script I have list of uuids script always checks
toastynerd has joined #ruby
<TuxLyn> if it already exists it skips it
<TuxLyn> I'm using > if File.readlines(txt).grep(/#{uuid}/).empty?
<TuxLyn> so I'll try to do the same for ignore list ^_^
CorySimmons has quit [Ping timeout: 252 seconds]
monkegjinni has joined #ruby
albedoa has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sigurding has joined #ruby
lw has quit [Quit: s]
Fyyr13_ has quit [Ping timeout: 240 seconds]
_lynX has joined #ruby
<certainty> TuxLyn: note that this will do more work than needed as .grep will go through all lines
centrx has joined #ruby
<TuxLyn> yes but I will have seperate filter.txt file this way that I can have many keywords in
armyriad has quit [Read error: Connection reset by peer]
<certainty> TuxLyn: yeah that's not my point though :)
armyriad has joined #ruby
UserNameInvalid has quit [Ping timeout: 252 seconds]
<TuxLyn> I kind of have an idea of what I need to do :) But if I get stuck I'll try asking here ^_^
tjr9898 has joined #ruby
workmad3 has quit [Ping timeout: 244 seconds]
Klumben has joined #ruby
Abyss-- has quit [Read error: Connection reset by peer]
WormDrink has quit [Ping timeout: 240 seconds]
Abyss-- has joined #ruby
jonr22 has joined #ruby
tvw has quit [Ping timeout: 265 seconds]
tjr9898_ has joined #ruby
Mongey has joined #ruby
pwh_ has quit [Ping timeout: 265 seconds]
Slavox is now known as Slavox|AFK
CharlieG has joined #ruby
yubrew has joined #ruby
jjbohn has quit [Quit: Leaving...]
kennym has joined #ruby
alexherbo2 has joined #ruby
marcoecc has joined #ruby
VTLob has joined #ruby
WormDrink has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
james_d_h has joined #ruby
Wolland has quit [Remote host closed the connection]
yubrew has quit [Ping timeout: 264 seconds]
<rs0> I don't understand the behavior of http://pastebin.com/k1cGxkzz (closing a pipe across process vs across Ruby threads). Can someone explain what the story is here?
Brando753 has quit [Ping timeout: 255 seconds]
Wolland has joined #ruby
Oog has joined #ruby
peterhellberg has quit [Remote host closed the connection]
<Oog> in ensure is there a way to tell if an exception has been thrown?
senayar_ has joined #ruby
larsam has quit [Ping timeout: 264 seconds]
shevy has joined #ruby
armyriad has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
senayar has quit [Read error: Operation timed out]
<centrx> rs0, Docs say "If ios is a stream such as pipe or socket, IO#eof? blocks until the other end sends some data or closes it."
albedoa has joined #ruby
<shevy> DouweM!
jackneill has joined #ruby
<shevy> I think my internet works again
<certainty> Oog: if you want to know you can just catch it
<rs0> centrx: right. and in the case where the pipe goes across Ruby threads, eof eventually returns
workmad3 has joined #ruby
<shevy> it is too soon to call it final but I can browse on the www again
axsuul has joined #ruby
montyboy_ has joined #ruby
<rs0> centrx: but if the pipe connects two processes (the parent and the child), #eof? blocks forever. i tried it on at least three different rubies
Slavox|AFK is now known as Slavox
UserNameInvalid has joined #ruby
hiyosi has quit [Read error: Operation timed out]
<Beoran> rs0, it might be better to use select() for such cases
_Rahul_Roy_ has joined #ruby
Wolland has quit [Ping timeout: 265 seconds]
<Beoran> then you can poll
Mongey has quit [Quit: Mongey]
crystal77 has quit [Quit: Computer has gone to sleep.]
<Beoran> for any incoming input
<toretore> rs0: the program demonstrates that when you fork, the child's r and w are not the same objects as those in the parent
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
senayar_ has quit [Read error: Connection reset by peer]
Ziarkaen has quit [Ping timeout: 264 seconds]
<centrx> apeiros, away_ is spamming
<rs0> toretore: when you put it that way, it seems so obvious
Mongey has joined #ruby
<rs0> toretore: what's the proper way to do this, then?
<toretore> what is it you want to do?
<shevy> away_ must be banned
<rs0> well, i'm trying to fork another process that can act as an *unlimited* buffer for stdin, since using select(2) to poll means that the input process will stop once the buffer fills up (and resume when it's writeable again)
<TuxLyn> shevy, I agree ^_^
Brando753 has joined #ruby
<rs0> and i'm specifically trying to do it with a fork, instead of threads and queues
<certainty> shevy: so you got the interwebs back?
<hidensoft> omg , ruby installed
<shevy> it's a bot spamming with different URLs, it's the first time I had to use /ignore :(
<shevy> certainty for now!
<shevy> but I am not sure if it will be up for more than one hour
UserNameInvalid has quit [Ping timeout: 240 seconds]
_Rahul_Roy_ has quit [Client Quit]
<shevy> I have a full week ahead with appointments and meetings every day, can't again afford to lose time on the weekend like that :(
<toretore> rs0: in the parent, close r, in the child, close w
<toretore> then w.write(STDIN.read) in parent, buffer << r.read in child
Zespre has joined #ruby
<certainty> shevy: that's due to QoS settings on this channel, which disconnects you on a certain interval to assure quality :p
<rs0> toretore: nailed it! thanks
dkamioka has quit [Remote host closed the connection]
aspires has joined #ruby
relix has joined #ruby
thesheff17_ has quit [Ping timeout: 252 seconds]
<shevy> certainty haha IRC was one of the few things that still worked
Slavox is now known as Slavox|AFK
<certainty> :)
thesheff17_ has joined #ruby
sabeur has joined #ruby
<shevy> damn
<shevy> it's down again :(
sdouglas has quit [Remote host closed the connection]
<LadyRainicorn> aw ;-;
Hobogrammer has joined #ruby
<apeiros> *sob*
james_d_h has quit [Ping timeout: 265 seconds]
<apeiros> centrx: for you too, I only police this channel. I can't help with people spamming your query. sorry.
diegoviola has quit [Quit: WeeChat 0.4.3]
DrShoggoth has quit [Quit: Leaving]
blackmesa has joined #ruby
<centrx> apeiros, The nick is in this channel, he might be spamming others
<shevy> I think away_ obtains a channel list
<apeiros> centrx: did he do anything wrong *in this channel*? no? then I can't do anything. simple as that.
lw has joined #ruby
<centrx> I guess you have some pretty strict rules about your opering
<shevy> but info available from cross posting also makes use of information available outside another channel apeiros ;)
<apeiros> shevy: cross-posting in this channel is doing something wrong *in this channel*.
<apeiros> I'm not responsible for managing your private messages. also, kicking/banning him is pointless anyway. it's trivial to have more than 1 bot and share nicknames.
foredoomed has joined #ruby
chrisseaton has joined #ruby
Mongey has quit [Quit: Mongey]
sdouglas has joined #ruby
<DouweM> shevy: yay, internet!
montyboy_ has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> DouweM it's down again :(
TuxLyn has quit [Quit: Leaving]
Mongey has joined #ruby
foredoomed has quit [Ping timeout: 240 seconds]
twiceaday has joined #ruby
thesheff17_ has quit [Ping timeout: 253 seconds]
art-solopov has joined #ruby
fantazo has quit [Ping timeout: 265 seconds]
Mon_Ouie has joined #ruby
armyriad has joined #ruby
pskosinski has joined #ruby
<RubyPanther> shevy: I went over a decade without using ignore until a couple years ago, and then it took like 15 ignore rules to make the creature disappear
pwh has joined #ruby
Wolland has joined #ruby
shabgrd has joined #ruby
<RubyPanther> shevy: you can make a report in #freenode
away_ has quit [K-Lined]
armyriad has quit [Client Quit]
meatherly has joined #ruby
<RubyPanther> depending who is around, they either get banned right away, or nothing happens
chipotle has joined #ruby
claymore has quit [Ping timeout: 240 seconds]
tectonic has quit []
pothibo has joined #ruby
onewheelskyward has joined #ruby
Hobogrammer has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
shabgard has quit [Ping timeout: 240 seconds]
Mongey has quit [Quit: Mongey]
onewheelskyward has quit [*.net *.split]
michael_lee has quit [Quit: Ex-Chat]
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
claymore has joined #ruby
camilasan has quit [Quit: Konversation terminated!]
chipotle has quit [Client Quit]
alexju has joined #ruby
closures999 has quit []
lw has quit [Quit: s]
Wolland has quit [Ping timeout: 265 seconds]
timonv has quit [Remote host closed the connection]
thesheff17_ has joined #ruby
<shevy> looks as if the bot is gone
francisfish has joined #ruby
carif has joined #ruby
einarj has joined #ruby
Wolland has joined #ruby
einarj has quit [Remote host closed the connection]
pfg has joined #ruby
einarj has joined #ruby
morenoh149 has quit [Ping timeout: 244 seconds]
monkegjinni has quit [Remote host closed the connection]
francisfish has quit [Ping timeout: 252 seconds]
aspires has quit []
lw has joined #ruby
monkegjinni has joined #ruby
lolmaus_ has joined #ruby
yubrew has joined #ruby
aspires has joined #ruby
lolmaus has quit [Ping timeout: 265 seconds]
agjacome has quit [Quit: leaving]
LadyRainicorn has quit [Ping timeout: 240 seconds]
chrisseaton has quit []
monkegjinni has quit [Ping timeout: 264 seconds]
yubrew has quit [Ping timeout: 244 seconds]
toastynerd has quit [Remote host closed the connection]
sigurding has quit [Quit: sigurding]
chrisseaton has joined #ruby
sabeur has quit []
vlad_starkov has joined #ruby
Xaitec has joined #ruby
onewheelskyward has joined #ruby
Hobogrammer has joined #ruby
zarul has quit [Quit: Leaving]
arietis has quit [Quit: Computer has gone to sleep.]
jjbohn has joined #ruby
zarul has joined #ruby
young has joined #ruby
arietis has joined #ruby
naturtrunken has quit [Quit: Leaving.]
arietis has quit [Client Quit]
Rudde has joined #ruby
thesheff17_ has quit [Ping timeout: 240 seconds]
young has quit [Client Quit]
rococo has joined #ruby
mackworth has joined #ruby
mojjojo has quit [Quit: mojjojo]
young has joined #ruby
relix has quit [Quit: Textual IRC Client: www.textualapp.com]
lw has quit [Quit: s]
carraroj has quit [Quit: Konversation terminated!]
young has quit [Client Quit]
naturtrunken has joined #ruby
vlad_starkov has quit [Ping timeout: 244 seconds]
jjbohn has quit [Ping timeout: 240 seconds]
nateberkopec has quit [Quit: Leaving...]
<mackworth> ...he...hello?
dtvmzd has joined #ruby
<shevy> hey mackworth
<mackworth> hi!
<mackworth> nice to meet you.
Hello has joined #ruby
Hello is now known as xuis_
<mackworth> so...
<mackworth> what's everyone up to this fine sunday?
<shevy> WRITING CODE
<shevy> GETTING ANGRY WITH THE WWW
<mostlybadfly> hola
<mackworth> mhm. sounds like a usual programmer day.
young has joined #ruby
zcreative has quit [Quit: Computer has gone to sleep.]
mary5030 has joined #ruby
<mackworth> hello mostlybadfly
newbie1r has joined #ruby
JBreit has quit [Read error: Connection reset by peer]
<tongcx> hi guys, what's nginx? what's the relationship between nginx and unicorn?
<shevy> nginx is a russian webserver with a notorious lack of documentation and commandline options
<Nilium> http://wiki.nginx.org/Main ⇐ That should answer the first question.
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
peterhellberg has joined #ruby
<tongcx> nginx is a webserver, unicorn is also a webserver, but unicorn use nginx, my head's spinning
jjbohn has joined #ruby
LadyRainicorn has joined #ruby
pushpak has joined #ruby
<shevy> perhaps you don't need both
MattStratton has joined #ruby
maroloccio has joined #ruby
<jhass> tongcx: unicorn is an application server not a webserver
<soahccc> shevy: unicorn works totally fine with nginx
<tongcx> jhass: so webserver takes http request, and do what?
xuis_ has quit [Quit: Leaving]
<tongcx> jhass: down the road, it pass the request to app server, right?
<soahccc> tongcx: server assets statically and pass the rest to the application/unicorn
<jhass> ^
<soahccc> s/server/serve
<havenwood> tongcx: Often Nginx or Apache are used as a reverse proxy for Unicorn.
DouweM has quit [Ping timeout: 240 seconds]
<tongcx> why do we need webserver, why not just app server?
<jhass> also nginx might do virtual host / multi domain stuff which unicorn is incapable to do. And it handles HTTPS
<jhass> lastly you don't want to run unicorn with root, which you'd need to do to bind to port 80
ce_afk is now known as cescalante
<soahccc> and you don't want unicorn to serve static files like images, etc since nginx can do it faster and more efficient
<Morrolan> Many application servers aren't designed to handle slow clients.
<tongcx> so nginx and apache are the two big names out there?
peterhellberg has quit [Ping timeout: 240 seconds]
<havenwood> tongcx: Rainbows! is a lesser-used alternative to Unicorn + Nginx where the load balancing is also handled in Ruby.
<havenwood> tongcx: Nginx is preferred.
senayar has joined #ruby
<tongcx> havenwood: i'm using thin, but seems not very fast one
kori has joined #ruby
<havenwood> tongcx: Thin is usually reasonably fast.
<kori> /close
chipotle has joined #ruby
kori has left #ruby [#ruby]
<havenwood> tongcx: check out the "Improved Performance Through Proxying" part: http://unicorn.bogomips.org/PHILOSOPHY.html
thesheff17_ has joined #ruby
<n88_> so i've written a css scraper with mechanize and i'm pulling data directly into a mysql db.... it must be the slowest thing ever written by a human and executed by a computer... what are my options for speeding this up ?
<tongcx> havenwood: thanks
Speed has quit [Ping timeout: 240 seconds]
<soahccc> havenwood: is rainbows that much better? we survived a TV-spot with just one server nginx + unicorn :D
aspires has quit []
klaut_ has quit [Remote host closed the connection]
<soahccc> n88_: look what is slow and try to improve these parts. at the end parallelizing is my usual way to go
morenoh149 has joined #ruby
<soahccc> n88_: Usually you can pull steps apart and handle them independently but this heavily depends on the situation
<havenwood> soahccc: Rainbows::XEpollThreadPool etc are pretty nice, but Nginx is blazing fast and good at what it does
tjr9898_ has quit [Remote host closed the connection]
aeio has quit [Quit: Leaving]
<n88_> hmm.. i think the process as a whole is just slow (has to make multiple http requests to get all the necessary info for each line)
<soahccc> havenwood: ahh so it would be instead nginx rather than instead unicorn?
<havenwood> soahccc: Instead of both, it is unicorn paired with an evented thread pool.
<soahccc> n88_: break it apart if possible, one part pulls the source needed and the other asynchronously gathers more remote data. that could(!) be a way
<soahccc> havenwood: ahh okay…
<havenwood> soahccc: well, XEpollThreadPool is - there are a variety of Rainbows! options: http://rainbows.rubyforge.org/
zcreative has joined #ruby
<soahccc> havenwood: hmm I think I still let nginx throw out the images :D
BuSerD has quit [Read error: Connection reset by peer]
<havenwood> soahccc: good way to do it! but fun to have pure Ruby options ;)
e4xit has quit [Quit: e4xit]
NicholasFlamel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
einarj has quit [Remote host closed the connection]
JBreit has joined #ruby
Slavox|AFK is now known as Slavox
mackworth has quit [Quit: Page closed]
carif has quit [Quit: Ex-Chat]
<havenwood> is my Rack ecosystem list missing anything obvious?: Reverse Proxy (Nginx Apache) -> Rack Webserver (Unicorn Rainbows! Thin Puma Passenger Webrick Reel-Rack) -> Rack (Rack and any middlewear) -> Rack Framework (Rails Sinatra NYNY Ramaze Camping Scorched)
NicholasFlamel has joined #ruby
tgkokk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
meatherly has quit [Remote host closed the connection]
JBreit has left #ruby [#ruby]
meatherly has joined #ruby
Tachoh has quit [Ping timeout: 252 seconds]
Xeago has joined #ruby
e4xit has joined #ruby
minasmazar has quit [Quit: Konversation terminated!]
Slavox is now known as Slavox|AFK
DouweM has joined #ruby
sdouglas has quit [Remote host closed the connection]
aspires has joined #ruby
<soahccc> havenwood: no, did you know that every controller is a standalone rack app?
meatherly has quit [Ping timeout: 244 seconds]
<soahccc> havenwood: I should go to sleep, I meant yes :<
zorak has quit [Read error: Connection reset by peer]
Speed has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
agjacome has joined #ruby
hiyosi has joined #ruby
godd2 has joined #ruby
Slavox|AFK is now known as Slavox
phansch has quit [Quit: WeeChat 0.4.2]
Abyss-- has quit [Ping timeout: 265 seconds]
rococo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ndrst has left #ruby ["WeeChat 0.4.0"]
rococo has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
dseitz has joined #ruby
iliketurtles has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
hiyosi has quit [Ping timeout: 264 seconds]
aspires has quit []
monkegjinni has joined #ruby
tjr9898_ has joined #ruby
confounds has joined #ruby
jph98 has quit [Quit: jph98]
aspires has joined #ruby
hiyosi has joined #ruby
momigi has joined #ruby
aspires has quit [Client Quit]
yubrew has joined #ruby
relix has joined #ruby
aspires has joined #ruby
Fyyr13_ has joined #ruby
sambao21 has joined #ruby
nateberkopec has joined #ruby
klaut_ has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
makara has joined #ruby
WormDrink has quit [Read error: Connection reset by peer]
yubrew has quit [Ping timeout: 240 seconds]
WormDrink has joined #ruby
klaut_ has quit [Read error: No route to host]
klaut_ has joined #ruby
sigurding has joined #ruby
zorak has joined #ruby
Fyyr13_ has quit [Ping timeout: 240 seconds]
nateberkopec has quit [Ping timeout: 240 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
Avahey_ has quit [Quit: Connection closed for inactivity]
nhhagen has joined #ruby
armyriad has joined #ruby
aspires has quit []
kennym has quit [Quit: Leaving.]
confounds has quit [Ping timeout: 244 seconds]
fnordperfect has joined #ruby
mary5030 has quit [Remote host closed the connection]
klaut_ has quit [Ping timeout: 265 seconds]
monkegjinni has quit [Remote host closed the connection]
mary5030 has joined #ruby
aspires has joined #ruby
monkegjinni has joined #ruby
ephemerian has joined #ruby
cescalante is now known as ce_afk
mojjojo has joined #ruby
dik_dak has joined #ruby
aspires has quit [Client Quit]
nateberkopec has joined #ruby
monkegjinni has quit [Ping timeout: 240 seconds]
LexicalScope has joined #ruby
confounds has joined #ruby
klaut_ has joined #ruby
jjbohn has quit [Quit: Leaving...]
kennym has joined #ruby
sdouglas has joined #ruby
nisstyre has quit [Quit: WeeChat 0.4.3]
thesheff17_ has quit [Ping timeout: 240 seconds]
rococo has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fnordperfect has left #ruby ["WeeChat 0.4.3"]
jackneill has quit [Read error: Connection reset by peer]
LadyRainicorn has quit [Ping timeout: 269 seconds]
chipotle has quit [Quit: cya]
Maitiu has quit [Ping timeout: 264 seconds]
cjsarette has quit [Ping timeout: 245 seconds]
robbyoconnor has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
sigurding has quit [Quit: sigurding]
Maitiu has joined #ruby
glosoli has quit [Quit: Textual IRC Client: www.textualapp.com]
robbyoconnor has joined #ruby
LadyRainicorn has joined #ruby
robbyoconnor has quit [Client Quit]
cjsarette has joined #ruby
robbyoconnor has joined #ruby
young has quit []
maletor has joined #ruby
toastynerd has joined #ruby
aspires has joined #ruby
makara has quit [Ping timeout: 253 seconds]
bluOxigen has quit [Ping timeout: 265 seconds]
jonr22 has quit [Remote host closed the connection]
randomnick_ has joined #ruby
thesheff17_ has joined #ruby
S0da has joined #ruby
mojjojo has quit [Quit: mojjojo]
Slavox is now known as Slavox|AFK
Czupa has quit [Ping timeout: 240 seconds]
einarj has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
dayepa has joined #ruby
peterhellberg has joined #ruby
Jetchisel has joined #ruby
armyriad has quit [Ping timeout: 240 seconds]
axsuul has joined #ruby
einarj has quit [Ping timeout: 244 seconds]
Naoe-Kanno has joined #ruby
aspires has quit []
SHyx0rmZ has quit [Ping timeout: 240 seconds]
bigmac has joined #ruby
dayepa has quit [Client Quit]
peterhellberg has quit [Ping timeout: 240 seconds]
ryanf has left #ruby [#ruby]
francis has joined #ruby
aspires has joined #ruby
pu22l3r has joined #ruby
`MArceLL` has quit [Remote host closed the connection]
francis is now known as Tachoh
`MArceLL` has joined #ruby
einarj has joined #ruby
m104 has joined #ruby
einarj_ has joined #ruby
marcdel has joined #ruby
denken has joined #ruby
aspires has quit [Client Quit]
shredding has joined #ruby
Xeago has quit [Remote host closed the connection]
m8 has quit [Quit: Sto andando via]
Xeago has joined #ruby
aspires has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Xeago has quit [Remote host closed the connection]
Czupa has joined #ruby
toastynerd has quit [Remote host closed the connection]
einarj has quit [Ping timeout: 264 seconds]
einarj_ has quit [Ping timeout: 244 seconds]
<jtza8> Since
yubrew has joined #ruby
hamakn has quit [Remote host closed the connection]
<jtza8> Oops... Well, anyway, is there shorthand for array[0..-2].zip(array[1..-1]).each { ... } ?
saarinen has quit [Quit: saarinen]
axl_ has quit [Quit: axl_]
uxfi has joined #ruby
<LadyRainicorn> I doubt it
<LadyRainicorn> That is an odd thing to do.
uxfi has quit [Changing host]
uxfi has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
axl_ has joined #ruby
uxfi is now known as Xuis__
Xuis__ is now known as xuis__
armyriad has joined #ruby
<jtza8> Basically, there are times when that kind of thing would be handy.
xuis__ is now known as Xuisc
rococo has joined #ruby
<LadyRainicorn> When?
<jtza8> Like plotting lines in a polygon.
<jhass> isn't that each_cons(2) ?
<jtza8> Or calculating the differences in times.
naturtrunken1 has joined #ruby
naturtrunken has quit [Read error: Connection reset by peer]
francisfish has joined #ruby
<jtza8> jhass: Thanks, thought I was missing something. :)
<LadyRainicorn> Og wow you're right.
dkamioka has joined #ruby
<LadyRainicorn> That is an odd method to have, but Ruby is magical.
axsuul has quit [Ping timeout: 240 seconds]
kennym1 has joined #ruby
jonr22 has joined #ruby
away_ has joined #ruby
mojjojo has joined #ruby
shredding has quit [Quit: shredding]
kennym has quit [Ping timeout: 244 seconds]
zenojis has quit [Ping timeout: 265 seconds]
nathanso_ has joined #ruby
mesamoo has quit [Ping timeout: 265 seconds]
francisfish has quit [Ping timeout: 264 seconds]
Wolland has quit []
Czupa has quit [Remote host closed the connection]
pwh has quit []
hamakn has joined #ruby
naturtrunken1 has quit [Read error: Connection reset by peer]
nathansoz has quit [Ping timeout: 264 seconds]
Xuisc is now known as xuis_
<shevy> happiness rays!
ferr has joined #ruby
tesuji has joined #ruby
xuis_ is now known as xuisc
chipotle has joined #ruby
* LadyRainicorn shoots happiness everywhere.
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
<shevy> hehe
nhhagen has quit [Remote host closed the connection]
klaut_ has quit [Remote host closed the connection]
klaut_ has joined #ruby
vlad_starkov has joined #ruby
aspires has quit []
toastynerd has joined #ruby
art-solopov has quit [Quit: Konversation terminated!]
mojjojo has quit [Quit: mojjojo]
<jtza8> This magic was brought to you by the dark Lisp genes of Ruby.
peterhellberg has joined #ruby
aspires has joined #ruby
ferr has quit [Quit: Lost terminal]
bthesorceror has joined #ruby
niky has joined #ruby
S4bechan has joined #ruby
<shevy> lisp - that thing that was hip 50 years ago
pushpak has quit [Quit: Linkinus - http://linkinus.com]
klaut_ has quit [Ping timeout: 252 seconds]
S4bechan has left #ruby [#ruby]
vlad_starkov has quit [Ping timeout: 264 seconds]
<LadyRainicorn> haha
fightback has joined #ruby
<jtza8> Common Lisp is my favorite language. Guess that makes me a bit of hipster? :(
<LadyRainicorn> ugh away_ is back.
<LadyRainicorn> An antique hipster.
<jtza8> Well, Common Lisp is from the 80's
confounds has quit [Ping timeout: 264 seconds]
<LadyRainicorn> antique
claymore has quit [Quit: Leaving]
<jtza8> True, and false.
AltGrendel has joined #ruby
axsuul has joined #ruby
lolmaus_ has quit [Read error: Operation timed out]
lolmaus has joined #ruby
<shevy> yeah jtza8 a (true (hipster))
<LadyRainicorn> So false then?
<godd2> Lispster?
<LadyRainicorn> ugh wtf I am still getting messages from away_ even though I blocked it.
aspires has quit []
mist has quit [Quit: .]
kate_r has quit [Ping timeout: 265 seconds]
nfk has joined #ruby
<shevy> happiness messages!
<LadyRainicorn> jtza8: ((())()((())())
<jtza8> Probably, but then again, Ruby's from the 90's which is about 20 years ago...
<shevy> yeah ruby is getting old
<godd2> I only use languages that are less than 5 years old, like Node.js
newbie1r has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<LadyRainicorn> haha
<LadyRainicorn> Rust is a nice new language.
AlSquire has quit [Quit: This computer has gone to sleep]
WormDrink has quit [Ping timeout: 240 seconds]
mrmist has joined #ruby
mrmist is now known as mist
<jtza8> Hmm... haven't seen Rust yet, last I was messing around with Factor.
<jtza8> Io was pretty nice too.
WormDrink has joined #ruby
linojon has joined #ruby
quatron has quit [Quit: ChatZilla 0.9.90.1 [Firefox 27.0.1/20140212131424]]
<Tachoh> i only code in elixir
oneawayman has quit [Ping timeout: 244 seconds]
popl has quit [Ping timeout: 241 seconds]
ShadySQL has quit [Quit: Leaving]
Mongey has joined #ruby
arubin has quit [Ping timeout: 265 seconds]
AltGrendel has quit [Quit: AltGrendel]
kirun has quit [Quit: Client exiting]
arubin has joined #ruby
toastynerd has quit [Remote host closed the connection]
agjacome has quit [Ping timeout: 265 seconds]
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
robbyoconnor has quit [Excess Flood]
zcreative has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
centrx has quit [Quit: All this computer hacking is making me thirsty]
monkegjinni has joined #ruby
cntrx has joined #ruby
cntrx has quit [Remote host closed the connection]
robbyoconnor has joined #ruby
64MAAHP2M has quit [Ping timeout: 244 seconds]
<jtza8> LadyRainicorn: You missed a closing ")" :P
invinceable has joined #ruby
<LadyRainicorn> That was the joke. ;p
<LadyRainicorn> unmatched parens
spider-mario has quit [Remote host closed the connection]
<jtza8> Yeah, heh, took me a while. Point made though.
niky has quit []
nateberkopec has quit [Quit: Leaving...]
CaptainJet has quit [Ping timeout: 244 seconds]
cjsarette has quit [Ping timeout: 245 seconds]
robbyoconnor has quit [Ping timeout: 244 seconds]
cjsarette has joined #ruby
<jtza8> Rust looks like a usefull language.
toastynerd has joined #ruby
peterhellberg has quit []
yubrew has joined #ruby
Shidash has quit [Ping timeout: 264 seconds]
<RubyPanther> I dunno, what do they call a hipster who is 30 years late? Is it still a fogey?
garbagecollectio has joined #ruby
<garbagecollectio> what does the :: do in ruby?
<garbagecollectio> like if I'm inheriting
mojjojo has joined #ruby
yano has quit [Ping timeout: 630 seconds]
toastyne_ has joined #ruby
_lynX has quit [Quit: Leaving]
drumusician has joined #ruby
dik_dak has quit [Quit: Leaving]
<RubyPanther> garbagecollectio: it is a separator for nested classes/modules
drumusician has quit [Remote host closed the connection]
<garbagecollectio> yeah what does that mean
oneawayman has joined #ruby
<RubyPanther> >> module Foo; module Bar; BAZ = "bing" end end ; Foo::Bar::BAZ
<eval-in> RubyPanther => "bing" (https://eval.in/116661)
<havenwood> garbagecollectio: a namespace
<garbagecollectio> so like if i have class X < Blah::Two
duggiefresh has joined #ruby
yubrew has quit [Ping timeout: 244 seconds]
<RubyPanther> in that case _all_ it does is tell you how to find Two
chipotle has quit [Quit: cya]
<garbagecollectio> you can access a class's variable
<garbagecollectio> by using that
<RubyPanther> as in Blah.const_get(:Two)
axsuul has quit [Ping timeout: 252 seconds]
toastynerd has quit [Ping timeout: 265 seconds]
<garbagecollectio> but what is the relationship between Two and Blah
<garbagecollectio> that creates this relationship that we can act upon
<garbagecollectio> like code wise
<RubyPanther> Two lives in Blah
<RubyPanther> >> module Foo; module Bar; BAZ = "bing" end end ; Foo::Bar::BAZ
<eval-in> RubyPanther => "bing" (https://eval.in/116662)
<RubyPanther> That shows the whole relationship right there
weie has quit [Quit: Leaving...]
<garbagecollectio> right but in my case Blah is a class not a module
<RubyPanther> why do you think that makes a difference?
<RubyPanther> seems to me your cart is in front of your horse
<garbagecollectio> i mean why doesn't it make a difference
<RubyPanther> No, why _would_ it make a difference?
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
cjsarette has quit [Ping timeout: 245 seconds]
<garbagecollectio> because its defining a different data structure apparently
<garbagecollectio> class vs module
<RubyPanther> If your questions are that general, you can just read a "welcome to ruby" type of document
pu22l3r has quit [Remote host closed the connection]
<garbagecollectio> i have been
<RubyPanther> And what does it say about classes vs modules in regards to namespaces?
<jhass> garbagecollectio: Class.is_a? Module #=> true
poguez has quit [Quit: Connection closed for inactivity]
<jhass> and even Class.superclass #=> Module
<Mon_Ouie> Although it's more about Class < Module #=> true
<Mon_Ouie> Yeah :)
<garbagecollectio> i believe it says that modules usually have the ability to have the :: prepended after them
<garbagecollectio> if it has a class or another module embedded in them
<garbagecollectio> and for classes they can to but if its a method
<garbagecollectio> but not nested classes
<garbagecollectio> i guess thats what I'm asking
bthesorceror has quit [Remote host closed the connection]
axsuul has joined #ruby
dexter_ has quit [Remote host closed the connection]
<Mon_Ouie> Every class is a module. So (almost) everything a module can do, a class also can. With regards to constant scoping, they are identical.
<Mon_Ouie> The '::' can also be used to call methods (as a replacement for the '.' operator), but no one uses it like that ever
<jhass> >> module Foo; BAR = :constant; def self.BAR; :method; end; end; [Foo::BAR, Foo::BAR()]
<eval-in> jhass => [:constant, :method] (https://eval.in/116663)
monkegjinni has quit [Remote host closed the connection]
<garbagecollectio> so when does one use the module keyword vs class
monkegjinni has joined #ruby
<jhass> if whatever you put inside doesn't have state, use a module
axsuul has quit [Read error: Connection reset by peer]
cjsarette has joined #ruby
axsuul has joined #ruby
nhhagen has joined #ruby
<jhass> be it other classes/modules, constants, helper methods that don't share state, methods reusable to be included into classes etc.
<garbagecollectio> but classes also give us the ability
<garbagecollectio> to do that with self. right?
blackmesa has quit [Quit: WeeChat 0.4.3]
<garbagecollectio> uninstantiated method
<Mon_Ouie> But they allow you to create instances, which doesn't always make sense
<jhass> ^ the story about self. is a bit more complex
<garbagecollectio> so is ActiveRecord actually a module?
<Mon_Ouie> Also you can't include a class into another, you can inherit it, but that only works once
<garbagecollectio> right
<Mon_Ouie> You can include many mixins (e.g. Enumerable, Comparable) in a class
<garbagecollectio> you can't nest classes right?
<Mon_Ouie> What do you mean?
shevy has quit [Quit: ""]
<garbagecollectio> class x class y end end
<Mon_Ouie> >> class A; class B; class C; end; end; end; A::B::C.new
<jhass> totally valid
<eval-in> Mon_Ouie => #<A::B::C:0x410ce180> (https://eval.in/116664)
<garbagecollectio> interesting
<garbagecollectio> so all this flexbility
<garbagecollectio> why not do a class within a class instead of a class within a module
<garbagecollectio> i guess it comes down if that top level would ever be instantiated
<Mon_Ouie> You could, but then you'd also be able to create an instance of that module. And if its sole purpose is nesting that doesn't really make sense.
andrewlio has quit [Quit: Leaving.]
<garbagecollectio> awesome! so helpful
monkegjinni has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby
<garbagecollectio> whats a good use for helper methods
<garbagecollectio> with regards to the controller
<jhass> now you're mixing rails with ruby
<garbagecollectio> like I'm setting up a view that calls a helper method with the input being a instance variable and it does processing
<garbagecollectio> thats true is that forbidden here?
<jhass> it's better to ask rails questions in #rubyonrails
<Mon_Ouie> No (you're asking about Ruby concepts mostly anyway), just keep in mind the concepts are more general than that
nhhagen has quit [Ping timeout: 240 seconds]
fightback has quit [Ping timeout: 240 seconds]
alexherbo2 has joined #ruby
<garbagecollectio> i can't get in there for some reason
<jhass> garbagecollectio: /msg NickServ help
<garbagecollectio> i am registered
<garbagecollectio> it says I'm banned but I've never been there before lol
pyreal has joined #ruby
<garbagecollectio> i guess what are the use cases for helper methods
s2013 has joined #ruby
<garbagecollectio> that is valid architecture
<s2013> lets say i have a hash. each hash is an array. i want to get sum of the size of all the arrays in the hash
<s2013> whats the ideal way
<garbagecollectio> besides just doing processing in the view
nhhagen has joined #ruby
dkamioka has quit [Read error: Connection reset by peer]
xuisc has quit []
mojjojo has quit [Quit: mojjojo]
vlad_starkov has joined #ruby
shevy has joined #ruby
<jhass> s2013: hash.values.map(&:size).inject(:+)
<Mon_Ouie> Things you need to do in various places of your code, logging for instance
dkamioka has joined #ruby
nateberkopec has joined #ruby
dkamioka has quit [Remote host closed the connection]
hobodave has joined #ruby
saarinen has joined #ruby
<s2013> thanks jhass
nhhagen has quit [Ping timeout: 240 seconds]
fgo has joined #ruby
MattStratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vlad_starkov has quit [Ping timeout: 240 seconds]
jetblack has quit [Quit: leaving]
armyriad has quit [Ping timeout: 240 seconds]
cjsarette has quit [Ping timeout: 245 seconds]
ktosiek has quit [Ping timeout: 244 seconds]
nateberkopec has quit [Ping timeout: 240 seconds]
<garbagecollectio> Mon_Ouie: can helper methods call other helper methods
<garbagecollectio> is that valid architecture
mojjojo has joined #ruby
axl_ has quit [Quit: axl_]
tesuji has quit [Ping timeout: 240 seconds]
visof has joined #ruby
chipotle has joined #ruby
cjsarette has joined #ruby
duggiefresh has quit [Ping timeout: 252 seconds]
stephenmac7_ is now known as stephenmac7
Shidash has joined #ruby
<albedoa> probably a bash question, but maybe you guys can help: when i type `rspec --color --format doc .` it runs all of my tests, but then if i make an alias `alias rs=rspec --color --format doc` and then type `rs .' it hangs. any idea why?
monkegjinni has joined #ruby
<RubyPanther> albedoa: usually you need to quote the right hand side of the alias
m104 has quit [Quit: brb]
whomp has joined #ruby
<RubyPanther> if there are spaces, etc
<albedoa> RubyPanther whoops, i did.
<albedoa> improperly copied it to irc
poguez has joined #ruby
<whomp> having an interesting design problem. i'm working with a library that outputs an instance of one of two classes depending on the situation. i want to handle both with the same method calls, because they share lots of properties that are accessed differently (one with hash syntax, the other with mostly method calls). how would you guys do this?
Ziarkaen has joined #ruby
<crome> your library should output stuff that respond to the same messages
<RubyPanther> whomp: I would put the common parts in a mixin module, using Enumerable as a baseline
chipotle has quit [Ping timeout: 265 seconds]
fudanchi1 has quit [Quit: #LaLaLaYeYeYe]
<RubyPanther> and for example things that the class has to define, I would put in the mixin versions that raise an error 'not implemented'
<whomp> RubyPanther, perfect!
trhodes_ has joined #ruby
<whomp> i had created a wrapper class, and then i'd set the variables manually and keep a pointer to the original object
visof has quit [Ping timeout: 269 seconds]
<whomp> but it was getting annoying with things like equality testing
<whomp> so yeah, thanks lol
jtza8 has quit [Quit: Night all.]
<whomp> also, RubyPanther what do you mean, using Enumerable as a baseline?
<RubyPanther> whomp: sorry, poorly phrased, I just meant as an example
dkamioka has joined #ruby
<whomp> oh, ok
nateberkopec has joined #ruby
<RubyPanther> where it uses the #each from the class that includes it
<whomp> so a class will declare that it implements enumerable?
chipotle has joined #ruby
<RubyPanther> >> class Foo; include Enumerable; def each; yield :omg end end ; Foo.new.first
<eval-in> RubyPanther => :omg (https://eval.in/116666)
<garbagecollectio> mixin module?
<jhass> I think I'd just class Foo; def initialize target; @target = target; @access_via_brackets = target.respond_to? :[]; end; def [] key; if @access_via_brackets; @target[key]; else; @target.public_send key; end; end; end;
<garbagecollectio> so i have a design problem
<garbagecollectio> i have a cms
<garbagecollectio> that basically updates stuff in the view layer
<garbagecollectio> its a library
<garbagecollectio> that basically does database calls
NicholasFlamel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RubyPanther> garbagecollectio: it is out of fashion to let view layers do any sort of useful work, especially updating things
bthesorceror has joined #ruby
<garbagecollectio> ok
nateberkopec has quit [Ping timeout: 240 seconds]
Salve_ has quit [Remote host closed the connection]
<garbagecollectio> RubyPanther: so say my cms has a class that has data
<RubyPanther> garbagecollectio: generally you should have some sort of domain object that is responsible for the update, like in a CMS I often have CMSFragment or something like that that holds basically all the logic.
<garbagecollectio> that gets data from the database via a model
sdouglas has quit [Remote host closed the connection]
Salve has joined #ruby
machindo has joined #ruby
lkba has quit [Ping timeout: 240 seconds]
ndrei has quit [Ping timeout: 240 seconds]
sdouglas has joined #ruby
<garbagecollectio> RubyPanther: what do u mean? so this library is literally just methods that lets me get data from the db
ndrei has joined #ruby
<garbagecollectio> RubyPanther: and the way i do is i pass in the page name that is being viewed and then a specific ID
<RubyPanther> garbagecollectio: Your description sounds like a procedural programming structure instead of OOP
<garbagecollectio> well this is how they have us building it
<RubyPanther> a library should provide classes or modules, not methods
<garbagecollectio> classes can have methods right?
<garbagecollectio> ur saying ur not supposed to be able to call them?
<garbagecollectio> it goes in lib folder
<garbagecollectio> and basically i get all this data and then print it on the page
shevy has quit [Ping timeout: 244 seconds]
<RubyPanther> No, I'm saying that a library should be a "class" which has methods, but that isn't the point; being able to instantiate instances is then the point. Or a module, with mixin methods, and then the interface is important, but it isn't just a bag of methods. You would want the methods to get mixed into a class and used there, not just call methods in a library
<RubyPanther> when I hear "library" I'm hearing alarm bells :)
Salve has quit [Ping timeout: 264 seconds]
Slavox|AFK is now known as Slavox
<jhass> garbagecollectio: what RubyPanther is getting at (I think) is that you should do page= CMS.get_page('foo'); page.title, page.body; instead of CMS.get_title_for('foo'); CMS.get_body_for('foo');
marcdel has quit []
nateberkopec has joined #ruby
<RubyPanther> Yes, thanks jhass :)
<godd2> Can I make an IO object where the output is some string in memory?
<RubyPanther> godd2: See: StringIO
<jhass> godd2: I think you want StringIO
yubrew has joined #ruby
<godd2> thank you very much :)
marcdel has joined #ruby
visof has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
axsuul has joined #ruby
yano has joined #ruby
roolo has quit [Quit: Leaving...]
alexherbo2 has quit [Ping timeout: 264 seconds]
jamto11 has quit []
yubrew has quit [Ping timeout: 240 seconds]
<garbagecollectio> RubyPanther: like what is this doing: #mo-main-content.module{ :data => {'module' => Display::Constants::EModule[:MAIN_CONTENT]}}
klaut_ has joined #ruby
<garbagecollectio> what is that :MAIN_CONTENT
<jhass> a Symbol
<jhass> it's rare to see them all caps though
<garbagecollectio> with no value?
<jhass> a Symbol is a value
<garbagecollectio> i mean there is nothing there
<garbagecollectio> oh
<RubyPanther> a symbol being passed to the module method [] on EModule, it is nasty for a few reasons
<jhass> much like a String, except not garbage collected and meant to represent something, much like a enum in other languages
<garbagecollectio> right right
whomp has quit [Ping timeout: 265 seconds]
<garbagecollectio> the module method is []
<garbagecollectio> ??
<garbagecollectio> oh unless she has this as an array
<RubyPanther> unless EModule is a method :)
jimmyy has joined #ruby
<garbagecollectio> yeah see this is why i was asking u all these questions actually
<garbagecollectio> about ::
<jhass> or a constant not pointing to module or class
<garbagecollectio> i didn't understand if this was
duggiefresh has joined #ruby
<jhass> check what Display::Constants::EModule.inspect says
<RubyPanther> :: can also separate a module/class method but it is poor style
whomp has joined #ruby
lkba has joined #ruby
oneawayman has quit [Read error: Operation timed out]
Xaitec has left #ruby [#ruby]
chipotle has quit [Ping timeout: 240 seconds]
mcus has joined #ruby
machindo has quit [Quit: machindo]
mercwithamouth has joined #ruby
lutfidemirci has joined #ruby
<RubyPanther> at least on current Ruby, it can't be a method in this case, it would need parens
<jhass> I'm betting on Hash assigned to constant
jeregrine has joined #ruby
<jhass> garbagecollectio: is Display::Constants.constants.include? :EModule true or false?
whomp has quit [Ping timeout: 240 seconds]
sambao21 has joined #ruby
tjr9898__ has joined #ruby
trhodes_ has quit [Ping timeout: 244 seconds]
<RubyPanther> >> module Wtf; WTModule={ :egads => 'gonna cry now'} end ; Wtf::WTModule[:egads]
<eval-in> RubyPanther => "gonna cry now" (https://eval.in/116710)
tjr9898_ has quit [Ping timeout: 240 seconds]
<garbagecollectio> jhass what is it?
workmad3 has quit [Ping timeout: 252 seconds]
<garbagecollectio> hash assigned to a constant?
<RubyPanther> >> module Wtf; module WTFModule; @@hsh={ :egads => 'gonna cry now'}; def self.[] rval;@@hsh[rval] end end end ; Wtf::WTFModule[:egads]
<eval-in> RubyPanther => "gonna cry now" (https://eval.in/116718)
<RubyPanther> Those are the two possibilities
Vivekananda has quit [Quit: Ex-Chat]
<jhass> hmm
francisfish has joined #ruby
klaut_ has quit [Remote host closed the connection]
trhodes_ has joined #ruby
<garbagecollectio> - widgets = Site::PagesHelper::get_page.get_widgets_at(Display::Constants::EModule[:DRAWER]
momigi has quit [Read error: Connection reset by peer]
uxfi has joined #ruby
<jhass> >> module Wtf; class Store; def [] key; {key: 'value' }[key]; end; end; WModule = Store.new; end; Wtf::WModule[:key]
<eval-in> jhass => "value" (https://eval.in/116724)
<jhass> :P
tjr9898_ has joined #ruby
uxfi is now known as Xuis_
ndrei has quit [Ping timeout: 252 seconds]
Xuis_ is now known as xuisc
<jhass> (yes, that's effectively your first example)
<garbagecollectio> get_page.get_widgets_at
<garbagecollectio> thats a little weird
<garbagecollectio> is this not weird coding?
<RubyPanther> lol awesome
xuisc has quit [Client Quit]
xuisc has joined #ruby
xuisc has joined #ruby
xuisc has quit [Changing host]
<jhass> naming methods get_something is already considered weird in ruby, garbagecollectio
momigi has joined #ruby
<jhass> and as we said, using :: to call methods is discouraged
<garbagecollectio> but she isnt
<garbagecollectio> she is calling . to call the method on a class
<jhass> but chaining method calls? not weird at all
<RubyPanther> garbagecollectio: it is typical where you're passing in an object and you want to keep the logic out of the view and in a helper. I often will have things like <%= cms_fragment_for( @user, :menu ) %>
<garbagecollectio> right
sambao21 has quit [Quit: Computer has gone to sleep.]
<garbagecollectio> that i am fine with
<garbagecollectio> that makes sense
visof has quit [Ping timeout: 240 seconds]
FenixFyreX has joined #ruby
tjr9898__ has quit [Ping timeout: 265 seconds]
chipotle has joined #ruby
agjacome has joined #ruby
perlsyntax has joined #ruby
francisfish has quit [Ping timeout: 240 seconds]
bigmac has quit [Ping timeout: 240 seconds]
perlsyntax has left #ruby [#ruby]
iparnose has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mjs2600 has joined #ruby
perlsyntax has joined #ruby
<FenixFyreX> Can anyone help with building the glfw3 gem on windows? I can't figure it out..
saarinen has quit [Quit: saarinen]
mikepack has joined #ruby
<garbagecollectio> how can i find this
<garbagecollectio> ite::PagesHelper::get_page.get_widgets_at(Display::Constants::EModule[:DRAWER])
<garbagecollectio> Site::PagesHelper
Mongey has quit [Quit: Mongey]
jimmyy has quit []
nhhagen has joined #ruby
jimmyy has joined #ruby
chipotle has quit [Ping timeout: 240 seconds]
<garbagecollectio> def self.get_page(slug = nil)
<garbagecollectio> return PagesCache.get_page(slug)
<RubyPanther> garbagecollectio: so you need to look up 2 things, site/pages_helper (the last :: there separates a method ) and also display/constants for EModule
<garbagecollectio> i found that
<garbagecollectio> get_page seems to return PagesCache.get_page(slug)
<RubyPanther> garbagecollectio: so it gets a Page instance, and then calls get_widgets_at( ... ) on it
<garbagecollectio> so now i have to find this display::constants thing
duggiefresh has quit [Ping timeout: 244 seconds]
duggiefresh has joined #ruby
burgess|vayo has joined #ruby
vlad_starkov has joined #ruby
sailias has joined #ruby
<garbagecollectio> oh
<garbagecollectio> this is what the code is
<garbagecollectio> Enum.net
<garbagecollectio> EModule = Enum.new
mjs2600 has quit [Remote host closed the connection]
axsuul has quit [Read error: Connection reset by peer]
<garbagecollectio> EModule = Enum.new(
<garbagecollectio> "DRAWER" ,
<RubyPanther> so it is hash-like
axsuul has joined #ruby
<garbagecollectio> what does Enum.new do?
randomnick_ has quit [Quit: Leaving]
axsuul has quit [Max SendQ exceeded]
<jhass> not a core/stdlib/rails class afaik
axsuul has joined #ruby
monkegjinni has quit [Remote host closed the connection]
nhhagen has quit [Ping timeout: 245 seconds]
monkegjinni has joined #ruby
<RubyPanther> it is a nasty rails things designed to sow confusion by naming something Enum to be used by ORMs, but that is different from the db enums people might also be using
axsuul has quit [Read error: Connection reset by peer]
Mongey has joined #ruby
ephemerian has quit [Quit: Leaving.]
axsuul has joined #ruby
vlad_starkov has quit [Ping timeout: 240 seconds]
<garbagecollectio> te::PagesHelper::get_page.get_widgets_at(Display::Constants::EModule[:DRAWER])
<garbagecollectio> so does this actually mean
<jhass> huh, never saw it. Is it a Rails 2 thingy? because that's before my time :P
<garbagecollectio> te::PagesHelper::get_page.get_widgets_at(Display::Constants::2)
Slavox is now known as Slavox|AFK
<jhass> garbagecollectio: no
<RubyPanther> no it is new
lw has joined #ruby
<garbagecollectio> what?
<garbagecollectio> its getting an enum.new