apeiros changed the topic of #ruby to: http://ruby-community.com || Ruby 2.2.1; 2.1.5; 2.0.0-p643: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org, other public logging is prohibited
tus has joined #ruby
<weaksauce> why
<weaksauce> sqlite3 is more than sufficient for your site
Sgeo has quit [Ping timeout: 244 seconds]
<weaksauce> I mean way more than sufficient
vdamewood has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
ghostmoth has quit [Quit: ghostmoth]
<dudedudeman> oh i agree. i work in an animation studio, and the app would be built to be a part of our already existing production pipeline
aghalarp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
d10n-work has joined #ruby
casadei has quit [Remote host closed the connection]
<dudedudeman> mongo is already in place here, auto back ups, optimization, all that
Yzguy has joined #ruby
Yzguy has quit [Max SendQ exceeded]
<dudedudeman> but truth be told, i have no reason to even think about that at this point. i need to get the thing up and working, first.
<pipework> Oh dear, switching from sqlite3 to mongo when going to production?
<pipework> You, sir, must like to live dangerously.
<dudedudeman> BRING IT ON
<pipework> That or you hate data and lose it eagerly.
<dudedudeman> psh. data
<weaksauce> lol
horsecowdog has quit [Remote host closed the connection]
<pipework> "Just ones and zeroes. I mean, here's your compressed backup, son: 0,1"
bobbrez has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<undeadaedra> Wait
<dudedudeman> HA
* pipework hands dudedudeman exactly one electron
<undeadaedra> how did you get my photos archive
<pipework> Go build the universe.
<undeadaedra> are you the NSA, pipework ?
rbennacer has quit [Ping timeout: 264 seconds]
<pipework> undeadaedra: I can not confirm nor deny that I've seen your dick pics, but you might want to trim a bit.
baweaver has joined #ruby
<dudedudeman> oh... NSA... i'm out.
<dudedudeman> PEACE
<dudedudeman> :P
_honning_ has joined #ruby
dudedudeman has quit [Quit: Page closed]
<undeadaedra> pipework: Trim my dick? oO
<pipework> undeadaedra: around the area.
evanjs has joined #ruby
evanjs has quit [Remote host closed the connection]
gregf1 has quit [Quit: WeeChat 1.0.1]
bigmac has joined #ruby
Ellis has quit [Quit: Ellis]
meschiv2 has quit [Ping timeout: 264 seconds]
Ellis has joined #ruby
mleung has quit [Quit: mleung]
Ellis has quit [Client Quit]
bigmac_ has joined #ruby
kblake has quit [Remote host closed the connection]
bigmac__ has joined #ruby
aghalarp has joined #ruby
krisquigley has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
Yzguy has joined #ruby
Yzguy has quit [Max SendQ exceeded]
havenwood has quit [Remote host closed the connection]
baweaver has joined #ruby
bigmac has quit [Ping timeout: 255 seconds]
cpt_yossarian has joined #ruby
rbennacer has joined #ruby
bigmac_ has quit [Ping timeout: 250 seconds]
DEA7TH has quit [Ping timeout: 245 seconds]
maximski has joined #ruby
maximski has quit [Max SendQ exceeded]
bigmac__ has quit [Ping timeout: 272 seconds]
gusrub has quit [Quit: Leaving]
yh has joined #ruby
colorisco has quit [Ping timeout: 248 seconds]
JoshGlzBrk has joined #ruby
krisquigley has quit [Ping timeout: 276 seconds]
mjuszczak has joined #ruby
<shevy> pipework is the ultimate sniffer
<shevy> he literally puts his nose into everywhere
maximski has joined #ruby
<undeadaedra> everywhere ( ͡° ͜ʖ ͡°)
knikolov has quit [Quit: WeeChat 1.2-dev]
bkxd has quit [Ping timeout: 264 seconds]
rkat has joined #ruby
rkat has left #ruby [#ruby]
davedev24_ has quit [Ping timeout: 256 seconds]
yh has quit [Ping timeout: 256 seconds]
maximski has quit [Client Quit]
evanjs has joined #ruby
evanjs has quit [Remote host closed the connection]
mjuszczak has quit [Ping timeout: 255 seconds]
MatthewsFace has quit [Remote host closed the connection]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
doodlehaus has joined #ruby
Pupeno_ has quit [Remote host closed the connection]
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Pupeno has joined #ruby
Sgeo has joined #ruby
knikolov has joined #ruby
lewix has joined #ruby
davedev24_ has joined #ruby
fabrice31 has joined #ruby
<wallerdev> hey guys
<wallerdev> what are you doing this weekend
bigmac has joined #ruby
<undeadaedra> ’night
Sgeo has quit [Read error: Connection reset by peer]
doodlehaus has quit [Remote host closed the connection]
bigmac_ has joined #ruby
baweaver has quit [Remote host closed the connection]
lloyd is now known as Lloyd
fabrice31 has quit [Ping timeout: 265 seconds]
bigmac has quit [Ping timeout: 252 seconds]
bim has joined #ruby
silentpost has quit [Ping timeout: 256 seconds]
<SirFunk> So, Inheritance is using '<' composition is using 'include'. Is there a name for pulling out common functionality into a new class and just instantiating and using it?
doodlehaus has joined #ruby
RegulationD has joined #ruby
evanjs has joined #ruby
cpt_yossarian has quit [Read error: Connection reset by peer]
evanjs has quit [Remote host closed the connection]
bim has quit [Ping timeout: 245 seconds]
rbennacer has quit [Remote host closed the connection]
Feyn has joined #ruby
Ellis has joined #ruby
Ellis has quit [Client Quit]
RegulationD has quit [Ping timeout: 246 seconds]
<shevy> wallerdev mostly I just prepare for upcoming exams in the next week; (1) technical ecology, and (2) immunology and allergies (mostly food-allergies)
<wallerdev> cooooool
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<wallerdev> i dont have any plans
<wallerdev> probably gonna play video games
sohrab has quit [Ping timeout: 256 seconds]
ramfjord has joined #ruby
sohrab has joined #ruby
<weaksauce> SirFunk refactoring something into a utility class?
vivekananda has quit [Quit: Leaving]
vivekananda has joined #ruby
<weaksauce> SirFunk if you can do that it means that you are making the object structure more ideal object oriented practices. each class should have one concern etc.
jenrzzz has quit [Ping timeout: 264 seconds]
<weaksauce> if you do that and it makes sense to*
vivekananda has quit [Remote host closed the connection]
happyface has quit [Quit: Connection closed for inactivity]
Megtastique has quit []
vivekananda has joined #ruby
<wallerdev> yeah it's not really a "design pattern" it's just not copy pasting code
_1_cantalicio2 has joined #ruby
<SirFunk> weaksauce: yeah. I just wasn't sure if there was a good name to talk about that pattern
<SirFunk> Generally inheritance and/or composition feel icky to me
<SirFunk> then you end up with methods in the child class calling methods that you have no idea where they come from until you start digging into the includes/parent classes
<SirFunk> which are themselves often a few levels deep
<SirFunk> I'd rather just use some other class that encapsulates the logic and is named for what it does
rbennacer has joined #ruby
evanjs has joined #ruby
evanjs has quit [Remote host closed the connection]
robustus has quit [Ping timeout: 264 seconds]
jefus has joined #ruby
xenokiller has quit [Ping timeout: 264 seconds]
<weaksauce> SirFunk I don't think composition is when you use mixins
robustus|Off has joined #ruby
robustus|Off is now known as robustus
<weaksauce> it's more of a when you have a separate class that you use.
<weaksauce> has_a relationships vs. is_a relationships (composition vs. inheritance)
_1_cantalicio2 has quit [Remote host closed the connection]
<weaksauce> bike has a wheel is the canonical example I think
Channel6 has quit [Quit: Leaving]
wallerdev has quit [Ping timeout: 264 seconds]
lidenskap has quit [Remote host closed the connection]
lidenskap has joined #ruby
maximski has joined #ruby
A205B064 has quit [Ping timeout: 244 seconds]
teddyp1cker has joined #ruby
Rickmasta has joined #ruby
lidenskap has quit [Remote host closed the connection]
sohrab has quit [Ping timeout: 255 seconds]
tcrypt has quit [Ping timeout: 246 seconds]
sohrab has joined #ruby
teddyp1cker has quit [Ping timeout: 245 seconds]
jeramy_s has joined #ruby
bricker has quit [Quit: leaving]
aef has quit [Remote host closed the connection]
silentpost has joined #ruby
slyv has joined #ruby
aef has joined #ruby
maximski has quit []
evanjs has joined #ruby
evanjs has quit [Remote host closed the connection]
dorei has quit []
poguez_ has quit [Quit: Connection closed for inactivity]
kblake has joined #ruby
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
Tuxero has quit [Quit: Tuxero]
weaksauce has joined #ruby
aghalarp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Scriptonaut has left #ruby [#ruby]
Filete has joined #ruby
kblake has quit [Ping timeout: 245 seconds]
towski__ has quit [Remote host closed the connection]
amclain has joined #ruby
xenokiller has joined #ruby
Lloyd is now known as lloyd
sohrab has quit [Quit: leaving]
davedev24_ has quit [Read error: Connection reset by peer]
qualityaddict has joined #ruby
exadeci has quit [Quit: Connection closed for inactivity]
davedev24_ has joined #ruby
LJT has joined #ruby
framling has joined #ruby
jonatin has quit [Quit: Textual IRC Client: www.textualapp.com]
xenokiller has quit [Ping timeout: 255 seconds]
LJT has quit [Client Quit]
bobbrez has joined #ruby
wldcordeiro has joined #ruby
DerisiveLogic has quit [Ping timeout: 256 seconds]
jordsmi has quit [Quit: Connection closed for inactivity]
gregf1 has joined #ruby
kubunto has joined #ruby
cosmicfires has joined #ruby
Filete has quit [Ping timeout: 250 seconds]
frem has quit [Quit: Connection closed for inactivity]
<FernandoBasso> I wonder why isn't initialize just named ini or init, like def is kind of a short name for define.
juanpablo____ has joined #ruby
evanjs has joined #ruby
evanjs has quit [Remote host closed the connection]
_1_2805 has joined #ruby
sankaber has joined #ruby
_1_2805 has left #ruby [#ruby]
sinkensabe has joined #ruby
redlegion has joined #ruby
{orb} has joined #ruby
<{orb}> hey guys how do I get started with Ruby?
<{orb}> I know basic programming concepts including nested loops, pointers, memory access and the like
<redlegion> grab any lesson online
freestyl3r has quit [Ping timeout: 264 seconds]
<redlegion> screw with irb
<Coraline> I got started with _why's Poignant Guide to Ruby
juanpablo____ has quit [Ping timeout: 264 seconds]
endash has quit [Quit: endash]
<{orb}> Coraline: where?
<redlegion> neat, i'll have to check that out
<kubunto> i just jumped in with a project
cpt_yossarian has joined #ruby
<{orb}> Coraline: oh, do I know you?
cpt_yossarian has quit [Max SendQ exceeded]
slyv has quit [Quit: Textual IRC Client: www.textualapp.com]
cpt_yossarian has joined #ruby
sinkensabe has quit [Ping timeout: 252 seconds]
Mirubiri has joined #ruby
Mirubiri has quit [Client Quit]
{orb} has quit [Quit: {orb}]
<Coraline> orb: AFAIK I'm the only Coraline in the Ruby world.
<Coraline> Too late
Deele has quit [Ping timeout: 256 seconds]
redlegion has quit [Quit: leaving]
redlegion has joined #ruby
evanjs has joined #ruby
evanjs has quit [Remote host closed the connection]
silentpost has quit [Ping timeout: 240 seconds]
lethosor|away has quit [Quit: Connection closed for inactivity]
wldcordeiro has quit [Ping timeout: 245 seconds]
<FernandoBasso> I'm at 78% CodeCademy Ruby tutorial.
rbennacer has quit [Remote host closed the connection]
{orb} has joined #ruby
<kubunto> FernandoBasso: whats in the codecademy tutorial?
<FernandoBasso> I found Poignant amazing, but in the attempt to make it an entertaining book, it is also very 'blah blah'-like, and I am going through a period of very limited free time. CodeCademy seemed more to the point.
hannahkoala has joined #ruby
<Coraline> Fair
<FernandoBasso> But I intend to go through Poignant in the future.
<kubunto> FernandoBasso: again what was in the tutorial
zubov has joined #ruby
<FernandoBasso> kubunto: Basic stuff.
<kubunto> math, string, set stuff, flow control?
<FernandoBasso> I especially liked the blocks vs procs vs lambdas section (which I'll have to review and practice again, to be fair)
<FernandoBasso> kubunto: Yep.
<FernandoBasso> I'm getting started at the classes and objects part right now.
<FernandoBasso> I believe I'll have finished this course till Monday.
jeramy_s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
maximski has joined #ruby
benlieb has quit [Ping timeout: 245 seconds]
Sgeo has joined #ruby
krisquigley has joined #ruby
<FernandoBasso> kubunto: How have you learned Ruby? What about you, Coraline?
<kubunto> FernandoBasso: i took up a project and choose to write in ruby
icebourg has joined #ruby
<kubunto> decided*
<FernandoBasso> I'll try to make an ftp client for vim. I'll probably try Ruby for that.
<Coraline> I started with Rails in 2007, then realized I needed to know Ruby, so I started in on the fundamentals of the language.
hannahkoala has quit [Quit: My computer has gone to sleep. ZZZzzz…]
<FernandoBasso> But how? Reading what?
<Coraline> Mainly by trying things out and reading the docs
<kubunto> i have been in school since 2010 learning the basics of programming
<Coraline> I learn best by doing a project, personally
<kubunto> ^
silentpost has joined #ruby
<FernandoBasso> I finished uni last year. I'm from brazil and unis suck around here... So, I can't say I learned much there.
<FernandoBasso> Coraline: I think I am like that, but when I engage in trying some real project, I feel disheartened and it always seems I have to learn the languages more first before really trying real projects. I guess I'll have to change that.
tosbourn has joined #ruby
<kubunto> Coraline: does Ruby have a lot to offer for web data analysis
<Coraline> kubunto: depends on your goals? It's pretty powerful at munging and good for data structures, so e.g. processing logs would be a good use case.
<Coraline> FernandoBasso: start small?
zubov_ has joined #ruby
<kubunto> Coraline: funny you say that, first project in ruby was to do a log parser
zubov has quit []
<Coraline> :)
<kubunto> i liked having regex native to ruby
<kubunto> (python does not)
krisquigley has quit [Ping timeout: 264 seconds]
maximski has quit []
<FernandoBasso> Coraline: :)
Filete has joined #ruby
evanjs has joined #ruby
evanjs has quit [Remote host closed the connection]
tosbourn has quit [Ping timeout: 250 seconds]
<FernandoBasso> I'll probably engage in a project that parses real state websites to create a huge portal of apartments, houses, properties etc. It will be a web scraper, or something like that.
<kubunto> Coraline: how long have you been using ruby?
<FernandoBasso> It seems ruby is my best bet for that (with nokogiri).
<Coraline> 8 years or so
{orb} has quit [Ping timeout: 256 seconds]
linoj has joined #ruby
<FernandoBasso> I wonder if my boss thinks we'll be the next google...
markholmes has joined #ruby
thumpba has quit [Remote host closed the connection]
pika_pika has quit [Ping timeout: 245 seconds]
zorak8 has quit [Read error: Connection reset by peer]
benlieb has joined #ruby
a5i has joined #ruby
<FernandoBasso> And I'll have to make it happen :D
zorak8 has joined #ruby
cjim_ has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Remote host closed the connection]
fabrice31 has joined #ruby
lordkryss has quit [Quit: Connection closed for inactivity]
riotjones has joined #ruby
Tungki has joined #ruby
shazaum has quit [Quit: Leaving]
kubunto has quit [Quit: brb]
fabrice31 has quit [Ping timeout: 255 seconds]
casshern2 has quit [Ping timeout: 255 seconds]
Megtastique has joined #ruby
dmmoody has joined #ruby
CloCkWeRX has quit [Ping timeout: 256 seconds]
riotjones has quit [Ping timeout: 240 seconds]
dx7 has joined #ruby
cpt_yossarian has quit [Ping timeout: 250 seconds]
tus has quit []
n80 has joined #ruby
wldcordeiro has joined #ruby
wldcordeiro has quit [Remote host closed the connection]
Joufflu has joined #ruby
apoplexy has joined #ruby
kubunto has joined #ruby
jeramy_s has joined #ruby
lewix has quit [Remote host closed the connection]
<kubunto> I seem to have an issue with getting objects to work right: https://github.com/sammarder/Ruby-Log-Reader, error comes out of parse_date not being defined
bim has joined #ruby
<kubunto> (file.rb and irssiparse.rb)
evanjs has joined #ruby
evanjs has quit [Remote host closed the connection]
juanpablo____ has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bim has quit [Ping timeout: 256 seconds]
axl_ has quit [Quit: axl_]
lemur has joined #ruby
<kubunto> brb
<kubunto> wanna test something
kubunto has quit [Quit: brb]
kubunto has joined #ruby
<kubunto> still have the issue
amystephen has quit [Quit: amystephen]
juanpablo____ has quit [Ping timeout: 255 seconds]
Spami has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
lewix has joined #ruby
nateberkopec has quit [Quit: Leaving...]
<kubunto> nvm
<silentpost> window size 3
<silentpost> oops
markholmes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nfk has quit [Quit: yawn]
<zubov_> kubunto: remove self from your def or call the method directly as you do not need to new it up first
<kubunto> zubov_: which file
<zubov_> kubunto: it more or less acts like a static method in java if it has self in from of it
<zubov_> from=front
<zubov_> [1] pry(main)> class Test
<zubov_> [1] pry(main)* def self.print
<zubov_> [1] pry(main)* puts 'hello'
<zubov_> [1] pry(main)* end
<zubov_> [1] pry(main)* end
<zubov_> => :print
<zubov_> [2] pry(main)> Test.print
<zubov_> versus
<zubov_> [3] pry(main)> class Test1
<zubov_> [3] pry(main)* def print
<zubov_> [3] pry(main)* puts 'hi'
<zubov_> [3] pry(main)* end
<zubov_> [3] pry(main)* end
<zubov_> [6] pry(main)> t = Test1.new
<zubov_> => #<Test1:0x007fb3e31de518>
<zubov_> [7] pry(main)> t.print
<zubov_> hi
jottr has quit [Ping timeout: 246 seconds]
turtil has quit [Quit: WeeChat 1.1.1]
vdamewood has joined #ruby
turtil has joined #ruby
Sgeo has quit [Ping timeout: 244 seconds]
<kubunto> does the new method get called on initialize?
<zubov_> you got this
<zubov_> parser = Parser.new
<zubov_> parser.parse_date(date)
<kubunto> i moved the Parser.new to the intialization of a fileparser class
Tungki has quit [Read error: Connection reset by peer]
<kubunto> but it doesnt seem to get hit
<kubunto> pushing chage
<kubunto> there we go
<zubov_> but you got this in the other class
<zubov_> def self.parse_date(date)
<kubunto> i changed that to just parse_date
* kubunto facepalms
<zubov_> :)
topher has joined #ruby
<kubunto> ok got hte parser initialized, but still got the same thing as i did before i got that fixed
<kubunto> parse_date does not exist when it does
Guest5201 has quit [Ping timeout: 272 seconds]
tiago has joined #ruby
michael_mbp has quit [Excess Flood]
tiago is now known as Guest3271
michael_mbp has joined #ruby
Kricir has joined #ruby
<zubov_> go back to your version before the last push except for remove the self in front parse_date(date)
n80 has quit [Quit: n80]
<kubunto> TIL why not to use git to change stuff while trouble shooting
<zubov_> initialize is the constructor for ruby classes/objects
CloCkWeRX has joined #ruby
Kricir has quit [Client Quit]
topher has quit [Quit: Page closed]
<kubunto> what should the line say for the parse_date
<zubov_> if you reverted back to the original then just parse_date(date)
FernandoBasso has quit [Quit: leaving]
maximski has joined #ruby
teddyp1cker has joined #ruby
<zubov_> you are newing that up in the Fileparser class
longfeet has joined #ruby
pullphinger has joined #ruby
<kubunto> it is jsut parse_date now
<zubov_> as a general rule of thumb you should also name your file the same as your class name make it easier down the road
tjbiddle has joined #ruby
casadei has joined #ruby
teddyp1cker has quit [Ping timeout: 246 seconds]
vdamewoo_ has joined #ruby
vdamewood has quit [Ping timeout: 248 seconds]
ujihisa has joined #ruby
vdamewoo_ is now known as vdamewood
braincrash has quit [Quit: bye bye]
vt102 has quit [Remote host closed the connection]
casadei has quit [Ping timeout: 250 seconds]
tjbiddle has quit [Quit: tjbiddle]
linoj has quit [Quit: linoj]
sankaber has joined #ruby
braincrash has joined #ruby
coderhs has joined #ruby
rajeshchawla has joined #ruby
rajeshchawla has quit [Remote host closed the connection]
coderhs has quit [Client Quit]
babykosh has quit [Quit: babykosh]
WajidKagzi has joined #ruby
lethosor|away has joined #ruby
Nuck has joined #ruby
WajidKagzi has quit [Ping timeout: 248 seconds]
<Nuck> I'm trying to break up a class into small testable portions by splitting it into modules I can then include into the class, right? Is there a good pattern for encapsulating things like helper methods internal to a method?
<Nuck> Or is what I'm doing a code smell?
hgl has quit [Read error: Connection reset by peer]
redlegion has quit [Quit: Ded]
Deele has joined #ruby
hgl has joined #ruby
Igorshp has joined #ruby
hgl has quit [Max SendQ exceeded]
hgl has joined #ruby
hgl has quit [Max SendQ exceeded]
hgl has joined #ruby
silentpost has quit [Ping timeout: 248 seconds]
diegoviola has joined #ruby
Aswebb_ has joined #ruby
kwd has quit [Remote host closed the connection]
silentpost has joined #ruby
djbkd has joined #ruby
maximski has quit []
Igorshp has quit [Remote host closed the connection]
lidenskap has joined #ruby
<kubunto> my god classes are a pain in the ass
<kubunto> nothing should be this difficult
markholmes has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
nym has quit [Quit: Connection closed for inactivity]
<Nuck> classes are difficult?
<kubunto> for me it is
<Nuck> I hope you mean learning-classes and not object-classes
<kubunto> i mean object classes in rb
<Nuck> What's the problem? Understanding how they work in Ruby or understanding classes as a concept? o_o
<kubunto> Ruby
<kubunto> i can do objects in java in my dreams
<kubunto> or C#
<Nuck> Oh. That would explain why you have trouble in Ruby
<diegoviola> isn't classes just a way to group methods to a specific context?
<kubunto> diegoviola: yes
<Nuck> C# and Java hail from the C++ line of OOP while Ruby hails from the Smalltalk camp
<kubunto> Nuck: i can even do it in python
<diegoviola> what's so difficult to understand about that?
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<Nuck> I think Python hails from the C++ camp too, but I don't use Python enough to say for sure
<kubunto> diegoviola: ok, full disclosure i am a 5th year software engineering student
<kubunto> i understand a lot about comp sci
<kubunto> any way i think i am going to shelf this and attack it in a few days
<kubunto> i am clearly frustrated beyond help
<Nuck> Ruby classes are simple enough in premise as long as you don't try to dig too deep into eigenclasses and such
<diegoviola> so think of a class as a context?
<kubunto> Nuck: i am having initialization issues
<Nuck> Once you accept that every class is an instance of the Class class, pretty much everything falls into place
<Nuck> initialization issues? o_o
<Nuck> But... it's just def initialize?
<kubunto> not def new?
<Nuck> Nope
<Nuck> If you override the 'new' method, you'll remove the Ruby runtime's own allocation stuff
<Nuck> So it's 'initialize' inside the class and 'new' outside (because new calls the initialize method itself)
<kubunto> pardon my language but FOR FUCKS SAKE
<kubunto> tis reaction of a senior programming student when it finally works
<Nuck> haha
<Nuck> Doesn't matter how old you are, you'll always make mistakes like that
<kubunto> esp if you get into a new language
<Nuck> Or worse ones. I almost committed a sentence about golden showers into our codebase the other day
<kubunto> hahahahaha
<Nuck> It wasn't even legal code, it just got in there when my focus was wrong
Aswebb_ has quit [Remote host closed the connection]
willharrison has joined #ruby
<Nuck> I once actually *did* commit a couple extremely offensive expletives I put into the codebase when I got pissed at it and started throwing debugger logs everywhere
Aswebb_ has joined #ruby
<Nuck> That was embarassing to explain to the boss
<kubunto> damn
<Nuck> Learned my lesson real fast about using stuff like that
<Nuck> Now my log messages are single letters
ajpocus has joined #ruby
apoplexy has quit [Ping timeout: 246 seconds]
sankaber has quit [Read error: Connection reset by peer]
<kubunto> Nuck: should mention, there is no real documentation associated with classes that suggest anything about initialize
<kubunto> that is what led me to new
<zubov_> kubunto: scroll down a little
krisquigley has joined #ruby
<kubunto> in my defense it doesnt explain anything about it
Aswebb_ has quit [Ping timeout: 252 seconds]
apoplexy has joined #ruby
<kubunto> wow
<kubunto> well i feel smart now >.<
jeramy_s has quit [Quit: Peace out!]
<kubunto> at least the code is working again
tosbourn has joined #ruby
<kubunto> till i try and get it to use some other thing at 23:00
<kubunto> tomorrow
yh has joined #ruby
krisquigley has quit [Ping timeout: 264 seconds]
<lewix> I'm looking for a benchmark of programming languages - slowest to fastest
<zubov_> quit on a high note
<Nuck> kubunto: Yeah the docs for ruby are kind of sparse
<zubov_> kubunto: Pick Axe book is worth it
<Nuck> Just ruby things in general
ItSANgo has quit [Read error: Connection reset by peer]
<Nuck> Tutorials and books are plentiful though
<Nuck> Which kind of makes up for it
<zubov_> kubunto: do codeschool free ruby courses, that are kinda fun
ItSANgo_ has joined #ruby
<Nuck> I learned my stuff from _why's guide
<zubov_> kubunto: do the ruby koans
Kricir has joined #ruby
<kubunto> zubov_: thing is i know basics of code and likely not ot do codeschool/codeacademy
<Nuck> That's why I read _why's guide
<Nuck> It didn't teach me anything
<Nuck> Excpet chunky bacon
<zubov_> kubunto: the ruby codeschool is based of Why's book
<zubov_> the first free class that is
<kubunto> on that note i am going to part and search for why ruby book
kubunto has left #ruby [#ruby]
<Nuck> lol
<zubov_> Pick Axe is the best
<zubov_> book
<zubov_> for general ruby
renier has joined #ruby
<Nuck> I liked _why's guide because it really just taught me the basics while mostly just cracking strange esoteric jokes
<Nuck> And then I could dive in headfirst
tosbourn has quit [Ping timeout: 264 seconds]
FrankD__ has joined #ruby
<Nuck> plus the OST is boss
TheMoonMaster has quit [Ping timeout: 256 seconds]
yh has quit [Ping timeout: 245 seconds]
Senjai has quit [Ping timeout: 255 seconds]
rfi has quit [Ping timeout: 255 seconds]
<Nuck> There a good collection of ruby idioms and patterns, like a whole book of just patterns for every situation?
Senjai has joined #ruby
hmnhf__ has joined #ruby
renier_ has quit [Ping timeout: 245 seconds]
<Nuck> And not just generic "use a hash" crap, I'm talking "hiding the details of this class in this way" details?
robustus has quit [Ping timeout: 255 seconds]
<Nuck> wtf there is a bug literally just launching itself at my screen
<lemur> Practical Object Oriented Design in Ruby
FrankD_ has quit [Ping timeout: 255 seconds]
<zubov_> Sandi is awesome
<lemur> Beware becoming a religious adherent to the Gang of Four patterns and their variations though, it's a common snare for more junior people.
rfi has joined #ruby
<Nuck> Gang Of Four patterns?
TheMoonMaster has joined #ruby
<lemur> Google is a valuable tool
<Nuck> fair enough
<Nuck> I don't often adhere to "patterns" for broad stuff, honestly
hmnhf_ has quit [Ping timeout: 244 seconds]
<Nuck> I tend to just add them to my toolbox and make judgement calls on when to use them. So far I like to think I've got a pretty good success rate.
silentpost has quit [Ping timeout: 256 seconds]
<lemur> some people try and typecast everything into a GoF pattern and make a mess.
<lemur> so in that case that'd be the better approach
ItSANg___ has joined #ruby
<Nuck> This is Ruby, not Python. There's not just one right way to do something
<Nuck> :P
robustus has joined #ruby
<lemur> otherwise you end up with nonsense like this: Class AbstractSingletonProxyFactoryBean
<Nuck> hahahaha yeah
<Nuck> There's still better stuff like java.plaf.nimbus.InternalFrameTitlePaneInternalFrameCloseButtonBoxInternalFrameInternalFrame
<Nuck> Don't remember the exact class
gr33n7007h has quit [Ping timeout: 256 seconds]
<lemur> Yeah, but you get the general point in it.
<Nuck> yeah lol
hmnhf has joined #ruby
<lemur> that's why I straight refuse to touch Java
hmnhf__ has quit [Ping timeout: 264 seconds]
<Nuck> I find the biggest thing I struggle with in Ruby is hiding things
<c-c> what
<lemur> send :D
<Nuck> I've always been rather meticulous about what methods I expose where
<lemur> private not working?
<zubov_> that was what I was wondering
<c-c> sound like you shouldn't expose the things in the first place
ramfjord has joined #ruby
<Nuck> Well, in a Class that's find and dandy, but now I'm trying to break up Classes into pieces
ItSANgo_ has quit [Ping timeout: 264 seconds]
<Nuck> encapsulated pieces of code in Modules
fabrice31 has joined #ruby
<c-c> variables in modules are fine
<Nuck> Yeah but, what about helper methods?
<lemur> private is not class exclusive.
<jud> anyone done a hack day at their company?
<c-c> imo, one's "app" should declare one single global
<Nuck> But aren't the private methods accessible in the Class?
<c-c> no matter if js or ruby
<Nuck> the class that mixes in the thing?
<c-c> one, max
<Nuck> c-c: One global is one too many
<c-c> one global is fine
<lemur> jud: Yeah, why?
robbyoconnor has joined #ruby
<lemur> c-c: don't start a flame war on that one.
<jud> lemur, looking for ideas on what worked and what didn't. plenty of blogs but they all come with an implied corporate filter
<c-c> well, one global will not cause any measurable negative effect
<Nuck> c-c: Technically JavaScript only has one global
<Nuck> It's called "window"
<c-c> no
<Nuck> We see how well that worked for them
<Nuck> :P
<lemur> c-c: then you're designing it poorly, and that's all I'm saying on the matter.
<Nuck> People have this horrible tendency to tack all kinds of riders onto the global, just to cram it through
<lemur> Now then, hackathons
<c-c> technically, thats off topic here, but last I used node, it didn't have "window"
<Nuck> Yeah node has "global" instead
<lemur> What we ended up going with was giving engineers 2-3 days off normal work (unless they were critical ops)
<Nuck> And I think they don't let it automatically hit the global when you forget var
<lemur> and basically said free reign as long as it relates to the company in some way. Gave out cash prizes at the end for best projects out there.
<Nuck> But yeah, encapsulation. How could I hide methods inside a mixin'd module, from the class it's mixed into?
<lemur> Though really it depends on what you're wanting to know.
hmnhf has quit [Quit: Konversation terminated!]
fabrice31 has quit [Ping timeout: 250 seconds]
pontiki has quit [Ping timeout: 250 seconds]
<Nuck> The level of encapsulation needs to ensure at least that the class's subclasses cannot access those methods since this is a subclass-based DSL
<lemur> Honestly not sure on that one, I'd be inclined to say it doesn't matter too much though.
<Nuck> I've seen approaches varying from ye old JS approach of _prefix
markholmes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Nuck> To a private module full of helper methods
<jud> lemur, were the results good, was business impressed with what was delivered? besides that one restriction on free-reign would you do the same again or add any others? some co's talk about submitting their idea a week prior to the event
<jud> basically im trying to make it fun for engineers and impress business when it's all over
<c-c> I'd try to think of it as organizing things, instead of "hiding" or "no access"
<lemur> Making it worth their while without having to spend extra work time is the best way.
zorak8 has quit [Read error: Connection reset by peer]
<Nuck> c-c: Well, it's just helper methods to extract common or complex things
<lemur> cash / product prizes tend to get attention fairly quickly.
mitchellhenke has joined #ruby
zorak8 has joined #ruby
<Nuck> So it's not really "organization" that matters so much as, I don't want to accidentally have clobbering
<Nuck> I guess it's not _too_ big a deal though
<c-c> Nuck: see, you say "just", but you fret over the irrelevant
St1gma has quit [Read error: Connection timed out]
ajpocus has quit [Ping timeout: 256 seconds]
<Nuck> Well I'm worried about clobbering :P
Contigi has joined #ruby
<c-c> Nuck: how about, code
<Nuck> I was hoping there was a solid pattern for this, it seemed like a common thing. In JS there's closure variables etc.
pasv_ has quit [Remote host closed the connection]
paradisaeidae has joined #ruby
<lemur> lambdas are a thing in ruby
<jud> lemur, anything you'd do differently next time?
<Nuck> Yeah but since Ruby isn't function scoped exactly like JS that's not requird lol
<lemur> Try and get more ops involvement in it
<lemur> They're always afraid what they do isn't flashy enough compared to the devs.
<c-c> function scoped? you mean lexically scoped
<Nuck> No I mean function scoped
St1gma has joined #ruby
<lemur> JS is.... special sometimes
<Nuck> In JS, variables are function-scoped as opposed to block-scoped
<Nuck> ^
<c-c> well, I think thats incorrect, but again, thats off-topic
<Nuck> Thank god they fixed that with `let`
<jud> lemur, it's funny because as devs we're always wondering how can we get ops engineers embedded in our teams
<Nuck> c-c: Nah it's true. Provable easily with a for loop
<jud> they're a completely different org which has its pros and cons
yfeldblum has joined #ruby
<c-c> Nuck: sorry, what is true?
<lemur> tools for devs is probably the fastest.
<Nuck> c-c: That JS is function-scoped instead of block-scoped?
<lemur> Anything that makes deployment easier or cuts work
<c-c> no, thats not correct, Nuck
hmsimha has joined #ruby
<c-c> Nuck: and I'd rather you stick to the topic here: ruby
<Nuck> But it is :u
<Nuck> Fair enough
<c-c> you can go argue that in #javascript
<c-c> ruby is not lexically scoped, no
<Nuck> Yeah
<Nuck> Ruby is much better scoping-wise than JS
pontiki has joined #ruby
<Nuck> ^^^^^ this
<jud> lemur, thanks
<Nuck> function scope
<c-c> nope
<Nuck> and "let" solves it. And that's what I switched to "let" for everything.
<Nuck> Anyways, thanks for helping me realize I was solving a nonissue
pasv_ has joined #ruby
<zubov_> thinking if I should buy the new XPS 13 Developers edition for Ruby dev
<lemur> c-c: you're wrong. Google it.
<c-c> wrong about what?
<c-c> about javascript having lexical scope?
<Nuck> JS is lexically scoped
<lemur> block vs functional scope
<Nuck> But lexical is a separate thing from block vs functional
<Nuck> it's lexical function scope
<c-c> lemur: read my comments again
<lemur> but feel free to carry on.
<c-c> then, please paste the comment where I am "wrong"
<Nuck> That's literally arguing two entirely separate spectrums
<Nuck> And trying to argue that because it's here on spectrum B, it's not here on psectum A
Spami has quit [Quit: This computer has gone to sleep]
<c-c> saying "function scope" means your scope is closed inside a function, which you argued for at least 3 times, Nuck
<Nuck> It's *both* lexical and functional
<Nuck> c-c: Yes and that's how it is :u
<Nuck> it's lexically scoped within that function, inacessible outside it
<Nuck> lol
<Nuck> This is ridiculous
<c-c> I have no idea what "functional scope" is, and I've had it with you guys making incorrect statements about javascript scope on #ruby
<Nuck> o-okay
<Nuck> I'm just gonna go back to generating horrible SQL queries and doing horrible things to Postgres over here
dx7 has quit [Remote host closed the connection]
<c-c> Continue on javascript in #javascript if you can get in, ##javascript if you can't
<c-c> here, only ruby, please
<c-c> bye
DexterLB has quit [Quit: So long and thanks for all the fish]
Megtastique has quit []
jeromelanteri has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
keen____ has quit [Read error: Connection reset by peer]
RegulationD has joined #ruby
juanpablo____ has joined #ruby
dmmoody has quit [Remote host closed the connection]
keen_ has joined #ruby
amdbcg has joined #ruby
gr33n7007h has joined #ruby
RegulationD has quit [Ping timeout: 245 seconds]
juanpablo____ has quit [Ping timeout: 240 seconds]
anaeem1_ has joined #ruby
amdbcg has quit [Ping timeout: 250 seconds]
a5i has quit [Quit: Connection closed for inactivity]
bim has joined #ruby
OtterCoder has quit [Ping timeout: 256 seconds]
markholmes has joined #ruby
<shevy> all hail our new master
<shevy> The Javascript
* c-c prefers ecmascript
<c-c> I only use languages that have standards
vdamewood has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
bim has quit [Ping timeout: 246 seconds]
ponga has joined #ruby
knikolov has quit [Quit: WeeChat 1.2-dev]
iotouch has joined #ruby
gr33n7007h has quit [Ping timeout: 244 seconds]
shellfu has quit [Remote host closed the connection]
knikolov has joined #ruby
Spami has joined #ruby
Porfa has quit [Quit: porfa]
keen_ has quit [Read error: Connection reset by peer]
keen_ has joined #ruby
<weaksauce> is there anything that tells you what line in your gemfile is responsible for a failing bundle install?
Porfa has joined #ruby
<weaksauce> one of the dependencies of a gem is not installing correctly and it's not in the gemfile.lock and not in the gemfile
rippa has joined #ruby
apoplexy has quit [Ping timeout: 244 seconds]
<weaksauce> I am commenting each line out to figure out what gem is responsible but there must be a better way
wldcordeiro has joined #ruby
cjim_ has quit [Quit: (null)]
wldcordeiro__ has joined #ruby
<lemur> Cheapest way I can think is to automate that part
wldcordeiro__ has quit [Client Quit]
<lemur> but yeah, there has to be a better way...
teddyp1cker has joined #ruby
<weaksauce> termios is failing. wtf. I uncommented a block and the error came and then commented it back and the error won't go away
<shevy> hmm
amdbcg has joined #ruby
_honning_ has quit [Ping timeout: 252 seconds]
<shevy> I think I had such errors when I had two ruby-gem installed
<shevy> one from the regular gem, and a newer one via setup.rb
<weaksauce> hm it's the engine yard gem apparently
ruby639 has joined #ruby
<dudedudeman> anyone around to help me sus out a superclass mismatch error?
<weaksauce> dudedudeman sure gist the stack trace and the code
<dudedudeman> weaksauce! you're the coolest
<dudedudeman> stack trace?
<weaksauce> the full error message plus where it says a bunch of things that probably don't make sense to you
<dudedudeman> ah
<weaksauce> basically it's a trace of where the program was executing to get to the error
teddyp1cker has quit [Ping timeout: 264 seconds]
<dudedudeman> now i officially know what a trace is
<dudedudeman> awesome
gr33n7007h has joined #ruby
<weaksauce> it's the stuff after the error
<dudedudeman> there's the trace
mikecmpbll has quit [Quit: ciao.]
<weaksauce> gist the migrations
gabeh has joined #ruby
<weaksauce> you probably have two classes called Monitor with different superclasses
<dudedudeman> see, when i grep 'class Monitor' it comes up twice. but one of them is in my model, and one is in my test folder
<dudedudeman> my migration is just CreateMigration
<dudedudeman> i'm gisting now
Eiam_ has joined #ruby
oo_ has joined #ruby
Kricir has quit [Remote host closed the connection]
<weaksauce> well the test one shouldn't be called that
<dudedudeman> ... is it really that simple?
<weaksauce> should be something like MonitorTest < Minitest::Test or something like that
amdbcg has quit [Remote host closed the connection]
<weaksauce> not Monitor < Minitest::Test
<weaksauce> you are redefining what parent Monitor has
ajpocus has joined #ruby
<shevy> you naughty boy you
<dudedudeman> i changed the class of the test file to MonitorTest and it's throwing the same error
<c-c> should be plural perhaps
<c-c> not related to error though
gr33n7007h has quit [Ping timeout: 264 seconds]
Porfirium has joined #ruby
lxsameer has joined #ruby
<dudedudeman> let me gist that there test real fast. i think i have an idea of what the problem might be
Spami has quit [Quit: This computer has gone to sleep]
agent_white has joined #ruby
<weaksauce> don't have a class within a class dudedudeman
<c-c> hehe
dfinninger has quit [Remote host closed the connection]
<dudedudeman> i feared that was the issue...
<dudedudeman> what's weird, is that test used to run just fine
gr33n7007h has joined #ruby
<weaksauce> might not be *the* issue but it's one
ujihisa has quit [Ping timeout: 256 seconds]
Porfirium has quit [Client Quit]
<dudedudeman> huh. so it looks like you can, but maybe not in this context
<shevy> we have a stackoverflow bot finally \o/
<shevy> you can use modules just as you can use classes for namespaces just fine
<c-c> you do? well why don't you also add one on this chan
Vile` has quit [Ping timeout: 264 seconds]
<shevy> it's you c-c bottie!
<shevy> there are actually already way too many bots here... 5 or so
<c-c> people wanna argue
<shevy> >> puts 'hi c-c'
<ruboto> shevy # => hi c-c ...check link for more (https://eval.in/311942)
shashank_ has joined #ruby
<c-c> better just paste urls
<shevy> damn
<shevy> where is eval-in
<dudedudeman> ok, taking theclass from the class didn't solve it
<shevy> I don't like the output of ruboto
Kricir has joined #ruby
shashank_ has left #ruby [#ruby]
<c-c> shevy I'll wait while you implement one
<shevy> implement a bot?
<shevy> we need less bots!
<c-c> dudedudeman: so, same error?
<dudedudeman> yes sir! or ma'am
<weaksauce> dudedudeman gist the complete test
<c-c> dudedudeman: whats this "DC" anyway?
wldcordeiro has quit [Ping timeout: 245 seconds]
<dudedudeman> that's the test gist from earlier. i did forget to include the last end when copy/pasting
iotouch has quit [Quit: This computer has gone to sleep]
<dudedudeman> and it is a dreamcolor monitor
teddyp1cker has joined #ruby
<c-c> dudedudeman: you are missing an end
<weaksauce> you still have nested classes
<dudedudeman> the end is in my code, i just forgot to copy/pasta it :(
Soda has joined #ruby
<shevy> you are becoming sloppy man!
<c-c> dudedudeman: did you read my link
<shevy> "my" link? :D
<dudedudeman> sorry for being sloppy! :(
<shevy> it's ok, do some excercise, drink cold water - then continue!
<dudedudeman> cold water. check! exercise..... tomorrow
<dudedudeman> weaksauce: that's what i attempted earlier, but it gave me the same error
<weaksauce> doesn't matter if it did. that's the correct way to write it
<weaksauce> so write it that way
lewix has quit [Remote host closed the connection]
<dudedudeman> now, obvisouly i can go to my models and add an 's' to end of each of my classes, but i'm trying to stick with AR naming conventions where the class is singular of the table name
<dudedudeman> roger
sid_ has joined #ruby
<weaksauce> find where it says class Monitor < something in your project
<dudedudeman> standby while i grep
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dudedudeman> it only says that in my model
Sgeo has joined #ruby
<dudedudeman> where i'm calling class Monitor < ActiveRecord::Base
<weaksauce> gist your Monitor class
<weaksauce> the entire file
riotjones has joined #ruby
<dudedudeman> sorry, entire file. hold on
thumpba has joined #ruby
pontiki has quit [Quit: these dreams are made of cheese...]
ponga has quit [Remote host closed the connection]
<dudedudeman> at this point, it is literally the class, and my requires
dfinninger has joined #ruby
<dudedudeman> the require './idea' at the top just points to a file with code that is commented out, so it's not pulling in anything
<weaksauce> I am going to guess that Monitor is being defined by a gem that you have
<weaksauce> above class Monitor. put this
<dudedudeman> huh
<dudedudeman> that's entirely possible
<weaksauce> puts Monitor.superclass
teddyp1cker has quit [Remote host closed the connection]
mostlybadfly has quit [Quit: Connection closed for inactivity]
<weaksauce> dudedudeman this is why having genericish classnames is not the best idea
riotjones has quit [Ping timeout: 246 seconds]
charliesome has joined #ruby
maloik has quit [Ping timeout: 252 seconds]
<dudedudeman> i'll need to get a little more clever. i truly just used that because i am calibrating monitors
<dudedudeman> and when i puts that, it just says 'Object'
thumpba_ has joined #ruby
maloik has joined #ruby
<weaksauce> yep that means that someone already created the class definition
mlev has quit [Read error: Connection reset by peer]
<weaksauce> otherwise it would say something like uninitialized constant Monitor
kitkat- has joined #ruby
<dudedudeman> i've learned so much today
<weaksauce> ComputerMonitor Might be a better name
dfinninger has quit [Remote host closed the connection]
<weaksauce> monitor is a bad name by itself anyway
<dudedudeman> i'm going to go with AddMonitor
<weaksauce> that's a bad model name
<weaksauce> a model is a noun not a verb
<dudedudeman> !
<dudedudeman> i can't get it right
<weaksauce> it's a thing not an action
<dudedudeman> ah, ok that's some good guidance
kitkat- has quit [Client Quit]
<c-c> or perhaps its MonitorDevice
thumpba has quit [Ping timeout: 276 seconds]
<dudedudeman> can a model be a three word camel case?
<weaksauce> yes
<dudedudeman> such as, DreamColorMonitor?
<weaksauce> that's not a great name either but hey it's up to you.
<weaksauce> :P
<c-c> "monitor" always reminds me of CreamColorMonitor
Guest1886 has joined #ruby
<c-c> CreamColorCRTMonitor even
<weaksauce> the brand called "dream"?
<Guest1886> Taken 3
<dudedudeman> psh. you're making me blush at my ignorance
<dudedudeman> :P
icebourg has quit []
<weaksauce> if so it's better to be a column in your monitor class
<weaksauce> s/class/table/
<dudedudeman> so if i change my model name, do i need to change my table name then?
<Guest1886> #iceman
bim has joined #ruby
<weaksauce> yes and no.
<Guest1886> yes
dfinninger has joined #ruby
<weaksauce> it's better to follow the conventions
<Guest1886> ok
<weaksauce> but you can set an attribute to tell AR to use a different name
<Guest1886> me?
<weaksauce> huh?
<dudedudeman> i'd rather follow convention
<weaksauce> rename the table to be plural of your model name
<weaksauce> separated by underscores and lowercase.
<dudedudeman> let me drop my tables in my db and do new migrations with all of this. i want to beat it in to my head to make sure i'm doing this right from the ground up
<Guest1886> #action movies
krisquigley has joined #ruby
oo_ has quit [Remote host closed the connection]
Guest1886 has quit [Quit: -a- IRC for Android 2.1.23]
bim has quit [Ping timeout: 252 seconds]
sid__ has joined #ruby
sid_ has quit [Quit: Ex-Chat]
dfinninger has quit [Ping timeout: 272 seconds]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
yh has joined #ruby
<dudedudeman> weaksauce; annnnnnddd we have liftoff!
<weaksauce> :)
krisquigley has quit [Ping timeout: 250 seconds]
<dudedudeman> rake test passes and all things look like they did before i started dicking around with this this afternoon
<dudedudeman> things to take away from this: 1) be more strategic in my class naming 2) can call .superclass on stuff object means it's been called before 3) classes withing classes are weird and they smell funny
oo_ has joined #ruby
<weaksauce> a tip is to make the test fail to make sure it's actually running then make it pass
<dudedudeman> things to take away from this: 1) be more strategic in my class naming 2) can call .superclass on stuff object means it's been called before 3) classes withing classes are weird and they smell funny
<dudedudeman> sorry, submitted twice :(
<dudedudeman> break the code, fix the code
<dudedudeman> i'm still getting used to testing and even figuring out what to test
<weaksauce> you can have a test that's the same name as another test and it will overwrite the first test
sid__ has quit [Client Quit]
<weaksauce> so you want to make sure you are not testing nothing :(
<dudedudeman> there is so much learning to do! i am much excited
ajpocus has quit [Ping timeout: 250 seconds]
<dudedudeman> can i ask one more question?
paradisaeidae has quit [Quit: ChatZilla 0.9.91.1 [Firefox 37.0.1/20150402191859]]
yh has quit [Ping timeout: 276 seconds]
<weaksauce> sure
<dudedudeman> i now have my two classes and they have a has_many relationshipo
<dudedudeman> DCMonitor has_many Calibrations
<dudedudeman> and Calibration belongs to DCMonitor
<dudedudeman> Would it be DCMonitor.Calibration.new(foo stuff) to create a new row in my tables?
gabeh has quit [Remote host closed the connection]
ponga has joined #ruby
<dudedudeman> i'm currently looking through the API but i figured i would just shove that out there
<weaksauce> yeah that will make one but you need to save it
<dudedudeman> .save
<weaksauce> well you would create a DCMonitor first then call calibration.new on that
<weaksauce> to attach it to that object
<shevy> I just realized
<dudedudeman> foo = DCMonitor.new
<shevy> I hate chinese symbols in youtube comments
mlev has joined #ruby
<dudedudeman> foo.calibration.new?
<weaksauce> there are many ways to create objects dudedudeman but yeah that's one.
<dudedudeman> ok. i'm just irb'ing
<weaksauce> create is another way it builds and saves
<dudedudeman> i'll leave you be, thank you so much again
<weaksauce> all at once
x1337807x has joined #ruby
<dudedudeman> .create
fabrice31 has joined #ruby
Spami has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<weaksauce> yep.
<weaksauce> play with it in irb. press foo.<tab> and see what methods are there
Vile` has joined #ruby
<dudedudeman> all 582 of them!
<dudedudeman> huzzah. this is nice
ramfjord has quit [Ping timeout: 250 seconds]
anaeem1_ has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 255 seconds]
_1_suresh has joined #ruby
<_1_suresh> hii good morning
charliesome has quit [Quit: zzz]
A205B064 has joined #ruby
RegulationD has joined #ruby
knikolov has quit [Quit: WeeChat 1.2-dev]
_1_suresh has quit [Remote host closed the connection]
amdbcg1 has joined #ruby
Mon_Ouie has joined #ruby
lethosor|away has quit [Quit: Connection closed for inactivity]
RegulationD has quit [Ping timeout: 256 seconds]
sinkensabe has joined #ruby
amdbcg1 has quit [Ping timeout: 256 seconds]
musashi1 has quit [Ping timeout: 250 seconds]
weemsledeux has joined #ruby
charliesome has joined #ruby
Morkel has joined #ruby
knikolov has joined #ruby
roolo has joined #ruby
juanpablo____ has joined #ruby
lavros has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Zamerick has quit [Read error: Connection reset by peer]
amdbcg has joined #ruby
juanpablo____ has quit [Ping timeout: 252 seconds]
charliesome has quit [Quit: zzz]
User458764 has joined #ruby
gr33n7007h has quit [Ping timeout: 250 seconds]
gsd has joined #ruby
doodlehaus has quit [Remote host closed the connection]
anaeem1_ has joined #ruby
makepkgnotwar has joined #ruby
The_Phoenix has joined #ruby
iotouch has joined #ruby
workmad3 has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dudedudeman has quit [Ping timeout: 246 seconds]
amdbcg has quit [Ping timeout: 256 seconds]
User458764 has joined #ruby
gr33n7007h has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
kevinying has joined #ruby
FrankD__ has quit [Quit: Leaving]
pico-pete has quit [Read error: Connection reset by peer]
Takle has joined #ruby
longfeet has quit [Ping timeout: 272 seconds]
bim has joined #ruby
Igorshp has joined #ruby
dfinninger has joined #ruby
iotouch has quit [Quit: This computer has gone to sleep]
gorpon has joined #ruby
pico-pete has joined #ruby
turtil has quit [Ping timeout: 272 seconds]
iotouch has joined #ruby
eshiffob has joined #ruby
turtil has joined #ruby
bim has quit [Ping timeout: 245 seconds]
anaeem1_ has quit [Remote host closed the connection]
Igorshp has quit [Ping timeout: 256 seconds]
tosbourn has joined #ruby
etqqkoiflwhb has joined #ruby
dfinninger has quit [Ping timeout: 265 seconds]
codecop has joined #ruby
cefkamcau has quit [Ping timeout: 276 seconds]
tosbourn has quit [Ping timeout: 256 seconds]
Spami has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Channel6 has joined #ruby
lemur has quit [Remote host closed the connection]
zorak8 has quit [Ping timeout: 255 seconds]
amclain has quit [Quit: Leaving]
Spami has quit [Quit: This computer has gone to sleep]
yfeldblum has joined #ruby
sevvie has quit [Ping timeout: 252 seconds]
iamninja has quit [Ping timeout: 245 seconds]
juanpablo____ has joined #ruby
greenbagels has quit [Quit: Leaving]
SalexW has joined #ruby
Asher has joined #ruby
markholmes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yfeldblu_ has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Ping timeout: 256 seconds]
anaeem1 has joined #ruby
juanpablo____ has quit [Ping timeout: 264 seconds]
oo_ has quit [Remote host closed the connection]
pico-pete has quit [Ping timeout: 248 seconds]
pico-pete has joined #ruby
sevvie has joined #ruby
Takle has quit [Remote host closed the connection]
sinkensabe has quit [Remote host closed the connection]
apoplexy has joined #ruby
roolo has quit [Remote host closed the connection]
colorisco has joined #ruby
musashi1 has joined #ruby
AlphaTech is now known as zz_AlphaTech
<wasamasa> ?whatchat
<ruboto> I don't know anything about whatchat
<wasamasa> ?whatschat
<ruboto> WhatsChat is a crappy app that abuses IRC for something it is not: a dating chat. Please remove this app.
Channel6 has quit [Quit: Leaving]
nahtnam has quit [Quit: Connection closed for inactivity]
kevinying has quit [Ping timeout: 256 seconds]
<wasamasa> oh, they left
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
musashi1 has quit [Ping timeout: 246 seconds]
ponga has quit [Quit: Leaving...]
ponga has joined #ruby
zapata has quit [Ping timeout: 256 seconds]
zapata has joined #ruby
bMalum has joined #ruby
gorpon has quit [Ping timeout: 245 seconds]
krisquigley has joined #ruby
codecop has quit [Quit: Išeinu]
latemus has quit [Ping timeout: 245 seconds]
ponga has quit [Remote host closed the connection]
hanmac has joined #ruby
<jhass> yeah, like 20 minutes before :P
sinkensabe has joined #ruby
Sgeo has quit [Ping timeout: 244 seconds]
krisquigley has quit [Ping timeout: 256 seconds]
musashi1 has joined #ruby
oo_ has joined #ruby
dfinninger has joined #ruby
CloCkWeRX has joined #ruby
rrodriguescesar has joined #ruby
fabrice31 has joined #ruby
oo_ has quit [Ping timeout: 248 seconds]
sevvie has quit [Ping timeout: 252 seconds]
dfinninger has quit [Ping timeout: 245 seconds]
beat has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<cosmicfires> can I use a debugger with ruby 2.2.0? which one?
Takle has joined #ruby
fabrice31 has quit [Ping timeout: 265 seconds]
<jhass> cosmicfires: stdlib ships one and there's byebug. Personally I use pry + pry-byebug + pry-stack_explorer
Takle has quit [Remote host closed the connection]
<cosmicfires> thanks
sevvie has joined #ruby
RegulationD has joined #ruby
makepkgnotwar has quit [Quit: Textual IRC Client: www.textualapp.com]
User458764 has joined #ruby
Pharaoh2 has joined #ruby
<aawe> can I use matches in gsub replacement?
Morkel has quit [Quit: Morkel]
<aawe> nm found on google
oo_ has joined #ruby
Filete has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sevvie has quit [Ping timeout: 240 seconds]
RegulationD has quit [Ping timeout: 255 seconds]
beat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ndrei has joined #ruby
Spami has joined #ruby
Spami has quit [Client Quit]
Hijiri has quit [Ping timeout: 265 seconds]
Darryl___ has joined #ruby
Hijiri has joined #ruby
dangerousdave has joined #ruby
deavidsedice has joined #ruby
deavid has quit [Ping timeout: 246 seconds]
lordkryss has joined #ruby
teddyp1cker has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
User458764 has joined #ruby
akurilin2 has joined #ruby
roshanavand has joined #ruby
akurilin has quit [Read error: Connection reset by peer]
KC9YDN has quit [Ping timeout: 245 seconds]
akurilin3 has joined #ruby
TinkerTyper has quit [Ping timeout: 245 seconds]
shadoi has quit [Ping timeout: 245 seconds]
jheg has joined #ruby
akurilin2 has quit [Ping timeout: 256 seconds]
TinkerTyper has joined #ruby
oo_ has quit [Remote host closed the connection]
shadoi has joined #ruby
yh has joined #ruby
Nuck has quit [Quit: Computer has gone to sleep.]
oo_ has joined #ruby
lobolars has joined #ruby
yh has quit [Ping timeout: 250 seconds]
yh has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sevvie has joined #ruby
Hijiri has quit [Ping timeout: 256 seconds]
doodlehaus has joined #ruby
Pupeno has quit [Remote host closed the connection]
WajidKagzi has joined #ruby
agent_white has quit [Quit: Goodnightmoon.]
KC9YDN has joined #ruby
KC9YDN has joined #ruby
anaeem1 has quit [Remote host closed the connection]
doodlehaus has quit [Ping timeout: 245 seconds]
mengu has joined #ruby
mengu has joined #ruby
WajidKagzi has quit [Ping timeout: 255 seconds]
ponga has joined #ruby
niko has quit [Remote host closed the connection]
niko has joined #ruby
Soda has quit [Remote host closed the connection]
ponga has quit [Ping timeout: 250 seconds]
mengu has quit [Ping timeout: 272 seconds]
sevenseacat has joined #ruby
lidenskap has quit [Remote host closed the connection]
noname has quit [Quit: WeeChat 1.1.1]
DexterLB has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
danielfeng has joined #ruby
dangerousdave has joined #ruby
Peetooshock has left #ruby ["Leaving"]
bim has joined #ruby
Rachok has joined #ruby
Rachok has left #ruby [#ruby]
mostlybadfly has joined #ruby
dfinninger has joined #ruby
ponga has joined #ruby
iamjarvo has joined #ruby
mengu has joined #ruby
mengu has joined #ruby
danielfeng has quit [Quit: Leaving]
iamjarvo has quit [Client Quit]
bim has quit [Ping timeout: 250 seconds]
dfinninger has quit [Ping timeout: 265 seconds]
lkba has quit [Read error: Connection reset by peer]
DexterLB has quit [Quit: So long and thanks for all the fish]
roshanavand has quit [Remote host closed the connection]
DexterLB has joined #ruby
DexterLB has quit [Client Quit]
doritostains has quit [Quit: WeeChat 1.0.1]
juanpablo____ has joined #ruby
niko has quit [Quit: leaving]
DexterLB has joined #ruby
DexterLB has quit [Remote host closed the connection]
niko has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
data-cat has quit [Ping timeout: 265 seconds]
dangerousdave has joined #ruby
lavros_ has joined #ruby
anaeem1 has joined #ruby
sevvie has quit [Ping timeout: 252 seconds]
lavros has quit [Ping timeout: 252 seconds]
DexterLB has joined #ruby
dangerousdave has quit [Client Quit]
juanpablo____ has quit [Ping timeout: 245 seconds]
lidenskap has joined #ruby
dangerousdave has joined #ruby
dangerousdave has quit [Client Quit]
DexterLB has quit [Client Quit]
diegoviola has quit [Quit: WeeChat 1.1.1]
sevvie has joined #ruby
A205B064 has quit [Ping timeout: 252 seconds]
SouL_|_ has quit [Ping timeout: 250 seconds]
riotjones has joined #ruby
kaspernj has joined #ruby
mengu has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
mengu has joined #ruby
jheg has quit [Quit: jheg]
freestyl3r has joined #ruby
vedu has joined #ruby
riotjones has quit [Ping timeout: 245 seconds]
pandaant has joined #ruby
iotouch has quit [Quit: This computer has gone to sleep]
<vedu> Hello. Apparently rpush is delaying sending of GCM notifications. In the logs something or the other keeps running and the actual notification is processed after some (~10sec) delay
lobolars has quit [Remote host closed the connection]
krisquigley has joined #ruby
bMalum has quit [Quit: bMalum]
vudew has quit [Quit: Lost terminal]
sinkensabe has quit [Remote host closed the connection]
krisquigley has quit [Ping timeout: 250 seconds]
<jhass> never used rpush, but maybe we can find something in the docs. what backend?
SouL_|_ has joined #ruby
ghr has joined #ruby
<vedu> jhass: backend as in active record?
jeromelanteri has joined #ruby
<jhass> well yes, it supports redis, AR etc apparently
<vedu> jhass: oh. I am running it with rails so active record
<jhass> what's the configured poll interval?
Pupeno has joined #ruby
<vedu> jhass: 2 seconds
Takle has joined #ruby
<jhass> did you profile the query it polls with?
beat has joined #ruby
<vedu> only the last line is an actual message, rest all are something that keep running indefitely
zotherstupidguy has joined #ruby
<zotherstupidguy> hi, whats a good way to test commandline applications
<colorisco> whats difference between pry-debug and pry-byebug
hs366 has joined #ruby
<jhass> vedu: well, since that includes no timestamps I see no query time for the actual query there
jimms has joined #ruby
thumpba_ has quit [Ping timeout: 246 seconds]
<jhass> colorisco: byebug is the more modern version I'd say
<jhass> pry-debug should use the one shipped in stdlib I think
fabrice31 has joined #ruby
Jiyuhen has quit [Quit: No Ping reply in 210 seconds.]
casshern2 has joined #ruby
Jiyuhen has joined #ruby
anaeem1 has quit [Remote host closed the connection]
lkba has joined #ruby
fabrice31 has quit [Ping timeout: 250 seconds]
coventry` has quit [Ping timeout: 245 seconds]
RegulationD has joined #ruby
tvw has joined #ruby
dfinninger has joined #ruby
bergice has joined #ruby
lidenskap has quit [Remote host closed the connection]
sevenseacat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
code_[BNC] has joined #ruby
RegulationD has quit [Ping timeout: 276 seconds]
dfinninger has quit [Ping timeout: 244 seconds]
Takle has quit [Remote host closed the connection]
teddyp1cker has quit [Remote host closed the connection]
yaboyjava has joined #ruby
<yaboyjava> what these fucks be talking about
<yaboyjava> apeiros u can suck my dick
<yaboyjava> this channel so shoot lol
<yaboyjava> shook
yaboyjava was banned on #ruby by Mon_Ouie [*!*@gateway/web/cgi-irc/kiwiirc.com/ip.216.185.58.84]
yaboyjava was kicked from #ruby by Mon_Ouie [yaboyjava]
lidenskap has joined #ruby
davedev2_ has joined #ruby
davedev24_ has quit [Ping timeout: 265 seconds]
teddyp1cker has joined #ruby
code_ has quit [Quit: BNC - Hosted by EpicKitty]
<vedu> jhass: I guess there is no problem
Takle has joined #ruby
michael_mbp has quit [Excess Flood]
ghr has quit [Ping timeout: 272 seconds]
michael_mbp has joined #ruby
ghr has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
LJT has joined #ruby
yh has quit [Ping timeout: 248 seconds]
CloCkWeRX has left #ruby [#ruby]
AlexRussia has quit [Ping timeout: 246 seconds]
LJT has quit [Client Quit]
User458764 has joined #ruby
Pupeno has quit [Remote host closed the connection]
jimms has quit [Read error: Connection reset by peer]
jimms has joined #ruby
davidhq has joined #ruby
code_[BNC] has quit [Quit: BNC - Hosted by EpicKitty]
Pupeno has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
code_ has joined #ruby
code_ has quit [Client Quit]
lidenskap has quit [Remote host closed the connection]
etqqkoiflwhb has quit [Ping timeout: 246 seconds]
maciejczyzewski has joined #ruby
robustus has quit [Ping timeout: 264 seconds]
Joufflu has quit [Read error: Connection reset by peer]
renier_ has joined #ruby
oo_ has quit [Remote host closed the connection]
DexterLB has joined #ruby
robustus has joined #ruby
oo_ has joined #ruby
davedev2_ has quit [Ping timeout: 256 seconds]
renier has quit [Ping timeout: 255 seconds]
FernandoBasso has joined #ruby
oo_ has quit [Remote host closed the connection]
code_ has joined #ruby
DexterLB has quit [Client Quit]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
exadeci has joined #ruby
code_ has quit [Quit: BNC - Hosted by EpicKitty]
pygospa has quit [Ping timeout: 246 seconds]
etqqkoiflwhb has joined #ruby
pygospa has joined #ruby
doodlehaus has joined #ruby
anaeem1_ has joined #ruby
code_ has joined #ruby
lidenskap has joined #ruby
lidenskap has quit [Remote host closed the connection]
code_ has quit [Client Quit]
ghr has quit [Ping timeout: 246 seconds]
tlarevo has joined #ruby
WajidKagzi has joined #ruby
iotouch has joined #ruby
lidenskap has joined #ruby
doodlehaus has quit [Ping timeout: 255 seconds]
lidenskap has quit [Remote host closed the connection]
WajidKagzi has quit [Ping timeout: 252 seconds]
Darryl___ has quit [Quit: Connection closed for inactivity]
pygospa has quit [Ping timeout: 250 seconds]
pygospa has joined #ruby
Morkel has joined #ruby
iotouch has quit [Quit: This computer has gone to sleep]
bim has joined #ruby
juanpablo____ has joined #ruby
code_ has joined #ruby
code_ has quit [Remote host closed the connection]
dfinninger has joined #ruby
oo_ has joined #ruby
stef204 has joined #ruby
bim has quit [Ping timeout: 246 seconds]
juanpablo____ has quit [Ping timeout: 248 seconds]
beat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AlexRussia has joined #ruby
dfinninger has quit [Ping timeout: 252 seconds]
anaeem1_ has quit [Remote host closed the connection]
blueOxigen has joined #ruby
bluOxigen has quit [Ping timeout: 245 seconds]
kyrylo has quit [Ping timeout: 250 seconds]
aswen has joined #ruby
phale has joined #ruby
<phale> Good evening, friends.
DaniG2k has joined #ruby
lidenskap has joined #ruby
lidenskap has quit [Remote host closed the connection]
jimms_ has joined #ruby
Morkel has quit [Quit: Morkel]
jimms has quit [Read error: Connection reset by peer]
lidenskap has joined #ruby
lidenskap has quit [Remote host closed the connection]
code_ has joined #ruby
code_ has quit [Client Quit]
bim has joined #ruby
code_ has joined #ruby
jenrzzz has joined #ruby
lethosor|away has joined #ruby
jimms has joined #ruby
code_ has quit [Client Quit]
jimms_ has quit [Read error: Connection reset by peer]
code_ has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ferr has joined #ruby
colorisco has quit [Ping timeout: 240 seconds]
jimms has quit [Ping timeout: 276 seconds]
User458764 has joined #ruby
krisquigley has joined #ruby
jimms has joined #ruby
<phale> jhass: Didn't know you were OP on here, heh
<jhass> fairly new ;)
<phale> Ah
<apeiros> krainboltgreene: your beloved #node.js doesn't seem to do an awful much against trolls…
aswen has quit [Ping timeout: 248 seconds]
<krainboltgreene> I'm not going to discuss anything if you start off with passive aggressive wording.
<apeiros> at least when I compare the average response time there and here, #ruby wins hands-down
<apeiros> *shrug*
<phale> Is Ruby still the slowest language?
<krainboltgreene> That's what I thought.
<phale> I'm scared of using it now.
<apeiros> phale: no, still the second slowest
<phale> Oh.
<phale> What's the first slowest then?
<apeiros> and that's usually more than fast enough
arup_r has joined #ruby
<apeiros> krainboltgreene: you're just the right person to complain about passive aggressive. but hey, what did I expect :)
<krainboltgreene> When it comes to community toxicity I take things pretty seriously.
<apeiros> phale: and if it isn't fast enough, you can write native extensions.
mostlybadfly has quit [Quit: Connection closed for inactivity]
<phale> Alright
<apeiros> krainboltgreene: so what do you do about the situation in #node.js? in here, you ranted even with a response time of <3min…
<apeiros> I don't see you rant over there.
<krainboltgreene> I'm not going to discuss this if you're going to (again) use passive aggressive wording.
<apeiros> we both know that that's not the reason.
<phale> I want to create a file parser but the format I'm attempting to parse has no documentation whatsoever.
<krainboltgreene> I asked you twice, I'll mute you if you continue.
<apeiros> krainboltgreene: I don't really care.
colorisco has joined #ruby
<krainboltgreene> That's largely the problem.
krisquigley has quit [Ping timeout: 264 seconds]
lkba_ has joined #ruby
<apeiros> that I don't care about you muting me?
<krainboltgreene> That you don't really care.
<jhass> phale: stare of lots of data in it
<jhass> phale: humans are good in recognizing patterns
<phale> jhass: okay
<krainboltgreene> Haha
<apeiros> krainboltgreene: seems you don't understand how context works.
<krainboltgreene> That's not bad advice for a lot of things, jhass.
<jhass> krainboltgreene: apeiros both of you, leave it
<apeiros> anyway, I think I'll just ignore you, krainboltgreene
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<phale> jhass: just looks like random gibberish to me
<jhass> phale: well, can you make a gist of it and provide some context?
pontiki has joined #ruby
<phale> it's 1146912 bytes
<krainboltgreene> Snippet?
lkba has quit [Ping timeout: 265 seconds]
<krainboltgreene> Like, the first lines, or like 1000 bytes or whatever.
tkuchiki has joined #ruby
<apeiros> phale: additionally to the input data you have, tell us as much as you know about the expected output
ferr has quit [Ping timeout: 255 seconds]
<jhass> and where that data comes from and what it represents
FernandoBasso has quit [Quit: leaving]
wolf4ood__ has joined #ruby
iasoon has joined #ruby
<phale> its not letting me paste.
Takle has quit [Remote host closed the connection]
<phale> some escape sequences
<phale> nevermind
lidenskap has joined #ruby
<jhass> okay, that doesn't help much
lidenskap has quit [Remote host closed the connection]
<phale> plaintext is more readable, http://wklej.org/id/1685181/txt/
G has quit [Quit: Reconnecting]
G has joined #ruby
oddskill_away is now known as oddskill
<phale> it's an img.xbx file
<phale> .img.xbx
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phale> it comes from a game and it should be an image format
fabrice31 has joined #ruby
<jhass> you're on windows still?
<phale> what?
tosbourn has joined #ruby
<jhass> I wonder if you can let the file util run it
c_nick has joined #ruby
<c_nick> Hi I need to package my ruby Framework for distribution. The Package should 1. SVN checkout my framework to a particular path and install RunTimes. I was looking at NSIS which could invoke an MSI but i couldnt find anything for SVN Checkout there. Can you help me in the right direction
<phale> this ain't windows
<jhass> phale: alright, what does file report on it then?
<jhass> file foo.img.xbx
wolf4ood__ has quit [Ping timeout: 248 seconds]
<krainboltgreene> It looks like a special xbox image format.
<phale> data
sevenseacat has joined #ruby
<phale> loadscrn_editor.img.xbx: data
teddyp1cker has quit []
sdothum has joined #ruby
jheg has joined #ruby
aswen has joined #ruby
<phale> actually, despite what the file format says
oddskill is now known as oddskill_bed
<phale> it's an .img file
lolmaus has joined #ruby
tosbourn has quit [Ping timeout: 252 seconds]
fabrice31 has quit [Ping timeout: 256 seconds]
Takle has joined #ruby
kaspernj has quit [Quit: Leaving]
sevenseacat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sankaber has joined #ruby
<jhass> phale: some googling suggests img2tga somewhere in http://thmods.com/mod_tools/sources.zip might be able to convert it
<phale> yeah but I want to code my own to inspect the format
<jhass> seems to be written for windows though
<phale> hmm
RegulationD has joined #ruby
<phale> might work on wine
<jhass> it's in there in source
<jhass> you can read what it does
<phale> right
Porfirium has joined #ruby
<phale> ah there's a .cpp file
pika_pika has joined #ruby
<phale> too confusing for me should i just give up
Megtastique has joined #ruby
iamjarvo has joined #ruby
RegulationD has quit [Ping timeout: 255 seconds]
blotchy has left #ruby ["Leaving"]
d10n-work has quit [Quit: Connection closed for inactivity]
casshern2 has quit [Ping timeout: 244 seconds]
mitchellhenke has quit [Quit: Computer has gone to sleep.]
User458764 has joined #ruby
phutchins has joined #ruby
tkuchiki has quit [Ping timeout: 246 seconds]
nfk has joined #ruby
DEA7TH has joined #ruby
dfinninger has joined #ruby
ferr has joined #ruby
lobolars has joined #ruby
synt_ has joined #ruby
vudew has joined #ruby
jimms has quit [Read error: Connection reset by peer]
dfinninger has quit [Ping timeout: 244 seconds]
jimms has joined #ruby
sankaber has quit [Quit: Textual IRC Client: www.textualapp.com]
phale has quit [Ping timeout: 244 seconds]
yfeldblum has quit [Ping timeout: 245 seconds]
synt_ is now known as phale
phale has quit [Changing host]
phale has joined #ruby
sinkensabe has joined #ruby
ferr has quit [Ping timeout: 240 seconds]
Aswebb_ has joined #ruby
maximski has joined #ruby
iotouch has joined #ruby
jefus has quit [Quit: WeeChat 0.4.2]
maximski has quit [Max SendQ exceeded]
luisp has joined #ruby
jefus has joined #ruby
maximski has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
maximski has quit [Max SendQ exceeded]
phale has left #ruby ["Leaving"]
luisp has left #ruby [#ruby]
ferr has joined #ruby
maximski has joined #ruby
etqqkoiflwhb has quit [Quit: (null)]
lolmaus has joined #ruby
yh has joined #ruby
phutchins has quit [Read error: No route to host]
SalexW has quit [Remote host closed the connection]
freerobby has joined #ruby
sankaber has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
freerobby has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
xiq has joined #ruby
musashi1 has quit [Ping timeout: 272 seconds]
ferr has quit [Read error: Connection reset by peer]
davedev24_ has joined #ruby
ferr has joined #ruby
spider-mario has joined #ruby
tlarevo has quit [Remote host closed the connection]
tlarevo has joined #ruby
Aswebb_ has quit [Remote host closed the connection]
Aswebb_ has joined #ruby
ferr has quit [Ping timeout: 250 seconds]
sinkensabe has quit [Remote host closed the connection]
tvw has quit []
tvw has joined #ruby
kobain has joined #ruby
freerobby has quit [Quit: Leaving.]
Aswebb_ has quit [Ping timeout: 272 seconds]
sinkensabe has joined #ruby
chishiki has left #ruby ["WeeChat 1.1.1"]
turtil has quit [Ping timeout: 245 seconds]
soulcake has quit [Quit: Quack.]
Macaveli has joined #ruby
soulcake has joined #ruby
jenrzzz has quit [Ping timeout: 246 seconds]
apoplexy has quit [Ping timeout: 250 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
RegulationD has joined #ruby
juanpablo____ has joined #ruby
riotjones has joined #ruby
c_nick has left #ruby [#ruby]
LJT has joined #ruby
User458764 has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
nateberkopec has joined #ruby
juanpablo____ has quit [Ping timeout: 264 seconds]
kobain has quit [Read error: Connection timed out]
Macaveli has quit [Quit: Textual IRC Client: www.textualapp.com]
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
jayeshsolanki has joined #ruby
casshern2 has joined #ruby
CloCkWeRX has joined #ruby
jayeshsolanki has quit [Max SendQ exceeded]
ghr has joined #ruby
reinaldob has joined #ruby
doodlehaus has joined #ruby
doodlehaus has quit [Remote host closed the connection]
doodlehaus has joined #ruby
ixti has joined #ruby
ta has joined #ruby
riotjones has quit [Ping timeout: 245 seconds]
_ixti_ has quit [Ping timeout: 250 seconds]
zapata has quit [Remote host closed the connection]
zapata has joined #ruby
dfinninger has joined #ruby
jimms has quit [Ping timeout: 240 seconds]
jayeshsolanki has joined #ruby
lidenskap has joined #ruby
Aswebb_ has joined #ruby
sankaber has quit [Ping timeout: 272 seconds]
dfinninger has quit [Ping timeout: 244 seconds]
lidenskap has quit [Ping timeout: 244 seconds]
sinkensabe has quit [Write error: Connection reset by peer]
Aswebb_ has quit []
reinaldob has quit [Remote host closed the connection]
tgunr has joined #ruby
tgunr has quit [Read error: Connection reset by peer]
krisquigley has joined #ruby
reinaldob has joined #ruby
reinaldob has quit [Remote host closed the connection]
tgunr has joined #ruby
tgunr has quit [Client Quit]
LJT_ has joined #ruby
tgunr has joined #ruby
krisquigley has quit [Ping timeout: 256 seconds]
DEA7TH has quit [Changing host]
DEA7TH has joined #ruby
LJT has quit [Ping timeout: 250 seconds]
freerobby has joined #ruby
giuseppesolinas has joined #ruby
stef204 has quit [Ping timeout: 252 seconds]
cpt_yossarian has joined #ruby
sinkensabe has joined #ruby
ghr has quit [Ping timeout: 256 seconds]
weemsledeux has joined #ruby
DaniG2k has quit [Quit: leaving]
fabrice31 has joined #ruby
reinaldob has joined #ruby
sinkensabe has quit [Ping timeout: 252 seconds]
doodlehaus has quit [Remote host closed the connection]
robustus has quit [Ping timeout: 255 seconds]
Takle has quit [Remote host closed the connection]
phale has joined #ruby
stef204 has joined #ruby
robustus|Off has joined #ruby
robustus|Off is now known as robustus
nonnatus has joined #ruby
fabrice31 has quit [Ping timeout: 250 seconds]
reinaldob has quit [Remote host closed the connection]
chipotle has quit [Read error: Connection reset by peer]
lethosor|away has quit [Quit: Connection closed for inactivity]
WajidKagzi has joined #ruby
chipotle has joined #ruby
bim has quit [Remote host closed the connection]
stef204 has quit [Ping timeout: 240 seconds]
WajidKagzi has quit [Ping timeout: 244 seconds]
<jhass> DeBot: !hangman ruby
<DeBot> ␣␣␣␣␣␣␣␣␣␣␣␣␣␣ [] 0/12
<jhass> DeBot: :#_
<DeBot> ␣␣␣␣␣␣␣␣␣␣␣␣␣␣ [:#_] 3/12
<jhass> uh
<jhass> DeBot: ensta
<DeBot> ␣␣␣a␣␣␣␣␣E␣␣␣␣ [:#_nst] 6/12
<jhass> DeBot: h
<DeBot> ␣␣␣a␣␣␣␣␣E␣␣␣␣ [:#_nsth] 7/12
<jhass> DeBot: iuo
<DeBot> ␣o␣a␣␣u␣␣E␣␣o␣ [:#_nsthi] 8/12
<jhass> DeBot: r
<DeBot> ␣o␣a␣␣u␣␣Error [:#_nsthi] 8/12
Takle has joined #ruby
<phale> StandardError
tkuchiki has joined #ruby
<jhass> not really
<phale> DeBot: V
<DeBot> ␣o␣a␣␣u␣␣Error [:#_nsthiv] 9/12
<phale> what is Error
<phale> is that part of the hangman?
<jhass> yeah
<jhass> it's a ruby thing (class this time)
<jhass> DeBot: l
<DeBot> Lo␣al␣u␣␣Error [:#_nsthiv] 9/12
<phale> DeBot: LocalJumpError
<DeBot> LocalJumpError [:#_nsthiv] 9/12 You won!
<phale> yeah it works
<Mon_Ouie> >> return 3
<ruboto> Mon_Ouie # => unexpected return (LocalJumpError) ...check link for more (https://eval.in/311977)
Pharaoh2 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass> DeBot: !hangman ruby
<DeBot> ␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣ [] 0/12
<jhass> DeBot: :
<DeBot> ␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣ [:] 1/12
<DeBot> ␣␣␣␣␣␣␣␣#␣␣␣␣␣␣␣␣␣ [:] 1/12
<jhass> DeBot: #
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<phale> DeBot: String
<DeBot> StringI␣#r␣␣␣␣in␣s [:] 1/12
<Mon_Ouie> DeBot: O
<DeBot> StringIO#r␣␣␣␣in␣s [:] 1/12
<phale> DeBot: StringIO#readlines
<DeBot> StringIO#readlines [:] 1/12 You won!
<jhass> phale: stop cheating :P
<arup_r> DeBot: go to hale!
<phale> alright hehe
<phale> wait how am i cheating
<jhass> too late ;)
<jhass> DeBot: !hangman gems
<DeBot> ␣␣␣ [] 0/12
<arup_r> Why he didn't respond to me... :(
<jhass> figuring that out is part of the game ;P
kubunto has joined #ruby
<jhass> DeBot: eioua
<DeBot> ␣a␣ [eiou] 4/12
<phale> DeBot: ban
<DeBot> ␣a␣ [eioubn] 6/12
<phale> DeBot: g
<DeBot> ␣a␣ [eioubng] 7/12
<phale> i give up
<wasamasa> DeBot: r
<DeBot> ra␣ [eioubng] 7/12
<Mon_Ouie> DeBot: y
<DeBot> ra␣ [eioubngy] 8/12
<kubunto> DeBot: t
<DeBot> rat [eioubngy] 8/12 You won!
<kubunto> hehehe
<phale> I still haven't figured out this darn format
<phale> even if there's a cpp code of it
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 37.0.1/2015040300]]
<kubunto> ?
<jhass> "Ruby interface to Unix "at" command. (Not compatible with Windows' "at".)"
<phale> DeBot: !
<Mon_Ouie> The bot itself should print the gem's summary
<jhass> yeah
<jhass> send a pull request :P
<phale> DeBot: !help
<phale> just has hangman?
<jhass> in this channel, yeah
<phale> oh
amystephen has joined #ruby
workmad3 has joined #ruby
Spami has joined #ruby
lxsameer has quit [Quit: Leaving]
iotouch has quit [Ping timeout: 264 seconds]
VBlizzard has joined #ruby
yh has quit [Ping timeout: 256 seconds]
VBlizzard is now known as _blizzard_
_blizzy_ has quit [Disconnected by services]
_blizzard_ is now known as _blizzy_
User458764 has joined #ruby
iotouch has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
bkxd has joined #ruby
<phale> i'm making a ruby server
<phale> for my MMORPG
<phale> the client is going to be in C
<phale> will ruby be good for a server?
<undeadaedra> it can be used as a server, if it’s your question
<phale> phale> will ruby be good for a server?
xenokiller has joined #ruby
yh has joined #ruby
<undeadaedra> it depends on what you mean by ”be good”
aswen has quit [Ping timeout: 248 seconds]
havenwood has joined #ruby
<kq_away_> I have a list of phrases and a list of text files. For each phrase I want any (as in, one random) occurrence of that phrase + its location + some context (say, 50 characters before and after). Extra problem: the files are in vietnamese and the text in them needs to be downcased first (I have a mapping prepared)
hmsimha has quit [Ping timeout: 252 seconds]
tkuchiki has quit [Read error: Connection reset by peer]
stef204 has joined #ruby
dfinninger has joined #ruby
juanpablo____ has joined #ruby
<phale> undeadeadra: reliable, fast
<kq_away_> I guess my problem is what'd be the best way to do this
roolo has joined #ruby
iotouch has quit [Quit: This computer has gone to sleep]
<c-c> hi phale
<phale> c-c: hey
<c-c> have you looked at jruby
<jhass> kq_away_: what orders of magnitude are we talking?
<phale> not really
bluOxigen has joined #ruby
blueOxigen has quit [Ping timeout: 264 seconds]
<c-c> look at it
<phale> alright
<c-c> jruby could give you more options when deploying
Spami has quit [Quit: This computer has gone to sleep]
<c-c> warbler, also
<phale> i see
<phale> i just want to know if ruby's general perfomance will affect people connecting to the server
dfinninger has quit [Ping timeout: 250 seconds]
endash has joined #ruby
<kq_away_> jhass: <5MB of files, ~3k phrases
<undeadaedra> depends on how many connections, how many commands
juanpablo____ has quit [Ping timeout: 248 seconds]
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<undeadaedra> and the infrastructure below
<phale> don't have a VPS yet
<jhass> kq_away_: mh, without experience on my own, that seems close to but below the border of using a dedicated fulltext search engine, depends on the amount of growth (if any) you expect I guess
<undeadaedra> it will not match C performance, but may be efficient enough to handle things
<phale> okay
<c-c> ruby or jruby will be great for prototyping and a small scale MMORPG with less than 100k users, roughly
<phale> yeah
<phale> ~100k
<jhass> kq_away_: I think you can still get away with scan, /.{,50}#{phrase}.{,50}/i and $~ though
decoponio has joined #ruby
<kq_away_> jhass: I have no idea, I'm doing this for my cousin
<kq_away_> mhm
<phale> kq_away_: tell him to learn ruby
<phale> and to leave you alone
<kq_away_> I did, phale, and I'm tutoring him a little
<kq_away_> but he's a linguist, not a programmer by trade
<phale> the_ruby_programming_language.pdf
<kq_away_> is that a thing?
<phale> yeah
<c-c> phale are you doing this https://github.com/reedlaw/ruby-mmo
<kq_away_> as in recommended + legit
<phale> c-c: no
silentpost has joined #ruby
<phale> it's not on github yet
stef204 has quit [Ping timeout: 276 seconds]
stef204 has joined #ruby
bim has joined #ruby
mengu__ has joined #ruby
charliesome has joined #ruby
dstarh has joined #ruby
<phale> kq_away_: it's recommended and legit
<phale> best book if you want to learn ruby i guess
<c-c> Matsumoto & Flanagan
<phale> yeah
<phale> and that anime dude made ruby
mengu has quit [Ping timeout: 264 seconds]
<kq_away_> thanks
<phale> np
<kq_away_> is .select{}.front lazy?
Takle has quit [Remote host closed the connection]
<jhass> depends on context
<jhass> never saw .front before
<kq_away_> err .first then?
<jhass> depends on context, usually not
<kq_away_> I want to find the first file containing a phrase for each phrase
<jhass> there's .lazy. that makes enumerators lazy for example
<jhass> then use .find
<kq_away_> okay
<phale> I use ruby for small programs
<phale> I use C for bigger programs
latemus has joined #ruby
<phale> I use Bash for very small programs
iamjarvo has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pupeno has quit [Remote host closed the connection]
<kq_away_> jhass: /.{,50}#{phrase}.{,50}/i fails because my phrases may contain special regex characters
<kq_away_> can I escape them?
Pupeno has joined #ruby
simplyaubs has joined #ruby
ta has quit [Remote host closed the connection]
<phale> kq_away_: what?
oktexan has joined #ruby
<phale> it shouldn't fail
<kq_away_> phale: the phrase is 'a(b'
<kq_away_> it complains about unclosed parenthesis
<kq_away_> `block (2 levels) in <main>': end pattern with unmatched parenthesis: /.{,50}Bảng cân đối (kế toán.{,50}/i (RegexpError)
<jhass> kq_away_: Regexp.escape iirc
cpt_yossarian has quit [Ping timeout: 250 seconds]
<phale> %r!#{phrase}!
hannahkoala has joined #ruby
<kq_away_> what do thise bangs do?
<jhass> kq_away_: percent literals take any delimiter
bluOxigen has quit [Ping timeout: 246 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<jhass> >> % thisisastring
<ruboto> jhass # => /tmp/execpad-a1611c2ff6fe/source-a1611c2ff6fe:3: syntax error, unexpected tCONSTANT, expecting keywo ...check link for more (https://eval.in/311990)
<jhass> well, almost any :P
<phale> % takes exactly one character
mengu has joined #ruby
hannahkoala has quit [Client Quit]
Pupeno has quit [Ping timeout: 250 seconds]
<jhass> >> % this is a string 
<ruboto> jhass # => /tmp/execpad-e9e82dec9932/source-e9e82dec9932:2: invalid multibyte char (UTF-8) ...check link for more (https://eval.in/311992)
<jhass> wat
doodlehaus has joined #ruby
<jhass> there was a way to use some sort of whitespace, anyway
<phale> >> %d 3
<ruboto> phale # => /tmp/execpad-446b61d06b3f/source-446b61d06b3f:2: unknown type of %string ...check link for more (https://eval.in/311994)
mengu__ has quit [Ping timeout: 250 seconds]
Darryl___ has joined #ruby
<phale> yeah idk
<jhass> not different from say %r(..)
<jhass> and Regexp.escape is what you're after anyway
<jhass> no idea why phale came up with the percent literal
n80 has joined #ruby
<phale> ioctl
anaeem1 has joined #ruby
lavros_ is now known as lavros
jimms has joined #ruby
zotherstupidguy has quit [Quit: leaving]
<kq_away_> Regexp.escape was exactly what I wanted
RegulationD has joined #ruby
maximski has quit []
anaeem1 has quit [Remote host closed the connection]
<kq_away_> weird that I couldn't find it in the docs for regex
<phale> Regexp != regex
<kq_away_> Oh?
<phale> yeah
<jhass> there's no Regex
anaeem1_ has joined #ruby
doodlehaus has quit [Remote host closed the connection]
Feyn has quit [Quit: Leaving]
Jackneill has joined #ruby
roolo has quit [Remote host closed the connection]
RegulationD has quit [Ping timeout: 252 seconds]
ta has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ju_les_ has joined #ruby
anaeem1_ has quit [Ping timeout: 245 seconds]
maciejczyzewski has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<kubunto> what library would i use for date parsing?
lkba has joined #ruby
data-cat has joined #ruby
<jhass> Time/Date/DateTime.strptime
<jhass> so date in stdlib
<elaptics> kubunto: known date formats or human dates? e.g. "next Monday", "1st Jan"
CustosLimen has joined #ruby
<kubunto> elaptics: like this Sat Jan 06 18:28:43 2014 or Sat Jan 25 2014
jeromelanteri has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
riotjones has joined #ruby
<phale> kubunto
<phale> puts `date`
<elaptics> kubunto: if the formatting of the date/time is strict then use the stdlib stuff like .strptime
<phale> >> puts `date`
<ruboto> phale # => (https://eval.in/312008)
<phale> oh well
lkba_ has quit [Ping timeout: 255 seconds]
User458764 has joined #ruby
simplyaubs has quit [Quit: simplyaubs]
Pumukel has joined #ruby
yh has quit [Ping timeout: 252 seconds]
kirun has joined #ruby
<phale> then you can do
<phale> `date`.split(' ')[0]
<phale> => "Sat"
dseitz has joined #ruby
CloCkWeRX has left #ruby [#ruby]
<phale> if you're using an unix-like system such as linux or BSD
<phale> should work
claptor has joined #ruby
<jhass> ^ please never ever do that
<kubunto> why not jhass ?
<jhass> `date` I mean
<phale> it's not portable
<jhass> it's plain silly
zemlya is now known as Enki
<phale> because it's not portable
willharrison has joined #ruby
bkxd has quit [Ping timeout: 256 seconds]
<kubunto> what kind of stuff do i get from strptime
<jhass> no, because it's silly
hiall has joined #ruby
<jhass> kubunto: the kind of stuff you call it on
<phale> "silly"
<jhass> Date.strptime -> Date, Time.strptime -> Time
<phale> provide a more accurate description
yh has joined #ruby
<jhass> phale: we got perfectly fine date/time libraries in core/stdlib, shelling out for date/time handling is plain silly
<kubunto> so would i pass Date.strptime my string?
<kq_away_> >> ''.scan(/foo/)
<ruboto> kq_away_ # => [] (https://eval.in/312014)
<jhass> kubunto: depends on your goal
lidenskap has joined #ruby
<kubunto> i should have access to Date without requiring anything correct?
Pumukel has quit [Quit: ChatZilla 0.9.91.1 [Firefox 36.0.4/20150320202338]]
<willharrison> jhass does this look better than yesterday? https://github.com/willharrison/dotfiles/blob/master/install.rb
<jhass> brb, food
<willharrison> k
casadei has joined #ruby
lidenskap has quit [Ping timeout: 252 seconds]
simplyaubs has joined #ruby
OtterCoder has joined #ruby
claptor has quit [Quit: this channel is bakas]
tvw has quit [Ping timeout: 256 seconds]
riotjones has quit [Ping timeout: 256 seconds]
krisquigley has joined #ruby
jefus has quit [Quit: WeeChat 1.1.1]
<jhass> willharrison: looks good, just two minor nitpicks
<willharrison> cool, what are they
<jhass> in line 46 make use of autosplatting block arguments: do |command, description|
<jhass> and you don't need the parens when splitting something to the system call
<jhass> *splatting
dfinninger has joined #ruby
<willharrison> ah ok
<willharrison> thanks
<jhass> *command is just fine then, *(command) no need for these parens
cpt_yossarian has joined #ruby
<havenwood> willharrison: Drop the #to_s inside interpolation, line 21.
<kubunto> jhass: how do i deal with the string that has a time in it
jottr has joined #ruby
<jhass> kubunto: "deal" is not defined as a specific action a program could implement
<willharrison> havenwood ah that's what rubocop was bitching about, I was wondering. thanks
OrbitalKitten has joined #ruby
<kubunto> jhass: meaning how can i get a date out of a string that has time embedded in it
phale has quit [Quit: Leaving]
<jhass> usually you invoke strptime, sometimes you want to extract the part of the string that represents the time/date first
<jhass> (I stay as vague as you do)
ringarin has joined #ruby
krisquigley has quit [Ping timeout: 272 seconds]
dfinninger has quit [Read error: Connection reset by peer]
dfinninger has joined #ruby
jheg has quit [Quit: jheg]
<kq_away_> jhass: .scan separates words by space, can I avoid this?
ponga has quit [Quit: Leaving...]
<jhass> it doesn't for me
<kubunto> >> puts Date.strptime('Sat Jan 06 18:28:43 2014', '%a %b %H:%M:%S %d %Y')
<ruboto> kubunto # => uninitialized constant Date (NameError) ...check link for more (https://eval.in/312017)
ta has quit [Remote host closed the connection]
centrx has joined #ruby
<jhass> >> "foo bar baz".scan /[ \w]+/
<ruboto> jhass # => ["foo bar baz"] (https://eval.in/312018)
<kubunto> >>require 'date' puts Date.strptime('Sat Jan 06 18:28:43 2014', '%a %b %H:%M:%S %d %Y')
<ruboto> kubunto # => /tmp/execpad-9d0dc391dc1c/source-9d0dc391dc1c:2: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/312019)
pontiki has quit [Ping timeout: 272 seconds]
<jhass> kubunto: please use irb/pry for experimentation
<kubunto> jhass: i have
<kq_away_> "foo bar baz".scan /.{,2}bar.{,2}/
<kq_away_> >> "foo bar baz".scan /.{,2}bar.{,2}/
<ruboto> kq_away_ # => ["o bar b"] (https://eval.in/312020)
<kubunto> sorry for pasting here like that, wanted to see if it would work
<kq_away_> hm
<kq_away_> Maybe I need to look at the input
maximski has joined #ruby
<kubunto> jhass: i am still trying ot get the date out of a string like the one i pasted here
<kq_away_> yeah, sorry, I forgot the final join in my ugly regex downcase
<jhass> >> require 'date'; Date.strptime('Sat Jan 06 18:28:43 2014', '%a %b %d %H:%M:%S %Y')
<ruboto> jhass # => #<Date: 2014-01-06 ((2456664j,0s,0n),+0s,2299161j)> (https://eval.in/312021)
<jhass> kubunto: granted, I cheated a bit http://strftimer.com/ ;)
n80 has quit [Quit: n80]
<kq_away_> jhass: would you mind looking this over? https://gist.github.com/KrzaQ/7b035cf53c1bf8a0c5af Sorry for the Polish variables, I'm working on my cousin's code
ringaring has joined #ruby
tlarevo has quit [Remote host closed the connection]
<jhass> kq_away_: if you want to know whether there's a match use .match instead of scan
tlarevo has joined #ruby
<jhass> returns nil if there's no match, a MatchData otherwise
vivekananda has quit [Ping timeout: 244 seconds]
jheg has joined #ruby
sankaber has joined #ruby
<jhass> also for retrieving just the first match, match is better than scan, might have misunderstood you there, sorry ;)
<kq_away_> mhm
ringaroses2 has joined #ruby
fabrice31 has joined #ruby
tosbourn has joined #ruby
ringarin has quit [Ping timeout: 245 seconds]
<kq_away_> not sure how should I use match with find to return matchdata
DerisiveLogic has joined #ruby
<jhass> you could avoid doing the matching twice with an lazy enumerator: TextData.lazy.map {|text| text.match(...) }.reject(&:nil?).first
tlarevo has quit [Read error: Connection reset by peer]
ringaroses2 has quit [Read error: Connection reset by peer]
<kq_away_> that's why I asked about the lazy select before :P
ringaroses2 has joined #ruby
<jhass> hey, I mentioned .lazy back then :P
jeramy_s has joined #ruby
ringaring has quit [Ping timeout: 252 seconds]
<kq_away_> hm
<kq_away_> but I need to pass the other data as well
<kq_away_> filename, mostly
<jhass> can return an array in the map and destructure in the assignment
<kq_away_> okay, I guess I can write a lambda in the reject
<kq_away_> mhm
Takle has joined #ruby
tosbourn has quit [Ping timeout: 252 seconds]
<jhass> a, b, c = x.lazy.map {|data| [data.a, data.b, compute(data.c)] }.select {|item| item.last }.first
fabrice31 has quit [Ping timeout: 255 seconds]
jimms has quit [Ping timeout: 250 seconds]
<kq_away_> what will .first do if there is none?
<kq_away_> is there first_or_nil ?
<jhass> yeah
<jhass> >> [].first
<ruboto> jhass # => nil (https://eval.in/312029)
<kq_away_> okay
<jhass> >> a, b, c = [].first; [a, b, c]
<ruboto> jhass # => [nil, nil, nil] (https://eval.in/312030)
Soda has joined #ruby
rgb-one has joined #ruby
dorei has joined #ruby
oo_ has quit [Remote host closed the connection]
maximski has quit []
oo_ has joined #ruby
Takle has quit [Ping timeout: 256 seconds]
maciejczyzewski has joined #ruby
poguez_ has joined #ruby
lkba has quit [Read error: Connection reset by peer]
gr33n7007h has quit [Ping timeout: 244 seconds]
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
Zamerick has joined #ruby
<kq_away_> I hate line 42
ruby-lang532 has joined #ruby
<jhass> heh, could use some newlines :P
<ruby-lang532> It seems that I am now at #ruby
<kq_away_> it's basically for each character check if it's in upcase->downcase mapping, if it is, map it, otherwise leave it
<jhass> ruby-lang532: yes you are
<kq_away_> Can I use that Regexp.union trick with this?
<ruby-lang532> thanks for your help jhass
<jhass> you an be in basically any number of channels at once ;)
<ruby-lang532> I imagine to go out, something like /close?
<jhass> kq_away_: mh, in theory yes
bim has quit [Remote host closed the connection]
<kq_away_> buut?
bim has joined #ruby
_1_rahim has joined #ruby
<_1_rahim> ..
<jhass> ruby-lang532: /part to leave the channel /quit to close the client
<ruby-lang532> string.tr([a-z],[A-Z)
<jhass> ?whatschat _1_rahim
<ruboto> _1_rahim, WhatsChat is a crappy app that abuses IRC for something it is not: a dating chat. Please remove this app.
_1_rahim has quit [Remote host closed the connection]
bim has quit [Remote host closed the connection]
<jhass> kq_away_: not sure it'll help you :P
<ruby-lang532> thanks, my irc vocabulary now include /join /part /quit (3 words=
<kq_away_> it works now, but it's ugly
bim has joined #ruby
<jhass> kq_away_: you just want to know whether the file contains any of the phrases?
<ruby-lang532> File.lines.grep /frase/ ?
<jhass> ruby-lang532: next up /nick to change your nick to something recognizable ;)
<kq_away_> jhass: no, I want to find an occurence (doesn't matter which one) of a phrase within any of those files
data-cat has quit [Read error: Connection reset by peer]
data-cat has joined #ruby
<ruby-lang532> ok I will use /nick to change to irc-learner
<kq_away_> for each phrase
rgb-one has left #ruby [#ruby]
ruby-lang532 is now known as irc-learner
<kq_away_> they may be in the same file
<kq_away_> that's why I'm checking all the files for each phrase
<jhass> kq_away_: mh, thinking a bit about it you could indeed swap the loops and use Regexp.union
<jhass> that is iterate over the files once Regexp.union the phrases
<kq_away_> but once a phrase is found, I don't search for it anymore
<jhass> oh, mh
juanpablo____ has joined #ruby
<jhass> then I don't think we'll get much better, algorithm wise
phale has joined #ruby
<phale> how would I shorten this:
<kq_away_> jhass: what about line 42 again?
<jhass> kq_away_: I think you can improve line 42 with the Regexp.union & gsub with a hash trick though
<phale> header[0] != 0x02 && header[1] != 0x00 && header[1] != 0x00 && header[3] != 0x00
<kq_away_> I'm trying to do .gsub on a hash there
<jhass> kq_away_: or skip the downcasing and see if /i isn't enough
<kq_away_> yeah
<kq_away_> hm
<phale> the third header should be header[2]
<kq_away_> afaik vietnamese is collation-dependant
<kq_away_> but let's see
<jhass> yeah, I'm not sure, but worth a try
<phale> jhass: ?
<kq_away_> jhass: what's the Regexp.union trick? ''.gsub(Regexp.union(H.keys, H)) ?
jayeshsolanki has quit [Quit: bye!]
<jhass> phale: header[0..3] != [0x02, 0x00, 0x00, 0x00]
<phale> thanks
<jhass> I think :P
<jhass> kq_away_: yeah
<kubunto> does and work like &&?
<havenwood> kubunto: different precedence
<jhass> kubunto: they have different precedence rules
sankaber has quit [Quit: Textual IRC Client: www.textualapp.com]
juanpablo____ has quit [Ping timeout: 250 seconds]
<kubunto> then ill just stck with &&
<jhass> yup, sane choice
Porfirium has quit [Quit: Porfirium]
simplyaubs has quit [Quit: simplyaubs]
jayeshsolanki has joined #ruby
jayeshsolanki has quit [Max SendQ exceeded]
jeramy_s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jayeshsolanki has joined #ruby
<kq_away_> I guess that's final
<kq_away_> if it works
jayeshsolanki has quit [Max SendQ exceeded]
jayeshsolanki has joined #ruby
<jhass> kq_away_: why the encode?
gorpon has joined #ruby
<kq_away_> because it complained about CP1252 otherwise
jayeshsolanki has quit [Max SendQ exceeded]
<jhass> personally I prefer ! over not and unless over if not
jayeshsolanki has joined #ruby
<jhass> and select { x } over .reject { !x } ;)
<kq_away_> oh unless variable \n blah \n end is legit?
<kq_away_> right
sankaber has joined #ruby
<jhass> yup
jayeshsolanki has quit [Max SendQ exceeded]
sankaber has quit [Client Quit]
<jhass> can't even chain an else to it (though most people prefer to swap branches instead), just not elsif
<jhass> er, s/can't/can/
jayeshsolanki has joined #ruby
sankaber has joined #ruby
<kq_away_> mhm
<kq_away_> you guys in #ruby are really helpful
tgunr has quit [Quit: Textual IRC Client: www.textualapp.com]
jayeshsolanki has quit [Max SendQ exceeded]
<jhass> *people ;)
jayeshsolanki has joined #ruby
bim has quit [Remote host closed the connection]
bim has joined #ruby
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jayeshsolanki has quit [Read error: Connection reset by peer]
bim has quit [Remote host closed the connection]
mgorbach has quit [Read error: Connection reset by peer]
mgorbach has joined #ruby
oo_ has quit [Remote host closed the connection]
Igorshp has joined #ruby
baroquebobcat has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
jefus has joined #ruby
pika_pika has quit [Ping timeout: 245 seconds]
<kq_away_> afaik girls call other girls 'guys' too :P
<centrx> dude man
simplyaubs has joined #ruby
<Coraline> It's contextual
jefus has quit [Client Quit]
jefus has joined #ruby
Takle has joined #ruby
<centrx> That penguin is such a good guy.
ujihisa has joined #ruby
weemsledeux has joined #ruby
lostcuaz has quit [Read error: Connection reset by peer]
dfinninger has quit [Remote host closed the connection]
lostcuaz has joined #ruby
<phale> when I said big programs earlier, I meant things like this: http://wklej.org/id/1685357/
kubunto has quit [Quit: brb]
ringaroses2 has quit [Ping timeout: 256 seconds]
cpt_yossarian has quit [Ping timeout: 245 seconds]
lethosor|away has joined #ruby
mbff has joined #ruby
<mbff> Hello! I just discovered Ruby does not support method overloading. What then is the standard alternative then? Different method names like method1 and method1WithExtraThing?
<mbff> or arg detection inside of a single method?
<phale> mbff: define methods with the same name
<mbff> I thought ruby only used the last one that was defined....
<phale> it does i think
<phale> ask jhass
<mbff> right so if i have two methods..... method(thisVarShouldBeAStr) and method(thisVarShouldBeAnArray) .... ruby will only use the second one i define
<phale> yes
<mbff> jhass, any ideas? I am looking for the agreed on community standard
<phale> I don't know why you want to overload a method with a different name
mostlybadfly has joined #ruby
<mbff> the names are the same, didn't you see my example above
<mbff> both called "method"
<phale> yes
<phale> then it should work
<mbff> it doesn
<jhass> mbff: both is done equally, depending on usecase/context
gorpon has quit [Ping timeout: 244 seconds]
<phale> >> def foo(bar) puts bar; def foo(bar, foobar) puts bar + foobar; foo("hello", " there")
<ruboto> phale # => /tmp/execpad-9641011f29a5/source-9641011f29a5:7: syntax error, unexpected end-of-input, expecting ke ...check link for more (https://eval.in/312042)
<phale> something like that
<phale> not sure how to define methods on the interpreter here atm
<Coraline> I believe it works if the method args are different
<jhass> mbff: as a rule of thumb, if the overload would just transform the parameter and call another overload, you would usually perform input detection, if the behavior is significantly different, that's a good indicator (and that's not only true for Ruby) those are two different methods anyway
<jhass> Coraline: no, it doesn't ;)
<Coraline> Hmm
<Coraline> Was that ever the case, or am I mixing it up with another language/
<jhass> I think you're mixing
<phale> >> def foo(s) puts s; end; def foo(s) puts "test"; end; foo("a")
<ruboto> phale # => test ...check link for more (https://eval.in/312043)
<phale> ^^
<eam> well, you can implement method overloading on your own
CodyReichert has quit [Remote host closed the connection]
endash has quit [Ping timeout: 255 seconds]
<eam> a better way to phrase that is instead of the language dictating rules for method dispatch, you have access to it dynamically
<eam> and on any criteria you like
<mbff> eam, that's what i did. arg.is_type?(Array) ...but is that really the standard way to do it?
<mbff> seems hacky to me
willharrison has joined #ruby
kubunto has joined #ruby
<elaptics> mbff: why do you want/need methods with the same name that take different args?
<elaptics> mbff: I mean is it that you're passing an array of strings and you might just have a single string sometimes?
<mbff> yes exactly...
<elaptics> mbff: then just coerce the arg first thing to an array with Array(arg)
<elaptics> then it'll always be an array
<elaptics> an array will still be an array after that
endash has joined #ruby
cpt_yossarian has joined #ruby
<elaptics> >> Array("string")
<ruboto> elaptics # => ["string"] (https://eval.in/312044)
<jhass> could also splat
maximski has joined #ruby
<elaptics> >> Array(["string", "stringy"])
<ruboto> elaptics # => ["string", "stringy"] (https://eval.in/312045)
<mbff> in my case that doesn't make a ton of sense because that would give them an array of objects that has a length of 1 when they enter a string.
<mbff> But that idea could work in other places....
<elaptics> jhass: yeah, I just prefer the more explicit nature of Array :)
simplyaubs has quit [Quit: simplyaubs]
<jhass> >> def foo(*things); things.each(&:display); end; foo("a"); foo(*%w(c d e))
<ruboto> jhass # => acde["c", "d", "e"] (https://eval.in/312046)
<elaptics> mbff: what's your specific case then
banister has joined #ruby
<mbff> elaptics, mainly convince for the user of my gem
<elaptics> and your gem is...?
<jhass> mbff: I prefer a clearly defined API
<jhass> I don't mind the extra * or [ ] on it
<mbff> extra * ?
<elaptics> the splat
<jhass> see my last example
<mbff> I am making a wrapper for https://getstrike.net/api/
<mbff> oh... ok
<jhass> >> def foo(*things); things.each(&:display); end; foo("a", "b", "c")
<ruboto> jhass # => abc["a", "b", "c"] (https://eval.in/312047)
MasterPiece has joined #ruby
<mbff> i think I have my answer... thank you for your help everyone
kubunto is now known as kubunto|afk
RegulationD has joined #ruby
mjuszczak has joined #ruby
bim has joined #ruby
simplyaubs has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
Spami has joined #ruby
freerobby has quit [Quit: Leaving.]
phale has left #ruby ["Leaving"]
baroquebobcat has quit [Quit: baroquebobcat]
arrnas has joined #ruby
jheg has quit [Quit: jheg]
lolmaus_ has joined #ruby
zz_AlphaTech is now known as AlphaTech
Joufflu has joined #ruby
maximski has quit []
lolmaus has quit [Ping timeout: 264 seconds]
baroquebobcat has joined #ruby
claw_ has quit [Ping timeout: 255 seconds]
claw_ has joined #ruby
SHyx0rmZ has quit [Remote host closed the connection]
SHyx0rmZ has joined #ruby
SHyx0rmZ has quit [Remote host closed the connection]
claw has joined #ruby
casadei has quit [Remote host closed the connection]
claw_ has quit [Client Quit]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lidenskap has joined #ruby
claw has quit [Client Quit]
casadei has joined #ruby
SHyx0rmZ has joined #ruby
sankaber has joined #ruby
<willharrison> if I want to write a function in C and use in in a small ruby program, how do I go about that?
jheg has joined #ruby
bim has quit [Remote host closed the connection]
bim has joined #ruby
bim has quit [Remote host closed the connection]
claw has joined #ruby
riotjones has joined #ruby
<Mon_Ouie> Read Ruby's README.EXT for information about writing C extensions for Ruby
<Mon_Ouie> You could also use FFI if you prefer
lidenskap has quit [Ping timeout: 256 seconds]
jheg has quit [Client Quit]
<willharrison> I will do that, what is FFI though?
Takle has quit [Remote host closed the connection]
ascarter has joined #ruby
pullphinger has quit [Remote host closed the connection]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ju_les_ has left #ruby [#ruby]
pullphinger has joined #ruby
dc has joined #ruby
<Mon_Ouie> Stands for Foreign Function Interface. There's a Ruby library of the same name that allows you to open shared libraries, and you just give it the prototypes of the functions you need (by calling a method in Ruby) and it will create a thin wrapper for you.
<willharrison> ok cool, thanks
_1_chat has joined #ruby
<_1_chat> hii
<havenwood> ?whatschat _1_chat
<ruboto> _1_chat, WhatsChat is a crappy app that abuses IRC for something it is not: a dating chat. Please remove this app.
casadei has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
_1_chat has left #ruby [#ruby]
krisquigley has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
OtterCoder has quit [Ping timeout: 256 seconds]
dc has quit [Remote host closed the connection]
<irc-learner> Do you think that someday ruby with be the same speed as javascript?
<willharrison> javascript is slow
<willharrison> ruby is faster
<centrx> wha
<irc-learner> incredible!
pontiki has joined #ruby
dc has joined #ruby
<irc-learner> you're really a fan of ruby!
<centrx> yeah that doesn't sound right, in the context of V8 and post-V8 JS
<willharrison> ?
<c-c> my ruby is 0 speed - it has absolutely no velocity or acceleration
<irc-learner> ams.js
<willharrison> maybe I just don't know much about javascript
dc has quit [Remote host closed the connection]
<c-c> irc-learner: at what speed does your javascript move?
gauke has joined #ruby
<c-c> irc-learner: did you put it in a car or an airplane?
bim has joined #ruby
<c-c> irc-learner: or did you just make up this notion of "speed"?
<irc-learner> c-c don't know the speed, but I learned that speed can be increased when good programmers are at it
<centrx> irc-learner, Ruby is quite fast, and there is e.g. JRuby, but Javascript gets a huge amount of optimizing attention as the language of the web
pika_pika has joined #ruby
<c-c> irc-learner: there is no such thing as "speed" in programming language
oo_ has joined #ruby
<irc-learner> javascript will be more and more powerful since the web is getting more important
aryaching has joined #ruby
bim has quit [Remote host closed the connection]
<c-c> javascript outputs 0 W of power
bim has joined #ruby
<irc-learner> coffee script is like a son
krisquigley has quit [Ping timeout: 264 seconds]
<c-c> well trolled
bim has quit [Remote host closed the connection]
<havenwood> irc-learner: While we wait for browsers to support nice languages there's Opal: http://opalrb.org/
jottr has quit [Ping timeout: 245 seconds]
<irc-learner> I read news.ycombinator.com and opalrb has received a lot of praise
devans has joined #ruby
pontiki has quit [Ping timeout: 250 seconds]
Filete has joined #ruby
<irc-learner> some people think that javascript will evolve to become the next java (bloated), I don't know if it will evolve into something like ruby or lisp
oo_ has quit [Remote host closed the connection]
riotjones has quit [Ping timeout: 250 seconds]
Igorshp has quit [Remote host closed the connection]
Igorshp has joined #ruby
jottr has joined #ruby
Igorshp has quit [Remote host closed the connection]
<irc-learner> Do you think that the number of ruby jobs is increasing or is going down?
<havenwood> irc-learner: Or maybe it'll evolve into a slightly less sucky JavaScript.
<havenwood> JavaScript will never be Ruby or a LISP.
<irc-learner> but you know that there are the good parts
pullphinger has quit []
<irc-learner> but javascript is sweet
axl_ has joined #ruby
oo_ has joined #ruby
<irc-learner> Do people that know ruby program in several languages or they only use ruby?
<c-c> yes
<jhass> ^
baroquebobcat has joined #ruby
<irc-learner> Recently I solve a rota (praetorian challenge in Lisp and use ruby for the http part)
kerrizor has joined #ruby
oo_ has quit [Client Quit]
<KrzaQ> I use ruby at work, but only about 1-3% of the time, for scripting
<jhass> I hope that every programmer realizes that programming languages aren't like religion, at some point at least
<havenwood> They exist!
<irc-learner> sometime I use python, for example I find findall very useful,
<wasamasa> rota?
<jhass> re.findall? that's .scan
workmad3 has joined #ruby
<irc-learner> ºwasamasaª www.praetorian.com/challenges/rota/
<wasamasa> that quoting
fabrice31 has joined #ruby
bim has joined #ruby
<havenwood> omega alpha quote
<irc-learner> I use ubuntu with an imac keyboard and some keys are weird
<wasamasa> uh, yeah
<irc-learner> I don't want to pay 20 dollars to upgrade from 10.5.8
<havenwood> irc-learner: no quote key? that's gotta be tough.
tosbourn has joined #ruby
<KrzaQ> Is there a difference betwenn do |args...| end and { |args...| } blocks?
<havenwood> KrzaQ: precedence
<jhass> KrzaQ: ^ do binds to the leftmost call, { to the rightmost
<KrzaQ> I see
<jhass> but that fact is rarely used
<havenwood> KrzaQ: Isn't Yosemite free?
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
simplyaubs has quit [Quit: simplyaubs]
<KrzaQ> havenwood: no idea
<havenwood> KrzaQ: It is.
<jhass> KrzaQ: a common rule is do for multiline, { for single line
<KrzaQ> I don't even know what Yosemite is
<jhass> KrzaQ: personally I largely follow weirichs rule
<irc-learner> how can I get a ruby job, I don't know rails
devans has quit []
<havenwood> irc-learner: Learn Ruby and apply for a job.
<KrzaQ> jhass: so I should use do/end here: https://gist.github.com/KrzaQ/7b035cf53c1bf8a0c5af ?
<irc-learner> I know ruby
<KrzaQ> thanks jhass
<havenwood> irc-learner: Then go straight to the get a job part.
<irc-learner> 1.upto(10) {|i| puts "hello #{i}"}
<jhass> KrzaQ: in my style, I'd use do/end for the each, but keep { for the .maps and such
<jhass> it's style, ruby only cares about the precedence
<irc-learner> yes each
<KrzaQ> can you tack .somethign at the end of end?
<jhass> yup
<KrzaQ> okay, reading your link
<jhass> but it's ugly, hence the weirich rule ,)
<KrzaQ> Use { } for blocks that return values
<KrzaQ> Use do / end for blocks that are executed for side effects
fabrice31 has quit [Ping timeout: 245 seconds]
<KrzaQ> I can live with that
Channel6 has joined #ruby
<irc-learner> do end for side effects is a good rule
<irc-learner> but you know TIMTIWTDI
tosbourn has quit [Ping timeout: 250 seconds]
LJT has joined #ruby
bim has quit [Remote host closed the connection]
bim has joined #ruby
<irc-learner> 10.5.8 imac doesn't has application store, so you have to pay apple to get an upgrade to 10.6 and then all is free, but 20 dollars for a system with a known vulnerability is no use
gauke has quit [Quit: gauke]
bim has quit [Remote host closed the connection]
Porfirium has joined #ruby
User458764 has joined #ruby
<mbff> I am using minitest and I want to pass if a line of code causes a raise
jheg has joined #ruby
<jhass> assert_raise iirc?
macoecho has joined #ruby
<mbff> how can I do that? In all the examples I have seen, they reference "proc"... I don't know what proc is
mac_ has joined #ruby
LJT has quit [Client Quit]
LJT_ has quit [Ping timeout: 264 seconds]
<mbff> so where do a put my line of code exactly then?
mac_ has quit [Client Quit]
macoecho has quit [Client Quit]
<jhass> into the block you pass to it
<mbff> sorry new to ruby
<mbff> exp?
Pupeno has joined #ruby
macoecho has joined #ruby
<jhass> did you ever call .each or .map or something?
<jhass> the thing you pass to it, do / end or {|x| ... }
<jhass> that's a block
<irc-learner> (1..10).to_a.each do |i| puts "Your favorite number is #{i}" }
<mbff> oh right
<macoecho> hi, anyone know where I can find a good tutorial to learn how to make an api wrapper?
<mbff> proc { result = Strike::Torrent.find("156B69B8643BD1184D041")[0] }.must_raise(RuntimeError)
<jhass> irc-learner: no need for the to_a
jeff_laplante has joined #ruby
<jhass> mbff: looks legit
<irc-learner> iterator and list that is the question
<jhass> except for the assignment maybe
<mbff> what is proc
<irc-learner> proc is a procedure
<irc-learner> a function
Hijiri has joined #ruby
<jhass> proc is basically a block as an object
<mbff> NoMethodError: undefined method `assert_raises' for nil:NilClass
<irc-learner> you call it with call ?
<jhass> so you can pass it around, invoke it with a method call etc
<KrzaQ> >> (5..10).reduce(1, :*)
<ruboto> KrzaQ # => 151200 (https://eval.in/312068)
<KrzaQ> >> (5..10).reduce(:*)
ponga has joined #ruby
<ruboto> KrzaQ # => 151200 (https://eval.in/312069)
<irc-learner> a = Proc.new {|i| puts i*i}
<jhass> mbff: did you do that outside a testcase?
<KrzaQ> Ah, cool
<irc-learner> a.call(10)
<KrzaQ> Is there a channel where you can experiment with ruboto?
<jhass> irc-learner: yeah
<mbff> ahhhh.... let me pastebin
<KrzaQ> like #geordi for C++
Channel6 has quit [Quit: Leaving]
<jhass> KrzaQ: no, use irb or pry
<KrzaQ> ok
<KrzaQ> What's pry?
djbkd_ has joined #ruby
<jhass> a better irb
<irc-learner> Bye, things to all, jhass nice,
irc-learner has left #ruby [#ruby]
<ruboto> mbff, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/1d415f855721ec55525d
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<KrzaQ> cool
<mbff> that def inside a test class
<ponga> jhass: thank you, im getting pry now
deject3d has joined #ruby
<KrzaQ> same here
<jhass> mbff: maybe VCR.use_cassette changes the context somehow? would be idiotic but who knows..
<jhass> try swapping it around
<mbff> swapping what
<jhass> proc { VCR.use_cassette(...) { ... } }.must_raise RuntimeError
baroquebobcat has quit [Quit: baroquebobcat]
Spami has quit [Read error: Connection reset by peer]
mjuszczak has quit []
<mbff> when i ran it with VCR at all and it still failed
<mbff> StrikeTorrentTest#test_find_404:
<mbff> NoMethodError: undefined method `assert_raises' for nil:NilClass
apoplexy has joined #ruby
<mbff> without VCR*
jeff_laplante has quit [Ping timeout: 256 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
juanpablo____ has joined #ruby
lewix has joined #ruby
<jhass> guess that syntax only works for the rspec-style syntax then
<jhass> use assert_raises
<mbff> NoMethodError: undefined method `assert_raise' for #<Proc:0x00000003c44bd8@test/torrent/torrent_test.rb:28>
<jhass> assert_raises
<jhass> and not on the proc
<jhass> assert_raises RuntimeError do raise end
<mbff> { result = Strike::Torrent.find("156B69B8643BD1184D041")[0] }.assert_raises(NoMethodError) ?
<jhass> no
<jhass> assert_raises RuntimeError do raise end
JoshGlzBrk has joined #ruby
<jhass> where raise is your code
<mbff> in the torrent class
baroquebobcat has joined #ruby
apoplexy has quit [Ping timeout: 245 seconds]
<mbff> ayyy! It worked
<mbff> what if I want to target a particular message ?
ponga has quit [Quit: Leaving...]
<mbff> i found an example for must_raise but not assert_raises
cpt_yossarian has quit [Ping timeout: 255 seconds]
ebbflowgo has joined #ruby
juanpablo____ has quit [Ping timeout: 252 seconds]
mengu has quit [Read error: Connection reset by peer]
Soda has quit [Remote host closed the connection]
mengu has joined #ruby
Porfa has quit [Quit: porfa]
<jhass> dunno, I don't use minitest
<jhass> what did the example for must_raise look like?
ponga has joined #ruby
<mbff> div_by_zero = lambda { my_method(6,0) }
<mbff> div_by_zero.must_raise RuntimeError
<mbff> error = div_by_zero.call rescue $!
<mbff> error.message.must_equal 'bla'
<jhass> well, that method has nothing to do with must_raises then
Takle has joined #ruby
<jhass> it's just calling it twice
<jhass> I'd do a proper begin / rescue => e /end and do an assertion on e.message
lolmaus_ has quit [Quit: Konversation terminated!]
freerobby has joined #ruby
<mbff> ok thanks
DexterLB has joined #ruby
maximski has joined #ruby
DexterLB has quit [Client Quit]
DexterLB has joined #ruby
cpt_yossarian has joined #ruby
reinaldob has joined #ruby
lemur has joined #ruby
bttf has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ponga has quit [Remote host closed the connection]
reinaldob has quit [Remote host closed the connection]
<bttf> hello, new to rails and trying to set up my first app on a fresh linux vm ... Just a little frustrated but trying to work through this. I'm using rbenv and I am running into libraries that I need to rebuild my ruby installation for; first it was openssl, and now I need to rebuild again for readline lib. My question is how can I include all possible libraries
<bttf> that I'll need so that I won't need to rebuild ruby again?
reinaldob has joined #ruby
VBlizzard has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
_blizzy_ has quit [Disconnected by services]
VBlizzard is now known as _blizzy_
lidenskap has joined #ruby
charliesome has quit [Quit: zzz]
samarjeet has joined #ruby
charliesome has joined #ruby
lidenskap has quit [Remote host closed the connection]
maximski has quit []
charliesome has quit [Client Quit]
d10n-work has joined #ruby
reinaldob has quit [Ping timeout: 240 seconds]
<havenwood> bttf: ruby-install/chruby or RVM will install package manager deps for you, or you could manually install them
beat has joined #ruby
LJT has joined #ruby
<havenwood> bttf: rbenv's ruby-build actually ships its own openssl instead of using the package manager's, which is its own bag of hurt
reinaldob has joined #ruby
reinaldob has quit [Remote host closed the connection]
casadei has joined #ruby
<bttf> i don't mind manually installing them, but is there a single source of truth on which libraries are needed?
samarjeet has quit [Quit: samarjeet]
<bttf> cool, ty havenwood
baroquebobcat has joined #ruby
bkulbida has joined #ruby
bim has joined #ruby
stef204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
bim has quit [Read error: Connection reset by peer]
gsd has joined #ruby
bim has joined #ruby
<jhass> havenwood: might actually fact (factorize, factify?) that link, ruby_dependencies or so
ebbflowgo has quit [Ping timeout: 276 seconds]
casadei has quit [Ping timeout: 250 seconds]
pika_pika has quit [Ping timeout: 245 seconds]
mleung has joined #ruby
lidenskap has joined #ruby
Igorshp has joined #ruby
pagios has quit [Quit: I'm using a Free IRC Bouncer from BNC4FREE - http://bnc4free.com/]
robertt_dex has joined #ruby
grilllo has joined #ruby
Xiti has quit [Quit: Xiti]
Xiti has joined #ruby
Igorshp has quit [Ping timeout: 252 seconds]
<grilllo>
axl_ has quit [Quit: axl_]
<grilllo> 10+10
n80 has joined #ruby
n80_ has joined #ruby
<shevy> hmm
<shevy> I suppose in ruby we can not do lazy loading right?
khebbie has joined #ruby
<centrx> lazy loading of what
<shevy> like, I start an app via loop {}, and user input can happen that very moment, while in the background I keep on load/require-ing
<centrx> like autoload (MRI or ActiveSupport)?
kubunto|afk is now known as kubunto
<shevy> oh
<shevy> perhaps autoload does that, I'll have a look
<jhass> well, autoload defers to first access and blocks that access until it completed
<jhass> it's not prefetching in the background like you described
<centrx> yeah prefetching is the word, not lazy loading
chinmay_dd has joined #ruby
<jhass> mh, I wonder if anybody ever looked into putting requires into a thread
vivekananda has joined #ruby
parduse has quit []
<jhass> shevy: but I wonder what do you need it for? is it worth the effort?
<shevy> right now I have to wait a few seconds before I can type input
kirun has quit [Ping timeout: 265 seconds]
<centrx> is this on Windows
<shevy> nah
<jhass> is this Rails
<shevy> nah
LJT_ has joined #ruby
<jhass> then what the heck
<shevy> only windows and rails can be slow?
<centrx> space, are you in space?
<shevy> not yet. I don't dare to use ruby for space-critical missions though
<jhass> it's just unlikely that you accumulated a codebase as big
ascarter has joined #ruby
mleung has quit [Quit: mleung]
RegulationD has joined #ruby
<shevy> ok I will note down that jhass said that it should not be slow
<jhass> and even a fresh rails app boots in < 2-3 secs here (and I don't have an SSD)
<shevy> why are you writing about rails
ascarter has quit [Max SendQ exceeded]
<jhass> because it's a big codebase
<shevy> rails is lightweight
<jhass> many files to load
Hijiri has quit [Ping timeout: 265 seconds]
<shevy> define many
DexterLB has quit [Quit: So long and thanks for all the fish]
djbkd_ has quit [Remote host closed the connection]
<jhass> ~1k I'd assume
ascarter has joined #ruby
n80 has quit [Quit: n80]
n80_ is now known as n80
<shevy> that's nothing
<jhass> yup, about 1021 files on rails master
Hijiri has joined #ruby
ascarter has quit [Max SendQ exceeded]
LJT has quit [Ping timeout: 276 seconds]
ascarter has joined #ruby
DexterLB has joined #ruby
stef204 has joined #ruby
ascarter has quit [Max SendQ exceeded]
<centrx> shevy, space-critical apps should be small and verifiable
RegulationD has quit [Ping timeout: 240 seconds]
ascarter has joined #ruby
anaeem1_ has joined #ruby
<shevy> I wonder what programming languages are used for spaceshipes
<shevy> erm, *ships
anaeem1_ has quit [Remote host closed the connection]
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kubunto> shevy: C
anaeem1 has joined #ruby
vivekananda has quit [Ping timeout: 252 seconds]
<shevy> do they also use python?
<kubunto> shevy: likely not
chinmay_dd has quit [Quit: Leaving]
<kubunto> at least id imagine it would be a lot of system level work
<kubunto> python is likely too slow too
<kubunto> (or at least i would think)
<shevy> HAL ... isn't that the crazy computer that killed people
<eam> it's too variable in its behavior; hard to prove correctness
<eam> speed isn't the biggest issue
lewix has quit [Remote host closed the connection]
<eam> lack of unhandled failure scenarios is the #1 issue
delianides has joined #ruby
<shevy> hmm
<shevy> like what... alien attack?
<Nilium> Say you had an office and I covered every square inch of its floor with garden gnomes designed to face you as you walk into it
<Nilium> How likely are you to be traumatized?
<shevy> garden gnomes scare me
anaeem1 has quit [Ping timeout: 248 seconds]
<shevy> have you seen chucky? the doll that kills?
Filete has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Nilium> I saw a few of the movies as a kid.
<shevy> only japanese pranks are worse than garden gnomes
<Nilium> Japan is a huge asshole when it does pranks and reality TV.
<shevy> from chasing people in realistic dinosaur-costumes, to catapulting them into the air as they sleep, to toss them out into the snow when they are naked... that's psychological torture
<Nilium> Like that guy they locked in a room and forced him to fill out sweepstakes things for food
yh has quit [Ping timeout: 246 seconds]
doodlehaus has joined #ruby
<shevy> if the japanese did not also create ruby, I'd very much wonder about them
lewix has joined #ruby
Channel6 has joined #ruby
mjuszczak has joined #ruby
<Nilium> Most Japanese software I've seen is awful, so I don't know, I'd still wonder.
ta has joined #ruby
starless has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jheg has quit [Quit: jheg]
mitchellhenke has joined #ruby
redlegion has joined #ruby
grilllo has quit [Quit: Page closed]
baroquebobcat has quit [Quit: baroquebobcat]
mtakkman has joined #ruby
ebbflowgo has joined #ruby
mtakkman has quit [Remote host closed the connection]
yh has joined #ruby
Evan- has quit [Quit: Oh shit the geek died!]
Evan_ has joined #ruby
sevvie has quit [Ping timeout: 264 seconds]
deject3d has quit [Remote host closed the connection]
krisquigley has joined #ruby
Megtastique has quit []
Porfirium has quit [Read error: Connection reset by peer]
sevvie has joined #ruby
pontiki has joined #ruby
mtakkman has joined #ruby
Igorshp has joined #ruby
deject3d has joined #ruby
lidenskap has quit [Remote host closed the connection]
ponga has joined #ruby
yh has quit [Ping timeout: 265 seconds]
<shevy> heeh
riotjones has joined #ruby
krisquigley has quit [Ping timeout: 250 seconds]
Ellis has joined #ruby
doodlehaus has quit [Remote host closed the connection]
Megtastique has joined #ruby
<Ellis> i’m trying to tetst my code. my code is set up to raise an argument error if the argument supplied is empty, is there a way to test this with puts?
{orb} has joined #ruby
<Ellis> i tried this but it doesn’t work puts initialize([]) == raise ArgumentError
<Ellis> i’m trying to get it to return true
shevy has quit [Quit: ""]
sevvie has quit [Ping timeout: 272 seconds]
hiall has quit [Quit: hiall]
pontiki has quit [Ping timeout: 264 seconds]
ebbflowgo has quit [Quit: ebbflowgo]
aswen has joined #ruby
greenbagels has joined #ruby
roolo has joined #ruby
ponga has quit [Ping timeout: 276 seconds]
doodlehaus has joined #ruby
<jhass> Ellis: test as in programatically with a test framework?
<Ellis> no just using puts. an example is i write a variable called hello and set it to 1 - hello = 1, then say puts hello = 1 and it should return true
simplyaubs has joined #ruby
jheg has joined #ruby
casadei has joined #ruby
lewix has quit [Remote host closed the connection]
fabrice31 has joined #ruby
mitchellhenke has quit [Quit: Computer has gone to sleep.]
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkulbida has quit [Quit: leaving]
User458764 has joined #ruby
horsecowdog has joined #ruby
casadei has quit [Ping timeout: 252 seconds]
AlphaTech is now known as zz_AlphaTech
ta has quit [Remote host closed the connection]
greenbagels has quit [Quit: Leaving]
aswen has quit [Ping timeout: 248 seconds]
fabrice31 has quit [Ping timeout: 245 seconds]
simplyaubs has quit [Quit: simplyaubs]
riotjones has quit [Ping timeout: 264 seconds]
wottam has joined #ruby
<jhass> Ellis: just let your program error out then
<Ellis> i have to return true, it’s for an assignment
wottam has quit [Client Quit]
<jhass> if you raise, the return value is irrelevant
maximski has joined #ruby
<Ellis> ok thanks
freerobby has quit [Quit: Leaving.]
kblake has joined #ruby
horsecowdog has quit [Remote host closed the connection]
mjuszczak has quit []
ChoiKyuSang has quit [Quit: Going offline, see ya! (( www.adiirc.com )]
mjuszczak has joined #ruby
techietrash has quit [Quit: Bye! <(^_^<)]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
lewix has joined #ruby
cpt_yossarian has quit [Ping timeout: 245 seconds]
juanpablo____ has joined #ruby
yfeldblum has joined #ruby
simplyaubs has joined #ruby
omosoj has joined #ruby
freerobby has joined #ruby
omosoj is now known as sohrab
yfeldblum has quit [Client Quit]
mjuszczak has quit []
sohrab has quit [Client Quit]
wottam has joined #ruby
lidenskap has joined #ruby
yfeldblum has joined #ruby
juanpablo____ has quit [Ping timeout: 250 seconds]
omosoj has joined #ruby
shevy has joined #ruby
RegulationD has joined #ruby
dfinninger has joined #ruby
sevvie has joined #ruby
rixius has quit [Ping timeout: 255 seconds]
Igorshp has quit [Remote host closed the connection]
simplyaubs has quit [Quit: simplyaubs]
RegulationD has quit [Ping timeout: 264 seconds]
jimms has joined #ruby
_honning_ has joined #ruby
vozcelik has joined #ruby
ascarter has joined #ruby
kirun has joined #ruby
lemur has quit [Remote host closed the connection]
jaygen has joined #ruby
Echoes-- has quit [Read error: Connection reset by peer]
kblake has quit [Remote host closed the connection]
iamninja has joined #ruby
cpt_yossarian has joined #ruby
vozcelik has quit [Max SendQ exceeded]
pushpak has joined #ruby
djbkd_ has joined #ruby
Lingo_ has joined #ruby
charliesome has joined #ruby
rixius_ has joined #ruby
longfeet has joined #ruby
n80 has quit [Quit: n80]
doodlehaus has quit [Remote host closed the connection]
bluOxigen has joined #ruby
apoplexy has joined #ruby
WajidKagzi has joined #ruby
reinaldob has joined #ruby
ChoiKyuSang has joined #ruby
djbkd_ has quit [Ping timeout: 250 seconds]
reinaldob has quit [Remote host closed the connection]
lemur has joined #ruby
WajidKagzi has quit [Client Quit]
Igorshp has joined #ruby
Lingo_ has quit [Read error: Connection reset by peer]
rixius_ has quit [Ping timeout: 255 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ismaelga has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Lingo_ has joined #ruby
Sirupsen has joined #ruby
jottr has quit [Ping timeout: 244 seconds]
<swills> can anyone tell me when 2.0 and 2.1 will be end of life'd?
dfinninger has quit [Remote host closed the connection]
<swills> 1.8 and 1.9 were EOLd a while ago, but there hasn't been any word on 2.0 or 2.1 as far as I know
OrbitalKitten has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass> swills: 2.0 is set to EOL end of february 2016
<jhass> no date for 2.1 yet afaik
lele is now known as Guest24
Porfa has joined #ruby
<swills> jhass: url?
<swills> jhass: and thanks!
<jhass> uh, I think it was announced in the 1.9 EOL news
jottr has joined #ruby
<swills> i don't see it there
<swills> ah, thanks
avahey has joined #ruby
freerobby has quit [Quit: Leaving.]
reinaldob has joined #ruby
silentpost has quit [Read error: Connection reset by peer]
beat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
beat has joined #ruby
silentpost has joined #ruby
beat has quit [Client Quit]
beat has joined #ruby
Channel6 has quit [Quit: Leaving]
yfeldblu_ has joined #ruby
MasterPiece has quit [Quit: Leaving]
<cosmicfires> jhass have you used pry + pry-byebug + pry-stack_explorer with eclipse and dynamic language tool kit?
lewix has quit [Remote host closed the connection]
<jhass> no
Spami has joined #ruby
rixius has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
omosoj has quit [Ping timeout: 250 seconds]
blueOxigen has joined #ruby
postmodern has joined #ruby
banister has joined #ruby
banister has quit [Max SendQ exceeded]
kerrizor has quit [Quit: Textual IRC Client: www.textualapp.com]
bluOxigen has quit [Ping timeout: 256 seconds]
silentpost has quit [Ping timeout: 250 seconds]
Ellis has quit [Quit: Ellis]
reinaldob has quit [Remote host closed the connection]
rixius has quit [Ping timeout: 255 seconds]
Ellis has joined #ruby
bim has quit [Disconnected by services]
bim_ has joined #ruby
rixius has joined #ruby
lidenskap has quit [Remote host closed the connection]
tjbiddle has joined #ruby
<shevy> can crystal actually interprete ruby code?
lewix has joined #ruby
lewix has joined #ruby
<jhass> no
<havenwood> shevy: Only where they overlap and it's also valid Crystal.
<shevy> haha
maximski has quit []
<shevy> well that would be a funny idea right away
<shevy> something that interpretes all the various scripting-language family
<havenwood> shevy: There's a proof-of-concept for writing Ruby extensions in Crystal.
lewix has quit [Remote host closed the connection]
LJT has joined #ruby
<havenwood> shevy: embed mruby in your crystal ruby extension
tpimtts_away has quit [Ping timeout: 245 seconds]
simplyaubs has joined #ruby
rixius has quit [Ping timeout: 255 seconds]
<jhass> don't make me have ideas!
Ellis has quit [Quit: Ellis]
<shevy> \o/
quimrstorres has joined #ruby
ajpocus has joined #ruby
LJT_ has quit [Ping timeout: 252 seconds]
tpimtts_away has joined #ruby
<jhass> does mruby ship its own GC?
kubunto has left #ruby [#ruby]
juanpablo____ has joined #ruby
jimms has quit [Ping timeout: 256 seconds]
data-cat has quit [Quit: leaving]
<Mon_Ouie> Yes, it has a tri-color and a generation GC
Ellis has joined #ruby
<shevy> so many colors
doodlehaus has joined #ruby
lidenskap has joined #ruby
lethosor|away has quit [Quit: Connection closed for inactivity]
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
robertt_dex has quit [Ping timeout: 276 seconds]
juanpablo____ has quit [Ping timeout: 256 seconds]
Rafalski has joined #ruby
<Rafalski> Hey guys… Does anyone have a good guide/article on how to setup rails / ruby 1.8.7 on Yosemite?
mbff has quit [Quit: Leaving]
redlegion has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
silentpost has joined #ruby
vivekananda has joined #ruby
<ytti> yosemite ships with ruby 2.0.0p481
<ytti> and downgrading to 1.8.7 would be ill-adviced
ismaelga has quit [Remote host closed the connection]
ujihisa has quit [Ping timeout: 272 seconds]
<havenwood> Rafalski: Ruby 1.8 is past end-of-life. Even Ruby 2.0 is in maintenance mode. If possible use Ruby 2.1 or better yet 2.2.
<c-c> hm, I think rails no longer supports 1.8
rixius has joined #ruby
<Rafalski> I know.. But have a project in 1.8.7 that needs some udpating
axisys has quit [Remote host closed the connection]
<havenwood> Rafalski: 1.8 doesn't even compile any longer without patches.
<Rafalski> hmmm
<weaksauce> Rafalski use a VM
<havenwood> Rafalski: Probably just use RVM to get the patches.
<Rafalski> ok… Might have to upgrade the project..
MotherClucker has joined #ruby
<havenwood> Rafalski: or i like weaksauce's idea
<MotherClucker> the only constant is change my niggas
<Rafalski> In this case, do you guys have a good resources on how to setup RVM on a production server?
<jhass> !mute MotherClucker
<c-c> rvm has great documents
<Rafalski> Ya, VM might be a good solution for now
<weaksauce> 1.8 to 1.9 was a big change in how ruby operated yeah?
MotherClucker has left #ruby [#ruby]
<c-c> Rafalski: just read it, it takes 15 minutes
<Rafalski> k thanks guys
Pharaoh2 has joined #ruby
Rickmasta has joined #ruby
byprdct has joined #ruby
yqt has joined #ruby
Rafalski has quit [Quit: Rafalski]
axisys has joined #ruby
rixius has quit [Client Quit]
rixius has joined #ruby
charliesome has quit [Quit: zzz]
axisys has quit [Client Quit]
xiq has quit [Remote host closed the connection]
charliesome has joined #ruby
simplyaubs has quit [Quit: simplyaubs]
axisys has joined #ruby
axisys has joined #ruby
Sirupsen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
axisys has quit [Changing host]
axisys has quit [Client Quit]
chintanparikh has joined #ruby
axisys has joined #ruby
<chintanparikh> This is a long shot, but does anyone know of any ruby implementations of a reliable data protocol (like TCP) over UDP?
<chintanparikh> So like TCP packets being sent in the UDP body
<jhass> why don't you use TCP...
kblake has joined #ruby
bobbrez has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
n80 has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
<ytti> chintanparikh, minimalt or quic would be pretty good candidates, but i don't think either has ruby implementation yet
maximski has joined #ruby
krisquigley has joined #ruby
<jhass> chintanparikh: I'm really curious, if you can freely define the udp body, you seem to have control over both, server and client. Why don't you use TCP if you want TCPs features?
<chintanparikh> jhass: School assignment
<chintanparikh> No practical use of implementing TCP over UDP
<chintanparikh> But its interesting
<jhass> ah
kblake has quit [Ping timeout: 245 seconds]
mtakkman has quit [Ping timeout: 265 seconds]
<jhass> I'm not sure yet if I think that's a useful one :P
<shevy> yeah
<ytti> if it's for school project, then what use would be ready implementation be
<shevy> you always have to convince jhass
<shevy> before he approves
pontiki has joined #ruby
RegulationD has joined #ruby
<jhass> yep, what ytti said came to my mind too, using an already ready implementation seems to defeat the only point I could see in that assignment
<ytti> i'd write something with xsalsa20, curve25519 (nacl has ruby library) and some uber trivial bandwith estimator for packet pacing, instead of tcp bursting
ascarter has joined #ruby
<ytti> it'll be hella slow
charliesome has quit [Quit: zzz]
<ytti> at least if you use UDPSocket instead of some pcap library
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rixius has quit [Read error: Connection reset by peer]
rixius has joined #ruby
<ytti> not sure if there are netmap/pc_ring/dpdk et.al. libraries to ruby, probably not
<ytti> s/pc/pf/
krisquigley has quit [Ping timeout: 250 seconds]
reinaldob has joined #ruby
reinaldob has quit [Remote host closed the connection]
vudew has quit [Quit: Lost terminal]
RegulationD has quit [Ping timeout: 240 seconds]
aswen has joined #ruby
pontiki has quit [Ping timeout: 265 seconds]
tus has joined #ruby
zorak8 has joined #ruby
rixius has quit [Ping timeout: 255 seconds]
Hijiri has quit [Ping timeout: 272 seconds]
lewix has joined #ruby
Hijiri has joined #ruby
jimms has joined #ruby
jottr has quit [Ping timeout: 245 seconds]
Jiyuhen has quit [Ping timeout: 272 seconds]
casadei has joined #ruby
Jiyuhen has joined #ruby
aryaching has quit []
sevvie has quit [Ping timeout: 250 seconds]
oktexan has quit [Quit: Leaving]
MatthewsFace has joined #ruby
fabrice31 has joined #ruby
psy_ has quit [Ping timeout: 240 seconds]
tosbourn has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
OtterCoder has joined #ruby
Lingo_ has quit [Quit: (null)]
lewix has quit [Ping timeout: 246 seconds]
riotjones has joined #ruby
MatthewsFace has quit [Client Quit]
casadei has quit [Ping timeout: 255 seconds]
lordkryss has quit [Quit: Connection closed for inactivity]
doodlehaus has quit [Remote host closed the connection]
mbff has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
tosbourn has quit [Ping timeout: 264 seconds]
Dreamer3 has quit [Remote host closed the connection]
<mbff> Hello, I just found out my gem name "strike" is already taken. I changed my folder name, spec.name and github remote to reflect my new name "strike_api" and I am getting an error when I test my gem locally in a different project
<mbff> what else do i need to change inorder to get the name change to work
<havenwood> mbff: what's the error?
<mbff> can I keep the Module name the same?
<jhass> You shouldn't
<mbff> /home/marshall/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- strike_api (LoadError)
<mbff> so I should change Strike::Torrent
<mbff> to Strike_Api::Torrent
vivekananda has quit [Ping timeout: 250 seconds]
willharrison has joined #ruby
<mbff> what you linked to shows project having a different name then there gem name.... why are you saying I should't keep it the same?
<havenwood> mbff: Here's a short gem-naming guide: http://guides.rubygems.org/name-your-gem/
<mbff> in this example the module and project name is different .... ruby_parserrequire 'ruby_parser'RubyParser
<mbff> how can I do the same?
dfinninger has joined #ruby
<jhass> how is it different?
<mbff> RubyParser vs ruby_parser
<mbff> Strike vs strike_api
jimms has quit [Read error: Connection reset by peer]
starless has quit [Quit: Leaving]
<jhass> strike_api -> StrikeAPI
<jhass> strike-api -> Strike::API
jimms has joined #ruby
pika_pika has joined #ruby
MatthewsFace has joined #ruby
c355E3B has joined #ruby
<jhass> er, StrikeApi, Strike::Api to be strict
jimms has quit [Read error: Connection reset by peer]
jimms_ has joined #ruby
<mbff> I am seriously confused
<jhass> well, you know the convention how to map module names to files already?
dfinninger has quit [Remote host closed the connection]
<mbff> no...
jimms_ has quit [Read error: Connection reset by peer]
stef204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<jhass> module & class names
jimms has joined #ruby
riotjones has quit [Ping timeout: 276 seconds]
ujihisa has joined #ruby
<jhass> >> "foo_bar/baz".split("_").map(&:capitalize).join.split("/").map(&:capitalize).join
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ruboto> jhass # => "FoobarBaz" (https://eval.in/312096)
<jhass> >> "foo_bar/baz".split("_").map(&:capitalize).join.split("/").map(&:capitalize).join("::"
<ruboto> jhass # => /tmp/execpad-b558c0e5faf8/source-b558c0e5faf8:3: syntax error, unexpected keyword_rescue, expecting ...check link for more (https://eval.in/312097)
<jhass> >> "foo_bar/baz".split("_").map(&:capitalize).join.split("/").map(&:capitalize).join("::")
wallerdev has joined #ruby
<ruboto> jhass # => "Foobar::Baz" (https://eval.in/312098)
<jhass> er, meh, wrong way around, ignore that :P
<jhass> words might work better after all
lidenskap has quit [Remote host closed the connection]
<jhass> you split by _, capitalize the words and there you have your constant name
shellfu has joined #ruby
<jhass> foo_bar -> FooBar
<mbff> ok....
<jhass> for nested namespaces, you create directories
maximski has quit []
<jhass> FooBar::Baz -> foo_bar/baz.rb
bim_ has quit [Remote host closed the connection]
<jhass> for gem names, you do the same, the gem strike_api should define the constants StrikeApi in the file lib/strike_api.rb
<jhass> strike-api would define the constant Strike::Api in lib/strike/api.rb
<mbff> i don't want lib/strike/api.rb
<jhass> yeah, just explaining the conventions
shevy has quit [Quit: ""]
<jhass> it would also mean to be a plugin gem for the existing strike gem
jimms has quit [Ping timeout: 252 seconds]
<mbff> just tell me how to name it if the entire gem is a strike api wrapper gem name: strike_api
<mbff> would I use a dash instead to avoid lib/strike/api.rb
<jhass> 22:42 <jhass> for gem names, you do the same, the gem strike_api should define the constants StrikeApi in the file lib/strike_api.rb
<jhass> no
merdam has joined #ruby
charliesome has joined #ruby
<mbff> how bout the module name
jottr has joined #ruby
<mbff> Strike_Api ?
<jhass> are you trolling?
<merdam> Eat my diarrhea!
<merdam> Just ate a burger at a sleazy joint!
<jhass> !mute merdam
<mbff> sorry. I will leave now.
<havenwood> mbff: StrikeApi
<havenwood> mbff: CamelCase
shellfu has quit [Remote host closed the connection]
Jackneill has quit [Remote host closed the connection]
ascarter has joined #ruby
kubunto has joined #ruby
mbff has quit [Read error: Connection reset by peer]
riceandbeans has quit [Ping timeout: 256 seconds]
<havenwood> mbff: Study that RubyGems recommendation for gem names. It's a bit confusing but really worth following conventions.
<jhass> he left
<kubunto> jhass: guess what, i could have just used %c as my formating argument ot parse the date
<jhass> kubunto: hah ;D
<jhass> good catch
<kubunto> turns out it fits the US representation
riceandbeans has joined #ruby
riceandbeans has joined #ruby
<jhass> havenwood: it's aint that hard, I think he just fails at reading
<kubunto> figured it out because you can do that in python
shevy has joined #ruby
<kubunto> still going to leave it spelled out as that would work regardless of locale
Pupeno has quit [Read error: Connection reset by peer]
Pupeno has joined #ruby
n80 has quit [Quit: n80]
nfk has quit [Quit: yawn]
steven43126 has quit [Ping timeout: 264 seconds]
mitchellhenke has joined #ruby
jenrzzz has joined #ruby
silentpost has quit [Ping timeout: 246 seconds]
rajeshchawla has joined #ruby
rajeshchawla has quit [Client Quit]
dc has joined #ruby
eytanfb has joined #ruby
wingedsnake has joined #ruby
riceandbeans has quit [Quit: leaving]
oddskill_bed is now known as oddskill_away
riceandbeans has joined #ruby
rixius_ has joined #ruby
oddskill_away is now known as oddskill
claptor has joined #ruby
shellfu has joined #ruby
silentpost has joined #ruby
lidenskap has joined #ruby
lidenskap has quit [Remote host closed the connection]
reinaldob has joined #ruby
rixius_ has quit [Ping timeout: 255 seconds]
riceandbeans has quit [Remote host closed the connection]
Nuck has joined #ruby
reinaldob has quit [Remote host closed the connection]
ascarter has quit [Quit: Textual IRC Client: www.textualapp.com]
riceandbeans has joined #ruby
tmadsen has joined #ruby
ascarter has joined #ruby
Filete has joined #ruby
chipotle has quit [Quit: cheerio]
maximski has joined #ruby
dfinninger has joined #ruby
ascarter has quit [Max SendQ exceeded]
maximski has quit [Max SendQ exceeded]
ascarter has joined #ruby
maximski has joined #ruby
lidenskap has joined #ruby
lidenskap has quit [Remote host closed the connection]
Nuck has quit [Max SendQ exceeded]
claptor has quit [Quit: this channel is bakas]
ascarter has quit [Max SendQ exceeded]
Nuck has joined #ruby
Channel6 has joined #ruby
Hijiri has quit [Ping timeout: 252 seconds]
ascarter has joined #ruby
Asher has quit [Quit: Leaving.]
Nuck has quit [Max SendQ exceeded]
Asher has joined #ruby
dc has quit [Remote host closed the connection]
Nuck has joined #ruby
rixius has joined #ruby
gr33n7007h has joined #ruby
chipotle has joined #ruby
reinaldob has joined #ruby
ramfjord has joined #ruby
Hijiri has joined #ruby
reinaldob has quit [Remote host closed the connection]
aswen has quit [Ping timeout: 248 seconds]
rixius has quit [Ping timeout: 255 seconds]
iamjarvo has joined #ruby
chipotle has quit [Ping timeout: 248 seconds]
arrnas has quit [Remote host closed the connection]
chipotle has joined #ruby
kubunto has quit [Quit: The problem is not the problem. The problem is your attitude about the problem. Do you understand?]
work_op has joined #ruby
lavros has quit [Quit: leaving]
kyrylo has joined #ruby
vivekananda has joined #ruby
dfinninger has quit [Remote host closed the connection]
Darryl___ has quit [Quit: Connection closed for inactivity]
a5i has joined #ruby
lethosor|away has joined #ruby
zapata has quit [Quit: leaving]
greenbagels has joined #ruby
zapata has joined #ruby
charliesome has quit [Quit: zzz]
<willharrison> how can I convert a ruby VALUE into a C data if the VALUE if a bignum?
maximski has quit []
lewix has joined #ruby
zz_AlphaTech is now known as AlphaTech
naftilos76 has joined #ruby
mitchellhenke has quit [Quit: Computer has gone to sleep.]
<naftilos76> Is it possible to skip waiting for gets to receive a stream of bytes when using a pipe to com between two ruby scripts?
hs366 has quit [Read error: Connection reset by peer]
vim_shimm has joined #ruby
rixius has joined #ruby
Filete has quit [Ping timeout: 252 seconds]
ramfjord has quit [Ping timeout: 250 seconds]
banister has joined #ruby
conhache has joined #ruby
pushpak has quit [Quit: Linkinus - http://linkinus.com]
jeramy_s has joined #ruby
banister has quit [Max SendQ exceeded]
JDiPierro has joined #ruby
tgunr has joined #ruby
elaptics is now known as elaptics_away
zzing has quit [Quit: Textual IRC Client: www.textualapp.com]
dfinninger has joined #ruby
jimms has joined #ruby
<jhass> read_nonblock? kinda vague question
JDiPierro has quit [Remote host closed the connection]
<naftilos76> is that a method?
tus has quit [Ping timeout: 240 seconds]
maximski has joined #ruby
Pharaoh2 has quit [Disconnected by services]
Pharaoh2_ has joined #ruby
JDiPierro has joined #ruby
Sirupsen has joined #ruby
<willharrison> is this what I'm looking for ? https://github.com/ruby/ruby/blob/trunk/numeric.c#L2450
banister has joined #ruby
banister has quit [Max SendQ exceeded]
Takle has quit [Remote host closed the connection]
Nuck has quit [Ping timeout: 250 seconds]
conhache has quit [Quit: Page closed]
juanpablo____ has joined #ruby
rixius has quit [Ping timeout: 255 seconds]
Ellis has quit [Quit: Ellis]
<willharrison> nope it is not
bim has joined #ruby
gorpon has joined #ruby
bim is now known as Guest64847
JDiPierro has quit [Remote host closed the connection]
jimms has quit [Ping timeout: 255 seconds]
juanpablo____ has quit [Ping timeout: 255 seconds]
LJT has quit [Quit: Sleeping...]
bluOxigen has joined #ruby
ta has joined #ruby
ramfjord has joined #ruby
chintanparikh has quit [Ping timeout: 246 seconds]
rixius has joined #ruby
beat has quit [Quit: Textual IRC Client: www.textualapp.com]
blueOxigen has quit [Ping timeout: 252 seconds]
Guest64847 has quit [Ping timeout: 256 seconds]
reinaldob has joined #ruby
akurilin3 has quit [Read error: Connection reset by peer]
merdam has quit [K-Lined]
simplyaubs has joined #ruby
LJT has joined #ruby
akurilin2 has joined #ruby
reinaldob has quit [Remote host closed the connection]
threh has joined #ruby
quimrstorres has quit [Remote host closed the connection]
reinaldob has joined #ruby
steven43126 has joined #ruby
rixius has quit [Read error: Connection reset by peer]
redlegion has joined #ruby
rixius has joined #ruby
LJT has quit [Client Quit]
vim_shimm has quit [Ping timeout: 255 seconds]
oddskill is now known as masterblaster
maximski has quit []
claptor has joined #ruby
jeramy_s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<naftilos76> jhass: Thanks
claptor has quit [Client Quit]
pandaant has quit [Remote host closed the connection]
<naftilos76> jhass: I'll have to buy you a beer sometime soon (or two)
BradPitt has quit [Quit: Leaving]
steven43126 has quit [Ping timeout: 256 seconds]
simplyaubs has quit [Quit: simplyaubs]
<naftilos76> goodnight
rixius has quit [Ping timeout: 255 seconds]
naftilos76 has quit [Remote host closed the connection]
AlphaTech has quit [Ping timeout: 240 seconds]
<havenwood> willharrison: What C type are you trying to get back?
krisquigley has joined #ruby
<willharrison> havenwood I am trying to write a C function that takes 2 big nums and multiplies them using karatsuba's algorithm and returns a bignum
AlphaTech has joined #ruby
<willharrison> it should work for small numbers too tho
rixius has joined #ruby
<havenwood> willharrison: Do you want long, unsigned long, int, unsigned int, long long, unsigned long long, off_t or double?
<willharrison> what is off_t?
pontiki has joined #ruby
<willharrison> havenwood
RegulationD has joined #ruby
<willharrison> I tried using unsigned long long but it is too small
decoponio has quit [Read error: Connection reset by peer]
<havenwood> signed int for filesizes - no what you'll want
<willharrison> ah ok
decoponio has joined #ruby
<willharrison> I guess I could just not convert the VALUE to anything and run bignum operations on them?
krisquigley has quit [Ping timeout: 245 seconds]
pontiki has quit [Ping timeout: 240 seconds]
gregf1 has quit [Quit: WeeChat 1.0.1]
RegulationD has quit [Ping timeout: 250 seconds]
rixius has quit [Ping timeout: 255 seconds]
charliesome has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banister has joined #ruby
banister has quit [Max SendQ exceeded]
macoecho has quit [Quit: This computer has gone to sleep]
Hijiri has quit [Ping timeout: 252 seconds]
macoecho has joined #ruby
Kutten has joined #ruby
ta has quit [Remote host closed the connection]
Hijiri has joined #ruby
charliesome has quit [Client Quit]
somealguno has joined #ruby
masterblaster is now known as oddskill_away
<somealguno> /join #lisp
threh has quit [Ping timeout: 240 seconds]
casadei has joined #ruby
lobolars has quit [Ping timeout: 264 seconds]
<jhass> traitor!
silentpost has quit [Read error: Connection reset by peer]
fabrice31 has joined #ruby
silentpost has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cpt_yossarian has quit [Ping timeout: 256 seconds]
yqt has quit [Read error: Connection reset by peer]
<apeiros> jhass: naaa, they're just checking ruby's roots
yqt has joined #ruby
<apeiros> must know where you came from to understand where you are! :)
Joufflu has quit [Read error: Connection reset by peer]
CloCkWeRX has joined #ruby
bluOxigen has quit [Ping timeout: 250 seconds]
casadei has quit [Ping timeout: 245 seconds]
postmodern has quit [Quit: Leaving]
somealguno is now known as big-mountain
big-mountain is now known as small-mountain
small-mountain is now known as clear-air
<jhass> I rather look where I can go to :P
clear-air is now known as full-water
full-water is now known as water-watered
<jhass> I wonder if we're being told a story through /nick changes now
dc has joined #ruby
fabrice31 has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
wingedsnake has quit [Ping timeout: 252 seconds]
<water-watered> Proc.new {|x| system(kill x)}
<apeiros> the vanishing mountain which became clear air and then water?
<Coraline> Fire Walk With Me
<shevy> poor man
cpt_yossarian has joined #ruby
<jhass> it's life, it starts as a big mountain you have climb, as you progress the mountain gets smaller, at the top things become clearer
<jhass> the water I didn't figure out yet though
macoecho has quit [Quit: This computer has gone to sleep]
<shevy> unless there is fog
<apeiros> reminds me of that riddle of the sphinx
wingedsnake has joined #ruby
delianides has quit [Remote host closed the connection]
rixius has joined #ruby
<water-watered> mountain.tr("water","wine").tr("mount","clear")
hmsimha has joined #ruby
<water-watered> what's the name for shuffle?
wottam has joined #ruby
wottam has quit [Client Quit]
casadei has joined #ruby
riotjones has joined #ruby
<Kutten> hey, Is this channel an appropriate place to ask for web dev help?
<centrx> if it's related to Ruby
<havenwood> Kutten: If it has to do with the Ruby programming language, it's the perfect place.
<Coraline> There is a rails channel too though
<havenwood> Kutten: #RubyOnRails for Rails.
<Coraline> If that's your thing.
<havenwood> ;)
<water-watered> I don't find very intuitive to use split to convert to array, like "now is the time".split("").shuffle
<havenwood> water-watered: #chars
<water-watered> perhaps shuffle should work with an enumerator
<Mon_Ouie> That's not how String#tr works, your first call means "translate w to w, a to i, t to n, e to e, and delete all occurrences of r"
<water-watered> "now".chars.shuffle doesn't work
<havenwood> >> 'mountain'.tr("water","wine").tr("mount","clear")
<ruboto> havenwood # => "cleaaiia" (https://eval.in/312101)
rixius has quit [Ping timeout: 255 seconds]
<havenwood> >> "now".chars.shuffle
<ruboto> havenwood # => ["w", "n", "o"] (https://eval.in/312102)
<water-watered> no ia here
<havenwood> water-watered: What version of Ruby are you using?
<water-watered> next time I will prepare a puzzle for people to be entertainned
WajidKagzi has joined #ruby
lidenskap has joined #ruby
<water-watered> RUBY_VERSION 1.9.3
tus has joined #ruby
<havenwood> water-watered: 1.9.3 is past end-of-life. If you can update to 2.2.1.
<apeiros> 19>> "hello".chars.to_a
<ruboto> apeiros # => ["h", "e", "l", "l", "o"] (https://eval.in/312103)
<apeiros> in 1.9, chars returns an enum. call .to_a before shuffle
<water-watered> using ubuntu,
dc has quit [Remote host closed the connection]
<shevy> you poor man
<water-watered> to_a is a logical step.
willharrison has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
WajidKagzi has quit [Client Quit]
<apeiros> shevy: I know I've been an offender in this regard in the past too. but please lets refrain from making judgments of people's OS.
<havenwood> water-watered: You might consider using the Brightbox Ruby packages for Ubuntu: https://www.brightbox.com/docs/ruby/ubuntu/
<water-watered> what is the name of the system to update ruby, I don't remember at the moment, something like brew
<water-watered> Brightbox very smart indeep
sevvie has joined #ruby
iamjarvo has joined #ruby
<havenwood> water-watered: `brew` is a popular OS X package manager. `apt` for Ubuntu, just use the Brightbox repository.
<water-watered> I recall that the book of rails gave indications how to build a rail application from scratch, and use a system to update your ruby or use any version
<water-watered> google: how to update ruby, first link use rvm ok now I know
shevy has quit [Remote host closed the connection]
<water-watered> in ubuntu ruby2.0, the program is not installed use apt-get install ruby2.0 to install ruby
<havenwood> water-watered: If you want just the latest Ruby, I'd suggest just using the Brightbox package through apt-get.
lidenskap has quit [Ping timeout: 246 seconds]
robertt_dex has joined #ruby
<havenwood> water-watered: If you want to switch between different Rubies then consider ruby-install/chruby or RVM.
<water-watered> now irb2.0 gives RUBY_VERSION = 2.0.0
water-watered is now known as firewood
firewood is now known as masternick
<havenwood> water-watered: 2.0 is currently in maintenance mode. You can switch between apt versions of Ruby with update-alternatives or ruby-switch.
Soda has joined #ruby
<a5i> >> puts [1, 2, 3].map { |x| x + 1 }.select { |x| x > 2 }.sum #=> 7
<ruboto> a5i # => undefined method `sum' for [3, 4]:Array (NoMethodError) ...check link for more (https://eval.in/312105)
<a5i> >> puts [1, 2, 3].map { |x| x + 1 }.select { |x| x > 2 }.sum
<ruboto> a5i # => undefined method `sum' for [3, 4]:Array (NoMethodError) ...check link for more (https://eval.in/312106)
<masternick> shuffle doesn't work for string at 2.0
<masternick> there is no sum method
<a5i> Oh...
wingedsnake has quit [Ping timeout: 264 seconds]
<havenwood> wasamasa: There's a good explanation of the Brightbox package route on the link I gave. RVM or ruby-install/chruby docs if you go that route.
<masternick> use inject
sevvie has quit [Ping timeout: 272 seconds]
<masternick> inject is not an intuitive name for reduce or fold
<Mon_Ouie> Then use reduce
<apeiros> reduce and fold are not intuitive names for inject…
<a5i> that was crystal code thinking it was compatible with Ruby
<Mon_Ouie> >> [1, 2, 3].reduce(0, :+)
<ruboto> Mon_Ouie # => 6 (https://eval.in/312110)
<havenwood> >> [].reduce 0, :+
<ruboto> havenwood # => 0 (https://eval.in/312111)
<masternick> I will take a look at brighbox when I have the time
<apeiros> masternick: intuition are a product of past experience
gregf1 has joined #ruby
sevvie has joined #ruby
<masternick> past experience is never using inject
<masternick> can you give any hint about the idea of using inject?
jmdade has joined #ruby
<apeiros> masternick: you inject an operator between the elements of the array.
<apeiros> [1,2,3].inject(:+) --> 1 <inject + here> 2 <inject + here> 3
<masternick> inject in java: Identifies injectable constructors, methods, and fields.
<masternick> is like join ?
avahey has quit [Quit: Connection closed for inactivity]
riotjones has quit [Ping timeout: 256 seconds]
<apeiros> to a point
charliesome has joined #ruby
Takle has joined #ruby
<masternick> [1,2,3].map(&:to_s).join("+")
<masternick> "1+2+3" now you have injected plus on that
<apeiros> you can omit the map. join calls to_s already.
<masternick> eval( [1,2,3].map(&:to_s).join("+") ) = 6
* havenwood tries to resist the urge to golf
<masternick> perhaps eval should be a method for string,
<wasamasa> havenwood: I don't want to go the rvm route :<
<havenwood> >> [1,2,3]*?+
willharrison has joined #ruby
<ruboto> havenwood # => "1+2+3" (https://eval.in/312118)
<apeiros> masternick: no. it should be a method of Binding.
sevvie has quit [Remote host closed the connection]
Yzguy has joined #ruby
<apeiros> (and it is in newer rubies)
Yzguy has quit [Max SendQ exceeded]
ujihisa has quit [Ping timeout: 250 seconds]
<masternick> [1,2,3]*?+ is cute!
Nuck has joined #ruby
<jhass> not really, its golf
<masternick> what is the new of those methods, * in python is splash
Yzguy has joined #ruby
Yzguy has quit [Max SendQ exceeded]
<wasamasa> * is syntax for apply
<havenwood> masternick: Array#* and a character literal.
Nuck has quit [Max SendQ exceeded]
Nuck has joined #ruby
<masternick> What is ?+, I know that & is for getting the name of the procedure
<apeiros> >> ?+
<ruboto> apeiros # => "+" (https://eval.in/312120)
<apeiros> masternick: ^
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Takle has quit [Ping timeout: 256 seconds]
<havenwood> >> ?\n
<ruboto> havenwood # => "\n" (https://eval.in/312122)
rixius_ has joined #ruby
<apeiros> >> ?\C-c
<ruboto> apeiros # => "\u0003" (https://eval.in/312123)
jeramy_s has joined #ruby
<jhass> >> ?☃
<ruboto> jhass # => "☃" (https://eval.in/312124)
<havenwood> >> ?
<ruboto> havenwood # => "
<apeiros> clearly, it's saturday. people play with the bot.
<apeiros> ;-)
Yzguy has joined #ruby
dfinninger has quit [Remote host closed the connection]
sevvie has joined #ruby
<havenwood> !hangman gem
<jhass> def ☃?; ?☃; end; send ?☃+??
<jhass> >> def ☃?; ?☃; end; send ?☃+??
<ruboto> jhass # => "☃" (https://eval.in/312126)
delianides has joined #ruby
<jhass> havenwood: still needs the addressing ;)
<havenwood> DeBot: !hangman gems
<DeBot> ␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣ [] 0/12
reinaldob has quit [Remote host closed the connection]
<havenwood> DeBot: :
<DeBot> ␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣ [:] 1/12
<jhass> it's a gem...
Caius has quit [Quit: ""]
<havenwood> oh right!
Ca1us has joined #ruby
<havenwood> DeBot: -
<DeBot> ␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣␣ [:-] 2/12
<masternick> I still don't understand clearly what is ?+, in lisp #\+ is to get the char, #'+ is to get the function
<nickjj> is there a way to get ruby's uri module to understand relative schemes? such as //foo.com
<havenwood> jhass: Apparently I learned nothing from our gem naming discussion earlier. :P
<apeiros> masternick: it's a way to get a string
<masternick> ?a gives an error
<ruboto> gives, I don't know anything about a
<apeiros> masternick: note that there is no Char class or similar in ruby. a char is just a single character string.
<apeiros> >> ?a
<ruboto> apeiros # => "a" (https://eval.in/312128)
<apeiros> masternick: ^ no, it does not
mitchellhenke has joined #ruby
<masternick> how can i get the long name of thing that are for brief syntax like ?, does it have a name?
Igorshp has quit [Remote host closed the connection]
masternick is now known as snakeando
<havenwood> masternick: It's the character literal. See: http://ruby-doc.org/core/doc/syntax/literals_rdoc.html
wingedsnake has joined #ruby
<havenwood> DeBot: _
<DeBot> ␣␣␣␣_␣␣␣␣_␣␣␣␣␣␣␣␣␣ [:-] 2/12
steven43126 has joined #ruby
<jhass> snakeando: why are you constantly changing your nick btw?
sevvie has quit [Ping timeout: 256 seconds]
rixius_ has quit [Ping timeout: 255 seconds]
maximski has joined #ruby
<snakeando> there isn't any "?" in that page
spider-mario has quit [Remote host closed the connection]
<jhass> it's not much used in real world code anymore anyway
<snakeando> snakeando is just curious is a like a snake walking (ando is walking in spanish=
<jhass> it's not important
<jhass> havenwood was just golfing
<wasamasa> wat
<wasamasa> drugs much?
<snakeando> was is golfing, playing golf?
<jhass> code golfing, coming up with the shortest (fewest characters) possible code to solve a problem
<snakeando> why not code brieflying?
<havenwood> snakeando: Aha, I just assumed it was there. That's where it belongs. It'd be nice to add it.
<snakeando> briefing
quimrstorres has joined #ruby
* jhass gets the feeling we got a troll
<wasamasa> meh
<snakeando> "how can you grep for a troll".match /troll/ ?
ponga has joined #ruby
<jhass> returns a Mabye here
steven43126 has quit [Ping timeout: 276 seconds]
<jhass> *Maybe
<snakeando> perhaps is a monadic troll, just(sometimes)
Igorshp has joined #ruby
<snakeando> use bind and return
roolo has quit [Remote host closed the connection]
nahtnam has joined #ruby
<jhass> or perhaps it just quacks like a Troll but is something else (like a Drunk) instead
<snakeando> if it quacks like a duck and walk like a dock is a duck (who said that?)
<havenwood> nickjj: Is it not working properly? What trouble are you running into?
<jhass> you, just now
legit has joined #ruby
<nickjj> havenwood, if i use that, it complains about a generic scheme and crashes
<havenwood> nickjj: :O
<snakeando> when I program in python and ruby I sometimes forget to use the (), do you switch gracefully?
rixius has joined #ruby
<nickjj> havenwood, it's interesting because it's a WARN but actually throws an error
tpimtts_away has quit [Ping timeout: 244 seconds]
ponga has quit [Ping timeout: 264 seconds]
<havenwood> snakeando: I don't speak Parseltongue.
mitchellhenke has quit [Quit: Computer has gone to sleep.]
<havenwood> nickjj: What's the Error/Warn, just curious?
<nickjj> WARN: undefined method `request_uri' for #<URI::Generic //localhost:4242/foo>
<snakeando> what is Parseltongue I can't parse that
<nickjj> if i replace // with http:// (or https://) it works as planned
dfinninger has joined #ruby
<nickjj> error is located in /usr/local/lib/ruby/2.2.0/net/http/generic_request.rb:19:in `initialize'
<snakeando> ok Harry potter.
Igorshp has quit [Ping timeout: 250 seconds]
<snakeando> next day we will play with Watson.
tpimtts_away has joined #ruby
Pupeno has quit [Remote host closed the connection]
Pupeno has joined #ruby
<workmad3> nickjj: the error is that you're passing a URI without a scheme to URI.parse... as such, you're getting back a generic URI object, and then trying to use HTTP-specific methods on it (like request_uri)
mitchellhenke has joined #ruby
<havenwood> nickjj: Yeah, no #request_uri for relative URIs. Hmm, maybe check if it's #relative?
bkxd has joined #ruby
Deele has quit [Ping timeout: 256 seconds]
<nickjj> workmad3, yep exactly
<nickjj> havenwood, yeah i suppose i could
<nickjj> thanks
rixius has quit [Ping timeout: 255 seconds]
<workmad3> nickjj: your could also just ensure that you have a protocol, and by extension ensure that you have a valid HTTP URL
Sirupsen has quit [Quit: Textual IRC Client: www.textualapp.com]
horsecowdog has joined #ruby
jeramy_s has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<havenwood> DeBot: rstln
<DeBot> ␣␣s␣_␣␣␣s_s␣n␣t␣␣␣r [:-l] 3/12
rixius has joined #ruby
<workmad3> DeBot: #e
<DeBot> ␣␣s␣_␣e␣s_s␣n␣t␣␣er [:-l#] 4/12
<snakeando> horsecowdog where is the hen?
<workmad3> DeBot: Presenter
<DeBot> ␣␣s␣_␣e␣s_s␣n␣t␣␣er [:-l#p] 5/12
<horsecowdog> snakeando: in the coop
<workmad3> hmm...
<workmad3> DeBot: iou
<DeBot> ␣␣s␣_␣e␣s_s␣niti␣er [:-l#pou] 7/12
<workmad3> DeBot: az
<DeBot> ␣as␣_␣e␣s_sanitizer [:-l#pou] 7/12
kirun has quit [Quit: Client exiting]
<havenwood> DeBot: h
<DeBot> hash_␣e␣s_sanitizer [:-l#pou] 7/12
Pupeno has quit [Ping timeout: 265 seconds]
<workmad3> DeBot: ky
<DeBot> hash_keys_sanitizer [:-l#pou] 7/12 You won!
<snakeando> long time ago I used to play with ruby quizz, is there something similar now?
<havenwood> snakeando: I just assumed you were Snakelando Calrissian, the Slytherin administrator of Cloud City.
predator117 has joined #ruby
rixius has quit [Ping timeout: 255 seconds]
ringarin has joined #ruby
<snakeando> havenwood, not snakeando is a snake trying to walk with its feet (ando is walk).
<snakeando> What the best use case for ruby?
<havenwood> snakeando: Programming.
ponga has joined #ruby
<wasamasa> this is getting pretty annoying
<snakeando> Rials?
<snakeando> Rails?
<havenwood> snakeando: #RubyOnRails
<wasamasa> why not kickban this drunk troll and force him to join #ROR
rixius has joined #ruby
<centrx> DeBot, handsanitizer
predator217 has quit [Ping timeout: 252 seconds]
<snakeando> As I am new here, are you in fierceful opposition to ROR?
<centrx> You're drunk
workmad3 has quit [Ping timeout: 252 seconds]
mitchellhenke has quit [Quit: Textual IRC Client: www.textualapp.com]
casadei has quit [Remote host closed the connection]
<snakeando> What kind of things do people here?
wottam has joined #ruby
<snakeando> I can answer any question about programming
<snakeando> in my limited knowledge
Patrezze has joined #ruby
<centrx> We are doing the same thing we do every night: Plan to take over the world.
mengu has quit [Remote host closed the connection]
<apeiros> centrx: what? no?
<apeiros> centrx: we don't do that at night. we do that at five.
<snakeando> Do you think windows will embrace and extinguish linux?
<centrx> crap I'm late
<havenwood> centrx: Eek!
ajpocus has quit [Quit: Leaving]
<centrx> I am sick and tired of these motherfing snakes on this motherfing plane
rixius has quit [Ping timeout: 255 seconds]
Extraterretre has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<snakeando> how do get a fixed point in ruby?
<apeiros> snakeando: see Rational and BigDecimal
stef204 has joined #ruby
<snakeando> do you have something like iterate in clojure
sevvie has joined #ruby
rixius has joined #ruby
<apeiros> is iterate in clojure like Enumerator in ruby?
turtil has joined #ruby
<snakeando> take 100 (iterate (inc i) 0) is like 0...100
<Extraterretre> Hi, quick question, what is the best IRC client for mac? thanks
<havenwood> Extraterretre: LimeChat is nice.
<snakeando> I imagine you can use any function with a fixed point call iterate and then take the first,
<apeiros> Extraterretre: I use limechat. not too happy atm, though. Heard textual was better, but haven't tried yet.
<snakeando> haskell could do something similar.
<Extraterretre> thanks!!
mitchellhenke has joined #ruby
wottam has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lidenskap has joined #ruby
<snakeando> time to go bed (not with ruby)
maximski has quit []
ujihisa has joined #ruby
rixius has quit [Ping timeout: 255 seconds]
Hijiri has quit [Ping timeout: 276 seconds]
snakeando is now known as hardbedbetterwit
<hardbedbetterwit> the better part of the nick was in a precusterian form broken
juanpablo____ has joined #ruby
lewix has quit [Remote host closed the connection]
rixius has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
Hijiri has joined #ruby
akurilin2 has quit [Read error: Connection reset by peer]
akurilin has joined #ruby
jmdade has quit [Quit: Textual IRC Client: www.textualapp.com]
hardbedbetterwit is now known as juliusCaesar
juliusCaesar is now known as juliusCabeza
pontiki has joined #ruby
ferz_ has joined #ruby
juanpablo____ has quit [Ping timeout: 256 seconds]
<juliusCabeza> Suppose you have an array of integers, how do you select a subset whose sum is a given number in ruby?
work_op has quit [Read error: Connection reset by peer]
charliesome has quit [Quit: zzz]
rixius has quit [Ping timeout: 255 seconds]
attamusc has joined #ruby
macoecho has joined #ruby
workmad3 has joined #ruby
markholmes has joined #ruby
rixius has joined #ruby
<c355E3B> juliusCabeza, use select
ponga has quit [Remote host closed the connection]
attamusc has quit [Ping timeout: 245 seconds]
rixius has quit [Ping timeout: 255 seconds]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 252 seconds]
<juliusCabeza> is there a better way to generate some random numbers that this one: 1.upto(20).map {|x| rand(10)}
Extraterretre has left #ruby [#ruby]
<apeiros> juliusCabeza: define better - I prefer Array.new(20) { rand(10) }
<juliusCabeza> ok thats better
dfinninger has quit [Remote host closed the connection]
Pharaoh2_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bim has joined #ruby
bim is now known as Guest13377
<juliusCabeza> a = Array.new(10000) {rand(10)}, is there a subset whose sum is 100?
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
juliusCabeza is now known as SinCabeza
mitchellhenke has quit [Quit: Computer has gone to sleep.]
<havenwood> SinCabeza: Don't change your name if you're awaiting a response. It causes tab-completion fail that hassles folk.
krisquigley has joined #ruby
mitchellhenke has joined #ruby
<wasamasa> it also hassles people who get wrongly tab-completed
Pharaoh2 has joined #ruby
lewix has joined #ruby
RegulationD has joined #ruby
<SinCabeza> changing the nick is funny, but I will try not to do it for you to tab tab tab
ringarin has quit [Ping timeout: 264 seconds]
Guest13377 has quit [Ping timeout: 272 seconds]
rixius has joined #ruby
steven43126 has joined #ruby
<SinCabeza> Can you get a 2d-array with array new, something like Array.new(10){Array.new(10){rand(10)}}, well it works, no question
markholmes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<SinCabeza> How do you transpose a 2d array?
krisquigley has quit [Ping timeout: 240 seconds]
<centrx> SinCabeza, You may want to use Matrix
<apeiros> SinCabeza: with Array#transpose ?
horsecowdog has quit [Remote host closed the connection]
Patrezze has quit [Quit: Saindo]
RegulationD has quit [Ping timeout: 244 seconds]
ta has joined #ruby
<SinCabeza> centrx Matrix is nice, there is tranpose
vim_shimm has joined #ruby
ponga has joined #ruby
<SinCabeza> array.transpose also works, nice
rixius has quit [Ping timeout: 255 seconds]
steven43126 has quit [Ping timeout: 276 seconds]
<SinCabeza> I was going to ask about cross product, but I see there is a Vector class that solve that, nice
ramfjord has quit [Ping timeout: 276 seconds]
<SinCabeza> It seems that google and SO solves many queries easily
Igorshp has joined #ruby
rixius has joined #ruby
<SinCabeza> googling again I found a response blog about my question: http://www.janbussieck.com/subset-sum-problem-in-ruby/
weemsledeux has joined #ruby
pika_pika has quit [Ping timeout: 245 seconds]