<d-snp>
if you can program in 1 language, you can program in any language
<d-snp>
how can it be too difficult?
<seanstickle>
That's nonsense
<seanstickle>
I can learn French, but it doesn't make Chinese any easier.
<d-snp>
.. those are natural languages
<d-snp>
whole different ballgame
tomsthumb has joined #ruby
<seanstickle>
I claim that there is not substantive difference
<d-snp>
alright, I think that knowing french makes it drastically more easy to learn chinese
phantasm66 has quit [Quit: *sleeeeep*]
<seanstickle>
Shall I bring it closer via Church-Turing? I can learn calculus, but it does not mean number theory is just as easy.
<shevy>
d-snp one can master everything if given enough time!
<shevy>
in 50 years I shall master haskell
xsbeats has joined #ruby
<shevy>
until then, I am going to finish this tutorial about R
Michael_ has joined #ruby
<d-snp>
:P
<shevy>
and dream about monads when I sleep :)
<seanstickle>
monadic R, eh?
<seanstickle>
Interesting notion
byennen has quit [Ping timeout: 240 seconds]
<d-snp>
seanstickle: I'm just argueing that programming languages are very simple languages, which have very similar models
darkc0met has quit [Remote host closed the connection]
KindTwo has quit [Read error: Connection reset by peer]
jalcine has quit [Read error: Connection reset by peer]
<seanstickle>
d-snp: I understand.
<d-snp>
as the IO monad shows, modeling an imperative language in a functional one is very straightforward..
<seanstickle>
d-snp: I just disagree.
<d-snp>
haha ok
<ninegrid>
the F# language has a type provider for R
jenrzzz has joined #ruby
<ninegrid>
and F# is pretty cool, you might could master that prior to haskell... on a spectrum with ruby on the far left representing OO, and eager, and haskell on the far right representing functional and lazy, F# would sit in the middle.. being a hybrid language both imperative OO and functional
<shevy>
hmmm
<shevy>
I think my brain is too much set to OOP
<d-snp>
shevy: you make too many barriers in your mind ;)
<ninegrid>
and syntactically comes from ML and looks similar to OCaml and haskell
byennen has joined #ruby
<shevy>
it's like you use the right hand all your life, then people tell you to use the crappy left hand and it feels so WRONG
<d-snp>
ninegrid: did you know ML before F#?
lolcathost has quit [Ping timeout: 250 seconds]
<ninegrid>
d-snp: F# is what got me interested in ML and haskell
Lemtzas is now known as LEMTZAS
Iszak has joined #ruby
<d-snp>
I haven't learned any dirty functional programming language yet, and there are so many popular ones I'm curious to learn one
byennen has quit [Remote host closed the connection]
<Blue_Ice>
I'm creating a new class, inheriting from another class to extend functionality. Some methods are overwritten (as wanted), some extended. But now I want to "rename" a method from the parent class, how should I do that? I tried with alias_method to give the old method a new name and overwrite the original name ... that didn't go well "stack level too deep" error. How does any achieve this?
<ninegrid>
d-snp: I was a bit like shevy, more practical about just getting stuff done the way i knew how to do it... but I began playing with F# at work and learned new ways to do things and that sort of opened up haskell and ironically that is why I am now doing ruby
byennen has joined #ruby
<d-snp>
Blue_Ice: the idea is correct, your code just contains a logical error
<d-snp>
if you could pastie.org your code it would be handy :)
<d-snp>
ninegrid: nice :)
byennen has quit [Remote host closed the connection]
segmond has quit [Disconnected by services]
<d-snp>
I think their connection is that they're all awesome technologies :D
<ninegrid>
d-snp: functional languages are really good languages, but in both camps there are people who are against the other side... i'm more of the thinking that both are good and you should be comfortable approaching problems from both mindsets
segmond_ has joined #ruby
<ninegrid>
d-snp: but i did recently install the lazylist gem for ruby because I had been spoiled by haskell
<d-snp>
yeah, a lot of people have weird prejudices against Haskell, that obviously stem from it's perpetual development
<d-snp>
haha I'm not sure that's a good idea
<d-snp>
what kind of thing did you need a lazy list for?
<ninegrid>
playing
<d-snp>
did you know, Somelauw might be interested, that Python removed the reduce function from their standard library because in their opinion code that uses reduce is less readable?
<d-snp>
and they are absolutely right too :D
brandon_ has joined #ruby
<Blue_Ice>
d-snp: you're right, was just copying the code when I noticed the error (reference to the "old" method, and thus inducing a loop)
<d-snp>
reduce is less readable than a for loop
<d-snp>
alright Blue_Ice, glad to be of help :)
<Somelauw>
d-snp: it is not completely removed, but has to be imported first
segmond_ has quit [Remote host closed the connection]
<d-snp>
yeah, my first reaction as a Haskell programmer was, but but.. functional programming
<d-snp>
but then I saw the examples and I totally agreed..
mybrainis404 has joined #ruby
brandon has quit [Ping timeout: 246 seconds]
brandon_ is now known as brandon
emergion has quit [Quit: Computer has gone to sleep.]
<ninegrid>
d-snp: you need lazy lists to pull that off
<Blue_Ice>
d-snp: can I have both methods available? (I just noticed that calls to the new alias_method name get redirected to the new method in stead of the old one)
<Blue_Ice>
(and I actually wanted to retain both, hence the idea to alias the old one first)
<d-snp>
ninegrid: so it zooms in on that .. wtf I'm too tired to get the word.. when a drawing has infinite recursive depth
thone_ has joined #ruby
<d-snp>
it's a sierpinsky triangle right?
<Blue_Ice>
I guess I'll just copy/paste the method over from the parent class. It's static, so doesn't hurt (just not really elegant)
<d-snp>
why do I know that, but not what those drawings are called :D
<ninegrid>
d-snp: yes some of them, suprisingly, make serpenski triangles :D
<d-snp>
oO :P
<d-snp>
Blue_Ice: what do you mean precisely?
<d-snp>
you can get a reference to a method with object.method(:method_name)
erichmenge has quit [Quit: Arrivederci!]
<matti>
;]
thone has quit [Ping timeout: 252 seconds]
erichmenge has joined #ruby
<Blue_Ice>
d-snp: it's 2 methods in fact. 1 method calls the other one. And that's why I get the same result form old/new method. The alias is working as it should. I just ended up copying the 2 "old" methods over, and renaming them by hand
king313 has quit [Ping timeout: 244 seconds]
<ninegrid>
d-snp: are you trying to find the word 'fractal'?
<d-snp>
ninegrid: yeS!
<ninegrid>
d-snp: the program itself is fractal in that it starts with an initial condition... a 1-d list of cells that is infinite on the left, a cell in the middle, and a cell on the right, and it passes that into the function which returns the next iteration of the universe, and it goes on like that until you stop it. but it's not like.. generally called a fractal, its an elementary cellular automata
<d-snp>
:D
grzywacz has quit [Read error: Connection reset by peer]
<d-snp>
ok I'm going to drink a beer and then go to sleep, it's obviously beyond bedtime for me :D
<ninegrid>
ok
<d-snp>
is game of life a cellular automaton?
<seanstickle>
d-snp: yup
<ninegrid>
yea but its 2d not 1d
<ninegrid>
the one i'm showing is the most primitive of that class... the most fundamental
<d-snp>
aha ok
ikaros_ has joined #ruby
ikaros has quit [Quit: Ex-Chat]
BrianJ has joined #ruby
aharris6 has quit [Ping timeout: 248 seconds]
ikaros_ is now known as ikaros
joeycarmello has quit [Remote host closed the connection]
digitalcakestudi has joined #ruby
emergion has joined #ruby
emergion has quit [Client Quit]
sepp2k1 has quit [Remote host closed the connection]
hackerdude has joined #ruby
<waxjar>
in the documentation for Set is says "Set implements a collection of unordered values with no duplicates. This is a hybrid of Array's intuitive inter-operation facilities and Hash's fast lookup."
<waxjar>
what is the lookup part of Set?
DAYSofVICE has joined #ruby
daguar has joined #ruby
<ryanf>
checking for inclusion
<ryanf>
Array#include? has to iterate through the whole thing to see if your value is there, whereas Set#include? doesn't
<waxjar>
ah, ok.
<waxjar>
that's it though, no way to get the actual value?
icole has quit [Remote host closed the connection]
<ryanf>
well you can still use each and stuff if you want to loop through the values in the set
<ryanf>
anything in Enumerable
shammancer has quit [Ping timeout: 252 seconds]
thinkdevcode has quit [Remote host closed the connection]
<waxjar>
hmm, that seems to defeat the point of using a Set a bit.
<waxjar>
what I'm looking for is sort of a Hash without duplicate values, where the keys can change
mercwithamouth has quit [Ping timeout: 252 seconds]
<ryanf>
that doesn't really sound like a set
<ryanf>
sets aren't for storing key-value pairs
headius has joined #ruby
shammancer has joined #ruby
headius has quit [Client Quit]
dysun has joined #ruby
<waxjar>
the keys don't really matter, i'd just use them to look up things instead of iterating over a list.
<waxjar>
basically i need to keep a list of users (User objects), which i'd like to look up by their nickname
<waxjar>
*current nickname
dysun has left #ruby [#ruby]
cakehero has quit [Quit: Computer has gone to sleep.]
gbchaosmaster has joined #ruby
statarb3 has quit [Quit: Leaving]
kbeddingfield has joined #ruby
dakine has quit [Quit: Leaving]
dakine has joined #ruby
daguar has left #ruby [#ruby]
miphe has quit [Remote host closed the connection]
tomaw has quit [*.net *.split]
ElderFain has quit [*.net *.split]
Drakevr has quit [*.net *.split]
__main__ has quit [*.net *.split]
egn has quit [*.net *.split]
gianlucadv has quit [*.net *.split]
patronus_ has quit [*.net *.split]
egn_ has joined #ruby
patronus_ has joined #ruby
ryanlecompte has joined #ruby
tomaw has joined #ruby
shammancer has quit [Remote host closed the connection]
ehc has quit [Read error: Operation timed out]
__main__ has joined #ruby
gianlucadv has joined #ruby
Drakevr has joined #ruby
ElderFain has joined #ruby
Xeago has joined #ruby
slainer68 has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
mikepack has joined #ruby
shammancer has joined #ruby
joeycarmello has joined #ruby
icole has joined #ruby
ninegrid has quit [Ping timeout: 264 seconds]
slainer68 has quit [Ping timeout: 244 seconds]
byennen has joined #ruby
Xeago has quit [Remote host closed the connection]
d2dchat has joined #ruby
ninegrid has joined #ruby
qwerxy has joined #ruby
byennen has quit [Ping timeout: 248 seconds]
SuperrMann has joined #ruby
brandon_ has joined #ruby
afgeneralist has joined #ruby
kbeddingfield has quit [Remote host closed the connection]
tchebb has quit [Ping timeout: 244 seconds]
postmodern has joined #ruby
brandon has quit [Ping timeout: 246 seconds]
brandon_ is now known as brandon
daniel_hinojosa has quit [Remote host closed the connection]
davidcelis has quit [Quit: K-Lined.]
x77686d has quit [Quit: x77686d]
tchebb has joined #ruby
SuperrMann has quit [Ping timeout: 250 seconds]
x77686d has joined #ruby
SuperrMann has joined #ruby
mercwithamouth has joined #ruby
joeycarmello has quit [Remote host closed the connection]
tchebb has quit [Ping timeout: 244 seconds]
shammancer has quit [Remote host closed the connection]
xyzodiac has quit [Ping timeout: 255 seconds]
shammancer has joined #ruby
xyzodiac has joined #ruby
tchebb has joined #ruby
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
x77686d has quit [Quit: x77686d]
freeayu has joined #ruby
brandon_ has joined #ruby
brandon has quit [Ping timeout: 246 seconds]
brandon_ is now known as brandon
w400z has quit []
shammancer has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
aharris6 has joined #ruby
freeayu__ has joined #ruby
freeayu has quit [Ping timeout: 276 seconds]
ElderFain has quit [Read error: Connection reset by peer]
ElderFain has joined #ruby
phantasm66 has joined #ruby
x77686d has joined #ruby
x77686d has quit [Client Quit]
Hanmac1 has joined #ruby
w400z has joined #ruby
<shevy>
hey
<shevy>
anyone of you has ever used avisynth?
johnmilton has quit [Ping timeout: 244 seconds]
<shevy>
it's still in my head to create a set of ruby classes that could be used similar to avisynth, and apply those filters to audio and video datastreams
Hanmac has quit [Ping timeout: 252 seconds]
love_color_text has joined #ruby
aharris6 has quit [Remote host closed the connection]
digitalcakestudi has quit [Quit: Leaving.]
LEMTZAS is now known as Lemonism
VegetableSpoon has quit [Ping timeout: 248 seconds]
shammancer has joined #ruby
samphippen has quit [Quit: Computer has gone to sleep.]
Russell^^ has joined #ruby
charliesome has joined #ruby
pcarrier has quit []
tommyvyo_ has joined #ruby
slainer68 has joined #ruby
slainer68 has quit [Remote host closed the connection]
slainer68 has joined #ruby
aharris6 has joined #ruby
BrianJ has quit [Quit: BrianJ]
xsbeats has quit [Ping timeout: 260 seconds]
aharris6 has quit [Remote host closed the connection]
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
ryanf has quit [Ping timeout: 255 seconds]
qwerxy has quit [Quit: offski]
Xeago has joined #ruby
jekotia has joined #ruby
otters has quit [Ping timeout: 252 seconds]
Xeago_ has joined #ruby
pkircher has joined #ruby
pkircher has quit [Changing host]
pkircher has joined #ruby
pkircher has quit [Client Quit]
Xeago__ has joined #ruby
Iszak has quit []
Xeago has quit [Read error: Connection reset by peer]
otters has joined #ruby
dagnachew has joined #ruby
mybrainis404 has quit [Ping timeout: 240 seconds]
ikaros has quit [Quit: Ex-Chat]
Xeago_ has quit [Ping timeout: 265 seconds]
nari has joined #ruby
nwertman has joined #ruby
seanyo_ has quit [Ping timeout: 265 seconds]
lampe2 has joined #ruby
techhelp has joined #ruby
statarb3 has quit [Ping timeout: 252 seconds]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
techhelp has quit [Client Quit]
nwertman has quit [Ping timeout: 264 seconds]
joeycarmello has joined #ruby
seanwash has quit [Quit: Computer has gone to sleep.]
love_color_text has quit [Remote host closed the connection]
mahmoudimus has joined #ruby
Ruler_Of_Heaven_ has quit [Ping timeout: 240 seconds]
joeycarmello has quit [Ping timeout: 260 seconds]
Ivo has joined #ruby
pipopopo has joined #ruby
pikitgb has joined #ruby
slainer68 has quit [Remote host closed the connection]
pikitgb has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 252 seconds]
jackdanger has joined #ruby
redbull has quit [Remote host closed the connection]
jackdanger has quit [Client Quit]
techhelp has joined #ruby
Slivka has quit [Remote host closed the connection]
bigmac has quit [Read error: No route to host]
hackerdude has quit [Remote host closed the connection]
ryanf has joined #ruby
replore_ has joined #ruby
njkt has joined #ruby
njkt has quit [Client Quit]
ryanf has quit [Read error: Operation timed out]
synthetix has joined #ruby
banisterfiend has quit [Ping timeout: 250 seconds]
danktamagachi has joined #ruby
dagnachew has quit [Read error: Connection reset by peer]
Xeago__ has quit [Remote host closed the connection]
matchaw__ has joined #ruby
rohit has joined #ruby
<danktamagachi>
hi all, i'm creating a rails app that is basically a microblog.. posts and ratings. but my ratings function in my posts controller isn't updating as expected. here it is: http://pastebin.com/xwiZbMjb it seems to only update @post.rating the first few times its called. Is there something I'm missing?
Slivka has joined #ruby
<matchaw__>
Hi, is anyone able to help with an example of converting an ip in the form "1.2.3.4/8" into two seperate variables $ip = 1.2.3.4 & $mask = 255.0.0.0 ?
<matchaw__>
I've seen ipaddr but a bit lost..
SuperrMann has quit [Quit: Computer has gone to sleep.]
<seanstickle>
danktamagachi: (1) that's a Rails question, (2) don't cross-post to multiple channels simultaneously.
<danktamagachi>
ok :)
lolcathost has joined #ruby
adeponte has joined #ruby
adeponte has quit [Remote host closed the connection]
xAndy is now known as xandy
ryanf has joined #ruby
h4mz1d has joined #ruby
<shevy>
matchaw__ you could split the string at '/'
<shevy>
no idea how you go from 8 to 255.0.0.0, dont you have a conversion table for that?
<matchaw__>
shevy, yes but ideally I need to check first if the string passed even has cidr notation.
<matchaw__>
I think the ipaddr class can help but the docs can be confusing!
icole has quit [Remote host closed the connection]
emmanuelux has quit [Quit: emmanuelux]
Michael_ has quit [Remote host closed the connection]
<seanstickle>
matchaw__: install the gem "ruby-ip"
<matchaw__>
Seanstickle, nice.. I will give it a go.
<matchaw__>
just got the doc up now.
<matchaw__>
I was hoping to use just the native ruby libs.
<seanstickle>
Give up that hope.
<matchaw__>
lol
<seanstickle>
That way lies madness and lost time.
<seanstickle>
This is what libs are for!
noyb has joined #ruby
felipe_Brz has joined #ruby
<shevy>
lol
<felipe_Brz>
i'm experimenting with the require and the load constructs.... however, if I define a variable in one file, and attempt to use that variable in another file (even though both files have been loaded by a *third* file), i get "undefined local variable" error... shouldn't this work?
micsha has joined #ruby
<micsha>
wheres a good place to read about error handling?
<seanstickle>
felipe_Brz: change "foo" to "$foo" in your examples, and it works fine
<seanstickle>
This is a scope issue
TheFuzzball has joined #ruby
w400z has quit []
TheFuzzball has quit [Read error: Connection reset by peer]
TheFuzzball has joined #ruby
TheFuzzball has quit [Read error: Connection reset by peer]
<felipe_Brz>
seanstickle: thank you very much
<felipe_Brz>
so $variables are global?
TheFuzzball has joined #ruby
TheFuzzball has quit [Read error: Connection reset by peer]
<felipe_Brz>
yes they are
slainer68 has joined #ruby
TheFuzzball has joined #ruby
davidcelis has joined #ruby
TheFuzzball has quit [Read error: Connection reset by peer]
<felipe_Brz>
i must say naming variables with a dollar sign upfront is definitely not a new concept for me heheheheheh
<felipe_Brz>
but in ruby, well, yes
TheFuzzball has joined #ruby
TheFuzzball has quit [Read error: Connection reset by peer]
v1negar has left #ruby [#ruby]
<seanstickle>
felipe_Brz: not exactly the recommended approach
<seanstickle>
Globals are considered things to avoid
slainer68 has quit [Ping timeout: 248 seconds]
Michael_ has quit [Remote host closed the connection]
ryanlecompte has quit [Remote host closed the connection]
emergion has joined #ruby
Nisstyre-laptop has quit [Remote host closed the connection]
Nisstyre-laptop has joined #ruby
ryanlecompte has joined #ruby
TheFuzzball has joined #ruby
mikepack has quit [Remote host closed the connection]
TheFuzzball has quit [Read error: Connection reset by peer]
jlast has joined #ruby
phantasm66 has quit [Quit: *sleeeeep*]
digitalcakestudi has joined #ruby
mneorr has quit [Remote host closed the connection]
LouisGB has quit [Ping timeout: 252 seconds]
n_blownapart has joined #ruby
replore_ has quit [Remote host closed the connection]
<n_blownapart>
http://pastie.org/5430190 hi any reason this won't work? noob prog on threads. getting invalid multibyte char error. thanks
otters has quit [Ping timeout: 252 seconds]
phantasm66 has joined #ruby
otters has joined #ruby
noyb has quit [Ping timeout: 255 seconds]
<\13k>
n_blownapart, looks like a bad character in the actual file, not a bug in the code. try using "# encoding: utf-8" at the top (yes, with comment). otherwise try switching editors
Michael_ has joined #ruby
dioms has joined #ruby
<n_blownapart>
thanks \13k I wasn't aware of that sort of problem . I ran this prog. last week and had a different answer. I don't think it printed "outside the thread" will check
swiftsure has joined #ruby
Dreamer3 has quit [Ping timeout: 246 seconds]
xsbeats has joined #ruby
<n_blownapart>
\13k: ok thanks I ran that and the output was "outside the thread" . But the textbook has also "Starting the thread" outputted first. What's going on?
cj3kim has joined #ruby
xyzodiac has quit [Quit: Computer has gone to sleep.]
h4mz1d has quit [Read error: Operation timed out]
Dreamer3 has joined #ruby
joeycarmello has joined #ruby
<n_blownapart>
\13k: if you're still around this is what the book says I should have: http://pastie.org/5430216
<n_blownapart>
\13k: thanks I'll take a look. hey, I understand a thread in concept, but in code not very well. Is either sleep or a loop always needed in threads?
gbchaosmaster has quit [Ping timeout: 252 seconds]
radic_ has quit [Ping timeout: 260 seconds]
mercwith1mouth has joined #ruby
freezway has joined #ruby
lolcathost has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
lupine has quit [Quit: If you see this, my dogfood was poisoned]
Virunga has joined #ruby
Virunga has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
yshh has joined #ruby
mercwith1mouth has joined #ruby
Niamkik has joined #ruby
Mon_Ouie has quit [Ping timeout: 245 seconds]
tbrock has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
tbrock has quit [Client Quit]
lolmaus has quit []
ryanf has quit [Quit: leaving]
qwerxy has joined #ruby
arya has quit [Ping timeout: 244 seconds]
jlast has joined #ruby
freeayu has quit [Ping timeout: 252 seconds]
arya has joined #ruby
jlast has quit [Ping timeout: 264 seconds]
Hanmac1 is now known as Hanmac
mercwithamouth has quit [Ping timeout: 252 seconds]
mercwith1mouth has quit [Ping timeout: 248 seconds]
freeayu has joined #ruby
<mand>
When I'm in a class, what's the different between "def self.somemethod" and "def somemethod"? Is the first one static and the 2nd one not?
<charliesome>
mand: the first one defines a singleton method on the class object itself
<charliesome>
so yes - it's effectively a static method
<mand>
Ah, thanks
zommi has quit [Quit: Leaving.]
<charliesome>
in ruby, you can define methods directly on specific objects that aren't accessible on other objects of the same type
<charliesome>
for example: a = "Hello"; def a.upcase; downcase; end; puts a.upcase # => "hello"
haxrbyte has quit [Read error: Connection reset by peer]
<charliesome>
since classes are objects too, this is how static methods work in ruby
<mand>
Ah, yes, I just wondered why it said my method didn't exist but then I realized I wasn't working with an instance of the class but directly with the class (so probably calling "static" or singleton methods)
Rydefalk_ has quit [Remote host closed the connection]
codecop has joined #ruby
marainein has quit [Quit: Ex-Chat]
generalissimo has quit [Remote host closed the connection]
<mand>
But it's quite nice that you can dynamically extend instances of classes
<mand>
That's really powerful
<charliesome>
mand: one of my favourite things to explain to new ruby programmers is that classes are objects of class Class ;)
horrror has joined #ruby
<horrror>
hey
<Hanmac>
charliesome: be careful the define methods on objects does not work for all objects ... some "primitive" like fixnum or symbol does not support it
<horrror>
I'm using require 'geography' in a rb sinatra mode and it doesn't require it. although when i require manually 'geography' in its console it returns "true"
<havenn>
Is there a way to reopen a UNIXSocket reader after it has been closed? Stuck and curious if it is possible? https://gist.github.com/4142857
<Hanmac>
horrror is "geography" one of your local files?
<horrror>
Hanmac: no
<charliesome>
Hanmac: sure, but it's easier to say "you can define methods on objects" than "you can define methods on RBasics" :p
robbyoconnor has joined #ruby
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Ping timeout: 250 seconds]
margle has quit [Quit: Computer has gone to sleep.]
<havenn>
I'm falling asleep, this code is bad ^ anyways g'luck!
havenn has quit [Remote host closed the connection]
<cirwin>
https://gist.github.com/396c3006de97c8066501 <-- can anyone find any counter-examples for this behaviour of constant lookup in ruby? I think you should be able to replace any CONST_NAME by binding.const("CONST_NAME") and not notice the difference
monkegjinni has quit [Remote host closed the connection]
Whackatre_ has quit [Quit: Cya.]
ikaros_ has joined #ruby
matrixise has joined #ruby
KRF_ is now known as KRF
KRF has quit [Changing host]
KRF has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
Tuxist has quit [Read error: Connection reset by peer]
horrror has quit [Quit: horrror]
jds_ has joined #ruby
ikaros has quit [Ping timeout: 260 seconds]
jwang has quit [Read error: Connection reset by peer]
jwang has joined #ruby
kil0byte has joined #ruby
jds_ has quit [Remote host closed the connection]
Drakevr has quit [Changing host]
Drakevr has joined #ruby
ChampS666 has joined #ruby
ZubKonst_ has joined #ruby
_guy has quit [Remote host closed the connection]
_guy has joined #ruby
lkba has quit [Ping timeout: 265 seconds]
mengu has joined #ruby
ZubKonst has quit [Ping timeout: 252 seconds]
Virunga has joined #ruby
jwang has quit [Read error: Connection reset by peer]
jwang has joined #ruby
lolcathost has quit [Ping timeout: 246 seconds]
xandy is now known as xAndy
k610 has joined #ruby
sepp2k has joined #ruby
lolcathost has joined #ruby
horrror has joined #ruby
lolcathost has quit [Client Quit]
pmros has joined #ruby
lolcathost has joined #ruby
<pmros>
hi!
<Retistic>
is there a way to check if a string matches a regex in ruby? everything i find seems to check if it contains the regex rather than if it matches it entirely?
horrror has quit [Client Quit]
<cirwin>
Retistic: add \A and \z to your regex
Virunga has quit [Remote host closed the connection]
k610 has quit [Ping timeout: 265 seconds]
Neomex has joined #ruby
Neomex has quit [Client Quit]
<Retistic>
cirwin: i'll try
<Hanmac>
Retistic: if you cant change the regex use this: string =~ regex && string.match(regex)[0] == regex
<cirwin>
Hanmac: heh, I was going to suggest string[regex] == string :)
jimeh has joined #ruby
<Hanmac>
cirwin yeah yours is better
<Retistic>
can i just use string == regex?
<cirwin>
Retistic: no
<cirwin>
it's not an operation ruby optimizes for
toto_ has joined #ruby
ChampS666 has quit [Ping timeout: 256 seconds]
<Hanmac>
cirwin: there is /abc/ === "abcd"
<Hanmac>
Retistic: you could try this: /\A#{regex}\z/ === string
Xeago has joined #ruby
* cirwin
defines string =~~ /regex/
<apeiros_>
cirwin: hu? what's that to do with optimization?
ToTo has quit [Ping timeout: 244 seconds]
<cirwin>
apeiros_: optimize in the user-interface sense
cousine has quit [Remote host closed the connection]
<cirwin>
it's not an operation that ruby special cases
<apeiros_>
o0
<Retistic>
cirwin: is that also true of === ?
<apeiros_>
=== is =~ for Regexp
<cirwin>
Retistic: yes, ignore ===
<apeiros_>
Retistic: === is not "a stricter ==" as in some other languages
cj3kim has quit [Quit: This computer has gone to sleep]
<apeiros_>
=== in ruby is used for things like case/when and Enumerable#grep
<cirwin>
apeiros_: e.g. python has re.match() and re.search()
<cirwin>
ruby just has re.search() and you can make the regex only match if it touches the beginning and the end
<apeiros_>
cirwin: I prefer the way ruby thinks about the problem. whether a string is fully matched by a regex or only a part of the string is, is a property of the regex, not the method IMO.
<Retistic>
apeiros_: so you mean i should add \A or \z
<pmros>
^ is the same as \A, isn't it?
<cirwin>
apeiros_: sure, I think I agree (having been confused by the distinction between .search and .match before I even started ruby)
lolcathost has joined #ruby
<Retistic>
apeiros_: given that i suck at regex, i'm not sure that's much clearer
<cirwin>
pmros: ^ is start of line, \A is start of string
shiin has joined #ruby
<cirwin>
pmros: it's very rare you want to use ^ or $; almost always \A and \z are right
Whackatre has joined #ruby
<cirwin>
(e.g. for string field validation, someone can sneak a multiline string through a regex that uses ^ and $)
<pmros>
ok, thank you, cirwin
<Retistic>
cirwin: /^(\-?\d+(\.\d+)?),(\-?\d+(\.\d+)?)$/ === coor #=> false when i add a letter to the end of coor
<cirwin>
Retistic: please use =~, not ===
<cirwin>
or people will think you are wierd :p
<apeiros_>
Retistic: yes, IMO you should use \A and \z
<Retistic>
cirwin: will that match exactly as it appears to?
<Retistic>
cirwin: aha ok
lenovodroid has quit [Ping timeout: 248 seconds]
<apeiros_>
and if you can't change the regex, create a new one from it like Hanmac suggested: /\A#{regex}\z/
<Retistic>
apeiros_: i can change the regex, so something like: /\A(\-?\d+(\.\d+)?),(\-?\d+(\.\d+)?)\z/
<cirwin>
Retistic: looks good
<apeiros_>
cirwin: re "someone can sneak a newline into it" - I love those who then go on to say "yeah, but it's a <input type="text", which is single line anyway" >.<
<cirwin>
:D
<Retistic>
cirwin: and then i use =~ not to look weird
jimeh has quit [Quit: Computer has gone to sleep.]
atmosx has quit [Remote host closed the connection]
<Retistic>
apeiros_: i copied the regex so i hope it's doing what i want :-/
<apeiros_>
and if you want it readable, you can decompose it: number = /-?\d+(?:\.\d+)?/; coordinate = /#{number},#{number}/; coordinate_only = /\A#{coordinate}\z/
wallerdev has quit [Quit: wallerdev]
atmosx has joined #ruby
<Retistic>
apeiros_: does number match a float?
<apeiros_>
yes
<apeiros_>
optionally negative
<apeiros_>
non-scientific notation
ryanlecompte has joined #ruby
<apeiros_>
(does that have a name? o0)
atmosx has quit [Client Quit]
<Retistic>
apeiros_: perfect, don't think so
cirwin has quit [Ping timeout: 244 seconds]
<Retistic>
apeiros_: coordinate? :-)
ebouchut has quit [Ping timeout: 250 seconds]
<Retistic>
apeiros_: so the backslashes just denote the start and end of a regex then and they can be entered within another regex?
bier has quit [Ping timeout: 245 seconds]
<apeiros_>
// is like "" for strings
<apeiros_>
they're the delimiters
bier_ has quit [Ping timeout: 276 seconds]
dantesun has joined #ruby
dantesun has quit [Max SendQ exceeded]
<apeiros_>
and #{} is to interpolate, same as in strings too: entity = "world"; "hello #{entity}!" # => "hello world!"
ebouchut has joined #ruby
VegetableSpoon has joined #ruby
Virunga has joined #ruby
jwang has quit [Read error: Connection reset by peer]
jwang has joined #ruby
toto_ has quit [Quit: Leaving...]
<Retistic>
apeiros_: makes sense, its pretty cool that ruby build that into regexes as well
ryanlecompte has quit [Ping timeout: 255 seconds]
snearch has joined #ruby
atmosx has joined #ruby
tenmilestereo has joined #ruby
daniel_- has joined #ruby
daniel_- has quit [Changing host]
daniel_- has joined #ruby
jwang has quit [Read error: Connection reset by peer]
bier_ has joined #ruby
LouisGB has joined #ruby
jwang has joined #ruby
bier has joined #ruby
jimeh has joined #ruby
nwertman has joined #ruby
apeiros_ has quit [Ping timeout: 245 seconds]
jwang has quit [Read error: Connection reset by peer]
jwang has joined #ruby
nwertman has quit [Ping timeout: 252 seconds]
zeromodulus has joined #ruby
LouisGB has quit [Ping timeout: 265 seconds]
joc has quit [Ping timeout: 260 seconds]
akemrir has quit [Ping timeout: 252 seconds]
<ohcibi>
hi i'm using pry and everytime it wants to output something it says undefined method "ai" for <any-class-of-the-object-that-was-involved>
<ohcibi>
any idea whats wrong?
jimeh has quit [Quit: Computer has gone to sleep.]
apeiros_ has joined #ruby
LouisGB has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
Mon_Ouie has quit [Ping timeout: 240 seconds]
dantesun has joined #ruby
dantesun has quit [Max SendQ exceeded]
Mon_Ouie has joined #ruby
banister_ has joined #ruby
<banister_>
ohcibi: because you've changed your Pry.print proc in your .pryrc to use awesome_print, but you no longer have awesome_print installed :)
<ohcibi>
this freaky little bastard...
<ohcibi>
banister_: thx
jackbrownhf has joined #ruby
jackbrownhf has quit [Changing host]
jackbrownhf has joined #ruby
spike|spiegel has quit [Ping timeout: 260 seconds]
jwang has quit [Read error: Connection reset by peer]
jds_ has joined #ruby
jwang has joined #ruby
LucidDreamZzZ has quit [Remote host closed the connection]
<shevy>
this is odd
<shevy>
in R, if you do array + 1, all members of that array are incremented by + 1
Elhu has quit [Quit: Computer has gone to sleep.]
LucidDreamZzZ has joined #ruby
codecop has quit [Remote host closed the connection]
jds_ has quit [Ping timeout: 260 seconds]
lenovodroid has joined #ruby
codecop has joined #ruby
<shevy>
and array indices start at 1 rather than 0
<shevy>
hmmmmm
_bart has joined #ruby
<apeiros_>
the author of R didn't read dijkstra then
lemonsparrow has quit [Quit: Page closed]
<shevy>
hehe
<shevy>
it was a funny read, why they use the "<-" for assignment rather than "=" ... because they had a keyboard with such a character, so it was still just one keystroke. today, it's two keystrokes... using <- for assignment feels so strange
love_color_text has joined #ruby
<banister_>
all those statistical languages are shit
<banister_>
octave is nasty too
abstrusenick has quit [Quit: abstrusenick]
zz_chrismcg is now known as chrismcg
jwang has quit [Read error: Connection reset by peer]
jwang has joined #ruby
chrismcg is now known as zz_chrismcg
statarb3 has quit [Quit: Leaving]
Slivka has joined #ruby
king313 has joined #ruby
king313 has quit [Changing host]
king313 has joined #ruby
dantesun has joined #ruby
dantesun has quit [Max SendQ exceeded]
brandon has quit [Read error: Connection reset by peer]
ebouchut has quit [Quit: ebouchut]
brandon has joined #ruby
lenovodroid has quit [Read error: Connection reset by peer]
lenodroid has joined #ruby
Russell^^ has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
schaerli has joined #ruby
oqa has joined #ruby
jwang has quit [Read error: Connection reset by peer]
akemrir has joined #ruby
arya has joined #ruby
jwang has joined #ruby
nari has quit [Ping timeout: 244 seconds]
dantesun has joined #ruby
ChampS666 has joined #ruby
jwang has quit [Read error: Connection reset by peer]
dantesun has quit [Max SendQ exceeded]
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
jamesaxl has quit [Read error: No route to host]
jwang has joined #ruby
survili has joined #ruby
<oqa>
hi, does anyone know is there a way to configure OptionParser to ignore unknown options? I'm trying to implement system where main class parses some common options and each sub class has its own parameters (like git)
jsilver has joined #ruby
<oqa>
current OptionParser implementation raises an "InvalidOption: invalid option: -h" when the main class encounters parameters known only to a sub class
<oqa>
that's the sensible default, but I'm looking for a way to configure that behaviour
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
arya_ is now known as arya
arya has quit [Client Quit]
arya has joined #ruby
seanBEL has joined #ruby
nyuszika7h has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
survili has left #ruby ["Leaving"]
seanBEL has quit [Client Quit]
ltsstar has joined #ruby
`brendan has quit [Ping timeout: 256 seconds]
dhruvasagar has quit [Ping timeout: 244 seconds]
Michael_ has joined #ruby
arya has quit [Ping timeout: 244 seconds]
banister_ has quit [Remote host closed the connection]
arya has joined #ruby
LucidDreamZzZ has quit [Quit: Leaving]
applesarefruits has quit [Ping timeout: 255 seconds]
dhruvasagar has joined #ruby
LucidDreamZzZ has joined #ruby
Michael_ has quit [Remote host closed the connection]
krz has joined #ruby
vlad_starkov has joined #ruby
jwang has quit [Read error: Connection reset by peer]
jwang has joined #ruby
banisterfiend has joined #ruby
_guy has quit [Remote host closed the connection]
_guy has joined #ruby
Michael_ has joined #ruby
arietis has joined #ruby
ebouchut has joined #ruby
AndChat| has joined #ruby
Virunga has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 245 seconds]
_guy has quit [Remote host closed the connection]
_guy has joined #ruby
Asher2 has quit [Quit: Leaving.]
Asher has joined #ruby
Michael_ has quit [Remote host closed the connection]
banisterfiend has quit [Remote host closed the connection]
ddd has joined #ruby
Michael_ has joined #ruby
jwang has quit [Read error: Connection reset by peer]
jwang has joined #ruby
Virunga has joined #ruby
samphippen has joined #ruby
ewag has quit [Ping timeout: 240 seconds]
pmros has quit [Quit: Konversation terminated!]
Michael_ has quit [Remote host closed the connection]
jsilver has quit [Remote host closed the connection]
bashdy has joined #ruby
hoelzro|away is now known as hoelzro
_guy has quit [Remote host closed the connection]
_guy has joined #ruby
Erfankam has joined #ruby
arya has quit [Ping timeout: 244 seconds]
tk_ has joined #ruby
keymone_ has joined #ruby
keymone has quit [Ping timeout: 244 seconds]
keymone_ is now known as keymone
arya has joined #ruby
freeayu__ has quit [Remote host closed the connection]
jenrzzz has joined #ruby
ewag has joined #ruby
yellow5 has quit [Quit: time to go!]
Michael_ has joined #ruby
Iszak has joined #ruby
bashdy has quit [Remote host closed the connection]
yellow5 has joined #ruby
LouisGB has quit [Ping timeout: 240 seconds]
seich- has quit [Ping timeout: 246 seconds]
<shevy>
oqa no idea, OptionParser always confused the hell out of me
cakehero has quit [Quit: Computer has gone to sleep.]
synthetix has quit [Remote host closed the connection]
seich- has quit [Ping timeout: 246 seconds]
elkclone_ has joined #ruby
elkclone__ has quit [Read error: Connection reset by peer]
arya has quit []
arya has joined #ruby
lolcathost has quit [Quit: Zzz...]
jackbrownhf has quit [Quit: Sto andando via]
capaterra has quit [Remote host closed the connection]
mercwith1mouth has quit [Ping timeout: 250 seconds]
mercwithamouth has quit [Ping timeout: 250 seconds]
seich- has joined #ruby
pdelgallego has quit [Quit: pdelgallego]
No_se has joined #ruby
cousine has quit [Remote host closed the connection]
seanwash has quit [Quit: Computer has gone to sleep.]
greenarrow has quit [Ping timeout: 256 seconds]
greenarrow has joined #ruby
iamjarvo has joined #ruby
qwerxy has quit [Quit: offski]
havenn has joined #ruby
miphe has joined #ruby
<No_se>
Hello! I am new to REXML. My problem: I want to somehow merge to xml files and would like to have a certain indent. For example: a newline and 4 spaces for every nested level. Any hints?
<csmrfx>
merge xml files?
seich- has quit [Ping timeout: 246 seconds]
Yiding has joined #ruby
<No_se>
android translation files. Basically find matching element with same name and replace the original version with the translation
mikepack has quit [Remote host closed the connection]
Morkel has joined #ruby
v1negar has quit [Remote host closed the connection]
lkba has joined #ruby
mercwith1mouth has joined #ruby
ltsstar has quit [Quit: ltsstar]
<reactormonk>
matip, if you still haven't gotten it: sorry, but LoC is a useless measure
Elhu has quit [Quit: Computer has gone to sleep.]
shtirlic has joined #ruby
<apeiros_>
LoC/h != productivity
<matip>
how would you measure it?
<matip>
apeiros_
<apeiros_>
I wouldn't.
<matip>
then you have a problem
<apeiros_>
no
mikepack has joined #ruby
<matip>
well, I do
<matip>
:P
<apeiros_>
you have a problem because you think it was necessary to
<matip>
because I'm required to measure it in a way that it makes sense
<matip>
for a project I did
<reactormonk>
there is none ;-)
w400z has joined #ruby
<reactormonk>
are you sure you require a measure or one that makes sense? If you just need a measure, invent some new bullshit and make an argument for it.
<apeiros_>
matip: if your employers wants LoC, then split every expression out onto its own line
<apeiros_>
have fun
<apeiros_>
like: x = \n "hello" \n " world"
<apeiros_>
3 LoC for `x = "hello world"`
<matip>
reactormonk, lol
<reactormonk>
matip, if people are behaving stupid, make subtle fun about it.
<apeiros_>
oh, I omitted a \, but well
<apeiros_>
coding isn't factory work
xyzodiac has quit [Quit: Computer has gone to sleep.]
<apeiros_>
it's the same bullshit reason for why people still believe in the mythical man month… i.e., if 1 coder solves it in a month, then 10 coders surely will solve it in 3 days
<reactormonk>
matip, if you're feeling constructive, go try to convince your boss it's a bad idea.
<apeiros_>
it's bullshit and there's no way around.
shtirlic has quit [Ping timeout: 252 seconds]
<seanstickle>
Factory work doesn't scale with the number of people you throw at the problem either.
<seanstickle>
Every system has constraints.
ltsstar has joined #ruby
<apeiros_>
seanstickle: true, but it comes closer to actually do that
miphe has quit [Quit: Leaving]
<seanstickle>
apeiros_: not in my experience, but I'll leave the door open on that one
<kapowaz>
can anyone recommend a gem for handling asynchronous mail queuing?
<reactormonk>
apeiros_, depends on the complexity of work. Coding just tends to need more introductionary work
havenn has joined #ruby
<kapowaz>
maybe something that uses something like resque ?
<reactormonk>
kapowaz, just write the mail into some dir your mail server can use...
<apeiros_>
reactormonk: not just introductory
<kapowaz>
not sure as that's an option if I'm using heroku
tomsthumb has quit [Quit: Leaving.]
<reactormonk>
kapowaz, got a point there.
<apeiros_>
that's the same nonsense as believing in that you could just hand over a spec-sheet and from then on there are no questions open…
swiftsure has quit [Ping timeout: 260 seconds]
<kapowaz>
I see there are various gems that use ActionMailer along with resque (e.g. https://github.com/zapnap/resque_mailer) but I want to use this with a Sinatra app…
u89 has joined #ruby
darthdeus has quit [Quit: Leaving...]
<kapowaz>
any reason I couldn't use Resque Mailer if I added ActionMailer to a Sinatra project…?
<reactormonk>
sure heroku doesn't provide you with something similar?
reset has quit [Quit: Leaving...]
BoomCow has joined #ruby
tbrock has quit [Quit: Computer has gone to sleep.]
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
jeffreybaird has quit [Quit: jeffreybaird]
swiftsure has joined #ruby
v1negar has joined #ruby
Goles has quit [Remote host closed the connection]
shevy2 has joined #ruby
reset has joined #ruby
pyx has joined #ruby
Rym has quit [Remote host closed the connection]
fantazo has joined #ruby
vlad_starkov has joined #ruby
Rym has joined #ruby
shevy has quit [Ping timeout: 260 seconds]
<atmosx>
%p= "Λέξεις: <strong>#{@st[0]}</strong>" <-- to get this working in haml do I need to use hashes?
tomsthumb has joined #ruby
applesarefruits has quit [Ping timeout: 252 seconds]
Guest10284 is now known as moshee
moshee has quit [Changing host]
moshee has joined #ruby
daniel_- has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
ddd has quit [Quit: back tomorrow evening when I get my replacement MBP power cord]
blazes816 has joined #ruby
eldariof has joined #ruby
jaygen has quit [Remote host closed the connection]
mercwith1mouth has quit [Read error: Operation timed out]
akemrir has quit [Quit: WeeChat 0.3.9.2]
cj3kim has quit [Ping timeout: 276 seconds]
mercwithamouth has quit [Ping timeout: 245 seconds]
malcolmva has quit [Read error: No route to host]
cj3kim has joined #ruby
atno is now known as atno|smoke
<atmosx>
deos anyone ever listen to any new/tech podcast?
codecaster has quit [Read error: Connection reset by peer]
<seanstickle>
Yup
_bart has quit [Quit: _bart]
<atmosx>
I'm listening to TWiT, but I see no point in most conversation... it's just opinions...
<seanstickle>
Well, it is an opinion show
<seanstickle>
So that shouldn't be *too* surprising
shtirlic has joined #ruby
<atmosx>
yeah but it's insanely verbose
<atmosx>
true
<atmosx>
any alternatives?
<atmosx>
more concise might be good
<banisterfiend>
seanstickle: sup stick
<seanstickle>
Hallo banisterfiend
codecaster has joined #ruby
eldariof has quit [Ping timeout: 252 seconds]
elkclone has quit [Quit: It's never too late to unplug and run.]
ebouchut_ has joined #ruby
Advocation has joined #ruby
wallerdev has joined #ruby
eldariof has joined #ruby
ebouchut has quit [Ping timeout: 255 seconds]
ryanf has quit [Ping timeout: 252 seconds]
Slivka has joined #ruby
tbrock has joined #ruby
Elhu has joined #ruby
<tbrock>
do you guys know how to get a sinatra app to automatically open up in a browser when run?
<tbrock>
i've been trying to run the sinatra app in a thread
<tbrock>
then use launchy to open it
<tbrock>
but the thread never runs
berserkr has joined #ruby
mercwithamouth has joined #ruby
mikepack has quit [Remote host closed the connection]
eldariof has quit [Ping timeout: 265 seconds]
Morkel_ has joined #ruby
pdelgallego has joined #ruby
shevy2 is now known as shevy
Guest92676 has joined #ruby
Morkel has quit [Ping timeout: 252 seconds]
Morkel_ is now known as Morkel
cakehero has joined #ruby
Peter_lee has joined #ruby
swiftsure has quit [Ping timeout: 252 seconds]
ebouchut_ has left #ruby ["Quitte"]
slainer6_ has joined #ruby
ebouchut has joined #ruby
joeycarmello has joined #ruby
jds_ has joined #ruby
mercwith1mouth has joined #ruby
<Peter_lee>
How would I move 5 spaces over in an array? For example if I have A through Z in an array and want to replace the letter with the 5th next index. So A would be replaced by F and Y by D.
atno|smoke is now known as atno
michaelmartinez has joined #ruby
ebouchut has quit [Client Quit]
cantonic has joined #ruby
Erfankam has joined #ruby
x82_nicole has joined #ruby
Xeago has quit [Remote host closed the connection]
manizzle has joined #ruby
jds_ has quit [Ping timeout: 245 seconds]
Peter_lee has quit [Quit: Page closed]
xandy is now known as xAndy
joeycarmello has quit [Read error: Connection reset by peer]
joeycarmello has joined #ruby
noyb has joined #ruby
thinkdevcode has joined #ruby
Weazy has quit [Ping timeout: 276 seconds]
tommyvyo_ has joined #ruby
joeycarmello has quit [Remote host closed the connection]
c0rn has joined #ruby
joeycarmello has joined #ruby
rippa has quit [Ping timeout: 250 seconds]
thinkdevcode has quit [Remote host closed the connection]
tommyvyo_ has quit [Quit: Computer has gone to sleep.]
noyb has quit [Ping timeout: 265 seconds]
skaczor has quit [Remote host closed the connection]
hackerdude has quit [Remote host closed the connection]
lowg has joined #ruby
ryanf has joined #ruby
Rym_ has joined #ruby
Rym_ has quit [Client Quit]
Rym_ has joined #ruby
VegetableSpoon has joined #ruby
BRMatt has joined #ruby
itnomad has joined #ruby
codecaster has quit [Quit: Leaving.]
Rym has quit [Ping timeout: 240 seconds]
Rym_ is now known as Rym
eldariof has joined #ruby
techhelp has quit [Quit: This computer has gone to sleep]
eldariof has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
ryanf has quit [Ping timeout: 246 seconds]
wargasm has joined #ruby
lenovodroid has joined #ruby
eldariof has joined #ruby
danktamagachi has quit [Ping timeout: 265 seconds]
fantazo has quit [Remote host closed the connection]
emmanuelux has joined #ruby
xaxxon has joined #ruby
havenn has joined #ruby
<banisterfiend>
arturaz: that didnt really work (copying to .rbenv/versions)
jarred_ has joined #ruby
<banisterfiend>
arturaz: in so far as all the executable files had the wrong shebangs so i had to modify that, but also my gem path is kind of screwey..
havenn has quit [Remote host closed the connection]
itnomad has quit [Quit: Leaving]
havenn has joined #ruby
shtirlic has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
lenovodroid has quit [Read error: Connection reset by peer]
tomsthumb has quit [Quit: Leaving.]
Erfankam has quit [Quit: Leaving.]
Michael_ has joined #ruby
Eplemosen has joined #ruby
jarred_ has quit [Quit: jarred_]
iamjarvo has joined #ruby
Advocation has quit [Quit: Advocation]
lenovodroid has joined #ruby
onibox has quit [Quit: leaving]
Drewch_ is now known as Drewch
Retistic has joined #ruby
margle has quit [Quit: Computer has gone to sleep.]
ZURICHIPAD has joined #ruby
<ZURICHIPAD>
What gems and resources can I use to speed up my development of a helpdesk system with chat?
eldariof has quit [Remote host closed the connection]
<kapowaz>
I've been working on putting together an authentication system using warden and sinatra, with a datamapper backend
<kapowaz>
it was working, then I worked on some things in another branch, switched back and now it's broken — in a way I don't understand/can't explain.
<kapowaz>
I'd appreciate it if anyone could take a look at the trace and explain it or point me in the right direction?
<shevy>
I'd grep the source, then put in some "pp" there
<kapowaz>
/Users/bdarlow/.rbenv/versions/1.9.3-p194/lib/ruby/gems/1.9.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb i
Morkel has quit [Quit: Morkel]
<kapowaz>
so it's from within rack
nkts has quit []
Averna has quit [Quit: Leaving.]
nkts has joined #ruby
haxrbyte has quit [Ping timeout: 240 seconds]
BRMatt has quit [Remote host closed the connection]
BoomCow has quit [Quit: This computer has gone to sleep]
Russell^^ has quit [Quit: Russell^^]
Booskill has quit [Read error: Connection reset by peer]
ebouchut has quit [Quit: This computer has gone to sleep]
<kapowaz>
okay, so I get where it's coming from now. It's the fail method of the Failure class.
seanwash has joined #ruby
lowg has quit [Read error: Connection reset by peer]
lowg has joined #ruby
mercwithamouth has quit [Ping timeout: 240 seconds]
mercwith1mouth has quit [Ping timeout: 264 seconds]
Spaceboy has quit [Read error: Operation timed out]
<x82_nicole>
Can someone point me to video tutorials that explain the concepts of OOP? I've been trying to find some decent ones on YouTube, but they're all terrible. A lot of them use such heavy accents, are the quality is abysmal.
Mon_Ouie has quit [Ping timeout: 264 seconds]
<kapowaz>
x82_nicole: youtube videos probably aren't a good place to start with that topic
<kapowaz>
by which I mean video tutorials in general.
somazero has joined #ruby
<x82_nicole>
Hmm, okay. I watched the MIT ones, but he lost me on memory pointers. -_-
<x82_nicole>
Perhaps an article?
haxrbyte has joined #ruby
<kapowaz>
x82_nicole: what language was he talking about? C++?
dantesun has joined #ruby
<kapowaz>
pointers aren't an integral part of learning OOP.
<x82_nicole>
It was Python :p
<kapowaz>
Python has pointers? That I didn't know.
dantesun has quit [Max SendQ exceeded]
<kapowaz>
I'm probably not a good one to answer your question though, I'm sorry to say.
Rym has quit [Remote host closed the connection]
Rym has joined #ruby
atno is now known as atno|Zzz
<x82_nicole>
It's alright, thanks for trying, hah(:
<No_se>
x82_nicole: I can't suggest specific videos, but I would recomment some texts in your native language
ryanf has joined #ruby
dantesun has joined #ruby
<No_se>
The OOP concept is not that fancy, but you probably won't get it just by watching a video
banseljaj is now known as imami|afk
dantesun has quit [Max SendQ exceeded]
havenn has joined #ruby
mercwithamouth has joined #ruby
mercwith1mouth has joined #ruby
kil0byte has quit [Ping timeout: 255 seconds]
ircmouser has joined #ruby
havenn has quit [Remote host closed the connection]
<kapowaz>
First time I read about OOP was about 18 years ago, in a book about Pascal. The metaphor they used was about real world objects like a chair or a desk, which have properties (how many legs, material they're made out of) and methods (you can sit on one, serve dinner on it etc.)
nkts has quit []
ryanf has quit [Ping timeout: 255 seconds]
<kapowaz>
I always found that kind of analogy helpful as a basis
haxrbyte_ has joined #ruby
<atmosx>
x82_nicole: maybe getting a book will help
cj3kim has quit [Ping timeout: 276 seconds]
haxrbyte has quit [Read error: Operation timed out]
gyre007 has joined #ruby
havenn has joined #ruby
<tsou>
kapowaz: i find this analogy bad, cause it's not the chair nor the table that have the functionality. From the point of view you are describing, a functional approach seems more appropriate.. but that's a matter of taste, of course..
Michael_ has quit [Remote host closed the connection]
<burgestrand>
Dog and barking always confused me.
<kapowaz>
it's not a perfect analogy. I'm sure there are better ones that tie it all together neatly.
<atmosx>
the diff is that in OOP you get items and then decide what to do with them. in procedural you have a specific item for a specific task... that's about it with all the bells and whistles but if you don't write a couple of classes with objects yu won't understand
Michael_ has joined #ruby
<kapowaz>
but it always helped me understand it better.
<atmosx>
there's a good example tha deals with two programmers approaching a simple calc task in my ruby manual but I'm too bored to reproduce it now...
<atmosx>
it explains the difference thoroughly, has also code examples (both in ruby but you get the point)
<seanstickle>
Domain Driven Design is a good topic to read on if you want to see how OO is well-used in practice.
<seanstickle>
And, basically, ignore inheritance.
<seanstickle>
All the beginner books talk about it, and it's very often a bad idea.
berserkr has quit [Quit: Leaving.]
<atmosx>
it's not hard concept
Hannes3_ has joined #ruby
<atmosx>
I'm amateur programmer and I still don't understand many basic things in ruby but these topics are easy
r0bby has joined #ruby
kbeddingfield has joined #ruby
lenovodroid has joined #ruby
w400z has quit []
joeycarmello has joined #ruby
rafael_ has joined #ruby
robbyoconnor has quit [Ping timeout: 252 seconds]
rafael_ has quit [Client Quit]
piccalingo has joined #ruby
piccalingo has quit [Remote host closed the connection]
tpo has joined #ruby
r0bby is now known as robbyoconnor
joeycarmello has quit [Ping timeout: 260 seconds]
<shevy>
atmosx I fail at mutex and data in shared threads
<shevy>
what I dont like in inheritance is that it is all kept in line
<shevy>
class Weapon -> class Sword
<shevy>
but what about the jedi swords
<shevy>
they are like laser weapons as well!
<seanstickle>
Basically, don't use inheritance.
BoomCow has joined #ruby
Mon_Ouie has joined #ruby
banisterfiend has quit [Ping timeout: 240 seconds]
lolcathost has joined #ruby
SwooshyCueb has quit [Excess Flood]
<shevy>
sad but true :(
<seanstickle>
Not sad.
SwooshyCueb has joined #ruby
<seanstickle>
It's a bad fit for most things.
<seanstickle>
Composition is the better thing.
dedis has joined #ruby
ryanf has joined #ruby
SwooshyCueb has quit [Ping timeout: 240 seconds]
KevinSjoberg has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
cj3kim has joined #ruby
cj3kim has joined #ruby
cj3kim has quit [Changing host]
kingsidharth has joined #ruby
Michael_ has quit [Remote host closed the connection]
tenmilestereo has quit [Quit: Leaving]
Michael_ has joined #ruby
kingsidharth has quit [Client Quit]
SwooshyCueb has joined #ruby
emergion has joined #ruby
<canton7>
The main use I've had out of inheritance is boxing/unboxing in strongly-typed languages
jimeh has joined #ruby
noyb has quit [Ping timeout: 264 seconds]
cj3kim has quit [Quit: This computer has gone to sleep]
gabrielrotbart has joined #ruby
byennen has joined #ruby
cj3kim has joined #ruby
kingsidharth has joined #ruby
emergion has quit [Ping timeout: 250 seconds]
ryanf has quit [Ping timeout: 264 seconds]
ryanlecompte has joined #ruby
jenrzzz has joined #ruby
alanp_ has joined #ruby
kingsidharth has left #ruby [#ruby]
tbrock_ has joined #ruby
byennen has quit [Ping timeout: 264 seconds]
jrist has joined #ruby
cj3kim has quit [Client Quit]
No_se has left #ruby [#ruby]
ikaros has quit [Quit: Ex-Chat]
lenovodroid has quit [Ping timeout: 248 seconds]
kiwnix has joined #ruby
nemesit has quit [Quit: Leaving...]
punkrawkR has quit [Read error: Connection reset by peer]
alanp has quit [Ping timeout: 276 seconds]
mvangala_ has joined #ruby
lenovodroid has joined #ruby
Virunga has quit [Remote host closed the connection]
aeontech has quit [Quit: aeontech]
MarcWebe1 has quit [Ping timeout: 244 seconds]
MarcWeber has joined #ruby
mvangala has quit [Read error: Connection reset by peer]
Eiam has quit [Ping timeout: 265 seconds]
nari has joined #ruby
banisterfiend has joined #ruby
king313 has quit [Ping timeout: 240 seconds]
Slivka has quit [Remote host closed the connection]
cakehero has quit [Quit: Computer has gone to sleep.]
jeffreybaird has quit [Read error: No route to host]
jeffreybaird_ has joined #ruby
lenovodroid has quit [Ping timeout: 260 seconds]
jeffreybaird_ has quit [Client Quit]
SwooshyCueb has quit [Remote host closed the connection]
linoj_ has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
ikaros has joined #ruby
SwooshyCueb has joined #ruby
mercwith1mouth has quit [Ping timeout: 260 seconds]
mercwithamouth has quit [Ping timeout: 260 seconds]
iPhoneMRZ has joined #ruby
lenovodroid has joined #ruby
thinkdevcode has joined #ruby
piotr__ has quit [Ping timeout: 264 seconds]
iPhoneMRZ has quit [Client Quit]
digitalcakestudi has quit [Quit: Leaving.]
miphe has joined #ruby
fantazo has joined #ruby
iPhoneMRZ has joined #ruby
elkclone has joined #ruby
tpo has left #ruby ["Leaving"]
ryanf has joined #ruby
tbrock_ has quit [Quit: Computer has gone to sleep.]
iPhoneMRZ has quit [Remote host closed the connection]
yoklov has joined #ruby
dangerousdave has quit [Ping timeout: 252 seconds]
manizzle has quit [Ping timeout: 248 seconds]
slainer6_ has quit [Remote host closed the connection]
SwooshyCueb has quit [Ping timeout: 240 seconds]
lolcathost has quit [Ping timeout: 250 seconds]
elkclone has quit [Read error: Connection reset by peer]
ryanf has quit [Ping timeout: 252 seconds]
freezway has joined #ruby
jjang has joined #ruby
kbeddingfield has quit [Remote host closed the connection]
volte has quit [Read error: Connection reset by peer]
volte has joined #ruby
generalissimo has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
statarb3 has quit [Quit: Leaving]
mercwith1mouth has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
jbermudes has quit [Read error: Connection reset by peer]
Neomex has joined #ruby
Neomex has quit [Client Quit]
jbermudes has joined #ruby
jbermudes has quit [Changing host]
jbermudes has joined #ruby
F1skr has quit [Quit: WeeChat 0.3.9.2]
jeffreybaird has joined #ruby
elkclone has joined #ruby
jamesaxl has quit [Ping timeout: 255 seconds]
jamesaxl has joined #ruby
<freezway>
wow there are no working id3 libraries for ruby 1.9.x
greenarrow has quit [Quit: IRC is just multiplayer notepad]
<freezway>
tilo's crashes on the require line
<freezway>
id3tag is way out of date
jds_ has quit [Remote host closed the connection]
<freezway>
and taglib doesnt work with 1.9.x
butblack has joined #ruby
linoj_ has quit [Quit: linoj_]
Xeago has joined #ruby
ChampS666 has quit [Ping timeout: 255 seconds]
kbeddingfield has joined #ruby
SwooshyCueb has joined #ruby
jekotia has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
nari has quit [Ping timeout: 240 seconds]
plains has joined #ruby
plains has quit [Changing host]
plains has joined #ruby
butblack has quit [Client Quit]
havenn has quit [Remote host closed the connection]