thepumpkin has quit [Read error: Connection reset by peer]
thepumpkin has joined #ruby-lang
thepumpkin has quit [Read error: Connection reset by peer]
thepumpkin has joined #ruby-lang
thepumpkin has quit [Read error: Connection reset by peer]
thepumpkin has joined #ruby-lang
thepumpkin has quit [Read error: Connection reset by peer]
thepumpkin has joined #ruby-lang
thepumpkin has quit [Read error: Connection reset by peer]
thepumpkin has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
thepumpkin has quit [Ping timeout: 252 seconds]
bzalasky has quit [Read error: Connection reset by peer]
bzalasky has joined #ruby-lang
thepumpkin has joined #ruby-lang
thepumpkin has quit [Read error: Connection reset by peer]
thepumpkin has joined #ruby-lang
thepumpkin has quit [Read error: Connection reset by peer]
arBmind1 has joined #ruby-lang
thepumpkin has joined #ruby-lang
soba_ has quit [Read error: Connection reset by peer]
thepumpkin has quit [Read error: Connection reset by peer]
thepumpkin has joined #ruby-lang
arBmind has quit [Ping timeout: 264 seconds]
thepumpkin has quit [Read error: Connection reset by peer]
nathanstitt has joined #ruby-lang
bzalasky has quit [Ping timeout: 272 seconds]
thepumpkin has joined #ruby-lang
Newbie0086 has joined #ruby-lang
thepumpkin has quit [Read error: Connection reset by peer]
thepumpkin has joined #ruby-lang
thepumpkin has quit [Read error: Connection reset by peer]
thepumpkin has joined #ruby-lang
woollyams has joined #ruby-lang
thepumpkin has quit [Read error: Connection reset by peer]
thepumpkin has joined #ruby-lang
kurko_ has quit [Quit: Computer has gone to sleep.]
thepumpkin has quit [Read error: Connection reset by peer]
thepumpkin has joined #ruby-lang
Gaelan is now known as GaelanAintAround
aerook has joined #ruby-lang
<aerook>
hey, I'm new to ruby, I have a question: I'm trying to use array.split in conjunction with the " ! " convention for setting the variable from which the method is called to the result of the variable
<aerook>
i cannot seem to make it work
zz_michael_mbp is now known as michael_mbp
thepumpkin has quit [Ping timeout: 264 seconds]
thepumpkin has joined #ruby-lang
<epitron>
is there a faster way to find out if a class has an instance method than Class.instance_methods.include? :methodname
hogeo has quit [Remote host closed the connection]
heftig has quit [Quit: Quitting]
vlad_starkov has joined #ruby-lang
Raycaster has joined #ruby-lang
CoreData has quit [Ping timeout: 240 seconds]
mdedetrich has quit [Ping timeout: 240 seconds]
dingus_khan has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
ichilton_ has left #ruby-lang [#ruby-lang]
gianlucadv has joined #ruby-lang
Guedes0 has joined #ruby-lang
Guedes0 has quit [Client Quit]
dingus_khan has quit [Ping timeout: 245 seconds]
Guedes has joined #ruby-lang
Voker57 has joined #ruby-lang
thepumpk_ has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
thepumpk_ has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
adambeynon has joined #ruby-lang
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
Cakey has joined #ruby-lang
gianlucadv has quit [Ping timeout: 260 seconds]
gianlucadv has joined #ruby-lang
sol has joined #ruby-lang
sol is now known as Guest54680
x0f has quit [Ping timeout: 264 seconds]
jc1arke has quit []
sepp2k has joined #ruby-lang
john_____ has joined #ruby-lang
john_____ has left #ruby-lang [#ruby-lang]
benlovell has quit [Ping timeout: 252 seconds]
benlovell has joined #ruby-lang
mdedetrich has joined #ruby-lang
x0f has joined #ruby-lang
jc1arke has joined #ruby-lang
Oak has quit [Remote host closed the connection]
mucker has joined #ruby-lang
simoz has quit [Ping timeout: 272 seconds]
h_kon has quit [Remote host closed the connection]
h_kon has joined #ruby-lang
h_kon has quit [Read error: Connection reset by peer]
h_kon has joined #ruby-lang
ldnunes has joined #ruby-lang
MaddinXx has joined #ruby-lang
ljarvis has quit [Remote host closed the connection]
arBmind has joined #ruby-lang
arBmind1 has quit [Ping timeout: 265 seconds]
Jadenn| has joined #ruby-lang
Jadenn| has left #ruby-lang [#ruby-lang]
Jadenn has joined #ruby-lang
simoz has joined #ruby-lang
simoz2 has joined #ruby-lang
<Jadenn>
good morning, i'm have a question about ruby. I come from PHP and am moving to ruby, and many code snippets ive seen seem to be able to require files without using their extension (like .rb) and just call "require 'myfile'". I can't seem to get this to work, all I get is a load error
<yorickpeterse>
if you're loading local files use require_relative
<yorickpeterse>
or `require './some_file'`
<yorickpeterse>
`require` looks for potential paths to search in $LOAD_PATH
<workmad3>
yorickpeterse: don't use "require './some_file' "
<yorickpeterse>
the "." directory is not in there
<workmad3>
unless you like your requires to be dependent on your CWD :(
simoz has quit [Ping timeout: 244 seconds]
<r0bglees0n>
i hate to use require "./…" as well, but sometimes "basepath cannot be infered"
<r0bglees0n>
i'll always try to use require_relative first
<workmad3>
r0bglees0n: yeah... it's called IRB :)
<Jadenn>
im confused as to how all these other scripts can call it like that without any apparent configuration
<r0bglees0n>
yeah, but even other stuff does it too iirc
<r0bglees0n>
like gem build
<workmad3>
Jadenn: generally because they're using something like rubygems and that manipulates the $LOAD_PATH variable for you
<r0bglees0n>
Jadenn: there is a variable called $LOAD_PATH which ruby scans for the file you're trying to require.
<r0bglees0n>
it is inferred from build time configuration, and even rubygems, but that's not important for you right now
<Jadenn>
so what is the best way for me to require files, then?
<r0bglees0n>
with require, or require_relative.
lun___ has joined #ruby-lang
solars has quit [Read error: Operation timed out]
Cakey has quit [Ping timeout: 272 seconds]
<Jadenn>
so i shouldn't be doing require './file'?
<r0bglees0n>
$LOAD_PATH does not contain ".", as yorickpeterse said, so you cannot use require with paths relative to "." (at least on ruby 1.9)
<workmad3>
Jadenn: depends on what exactly you're setting up... if you're creating an application completely from scratch, you'll likely want to have a startup script that adds a 'lib/' path to your $LOAD_PATH
<workmad3>
Jadenn: if you're using something like rails, you shouldn't need to do that, as rails adds lib/ to your load path
<r0bglees0n>
workmad3: meh dont do that
<r0bglees0n>
just use require_relative instead of a push to $LOAD_PATH
<workmad3>
r0bglees0n: eww, no
lun__ has quit [Ping timeout: 244 seconds]
<Jadenn>
i just started with ruby yesterday, im hardly going to be using frameworks
<workmad3>
r0bglees0n: that ties two files together nastily in your file system
<workmad3>
r0bglees0n: they need to stay in *exactly* the same positions to each other, relatively, otherwise breakage
<Jadenn>
it simple requies the file name and it works
<Jadenn>
i cant get it to though.
<yorickpeterse>
Yeah great fucking idea right there, lets bastardize $LOAD_PATH because heaven forbid file A requiring an explicit path
<yorickpeterse>
How many times do you actually move all those files around?
<r0bglees0n>
workmad3: that's not very pratical at a glance, since they're relative to "lib" in your example, and the relative paths (mylib/foo) will be the same in require, or require_relative
<yorickpeterse>
Jadenn: just use require_relative and ignore the pedantics, it will save you time
<workmad3>
r0bglees0n: yes, but with require you only fix one file, not two
<Jadenn>
thanks
<Jadenn>
must be because im using ruby 2.0.0 and this article is 1.9
<r0bglees0n>
workmad3: not really? the paths are the same either way, if i move any file i need to update the paths
<yorickpeterse>
Jadenn: the "." change was made from 1.8 -> 1.9
<workmad3>
r0bglees0n: with 'require', you only need to update the path if you change the path of the file you're requiring
<r0bglees0n>
workmad3: i'm sorry, but even without understanding this further, i'm never going to agree
<workmad3>
r0bglees0n: with 'require_relative' you need to update the path if you change the path of the file you're requiring *or* the path of the file it's in
<yorickpeterse>
ddfreyne: HEY, YOU WORK AT SOUNDCLOUD RIGHT?
<r0bglees0n>
note to self: run yorickpeterse through downcase!
<yorickpeterse>
ddfreyne: submit patch that changes the sound button at the top right, every time I wreck my ears when I click it thinking that it just shows up the volume bar
simoz2 has quit [Ping timeout: 245 seconds]
<Jadenn>
bahaha
<yorickpeterse>
instead of turning it to 100%
mucker has quit [Remote host closed the connection]
<yorickpeterse>
r0bglees0n: I am immutable
<yorickpeterse>
so good luck with modifying self
<workmad3>
yorickpeterse = yorickpeterse.downcase
dingus_khan has joined #ruby-lang
<yorickpeterse>
hey I'm not that locally scoped
<r0bglees0n>
lol
<workmad3>
yorickpeterse: you look like a local variable to me ;)
<yorickpeterse>
pretty sure I'm a global one
<workmad3>
yorickpeterse: no $
<yorickpeterse>
or at least equally annoying
Guest54680 has quit [Ping timeout: 264 seconds]
datanoise has joined #ruby-lang
<Jadenn>
yeah, the $ thing threw me for a loop, coming from php
<r0bglees0n>
$ denotes a global variable
<r0bglees0n>
in ruby
elia has quit [Quit: Computer has gone to sleep.]
<Jadenn>
yeah
ljarvis has joined #ruby-lang
<workmad3>
yorickpeterse: also, to resist being reassigned, you'd need to be Yorickpeterse anyway... then you'd at least throw a warning with -W1 :)
<yorickpeterse>
more like YORICK_PETERSE
m0t has joined #ruby-lang
solars has joined #ruby-lang
<r0bglees0n>
shouldnt have done that
<workmad3>
yeah, that would be more idiomatic... but the Y is the only bet that was needed :)
<r0bglees0n>
in ruby you can be reassigned
<yorickpeterse>
<injekt> m8 ill reassign yur face
<r0bglees0n>
ive lost all my english charm slang
m0t has quit [Client Quit]
h_kon has quit [Remote host closed the connection]
<r0bglees0n>
dont know what tyneside is but i know it made that perfect
mikecmpbll has joined #ruby-lang
<ljarvis>
r0bglees0n: up north
<r0bglees0n>
ah
<ljarvis>
aka geordies
<r0bglees0n>
i know geordies ya :)
<ljarvis>
i keep breaking the internet
<r0bglees0n>
i wondered why my net was going out all the time
<ljarvis>
my bad
<r0bglees0n>
np
<ljarvis>
i wrote an api in go and mother of god does it take up 0 memory
<r0bglees0n>
:)
mucker has joined #ruby-lang
lun___ has quit [Ping timeout: 245 seconds]
[spoiler] has joined #ruby-lang
<r0bglees0n>
ljarvis: not to say Go isn't superb to do that, but I think Rails dirties the glasses when looking at stuff like this
<r0bglees0n>
im pretty sure webmachine-ruby could be as sustainably light too
marr has quit [Ping timeout: 245 seconds]
elia has joined #ruby-lang
vondruch has joined #ruby-lang
<[spoiler]>
r0bglees0n: Oh I've never seen webmachine-ruby before. It looks pretty cool
<r0bglees0n>
it is awesomesauuuuce
<r0bglees0n>
it fits very well for me at least
<ljarvis>
r0bglees0n: I have a sinatra ruby api too which is also very good with memory, i'm in no way comparing it to rails, go still shoots it out of the park in general, though
<ljarvis>
especially when you have multiple workers
<r0bglees0n>
yeah, sure, but ruby on the web is often judged by rails, which encourages monolithic applications that arent easily distributed or decomposed
<ljarvis>
but, that's not really much of a surprise
<r0bglees0n>
plus the stack is hella big
<ljarvis>
agreed
<ljarvis>
the api im building is relatively small (~80-100) routes so it's fairly succint, no need for something like rails anyway
<ljarvis>
succinct*
<r0bglees0n>
my model is going towards (ruby) services with HTML/JS frontends that don't live with the services at all
<r0bglees0n>
i say (ruby) because ruby isnt neccesary
<r0bglees0n>
it could be Go
<ljarvis>
yeah, i cannae stand js
<r0bglees0n>
its pretty cool for what you can do with it
<ljarvis>
oh totally, i just dont want to do anything with it, i leave that to people who dont want to strangle their family when they write it
<[spoiler]>
The onlt benefit I see in Rails is ActiveRecord, which can be used outside of Rails anyway
<ljarvis>
heh
<r0bglees0n>
yeah, AR is pretty good generally
soba has quit [Ping timeout: 245 seconds]
<r0bglees0n>
im not sure id use it outside rails though
<ljarvis>
I have done, sometimes use sequel though
<[spoiler]>
I mean I like Rails too, but it's usually too heavy for what I need
<[spoiler]>
or requires me to dig too much through documentation/source to accomplish something
<r0bglees0n>
its probably way too heavy for most people, it doesn't encourage you to build a stack of what you need
<ljarvis>
the rails rumble perfectly describes what rails is good for
elia has quit [Quit: Computer has gone to sleep.]
<r0bglees0n>
its heavy by default, you can strip it down but in practice it doesnt often happen outside /api
<ljarvis>
building a decent webapp in very little time
<r0bglees0n>
yep
<r0bglees0n>
its very good at that
<r0bglees0n>
but you cant be a startup forever
<ljarvis>
yeah, i think rails is perfectly fine for beyond that though, but it takes a hell of a lot of custom configuration and work
<[spoiler]>
I find it faster to build a webapp in sinatra than Rails
<ljarvis>
just like.. well, anything else
<ljarvis>
[spoiler]: sure when it's basic
<r0bglees0n>
ljarvis: thats true too, but my problem is it doesn't leave room for the model id like (distributed, decoupled services)
<ljarvis>
heh
<r0bglees0n>
no rails application is built like that, it's not encouraged, and it's not thought of
<yorickpeterse>
this channel just became double brit (yeah bit late had lunch w/e)
<[spoiler]>
ljarvis: even when it's not simple, actually. I just always sepend a lot of time looking for "the rails way" of doing shit in rails, and with sinatra I just do it however the jolly fuck I want (not sure why I'm so concerned with doing stuff the Rails way when using rails)
<ljarvis>
[spoiler]: right, because presumably you're a beginner (for lack of a better word). I can build a pretty good webapp prototype in no time in rails, it'll take me a little longer with sinatra because I'll have more work to do (that's a fact)
tbuehlmann has quit [Ping timeout: 264 seconds]
<ljarvis>
(beginner with rails)*
<mikecmpbll>
i built a pretty cool api in sinatra once, for the persistence layer of a backbone app
elia has joined #ruby-lang
<r0bglees0n>
ljarvis: you don't need a bloated stack to prototype fast, you need tools to support a mode of development(SoA,monolithic)
<ljarvis>
sinatra is awesome for apis, grape is even better
<mikecmpbll>
like three route methods
<mikecmpbll>
for update, create and delete
<ljarvis>
r0bglees0n: right, which rails provides
<yorickpeterse>
man I have such a perfect video related to grapes
<r0bglees0n>
yep
<r0bglees0n>
but its not neccesary
<yorickpeterse>
but I'm pretty sure it will get me banned from this channel
<yorickpeterse>
ljarvis: when you're in this shitty country we need to hack some code
<yorickpeterse>
errr I mean rage at the gym
<ljarvis>
agreed
DouweM has joined #ruby-lang
breakingthings has joined #ruby-lang
toretore has joined #ruby-lang
<banisterfiend>
vpretzel 50% of my team is on emacs (the cool ones)
tbuehlmann has quit [Quit: Konversation terminated!]
<vpretzel>
Haha cool - I just haven't ever even dabbled in emacs
<ljarvis>
0% of my team is on emacs
<vpretzel>
I'm not even sure if anyone in my old company even was on it, ~150 developers
<vpretzel>
it being emacs of course
<yorickpeterse>
banisterfiend: how many of those have active RSI issues?
<vpretzel>
vi guys for ruby
DouweM has quit [Read error: Connection reset by peer]
<banisterfiend>
yorickpeterse i don't know why people say that about emacs, seems vim would have more of an issue with that being that the 'escape' key is so often pressed (seems really stupid one of the most common key bindings is so far away from the rest of the keys..)
pumper has quit [Remote host closed the connection]
<banisterfiend>
yorickpeterse anyway i'm on an MBA 11", nothing is really a stretch :)
<vpretzel>
banisterfiend: many vi experts bind their caps lock key for that very reason
<yorickpeterse>
banisterfiend: that's true, but you can also use ctrl+{
<darix>
the pros edit their code with microsoft word.
<yorickpeterse>
which is less retarded
elia has quit [Quit: Computer has gone to sleep.]
<vpretzel>
then again i've got mega-hands so esc isn't THAT far away
<oddmunds>
i use jj to exit INSERT mode
<oddmunds>
C-c can also be used
<oddmunds>
(out of the box)
<oddmunds>
I've been coding in Eclipse for the last few days and i'm starting to get claustrophobic
<darix>
oddmunds: no emacs or vim mode plugin for eclipse?
tdm00 has joined #ruby-lang
<oddmunds>
yeah, there are
<oddmunds>
i just havent gotten so far yet
<oddmunds>
i try not to tweak my editor all day
<oddmunds>
stuff i did today: get a "color theme" (pathetically only works in the editor window) and install mousefeed (a plugin that tells you the key bindings for anything you attempt to do from a menu)
hogeo has joined #ruby-lang
<yorickpeterse>
y u use eclipse
<yorickpeterse>
it's the wurst
<banisterfiend>
yorickpeterse he's a java programmer ;)
<oddmunds>
i'm using eclipse because i haven't coded in java for 100 years and that's what the senior dude is using
<yorickpeterse>
banisterfiend: oooooh dear
<Jadenn>
god help you :P
elia has joined #ruby-lang
<oddmunds>
so in the beginning i'd rather mirror his setup
<oddmunds>
hah
<oddmunds>
it's not so bad
<oddmunds>
this project is mainly just deleting stuff
shinnya has joined #ruby-lang
mucker has joined #ruby-lang
datanoise has joined #ruby-lang
<yorickpeterse>
you don't need Eclipse for that
<yorickpeterse>
just rm -rf ./*
<oddmunds>
thanks
<yorickpeterse>
:>
<yorickpeterse>
maybe there's even a maven task for it!
<nXqd>
I meant, when Ruby starts, there will be a Class object to be created. Many can inherit from them, but itself is the only one. Do I understand it correctly ?
<apeiros>
uh, eval-in_ broken?
<nXqd>
from it*
<ljarvis>
apeiros: ya
<ljarvis>
since forever
* ljarvis
shakes fist at charlie
<x0f>
apeiros, lemme help out ;) # [Class, Class, Class, Class]
<apeiros>
nXqd: gotta go - for short: singleton pattern means a class has only a *single* instance
<apeiros>
and the singleton object of it is that instance
<apeiros>
and Class is an instance of Class - and as you can see, there are *plenty* of instances of Class around - so NO, it's not a singleton object.
<nXqd>
got it.
<apeiros>
(every class in ruby is an instance of Class)
* apeiros
off
<nXqd>
apeiros: [ are you off ... ] I have another question ...
mdedetrich has quit [Quit: Computer has gone to sleep.]
<ljarvis>
nXqd: ask away there's other people here
<nXqd>
btw, when a new Class is created in ruby. It will allocate the whole memory included all the Class object methods or it just creates a class, whenever we call a method belonging to Class object, it just send a message to Class object ?b
tkuchiki has quit [Remote host closed the connection]
slyphon has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse>
also yay for ElasticSearch fuckups
<yorickpeterse>
corrupt DB
<nXqd>
yorickpeterse: yeah, it's like you die, you want to die in a technical way ...
<ruby-lang355>
nXqd: yes it has: Module.new.class_eval {}
<apeiros>
nXqd: class_eval and module_eval exist, and both are identical
<nXqd>
wow ... is it just confused ?
<apeiros>
Class is a subclass of Module. the whole "I can have instance methods" thingy is from Module.
<apeiros>
no, it's a child :)
<apeiros>
oh, a parent actually
solars has quit [Ping timeout: 272 seconds]
Snibble has joined #ruby-lang
Voker57 has quit []
<nXqd>
yeah but still, .. I just feel it wrong. Can we just design a multiple module and include specific ones to class ? My humble opinion
<nXqd>
mixins* I meant in this case.
<apeiros>
o0
<ljarvis>
I believe the word you're looking for is
<ljarvis>
wat
<nXqd>
...
<apeiros>
I thought of `eh?`
<ljarvis>
that works too
<apeiros>
maybe we spoke about different things - at least I don't see the connection between the name `class_eval` and what he said :-|
<nXqd>
because I see Module.class_eval ... The class_eval is there because it's included in Class object.
<ljarvis>
no
<ljarvis>
it's not in the Class class
<ljarvis>
well, it is.. but not directly
<ljarvis>
it's an instance method of Module
<ljarvis>
jsut to confuse things
* yorickpeterse
popcorn
bzalasky has quit [Remote host closed the connection]
<ljarvis>
the Class class of Module class classes Class module Module Class class
<x0f>
...class
<yorickpeterse>
basecamp
bzalasky has joined #ruby-lang
yfeldblum has joined #ruby-lang
<apeiros>
fu?
<apeiros>
nXqd: Module is a class. Class is a Class. The class `Class` inherits from the class `Module`.
<apeiros>
i.e., it's class `Class < Module; …`
<nXqd>
yeah how about BaseModule ( which has module_eval ) and ClassModule ( which has class_eval ) and then in class you can include these two. And in new Module, it just include that BaseModule which doesn't have class_eval to confuse people [ yeah maybe just me ... ]
<apeiros>
and for that reason, they simply didn't bother to only "rename" the method in Class. It simply exists in both places.
<apeiros>
nXqd: it's not "one has X the other has Y", both have both.
<apeiros>
Class has both module_eval and class_eval
<apeiros>
Module has both module_eval and class_eval
<apeiros>
those methods are *identical*
<apeiros>
`BaseModule which doesn't have class_eval` <- wrong
<nXqd>
can you tell me what's wrong ?
<apeiros>
the statement is false. BaseModule has class_eval.
* ljarvis
pulls up a chair next to yorickpeterse
<apeiros>
as stated for like 5 times now.
<apeiros>
and ruby-lang355's issue wasn't about the name of that method anyway.
<apeiros>
his issue was that including modules in modules will not affect classes which had that module included.
<x0f>
..which is understandable.
<apeiros>
(or at least that's what I gathered from glancing over his gist)
solars has joined #ruby-lang
<nXqd>
apeiros: yeah, I know. I talked about my opinion about the class_eval method in Module, not about his problem ...
bzalasky has quit [Ping timeout: 272 seconds]
<apeiros>
nXqd: good. then your assertion makes no sense. all modules have class_eval. all modules have module_eval. there is no "BaseModule which doesn't have class_eval" (unless you explicitly remove it…)
<nXqd>
the BaseModule in my case, in the case that I had a chance and power to redesign the language :v
<apeiros>
o0
<apeiros>
ok
<nXqd>
because it makes no sense that I create BaseModule and then it already a Module and of course it has class_eval
<apeiros>
…
<nXqd>
...
<apeiros>
what is your problem exactly?
<nXqd>
being too curious
banisterfiend has quit [Quit: Computer has gone to sleep.]
<nXqd>
and opnionated
yfeldblum has quit [Remote host closed the connection]
* nXqd
off for a bow of rice and chicken
<apeiros>
ok, that's nothing which can be solved with an explanation.
<apeiros>
good appetite
yfeldblum has joined #ruby-lang
<apeiros>
hm, no, what was the english formulation for that again?
<apeiros>
enjoy your meal?
CoreData has joined #ruby-lang
<x0f>
guten appetit ;)
rwk1 has joined #ruby-lang
mucker has joined #ruby-lang
<nXqd>
yes, cooking :D
yfeldblum has quit [Ping timeout: 240 seconds]
bzalasky has joined #ruby-lang
<nXqd>
if you come from another language and you try to learn ruby. What are the top 5 important things you should learn about ruby ?
<yorickpeterse>
welp, finally shipped a fucking new version after a month or so of one of our $BIG_PROJECTS
<yorickpeterse>
we're so bad at planning
<yorickpeterse>
"Lets release it this Thursday!" - 2 weeks later: "Lets release it next Thursday!"
<whitequark>
mental note: don't go work with yorickpeterse ;)
<nXqd>
yorickpeterse: haha it happens all the time :D
Snibble has quit [Quit: Leaving.]
imperator3 has quit [Ping timeout: 265 seconds]
CoreData has quit [Ping timeout: 240 seconds]
flip_digits has joined #ruby-lang
<yorickpeterse>
whitequark: hey I'm not in charge of planning
<ljarvis>
thank god AMIRITE
<yorickpeterse>
well I more or less am but w/e
Snibble has joined #ruby-lang
<yorickpeterse>
I've been moving these two things to every next Friday for a month or so
<yorickpeterse>
granted they're small things, but still
ruby-lang355 has quit [Ping timeout: 250 seconds]
bzalasky has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
yfeldblum has joined #ruby-lang
<imperator>
looks like RF mailing lists are working again, yay
<ljarvis>
you know RF is going to be EOL right?
vpretzel has quit [Remote host closed the connection]
<imperator>
says who?
vpretzel has joined #ruby-lang
bzalasky has quit [Ping timeout: 244 seconds]
<ljarvis>
maybe i dreamed it
<ljarvis>
could have sworn someone did but can't find it
<apeiros>
RF?
<imperator>
RubyForge
CaptainJet has joined #ruby-lang
<yorickpeterse>
PUSH TO PRODUCTION
<yorickpeterse>
GET ERRORS
<yorickpeterse>
YAY
<imperator>
it's probably your fault
<ljarvis>
seconded
<yorickpeterse>
it actually is
sevvie has joined #ruby-lang
Snibble has quit [Quit: Leaving.]
Mon_Ouie has quit [Ping timeout: 265 seconds]
<yorickpeterse>
pretty sure I'm the #1 with the most broken builds here
<apeiros>
good thing nobody counts…
bjh13 has joined #ruby-lang
<yorickpeterse>
Good thing Jenkins does
<apeiros>
ah, I thought in *here*
<apeiros>
but you meant "here"
<ljarvis>
apeiros: jokes on you, i count
<ljarvis>
426 so far
<apeiros>
you certainly don't count :-p
<ljarvis>
since this morning
<apeiros>
;-) j/k
<ljarvis>
zinnggg
<ljarvis>
oh you
<yorickpeterse>
I also fix builds
<ljarvis>
"I fix everything I break"
<yorickpeterse>
" JENKINS_RUBY_VERSION=2.0 #62 "Use the "name" field for survey listings. - Yorick Peterse": SUCCESS " see?
<yorickpeterse>
granted it failed the previous time because RubyGems crapped out
thelorax123 has quit [Remote host closed the connection]
thelorax123 has joined #ruby-lang
<nXqd>
what do you prefer : def initialize(opts ={}); @a1 = opts[:a1]; @a2=opts[:a2]; @ end and def initialize(a1,a2,a3); @a1 = a1; @a2 = a2; @a3 = a3; end
robbyoconnor has quit [Ping timeout: 272 seconds]
arBmind has quit [Quit: Leaving.]
vsorlov has joined #ruby-lang
lfox has joined #ruby-lang
hahuang65 has quit [Ping timeout: 252 seconds]
<ljarvis>
they're not really comparable imo
banisterfiend has joined #ruby-lang
<ljarvis>
so I'll say the latter
dhruvasagar has joined #ruby-lang
sepp2k has joined #ruby-lang
saarinen has joined #ruby-lang
DouweM has joined #ruby-lang
jhulten has joined #ruby-lang
havenwood has joined #ruby-lang
CoreData has quit [Ping timeout: 240 seconds]
cirwin has joined #ruby-lang
kek has quit [Remote host closed the connection]
Snibble has joined #ruby-lang
iliketurtles has joined #ruby-lang
saarinen has quit [Read error: Connection reset by peer]
rwk1 has quit [Remote host closed the connection]
saarinen has joined #ruby-lang
rwk1 has joined #ruby-lang
arBmind has joined #ruby-lang
deception has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 272 seconds]
mbj has left #ruby-lang [#ruby-lang]
vlad_starkov has quit [Remote host closed the connection]
jxie has joined #ruby-lang
jxie_ has quit [Read error: Connection reset by peer]
RickHull has joined #ruby-lang
rwk1 has quit [Ping timeout: 244 seconds]
Cakey has quit [Ping timeout: 272 seconds]
herpless has quit [Quit: Connection closed for inactivity]
bzb has joined #ruby-lang
io_syl has joined #ruby-lang
datanoise has quit [Ping timeout: 272 seconds]
cirwin has quit [Ping timeout: 240 seconds]
saarinen has quit [Read error: Connection reset by peer]
<big_>
I'm applying for a junior role and this is part of the interview process. It's a little beyond me - would it be wrong to use a gem like rubygems.org/gems/parseconfig
<jaimef>
so looping over hundreds of hosts and getting a numeric value for each and want to easily find the unique ones. the outliers. as they should all be the same. within a loop what is the best way to accumulate these to find that? foo = {}; hosts.each {|h,value| foo << { h.to_sym => value} } foo.uniq ?
yfeldblum has joined #ruby-lang
dingus_khan has quit [Remote host closed the connection]
dingus_khan has joined #ruby-lang
iliketurtles has quit [Quit: zzzzz…..]
<ljarvis>
big_: sounds like they want you to build it
<ljarvis>
jaimef: use a set
<ljarvis>
oh you still want to store dups but want to count unique ones?
Jeticus has joined #ruby-lang
<big_>
ljarvis: I thought so too, but I asked them a question about it and they replied "The best guidance is to tackle it in the way you believe to be the most efficient. More interested in how you tackle it than anything else."
Jeticus has quit [Read error: No route to host]
<jaimef>
ljarvis: thanks
<ljarvis>
big_: right, then do that, if that means use a library then go for it, with that explanation, you can't really go wrong
gianlucadv has quit [Ping timeout: 260 seconds]
thisirs has quit [Read error: Connection reset by peer]
loincloth has joined #ruby-lang
Jeticus has joined #ruby-lang
<ljarvis>
jaimef: if you want to efficiently track unique values you should use a counter
<jaimef>
k
<big_>
ljarvis: thanks for your help!
<jaimef>
was thinking sort uniq, just derereferencing it
<ljarvis>
jaimef: that's fine, but it wont be effecient over 'hundreds of hosts'
<jaimef>
true
<jaimef>
ljarvis: thanks
<ljarvis>
but if you dont need that, no point in complicating it, go for .uniq
yfeldblu_ has joined #ruby-lang
<jaimef>
yeah. </bash>
yfeldblum has quit [Read error: Connection reset by peer]
dingus_khan has quit [Ping timeout: 268 seconds]
CaptainJet has quit [Ping timeout: 260 seconds]
jessie5543 has quit [Quit: Leaving]
rue|w has quit [Ping timeout: 260 seconds]
Jeticus has quit [Read error: Connection reset by peer]
Kabaka has quit [Ping timeout: 240 seconds]
MrZYX is now known as MrZYX|off
vlad_sta_ has joined #ruby-lang
vlad_sta_ has quit [Remote host closed the connection]