apeiros changed the topic of #ruby-lang to: Ruby 2.1.5; 2.0.0-p598; 1.9.3-p551: http://ruby-lang.org || Paste code on http://gist.github.com
tkuchiki has quit [Ping timeout: 245 seconds]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby-lang
elastik has quit [Ping timeout: 250 seconds]
momomomomo has quit [Quit: momomomomo]
ta has quit [Remote host closed the connection]
klmlfl has quit [Remote host closed the connection]
Bwild has joined #ruby-lang
arBmind1 has joined #ruby-lang
AwesomeRuski has quit [Ping timeout: 246 seconds]
arBmind has quit [Ping timeout: 264 seconds]
JokerDoom has joined #ruby-lang
<ReinH> womble: this is why everyone should just speak BNF
<womble> Damn straight.
<womble> Bugger Esperanto, make BNF the universal language.
elastik has joined #ruby-lang
gbrlmrllo has joined #ruby-lang
devgiant has quit [Quit: Leaving]
gbrlmrllo has left #ruby-lang ["Saliendo"]
GarethAdams has quit [Ping timeout: 258 seconds]
mistym has quit [Quit: Leaving...]
charliesome has quit [Quit: zzz]
GarethAdams has joined #ruby-lang
GarethAdams has quit [Changing host]
GarethAdams has joined #ruby-lang
cantonic has joined #ruby-lang
tkuchiki has joined #ruby-lang
charliesome has joined #ruby-lang
usershell has joined #ruby-lang
nathanstitt has quit [Ping timeout: 252 seconds]
JokerDoom has quit [Quit: Leaving]
JokerDoom has joined #ruby-lang
nathanstitt has joined #ruby-lang
usershell has quit [Ping timeout: 250 seconds]
Artemitch has joined #ruby-lang
Artemitch has quit [Ping timeout: 272 seconds]
elastik has quit [Ping timeout: 250 seconds]
<apeiros_> ReinH: BNF? srsly? not at least EBNF or ABNF?
<ReinH> apeiros_: Well, if you want to get *fancy*...
<darix> apeiros_: BNF will be the oxford english of the future. ;)
<womble> After the machines have taken over.
marr has quit [Ping timeout: 255 seconds]
<darix> womble: \A\z is also something many people dont know about
hendranata_ has joined #ruby-lang
hendranata_ has quit [Remote host closed the connection]
hendranata_ has joined #ruby-lang
arooni-mobile has joined #ruby-lang
yusuf has joined #ruby-lang
dwknoxy has quit [Quit: Textual IRC Client: www.textualapp.com]
existensil has joined #ruby-lang
jkad1 has quit [Quit: WeeChat 1.0.1]
arooni-mobile has quit [Ping timeout: 245 seconds]
lsegal has joined #ruby-lang
qqshfox has joined #ruby-lang
Bwild has quit [Quit: leaving]
usershell has joined #ruby-lang
kiyote23 has joined #ruby-lang
usershell has quit [Ping timeout: 245 seconds]
centrx has quit [Quit: Science is organized knowledge, wisdom is organized life.]
kiyote23 has quit [Ping timeout: 265 seconds]
chouhoulis has joined #ruby-lang
r0bby_ has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 244 seconds]
djbkd has quit [Quit: Leaving...]
klmlfl has joined #ruby-lang
matsutomo has joined #ruby-lang
midhir_ has quit [Remote host closed the connection]
kiyote23 has joined #ruby-lang
r0bby_ is now known as robbyoconnor
robbyoconnor has quit [Quit: Konversation terminated!]
arooni-mobile has joined #ruby-lang
robbyoconnor has joined #ruby-lang
elastik has joined #ruby-lang
kiyote23 has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 245 seconds]
centrx has joined #ruby-lang
elastik has quit [Ping timeout: 244 seconds]
Mothore_____ has joined #ruby-lang
iamninja has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
iamninja has joined #ruby-lang
Mothore_____ has quit [Ping timeout: 260 seconds]
Artemitch has joined #ruby-lang
LBo has quit [Read error: Connection reset by peer]
Artemitch has quit [Ping timeout: 260 seconds]
mistym has joined #ruby-lang
LBo has joined #ruby-lang
mistym_ has joined #ruby-lang
jimbach has quit [Remote host closed the connection]
Mothore_____ has joined #ruby-lang
mistym has quit [Ping timeout: 265 seconds]
Mothore_____ has quit [Client Quit]
usershell has joined #ruby-lang
mistym_ is now known as mistym
stardiviner has joined #ruby-lang
Stichoza has quit [Quit: Be back later ...]
miqui_ has quit [Ping timeout: 256 seconds]
ta has joined #ruby-lang
klmlfl has quit [Remote host closed the connection]
mistym has quit [Ping timeout: 250 seconds]
diegoviola has quit [Quit: WeeChat 1.0.1]
mistym has joined #ruby-lang
jimbach has joined #ruby-lang
ta has quit [Ping timeout: 260 seconds]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gix- has joined #ruby-lang
gix has quit [Disconnected by services]
chouhoulis has joined #ruby-lang
red_menace has quit [Quit: Quit]
chouhoulis has quit [Ping timeout: 260 seconds]
matsutomo has quit [Quit: matsutomo]
matsutomo has joined #ruby-lang
matsutomo has quit [Client Quit]
jimbach has quit [Remote host closed the connection]
lcdhoffman has quit [Quit: lcdhoffman]
usershell has quit [Remote host closed the connection]
kyb3r_ has joined #ruby-lang
matsutomo has joined #ruby-lang
lcdhoffman has joined #ruby-lang
lcdhoffman has quit [Client Quit]
nathanstitt has quit [Quit: I growing sleepy]
JokerDoom has quit [Ping timeout: 245 seconds]
nathanstitt has joined #ruby-lang
havenn has joined #ruby-lang
usershell has joined #ruby-lang
centrx has quit [Ping timeout: 252 seconds]
havenwood has quit [Ping timeout: 250 seconds]
BubonicPestilenc has joined #ruby-lang
stardiviner has quit [Ping timeout: 250 seconds]
Artemitch has joined #ruby-lang
spastorino has quit [Quit: Connection closed for inactivity]
Artemitch has quit [Ping timeout: 256 seconds]
centrx has joined #ruby-lang
nathanstitt has quit [Quit: I growing sleepy]
stardiviner has joined #ruby-lang
usershel_ has joined #ruby-lang
cantonic has quit [Read error: Connection reset by peer]
cantonic has joined #ruby-lang
qqshfox has quit [Quit: Textual IRC Client: www.textualapp.com]
gix- has quit [Ping timeout: 264 seconds]
usershell has quit [Ping timeout: 240 seconds]
gix has joined #ruby-lang
stardiviner has quit [Ping timeout: 245 seconds]
ur5us has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 265 seconds]
stardiviner has joined #ruby-lang
centrx has quit [Quit: Science is organized knowledge, wisdom is organized life.]
senor_jalapeno has quit [Ping timeout: 265 seconds]
stardiviner has quit [Ping timeout: 240 seconds]
kiyote23 has joined #ruby-lang
cantonic has left #ruby-lang [#ruby-lang]
cantonic has joined #ruby-lang
kiyote23 has quit [Ping timeout: 252 seconds]
Mothore_____ has joined #ruby-lang
hahuang65 has joined #ruby-lang
moogumbo has quit [Ping timeout: 272 seconds]
moogumbo has joined #ruby-lang
stardiviner has joined #ruby-lang
diegoviola has joined #ruby-lang
hahuang65 has quit [Ping timeout: 265 seconds]
charliesome has quit [Quit: zzz]
jxie has joined #ruby-lang
hagabaka has quit [Ping timeout: 255 seconds]
hagabaka has joined #ruby-lang
klmlfl has joined #ruby-lang
oleo__ has quit [Quit: Verlassend]
moogumbo has quit [Ping timeout: 272 seconds]
moogumbo has joined #ruby-lang
allomov has joined #ruby-lang
ur5us has joined #ruby-lang
charliesome has joined #ruby-lang
ur5us has quit [Ping timeout: 258 seconds]
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
Artemitch has joined #ruby-lang
stardiviner has quit [Ping timeout: 255 seconds]
Stichoza has joined #ruby-lang
JokerDoom has joined #ruby-lang
Artemitch has quit [Ping timeout: 265 seconds]
adambeynon_ has quit [Ping timeout: 272 seconds]
[spoiler] has joined #ruby-lang
Stichoza has quit [Ping timeout: 256 seconds]
adambeynon_ has joined #ruby-lang
jxie has quit [Ping timeout: 250 seconds]
jxie has joined #ruby-lang
diegoviola has quit [Quit: WeeChat 1.0.1]
stardiviner has joined #ruby-lang
Quackmatic has quit [Quit: StormBNC - a free BNC service provided by StormBit]
havenn has quit [Remote host closed the connection]
matsutomo has quit [Quit: matsutomo]
matsutomo has joined #ruby-lang
klmlfl has quit [Remote host closed the connection]
ggherdov has quit [Ping timeout: 272 seconds]
klmlfl has joined #ruby-lang
Artemitch has joined #ruby-lang
ggherdov has joined #ruby-lang
usershell has joined #ruby-lang
bcardarella_ has quit [Ping timeout: 272 seconds]
ramblinpeck_ has quit [Ping timeout: 272 seconds]
usershel_ has quit [Ping timeout: 264 seconds]
fedexo has quit [Ping timeout: 265 seconds]
chancancode has quit [Ping timeout: 272 seconds]
bcardarella_ has joined #ruby-lang
ramblinpeck_ has joined #ruby-lang
chancancode has joined #ruby-lang
allomov has quit [Remote host closed the connection]
ur5us has joined #ruby-lang
samkottler has quit [Ping timeout: 272 seconds]
samkottler has joined #ruby-lang
AmirolAhmad has joined #ruby-lang
samkottler is now known as Guest49231
rbowlby has quit [Remote host closed the connection]
dlackty_ has quit [Ping timeout: 272 seconds]
dlackty_ has joined #ruby-lang
matsutomo has quit [Quit: matsutomo]
matsutomo has joined #ruby-lang
loveablelobster has joined #ruby-lang
Campbell` has joined #ruby-lang
bryancp has quit [Ping timeout: 272 seconds]
bryancp has joined #ruby-lang
charliesome has quit [Quit: zzz]
|jemc| has quit [Ping timeout: 258 seconds]
allomov has joined #ruby-lang
kwd has joined #ruby-lang
havenwood has joined #ruby-lang
rbowlby has joined #ruby-lang
mistym has quit [Quit: Leaving...]
ta has joined #ruby-lang
AmirolAhmad has quit [Remote host closed the connection]
AmirolAhmad has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
chinmay_dd has joined #ruby-lang
BubonicPestile-1 has joined #ruby-lang
BubonicPestilenc has quit [Ping timeout: 264 seconds]
ta has quit [Remote host closed the connection]
usershell has quit [Remote host closed the connection]
ta has joined #ruby-lang
arBmind has joined #ruby-lang
rbowlby has quit [Remote host closed the connection]
rbowlby has joined #ruby-lang
rbowlby has quit [Client Quit]
charliesome has joined #ruby-lang
st0mar has joined #ruby-lang
jxie has quit [Remote host closed the connection]
arBmind1 has quit [Ping timeout: 252 seconds]
Artemitch has quit [Quit: Be back later ...]
ta has quit [Ping timeout: 260 seconds]
Artemitch has joined #ruby-lang
Artemitch has quit [Ping timeout: 245 seconds]
jg_ has joined #ruby-lang
x-light has quit [Ping timeout: 265 seconds]
usershell has joined #ruby-lang
gravitoon has joined #ruby-lang
gravitoon has quit [Quit: gravitoon]
AKASkip has joined #ruby-lang
simi has quit [Ping timeout: 244 seconds]
kyb3r_ has quit [Quit: Leaving]
st0mar has quit [Ping timeout: 264 seconds]
st0mar has joined #ruby-lang
mattyohe has quit [Quit: Connection closed for inactivity]
usershell has quit [Remote host closed the connection]
arBmind has quit [Read error: Connection reset by peer]
chussenot has joined #ruby-lang
matp has quit [Remote host closed the connection]
matsutomo has quit [Quit: matsutomo]
matp has joined #ruby-lang
Iskarlar has joined #ruby-lang
matsutomo has joined #ruby-lang
ur5us has quit [Remote host closed the connection]
ta has joined #ruby-lang
marr has joined #ruby-lang
lapide_viridi has joined #ruby-lang
postmodern has quit [Quit: Leaving]
ItSANgo has quit [Quit: Leaving...]
nofxx has quit [Ping timeout: 240 seconds]
gix has quit [Ping timeout: 244 seconds]
klmlfl has quit [Remote host closed the connection]
matsutomo has quit [Quit: matsutomo]
matsutomo has joined #ruby-lang
gix has joined #ruby-lang
chinmay_dd has quit [Quit: Leaving]
chinmay_dd has joined #ruby-lang
ta has quit [Remote host closed the connection]
Artemitch has joined #ruby-lang
ta has joined #ruby-lang
AmirolAhmad has quit [Read error: Connection reset by peer]
AmirolAhmad has joined #ruby-lang
Artemitch has quit [Ping timeout: 260 seconds]
Xzanron has joined #ruby-lang
benlovell has joined #ruby-lang
<yorickpeterse> morning
klmlfl has joined #ruby-lang
lapide_viridi has quit [Ping timeout: 240 seconds]
qba73 has joined #ruby-lang
qba73 has quit [Remote host closed the connection]
yusuf has left #ruby-lang [#ruby-lang]
stardiviner has quit [Quit: my website: http://stardiviner.dyndns-blog.com/]
lapide_viridi has joined #ruby-lang
hendranata_ has quit [Quit: Leaving]
RitterJack has joined #ruby-lang
Xzanron_ has joined #ruby-lang
usse has joined #ruby-lang
Xzanron has quit [Ping timeout: 250 seconds]
klmlfl has quit [Remote host closed the connection]
ItSANgo has joined #ruby-lang
workmad3 has joined #ruby-lang
st0mar has quit [Ping timeout: 258 seconds]
benlovell has quit [Ping timeout: 264 seconds]
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
AmirolAhmad has quit [Remote host closed the connection]
charliesome has quit [Ping timeout: 258 seconds]
charliesome has joined #ruby-lang
benlovell has joined #ruby-lang
danijoo_ has joined #ruby-lang
matsutomo has quit [Quit: matsutomo]
danijoo_ has quit [Client Quit]
danijoo has quit [Ping timeout: 250 seconds]
AmirolAhmad has joined #ruby-lang
midhir_ has joined #ruby-lang
postmodern has joined #ruby-lang
pr0ton has joined #ruby-lang
cantonic has quit [Ping timeout: 244 seconds]
JohnBat26 has joined #ruby-lang
AmirolAhmad has quit [Remote host closed the connection]
Artemitch has joined #ruby-lang
koderok has joined #ruby-lang
marcofernandez has joined #ruby-lang
Artemitch has quit [Ping timeout: 265 seconds]
ldnunes has joined #ruby-lang
usse has quit []
havenwood has quit [Remote host closed the connection]
cantonic has joined #ruby-lang
lapide_viridi has quit [Quit: Leaving]
kwd has quit [Quit: kwd]
ur5us has joined #ruby-lang
ta has quit [Remote host closed the connection]
ta has joined #ruby-lang
ur5us has quit [Ping timeout: 255 seconds]
Xzanron has joined #ruby-lang
Xzanron_ has quit [Ping timeout: 240 seconds]
marcofernandez has quit [Ping timeout: 245 seconds]
ta has quit [Remote host closed the connection]
marcofernandez has joined #ruby-lang
cornerma1 has joined #ruby-lang
arooni-mobile has quit [Remote host closed the connection]
chussenot has quit [Quit: chussenot]
Mothore_____ has quit [Quit: Be back later ...]
cornerman has quit [Ping timeout: 255 seconds]
cornerma1 is now known as cornerman
yxhuvud has quit [Ping timeout: 256 seconds]
sirpeng has joined #ruby-lang
spastorino has joined #ruby-lang
arBmind has joined #ruby-lang
apeiros_ has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
simi has joined #ruby-lang
Artemitch has joined #ruby-lang
clauswitt has joined #ruby-lang
ta has joined #ruby-lang
benlovell has quit [Ping timeout: 265 seconds]
HACKING-FACEBOOK has joined #ruby-lang
Artemitch has quit [Ping timeout: 272 seconds]
postmodern has quit [Quit: Leaving]
arBmind has quit [Read error: Connection reset by peer]
sirpeng has quit []
lele has quit [Ping timeout: 245 seconds]
benlovell has joined #ruby-lang
ruby-lang333 has joined #ruby-lang
tkuchiki has quit [Remote host closed the connection]
bmichelsen has joined #ruby-lang
tkuchiki has joined #ruby-lang
arBmind has joined #ruby-lang
tkuchiki has quit [Ping timeout: 245 seconds]
sirpeng has joined #ruby-lang
fclausen has quit [Ping timeout: 272 seconds]
Shazaum has joined #ruby-lang
st0mar has joined #ruby-lang
HACKING-FACEBOOK has joined #ruby-lang
ruby-lang786 has joined #ruby-lang
<ruby-lang786> How do you strip a directory from a string using regex? a = /stripdirectory/; b = "wkefckw c:\windows\example ernd12en" ??
HACKING-FACEBOOK has quit [Client Quit]
HACKING-FACEBOOK has joined #ruby-lang
<oddmunds> ruby-lang786: i am not sure what you mean
<oddmunds> you want remove anything that looks like a directory from a string?
<oddmunds> is it speficaly windows directories?
<ruby-lang786> @oddmunds, I want to get directory from a string and save it to another variable
<ruby-lang786> yes, on windows
benlovell has quit [Ping timeout: 255 seconds]
ta has quit [Remote host closed the connection]
<oddmunds> will it need to support spaces in the path?
arBmind has quit [Quit: Leaving.]
<ruby-lang786> Yep
<ruby-lang786> I know some about regex but the placement confuses me so much that I cannot even learn.
<oddmunds> in your example, how can you possibly know that "ernd12en" is not part of the path?
cantonic has quit [Read error: Connection reset by peer]
<ruby-lang786> I don't. I'm not good with regex. Is my question kinda stupid? Because I don't know much about regex, specially the placement.
cantonic has joined #ruby-lang
ta has joined #ruby-lang
<oddmunds> well, no regex will help you if it is not possible to detect even with human eyes and reasoning
<ruby-lang786> Please wait, I'll write some codes.
<oddmunds> ruby-lang786: here i've made one that captures your example http://rubular.com/r/PxTVH34Ocr
<oddmunds> but it does not support spaces
jg_ has quit [Ping timeout: 264 seconds]
<ruby-lang786> Thanks a lot
<oddmunds> (rubular.com is very handy)
<oddmunds> ruby-lang786: no problem, good luck!
<ruby-lang786> I did try to figure out in rubular but I couldn't
<oddmunds> not that this will not detect roots either. like c:\
<yorickpeterse> ruby-lang786: Looked into File.dirname ?
<ruby-lang786> Damn.
<yorickpeterse> >> File.dirname('/foo/bar/baz/test.txt')
<eval-in__> yorickpeterse => "/foo/bar/baz" (https://eval.in/232025)
<oddmunds> ruby-lang786: this will support roots /[a-z]:\\\S*/i
<ruby-lang786> I don't really care for regex but it seems the only solution for me. Here is my example http://pastebin.com/J2cJhD5Y
<ruby-lang786> I'm writing a script where I can be able to change directories.
<ruby-lang786> I you want I can post full code of what my actual dir changing code looks like
st0mar has quit [Ping timeout: 250 seconds]
<oddmunds> ruby-lang786: from you code it seems like you want the user to write a directory and then just clean it up?
<ruby-lang786> Yes.
<oddmunds> do you really expect a user to input: "junk whatever c:\what\i\really\mean whatever junk"?
<oddmunds> when you ask them for a directory?
<apeiros_> just test whether the dir exists
<ruby-lang786> I might have gone too far with that, sorry.
<apeiros_> and if not, tell the user to enter an actual dir
stamina has joined #ruby-lang
<oddmunds> ruby-lang786: it sounds to me like input.strip will do the job
st0mar has joined #ruby-lang
<ruby-lang786> apeiros, good idea. I don't know why I keep trying to make things more complicated than it is. It's been a daily habit now.
<oddmunds> it removes whitespace from the end (and start) of the string, which i assume is what you want
Forgetful_Lion has quit [Remote host closed the connection]
<oddmunds> (removing the newline from the end of the string)
jg_ has joined #ruby-lang
<ruby-lang786> I'll post the whole code, it's not big.
Artemitch has joined #ruby-lang
diegoviola has joined #ruby-lang
<yorickpeterse> oh for fucks sake Rails
<yorickpeterse> You add enum support, and you don't use fucking enums
<yorickpeterse> instead it uses integers
<yorickpeterse> defining the enums in the code
<yorickpeterse> (╯°□°)╯︵ ┻━┻
<yorickpeterse> "But Yorick, aren't integers better" No
<ruby-lang786> Sorry for being late, Finished making few changes so it makes sense when you see it.
<oddmunds> no problem
jg_ has quit [Ping timeout: 255 seconds]
<ruby-lang786> As you can see the code, it's not very smart.
<oddmunds> haha
Artemitch has quit [Ping timeout: 244 seconds]
<oddmunds> oh, sorry, misread it as "i am not very smart"
<oddmunds> i'm stepping through it now
<ruby-lang786> lol xD but sometimes that's kind of true. I'm not sometimes.
chills42 has joined #ruby-lang
marcofernandez has quit [Ping timeout: 250 seconds]
benlovell has joined #ruby-lang
<apeiros_> yorickpeterse: which database? with postgres, I actually understand it…
<oddmunds> ruby-lang786: you want to replace line 2 with a regex?
<apeiros_> I tried to use enums with pg, but its enum support is a bit lackluster
<yorickpeterse> apeiros_: both Pg and Mysql
<apeiros_> e.g. you can't remove an element from the enum
<yorickpeterse> so mysql for now, pg in a month or 2
<yorickpeterse> For me that is all perfectly fine, the enums would be read-only
<yorickpeterse> That is, the value is set upon insertion, then never changed again
<apeiros_> no, the set of values in the enum can't be changed
<yorickpeterse> The whole point of using an enum here is that I know the exact possible values, there's no point in using arbitrary integers
<apeiros_> that's the problem of pg's enums
<yorickpeterse> That's fine for me
<ruby-lang786> I want smartness almost like of cmd, is it really possible?
<yorickpeterse> I only have 3 possible values in this case, ever
<apeiros_> yorickpeterse: maybe for you. but quite certainly it'd cause a lot of confusion and pain for a large part of the users
<ruby-lang786> If it's complicated I'm ready to drop, just like apeiros said.
<yorickpeterse> apeiros_: that doesn't justify ActiveRecord's stupid current implementation of enums though
<yorickpeterse> same goes for foreign keys, but that's a different discussion
<oddmunds> ruby-lang786: yeah, smart is complicated
<apeiros_> yorickpeterse: sure. but it justifies not using native pg enums
koderok has quit [Quit: koderok]
<yorickpeterse> ugh, maybe we're outgrowing ActiveRecord
<yorickpeterse> perhaps I finally can move things over to Sequel
marcofernandez has joined #ruby-lang
* yorickpeterse dreams of unicorns and pixies
<Eising> <3 sequel
<ruby-lang786> let's say the input is cd "c:\exam ple", can regex do just read what's inside the quotes ?
<oddmunds> yes
<apeiros_> yorickpeterse: since I'm implementing my own enum thingy - what parts are bad about AR's?
<yorickpeterse> apeiros_: it maps to an integer column in the database, removing the possibility for the DB to optimize queries for the exact possible values
<yorickpeterse> e.g. say you have an enum of X and Y
<yorickpeterse> (so ENUM(X, Y))
pr0ton has quit [Ping timeout: 272 seconds]
mbr has quit [Read error: Connection reset by peer]
<yorickpeterse> In that case the DB would know that at any given point _only_ X or Y could be used
<yorickpeterse> with an integer that could be any 64bit integer value
<yorickpeterse> (depending on the int size used)
<oddmunds> ruby-lang786: http://rubular.com/r/PxTVH34Ocr
<ruby-lang786> Something like \"..."\ ?
<yorickpeterse> It's also much more strict: you force validation to occur in the DB
<yorickpeterse> So you can't bypass AR models and insert some random crap value in the column
<yorickpeterse> In this particular case I have a column that denotes polarity of a word, which can be: positive or negative
<yorickpeterse> oh and "neutral"
sirpeng has quit [K-Lined]
workmad3 is now known as wm3|away
some-person has joined #ruby-lang
<yorickpeterse> _if_ Pg optimizes for this I'm not sure yet, but even then the strictness is still a big plus over using a random integral value
loveablelobster has left #ruby-lang ["Textual IRC Client: www.textualapp.com"]
yfeldblum has joined #ruby-lang
<apeiros_> are you sure there's actually performance to be gained over a 64bit int? given that that's usually the fastest thing on current CPUs?
<yorickpeterse> Also, when using AR's method I suspect the integer values are set based on the order in the enum
<yorickpeterse> so if you ever re-sort it you're fucked
<ruby-lang786> One last question, can you make it support space too. I'll just do gsub("cd ","") and rest of space the regex should handle and if it's not a valid dir I'll just depend on the users smartness
Stichoza has joined #ruby-lang
<apeiros_> I mean you could save space. but you can do that by specifying the size of the number. NUMBER(2,0) in sql so?
<yorickpeterse> apeiros_: Storage size is a non issue
<apeiros_> ok. I doubt you can gain performance with a different datatype.
<yorickpeterse> The minimum size of an int is 8 bytes on Pg, but it will store that for every row
<yorickpeterse> whereas with an enum I believe, I could be wrong, it's simply a pointer
<yorickpeterse> At least if it doesn't actually use a pointer to the enum value it's fucking dumb
<apeiros_> the sort order - yepp. I see that requiring an update of all records. which is painful. but I'm not sure whether there are better alternatives.
mbr has joined #ruby-lang
<apeiros_> the ones that come to my mind either use a join (slow) or a function to lookup the order value of a enum value (slow too)
<yorickpeterse> apeiros_: by not relying on numeric (or other generated) values the sort order problem doesn't exist
<yorickpeterse> Since enums are named it doesn't matter in what order they are defined in the schema
yfeldblum has quit [Ping timeout: 252 seconds]
skade has joined #ruby-lang
<apeiros_> oh, you don't mean "sort records by enum value"
<apeiros_> you mean "generate integer from enum value, based on its index in the enum"
Sadin has joined #ruby-lang
scampbell has joined #ruby-lang
<yorickpeterse> What I mean is this:
<yorickpeterse> enum :letters, [:a, :b, :c]
<yorickpeterse> Here :a would probably be 1, :b 2, :c 3, etc
<yorickpeterse> but if somebody ever decides "yo lets resort that" it might suddenly be :a => 2, :b => 1, :c => 3
<yorickpeterse> Then your whole DB is screwed
<apeiros_> yes
<apeiros_> you'd either need an explicit mapping, or must not touch the order
<yorickpeterse> Of course you could add "# DO NOT EVER RESORT THIS ARRAY" but it's bound to happen
<Sadin> morning all
<apeiros_> so AR does not save the enum to the db… that's something I do differently
<yorickpeterse> Correct, it does it all in Ruby
simi has quit [Ping timeout: 265 seconds]
<apeiros_> my approach is using an int too. but I a) provide pg functions to convert strings to int etc., and b) store the enum in the db.
<yorickpeterse> Honestly I'm starting to believe more and more that ActiveRecord is an ORM with crutches and training wheels
<apeiros_> all ORMs are
<yorickpeterse> one with a slight mental disability too
pr0ton has joined #ruby-lang
<yorickpeterse> apeiros_: Sequel is pretty darn good, though it's not really an ORM in the traditional sense
<apeiros_> IMO & IME you can't have ORM + DBI without leaky abstraction
<yorickpeterse> That is, it's more of a DB toolkit that happens to have an ORM built-in
<apeiros_> I think you can't even have just DBI without being leaky.
<apeiros_> (one of the reasons why I decided to go pg-only with my thing)
<Eising> yorickpeterse: Sequel can be very ORM-like, and it can also not be, which is quite wonderful
<yorickpeterse> Eising: exactly
<some-person> Hello. I'm learning ruby and i cannot understand dup method in "The Ruby Programming Language" book. http://pastebin.com/LiPmjzcb
<ljarvis> what is it with pastebin
<yorickpeterse> But ugh, moving over everything from AR to Sequel is quite the challenge
<apeiros_> I think I've never used sequel's ORM
<yorickpeterse> something I'm not going to do now
<yorickpeterse> some-person: dup copies the object
<ljarvis> some-person: super calls the same method on the superclass
<apeiros_> some-person: you usually should not define dup/clone yourself
<apeiros_> some-person: instead define initialize_copy
<some-person> Why not copy.grid = @grid.dup? How does interpreter differ copy.grid and self.grid?
<ljarvis> copy is calling .dup on the superclass
yalue has joined #ruby-lang
<ljarvis> so it's superclass grid vs self grid
<ljarvis> that code surely isn't in that book
<maloik> ljarvis: doing bath ruby?
<ljarvis> maloik: first I've heard of it
<maloik> uwat
<maloik> pretty damn nice lineup
<maloik> and very affordable
<ljarvis> looks good, will probably go
<maloik> o/
<some-person> ljarvis: "that code surely isn't in that book" Check out page 39 (class Puzzle)
<ljarvis> some-person: I don't have the book, it just seems like bad code tbh
chinmay_dd has quit [Ping timeout: 256 seconds]
<ljarvis> maloik: you're going?
<maloik> yea we're going to buy tickets
<ljarvis> yorickpeterse: wbu?
<yorickpeterse> wot
<ljarvis> bath ruby, u comin or wot m8
<ljarvis> baths and shit
<yorickpeterse> eh, lemme see where the fuck in the UK that is
<ljarvis> less awkward than brighton
<yorickpeterse> Hm, all the way to Bristol
<yorickpeterse> Not sure, March is still quite far from now
<ljarvis> (although further)
<ljarvis> aye
AmirolAhmad has joined #ruby-lang
<yorickpeterse> I also want to hold off a bit until Euruko is announced
dellavg is now known as zz_dellavg
matsutomo has joined #ruby-lang
<some-person> ljarvis: "so it's superclass grid vs self grid" Is it copy grid vs self grid?
<ljarvis> some-person: 'copy' is just a copy of the superclass
<ljarvis> the fact that this is confusing is because i dont see a real world application of this code
<maloik> yorickpeterse: it won't be on the same date im sure
<apeiros_> honestly, I think that dup implementation is horribly
<apeiros_> it mutates self instead of the copy
<maloik> march really isnt that far off in terms of conference-organiser-time :D
<apeiros_> *horrible
<maloik> also: that lineup!
yfeldblum has joined #ruby-lang
<yorickpeterse> maloik: Correct, but financially I'd have to juggle things around
<maloik> no conf budget from work?
<maloik> or limited I suppose
<yorickpeterse> Yes, up to 300 EUR a year
<maloik> aww :(
<yorickpeterse> But I want everybody to go to Euruko this year if possible, which might limit said budget
<yorickpeterse> (everybody from my team that is)
<maloik> does it include travel?
<yorickpeterse> Yes, everything
<maloik> damn that's really tight
<yorickpeterse> yup
<maloik> we're pretty lucky, we get 2 "normal" european conferences
<yorickpeterse> I think you lot are also a bit bigger than we are :P
<apeiros_> should poke at work
<maloik> normal as in not the one in paris which costs 800 euro and includes $$$ chefs coming over to cook you food
<maloik> bigger? no way
<maloik> 15 people company
<yorickpeterse> wait there's a conference like that?
<maloik> yea
<maloik> I think it's called la conf
<yorickpeterse> oh
<yorickpeterse> Yeah that one was a bit expensive
<maloik> secretly im hoping we'll get 3 this year because bath is not very expensive and only 1 day
<maloik> but I doubt it'll happen
matsutomo has quit [Quit: matsutomo]
yfeldblum has quit [Ping timeout: 240 seconds]
<yorickpeterse> Hopefully I also have FOSDEM this year, but that's pretty cheap
<yorickpeterse> since it's just 1 night and a train to Brussels
malconis has joined #ruby-lang
st0mar has quit [Ping timeout: 244 seconds]
<maloik> ah yes I might try to make it there too
<maloik> the guy setting up the ruby room does tons of stuff for the local UG these days
<yorickpeterse> I _might_ be speaking, but I'm still waiting for the results
<some-person> ljarvis: Check out full class http://pastebin.com/hZVZBGUt Here is full code archive from O'Relly site http://examples.oreilly.com/9780596516178/RPLExamples.zip
<yorickpeterse> basically I'll, hopefully, be ranting about Ruby :P
malconis has quit [Remote host closed the connection]
<maloik> not mongo?
<maloik> pssh
AmirolAhmad has quit []
yxhuvud has joined #ruby-lang
<yorickpeterse> Part of Mongo won't exist anymore by then for us
<yorickpeterse> If all goes well that is
<yorickpeterse> I hope to have one cluster shut down by that time, with another one remaining
<yorickpeterse> That last one will be a PITA since the app stores data in ways that can't be stored easily in SQL
<yorickpeterse> Unless I abuse Pg's json storage system, which is stupid
<apeiros_> some-person: that dup implementation is bad. really. but what it does:
<yorickpeterse> Argh ffs, I'll just use AR 4.1 enums
<apeiros_> it calls `dup` from the superclass which returns a copy of self. that copy is stored in copy.
<apeiros_> it then replaces its own @grid with a copy of @grid, so that copy and self have different objects for @grid
<apeiros_> and in the last line it returns the copy
<apeiros_> this is bad because: a) you should not define dup, you should define initialize_copy.
<apeiros_> b) .dup should absolutely NOT modify self. this dup implementation does.
malconis has joined #ruby-lang
<apeiros_> the reason for a) is that #initialize_copy is used for both, #dup and #clone. this implementation simply "forgets" about clone. and now this class' #clone is broken.
<some-person> apeiros_: I'm just trying to understand the code from book :)
<apeiros_> some-person: yes. I understood that. that's why I gave you a line by line explanation.
chussenot has joined #ruby-lang
<apeiros_> and additionally I told you why that book's implementation is bad. so you can do better.
marcofernandez has quit [Ping timeout: 265 seconds]
shinnya has joined #ruby-lang
ruby-lang786 has quit [Ping timeout: 246 seconds]
<some-person> apeiros_: Thank you for your explanation but i don't understand one thing: "it then replaces its own @grid with a copy of @grid" How does interpreter recognize that @grid it isn't @grid of "self", but it is @grid of "copy" and @grid.dup is @grid of "self" rather than @grid of "copy"?
<apeiros_> some-person: no, you misunderstand. @grid is indeed self's @grid
<some-person> apeiros_: @grid = @grid.dup looks like self.grid = self.grid.dup for me
<apeiros_> some-person: it replaces self's @grid with a copy of self's @grid
<apeiros_> which is precisely why it is a bad implementation - it modifies self.
<darix> some-person: variables are just references to objects
<darix> so the object references by @grid will be the copy
<darix> you can see that by comparing the object IDs e.g.
<apeiros_> i.e., instead of creating a copy with a copy of @grid, it creates a copy with self's @grid and then - to separate the two - replaces its own @grid with a copy
arBmind has joined #ruby-lang
<apeiros_> some-person: to exemplify: you have Puzzle A with grid A. you call .dup on it. `copy = super` creates Puzzle B, whose @grid still has grid A. now `@grid = @grid.dup` replaces Puzzle A's grid with grid B. so you end up with Puzzle A having @grid B, and Puzzle B having @grid A.
ta has quit [Remote host closed the connection]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros_> but normally you'd want to end up with Puzzle A keeping its @grid A, and Puzzle B having its own @grid B.
marcofernandez has joined #ruby-lang
chills42 has quit [Ping timeout: 256 seconds]
<some-person> apeiros_: It returns a copy of itself without changes but replaces its own grid by a new grid. Have i understood it rightly?
<yorickpeterse> TIL this is a word:
<yorickpeterse> Lopado­temakho­selakho­galeo­kranio­leipsano­drim­ypo­trimmato­silphio­karabo­melito­katakekhy­meno­kikhl­epi­kossypho­phatto­perister­alektryon­opto­kephallio­kigklo­peleio­lagōio­siraio­baphē­tragano­pterýgōn.
<yorickpeterse> which copy-paste fucked up by adding spaces
* yorickpeterse is looking for a sane max size for VARCHAR
* yorickpeterse doesn't really care since this will be using TEXT in Pg in a little while anyway
<ljarvis> use text in pg?
<ljarvis> ehh
<yorickpeterse> :P
<yorickpeterse> Yeah this is only because herp derp MySQL can't index TEXT unless you give a max index size
marcofernandez has quit [Ping timeout: 272 seconds]
<ljarvis> I'd say 45 then
araujo has joined #ruby-lang
araujo has quit [Changing host]
araujo has joined #ruby-lang
AKASkip has quit [Ping timeout: 264 seconds]
chills42 has joined #ruby-lang
<yorickpeterse> I'll just go with the default 255 :P
chinmay_dd has joined #ruby-lang
<apeiros_> some-person: correct
<apeiros_> some-person: a better way to do it would be: `def initialize_copy; @grid = @grid.dup; end`. Ruby calls initialize_copy on the copy after dup/clone.
charliesome has quit [Quit: zzz]
marcofernandez has joined #ruby-lang
tlr has joined #ruby-lang
<apeiros_> this would result in dup returning a copy of Puzzle which also has a copy of grid
<some-person> apeiros_: Thank you for your explanation.
yfeldblum has joined #ruby-lang
deryl has joined #ruby-lang
<deryl> Anyone know of a fairly well fleshed out ruby Dev env for android? Wondering if I can do a little bit of coding while I'm waiting for the new laptop.
<deryl> Something that does not require to root your device. (Like for grabbing a pty or something)
yfeldblum has quit [Ping timeout: 255 seconds]
benlovell has quit [Ping timeout: 264 seconds]
jkad1 has joined #ruby-lang
pr0ton has quit [Quit: pr0ton]
<whitequark> android is not a posix platform
<whitequark> don't expect posix software to run on it
<whitequark> that being said, there's ruboto.
jgpawletko has joined #ruby-lang
<deryl> Hmm. Heard of ruboto but don't know much about it. Will expend some google time on it. Thanks whitequark
<maloik> rubymotion supports android
wm3|away_ has joined #ruby-lang
<deryl> And for the POSIX info. Didn't know that
elastik has joined #ruby-lang
<whitequark> maloik: not for development ON android
marcofernandez has quit [Ping timeout: 264 seconds]
<maloik> oh my bad, misread
<deryl> Isn't rubymotion payware? Just looking for something free for about a week
<deryl> Ah ok
<maloik> I'd look at webbased environments
chills42_ has joined #ruby-lang
<maloik> I know there's a few out there, can't seem to remember the names though
chills42 has quit [Read error: Connection reset by peer]
<deryl> There was one that I saw out there that supported ruby in the web browser but I cannot for the life of me remember its name
<deryl> Yeah me either
<deryl> Codetree or something like that. Something else to google
<darix> deryl: ruboto?
<darix> or mirah or so
wm3|away has quit [Ping timeout: 244 seconds]
<maloik> though isn't ruboto basically the same as rubymotion?
<maloik> I thought it was :o
<deryl> Cool. Couple things to look up. Appreciate the pointers.
<yorickpeterse> Vim runs on android
<darix> mirah.org
<yorickpeterse> Though you have to use some Android port of it
<yorickpeterse> I wonder if Emacs could fit on it :D
jkad1 has quit [Quit: WeeChat 1.0.1]
<deryl> 16gb galaxy s5 active. It should hehe
<deryl> Darix mirah.org appears DNS dead
st0mar has joined #ruby-lang
marcofernandez has joined #ruby-lang
<yorickpeterse> deryl: Not sure if that would leave enough resources to run an editor
* yorickpeterse runs
enebo has joined #ruby-lang
* deryl chuckles
marcofernandez has quit [Remote host closed the connection]
mattyohe has joined #ruby-lang
<deryl> Yorick that actually might not be too far from the truth. I have a 2gb processor and 2gb of RAM in this bonnie. I've found a couple of things that I've had insufficient memory to run. I have a feeling I might be able to add Emacs to that. Lol
arBmind has quit [Read error: Connection reset by peer]
<deryl> s/bonnie/phone/
<yorickpeterse> :P
st0mar has quit [Ping timeout: 265 seconds]
ruby-lang333 has quit [Ping timeout: 246 seconds]
frank_o has joined #ruby-lang
Guest49231 is now known as samkottler
samkottler has quit [Changing host]
samkottler has joined #ruby-lang
clauswitt has quit [Ping timeout: 252 seconds]
skade has quit [Read error: Connection reset by peer]
Artemitch has joined #ruby-lang
j2p2 has quit []
chouhoulis has joined #ruby-lang
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby-lang
klmlfl has joined #ruby-lang
arBmind has joined #ruby-lang
some-person has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
Artemitch has quit [Ping timeout: 245 seconds]
klmlfl has quit [Remote host closed the connection]
skade has joined #ruby-lang
matsutomo has joined #ruby-lang
senor_jalapeno has joined #ruby-lang
benlovell has joined #ruby-lang
klmlfl has joined #ruby-lang
st0mar has joined #ruby-lang
jkad1 has joined #ruby-lang
momomomomo has joined #ruby-lang
momomomomo has quit [Client Quit]
jimbach has joined #ruby-lang
ta has joined #ruby-lang
ta has quit [Remote host closed the connection]
ta has joined #ruby-lang
elastik has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby-lang
nathanstitt has joined #ruby-lang
shambrarian has joined #ruby-lang
whippythellama has joined #ruby-lang
snoopybbt has joined #ruby-lang
oleo has joined #ruby-lang
nofxx has joined #ruby-lang
Shazaum has joined #ruby-lang
Shazaum has quit [Changing host]
chills42_ has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 245 seconds]
<deryl> whitequark ruboto installed. Looks like it'll do what I need. Thanks
<deryl> Core and irb in place
chills42 has joined #ruby-lang
cmhobbs has joined #ruby-lang
jkad1 has quit [Quit: WeeChat 1.0.1]
momomomomo has joined #ruby-lang
ta has quit [Remote host closed the connection]
ta has joined #ruby-lang
matsutomo has quit [Quit: matsutomo]
nathanstitt has quit [Quit: Laters]
kiyote23 has joined #ruby-lang
matsutomo has joined #ruby-lang
momomomomo has quit [Ping timeout: 272 seconds]
chills42 has quit [Remote host closed the connection]
nathanstitt has joined #ruby-lang
elastik has joined #ruby-lang
pr0ton has joined #ruby-lang
<Sadin> if i create a gemfile and ran bundle install, how do i get my ruby program to see it when i run the rb file. The method that should be available is not because it doesnt know the library is there
koderok has joined #ruby-lang
<jhass> start with bundle exec or make require 'bundler/setup' the first require
Xzanron has quit [Read error: Connection reset by peer]
whippythellama has quit [Quit: whippythellama]
<Sadin> jhass: i include, require 'bundler/setup' in my main rb file?
<jhass> I usually have no such thing, but yes
<jhass> if you're not writing a gem that is
chinmay_dd has quit [Quit: Leaving]
<Sadin> jhass: no im trying to use a gem
whippythellama has joined #ruby-lang
<jhass> one's not excluding the other ;)
loincloth has joined #ruby-lang
koderok has quit [Remote host closed the connection]
tenderlove has joined #ruby-lang
<Sadin> jhass: this is what i have https://gist.github.com/Sadin/8f0f194db68e58b55309, still doesnt seem to recognize the connect function
scampbell has quit [Ping timeout: 244 seconds]
matsutomo has quit [Quit: matsutomo]
<jhass> bundler/setup makes sure to setup the load path for you, it doesn't require the library, you still have to do that
<Sadin> jhass: so i require the Gem in my rb file?
<jhass> yes
<jhass> its usage examples should show that
<Sadin> Damn all this time i thought i needed a seperate file...
<Sadin> jhass: thanks for clearing that one up, I didnt see that.
kiyote23 has quit [Remote host closed the connection]
kiyote23 has joined #ruby-lang
chinmay_dd has joined #ruby-lang
kiyote23 has quit [Remote host closed the connection]
momomomomo has joined #ruby-lang
st0mar has quit [Ping timeout: 244 seconds]
elastik has quit [Ping timeout: 265 seconds]
frank_o has quit [Quit:]
HACKING-FACEBOOK has quit [Ping timeout: 272 seconds]
bahar has quit [Ping timeout: 264 seconds]
bahar has joined #ruby-lang
momomomomo has quit [Ping timeout: 258 seconds]
arBmind1 has joined #ruby-lang
arBmind has quit [Ping timeout: 250 seconds]
benlovell has quit [Ping timeout: 240 seconds]
Mothore_____ has joined #ruby-lang
Mothore_____ has quit [Client Quit]
yfeldblum has joined #ruby-lang
voxxit has quit [Remote host closed the connection]
voxxit has joined #ruby-lang
skarn has joined #ruby-lang
tlr has quit [Quit: Textual IRC Client: www.textualapp.com]
yfeldblum has quit [Ping timeout: 240 seconds]
benlovell has joined #ruby-lang
momomomomo has joined #ruby-lang
gss has joined #ruby-lang
jds has joined #ruby-lang
havenwood has joined #ruby-lang
skade has quit [Read error: Connection reset by peer]
benlovell has quit [Ping timeout: 244 seconds]
[H]unt3r has joined #ruby-lang
schlubbi has joined #ruby-lang
benlovell has joined #ruby-lang
dwknoxy has joined #ruby-lang
Manchotix has joined #ruby-lang
rippa has joined #ruby-lang
elastik has joined #ruby-lang
Artemitch has joined #ruby-lang
scampbell has joined #ruby-lang
Artemitch has quit [Ping timeout: 265 seconds]
stamina has quit [Ping timeout: 244 seconds]
schlubbi has quit [Remote host closed the connection]
schlubbi has joined #ruby-lang
ta has quit [Remote host closed the connection]
klmlfl has quit [Remote host closed the connection]
_br_ has quit [Quit: Bye, thanks for all the fish.]
xcesariox has joined #ruby-lang
_br_ has joined #ruby-lang
__butch__ has joined #ruby-lang
rcvalle has joined #ruby-lang
yfeldblum has joined #ruby-lang
momomomomo has quit [Quit: momomomomo]
gss has quit []
yfeldblum has quit [Ping timeout: 255 seconds]
|jemc| has joined #ruby-lang
ta has joined #ruby-lang
threeifbywhiskey has joined #ruby-lang
RobertBirnie has joined #ruby-lang
arBmind1 has quit [Quit: Leaving.]
stamina has joined #ruby-lang
threeifbywhiskey has left #ruby-lang [#ruby-lang]
elastik has quit [Ping timeout: 245 seconds]
skarn has quit [Remote host closed the connection]
schlubbi has quit [Remote host closed the connection]
mistym has joined #ruby-lang
elastik has joined #ruby-lang
schlubbi has joined #ruby-lang
schlubbi has quit [Remote host closed the connection]
momomomomo has joined #ruby-lang
Manchotix has quit [Quit: Verlassend]
ta has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
wallerdev has joined #ruby-lang
havenwood has joined #ruby-lang
wm3|away_ has quit [Ping timeout: 265 seconds]
pikos has joined #ruby-lang
shazaum_ has joined #ruby-lang
Shazaum has quit [Ping timeout: 250 seconds]
pr0ton has quit [Quit: pr0ton]
bmichelsen has quit [Quit: ZZZzzz…]
skarn has joined #ruby-lang
thatsnotjack has joined #ruby-lang
pr0ton has joined #ruby-lang
Sadin has quit [Remote host closed the connection]
klmlfl has joined #ruby-lang
senor_jalapeno has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby-lang
Artemitch has joined #ruby-lang
klmlfl has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Ping timeout: 252 seconds]
chussenot has quit [Ping timeout: 258 seconds]
benlovell has quit [Ping timeout: 258 seconds]
momomomomo has quit [Quit: momomomomo]
diegoviola has quit [Remote host closed the connection]
klmlfl has joined #ruby-lang
Stichoza has quit [Read error: Connection reset by peer]
Stichoza has joined #ruby-lang
klmlfl has quit [Ping timeout: 240 seconds]
stamina has quit [Quit: WeeChat 1.0.1]
nofxx_ has joined #ruby-lang
nofxx_ has joined #ruby-lang
nofxx has quit [Ping timeout: 272 seconds]
Artemitch has quit [Quit: Be back later ...]
pr0ton has quit [Quit: pr0ton]
jimbach has quit [Remote host closed the connection]
nertzy has quit [Quit: This computer has gone to sleep]
st0mar has joined #ruby-lang
Artemitch has joined #ruby-lang
Artemitch has quit [Client Quit]
deryl has quit [Ping timeout: 244 seconds]
diegoviola has joined #ruby-lang
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
elastik has quit [Ping timeout: 250 seconds]
chinmay_dd has quit [Quit: Leaving]
loincloth has quit [Remote host closed the connection]
hahuang65 has joined #ruby-lang
mr_r_j_p has joined #ruby-lang
<mr_r_j_p> hello, can anyone here help a ruby newbie understand something?
<darix> mr_r_j_p: no. because you didnt ask a specific question.
<mr_r_j_p> Well, my question is...
<mr_r_j_p> I am using data mapper and I have a model
GBrawl has joined #ruby-lang
<mr_r_j_p> and when I add a member function to it
<mr_r_j_p> it still works
<mr_r_j_p> but when I call that function, I then cannot save the model
<mr_r_j_p> so I think there's some of that funny meta programmign stuff going on
<mr_r_j_p> but I'm not really sure
ta has joined #ruby-lang
RitterJack has quit [Remote host closed the connection]
chinmay_dd has joined #ruby-lang
<nofxx_> mr_r_j_p, you should post the code of that method (paste)
<darix> the very first sentence on the page ;)
<nofxx_> Just for fun, but why YAML parses "08:07:06: bbone" -> {29226=>"bbone"}
<mr_r_j_p> ok thanks I didn't see that
<mr_r_j_p> It's not so much a concern bu t just curious
<darix> nofxx_: seconds since mid night
<darix> wild guess
<nofxx_> I know it's wrong, just expeculating.... was expecting maybe { 8 => { 7 => { 6...
AKASkip has joined #ruby-lang
pikos has quit [Remote host closed the connection]
<darix> nofxx_: not without the newlines i think
yfeldblum has joined #ruby-lang
<darix> 8*3600+7*60+6
<darix> => 29226
<nofxx_> darix, wow... hh:mm:ss ?
<darix> looks like it
kiyote23 has joined #ruby-lang
clauswitt has joined #ruby-lang
clauswitt has quit [Client Quit]
<nofxx_> haha crazy... yeah, with invalid date/time values it goes back to string -> "08:07:99:55:03"
<darix> to get your expected output you would need
<darix> YAML.load("08:\n 07:\n 06: bbone")
<nofxx_> actually I expect the string, it's mac address (or part of it)
<nofxx_> it's actually device: xx:xx:xx ... was playing with the mac adress as key just to see waht happens
<darix> YAML.load("'08:07:06': bbone")
<nofxx_> yeah, quote it
<darix> glad we could solve that
<nofxx_> darix, thanks! force to symbol works too!
<nofxx_> :08:07:06
yfeldblum has quit [Ping timeout: 258 seconds]
<darix> well
<darix> question is
<darix> if you have {"08:07:06"=>"bbone"}
<darix> to_yaml should output it quoted
<darix> (and it does for me)
<darix> so how did the unquoted string end up in your yaml file?:)
kiyote23 has quit [Ping timeout: 244 seconds]
<nofxx_> was just experimenting with colons on the key
<darix> ok
centrx has joined #ruby-lang
djbkd has joined #ruby-lang
maek has joined #ruby-lang
st0mar has quit [Ping timeout: 264 seconds]
thatsnotjack has quit [Quit: leaving]
Guest29 has joined #ruby-lang
allomov has quit [Remote host closed the connection]
<maek> Im writing a chef recipe but I think this is a ruby question. doing a Base64.decode64 on a variable before assigning to another variable should work right? knife_client_key = Base64.decode64(node[:merlin][:knife_client_key]) it seems to just pass the still base64 encoded string
djbkd has quit [Quit: My people need me...]
[H]unt3r has quit [Remote host closed the connection]
[H]unt3r has joined #ruby-lang
klmlfl has joined #ruby-lang
marr has quit [Ping timeout: 252 seconds]
<darix> works for me
<maek> darix: can you show me what you did. Im not so good at ruby in general.
<maek> darix: also, thanks!
<wallerdev> make sure you use the variable knife_client_key
<maek> wallerdev: I am for sure
<wallerdev> :)
<maek> :)
Artemitch has joined #ruby-lang
<wallerdev> maybe the string is base64 encoded twice
<wallerdev> haha
<maek> HAHA
<darix> >> Base64.decode64(Base64.encode64('foobar'))
<eval-in__> darix => uninitialized constant Base64 (NameError) ... (https://eval.in/232163)
<darix> >> require 'base64' Base64.decode64(Base64.encode64('foobar'))
<eval-in__> darix => /tmp/execpad-6b3ee28f0963/source-6b3ee28f0963:2: syntax error, unexpected tCONSTANT, expecting keyword_end ... (https://eval.in/232164)
<darix> >> require 'base64' ; Base64.decode64(Base64.encode64('foobar'))
<wallerdev> lol
<eval-in__> darix => "foobar" (https://eval.in/232165)
<darix> now
djbkd has joined #ruby-lang
[H]unt3r has quit [Ping timeout: 245 seconds]
<wallerdev> maybe just try printing out the value after decode64
<wallerdev> and before
<darix> maek: you can also try: node[:merlin][:knife_client_key] = Base64.decode64(node[:merlin][:knife_client_key])
<darix> just in case some other code bypasses your own variable and directly accesses the node structure
[H]unt3r has joined #ruby-lang
GBrawl has quit [Ping timeout: 272 seconds]
klmlfl has quit [Ping timeout: 264 seconds]
<maek> darix, thanks!
<maek> let me poke
x-light has joined #ruby-lang
<maek> I have instances of base64.decode working with out the require in chef, fwiw.
<darix> maek: it just means something else loaded the library before your code is running
<maek> yeah, was just saying I think chef auto loads that
<maek> as ive never needed to require. a side comment :D
nofxx_ has quit [Ping timeout: 260 seconds]
<wallerdev> chef probably already requires it somewhere
<wallerdev> ugh i cleaned my desk this morning and already spilled some coffee on it haha
<maek> thats why you shouldnt clean.
<maek> I had never split any liquid on my desk and last week I got a sweet new keyboard, of course 10 min after setting it up, spill coffee all over it :|
<yorickpeterse> that's why you shouldn't drink near your desk
<centrx> that's why you should be drunk near your desk
<yorickpeterse> or learn not to spill your shit
<centrx> *shouldn't
nofxx_ has joined #ruby-lang
nofxx_ has joined #ruby-lang
chinmay_dd has quit [Read error: Connection reset by peer]
yourabi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
klmlfl has joined #ruby-lang
cleopatra has joined #ruby-lang
<wallerdev> haha i spilled my coffee walking over to my desk with it, so I set it on some paper towel but it leaked through a bit
<wallerdev> nothin major
_JokerDoom has joined #ruby-lang
momomomomo has joined #ruby-lang
imperator has joined #ruby-lang
JokerDoom has quit [Ping timeout: 244 seconds]
rbowlby has joined #ruby-lang
loincloth has joined #ruby-lang
pikos has joined #ruby-lang
eristic_ is now known as eristic
senor_jalapeno has joined #ruby-lang
deryl has joined #ruby-lang
ur5us has joined #ruby-lang
bmichelsen has joined #ruby-lang
Stichoza has quit [Quit: Be back later ...]
pikos has quit [Remote host closed the connection]
yfeldblum has joined #ruby-lang
_fritchie has joined #ruby-lang
[H]unt3r has quit [Remote host closed the connection]
[H]unt3r_ has joined #ruby-lang
Stichoza has joined #ruby-lang
marr has joined #ruby-lang
Guest29 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
_fritchie has quit [Read error: Connection reset by peer]
_fritchie has joined #ruby-lang
imperator has quit [Quit: Valete!]
ldnunes has quit [Quit: Leaving]
stichoza_ has joined #ruby-lang
javajax has joined #ruby-lang
Stichoza has quit [Ping timeout: 258 seconds]
cleopatra has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
shazaum_ has quit [Quit: This computer has gone to sleep]
sirpeng has joined #ruby-lang
mr_r_j_p has quit [Quit: Page closed]
stichoza_ has quit [Read error: Connection reset by peer]
stichoza_ has joined #ruby-lang
stichoza_ has quit [Read error: Connection reset by peer]
stichoza_ has joined #ruby-lang
stichoza_ has quit [Read error: Connection reset by peer]
stichoza_ has joined #ruby-lang
kiyote23 has joined #ruby-lang
stichoza_ has quit [Read error: Connection reset by peer]
stichoza_ has joined #ruby-lang
javajax has quit [Quit: Textual IRC Client: www.textualapp.com]
wallerdev has quit [Quit: wallerdev]
kiyote23 has quit [Remote host closed the connection]
kiyote23 has joined #ruby-lang
ddd1 has joined #ruby-lang
allomov has joined #ruby-lang
deryl has quit [Read error: No route to host]
ddd1 has quit [Read error: Connection reset by peer]
deryl has joined #ruby-lang
pikos has joined #ruby-lang
kiyote23 has quit [Remote host closed the connection]
deryl has quit [Read error: No route to host]
ddd1 has joined #ruby-lang
ddd1 has quit [Read error: Connection reset by peer]
deryl has joined #ruby-lang
midhir has quit [Ping timeout: 264 seconds]
mistym has quit [Quit: Leaving...]
midhir has joined #ruby-lang
lele has joined #ruby-lang
deryl has quit [Read error: Connection reset by peer]
postmodern has joined #ruby-lang
scampbell has quit [Remote host closed the connection]
stichoza_ has quit [Read error: Connection reset by peer]
stichoza_ has joined #ruby-lang
yourabi has joined #ruby-lang
taylorrf has joined #ruby-lang
yfeldblum has quit [Ping timeout: 258 seconds]
stichoza_ has quit [Read error: Connection reset by peer]
elastik has joined #ruby-lang
stichoza_ has joined #ruby-lang
lele has quit [Ping timeout: 260 seconds]
jgpawletko has left #ruby-lang [#ruby-lang]
wprice has joined #ruby-lang
dabradley has quit [Ping timeout: 252 seconds]
pikos has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
skade has joined #ruby-lang
elastik has quit [Ping timeout: 244 seconds]
dabradley has joined #ruby-lang
fusillicode has quit [Quit: Leaving.]
benanne has joined #ruby-lang
snoopybbt has quit [Ping timeout: 250 seconds]
fclausen has joined #ruby-lang
lele has joined #ruby-lang
<felipebalbi> hi, when using thor's insert_into_file, is there a way to match indentation of previous line ?
wallerdev has joined #ruby-lang
Sadin has joined #ruby-lang
taylorrf has quit []
joast has quit [Read error: Connection reset by peer]
capin has quit [Ping timeout: 264 seconds]
joast has joined #ruby-lang
capin has joined #ruby-lang
claytonzaugg has joined #ruby-lang
whippythellama has quit [Quit: whippythellama]
yalue has quit [Quit: return 0;]
maek has left #ruby-lang [#ruby-lang]
elastik has joined #ruby-lang
cantonic has quit [Quit: cantonic]
pikos has joined #ruby-lang
bodgix_wrk has joined #ruby-lang
cantonic has joined #ruby-lang
<nofxx_> Am I missing some method on IPAddr to get all possible ips from a mask? IPAddr.new('192.168.1.0/24').to_a would be nice heh
<nofxx_> there's only #succ , but I'll need to check if it goes out of the range
<womble> nofxx_: I'm pretty sure there is a method for that. I've definitely done it, I don't necessarily recall how... let me dig a little.
<nofxx_> sirpeng -> nasty port robot spam
<womble> nofxx_: #to_range
<nofxx_> womble, perfect, thank you!
claytonzaugg has quit [Quit: Leaving]
<nofxx_> should have thought of to_*
Shazaum has joined #ruby-lang
<womble> There aren't a lot of classes that implement #to_range
diegoviola has quit [Ping timeout: 264 seconds]
arBmind has joined #ruby-lang
bodgix has joined #ruby-lang
Manchotix has joined #ruby-lang
spuk has joined #ruby-lang
cleopatra has joined #ruby-lang
pikos has quit [Remote host closed the connection]
Musashi007 has joined #ruby-lang
Artemitch has quit [Quit: Be back later ...]
Artemitch has joined #ruby-lang
Artemitch has quit [Ping timeout: 256 seconds]
bodgix has left #ruby-lang [#ruby-lang]
jimbach has joined #ruby-lang
ta has quit [Remote host closed the connection]
simi has joined #ruby-lang
Manchotix has quit [Quit: Verlassend]
malconis has joined #ruby-lang
[H]unt3r_ has quit []
malconis has quit [Client Quit]
mistym has joined #ruby-lang
yfeldblum has joined #ruby-lang
rbowlby_ has joined #ruby-lang
bodgix has joined #ruby-lang
bodgix has quit [Client Quit]
iamninja has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
hramrach_ has quit [Write error: Connection reset by peer]
pikos has joined #ruby-lang
rbowlby has quit [Ping timeout: 260 seconds]
solars has quit [Quit: WeeChat 0.4.2]
AKASkip has quit [Ping timeout: 256 seconds]
shambrarian has quit [Read error: Connection reset by peer]
diegoviola has joined #ruby-lang
devgiant has joined #ruby-lang
bodgix has joined #ruby-lang
Shazaum has quit [Quit: This computer has gone to sleep]
klmlfl has quit [Remote host closed the connection]
bodgix has left #ruby-lang [#ruby-lang]
lcdhoffman has joined #ruby-lang
lcdhoffman has quit [Client Quit]
shuriu has joined #ruby-lang
skade has quit [Quit: Textual IRC Client: www.textualapp.com]
lcdhoffman has joined #ruby-lang
lcdhoffman has quit [Client Quit]
bodgix has joined #ruby-lang
imperator has joined #ruby-lang
Artemitch has joined #ruby-lang
Shazaum has joined #ruby-lang
bodgix has left #ruby-lang [#ruby-lang]
senor_jalapeno has quit [Ping timeout: 250 seconds]
bodgix has joined #ruby-lang
bodgix has left #ruby-lang [#ruby-lang]
Artemitch has quit [Ping timeout: 272 seconds]
bodgix has joined #ruby-lang
momomomomo has joined #ruby-lang
skarn has quit [Killed (sinisalo.freenode.net (Nickname regained by services))]
cmhobbs has quit [Remote host closed the connection]
st0mar has joined #ruby-lang
kiyote23 has joined #ruby-lang
rand0mbits has joined #ruby-lang
araujo has quit [Read error: Connection reset by peer]
kiyote23 has quit [Remote host closed the connection]
diegovio1 has joined #ruby-lang
araujo has joined #ruby-lang
diegoviola has quit [Ping timeout: 250 seconds]
kiyote23 has joined #ruby-lang
cantonic has quit [Quit: cantonic]
allomov has quit [Remote host closed the connection]
loincloth has quit [Remote host closed the connection]
enebo has quit [Quit: enebo]
devgiant_ has joined #ruby-lang
st0mar has quit [Ping timeout: 252 seconds]
diegovio1 is now known as diegoviola
__butch__ has quit [Quit: Leaving.]
momomomomo has quit [Quit: momomomomo]
devgiant__ has joined #ruby-lang
djbkd has quit [Remote host closed the connection]
kiyote23 has quit [Ping timeout: 244 seconds]
cantonic has joined #ruby-lang
devgiant has quit [Ping timeout: 255 seconds]
oleo__ has joined #ruby-lang
oleo is now known as Guest46443
nathanstitt has quit [Ping timeout: 265 seconds]
devgiant_ has quit [Ping timeout: 240 seconds]
Guest46443 has quit [Ping timeout: 264 seconds]
kiyote23 has joined #ruby-lang
diegoviola has quit [Ping timeout: 260 seconds]
st0mar has joined #ruby-lang
skarn has joined #ruby-lang
bmichelsen has quit [Quit: ZZZzzz…]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
existensil has quit [Quit: WeeChat 0.4.2]
elastik has quit [Ping timeout: 244 seconds]
spastorino has quit [Quit: Connection closed for inactivity]
<zenspider> nofxx_: sirpeng is a bot?
djbkd has joined #ruby-lang