apeiros changed the topic of #ruby to: Ruby 2.0.0-p247: http://ruby-lang.org (Ruby 1.9.3-p448) || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
Blaster has joined #ruby
<funburn> that's starting to seem a little circular
<Blaster> is this a good place to ask design pattern questions?
<shevy> Blaster I dont think many ruby guys here care much about design patterns, mostly when it works, it ought to be fine
<Blaster> i am just wondering if its ok to use factory pattern to create a collection of objects
<Blaster> or is there a better way
tjbiddle has quit [Ping timeout: 264 seconds]
<shevy> I dont even know what a "factory pattern" is
<volty> the universe is infinite and there are infinite ** infinite possible ways and paths ....
<patrikf> Blaster: you need to give more context for this question to be answered...
<ykk`> use the force
<shevy> MrZYX do you often use factory patterns in your code?
elux has quit [Quit: Bye!]
<MrZYX> I might if I've to do a bigger java project in the next semester
<MrZYX> we'll see
<shevy> ack
taternuts has joined #ruby
<ykk`> a factory pattern doesn't sound pretty =(
<Blaster> I have 2 different types of objects but I need to create a common interface between them and then order and sort them. Like a factory adapter pattern
DonRichie has quit [Ping timeout: 264 seconds]
<shevy> ok so three classes
end_guy has quit [Ping timeout: 240 seconds]
DonRichie has joined #ruby
<Blaster> I have Categories and Ads but I need them to both turn into Preview classes so my views can iterate over them and show previews of both categories and ads mixed together
<volty> voluntary student of my friend here? :)
<MrZYX> Blaster: sounds like a job for the presenter pattern actually
<Blaster> oh really
<volty> why don't you just implement what you need?
<MrZYX> sure, just make two presenters with the same interface
<Blaster> volty: Because I don't want to reinvent the wheel
<MrZYX> ruby doesn't care about the types, it only cares about the methods being there
<volty> Blaster: if you know the wheel you wouldn't have asked :)
<MrZYX> so if you make two classes that provide the same methods you can just mesh them together into a collection as you like
<funburn> voty: MrZYX: thanks a ton for those refactor tips. I think I'm going with volty's because I can understand it and it's similar to what I was working out on my own, but I'm going to study MrZYX to maybe improve my understanding of Ruby. Thanks again!
jamesaanderson has joined #ruby
<volty> funburn: yw
<patrikf> Blaster: so where does the need arise to use a factory?
<Blaster> MrZYX that sounds like a good solution
<shevy> when I read "funburn", my brain translates this into funbear ... I think I need to sleep soon...
<bnagy> funburn: that's not a refactor, that's turning readable code into vomit
peregrine81 has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
randomautomator has quit [Ping timeout: 240 seconds]
<Blaster> patrikf: I don't know actually, I guess I just really want to use some patterns
<funburn> bnagy, awesome input! whatever the end result it taught me something new
<apeiros> in ruby, even classes use the factory pattern :-p
<bnagy> hooray for learning :/
snovak has joined #ruby
<volty> i think that bluster read something about creating another class just for using his classes (as adapter) without changing this implementation of his 2 base classes to satisfy the interface requimentes
mrsolo has quit [Quit: This computer has gone to sleep]
<Blaster> probably true
<volty> kind of a proxy
<volty> could be
<shevy> right
<Blaster> is it bad to hard code the creation of a new object within an object?
<shevy> like in a big office where one guy delegates to another until at the end of the day noone knows what happened
<shevy> Blaster when you write ruby, you do that all the time
<shevy> x = "foo" <--- that is a new string object
<volty> Blaster: such questions only to your priest ! :)
<funburn> MrZYX: can you point me at some doc that explains this leading . syntax?
<patrikf> as always, it depends on what you're trying to achieve...
<pontiki> lol, volty
<shevy> Blaster typically, you use a method from one class to instantiate an object from another class, like: def foobar(i = Bar.new) <--- here the default first argument will be a new instance of class Bar, if one omits the argument
mansi has quit [Ping timeout: 264 seconds]
<Blaster> I think I am trying to make my solution much too perfect for my problem
<funburn> it's kind of sexy
<volty> funburn: just on separate lines // the usual dot for methods
<MrZYX> funburn: there's nothing special to it, just chained method calls, like foo.bar.baz, except with added newlines for readability. You could also put the dot at the end of each line
<shevy> good
snovak has quit [Ping timeout: 240 seconds]
<shevy> Blaster you are ripe for management job
<Blaster> why's that?
<funburn> nice! I'm going to start using that, it's easy to read/understand
<shevy> if it is too simple, ask management for a more complex solution
baroquebobcat has quit [Quit: baroquebobcat]
<Blaster> shevy: how do you determine when you're overengineering a problem
cads2 has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
<pontiki> if you're asking the question, you have
<volty> Blaster: headache
<volty> ?
<pontiki> if you're not asking the question, you did 3 days ago
<Blaster> ah
colonolGron has quit [Quit: Lost terminal]
<Blaster> im always trying to make my code too perfect, it wastes so much time
<Blaster> I just want to tackle each problem as elegantly as possible
vlad_starkov has joined #ruby
<apeiros> there's elegance in pragmatism
<bnagy> weight simplicity as an element of perfection
vlad_starkov has quit [Remote host closed the connection]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<volty> Blaster: (and the others like), exercise perfection on cook code, snippets etc // on working code, instead, always brute force
brunoro has quit [Quit: WeeChat 0.3.8]
<patrikf> funburn: I came in late, but here's my take (also untested): http://pastebin.com/U80pSsjb
<Blaster> volty: brute force solution?
<Blaster> it becomes harder to maintain later then
<taternuts> Blaster: keep iterating 'til it works and your confident enough to leave it behind
<volty> you cannot have the bottle full and your wife drunk ...
end_guy has joined #ruby
<Blaster> complicated problems...
<volty> it's like with a spoken language -- talent + (past) studies
<funburn> patrikf: I like this approach too. thanks!
<pontiki> oh wow, i'ma steal that, volty
<funburn> i'm still mystified by this :+
<patrikf> funburn: it's just a symbol, like :to_s or :other_symbol
<volty> funburn: you apply sum to all the elements
<volty> equiv. to inject { |t, el| t + el }
<patrikf> funburn: 1 + 2, for ruby, is really like calling the method "+" on the object "1". so if the &:correct doesn't mystify you, :+ shouldn't either
<funburn> I'm not familiar with &:correct either :(
ehc has quit [Quit: ehc]
<Blaster> if I have a collection of objects and I want to decorate them all, do I just iterate over them and add the extra behaviors?
<patrikf> .select(&:correct) == .select{|x|x.send(:correct:)} == .select{|x|x.correct}
<fryguy> Blaster: you could do it at class level too potentially
<Blaster> the classes are the activerecord objects
gyre007 has joined #ruby
<funburn> okay, I get that in an "i'm going to be puzzled in a minute" kind of way
simoz has joined #ruby
<volty> pity you can call only methods without parameters
maletor has quit [Quit: Computer has gone to sleep.]
<funburn> so weights.inject(:+) just sums up all the weights?
<patrikf> yep.
<funburn> perfect, I think I can retain this concept. thanks for taking the time to explain it out
<patrikf> volty: really? I never needed that before.
werdnativ has quit [Ping timeout: 260 seconds]
gyre007 has quit [Remote host closed the connection]
<volty> i did, though can't remember now where // but i'm not the right customer - quite hard to please
<volty> @patrikf
<bnagy> it would be great
dankest has quit [Quit: dankest]
<patrikf> well, yeah, coming to think of it I've used blocks calling methods with arguments numerous times... it just doesn't strike me as something where the block is too tedious too write I guess.
<bnagy> [1,17,25].map(&:to_s,16)
<bnagy> etc
<volty> i remember i was doing that in c++ with function templates and the like - but too much time passed by
simoz has quit [Ping timeout: 240 seconds]
<patrikf> bnagy: true. the block version is more readable though since that's how you're used to see methods invoked
osvico has joined #ruby
simoz has joined #ruby
lkba has quit [Ping timeout: 260 seconds]
<bnagy> the block version is always more readable
Levin_22 has quit [Quit: Levin_22]
<patrikf> yes, but it's a bigger step from methods with arguments to another syntax than from methods without arguments. anyway, this is highly subjective
<volty> let's say something trivial, you want to split, or match, or scan an array of lines and pass the regexp
aeontech has joined #ruby
<volty> (instead of changing the default field separator - or something more complicated)
zorg24 has quit [Ping timeout: 264 seconds]
<volty> lines(&:split, /aa/) is quite readable, isn't it?
_bart has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
mlpinit has joined #ruby
funburn has quit [Quit: funburn]
<volty> (.map)
agjacome has quit [Ping timeout: 264 seconds]
funburn has joined #ruby
mary5030 has joined #ruby
jamesaanderson has joined #ruby
<volty> how do I create an instance variable on a singleton (without creating a method)?
yfeldblum has joined #ruby
snovak has joined #ruby
huoxito has quit [Quit: Leaving]
mlpinit has quit [Ping timeout: 256 seconds]
<bnagy> instance_variable_set
mrsolo has joined #ruby
<patrikf> that sounds wrong
<patrikf> volty: you know attr_writer, right?
byprdct has joined #ruby
Quashie has joined #ruby
sarkis has joined #ruby
<volty> of course i know it // probably a typo (tired messing)
blackmesa has quit [Ping timeout: 240 seconds]
lkba has joined #ruby
<pontiki> using instance_variable_set is how you create a new instance variable for an existing instance
<volty> yap, but i cannot create it from inside a module.extended
zorg24 has joined #ruby
niklasb has quit [Read error: Operation timed out]
<apeiros> the only way to ivars from outside an object is through a method
thesheff17 has quit [Ping timeout: 264 seconds]
<volty> apeiros - the magician ! thx :)
snovak has quit [Ping timeout: 264 seconds]
<apeiros> either ivar_set, instance_eval/exec or a specific method
blackmesa has joined #ruby
sarlalian has quit [Ping timeout: 256 seconds]
Davey has quit [Quit: Computer has gone to sleep.]
thesheff17 has joined #ruby
vlad_starkov has joined #ruby
clocKwize has quit [Quit: clocKwize]
ykk` has quit [Quit: ykk`]
adeponte has quit [Remote host closed the connection]
<volty> done, thx // o.instance_eval "@index_#{o.object_id} = -1"
jonr22 has joined #ruby
<patrikf> why would you use object_id if it's an instance variable anyway?
<patrikf> also, why use eval when there's instance_variable_set?
pwh has joined #ruby
<volty> patrikf: that code is inside a module
<volty> cannot tell you right now how, but I will use it for sure
<volty> ruby modules miss variables
|jemc| has quit [Ping timeout: 240 seconds]
<volty> the only way to create (and in other methods work with them) is through modules extended and included methods
<pontiki> rails adds the notion of mattr_*, which give a module attributes
<pontiki> also cattr_*
KobraKao has joined #ruby
<pontiki> but it's not so difficult a notion
<volty> i did module initializers too
Ox6abe has quit [Remote host closed the connection]
KobraKao has quit [Client Quit]
coderhs has quit [Ping timeout: 256 seconds]
<volty> but one forgets how the things go, tricky stuff, and you do not do it every day - only libraries
<pontiki> module MyModule1; def self.my_var; @my_var; end; def self.my_var=(obj); @my_var = obj; end; end
vlad_starkov has quit [Ping timeout: 256 seconds]
Fuzai has quit [Remote host closed the connection]
Fuzai_ has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
<volty> but thanks, i'll give a look at how rails implements that 'mattr'
mengu has quit [Quit: This computer has gone to sleep]
DonRichie has quit [Ping timeout: 240 seconds]
DonRichie has joined #ruby
shanlar- has quit [Quit: Be back later]
Davey has joined #ruby
Ripp__ has quit []
niklasb has joined #ruby
T_T has quit [Remote host closed the connection]
reset has quit [Quit: Leaving...]
shanlar has joined #ruby
dmiller has joined #ruby
<volty> pontiki: there's a problem with instance variable names collision
slick- has joined #ruby
<pontiki> in rails' implementation?
ehaliewicz has quit [Ping timeout: 240 seconds]
<volty> no, in your example
<volty> << module MyModule1; def self.my_var; @my_var; end; def self.my_var=(obj); @my_var = obj; end; end>>
nari has joined #ruby
<banisterfiend> volty what u trying to do exactly?
Lewix has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
gimpygoo has joined #ruby
<pontiki> howso, volty ?
<volty> banisterfiend: trying to go beyond the limits of ruby :)
DanKnox is now known as DanKnox_away
<banisterfiend> volty can you explain what you're trying to achieve, what are your specs?
<pontiki> thot this was just ruby sandbox tiem
rburton- has joined #ruby
<volty> banisterfiend: let's say i have an array and i want multiple pointers that can move around
Fuzai has joined #ruby
<pontiki> volty: still not seeing what the ns collision is?
Fuzai_ has joined #ruby
mardin has joined #ruby
ics has quit [Ping timeout: 240 seconds]
tungd has joined #ruby
reset has joined #ruby
chxane has quit [Quit: Leaving]
mlpinit has joined #ruby
ner0x has joined #ruby
Voodoofish430 has quit [Quit: Leaving.]
<volty> pontiki: sorry, i didn't see the self.
funburn has quit [Quit: funburn]
chxane has joined #ruby
pwh has quit [Quit: pwh]
xjiujiu has joined #ruby
pwh has joined #ruby
pwh has quit [Client Quit]
jonahR has joined #ruby
Kelet has quit [Quit: Leaving]
ics has joined #ruby
ics has quit [Max SendQ exceeded]
ewnd9 has joined #ruby
ehaliewicz has joined #ruby
jonr22 has quit [Ping timeout: 260 seconds]
JumpMast3r has joined #ruby
freerobby has joined #ruby
ianclarksmith has joined #ruby
azcodex has quit [Read error: Connection reset by peer]
travisjeffery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<volty> trying to connect (my brain) without success, night by(e)
volty has quit [Quit: Konversation terminated!]
Teddy2steper has quit [Remote host closed the connection]
pwh has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
Suit_Of_Sables has joined #ruby
<platzhirsch> So recognizing his self made him disappear, very philosophic
Lewix has quit [Remote host closed the connection]
<pontiki> volty: ah, yes, the self in the module defn makes it a module_function
aeontech has quit [Quit: aeontech]
mikepack has quit [Remote host closed the connection]
sepp2k1 has quit [Read error: Connection reset by peer]
<pontiki> you can also create regular functions that would be accessible in the class that includes the module that act upon the module_functions
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jamesaanderson has joined #ruby
<Suit_Of_Sables> I understand how to use 'include' within a class to give it access to methods defined elsewhere without having to use inheritance but is there something similar to Java's 'implements' for ensuring that a certain class contains implementations of all methods declared in another abstract class?
ravster has quit [Quit: Leaving.]
reset has quit [Quit: Leaving...]
<existensil> Suit_Of_Sables: you can create something similar to an Java interface using a module/class that has the methods defined but raises errors for all the methods until they are implemented by a descendent
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
randomdrake has quit [Quit: randomdrake]
xjiujiu has joined #ruby
<apeiros> Suit_Of_Sables: "without having to use inheritance"
<apeiros> actually, include is inheritance
<apeiros> >> module X; end; class Y; include X; end; Y.ancestors
<eval-in> apeiros => [Y, X, Object, Kernel, BasicObject] (https://eval.in/48324)
Hanmac1 has joined #ruby
|jemc| has joined #ruby
snovak has joined #ruby
VTLob has quit [Quit: VTLob]
hanmac has quit [Ping timeout: 264 seconds]
Domon has joined #ruby
youcallme has joined #ruby
youcallme has quit [Read error: Connection reset by peer]
youcallme has joined #ruby
youcallme has quit [Read error: Connection reset by peer]
MrZYX is now known as MrZYX|off
platzhirsch has left #ruby [#ruby]
Domon has quit [Remote host closed the connection]
youcallme has joined #ruby
youcallme has quit [Read error: Connection reset by peer]
snovak has quit [Read error: Operation timed out]
Domon has joined #ruby
Domon__ has joined #ruby
Domon has quit [Read error: Connection reset by peer]
Es0teric has quit [Quit: Computer has gone to sleep.]
<existensil> module X; end; class Y; prepend X; end; Y.ancestors
<existensil> >> module X; end; class Y; prepend X; end; Y.ancestors
<eval-in> existensil => [X, Y, Object, Kernel, BasicObject] (https://eval.in/48325)
<existensil> ah, so it is ruby 2.0 :-)
dagnachew has quit [Quit: WeeChat 0.4.1]
kindjal has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<shevy> is matz doing any conferences this year
ianclarksmith is now known as ics
mclosson has joined #ruby
saarinen has joined #ruby
saarinen has quit [Client Quit]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
Liothen has joined #ruby
<Suit_Of_Sables> apeiros: Oops, I think I ment without using up the classes superclass spot. As a class can have only one superclass right?
vlad_starkov has joined #ruby
osvico has quit [Ping timeout: 260 seconds]
simoz has quit [Ping timeout: 246 seconds]
butblack has joined #ruby
mlpinit has quit [Remote host closed the connection]
<|jemc|> right
Apocalypse has quit [Ping timeout: 261 seconds]
Kelet has joined #ruby
osvico has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
youcallme has joined #ruby
youcallme has quit [Read error: Connection reset by peer]
adeponte has joined #ruby
Fuzai has quit [Remote host closed the connection]
Fuzai_ has quit [Remote host closed the connection]
Lewix has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
Senjai has joined #ruby
eshy has quit [*.net *.split]
karupanerura has quit [*.net *.split]
cibs has quit [*.net *.split]
youcallme has joined #ruby
Fuzai has joined #ruby
youcallme has quit [Read error: Connection reset by peer]
kronixx has quit [Remote host closed the connection]
Fuzai_ has joined #ruby
adeponte has quit [Ping timeout: 256 seconds]
jnoob22 has quit [Remote host closed the connection]
butblack has left #ruby [#ruby]
zz_karupanerura has joined #ruby
cibs has joined #ruby
eshy has joined #ruby
mlpinit has joined #ruby
apeiros has quit [Remote host closed the connection]
Shruubi has joined #ruby
apeiros has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
ykk` has joined #ruby
xjiujiu has joined #ruby
youcallme has joined #ruby
youcallme has quit [Read error: Connection reset by peer]
youcallme has joined #ruby
youcallme has quit [Read error: Connection reset by peer]
slick- has quit [Quit: slick-]
youcallme has joined #ruby
youcallme has quit [Read error: Connection reset by peer]
Es0teric has joined #ruby
duggiefresh has quit [Remote host closed the connection]
duggiefresh has joined #ruby
peregrine81 has quit [Ping timeout: 240 seconds]
<mclosson> join #rubyonrails
<mclosson> typo not intended instructions
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
quoin has quit [Remote host closed the connection]
quoin has joined #ruby
aryaching has quit [Ping timeout: 246 seconds]
mrsolo has joined #ruby
youcallme has joined #ruby
youcallme has quit [Read error: Connection reset by peer]
youcallme has joined #ruby
youcallme has quit [Read error: Connection reset by peer]
byprdct has quit [Ping timeout: 264 seconds]
mlpinit has quit [Remote host closed the connection]
reset has joined #ruby
reset has quit [Client Quit]
yekta has joined #ruby
machuga is now known as machuga|away
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
Fuzai_ has quit [Read error: Connection reset by peer]
Fuzai has quit [Remote host closed the connection]
ner0x has quit [Quit: Leaving]
Fuzai has joined #ruby
Fuzai_ has joined #ruby
snovak has joined #ruby
xjiujiu_ has joined #ruby
youcallme has joined #ruby
youcallme has quit [Read error: Connection reset by peer]
youcallme has joined #ruby
alexju has joined #ruby
xjiujiu has quit [Ping timeout: 264 seconds]
snovak has quit [Ping timeout: 256 seconds]
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
tk_ has joined #ruby
niklasb has quit [Ping timeout: 246 seconds]
sarkis has quit [Ping timeout: 240 seconds]
alexju has quit [Remote host closed the connection]
alexju has joined #ruby
Cyrus has joined #ruby
endash has quit [Quit: endash]
alexju has quit [Ping timeout: 260 seconds]
alexju has joined #ruby
freerobby1 has joined #ruby
ahuman has quit [Quit: No Ping reply in 180 seconds.]
ahuman has joined #ruby
freerobby has quit [Ping timeout: 264 seconds]
locriani has quit [Remote host closed the connection]
Apocalypse has joined #ruby
Monie has joined #ruby
aryaching has joined #ruby
nari has quit [Quit: Ex-Chat]
ryandeussing has quit [Remote host closed the connection]
Monie has quit [Client Quit]
alvaro_o has quit [Quit: Ex-Chat]
Monie has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
mary5030 has quit [Remote host closed the connection]
funburn has joined #ruby
araujo has quit [Quit: Leaving]
LaPetiteFromage has joined #ruby
macmartine has joined #ruby
BrianJ has joined #ruby
amclain has joined #ruby
Apocalypse has quit [Remote host closed the connection]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rburton- has quit [Quit: Linkinus - http://linkinus.com]
allaire has quit []
KobraKao has joined #ruby
Apocalypse has joined #ruby
robert_ has quit [Ping timeout: 256 seconds]
fridim__ has quit [Ping timeout: 246 seconds]
alexju_ has joined #ruby
alexju has quit [Read error: Connection reset by peer]
freerobby1 has quit [Quit: Leaving.]
Splourian has joined #ruby
agent_white has quit [Quit: leaving]
alexju_ has quit [Read error: Connection reset by peer]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
alexju has joined #ruby
robbyoconnor has joined #ruby
haxrbyte has joined #ruby
robbyoconnor has quit [Read error: Connection reset by peer]
quando has quit [Quit: quando]
locriani has joined #ruby
noopq has joined #ruby
randomdrake has joined #ruby
brianpWins has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
taternuts has quit []
fridim__ has joined #ruby
emanon_ has quit [Read error: Connection reset by peer]
quando has joined #ruby
emanon_ has joined #ruby
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
jamesaanderson has joined #ruby
snovak has joined #ruby
noopq has quit [Ping timeout: 256 seconds]
snovak has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
alexju has quit [Remote host closed the connection]
alexju has joined #ruby
cj3kim has joined #ruby
jarin has joined #ruby
vlad_starkov has quit [Ping timeout: 240 seconds]
brianpWins has quit [Quit: brianpWins]
tk_ has quit [Quit: ばいばい]
dagnachew has joined #ruby
polaco is now known as polaco_zZz
echevemaster has quit [Quit: Leaving]
locriani has quit [Ping timeout: 246 seconds]
brianpWins has joined #ruby
ananthakumaran has joined #ruby
T_T has joined #ruby
ykk` has quit [Ping timeout: 260 seconds]
nathanieldavid has joined #ruby
jaimef has quit [Excess Flood]
cads has joined #ruby
tjad has quit [Ping timeout: 260 seconds]
intuxicated has joined #ruby
pothibo has quit [Quit: pothibo]
razi has joined #ruby
jaimef has joined #ruby
cj3kim has quit [Remote host closed the connection]
ukd1 has quit [Remote host closed the connection]
macmartine has quit [Quit: Computer has gone to sleep.]
gamma9mu has joined #ruby
krz has joined #ruby
krz has quit [Changing host]
krz has joined #ruby
cj3kim has joined #ruby
Domon__ has quit [Remote host closed the connection]
Domon has joined #ruby
mrsolo has joined #ruby
jp- has joined #ruby
quando has quit [Quit: quando]
tjad has joined #ruby
Domon has quit [Ping timeout: 264 seconds]
randomdrake has quit [Quit: randomdrake]
JohnBat26 has joined #ruby
ewnd9 has quit [Read error: Connection reset by peer]
ewnd9_ has joined #ruby
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
gamma9mu has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
gamma9mu has joined #ruby
i8igmac has quit [Remote host closed the connection]
gamma9mu has quit [Remote host closed the connection]
locriani has joined #ruby
gamma9mu has joined #ruby
quando has joined #ruby
highlighters has joined #ruby
locriani has quit [Ping timeout: 256 seconds]
KobraKao has quit [Quit: Saindo]
snovak has joined #ruby
locriani has joined #ruby
tomzx_mac has quit [Ping timeout: 240 seconds]
mansi has joined #ruby
snovak has quit [Ping timeout: 240 seconds]
aryaching_ has joined #ruby
locriani has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 240 seconds]
mansi has quit [Remote host closed the connection]
duggiefresh has quit [Remote host closed the connection]
mansi has joined #ruby
mclosson has quit [Quit: leaving]
aryaching has joined #ruby
pvizcay has joined #ruby
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nathanieldavid has quit [Quit: Bye!]
fridim__ has quit [Ping timeout: 264 seconds]
gamma9mu has quit [Remote host closed the connection]
aryaching_ has quit [Ping timeout: 256 seconds]
jamesaanderson has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
aryaching_ has joined #ruby
ryandeussing has joined #ruby
dagnachew has quit [Read error: Operation timed out]
Es0teric has quit [Quit: Computer has gone to sleep.]
yekta has quit [Quit: yekta]
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
aryaching has quit [Ping timeout: 240 seconds]
browndawg has joined #ruby
ryandeussing has quit [Ping timeout: 264 seconds]
dmiller has quit [Remote host closed the connection]
zets has quit []
DoritosMan has joined #ruby
quazimodo has joined #ruby
highlighters has quit [Quit: highlighters]
xjiujiu has joined #ruby
highlighters has joined #ruby
razi has quit [Quit: Leaving.]
xjiujiu_ has quit [Ping timeout: 264 seconds]
eka has quit [Ping timeout: 264 seconds]
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
highlighters has quit [Quit: highlighters]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
quando has quit [Quit: quando]
ukd1 has joined #ruby
DoritosMan is now known as DM
noop has joined #ruby
sayan has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
parzo has joined #ruby
quazimodo has quit [Ping timeout: 264 seconds]
ugm781 has joined #ruby
quando has joined #ruby
ugm781 has quit [Client Quit]
jamesaanderson has joined #ruby
echevemaster has joined #ruby
echevemaster has joined #ruby
cj3kim has quit [Remote host closed the connection]
Monie has joined #ruby
highlighters has joined #ruby
ukd1 has quit [Ping timeout: 240 seconds]
Monie has quit [Client Quit]
bg_ has joined #ruby
dmiller has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
quando has quit [Quit: quando]
xjiujiu has joined #ruby
diegoviola has joined #ruby
<diegoviola> hi
<diegoviola> i have some filename string with something like "foo.svg.png", is there a regex or something i can use to remove all the extensions and just get "foo"?
<diegoviola> please
parzo has quit [Ping timeout: 260 seconds]
<diegoviola> i need to learn regex, i also tried google but none of the regex i found work
fgo has joined #ruby
dmiller has quit [Ping timeout: 264 seconds]
Es0teric has joined #ruby
Es0teric has quit [Remote host closed the connection]
uri781 has joined #ruby
snovak has joined #ruby
uri781 has left #ruby [#ruby]
mrsolo has quit [Quit: This computer has gone to sleep]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wookiehangover has quit [Ping timeout: 248 seconds]
kevind has quit [Quit: kevind]
jericon has quit [Read error: Operation timed out]
jericon has joined #ruby
alexju_ has joined #ruby
kilophoton has quit [Ping timeout: 240 seconds]
T_T has quit [Remote host closed the connection]
moeSeth_ has quit [Ping timeout: 264 seconds]
AlSquire has quit [Read error: Connection reset by peer]
snovak has quit [Read error: Operation timed out]
highlighters has quit [Quit: highlighters]
moshee has quit [Ping timeout: 260 seconds]
wookiehangover has joined #ruby
funburn has quit [Quit: funburn]
moshee has joined #ruby
<|jemc|> >> "foo.svg.png".gsub /\.svg\.png$/, ''
<eval-in> |jemc| => "foo" (https://eval.in/48327)
alexju has quit [Ping timeout: 240 seconds]
<|jemc|> http://www.regular-expressions.info/ is a good resource for teaching yourself about regular expressions
funburn has joined #ruby
<diegoviola> thanks
<diegoviola> but if i don't know what the extension is?
<diegoviola> i'll read, thanks
fredjean has joined #ruby
duggiefresh has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
LaPetiteFromage has quit [Quit: LaPetiteFromage]
<|jemc|> >> "foo.txt".gsub /\.\w+$/, ''
<eval-in> |jemc| => "foo" (https://eval.in/48328)
noop has quit [Ping timeout: 264 seconds]
<|jemc|> \. is the escaped representation of '.' because the . is a special character in regexp
<|jemc|> \w is the character class representing alphabet and numerical characters - one \w represents one character fitting into this group
<|jemc|> the + dictates that you are looking for one or more of these \w characters
<diegoviola> ty
<|jemc|> and the $ indicates the end of the string, meaning that it won't match the pattern if it occurs in the middle (it is a zero-width assertion, essentially anchoring it to the end)
predator117 has quit [Ping timeout: 260 seconds]
ukd1 has joined #ruby
pwh has quit [Quit: pwh]
<|jemc|> and the gsub method replaces every instance of that pattern found in the string with the following string, '' (an empty string)
predator117 has joined #ruby
<|jemc|> that, along with the website should get you started
<|jemc|> have fun. regular expressions are a great tool to be able to use
<diegoviola> right, thanks
Tuxist has joined #ruby
<|jemc|> although I should note that for this particular case, there is a builtin method to help you drop the file extension from a filename
chihhsin has quit [Quit: leaving]
<|jemc|> >> File.basename("foo.txt", ".")
<eval-in> |jemc| => "foo.txt" (https://eval.in/48329)
duggiefresh has quit [Ping timeout: 260 seconds]
<|jemc|> >> File.basename("foo.txt", ".*")
<eval-in> |jemc| => "foo" (https://eval.in/48330)
highlighters has joined #ruby
GeissT has joined #ruby
<diegoviola> File.basename is good, but what happens if you have filename.ext1.ext2.ext3
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
<diegoviola> and you want just filename
xjiujiu has joined #ruby
emanon_ has quit [Ping timeout: 246 seconds]
krz has quit [Quit: krz]
baroquebobcat has quit [Quit: baroquebobcat]
mansi has joined #ruby
randomdrake has joined #ruby
pwh has joined #ruby
emanon_ has joined #ruby
mrsolo has joined #ruby
GeissT has quit [Quit: MillBroChat AdIRC User]
mansi has quit [Ping timeout: 256 seconds]
bluOxigen has joined #ruby
niteowl has joined #ruby
ukd1 has quit [Ping timeout: 256 seconds]
bg_ has quit [Remote host closed the connection]
prox|a has joined #ruby
quando has joined #ruby
emanon_ has quit [Read error: Connection reset by peer]
emanon_ has joined #ruby
virtualize has quit [Ping timeout: 256 seconds]
virtualize has joined #ruby
<|jemc|> >> "foo.txt".scan(/^[^\.]*/)[0]
<eval-in> |jemc| => "foo" (https://eval.in/48331)
<|jemc|> >> "foo.txt.ext2.ext3".scan(/^[^\.]*/)[0]
<eval-in> |jemc| => "foo" (https://eval.in/48332)
proxie has quit [Ping timeout: 256 seconds]
<diegoviola> >> "foo.svg.png".gsub(/\W.*$/, '')
<eval-in> diegoviola => "foo" (https://eval.in/48333)
<diegoviola> >> "foo.svg".gsub(/\W.*$/, '')
<eval-in> diegoviola => "foo" (https://eval.in/48334)
<diegoviola> this seems to work too, i'm just not sure about it
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
sayan has quit [Ping timeout: 264 seconds]
pwh has quit [Quit: pwh]
dhruvasagar has joined #ruby
kobain has quit []
funburn has quit [Quit: funburn]
<|jemc|> that'll knockout everything from the first non-alphanumeric character to the end of the string
<|jemc|> if that's what you want
blueOxigen has joined #ruby
<|jemc|> but it may not behave how you want for things like
<|jemc|> >> "foo-bar.svg".gsub(/\W.*$/, '')
<eval-in> |jemc| => "foo" (https://eval.in/48335)
monkegjinni has joined #ruby
intuxicated has quit [Ping timeout: 264 seconds]
emanon_ has quit [Ping timeout: 260 seconds]
<|jemc|> so, you can make your own character class (to use in place of \w or \W) with the square brackets
highlighters has quit [Quit: highlighters]
<|jemc|> [^\.] will match any character that is not '.'
Domon has joined #ruby
Es0teric has joined #ruby
niteowl has quit [Quit: Konversation terminated!]
Es0teric has quit [Client Quit]
bluOxigen has quit [Ping timeout: 246 seconds]
<|jemc|> but I suppose you could amend your previous suggestion a bit to specify '.' instead of any \W
<|jemc|> >> "foo-bar.svg".gsub(/\..*$/, '')
<eval-in> |jemc| => "foo-bar" (https://eval.in/48336)
<diegoviola> thanks
bondar has joined #ruby
bondar has quit [Max SendQ exceeded]
<|jemc|> no problem
<|jemc|> I think you'll have fun with regular expressions
<diegoviola> right
<|jemc|> well, I do
Kabaka has quit [Remote host closed the connection]
bondar has joined #ruby
bondar has quit [Max SendQ exceeded]
corpuscle has joined #ruby
Xeago has joined #ruby
Kabaka has joined #ruby
monkegjinni has quit [Remote host closed the connection]
highlighters has joined #ruby
xjiujiu has quit [Quit: No Ping reply in 180 seconds.]
xjiujiu has joined #ruby
zorg24 has quit [Ping timeout: 264 seconds]
noop has joined #ruby
alexju_ has quit [Remote host closed the connection]
funburn has joined #ruby
<diegoviola> yeah it's fun already :)
<diegoviola> thanks, i'll go read now
alexju has joined #ruby
monkegjinni has joined #ruby
dmiller has joined #ruby
nathancahill has joined #ruby
pvizcay has quit [Quit: leaving]
intuxicated has joined #ruby
rippa has joined #ruby
ukd1 has joined #ruby
alexju has quit [Ping timeout: 264 seconds]
dmiller has quit [Ping timeout: 260 seconds]
diego has joined #ruby
diegoviola is now known as Guest3335
diego is now known as diegoviola
Guest3335 has quit [Ping timeout: 256 seconds]
ssvo has joined #ruby
zorg24 has joined #ruby
<highlighters> No problem.
xjiujiu has quit [Read error: Connection reset by peer]
snovak has joined #ruby
xjiujiu has joined #ruby
funburn has quit [Quit: funburn]
Spami has joined #ruby
ukd1 has quit [Ping timeout: 260 seconds]
dhruvasagar has quit [Ping timeout: 264 seconds]
snovak has quit [Read error: Operation timed out]
xjiujiu_ has joined #ruby
dhruvasagar has joined #ruby
funburn has joined #ruby
funburn has quit [Client Quit]
xjiujiu has quit [Ping timeout: 264 seconds]
kilophoton has joined #ruby
highlighters has quit [Quit: highlighters]
highlighters has joined #ruby
sakshi has joined #ruby
postmodern has quit [Quit: Leaving]
K0HAX has quit [Remote host closed the connection]
kilophoton has quit [Ping timeout: 264 seconds]
randomdrake has quit [Ping timeout: 264 seconds]
ssvo has quit [Ping timeout: 264 seconds]
xxpor has joined #ruby
JumpMast3r has quit [Quit: JumpMast3r]
mansi has joined #ruby
osvico has quit [Ping timeout: 260 seconds]
DM has quit [Quit: MacBook has gone to sleep]
sakshi has quit [Quit: Konversation terminated!]
highlighters has quit [Quit: highlighters]
amclain has quit [Quit: Leaving]
noop has quit [Ping timeout: 260 seconds]
mansi has quit [Ping timeout: 256 seconds]
xjiujiu_ has quit [Ping timeout: 264 seconds]
carraroj has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
sayan has joined #ruby
ukd1 has joined #ruby
quando has quit [Quit: quando]
Spami has quit [Quit: This computer has gone to sleep]
cpruitt_ has joined #ruby
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
cpruitt has quit [Ping timeout: 264 seconds]
cpruitt_ is now known as cpruitt
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Ping timeout: 260 seconds]
Tuxist has quit [Read error: Connection reset by peer]
highlighters has joined #ruby
blueOxigen has quit [Ping timeout: 256 seconds]
grzywacz has joined #ruby
grzywacz has quit [Changing host]
grzywacz has joined #ruby
coderhs has joined #ruby
dash_ has joined #ruby
cj3kim has joined #ruby
fgo has quit [Remote host closed the connection]
dekz has quit [Ping timeout: 248 seconds]
TomRone has quit [Ping timeout: 245 seconds]
dekz has joined #ruby
claymore has joined #ruby
ukd1 has quit [Ping timeout: 240 seconds]
carraroj has quit [Ping timeout: 256 seconds]
yuhsien_ has quit [Ping timeout: 276 seconds]
ckrailo has quit [Ping timeout: 276 seconds]
TomRone has joined #ruby
UnknownSage has joined #ruby
UnderCrux has quit [Remote host closed the connection]
cj3kim has quit [Ping timeout: 256 seconds]
UnknownSage has quit [Max SendQ exceeded]
parzo has joined #ruby
UnknownSage has joined #ruby
dodosan has quit [Remote host closed the connection]
dmiller has joined #ruby
UnknownSage has quit [Max SendQ exceeded]
grzywacz has quit [Ping timeout: 246 seconds]
UnknownSage has joined #ruby
|jemc| has quit [Read error: Operation timed out]
UnknownSage has quit [Read error: Connection reset by peer]
UnknownSage has joined #ruby
tjad has quit [Ping timeout: 264 seconds]
dmiller has quit [Ping timeout: 240 seconds]
funburn has joined #ruby
krz has joined #ruby
krz has quit [Changing host]
krz has joined #ruby
iliketurtles has joined #ruby
iliketurtles has quit [Client Quit]
Clooth has joined #ruby
ntus1017 has joined #ruby
moeSeth_ has joined #ruby
snovak has joined #ruby
emergion has joined #ruby
UnknownSage has quit [Ping timeout: 246 seconds]
diegoviola has quit [Quit: WeeChat 0.4.1]
UnknownSage has joined #ruby
UnknownSage has quit [Max SendQ exceeded]
zorg24 has quit [Ping timeout: 246 seconds]
snovak has quit [Ping timeout: 256 seconds]
chairabanta has joined #ruby
corpuscle has quit [Ping timeout: 256 seconds]
r0bglees0n has quit [Ping timeout: 245 seconds]
highlighters has quit [Quit: highlighters]
parzo has quit [Ping timeout: 260 seconds]
ukd1 has joined #ruby
zorg24 has joined #ruby
r0bglees0n has joined #ruby
jaimef has quit [Excess Flood]
RDash[AW] is now known as RDash
Sabya1 has joined #ruby
cj3kim has joined #ruby
allsystemsarego has joined #ruby
allsystemsarego has joined #ruby
highlighters has joined #ruby
schaerli has joined #ruby
hamakn has quit [Remote host closed the connection]
jaimef_ has joined #ruby
hamakn has joined #ruby
cj3kim has quit [Ping timeout: 264 seconds]
mansi has joined #ruby
monkegjinni has quit [Remote host closed the connection]
schaerli has quit [Remote host closed the connection]
eka has joined #ruby
dodosan has joined #ruby
monkegjinni has joined #ruby
hamakn has quit [Ping timeout: 240 seconds]
Quashie has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby
mansi has quit [Ping timeout: 256 seconds]
monkegjinni has quit [Remote host closed the connection]
emanon_ has joined #ruby
rezzack has quit [Quit: Leaving.]
wallerdev has quit [Quit: wallerdev]
funburn has quit [Quit: funburn]
_Minos_ has quit [Remote host closed the connection]
ukd1 has quit [Ping timeout: 264 seconds]
lkba has quit [Read error: Connection reset by peer]
dodosan has quit [Ping timeout: 256 seconds]
axsuul has quit [Ping timeout: 264 seconds]
carraroj has joined #ruby
ntus1017 has quit [Remote host closed the connection]
Splourian has quit [Quit: Leaving]
dweeb has joined #ruby
ppm has joined #ruby
ppm has left #ruby [#ruby]
krz has quit [Quit: krz]
rrichardsr3 has quit [Ping timeout: 260 seconds]
codecop has joined #ruby
quazimodo has joined #ruby
colonolGron has joined #ruby
jibi has joined #ruby
blackmesa has joined #ruby
Guest63395 has joined #ruby
okinomo has joined #ruby
Kabaka has quit [Ping timeout: 240 seconds]
ttt_ has joined #ruby
MrZYX|off is now known as MrZYX
NealJ has joined #ruby
Notte has joined #ruby
dmiller has joined #ruby
ttt_ has quit [Remote host closed the connection]
carraroj has quit [Ping timeout: 260 seconds]
intuxicated has quit [Ping timeout: 260 seconds]
lepht_afk has quit [Ping timeout: 276 seconds]
dmiller has quit [Ping timeout: 262 seconds]
ukd1 has joined #ruby
noop has joined #ruby
lepht_afk has joined #ruby
dodosan has joined #ruby
chairabanta has quit [Quit: Leaving...]
KevinSjoberg has joined #ruby
DanKnox_away is now known as DanKnox
Clooth has quit [Quit: Leaving...]
Xeago has quit [Read error: Connection reset by peer]
dodosan has quit [Ping timeout: 240 seconds]
Ripp__ has joined #ruby
DanKnox is now known as DanKnox_away
Xeago has joined #ruby
relix has joined #ruby
kaspergrubbe has joined #ruby
spider-mario has joined #ruby
cj3kim has joined #ruby
gyzmodo has joined #ruby
oliver__ has joined #ruby
dangerousdave has joined #ruby
snovak has joined #ruby
waxjar_ has quit [Quit: ZNC - http://znc.in]
highlighters is now known as dimension
Xeago_ has joined #ruby
<dimension> Hi
dimension has quit [Quit: dimension]
squaredimension has joined #ruby
squaredimension has quit [Client Quit]
Clooth has joined #ruby
fixnum has joined #ruby
sasquach_ has joined #ruby
sparq_ has joined #ruby
<fixnum> I want to use Haml outside of Rails, how can I embed markdown code inside a Haml document?
sasquach_ has quit [Client Quit]
skaflem has joined #ruby
saskuach has joined #ruby
intuxicated has joined #ruby
snovak has quit [Ping timeout: 256 seconds]
ukd1 has quit [Ping timeout: 264 seconds]
nanothief_ has quit [Read error: Connection reset by peer]
nanothief_ has joined #ruby
toddWork_ has quit [Read error: Connection reset by peer]
hanmac has joined #ruby
banghouse2 has quit [Remote host closed the connection]
klip has quit [Ping timeout: 256 seconds]
Nenor has joined #ruby
jefflyne3 has quit [Ping timeout: 260 seconds]
Hanmac1 has quit [Ping timeout: 264 seconds]
MrZYX is now known as MrZYX|off
mansi has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
adambeynon has joined #ruby
MrZYX|off is now known as MrZYX
Clooth has quit [Quit: Leaving...]
visof has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
Splourian has joined #ruby
mansi has quit [Ping timeout: 260 seconds]
randomdrake has joined #ruby
vlad_starkov has joined #ruby
Ripp__ has quit []
vlad_starkov has quit [Read error: Connection reset by peer]
nfk has joined #ruby
dodosan has joined #ruby
randomdrake has quit [Ping timeout: 260 seconds]
workmad3 has joined #ruby
dodosan has quit [Ping timeout: 264 seconds]
decoponio has joined #ruby
Clooth has joined #ruby
ukd1 has joined #ruby
hamakn has joined #ruby
ananthakumaran1 has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
Sabya1 has quit [Quit: Leaving.]
snyp has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
youcallme has quit [Remote host closed the connection]
snyp has quit [Client Quit]
waxjar has joined #ruby
yuhsien_ has joined #ruby
aryaching_ has quit [Ping timeout: 264 seconds]
ckrailo has joined #ruby
youcallme has joined #ruby
Seich has joined #ruby
carraroj has joined #ruby
browndawg has quit [Quit: Leaving.]
carraroj has quit [Client Quit]
carraroj has joined #ruby
Seich has quit [Remote host closed the connection]
Seich has joined #ruby
dmiller has joined #ruby
ukd1 has quit [Ping timeout: 240 seconds]
atno has joined #ruby
saskuach has quit [Quit: saskuach]
dangerousdave has quit [Quit: Leaving...]
dmiller has quit [Ping timeout: 264 seconds]
Advocation has joined #ruby
dodosan has joined #ruby
okinomo has quit [Ping timeout: 264 seconds]
srji has joined #ruby
oliver__ has quit [Remote host closed the connection]
dodosan has quit [Ping timeout: 256 seconds]
monkegjinni has joined #ruby
cj3kim has quit [Remote host closed the connection]
monkegjinni has quit [Remote host closed the connection]
carraroj has quit [Read error: Operation timed out]
St_Marx has joined #ruby
ehaliewicz has quit [Remote host closed the connection]
snovak has joined #ruby
monkegjinni has joined #ruby
saskuach has joined #ruby
monkegjinni has quit [Remote host closed the connection]
Splourian has quit [Quit: Leaving]
snovak has quit [Ping timeout: 240 seconds]
ssvo has joined #ruby
St_Marx has quit [Quit: Leaving]
jonathanwallace has joined #ruby
persand has joined #ruby
carraroj has joined #ruby
ssvo has quit [Ping timeout: 260 seconds]
m8 has joined #ruby
sparq_ has quit [Ping timeout: 240 seconds]
saskuach has quit [Ping timeout: 256 seconds]
ukd1 has joined #ruby
DanKnox_away is now known as DanKnox
dweeb has quit [Quit: Computer has gone to sleep.]
sayan has quit [Ping timeout: 240 seconds]
mansi has joined #ruby
dsferreira has joined #ruby
St_Marx has joined #ruby
<dsferreira> Hi there. I'm getting a weird behaviour in 1.9.3
<coderhs> whats thee werid behaviour?
mansi has quit [Ping timeout: 264 seconds]
Xeago_ has quit [Remote host closed the connection]
<dsferreira> I have this class: https://gist.github.com/dsferreira/6560784
Xeago_ has joined #ruby
<dsferreira> So if I do: t =Test.new
nemesit|znc has quit [Read error: Connection reset by peer]
<dsferreira> t.files => []
<dsferreira> Great
<dsferreira> But if I now do t.files << 'some_file'
<dsferreira> My t.files => ['some_file']
rcosta has joined #ruby
ukd1 has quit [Ping timeout: 256 seconds]
<dsferreira> And t.instance_variable_get(:@files) => ['some_file']
<dsferreira> When in the class I have set attr_reader :files
<MrZYX> attr_reader :files is a shortcut to def files @files; end
<dsferreira> It seems that all array methods are able to set the instance variable
<MrZYX> yes, that's intended behaviour
<dsferreira> MrZYX, the problem here is that I don't want to set the instance variable with any public method
browndawg has joined #ruby
<MrZYX> attr_reader :files does return @files, which is an array, which then you call #<< on, thus modify it in place
monkegjinni has joined #ruby
<MrZYX> you're not resetting the instance variable, you're modifying the object the instance variable is holding
<dsferreira> Modifying my class instance variable?
<dsferreira> And t.instance_variable_get(:@files) => ['some_file']
Xeago_ has quit [Ping timeout: 264 seconds]
<MrZYX> >> class Foo; attr_writer :bar; end; class Bar; attr_reader :foo; def initialize; @foo = Foo.new; @foo.bar = 1; end; end; b = Bar.new; b.foo.bar = 2; b.foo.instance_variable_get(:@bar)
<eval-in> MrZYX => 2 (https://eval.in/48352)
saskuach has joined #ruby
oliver__ has joined #ruby
nathancahill has quit [Quit: nathancahill]
monkegjinni has quit [Remote host closed the connection]
<MrZYX> dsferreira: let me repeat that once more, you're not modifying the instance variable, you're modifying the object currently assigned to the instance variable
cj3kim has joined #ruby
nemesit|znc has joined #ruby
<MrZYX> maybe describe the behaviour you need (including the real world application) and we may find a solution for you
lkba has joined #ruby
noop has quit [Ping timeout: 264 seconds]
bulkan has joined #ruby
mengu has joined #ruby
araujo has joined #ruby
carraroj has quit [Ping timeout: 246 seconds]
<dsferreira> I'm trying to understand here the problem
vlad_starkov has joined #ruby
<dsferreira> You're class Foo is my Array class
<bulkan> why is rbenv telling me rbenv: ruby: command not found
<MrZYX> exactly
ismlages has joined #ruby
<bulkan> after I run `bundle install`
<dsferreira> So the Bar is my Test
<MrZYX> yes
<dsferreira> in my case I do Test.files
osvico has joined #ruby
<dsferreira> It would be the same has Bar.foo
<dsferreira> ok
ananthakumaran has quit [Quit: Leaving.]
_bart has joined #ruby
DanKnox is now known as DanKnox_away
<dsferreira> The is a Bar.instance_variable_get(:@foo) = Foo.new
<MrZYX> to be precise you're doing Test.files.<<('some_files') and I'm doing Bar.foo.bar=(2)
Advocation has quit [Quit: Advocation]
<MrZYX> both are in fact method calls on the object returned by .files/.foo
saskuach has quit [Quit: saskuach]
<dsferreira> This means that an instance variable is always open to be changed outside the class environment.
<bulkan> anyone use rbenv ?
cj3kim has quit [Ping timeout: 256 seconds]
visof has quit [Ping timeout: 256 seconds]
<dsferreira> Which mean that ruby makes available the instance variable object methods to the public?
<MrZYX> no, you're not changing the instance variable. You're changing the object that's assigned to the instance variable
<MrZYX> not ruby did, you did with attr_reader :files
<MrZYX> which is a shortcut to def files; @files; end
<dsferreira> So what would be the solution?
drPoggs has quit [Ping timeout: 246 seconds]
<MrZYX> I yet have to see a problem ;)
haxrbyte has quit [Remote host closed the connection]
<MrZYX> all intended behavior so far
Olipro has quit [Ping timeout: 246 seconds]
ukd1 has joined #ruby
<dsferreira> With attr_reader my purpose was to be able to get the value of the instance variable not allow anyone to change it
<MrZYX> but still being able to change it inside the class?
Notte has quit [Remote host closed the connection]
<dsferreira> How can we make the instance variable accessible to the public and close the change of that value
ukd1_ has joined #ruby
<dsferreira> I thought it would be done with the attr_reader vs attr_writer
<MrZYX> and we need to get terminology straight here: you're not changing the instance variable, you're changing the object inside the instance variable
<dsferreira> Ok
<dsferreira> Understood
<MrZYX> attr_writer does set the instance variable
Olipro has joined #ruby
<dsferreira> I no that. I have tried it.
<dsferreira> I can only change the object associated to the instance_variable
<MrZYX> it defines a method like def files=(v) @files = v; end
<dsferreira> I no
<dsferreira> know
drPoggs has joined #ruby
<MrZYX> you maybe you want return frozen copies of files
<dsferreira> This is new to me, because I never had realised that we can change the object associated to an instance variable outside the class scope.
<MrZYX> still not sure why that would be super useful
<MrZYX> you're not changing the association, you're modifying the object
<dsferreira> What implications come from that
ukd1_ has quit [Remote host closed the connection]
<dsferreira> yes change the object associated
ukd1 has quit [Ping timeout: 264 seconds]
dmiller has joined #ruby
<dsferreira> While coding I always thought the instance variables values would not change unless you would explicitly set them
vlad_starkov has quit [Ping timeout: 264 seconds]
<dsferreira> Is there any security implication associated to this?
Banistergalaxy has joined #ruby
<dsferreira> For instance. You set an instance variable as an array or string which is common
<MrZYX> the security implication is the same as everywhere in ruby: if the attacker can run code or call arbitrary methods you lost
dangerousdave has joined #ruby
Xeago_ has joined #ruby
<MrZYX> always filter user input that goes into stuff like .send through a whitelist, never eval user input
vlad_starkov has joined #ruby
<dsferreira> So I have this program to load files contents to a database
<dsferreira> I want to receive as an argument the files directory.
<dsferreira> This will be the only user interface for the time being.
dmiller has quit [Ping timeout: 240 seconds]
AndChat| has quit [Ping timeout: 264 seconds]
<dsferreira> So in that regard I'm not concerned
<dsferreira> I'm think more when you develop a gem and want to make it available to the public
Banistergalaxy has quit [Read error: Connection reset by peer]
<MrZYX> DBImporter.new(Dir["./ARGV[0]/**/*"]) no problem in doing something like that
<dsferreira> In that case the API is important so that the gem users are assured that nothing wrong will happen. No security halls.
visof has joined #ruby
<dsferreira> Yes. Once again that is not my concern at the moment
<MrZYX> well, write proper docs, if the user does want to break your gem, he'll find a way
dAnjou_ is now known as dAnjou
<dsferreira> I'm just trying to realise what are the implications of this new reality for me.
blackmesa has joined #ruby
<MrZYX> he can always do class Test; attr_writer :files; end, a ruby class can always be reopened
azcodex has joined #ruby
<MrZYX> all foots that he'll shoot will be his own anyway
<dsferreira> If you really want to close your instance variable object status. Which mean hide all it's methods from public. What would you do?
<dsferreira> attr_reader is out of question.
ferdev has joined #ruby
<MrZYX> define no single getter
<dsferreira> So it should be something like object.inspect?
fgo has joined #ruby
<dsferreira> def show_files
<dsferreira> @files.inspect end
vlad_sta_ has joined #ruby
<dsferreira> That would resolve the problem right?
vlad_starkov has quit [Read error: Connection reset by peer]
<MrZYX> depends on how useful that would be to the caller
<dsferreira> Or even: def files; @files.inspect; end
<MrZYX> and I still can just do instance_variable_get or instance_variable_set
<dsferreira> That is true
<MrZYX> you can freeze an object, then nobody can modify it anymore
<MrZYX> except if you #unfreeze it ;)
<dsferreira> Yes. I see.
<MrZYX> so ruby doesn't provide any mean to enforce anything
<dsferreira> Good to remember.
<dsferreira> The developer as all the tools in his hands
<MrZYX> you rather say: that's the intended path, if you leave it, fine, but you're on your own, guarantees void
<dsferreira> The user is a different situation.
<dsferreira> But the user side is just the ARGV[0]
<MrZYX> or gets or DB input or a tcplistener, but yeah
<MrZYX> ruby will never evaluate any kind of user input on its own
<MrZYX> you have to tell him that
bluenemo has joined #ruby
bluenemo has joined #ruby
chairabanta has joined #ruby
<MrZYX> most of the time that would happen through the families of send and eval
<dsferreira> I get it. Thanks
visof has quit [Ping timeout: 260 seconds]
_bart has quit [Remote host closed the connection]
okinomo has joined #ruby
ferdev has quit [Quit: ferdev]
Xeago_ has quit [Remote host closed the connection]
Domon has quit [Read error: Connection reset by peer]
DrCode has quit [Ping timeout: 240 seconds]
Domon has joined #ruby
azcodex has quit [Quit: azcodex]
Domon has quit [Remote host closed the connection]
cody-- has joined #ruby
pushpak has joined #ruby
JesseH has joined #ruby
TripleDES has joined #ruby
jefflyne3 has joined #ruby
okinomo has quit [Read error: No route to host]
TripleDES has quit [Read error: Connection reset by peer]
_bart has joined #ruby
goganchic has joined #ruby
saskuach has joined #ruby
mansi has joined #ruby
TripleDES has joined #ruby
pjb1 has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
okinomo has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mansi has quit [Ping timeout: 246 seconds]
relix has joined #ruby
goshakkk has joined #ruby
Domon has joined #ruby
Domon has quit [Remote host closed the connection]
Domon has joined #ruby
sambao21 has joined #ruby
DrCode has joined #ruby
yosafbridge has quit [Ping timeout: 264 seconds]
Notte has joined #ruby
Domon has quit [Remote host closed the connection]
yosafbridge has joined #ruby
atno has quit [Ping timeout: 240 seconds]
rcosta has quit [Remote host closed the connection]
_bart has quit [Ping timeout: 264 seconds]
saskuach has quit [Quit: saskuach]
dodosan has joined #ruby
VTLob has joined #ruby
dangerousdave has quit [Quit: Leaving...]
dodosan has quit [Ping timeout: 256 seconds]
gg0_ has joined #ruby
Fuzai has quit [Remote host closed the connection]
saskuach has joined #ruby
snovak has joined #ruby
jibi has quit [Quit: .]
cody-- has quit [Quit: derp]
bulkan has left #ruby [#ruby]
yacks has quit [Ping timeout: 256 seconds]
cj3kim has joined #ruby
snovak has quit [Ping timeout: 246 seconds]
Xeago_ has joined #ruby
Tuxist has joined #ruby
coderhs has quit [Ping timeout: 264 seconds]
cj3kim has quit [Ping timeout: 240 seconds]
agjacome has joined #ruby
hamakn has quit [Remote host closed the connection]
Seich has quit [Quit: Lingo - http://www.lingoirc.com]
hamakn has joined #ruby
cody-- has joined #ruby
yacks has joined #ruby
Senjai has quit [Ping timeout: 260 seconds]
hamakn has quit [Ping timeout: 240 seconds]
dkamioka has joined #ruby
visof has joined #ruby
chairabanta has quit [Quit: Leaving...]
dweeb has joined #ruby
dmiller has joined #ruby
Xeago_ has quit [Remote host closed the connection]
sayan has joined #ruby
Lewix has quit [Remote host closed the connection]
saskuach has quit [Quit: saskuach]
jamesaanderson has joined #ruby
dmiller has quit [Ping timeout: 264 seconds]
jamesaanderson has quit [Client Quit]
Xeago_ has joined #ruby
Xeago_ has quit [Remote host closed the connection]
Xeago_ has joined #ruby
alexju has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
coderhs has joined #ruby
oliver__ has quit [Remote host closed the connection]
kirun has joined #ruby
saskuach has joined #ruby
cody-- has quit [Quit: derp]
alexju has quit [Read error: Connection reset by peer]
alexju_ has joined #ruby
okinomo has quit [Ping timeout: 260 seconds]
alexju_ has quit [Ping timeout: 264 seconds]
niklasb has joined #ruby
kraljev2 has joined #ruby
Clooth has quit [Quit: Leaving...]
oliver_ has joined #ruby
alexju has joined #ruby
<kraljev2> How is this possible?
okinomo has joined #ruby
<kraljev2> for both threads to finish at the same time
<kraljev2> If it used two cores, I'd understand
<kraljev2> but no. It uses only one
Mephisto4 has joined #ruby
alexju has quit [Remote host closed the connection]
alexju has joined #ruby
<MrZYX> it still alternates, try printing the mili or nanosecond timestamp
dross has quit [Ping timeout: 264 seconds]
<kraljev2> Of couse it does, because only one core is used
<kraljev2> but why?
zxq9 has quit [Remote host closed the connection]
<MrZYX> MRI has an interpreter lock
<MrZYX> only one thread may execute ruby code at given point
<MrZYX> if you want true parallelism look into jruby
<kraljev2> How would I assure defers do not interfere
<kraljev2> X
<kraljev2> # half the time before
<kraljev2> X
emergion has quit [Quit: Computer has gone to sleep.]
<kraljev2> Y
<kraljev2> # half the time before
<kraljev2> Y
<kraljev2> some kind of lock
jefflyne3 has quit [Ping timeout: 240 seconds]
<kraljev2> EM.add_timer(0) {}
alexju has quit [Ping timeout: 260 seconds]
<kraljev2> i guess?
<MrZYX> yeah, a Mutex generally, though using threads in the first place to force them into sequential execution seems silly
Clooth has joined #ruby
<kraljev2> Do you know any really good resource on this subject, because the whole EM / Fiber / Thread confuses me
dkamioka has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 264 seconds]
<MrZYX> no
mansi has joined #ruby
<banisterfiend> kraljev2 lots of good resources on EM
<kraljev2> is File.read eventmachine-aware?
<kraljev2> and what ruby calls are
<kraljev2> i know sleep() is not
vlad_starkov has joined #ruby
<kraljev2> 2. Why would I want to use EM instead of fibers / thread?
mansi has quit [Ping timeout: 260 seconds]
randomdrake has joined #ruby
sambao21 has quit [Ping timeout: 240 seconds]
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
vlad_starkov has quit [Read error: Connection reset by peer]
atno has joined #ruby
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
MrZYX has quit [Quit: Bye]
<banisterfiend> kraljev2 EM lets you use fibers/threads too
MrZYX|off has joined #ruby
<banisterfiend> kraljev2 but the programming model is quite different to normal programming, it's event-loop based
<banisterfiend> so you have to think a little differently
randomdrake has quit [Ping timeout: 260 seconds]
MrZYX|off is now known as MrZYX
visof has quit [Ping timeout: 260 seconds]
warefare has joined #ruby
Clooth has quit [Quit: Leaving...]
Advocation has joined #ruby
Advocation has quit [Client Quit]
mengu has quit [Quit: This computer has gone to sleep]
Advocation has joined #ruby
<warefare> "/usr/bin/install: cannot stat `debug_inspector.so': No such file or directory"
<warefare> anyone else ran into this problem before?
atno has quit [Ping timeout: 260 seconds]
fgo has quit [Remote host closed the connection]
agjacome has quit [Quit: leaving]
<warefare> strange "compiling debug_inspector.c - make: I.: Command not found"
<hanmac> warefare hm guessing ... is "make" installed?
snovak has joined #ruby
<warefare> Hi, yes - I am about to remove it and reinstall
<warefare> maybe the path is not set
mklappstuhl has joined #ruby
cj3kim has joined #ruby
Xeago_ has quit [Read error: Connection reset by peer]
jonkri has joined #ruby
Xeago_ has joined #ruby
Xeago_ has quit [Read error: Connection reset by peer]
JumpMast3r has joined #ruby
Xeago_ has joined #ruby
Xeago_ has quit [Remote host closed the connection]
snovak has quit [Ping timeout: 260 seconds]
cj3kim has quit [Ping timeout: 240 seconds]
zorg24 has quit [Ping timeout: 260 seconds]
gimpygoo has quit [Ping timeout: 256 seconds]
emergion has joined #ruby
blaxter_ has joined #ruby
atno has joined #ruby
<banisterfiend> warefare lol i wrote that :)
<banisterfiend> debug_inspector
<warefare> :)
corpuscle has joined #ruby
saskuach has quit [Quit: saskuach]
<banisterfiend> warefare what gem are you installing exactly?
St_Marx has quit [Quit: Leaving]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
<warefare> I'm trying to install discourse, but yes it looks like some paths are not correct
<warefare> I added a symlink for gcc
mklappstuhl has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 246 seconds]
starfox21 has joined #ruby
bondar has joined #ruby
bondar has quit [Max SendQ exceeded]
pygospa has joined #ruby
saskuach has joined #ruby
blackmesa has joined #ruby
kraljev2 has quit [Ping timeout: 256 seconds]
linux_noob_666 has joined #ruby
TheRealPygo has quit [Ping timeout: 260 seconds]
BSaboia has joined #ruby
end_guy has quit [Ping timeout: 240 seconds]
zorg24 has joined #ruby
end_guy has joined #ruby
schaerli has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
Clooth has joined #ruby
waxjar has quit [Quit: ZNC - http://znc.in]
schaerli has quit [Remote host closed the connection]
pothibo has joined #ruby
vlad_starkov has joined #ruby
dodosan has joined #ruby
Clooth has quit [Client Quit]
Xeago_ has joined #ruby
intuxicated has quit [Ping timeout: 260 seconds]
Advocation has quit [Quit: Advocation]
dodosan has quit [Ping timeout: 259 seconds]
goganchic has quit []
Aryasam has joined #ruby
atno has quit [Ping timeout: 260 seconds]
cody-- has joined #ruby
okinomo has quit [Ping timeout: 260 seconds]
apeiros has quit [Remote host closed the connection]
waxjar has joined #ruby
jonkri has quit [Quit: jonkri]
soya has joined #ruby
platzhirsch1 has joined #ruby
okinomo has joined #ruby
yekta has joined #ruby
jp- has joined #ruby
zarubin has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
duggiefresh has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
atno has joined #ruby
vlad_starkov has joined #ruby
platzhirsch1 has left #ruby [#ruby]
duggiefresh has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kaspergrubbe has joined #ruby
platzhirsch has joined #ruby
<platzhirsch> How is it going down here? :)
mansi has joined #ruby
Aryasam has quit [Ping timeout: 264 seconds]
intuxicated has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
Notte has quit [Remote host closed the connection]
mansi has quit [Ping timeout: 264 seconds]
randomdrake has joined #ruby
kaspergrubbe has joined #ruby
sambao21 has joined #ruby
atno has quit [Ping timeout: 264 seconds]
randomdrake has quit [Ping timeout: 256 seconds]
saskuach has quit [Quit: saskuach]
mary5030 has joined #ruby
sambao21 has quit [Remote host closed the connection]
sambao21 has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
sambao21 has quit [Client Quit]
saskuach has joined #ruby
vlad_starkov has joined #ruby
DanKnox_away is now known as DanKnox
Xeago_ has quit [Read error: Connection reset by peer]
Advocation has joined #ruby
DrCode has quit [Ping timeout: 240 seconds]
Xeago_ has joined #ruby
hogeo has joined #ruby
Banistergalaxy has joined #ruby
Xeago_ has quit [Read error: Connection reset by peer]
Xeago_ has joined #ruby
Cyrus has quit [Read error: Operation timed out]
Xeago_ has quit [Read error: Connection reset by peer]
rcosta has joined #ruby
snovak has joined #ruby
DrCode has joined #ruby
Xeago_ has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
saskuach has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Ping timeout: 264 seconds]
polaco_zZz is now known as polaco
sevenseacat has joined #ruby
d45h has joined #ruby
saskuach has joined #ruby
saskuach has quit [Client Quit]
rcosta has quit [Remote host closed the connection]
Advocation has quit [Quit: Advocation]
snovak has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
saskuach has joined #ruby
vlad_starkov has joined #ruby
intuxicated has quit [Ping timeout: 246 seconds]
dash_ has quit [Ping timeout: 256 seconds]
DanKnox is now known as DanKnox_away
vlad_starkov has quit [Ping timeout: 264 seconds]
yekta has quit [Quit: yekta]
mary5030 has quit [Remote host closed the connection]
starfox21 has quit [Quit: starfox21]
relix has joined #ruby
zorg24 has quit [Ping timeout: 260 seconds]
ananthakumaran has joined #ruby
<linduxed> hey guys, yesterday i was in a discussion with a co-worker and we started talking about a piece of code which we had extracted into a class
mengu has joined #ruby
<linduxed> the thing is that the main method which would be used was more like a function
maroloccio has joined #ruby
<linduxed> you provided two arguments and got back a result
<linduxed> no side effects
colonolGron has quit [Ping timeout: 260 seconds]
<linduxed> so the question was, why should we instantiate that class? why work with an object when we could just provide a class method?
mfridh has quit [Ping timeout: 240 seconds]
colonolGron has joined #ruby
duggiefresh has joined #ruby
<linduxed> i still voted for going the instance method route, but since the implementation was fairly easy and we would only ever have one instance of it
ryandeussing has joined #ruby
<linduxed> it just felt like BananaSearcher.find(green_banana) was kind of the same as BananaSearcher.new(green_banana).find
Guest1214 has joined #ruby
okinomo_ has joined #ruby
<platzhirsch> linduxed: well, I know this situation you have described
okinomo has quit [Ping timeout: 260 seconds]
saskuach has quit [Quit: saskuach]
<platzhirsch> but what about module methods?
emergion has quit [Quit: Computer has gone to sleep.]
<platzhirsch> module BananaSeacher; def self.find(green_banana); ... ; end; end
mansi has joined #ruby
duggiefresh has quit [Remote host closed the connection]
<Guest1214> hi
mfridh has joined #ruby
starfox21 has joined #ruby
fflush has joined #ruby
Guest1214 has quit [Client Quit]
<fflush> bonjour
Xeago_ has quit [Remote host closed the connection]
<linduxed> platzhirsch: yeah that could be an idea, but this wouldn't be something what would have been reused
<linduxed> so i think a class makes more sense
<platzhirsch> how come?
<platzhirsch> How come the class is more likely to be reused?
<platzhirsch> Because it's probably going to get a state?
schaerli has joined #ruby
sayan has quit [Ping timeout: 240 seconds]
<linduxed> no i'm saying that in both cases it probably won't be reused
kreantos has joined #ruby
<platzhirsch> ah
<linduxed> so i figured it fits a bit better to extract into a class
<shevy> that is the kind of discussion that just should not be happen really
<platzhirsch> shevy: why?
<shevy> because it only exists as there is a functional difference between modules and classes
kreantos has quit [Read error: Connection reset by peer]
funburn has joined #ruby
<shevy> when do you guys use module methods and when do you guys use class methods?
kreantos has joined #ruby
vlad_starkov has joined #ruby
fgo has joined #ruby
<platzhirsch> So modules are are nice if you want to mixin behavior (imo). But I also tend to use modules to namespace certain static methods
funburn has quit [Client Quit]
cj3kim has joined #ruby
kreantos_ has joined #ruby
vlad_starkov has quit [Read error: No route to host]
<platzhirsch> and class methods if I happen to have a class anyway and I want to put a functionality into it because it is a) not based on an object's state b) can or should be used by other instances
vlad_starkov has joined #ruby
rcosta has joined #ruby
<Banistergalaxy> Linduxed instances are better if you need to store state
<Banistergalaxy> And threads or whatever could be used
<platzhirsch> shevy: or what do you mean?
colonolGron has quit [Quit: Lost terminal]
duggiefresh has joined #ruby
cina has joined #ruby
Xeago has quit [Remote host closed the connection]
emergion has joined #ruby
Xeago has joined #ruby
kreantos has quit [Ping timeout: 240 seconds]
cj3kim has quit [Ping timeout: 246 seconds]
agjacome has joined #ruby
cads has quit [Ping timeout: 264 seconds]
agjacome has quit [Client Quit]
kindjal has joined #ruby
jefflyne3 has joined #ruby
lupine has left #ruby [#ruby]
blaxter_ has quit [Quit: foo]
Ripp__ has joined #ruby
freerobby has joined #ruby
sambao21 has joined #ruby
fgo has quit [Remote host closed the connection]
lupine has joined #ruby
freerobby has quit [Client Quit]
emergion has quit [Quit: Computer has gone to sleep.]
<linduxed> Banistergalaxy: yes i know that
<linduxed> Banistergalaxy: but this is specifically a case where I pretty much won't store state
zorg24 has joined #ruby
sysop2 has quit [Ping timeout: 245 seconds]
<linduxed> it's a special case
freerobby has joined #ruby
freerobby has quit [Client Quit]
<Banistergalaxy> If they're pure functions, who cares ;)
jerius has joined #ruby
Xeago has quit [Ping timeout: 246 seconds]
vlad_sta_ has joined #ruby
freerobby has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Ping timeout: 256 seconds]
<platzhirsch> who cares, hah.. the Ruby case
robbyoconnor has joined #ruby
jbpros has joined #ruby
freerobby has quit [Quit: Leaving.]
randomdrake has joined #ruby
vlad_starkov has joined #ruby
<Banistergalaxy> Idiot
freerobby has joined #ruby
soya has quit [Quit: WeeChat 0.4.1]
krz has joined #ruby
<platzhirsch> :|
Ripp__ has quit []
<platzhirsch> Banistergalaxy: I just wanted to express that I found this idiomatic as Ruby advertises itself with many ways to do the same thing
<Banistergalaxy> Weak
<shevy> platzhirsch there is not much choice we get right now due to the way how ruby was designed
<shevy> platzhirsch that something is really odd is the fact that the predominant way to handle inheritance (by subclassing) is at odds with what many other people like to use (include-functionality through modules, even to the point where you dont have to subclass at all)
vlad_sta_ has quit [Ping timeout: 256 seconds]
<shevy> platzhirsch you wrote that you use modules to namespace other methods. but you could use a class as well as namespace container
<platzhirsch> shevy: so you would say that's legitimate as well?
randomdrake has quit [Ping timeout: 264 seconds]
<platzhirsch> it just felt a bit wrong, but then again I only know design from Java, C#, Python,..
<shevy> platzhirsch well, ruby allows it. I myself absolutely hate that
jbpros has quit [Ping timeout: 256 seconds]
<shevy> as apeiros once wrote when I asked him why he used class as namespace, he said he got more features that way (because he can call .new on his main namespace, which he could not if he would use a module instead)
<shevy> class Foo; class Bar
<shevy> vs
<shevy> module Foo; class Bar
rcosta has quit [Ping timeout: 246 seconds]
<platzhirsch> well there is a point in extending the namespace to something with a state in a later phase of development...
rcosta has joined #ruby
timonv has joined #ruby
dodosan has joined #ruby
DoritosMan has joined #ruby
bluenemo has quit [Ping timeout: 264 seconds]
apeiros has joined #ruby
_maes_ has joined #ruby
<shevy> those questions often puzzled me
kreantos_ has quit [Ping timeout: 260 seconds]
<shevy> like "when do I have to use @@foo variables"
<platzhirsch> shevy: never :D
<shevy> yeah but did anyone say that before?
dodosan has quit [Ping timeout: 256 seconds]
<shevy> I think I saw them first in the pickaxe book
snovak has joined #ruby
okinomo_ has quit [Ping timeout: 264 seconds]
<shevy> it would be nice to have a table listing the efficiency and usefulness of programming language features
<shevy> instance-variables: very, very useful
<shevy> class-variables: almost utterly useless
<shevy> global-variables: limited use case, but ugly
quoin has quit [Remote host closed the connection]
<platzhirsch> shevy: it's very unbalanced that one can make such judgment, with whom I all agree, about language features
wallerdev has joined #ruby
_maes_ has quit [Quit: Miranda IM! Smaller, Faster, Easier. http://miranda-im.org]
<hanmac> shevy you forgot block-local-variables ;P
okinomo has joined #ruby
<shevy> platzhirsch dunno... in ruby it sometimes feel as if things are tried without it being really necessary
<shevy> like the -> syntax
snovak has quit [Ping timeout: 264 seconds]
<shevy> anyone knows of a big project / big gem that uses -> ?
saskuach has joined #ruby
<saskuach> Well.
<platzhirsch> shevy: heh, no... but would it matter?
<platzhirsch> It's like asking if any big project/big gem uses .map over .collect ?
fgo has joined #ruby
<sevenseacat> lol
<platzhirsch> or is there a functional difference ?
bluenemo has joined #ruby
<shevy> dunno
<shevy> -> is an alias to what other way?
<platzhirsch> writing lambda
<shevy> hmm
sergicles has joined #ruby
veronica has joined #ruby
Nenor has quit [Quit: Nenor]
<shevy> _ = ->(x) { x*2 }; _.call 5 # => 10
<veronica> hi how can i tunnel smtp connections thru a proxy via ruby?
arca0 has joined #ruby
<shevy> _ = lambda {|x| x*1 }; _.call 5
kreantos has joined #ruby
<shevy> should have been a x*2 :P
<shevy> lol platzhirsch look: _ = ->(_) { _*2 }; _.call 5 # => 10
banghouse2 has joined #ruby
<platzhirsch> shevy: :o
<shevy> platzhirsch I guess -> may be faster than lambda ?
<platzhirsch> shevy: it was advertised as more intuitive to read
<platzhirsch> light-weight for the eyes to parse
<platzhirsch> CoffeeScript has brought is this agile arrow
<shevy> does anyone have a benchmark ready to compare these two?
<platzhirsch> what? ^^
fgo has quit [Ping timeout: 240 seconds]
<shevy> I wanna know whether lambda or -> is faster
<shevy> I really think there is a difference!
<lupine> bench it \o/
Aryasam has joined #ruby
RDash is now known as RDash[AW]
saskuach has quit [Quit: saskuach]
<platzhirsch> bench, bench, bench, bench!
<platzhirsch> let's gamble
<shevy> nah
<shevy> I will simply claim that -> is much faster
<shevy> after all, it looks faster
<shevy> it's lean
<shevy> it's agile
<platzhirsch> hahaha
<platzhirsch> pheewwww ------------->
timonv has quit [Ping timeout: 256 seconds]
saskuach has joined #ruby
katsrc has joined #ruby
effbiai has left #ruby [#ruby]
hamakn has joined #ruby
Aryasam has quit [Ping timeout: 256 seconds]
rcosta_ has joined #ruby
jbpros has joined #ruby
okinomo has quit [Ping timeout: 240 seconds]
wallerdev has quit [Quit: wallerdev]
dodosan has joined #ruby
<apeiros> it's definitively tons faster! the parser has to consume 4 characters less! that's a decrease of 66.667%!
<shevy> yeah
<MrZYX> for only one additional matching paren lookup :P
premera_w_j has joined #ruby
azcodex has joined #ruby
premera has joined #ruby
<apeiros> MrZYX: hu?
jerius has quit []
<apeiros> ->{} # valid
youcallme has quit [Remote host closed the connection]
<apeiros> ->(){} #valid, () is same amount of chars as ||
<apeiros> or what are you referring to?
<shevy> cool
<MrZYX> well, in theory || is faster because you just consume until the next |
<shevy> the ->{} looks as if a laser attack happened on an UFO
<MrZYX> with () you need to track the open ones
rcosta has quit [Ping timeout: 256 seconds]
<apeiros> MrZYX: haha, no
<apeiros> >> proc { |a=1|2| a }
<eval-in> apeiros => #<Proc:0x41ac5120@/tmp/execpad-9c63b94e992b/source-9c63b94e992b:2> (https://eval.in/48434)
<shevy> ->{5+5}[] # => 10
<apeiros> mewp, failed to call it
premera_w has quit [Ping timeout: 240 seconds]
<apeiros> >> lambda { |a=1|2| a }.call
<eval-in> apeiros => 3 (https://eval.in/48435)
<shevy> hehe
<apeiros> so much for "just scan for the next |"
<shevy> :D
<MrZYX> hmm, okay I admit I forgot or
<MrZYX> I use that so rarely :P
<apeiros> >> lambda { |a=(1||2)| a }.call
<eval-in> apeiros => 1 (https://eval.in/48436)
<shevy> hmmm
<apeiros> so we have both, syntax || and method call |
<shevy> that code scares me
cj3kim has joined #ruby
premera_w_j has quit [Ping timeout: 240 seconds]
dodosan has quit [Ping timeout: 264 seconds]
<shevy> and it does not work with -> ?
<apeiros> why wouldn't it?
<shevy> I dunno, I tried it and failed
<apeiros> ->(a=1|2){a}.call
<apeiros> >> ->(a=1|2){a}.call
<eval-in> apeiros => 3 (https://eval.in/48437)
<shevy> ah
dhruvasagar has quit [Ping timeout: 256 seconds]
<shevy> that looks so weird ... :\
<waxjar> even ruby can look ugly :D
<shevy> :(
KobraKao has joined #ruby
apeiros is now known as proc{|x|x^2}
<proc{|x|x^2}> too sad
cj3kim has quit [Ping timeout: 240 seconds]
<waxjar> heh
<proc{|x|x^2}> while this is a valid nick, ->{|x|x^2} is not :(
proc{|x|x^2} is now known as apeiros
tungd has quit [Quit: leaving]
KobraKao has quit [Client Quit]
tungd has joined #ruby
jbpros has quit [Quit: jbpros]
Xeago has joined #ruby
adambeynon has joined #ruby
rcosta has joined #ruby
zmike123 has joined #ruby
saskuach has quit [Quit: saskuach]
azcodex has quit [Quit: azcodex]
aryaching has joined #ruby
tungd has quit [Client Quit]
sevenseacat has quit [Quit: Leaving.]
tungd has joined #ruby
karakhul has joined #ruby
jefflyne3 has quit [Ping timeout: 246 seconds]
rcosta_ has quit [Ping timeout: 240 seconds]
bluOxigen has joined #ruby
T_T has joined #ruby
workmad3 has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
<shevy> proc{|x|x^2}.call
saskuach has joined #ruby
<platzhirsch> so, what's the result?
atno has joined #ruby
Lewix has joined #ruby
<platzhirsch> I bet 100$ on it does not matter, what do I get?
cina has quit [Remote host closed the connection]
<apeiros> the result would probabl be an exception
<apeiros> since nil^2 doesn't work well
dmiller has joined #ruby
cina has joined #ruby
T_T has quit [Remote host closed the connection]
fgo has joined #ruby
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
randomdrake has joined #ruby
dmiller has quit [Ping timeout: 256 seconds]
fgo has quit [Ping timeout: 260 seconds]
T_T has joined #ruby
Clooth has joined #ruby
nx000bsd has quit [Read error: Connection reset by peer]
nx000bsd has joined #ruby
fridim__ has joined #ruby
Lewix has quit [Remote host closed the connection]
<Suit_Of_Sables> ls
forced_request has joined #ruby
<Suit_Of_Sables> ewps, notta shell >.<
LeafMan has joined #ruby
<LeafMan> Hey, how can I declare private functions in Python
DrCode has quit [Ping timeout: 240 seconds]
randomdrake has quit [Ping timeout: 246 seconds]
<apeiros> LeafMan: wrong channel
<LeafMan> apeiros: ,,|,,
dhruvasagar has joined #ruby
kreantos has quit [Ping timeout: 240 seconds]
LeafMan was kicked from #ruby by apeiros [yeah, no, that kind of behavior is not accepted here]
<canton7> and you don't, iirc? You prepend them with '_' and hope no-one sees them
sambao21 has joined #ruby
JumpMast3r has quit [Quit: JumpMast3r]
<canton7> damn
<canton7> bit harsh....
<apeiros> the ban? it'll be removed in 5~10min
<canton7> why bad at all?
<canton7> *ban
<apeiros> because idiots tend to come back and spout nonsense.
Lewix has joined #ruby
<apeiros> and 5-10min is usually enough for them to come to their senses.
<canton7> he's a guy who got the wrong channel
<apeiros> canton7: um
<apeiros> 17:23 LeafMan: apeiros: ,,|,,
cina has quit [Ping timeout: 264 seconds]
browndawg has quit [Ping timeout: 264 seconds]
<apeiros> figure what that means :-p
<shevy> is that an ascii middle finger?
<apeiros> yes
<canton7> fair, I haven't seen that one before
<shevy> In all my years of IRC I never had that idea yet :D
<apeiros> it's not "getting the wrong channel" which got him kicked ;-)
<shevy> hehehehe
<platzhirsch> good thing it has two commas on each side and not just one
<apeiros> if that had been all, then yes, kicking would have been waaay out of bounds
<shevy> platzhirsch how about that ~,|,~
Lewix has quit [Remote host closed the connection]
katsrc has quit [Remote host closed the connection]
Lewix has joined #ruby
<platzhirsch> shevy: oh...
saskuach has quit [Quit: saskuach]
<shevy> hmm.. I can't draw in reallife... and I can't draw in ascii either
dodosan has joined #ruby
<apeiros> canton7: just trust in me making sane decisions :-p
<apeiros> wrt kicking/banning
Guest63395 has quit [Ping timeout: 240 seconds]
Lewix has quit [Remote host closed the connection]
<canton7> haha, agreed it's reasonable. I hadn't seen that particular ascii before, and so was surprised, hence my questions
aryaching has quit []
Lewix has joined #ruby
<apeiros> sure, sure. I was kidding anyway. it's a good idea to watch the watchers.
<canton7> anyway, cue rant about pythoners being rude bastards? ;)
<apeiros> dunno, don't know too many pythonistas
carraroj has joined #ruby
<platzhirsch> I will go back to Python programming when preparing for coding interview questions... sigh
<canton7> hmm, neither. the best one I know picked it up because I was insisting that ruby > python... same with git/hg
dodosan has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Read error: Operation timed out]
DrCode has joined #ruby
kreantos has joined #ruby
chairabanta has joined #ruby
kobain has joined #ruby
kobain has quit []
<veronica> how can i tunnel via an http proxy
|jemc| has joined #ruby
kobain has joined #ruby
browndawg has joined #ruby
kilophoton has joined #ruby
duggiefresh has quit [Read error: Connection reset by peer]
duggiefr_ has joined #ruby
<canton7> veronica, how many languages are you trying to do this in?
<shevy> chinese
<canton7> ##php and #ruby so far.. not seen him in ##csharp
<shevy> hehe
<veronica> php ruby i triedd commandline linux
<veronica> i'll soon hit cpp
aryaching has joined #ruby
<shevy> now try GUI linux!
<shevy> cpp has good tunnels
<veronica> this is SOOO easy that i don't know how anyone cant answer this tto me.
dhruvasagar has quit [Ping timeout: 264 seconds]
<apeiros> if it's so easy, why do you need an answer at all then?
Lewix has quit [Remote host closed the connection]
<apeiros> if you don't know the answer, how do you know it is soooo easy?
Lewix has joined #ruby
<canton7> the problem is that it's a very open question. people tend not to like to get stuck into those sorts of questions unless they have a lot of time available, right now
<apeiros> veronica: you tunnel through an http proxy by setting your http proxy option
sergicles has left #ruby [#ruby]
kreantos has quit [Ping timeout: 260 seconds]
jbpros has joined #ruby
rcosta has quit [Read error: Connection reset by peer]
Lewix has quit [Remote host closed the connection]
jbpros has quit [Client Quit]
rcosta has joined #ruby
Lewix has joined #ruby
cody-- has quit [Quit: derp]
carraroj has quit [Ping timeout: 261 seconds]
zmike123 has quit [Quit: ~]
Lewix has quit [Remote host closed the connection]
grzywacz has joined #ruby
Lewix has joined #ruby
noop has joined #ruby
wallerdev has joined #ruby
LeafMan has joined #ruby
DoritosMan has quit [Quit: MacBook has gone to sleep]
Yakko has joined #ruby
Lewix has quit [Remote host closed the connection]
<LeafMan> Sorry, I think I stated the question in the wrong channel? ⨀_Ꙩ
Lewix has joined #ruby
noop is now known as noopq
vlad_starkov has joined #ruby
Guest63395 has joined #ruby
kvirani has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby
rcosta_ has joined #ruby
vlad_sta_ has joined #ruby
Lewix has quit [Remote host closed the connection]
rcosta has quit [Ping timeout: 264 seconds]
Lewix has joined #ruby
tjj has joined #ruby
<tjj> I'm a total ruby newbie, and I'm trying to install the package at https://github.com/mingjin/vagrant-ovf. When I try to run "gem install vagrant-ovf" like the docs say, gem gives the error "Could not find a valid gem 'vagrant-ovf' in any repository". What am I doing wrong?
vlad_st__ has joined #ruby
Lewix has quit [Remote host closed the connection]
<LeafMan> tjj: ಠ︵ಠ凸
coderhs has quit [Ping timeout: 260 seconds]
<tjj> eh?
* LeafMan purs gasoline over apeiros and puts him to the fire
LeafMan was kicked from #ruby by apeiros [LeafMan]
<C0deMaver1ck> wat just happened
<apeiros> he's probably some troll
dhruvasagar has joined #ruby
<apeiros> tjj: I think you can safely ignore what LeafMan said.
vlad_starkov has quit [Ping timeout: 256 seconds]
ewnd9_ has quit [Remote host closed the connection]
ewnd9 has joined #ruby
randomdrake has joined #ruby
Es0teric has joined #ruby
nazty has quit [Read error: No route to host]
karakhul has quit [Remote host closed the connection]
okinomo has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
vlad_sta_ has quit [Ping timeout: 264 seconds]
kreantos has joined #ruby
<MrZYX> tjj: there's no such gem on rubygems.org so poke the maintainer about that
ehc has joined #ruby
<tjj> MrZYX: OK, thanks...after reading more it looks like the package doesn't do what I wanted anyways
byprdct has joined #ruby
<canton7> tjj, for future, if the gem isn't on rubygems, you'd have to clone that repo, gem build <file>.gemspec, gem install <file>.gem
tomzx_mac has joined #ruby
fgo has joined #ruby
Guest63395 has quit [Remote host closed the connection]
vlad_st__ has quit [Read error: Connection reset by peer]
saskuach has joined #ruby
closer has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
okinomo has quit [Ping timeout: 264 seconds]
dodosan has joined #ruby
Guest63395 has joined #ruby
carraroj has joined #ruby
adeponte has joined #ruby
dodosan has quit [Read error: Connection reset by peer]
closer has joined #ruby
starfox21 has quit [Ping timeout: 260 seconds]
dodosan has joined #ruby
cina has joined #ruby
defrag has quit [Ping timeout: 245 seconds]
mengu has quit [Quit: Leaving]
vlad_starkov has quit [Read error: Connection reset by peer]
Lewix has joined #ruby
vlad_starkov has joined #ruby
cj3kim has joined #ruby
adeponte has quit [Remote host closed the connection]
saskuach has quit [Quit: saskuach]
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby
Lewix has quit [Read error: Connection reset by peer]
Lewix has joined #ruby
_Minos_ has joined #ruby
quoin has joined #ruby
starfox21 has joined #ruby
Lewix has quit [Remote host closed the connection]
kindjal has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
dweeb has quit [Quit: Textual IRC Client: www.textualapp.com]
cj3kim has quit [Ping timeout: 264 seconds]
saskuach has joined #ruby
dross has joined #ruby
mrsolo has joined #ruby
Rostiz has joined #ruby
<Rostiz> how can I debug my Rails app?
<MrZYX> that's a very broad question and also a question for #rubyonrails ;)
sarkis has joined #ruby
postmodern has quit [Quit: Leaving]
coderhs has joined #ruby
Advocation has joined #ruby
ferdev has joined #ruby
<Rostiz> MrZYX: :*(
<Rostiz> I think you are right
* Rostiz feeds MrZYX some fresh fetuses
pwh has joined #ruby
mikepack has joined #ruby
defrag has joined #ruby
ehc has quit [Quit: ehc]
<platzhirsch> uhm
Yvemath has joined #ruby
kreantos has quit [Ping timeout: 264 seconds]
<MrZYX> (yeah I guess he's back)
ewnd9 has quit [Remote host closed the connection]
ewnd9 has joined #ruby
dmiller has joined #ruby
dhruvasagar has joined #ruby
<shevy> how can my cat learn ruby?
<Rostiz> shevy: It cannot
Lewix has joined #ruby
nathancahill has joined #ruby
<Rostiz> shevy: doesn't have the cognitive capabilities
grzywacz has quit [Quit: :wq]
<shevy> :(
<Rostiz> shevy: you should put your cat down
<shevy> lol
<Rostiz> a pet which cannot program is worthless
<MrZYX> which pet could program?
<Rostiz> MrZYX: well, you can program, can't you?
quoin has quit [Ping timeout: 246 seconds]
<MrZYX> I'm not a pet though
Lewix has quit [Remote host closed the connection]
vlad_starkov has quit [Read error: Connection reset by peer]
coderhs has quit [Ping timeout: 256 seconds]
<shevy> that's what all pets say!
katsrc has joined #ruby
<MrZYX> prove me wrong :P
<Rostiz> yep
Lewix has joined #ruby
<shevy> "me is a real cat, no is me pet cat is"
vlad_starkov has joined #ruby
<Rostiz> so, be a gentle pet and eat your fetuses
dmiller has quit [Ping timeout: 240 seconds]
Lewix has quit [Remote host closed the connection]
randomdrake has quit [Ping timeout: 264 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
hogeo has quit [Remote host closed the connection]
cody-- has joined #ruby
Xeago has joined #ruby
<platzhirsch> ugh
ferdev has quit [Quit: ferdev]
randomdrake has joined #ruby
BSaboia has quit [Ping timeout: 264 seconds]
ferdev has joined #ruby
saskuach has quit [Quit: saskuach]
carraroj has quit [Quit: Konversation terminated!]
vlad_starkov has quit [Remote host closed the connection]
quando has joined #ruby
pwh has quit [Quit: pwh]
nathancahill has quit [Quit: nathancahill]
rcosta_ has quit [Remote host closed the connection]
intuxicated has joined #ruby
rcosta has joined #ruby
vlad_starkov has joined #ruby
tclark has joined #ruby
atno has quit [Ping timeout: 260 seconds]
cody-- has quit [Quit: derp]
snovak has joined #ruby
schaerli has quit [Remote host closed the connection]
coderhs has joined #ruby
brunoro has joined #ruby
BSaboia has joined #ruby
oliver_ has quit [Write error: Connection reset by peer]
oliver_ has joined #ruby
duggiefresh has joined #ruby
rcosta has quit [Ping timeout: 264 seconds]
rcosta_ has joined #ruby
atno has joined #ruby
duggiefr_ has quit [Read error: Connection reset by peer]
snovak has quit [Ping timeout: 264 seconds]
Catbuntu has joined #ruby
cody-- has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
duggiefresh has quit [Read error: Connection reset by peer]
duggiefr_ has joined #ruby
duggiefr_ has quit [Remote host closed the connection]
saskuach has joined #ruby
blackmesa has joined #ruby
bluOxigen has quit []
Advocation has quit [Quit: Advocation]
atno has quit [Ping timeout: 265 seconds]
ewnd9 has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 264 seconds]
Rostiz has quit [Quit: Page closed]
BSaboia has quit [Remote host closed the connection]
kraljev2 has joined #ruby
mansi has quit [Ping timeout: 240 seconds]
<kraljev2> EM.add_timer(rand) { some_code() }
<kraljev2> how can I assure no some_code() is going to be run in paralel
<kraljev2> one way is to wrap code in SQL transaction and execure FOR UPDATE
<kraljev2> but...?
<waxjar> ruby can't do paralellism
<kraljev2> even if some_code() is performing IO, no other some_code should be run at the same time
yfeldblum has quit [Ping timeout: 264 seconds]
TripleDES has quit [Ping timeout: 240 seconds]
saskuach has quit [Quit: saskuach]
devoldmx has quit [Ping timeout: 256 seconds]
IceDragon has joined #ruby
virtualize has quit []
<kraljev2> please help
devoldmx has joined #ruby
saskuach has joined #ruby
dmiller has joined #ruby
Notte has joined #ruby
Notte has quit [Remote host closed the connection]
ferdev has quit [Quit: ferdev]
rcosta has joined #ruby
virtualize has joined #ruby
jamesaanderson has joined #ruby
tylersmith has joined #ruby
<brunoro> kraljev2: if they don't have any data dependencies you could fork processes to acheive parallelism
<brunoro> if your `work` functions aren't data dependent, I mean
<kraljev2> sadly, they are
rcosta_ has quit [Ping timeout: 260 seconds]
Advocation has joined #ruby
<brunoro> well, then you _shouldn't_ be running it in parallel
Lewix has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
timonv has joined #ruby
<kraljev2> those are websocket callsž
pjb1 has quit [Quit: pjb1]
<kraljev2> I am trying to achieve that
arca0 has quit [Remote host closed the connection]
<MrZYX> did you try to use a mutex yet?
aryaching has quit [Ping timeout: 257 seconds]
<kraljev2> Thread::Mutex ?
cj3kim has joined #ruby
rcosta has quit [Remote host closed the connection]
saskuach has quit [Remote host closed the connection]
<MrZYX> it's in the toplevel namespace for me
quando has quit [Quit: quando]
schaerli has joined #ruby
<MrZYX> But I'm pretty sure there's only one
<kraljev2> yep, but it doesn't interfere with EM
saskuach has joined #ruby
Spami has joined #ruby
<|jemc|> Thread.exclusive { some_code }
<|jemc|> will ensure that no threads interrupt some_code
Lewix has quit [Remote host closed the connection]
saskuach has quit [Client Quit]
blackmesa has quit [Ping timeout: 240 seconds]
<kraljev2> And what about if I have a board game, 4 people present
<kraljev2> and just people in front of the same board cannot run calls in parallel?
Lewix has joined #ruby
<kraljev2> poeple from different boards should.
saskuach has joined #ruby
<MrZYX> do you need to save the call?
fgo has quit [Remote host closed the connection]
rcosta has joined #ruby
<|jemc|> a board-local mutex is what I would probably use
oliver_ has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
Lewix has quit [Remote host closed the connection]
oliver_ has joined #ruby
Lewix has joined #ruby
aryaching has joined #ruby
<|jemc|> just remember that if your mutex'd code calls itself at any point, you should be using a reentrant lock instead
mrsolo has joined #ruby
<|jemc|> Monitor instead of Mutex
cj3kim has quit [Ping timeout: 256 seconds]
saskuach has quit [Remote host closed the connection]
saskuach has joined #ruby
<kraljev2> but if i don't use EM specific functions for let's say network calls
<kraljev2> then EM won't paralelize the calls anyway?
<kraljev2> because all calls are blocking?
Advocation has quit [Quit: Advocation]
Lewix has quit [Remote host closed the connection]
Ripp__ has joined #ruby
<|jemc|> well, I can't say because I don't use EM. sorry to butt in
byprdct has quit [Ping timeout: 240 seconds]
<kraljev2> I wouldn't either, If faye websocket wouldn't force me
saskuach has quit [Remote host closed the connection]
axl_ has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
<|jemc|> I'm working on a different async library at the moment
aryaching has joined #ruby
<kraljev2> cool :)
<|jemc|> but of no use to you in this conversation, unfortunately
<|jemc|> like I said, sorry to butt in where my knowledge isn't directly relevant
devoldmx3 has joined #ruby
schaerli has quit [Ping timeout: 264 seconds]
kreantos has joined #ruby
saskuach has joined #ruby
endash has joined #ruby
Lewix has joined #ruby
adeponte has joined #ruby
cj3kim has joined #ruby
Breadcrumbs has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
Lewix has quit [Remote host closed the connection]
Lewix has joined #ruby
Macaveli has joined #ruby
Lewix has quit [Remote host closed the connection]
brianpWins has quit [Quit: brianpWins]
rcosta_ has joined #ruby
jefflyne3 has joined #ruby
adeponte has quit [Ping timeout: 260 seconds]
platzhirsch has left #ruby [#ruby]
apeiros has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
vlad_starkov has joined #ruby
rcosta has quit [Ping timeout: 259 seconds]
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
<AntelopeSalad> how would i go about asserting that a meta title's content attribute is not empty?
Xeago_ has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
nowthatsamatt has quit [Quit: nowthatsamatt]
EIA has joined #ruby
Macaveli has quit [Quit: Computer has gone to sleep.]
Yakko has quit [Remote host closed the connection]
Trudko_ has joined #ruby
<Trudko_> guys is this good way how to deal with nil values when using select over array ? @players.select { |player| if player.team.nil? then false else player.rebricky_team.id == team.to_i end }
kaspergrubbe has quit [Remote host closed the connection]
kreantos has quit [Ping timeout: 256 seconds]
axl_ has quit [Quit: axl_]
<waxjar> @players.reject(&:nil?).select { |player| … }
lkba has joined #ruby
julweber has joined #ruby
Tuxist has quit [Read error: Connection reset by peer]
julweber has quit [Remote host closed the connection]
<waxjar> it'll go over it twice, though. if performance is an issue probably go with something like @players.select { |p| p && p == x }
blackmesa has joined #ruby
<Trudko_> waxjar: not sure players can have lets say several hundres elements seems lot
saskuach has quit [Ping timeout: 264 seconds]
<Morrolan> It's not.
snovak has joined #ruby
ggordan has joined #ruby
<waxjar> i'd go with the clearer code. if you start experiencing problems, optimize :)
N3wtzer has joined #ruby
cinch_ has joined #ruby
cinch_ has quit [Remote host closed the connection]
saskuach has joined #ruby
FIQ has joined #ruby
<kraljev2> @players.compact
<kraljev2> is better than
<kraljev2> @players.reject(&:nil?)
<r0bglees0n> why?
<kraljev2> more readable
<kraljev2> concise
<r0bglees0n> not to me its not
aryaching_ has joined #ruby
cina has quit [Ping timeout: 264 seconds]
<kraljev2> well the function exists for a purpose
wallerdev has quit [Quit: wallerdev]
<r0bglees0n> haven't you found out that ruby has multiple ways to do the same thing yet ;)
kreantos has joined #ruby
<kraljev2> sure. :)
* apeiros concurs with kraljev2
wallerdev has joined #ruby
<Morrolan> If you know about that function then it's clearer, true. :)
<r0bglees0n> i knew about it
<r0bglees0n> i dont find it more clear
<apeiros> "if you don't know what the method doesn't then it's less clear" is equivalently universally true
saskuach has quit [Client Quit]
snovak has quit [Ping timeout: 264 seconds]
<apeiros> with reject + &:nil? you have 2 bits of infos to "parse", so to speak
<apeiros> compact - just one
mikepack has quit [Remote host closed the connection]
<Morrolan> "If you don't know what the method does not then it's less clear" sounds like an odd sentence.
aryaching has quit [Ping timeout: 246 seconds]
<r0bglees0n> apeiros: sure, but the information or "bits" expand to something than reads intent more clearly than compact
rcosta has joined #ruby
kreantos has quit [Remote host closed the connection]
<r0bglees0n> that reads*
<apeiros> Morrolan: yay, should have been 'does', not "doesn't"
<apeiros> how can you be more clear than "you have one job"? :)
Yvemath has quit [Ping timeout: 246 seconds]
<waxjar> "you have no job"
<apeiros> anyway, case of disagreement I guess
Yvemath has joined #ruby
baroquebobcat has joined #ruby
timonv has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
N3wtzer has quit [Ping timeout: 240 seconds]
<r0bglees0n> it would be awesome if there was a lazy-delete, like, foo.lazy_compact.each {}, which didn't yield nil values but made one iteration
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rcosta_ has quit [Ping timeout: 264 seconds]
ferdev has joined #ruby
Kelet has quit [Read error: Connection reset by peer]
Kelet has joined #ruby
<apeiros> do it?
tclark has quit [Read error: Connection reset by peer]
JesseH has quit [Quit: github.com/jessehorne]
sambao21 has joined #ruby
kaspergrubbe has quit [Write error: Connection reset by peer]
kaspergr_ has joined #ruby
<r0bglees0n> i find it hard to do things like that since ive started to prioritize the stuff i want to code
sambao21 has quit [Client Quit]
veronica has quit [Quit: Leaving]
gr33n7007h has joined #ruby
sayan has joined #ruby
<apeiros> obviously irc is outside that prioritization :-p
<apeiros> stuff which takes less than 5min, you should just do
<r0bglees0n> true
vlad_starkov has quit [Read error: No route to host]
<apeiros> 2min
vlad_starkov has joined #ruby
<apeiros> no tests though
<r0bglees0n> i wonder
<r0bglees0n> >> [1,2,nil,3].lazy.compact.each { |e| p e }
<eval-in> r0bglees0n => undefined method `compact' for #<Enumerator::Lazy: [1, 2, nil, 3]> (NoMethodError) ... (https://eval.in/48439)
<shevy> special coding powers derived by swiss chocolate
<r0bglees0n> >> [1,2,nil,3].lazy.reject(&:nil?).each { |e| p e }
<eval-in> r0bglees0n => 1 ... (https://eval.in/48440)
<r0bglees0n> how many iterations is that? =)
<shevy> 42
cj3kim has quit [Remote host closed the connection]
Yvemath has quit [Ping timeout: 264 seconds]
<waxjar> 1, but #lazy is slow :D
Kelet has quit [Quit: Leaving]
SJr has quit [Quit: ZNC - http://znc.sourceforge.net]
Kelet has joined #ruby
Kelet has quit [Client Quit]
Kelet has joined #ruby
jefflyne3 has quit [Ping timeout: 264 seconds]
Kelet has quit [Read error: Connection reset by peer]
mrsolo has quit [Quit: This computer has gone to sleep]
SJr has joined #ruby
rcosta_ has joined #ruby
mrsolo has joined #ruby
Kelet has joined #ruby
<r0bglees0n> i need a bench("blah") { } function
Yvemath has joined #ruby
pjb1 has joined #ruby
rcosta has quit [Ping timeout: 264 seconds]
dodosan has quit [Remote host closed the connection]
nomenkun has joined #ruby
dodosan has joined #ruby
<shevy> ohhh lazy benchmarking would be nice
Trudko_ has quit [Read error: Connection reset by peer]
pwh has joined #ruby
jefflyne3 has joined #ruby
EIAC has joined #ruby
Kudos has joined #ruby
kpshek has joined #ruby
nomenkun has quit [Read error: No route to host]
platzhirsch has joined #ruby
goshakkk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dodosan has quit [Ping timeout: 260 seconds]
nomenkun_ has joined #ruby
schaerli has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
EIAC has quit [Remote host closed the connection]
jefflyne3 has quit [Read error: Connection reset by peer]
chairabanta is now known as chairabanta|away
jefflyne3 has joined #ruby
nomenkun has joined #ruby
Soda has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
nomenkun has quit [Remote host closed the connection]
<platzhirsch> How's it going down here?
nomenkun_ has quit [Ping timeout: 256 seconds]
katsrc has quit [Remote host closed the connection]
dsferreira has quit [Quit: This computer has gone to sleep]
srji has quit [Remote host closed the connection]
goshakkk has joined #ruby
jamesaanderson has joined #ruby
rcosta has joined #ruby
jefflyne3 has quit [Ping timeout: 256 seconds]
quoin has joined #ruby
tungd has quit [Quit: Lost terminal]
rcosta_ has quit [Ping timeout: 259 seconds]
axisys has quit [Remote host closed the connection]
brianpWins has joined #ruby
nomenkun_ has joined #ruby
quoin has quit [Ping timeout: 264 seconds]
optimusprimem has quit [Remote host closed the connection]
nomenkun has joined #ruby
nomenkun_ has quit [Read error: Connection reset by peer]
mrsolo has quit [Quit: Leaving]
m_3 has quit [Remote host closed the connection]
rcosta_ has joined #ruby
kpshek has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
rcosta has quit [Ping timeout: 246 seconds]
tacos1de has quit [Remote host closed the connection]
goshakkk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tacos1de has joined #ruby
rcosta has joined #ruby
sambao21 has joined #ruby
rcosta_ has quit [Ping timeout: 264 seconds]
ehc has joined #ruby
sayan has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 246 seconds]
EIAC has joined #ruby
zorg24 has quit [Ping timeout: 264 seconds]
snovak has joined #ruby
Spami has quit [Quit: Leaving]
cody-- has quit [Quit: derp]
ntus1017 has joined #ruby
<shevy> it's pizza time
<r0bglees0n> yum
<r0bglees0n> turkish/greek food is very popular in the town i moved to
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
tesuji has joined #ruby
snovak has quit [Ping timeout: 256 seconds]
tesuji has quit [Client Quit]
tesuji has joined #ruby
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
abstractj has quit [Ping timeout: 264 seconds]
JesseH has joined #ruby
tesuji has quit [Client Quit]
dangerousdave has joined #ruby
tesuji has joined #ruby
abstractj has joined #ruby
krz has quit [Quit: krz]
<pontiki> one of my favourite kinds of food :) yummm
mstrbutlertron has joined #ruby
zorg24 has joined #ruby
azcodex has joined #ruby
ferdev has quit [Quit: ferdev]
EIAC has quit [Remote host closed the connection]
Lewix has joined #ruby
tesuji has quit [Remote host closed the connection]
EIAC has joined #ruby
ehc has quit [Quit: ehc]
tesuji has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<shevy> r0bglees0n where are you now?
rcosta has quit [Remote host closed the connection]
EIAC has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
Nisstyre-laptop has joined #ruby
matchaw has quit [Remote host closed the connection]
azcodex has quit [Quit: azcodex]
Nisstyre-laptop is now known as nisstyre
azcodex has joined #ruby
kraljev2 has left #ruby [#ruby]
sayan has joined #ruby
intuxicated has quit [Quit: Leaving]
JumpMast3r has joined #ruby
<banisterfiend> shevy he's a fellow european
noop has joined #ruby
dodosan has joined #ruby
kaspergr_ has quit [Ping timeout: 256 seconds]
kaspergrubbe has joined #ruby
<platzhirsch> Europe does not have an identify :P
noopq has quit [Ping timeout: 260 seconds]
rcosta has joined #ruby
kpshek has joined #ruby
EIAC has joined #ruby
matchaw has joined #ruby
<banisterfiend> platzhirsch no, they're all just silly and backwards and speak dying languages
<banisterfiend> (i live there too :P)
dodosan has quit [Ping timeout: 246 seconds]
<platzhirsch> Well, identifying as a European citizen for instance as opposed to identifying with the own country ^^
dankest has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
EIAC has quit [Remote host closed the connection]
Catbuntu has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
<shevy> platzhirsch right because it does not make much sense or difference
<waxjar> i only identify myself as european towards americans, really.
<shevy> either one belongs to (xyz) nation, or one is a world citizen
<platzhirsch> Although I feel like feeling very comfortable when traveling between EU countries and just need to show my identifcation and not my passport
EIAC has joined #ruby
decoponyo has joined #ruby
Dave has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
Advocation has joined #ruby
rcosta has quit [Ping timeout: 264 seconds]
Dave is now known as Guest17668
<waxjar> ive been mistaken for a german too many times. apparantly a lot of people think that's what dutch means :P
decoponio has quit [Ping timeout: 260 seconds]
<waxjar> or they think i said i live in "neverland" and am just joking :/
colonolGron has joined #ruby
<banisterfiend> waxjar which city are you from in netherlands?
<waxjar> leiden
Clooth has quit [Quit: Leaving...]
<banisterfiend> waxjar haha, me too
<banisterfiend> waxjar i live opposite the law school around steenschuur
quoin has joined #ruby
nomenkun has quit [Ping timeout: 264 seconds]
<banisterfiend> waxjar i know another rubyist/pryist who lives just down hooigracht by the albert heijn
<waxjar> haha, awesome
<banisterfiend> waxjar do u go to einsteins?
<banisterfiend> (the pub)
EIAC has quit [Remote host closed the connection]
<waxjar> rarely, someone i know tended bar there though
<platzhirsch> Leiden? Does it also mean suffering in Dutch?
cina has joined #ruby
<waxjar> i usually go to bad habits, at the end of the haarlemmerstraat
<waxjar> yes, it does platzhirsch. it also means "to lead"
Guest17668 has quit [Quit: Leaving...]
<gr33n7007h> Is getoptlong still being used
quoin has quit [Ping timeout: 246 seconds]
<platzhirsch> waxjar: way yo turn the tide
nowthatsamatt has joined #ruby
mstrbutlertron has quit [Quit: Textual IRC Client: www.textualapp.com]
Guest___ has joined #ruby
peregrine81 has joined #ruby
Guest___ has quit [Max SendQ exceeded]
mary5030 has joined #ruby
Guest___ has joined #ruby
Guest___ has quit [Max SendQ exceeded]
Guest___ has joined #ruby
kpshek has quit [Ping timeout: 246 seconds]
aaronmcadam has joined #ruby
<gr33n7007h> pontiki, Thanks looks very interesting gonna have a browse
EIAC has joined #ruby
<Banistergalaxy> Waxjar never heard of that, bar or club?
<gr33n7007h> jeez i didn't even know there were that many
<waxjar> it's a sports café originally i believe, looks like an english pub from the inside.
goshakkk has joined #ruby
randomdrake has quit [Quit: randomdrake]
havenwood has joined #ruby
Mephisto4 has quit [Ping timeout: 240 seconds]
<Banistergalaxy> Waxjar near the kebab place?
<waxjar> haha, yeah.
allsystemsarego has quit [Quit: Leaving]
<waxjar> i think there are three gyros places and a kebab place within 20 mtrs
<Banistergalaxy> Are you Dutch or another expat?
<waxjar> i'm dutch
<Banistergalaxy> Meneeer
<Banistergalaxy> Funny language ;)
<platzhirsch> hungry...
<waxjar> haha, it must sound pretty wacky for non-native speakers
DanKnox_away is now known as DanKnox
browndawg has left #ruby [#ruby]
<banisterfiend> waxjar it's pretty throaty
jefflyne3 has joined #ruby
<platzhirsch> Why are there two banisters?
cina has quit [Quit: leaving]
<apeiros> meiosis
<waxjar> hehe. have you heard people from the hague speak banisterfiend?
Al_ has joined #ruby
jamesaanderson has quit [Ping timeout: 256 seconds]
<apeiros> or was it mitosis?
<banisterfiend> waxjar yes, but i honestly can't tell the difference :)
<waxjar> haha, oh well. they're even throatier!
TheFuzzball has quit [Read error: Connection reset by peer]
<banisterfiend> waxjar weird, they're only 15 mins away by train :)
RDash[AW] is now known as RDash
<banisterfiend> waxjar hague is nasty, only reason i go there is to get KFC :D
<waxjar> lol
<banisterfiend> there's no kfc in leiden, right?
<waxjar> nope :(
agent_white has joined #ruby
jamesaanderson has joined #ruby
snovak has joined #ruby
<banisterfiend> waxjar i do love leiden though, very pretty city
<waxjar> opposite the kfc is a place that sells really nice french fries, but belgian style. bram ladache it's called i think. i used to get my chicken at kfc and fries at bram ladache
dangerousdave has joined #ruby
<waxjar> yea, it's like a miniature, less-crazy amsterdam
haxrbyte has joined #ruby
mary5030 has quit [Remote host closed the connection]
<banisterfiend> waxjar which is your favourite 'coffeeshop' in leiden? :)
snovak has quit [Read error: Operation timed out]
<waxjar> bebop
TheFuzzball has joined #ruby
<waxjar> never really tried others out tbh
<banisterfiend> me too :)
Al_ has quit [Quit: Al_]
<banisterfiend> the one further down the same street bebop is on, is weird
voodoofish has joined #ruby
<waxjar> haha, yeah
<banisterfiend> i mean down that narrow alley there's another one
platzhirsch has left #ruby [#ruby]
platzhirsch has joined #ruby
<waxjar> leidse plein
Emmanuel_Chanel has quit [Ping timeout: 240 seconds]
<banisterfiend> ah
<banisterfiend> scary place
<waxjar> you can play chess there though, that's kinda nice
<platzhirsch> Sorry to interrupt, but why are there two Ruby channels? #ruby and #ruby-lang ?
Al_ has joined #ruby
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
<shevy> platzhirsch historic reasons
<platzhirsch> shevy: that sounds like: "Well boy, you know, back then 2005 when there was the civil war..."
<shevy> yes
<shevy> back in 2000 or so
Al_ has quit [Client Quit]
dgfdgf has quit []
<shevy> I think the original owner of #ruby disappeared for a long while
starfox21 has quit [Quit: starfox21]
`MArceLL` has joined #ruby
<platzhirsch> shevy: in #ruby-lang someone told me it's the official one and the more cooler ;)
robustus has quit [Ping timeout: 245 seconds]
cody-- has joined #ruby
schaerli has quit [Remote host closed the connection]
<banisterfiend> #ruby-lang can be more of a bore
<banisterfiend> #ruby is a little more relaxed and the people less full of themselves
colonolGron has quit [Ping timeout: 246 seconds]
<apeiros> in the case of banisterfiend, they're usually full of something else :-p
kpshek has joined #ruby
<banisterfiend> pizza
<apeiros> does that come with weed too?
robustus has joined #ruby
<shevy> platzhirsch yeah #ruby-lang is the "official" one, whatever that means. I think it only means that whoever has access to ruby homepage, wrote it that way... :P
<banisterfiend> usually comes a few hours after :)
<platzhirsch> shevy: well, I suggest we raid #ruby-lang
<shevy> platzhirsch it's defended well by egospider and other villains
<platzhirsch> villains, hah
<Morrolan> shevy: The current owner of #ruby seems to have disappeared, too.
dagnachew has joined #ruby
<shevy> Morrolan he is probably a pythonista now!
<shevy> or, I think, he actually was here on #ruby a few months ago
<Morrolan> Well, I'll be damned, he's on right now.
iliketurtles has joined #ruby
<platzhirsch> Moving from Ruby to Python? I don't understand... I am starting to freeze
<Morrolan> I remember /ns infoing him a few weeks ago, and the "last sign in" date was quite a bit ago. :)
rrichardsr3 has joined #ruby
<banisterfiend> he's a perl programmer iirc
dv__ has joined #ruby
Emmanuel_Chanel has joined #ruby
dv_ has quit [Ping timeout: 264 seconds]
iliketur_ has joined #ruby
lfox has joined #ruby
Clooth has joined #ruby
iliketurtles has quit [Ping timeout: 264 seconds]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dagnachew has quit [Read error: Connection reset by peer]
dagnachew has joined #ruby
bricker`LA has joined #ruby
ehaliewicz has joined #ruby
corpuscle has quit [Quit: WeeChat 0.4.1]
<shevy> platzhirsch well there are more folks using python out there
echevemaster has quit [Quit: Leaving]
lfox has quit [Quit: ZZZzzz…]
haxrbyte has quit [Read error: Connection reset by peer]
platzhirsch has quit [Ping timeout: 256 seconds]
ggordan has quit [Remote host closed the connection]
rcosta has joined #ruby
colonolGron has joined #ruby
kpshek has quit []
prometheanfire has quit [Ping timeout: 245 seconds]
Advocation has quit [Quit: Advocation]
matchaw has quit [Ping timeout: 264 seconds]
simoz has joined #ruby
matchaw has joined #ruby
prometheanfire has joined #ruby
prometheanfire is now known as Guest17973
echevemaster has joined #ruby
iliketur_ has quit [Quit: zzzzz…..]
jbpros has joined #ruby
<Xeago_> does anyone have know of a weather api that is fairly decent?
iliketurtles has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
matchaw has quit [Ping timeout: 240 seconds]
<r0bglees0n> Xeago_: i heard the sky is a pretty good indicator
coderhs has quit [Ping timeout: 256 seconds]
quoin has joined #ruby
zerun0 has joined #ruby
schaerli has joined #ruby
matchaw has joined #ruby
platzhirsch has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 256 seconds]
<hanmac> Xeago_: use your window ;D
dagnachew has quit [Read error: Connection reset by peer]
quoin has quit [Ping timeout: 263 seconds]
schaerli has quit [Ping timeout: 260 seconds]
sparq_ has joined #ruby
pwh has quit [Quit: pwh]
mansi has joined #ruby
Targen has joined #ruby
Lewix has quit [Remote host closed the connection]
noop has quit [Ping timeout: 256 seconds]
rippa has quit [Read error: Connection reset by peer]
tclark has joined #ruby
cj3kim has joined #ruby
nnmkut has joined #ruby
coderhs has joined #ruby
zeromodulus has joined #ruby
matchaw has quit [Ping timeout: 240 seconds]
matchaw has joined #ruby
oliver_ has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
oliver_ has joined #ruby
nnmkut has quit [Remote host closed the connection]
d45h has quit [Ping timeout: 260 seconds]
joesavage has joined #ruby
ehc has joined #ruby
snovak has joined #ruby
optimusprimem has joined #ruby
optimusprimem has joined #ruby
<joesavage> I've been looking through some of the Ruby Time documentation, but I can't seem to find a way to get the time into today in milliseconds.. any advice? (e.g. at 9am, it should be 9 hours = 32400000ms)
mansi has quit [Remote host closed the connection]
matchaw has quit [Ping timeout: 264 seconds]
mansi has joined #ruby
matchaw has joined #ruby
machuga|away is now known as machuga
chairabanta|away has quit [Quit: Leaving...]
dash_ has joined #ruby
snovak has quit [Ping timeout: 240 seconds]
Emmanuel_Chanel has joined #ruby
Scorchin has joined #ruby
mansi has quit [Ping timeout: 246 seconds]
fixnum has quit [Quit: Leaving]
cj3kim has quit [Remote host closed the connection]
skaflem has quit [Quit: Leaving]
ntus1017 has quit [Remote host closed the connection]
ars23 has joined #ruby
RDash is now known as RDash[AW]
ars23 has quit [Client Quit]
optimusprimem has quit [Quit: Saindo]
ars23 has joined #ruby
optimusprimem has joined #ruby
pjb1 has quit [Quit: pjb1]
cj3kim has joined #ruby
nisstyre has quit [Quit: Leaving]
cj3kim has quit [Remote host closed the connection]
<Kelet> joesavage, I'm not sure if there's a method but of course you can do something like:
Guest17973 has quit [Changing host]
Guest17973 has joined #ruby
<Kelet> t = Time.new; (t.hour * 60 * 60 * 1000) + (t.min * 60 * 1000) + (t.sec * 1000)
<Kelet> >> t = Time.new; (t.hour * 60 * 60 * 1000) + (t.min * 60 * 1000) + (t.sec * 1000)
<eval-in> Kelet => 82767000 (https://eval.in/48491)
nisstyre has joined #ruby
<joesavage> Kelet: Ah of course, thanks!
Guest17973 is now known as prometheanfire
decoponyo has quit [Quit: Leaving...]
<hanmac> joesavage: and Time.to_i is not what you want?
optimusprimem has quit [Read error: Connection reset by peer]
<joesavage> Hanmac: Nah, need since midnight not epoch unfortunately
ars23 has quit [Quit: Leaving]
<Kelet> Alternatively you could create a new time object with the same year, month, day but not time and subtract
<Kelet> Both are somewhat inelegant solutions so maybe there's a better way
<apeiros> joesavage: huh? by what logic is `e.g. at 9am, it should be 9 hours = 32400000ms`?
<apeiros> ah, sry, typo in my short calc
<apeiros> >> n=Time.now; (Time.mktime(n.year,n.month,n.day,9)-Time.mktime(n.year, n.month, n.day))*1000
<eval-in> apeiros => 32400000.0 (https://eval.in/48506)
EIAC has quit [Remote host closed the connection]
<Kelet> yep, that's the other way to do it :)
froy has quit [Quit: kablam!]
evenix has joined #ruby
EIAC has joined #ruby
codecop has quit [Remote host closed the connection]
evenix_ has joined #ruby
evenix has quit [Read error: Connection reset by peer]
rcosta has quit [Read error: No route to host]
rcosta has joined #ruby
<apeiros> *sob* my kerbal astronauts keep dying in explosions :(
dodosan has joined #ruby
vlad_starkov has joined #ruby
cads has joined #ruby
<shevy> kerbal?
persand has quit [Quit: persand]
Macaveli has joined #ruby
rcosta has quit [Ping timeout: 260 seconds]
brianpWins has quit [Quit: brianpWins]
optimusprimem has joined #ruby
<apeiros> kerbalspaceprogram.com
evenix_ has quit [Ping timeout: 240 seconds]
brianpWins has joined #ruby
quoin has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
T_T has quit [Remote host closed the connection]
T_T has joined #ruby
matchaw has quit [Ping timeout: 246 seconds]
badquanta has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
EIAC has quit [Remote host closed the connection]
crunch-choco has joined #ruby
peregrine81 has quit []
simoz has quit [Ping timeout: 264 seconds]
EIAC has joined #ruby
peregrine81 has joined #ruby
quoin has quit [Ping timeout: 264 seconds]
Soda has quit [Remote host closed the connection]
<pontiki> obligatory xkcd: http://xkcd.com/1244/
matchaw has joined #ruby
T_T has quit [Ping timeout: 260 seconds]
adeponte has joined #ruby
T_T has joined #ruby
brianpWins has quit [Quit: brianpWins]
huoxito has joined #ruby
ehc has quit [Quit: ehc]
<apeiros> pontiki: heh
<apeiros> I didn't get that one back then
goshakkk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
coderhs has quit [Ping timeout: 264 seconds]
brianpWins has joined #ruby
atmosx has joined #ruby
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
Davey has joined #ruby
huoxito has quit [Read error: Connection reset by peer]
Davey has quit [Max SendQ exceeded]
SHyx0rmZ has joined #ruby
iliketurtles has joined #ruby
iliketurtles has quit [Max SendQ exceeded]
ehc has joined #ruby
Davey has joined #ruby
rezzack has joined #ruby
TDJACR has quit [Quit: Quit]
simoz has joined #ruby
Yvemath has quit [Ping timeout: 264 seconds]
brianpWins has quit [Quit: brianpWins]
Guest___ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tvw has joined #ruby
snovak has joined #ruby
mansi has joined #ruby
lmwood has joined #ruby
crunch-choco has quit [Quit: leaving]
kvirani has quit [Remote host closed the connection]
cody-- has quit [Quit: derp]
kvirani has joined #ruby
snovak has quit [Ping timeout: 240 seconds]
ehc has quit [Quit: ehc]
dash_ has quit [Quit: dash_]
coderhs has joined #ruby
matchaw_ has joined #ruby
funburn has joined #ruby
brianpWins has joined #ruby
aryaching has joined #ruby
matchaw has quit [Ping timeout: 264 seconds]
mansi has quit [Ping timeout: 260 seconds]
Macaveli has quit [Quit: Computer has gone to sleep.]
iliketurtles has joined #ruby
iliketurtles has quit [Client Quit]
simoz has quit [Ping timeout: 246 seconds]
DanKnox is now known as DanKnox_away
aryaching_ has quit [Ping timeout: 264 seconds]
kvirani has quit [Ping timeout: 276 seconds]
gyzmodo has quit []
matchaw_ has quit [Ping timeout: 256 seconds]
claymore has quit [Quit: night]
spider-mario has quit [Remote host closed the connection]
mansi has joined #ruby
matchaw has joined #ruby
adeponte has quit [Remote host closed the connection]
pyx has joined #ruby
T_T has quit [Remote host closed the connection]
cj3kim has joined #ruby
hakunin has joined #ruby
iliketurtles has joined #ruby
mansi has quit [Ping timeout: 246 seconds]
matchaw has quit [Read error: Operation timed out]
pyx has quit [Client Quit]
matchaw has joined #ruby
kirun has quit [Quit: Client exiting]
workmad3 has joined #ruby
Xaitec has joined #ruby
cj3kim has quit [Ping timeout: 240 seconds]
blackratdog has joined #ruby
workmad3 has quit [Client Quit]
workmad3 has joined #ruby
FDj has quit [Remote host closed the connection]
Senjai has joined #ruby
Senjai has joined #ruby
Senjai has quit [Changing host]
FDj has joined #ruby
Breadcrumbs has quit [Ping timeout: 246 seconds]
tonni_ has quit [Ping timeout: 264 seconds]
ravster has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
huoxito has joined #ruby
sambao21 has joined #ruby
pothibo has quit [Quit: pothibo]
uncomprised44 has quit [Ping timeout: 264 seconds]
kpshek has joined #ruby
DanBoy has joined #ruby
dassouki has joined #ruby
sambao21 has quit [Ping timeout: 256 seconds]
<dassouki> I've never done ruby before, but i'm having troubles running lesscss on osx .. here's the error that i get http://bpaste.net/show/DvdZUrVP5lk9rSI1uLH3/
jamesaanderson has joined #ruby
sambao21 has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
JesseH has quit [Quit: github.com/jessehorne]
<MrZYX> dassouki: it says invalid option: --watch
DanKnox_away is now known as DanKnox
adeponte has joined #ruby
<dassouki> MrZYX: ehre's hte correct paste http://bpaste.net/show/jGDroihJsW9Y0rNIlTIz/
quoin has joined #ruby
<MrZYX> well, that sounds like you got a syntax error in your stylesheet
jonahR has joined #ruby
<dassouki> that was it !
Superhans has joined #ruby
<dassouki> you know as a seasoned python programmer, I'm accustomed to how python tracebacks look like ..
wallerdev has joined #ruby
<dassouki> MrZYX: thanks :)
Superhans has left #ruby [#ruby]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stkowski has joined #ruby
sambao21 has quit [Ping timeout: 246 seconds]
sayan has quit [Ping timeout: 240 seconds]
quoin has quit [Ping timeout: 264 seconds]
jamesaanderson has joined #ruby
coderhs has quit [Ping timeout: 256 seconds]
pygospa has quit [Disconnected by services]
TheRealPygo has joined #ruby
Clooth has quit [Quit: Leaving...]
brianpWins has quit [Quit: brianpWins]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ferdev has joined #ruby
Ripp__ has quit []
nisstyre has quit [Quit: Leaving]
vlad_starkov has joined #ruby
jamesaanderson has joined #ruby
jamesaanderson has quit [Client Quit]
nisstyre has joined #ruby
oliver_ has quit [Remote host closed the connection]
mengu has joined #ruby
coderhs has joined #ruby
snovak has joined #ruby
tjad has joined #ruby
volty has joined #ruby
snovak has quit [Ping timeout: 256 seconds]
vlad_starkov has quit [Ping timeout: 264 seconds]
iliketurtles has joined #ruby
hackingoff has quit [Ping timeout: 264 seconds]
freerobby has quit [Quit: Leaving.]
Breadcrumbs has joined #ruby
mansi has joined #ruby
funburn has quit [Quit: funburn]
jefflyne3 has quit [Ping timeout: 256 seconds]
warefare22 has joined #ruby
warefare22 has quit [Client Quit]
pushpak has quit [Quit: Linkinus - http://linkinus.com]
zachrab has joined #ruby
funburn has joined #ruby
jbpros has quit [Quit: jbpros]
warefare has quit [Ping timeout: 246 seconds]
tvw has quit []
mansi has quit [Ping timeout: 246 seconds]
TheFuzzball has quit [Ping timeout: 264 seconds]
workmad3 has quit [Ping timeout: 256 seconds]
pairup has quit [Quit: See ya later.]
funburn has quit [Client Quit]
dassouki has quit [Ping timeout: 264 seconds]
peregrine81 has quit []
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
funburn has joined #ruby
dangerousdave has quit [Read error: Operation timed out]
anshin has joined #ruby
TheMoonMaster has quit [Remote host closed the connection]
taternuts has joined #ruby
Xeago_ has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Ping timeout: 264 seconds]
<shevy> ---
dassouki has joined #ruby
Xeago has joined #ruby
<atmosx> what?
max_dev has joined #ruby
yekta has joined #ruby
<shevy> hehe
<shevy> I am bored :(
ssvo has joined #ruby
anshin has quit [Quit: leaving]
anshin has joined #ruby
DanKnox is now known as DanKnox_away
anshin has left #ruby [#ruby]
FDj has quit [Read error: No route to host]
simoz has joined #ruby
brunoro has quit [Ping timeout: 260 seconds]
sambao21 has joined #ruby
dassouki has quit [Ping timeout: 264 seconds]
<volty> what is the right design pattern for graphs ?
BillCriswell has joined #ruby
tclark has quit [Remote host closed the connection]
freerobby has joined #ruby
FDj has joined #ruby
quoin has joined #ruby
ssvo has quit [Ping timeout: 256 seconds]
DanKnox_away is now known as DanKnox
yekta has quit [Quit: yekta]
zachrab has quit [Remote host closed the connection]
<atmosx> shevy: what do youdo know? study?
Xaitec has quit [Remote host closed the connection]
<shevy> atmosx dunno... I delegated to become a jack of all trades right now ... but mostly in the overall sense I am still focused on biological information of any kind
quoin has quit [Ping timeout: 240 seconds]
<atmosx> so you're studying?
<shevy> atmosx yeah in a way
sayd_ has quit [Quit: Goodbye]
<shevy> atmosx right now I am trying to rush through all sorts of exams in different universities
sayd has joined #ruby
jamesaanderson has joined #ruby
TDJACR has joined #ruby
<shevy> atmosx the current hat I am wearing is an ECTS whore :P but I also try to do useful stuff... like try to improve BioRuby (I find it so hard to use... I dunno...)
eka has quit [Quit: Computer has gone to sleep.]
<atmosx> I see
<atmosx> nice
kilophoton has quit [Ping timeout: 264 seconds]
lmwood has quit [Read error: Connection reset by peer]
mercwithamouth has joined #ruby
sambao21 has quit [Ping timeout: 260 seconds]
simoz has quit [Ping timeout: 260 seconds]
thesheff17 has quit [Quit: Leaving]
joesavage has quit [Quit: joesavage]
cody-- has joined #ruby
gimpygoo has joined #ruby
patrikf has left #ruby [#ruby]
Xeago has quit [Remote host closed the connection]
cads has quit [Ping timeout: 264 seconds]
quoin has joined #ruby
emergion has joined #ruby
tesuji has quit [Remote host closed the connection]
snovak has joined #ruby
predator217 has joined #ruby
<shevy> atmosx it is almost as if there is a lack of scientific projects in ruby
predator117 has quit [Read error: Operation timed out]
<shevy> "TODO: Write usage instructions here"
<shevy> hehehe
<shevy> I am guilty of that as well... I hate rdoc layout
sayd has left #ruby ["WeeChat 0.4.1"]
<|jemc|> layout or color scheme?
bluenemo_ has joined #ruby
bluenemo_ has quit [Changing host]
bluenemo_ has joined #ruby
snovak has quit [Ping timeout: 256 seconds]
<|jemc|> I don't mind the layout, but vomit green and gray on white is not my idea of easy on the eyes. silly darkfish
<volty> you can change the colors
<shevy> |jemc| you need to write in a specific layout, the comments... header tags
bluenemo has quit [Ping timeout: 264 seconds]
cody-- has quit [Quit: derp]
aryaching has quit [Ping timeout: 256 seconds]
jonahR has quit [Quit: jonahR]
<|jemc|> ah, yes that too
<|jemc|> one thing I miss from python is docstrings
<apeiros> |jemc|: just use pry. it provides a way to access the docs and source of methods/classes
<|jemc|> well, I usually use ri
bluenemo_ has quit [Read error: Connection reset by peer]
<|jemc|> but that's good to know
<apeiros> I assumed your problem was that you had to switch between irb & ri
<apeiros> (or whatever other tool you could have used to access the docs)
mansi has joined #ruby
<|jemc|> well, I guess it's more about the aesthetic in the source file
<|jemc|> the docstrings appeal to me a little more I suppose
<apeiros> oh well, then I just disagree :D
<apeiros> I find docstrings ugly beyond reason
<|jemc|> ha
<apeiros> also having them inside the method collides with code comments
devoldmx has joined #ruby
<volty> yes, they are awful
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MrZYX is now known as MrZYX|off
<|jemc|> well, obviously I don't miss them enough to go back to python
funburn has quit [Quit: funburn]
iliketurtles has quit [Quit: zzzzz…..]
<apeiros> what I do miss in ruby is that doc comments end up in the parse tree and that code is generally available as objects from ruby itself
devoldmx3 has quit [Ping timeout: 240 seconds]
jamesaanderson has joined #ruby
mansi has quit [Ping timeout: 256 seconds]
<apeiros> I'd be fine if it only does that with a flag present
<volty> would be nice to have an editor that hides/shows the rdoc stuff
<apeiros> would be nice to have an editor like eiffel uses - switch between single method, docs only, code only
<shevy> hehehe
jamesaanderson has quit [Client Quit]
<apeiros> I wonder whether one could amend sublime to do that
<shevy> someone likes eiffel ;)
iliketurtles has joined #ruby
iliketurtles has quit [Max SendQ exceeded]
<|jemc|> is there a way to have barebones docs in the source code, but have a more detailed, verbose file that has detailed doc comments, which get 'interleaved' by rdoc?
iliketurtles has joined #ruby
<|jemc|> I suppose maybe you could just open up the classes and modules again?
<|jemc|> hm
<apeiros> that might work.
<|jemc|> but that wouldn't work for methods, because you'd overwrite them
<|jemc|> and it may not even work for objects
<apeiros> well, don't put it in lib
jamesaanderson has joined #ruby
jamesaanderson has quit [Client Quit]
<apeiros> rdoc doesn't care whether it's actually requirable or not
<|jemc|> hm
<|jemc|> sounds worth playing with
<apeiros> just don't forget to tell rdoc where to look ;-)