<zipper>
shevy: whether the computers sucked in 1970 or not still matters because I think some people were still under apertheid/colonialism.
<|jemc|>
volty: yeah, I'm waiting for the transhuman evolution
headius has quit [Quit: headius]
_HolyCow has joined #ruby
<volty>
i remember a joke about scotish: son, if you are good i will bring you to look how other boys eat ice-cream ( joke at 7 years old )
brennanMKE has joined #ruby
burlyscudd has quit [Quit: Leaving.]
coderhs has quit [Ping timeout: 260 seconds]
Zai00 has quit [Quit: Zai00]
<zipper>
|jemc|: lol yeah I didn't know how to install an operating system back then. Right now I'm not so far from understanding just how the kernel is loaded by the bios
<zipper>
back then == approx a year ago
<zipper>
volty: lol nice one
<zipper>
terrellt: I hope it works out for you.
kvirani_ has quit [Ping timeout: 272 seconds]
<ShellFu>
So I have a method that receives a string from the cli. Converts the string to a hash, and compares it with another hash (in this case result['this']['that']). The method searches for the key, and if the value is a hash then traverse that value. Here is the paste with expected input. example resulting hash, and the expected output. >http://pastebin.com/WWYWeYUM<
taternuts has joined #ruby
zeade has quit [Quit: Leaving.]
virtualize has quit [Remote host closed the connection]
c0rn has joined #ruby
virtualize has joined #ruby
<ShellFu>
This method DOES work, but in my efforts to become a better programmer im trying to reduce my if/than/else
mikepack_ has quit [Remote host closed the connection]
<ShellFu>
Ive been playing with a recursive method but havent quite achieved the desired result.
predator117 has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<ShellFu>
if the input from cli is found in the nested hash than delete that key.
KillerFox has quit [Ping timeout: 264 seconds]
<ShellFu>
volty, hopefully that made a bit more sense.
lfox has joined #ruby
polaco_zZz is now known as polaco
thepumpkin has quit [Remote host closed the connection]
<samfisher>
after reading the nokogiri manual i'm even dumber
pel_daniel has left #ruby [#ruby]
thepumpkin has joined #ruby
<volty>
but the number one on human hypocrisy I find to be this one: Russia, after the collapse of SU, in the beginning of era of 'rich animals' (i'm about the instict - not about offense) , there's a pale man that had no food for days coming across a man getting out of his car with 12 doors // they both recognize each other ... bla bla how are you ? ... you see i got rich etc et c. .. what about you? mah! not well, i'm not eating
<volty>
anything for days. What!??? You shouldn't do that! You must force yourself to it!
<volty>
to eat
tomzx_mac has quit [Ping timeout: 248 seconds]
predator217 has quit [Ping timeout: 251 seconds]
<popl>
volty: you're not making any sense
saarinen has quit [Quit: saarinen]
<volty>
sorry
<volty>
too long for irc
`Chris`_ has joined #ruby
<|jemc|>
heh.. yeah there was a great video on everythingisterrible.com from some old self-help psychological wealth training video - talking about how people are in debt only because they're punishing themselves
<|jemc|>
and that when they stop punishing themselves, their debt will disappear!
kvirani has joined #ruby
<|jemc|>
like magic!
<shevy>
ShellFu that was a bit too long
lmickh has joined #ruby
<shevy>
all I understood is... you take input from the commandlien
<shevy>
*commandline
<ShellFu>
well by god :) Guess I need to stop and recognize my drinking problem
<zipper>
volty: by "force yourself to eat" you mean this person was so rich that he couldn't understand that one was too poor to afford food?
<shevy>
and if that input is a key in a hash you have ... hash.has_key?(input) ... then delete that key... hash.delete(input)
<ShellFu>
Hi. Im ShellFu, and im an alcoholic
d2dchat_ has joined #ruby
<shevy>
ShellFu nah, when one uses ruby a lot, one tries to become terse :)
thepumpkin has quit [Ping timeout: 246 seconds]
<shevy>
you won't find politicans code in ruby!!!
<shevy>
did I forget anything from your problem description?
<zipper>
shevy: politicians code?
<zipper>
:P
<volty>
zipper: yes but also beyond that : pretending there could not be people like that
<shevy>
zipper nope!
reset has joined #ruby
<ShellFu>
trying to break the habit of shell scripting in ruby :)
<|jemc|>
that brings me to my other idea to solve the political problems in america
<|jemc|>
the Governbot
Jetchisel has joined #ruby
<zipper>
write a bot to run america?
`Chris` has quit [Ping timeout: 256 seconds]
<|jemc|>
an open source software that makes all major government decisions
<shevy>
ShellFu well, just focus on the intent and main things... you already identified 3 parts... input (you take this from commandline), your main data structure (hash), and if condition (if hash has this key, delete it). so far that is super simple
sailias has joined #ruby
<zipper>
You'll have written a bot to run the world :D
<|jemc|>
and the well-informed populace votes on pull requests
<shevy>
zipper skynet 2.0
<|jemc|>
note the problem in my last sentence
<|jemc|>
*well-informed populace
<shevy>
ok so it is an elite system again
<ShellFu>
yes that is the goal, and it works. The hash is nested which causes me to want to write a recursive method. Right now its working but with a nasty arrow developing.
petey_ has joined #ruby
<zipper>
lol
<shevy>
I hate nested hashes
<zipper>
That is a genius idea!
<ShellFu>
Normally the unix admin in me would say meh its operational. lets move on to the next ops task, but im trying to become better than that mentality
<|jemc|>
too bad our politicians don't even understand how the internet works
<shevy>
YES
<shevy>
I like the unix admin in you
<shevy>
listen to him man
<shevy>
right now you are listening to the manager in you
<shevy>
bad, ShellFu, bad!
<zipper>
|jemc|: you mean teh interwebs?
<ShellFu>
:( NOOOO!! Not the manager in me!
<|jemc|>
zipper: yeah, they don't understand the internet so they have lobbyists from Google and Comcast and Verizon and Microsoft write all the tech laws
<|jemc|>
to suppress small business and free thought
<zipper>
but again you don't expect them to. Just like I don't know much about how I work yet I use my body daily.
<zipper>
|jemc|: well that sucks
<zipper>
but again the weak never rise up against the strong
<zipper>
Karl Max was wrong
<zipper>
Never waste an opportunity to subjugate the weak.
<zipper>
Slavrey wouldn't have ended had it not been for the effort of the powerful/industrialised.
<zipper>
*slavery
<volty>
yap, they needed consumers :)
<volty>
full-time consumers
<zipper>
Same for colonialism
KillerFox has joined #ruby
<|jemc|>
colonialism ended?
<volty>
divide et impera
<|jemc|>
then what the heck are we still doing in south america?
<zipper>
what/who will save us from capitalism?
kreeves has joined #ruby
<zipper>
|jemc|: lol who are you?
<|jemc|>
oh that's right, the 'war on drugs' or the 'war on terror'
Shidash has quit [Read error: Connection reset by peer]
<|jemc|>
great reasons to keep bases all over the world
<zipper>
|jemc|: I mean collectively?
Shidash has joined #ruby
Shidash has quit [Client Quit]
<|jemc|>
amurricka
<volty>
what instead of capitalism?
<zipper>
Another reason why religion is more opressive than liberative.
sailias has quit [Ping timeout: 256 seconds]
<zipper>
volty: I don't know
<zipper>
volty: what would a slave know to do when free? They know only one thing.
<volty>
zipper: then you have a clear ideas! (not a joke)
Kyushu_Yakushima has quit [Ping timeout: 245 seconds]
hiroyuki has quit [Ping timeout: 272 seconds]
<zipper>
To have a master and folloe
<zipper>
*follow
VTLob has quit [Quit: VTLob]
<volty>
today's world, with all its dynamics and relations, is too complicated even for the 'owners'
<volty>
full of economists that recite knowledge but cannot predict anything
einarj has quit [Ping timeout: 265 seconds]
<volty>
inertia - is the name of the game
<|jemc|>
I still say Governbot is the answer
<zipper>
volty: sad!
zastern_ has joined #ruby
<volty>
nah, i don't find it sad
hiyosi has joined #ruby
superscott[8] has quit [Ping timeout: 246 seconds]
Soda has joined #ruby
<volty>
sad could be the presumption that human being is sapiens sapiens
zastern_ has quit [Remote host closed the connection]
atmosx has joined #ruby
<|jemc|>
so you really are waiting for the transhuman evolution then?
efrainolivares_ has quit [Quit: efrainolivares_]
<|jemc|>
s/waiting for/working toward/ ?
<zipper>
|jemc|: hahaha
zz_michael_mbp is now known as michael_mbp
<zipper>
volty: what is a human being?
<|jemc|>
nothing but a miserable little pile of secrets
<|jemc|>
(castlevania)
<zipper>
|jemc|: we'll do anything to free ourselves of the system, Even evolve.
zastern has quit [Ping timeout: 272 seconds]
<volty>
read russel's analysis of mind
pdimitrov has quit [Read error: Operation timed out]
ShellFu is now known as ShellFu_afk
rurban has quit [Quit: Leaving.]
pdimitrov has joined #ruby
<volty>
a being that pretends it was being created by a (special) Creator ? a being that pretends to be special and too different from other kinds of beings
pr0ggie has quit [Ping timeout: 240 seconds]
ismlages has quit [Remote host closed the connection]
pr0ggie has joined #ruby
<volty>
let's go back - to the surface :)
bricker is now known as bricker`away
tatsuya_o has quit [Remote host closed the connection]
michael_mbp is now known as zz_michael_mbp
<volty>
been
tatsuya_o has joined #ruby
<volty>
state a ruby problem, don't want to think about humankind's problems anymore :)
hogeo has joined #ruby
byprdct has joined #ruby
Catie has quit [Ping timeout: 260 seconds]
|jemc| has quit [Read error: Operation timed out]
tatsuya_o has quit [Remote host closed the connection]
c0rn has quit [Quit: Computer has gone to sleep.]
astrobunny has quit [Ping timeout: 272 seconds]
aantix has quit [Quit: aantix]
gyre007 has quit [Remote host closed the connection]
mixel has quit [Quit: mixel]
threesome has quit [Ping timeout: 248 seconds]
rurban has joined #ruby
mrsolo_ has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
sailias has joined #ruby
petey_ has quit []
mrsolo has joined #ruby
Kabaka has joined #ruby
vpretzel has joined #ruby
byprdct has quit [Client Quit]
cpruitt has quit [Quit: cpruitt]
rurban1 has joined #ruby
dkamioka_ has quit [Remote host closed the connection]
fridim_ has joined #ruby
<zipper>
I'm having a problem with exceptions and constants.
astrobun_ has joined #ruby
jibi has quit [Quit: .]
xk_id has quit [Quit:
<zipper>
I'm using the koans to lean ruby
Catie has joined #ruby
<popl>
meditate on them
<zipper>
Should I concentrate on these because they sure are a headache
<zipper>
I don't see them in code.
rurban has quit [Ping timeout: 272 seconds]
<popl>
constants?
<zipper>
or maybe I'm tired/lazy
<zipper>
exceptions especially
havenwood has quit [Remote host closed the connection]
vpretzel has quit [Ping timeout: 264 seconds]
mrpot4to_ has quit [Remote host closed the connection]
MrPoT4tO has quit [Read error: Connection reset by peer]
lmickh has quit [Quit: lmickh]
<popl>
If you have specific questions then I'm certain someone may have an answer, zipper.
jrhe has quit [Quit: jrhe]
weirdpercent has joined #ruby
Ox6abe has quit [Remote host closed the connection]
freerobby has joined #ruby
ehc has quit [Quit: ehc]
capicue has joined #ruby
weirdpercent has quit [Client Quit]
tomzx_mac has joined #ruby
<volty>
i do not have koans installed, I have allergy for testing units, I think that testing doesn't go well when learning (i think it adds redundancy that distracts from the essentials to learn)
<zipper>
I'm too sleepy
newbiehacker_ has quit [Ping timeout: 240 seconds]
<volty>
i suggest you: 1) to and sleep 2) find some other resources for learning on the net
<zipper>
volty: Well I like the whole testing thingiw
<zipper>
*thing
<zipper>
It means I don't have to learn ruby from scratch
<zipper>
I also know the areas I need to look at deeper by now
<volty>
I see but I suspect that you have difficulties to catch the logic because of the «Thing» :)
<zipper>
If I was to read a book I would be far back
<volty>
Flashmasterson: are you trolling? There it says «The name of the script itself is stored in a ->special variable $0<-,»
tylersmith has quit [Ping timeout: 240 seconds]
<shevy>
nah, I think he is just a newcomer
<shevy>
they are not always able to spot all important details
<volty>
maybe I can answer questions like «Why do angels have no sex?»
<shevy>
volty, why do angels have no sex?
<Flashmasterson>
no i'm not a troll. i'm a newcomer
<Flashmasterson>
very new
nari has quit [Ping timeout: 240 seconds]
<volty>
shevy: to avoid the risk of abuse
<Flashmasterson>
that special variable still seems arbitrary to me
<shevy>
Flashmasterson really I think a big part is that tutorial. in general, if you pass arguments on the commandline to any .rb file, they are available in a constant named ARGV
<shevy>
and the thing to remember about ARGV is that it is, basically, an array
<volty>
no, he is after 'why that 0 of $0'
<shevy>
well
<shevy>
why the 1 in $1
<shevy>
why the 2 in $2
<shevy>
why the : in $:
<Flashmasterson>
i still don't know what an array is, i'm trying to not get ahead of myself with those tutorials and the well grounded rubyist
<shevy>
Flashmasterson this is the problem!
<volty>
ahahah
<shevy>
Flashmasterson an array is a data structure
<shevy>
[1,2,3]
<shevy>
that is an array
<shevy>
it has 3 members
<shevy>
"1,2,3"
<shevy>
that is a string object
<Flashmasterson>
so an array can also be a string object
<Flashmasterson>
that's a little confusing
<butblack>
Flashmasterson: no
<shevy>
a string is not an array in ruby
<Flashmasterson>
no no sorry, because of the " "
<butblack>
Flashmasterson: correct
<shevy>
:)
<shevy>
you begin to spot the details
<shevy>
now in that tutorial, when you see this here:
neo__ has joined #ruby
<shevy>
first, second, third = ARGV
<Flashmasterson>
ok an array looks like that [1,2,3] or [1.2.3] [1;2;3] ?
<shevy>
this is the same as doing it to any other array
<Flashmasterson>
i don't get that last one but thanks
<shevy>
Flashmasterson, in the example, if you do this: first, second, third = ARGV, then you create 3 local variables, first second and third. and they will each hold one part of the array
<Flashmasterson>
too advanced for now
<shevy>
first will hold the first member of the array
<shevy>
second will hold the second member of the array
<shevy>
and you can guess what third will hold
jkline has quit [Quit: jkline]
n008 has joined #ruby
<shevy>
ruby ex13.rb cheese apples bread
<Flashmasterson>
i wonder what would happen if i did first, second, eighth = ARGV
<volty>
i begin believing it, you are good as teachers
sevenseacat has quit [Remote host closed the connection]
butblack has left #ruby [#ruby]
sevenseacat has joined #ruby
butblack has joined #ruby
aantix has joined #ruby
goleldar has quit [Remote host closed the connection]
goleldar has joined #ruby
<shevy>
volty how did you start with ruby
<volty>
i do not remember
<shevy>
hmmm
endash has quit [Quit: endash]
burlyscudd has quit [Quit: Leaving.]
<Flashmasterson>
was my question answered? or comment more like
<rjhunter>
Flashmasterson: There are historical reasons why $0 holds the program name (it's from a C and Unix tradition that you don't need to worry about). Ruby also provides a nicer name for the same thing -- $PROGRAM_NAME
<shevy>
Flashmasterson basically these "names" are used because programmers are lazy
<Flashmasterson>
rjhunter: nah i forgot about that one, i'm talking about "ok so saying "ruby is what checks through your .rb file to see if it is valid, then it tries to interprete it" is wrong ?"
<butblack>
Flashmasterson: the book Shevy mentioned is how I got started with ruby
<volty>
that's about starting, what about arrival ?
<shevy>
me too... but it's getting a bit old... you should work through the tutorials quickly, let's say not more than 3 days maximum, then start to write on your own. or even before that
Voodoofish430 has quit [Quit: Leaving.]
<shevy>
Flashmasterson what could work is if you try to learn only minimal ruby
<shevy>
like all you need to achieve x or y and ignore the rest
<shevy>
like if you need lambda
<Flashmasterson>
shevy: that sounds good
<shevy>
I dont need lambda
<shevy>
but other people use lambda
<shevy>
volty is a lambda freak right?
<popl>
ask volty
* popl
shrugs
<volty>
not at all --- it depends on the problem
<Flashmasterson>
shevy: the reason i'm doing this in the first place isn't to be a programmer - it's too create a web app that involves a lot of audio file sharing and basic editing of them
jonr22_ has quit [Ping timeout: 272 seconds]
<Flashmasterson>
very basic
Kyushu_Yakushima has joined #ruby
<volty>
coin coders shrug
<sevenseacat>
you think editing audio is basic?
<Flashmasterson>
it will also match people to each other for audio interests
<sevenseacat>
and web apps arent basic either
<shevy>
Flashmasterson I am not a programmer either
<Flashmasterson>
sevenseacat: that's not what i said
<banisterfiend>
Flashmasterson sounds like soundcloud?
<butblack>
Flashmasterson: me neither… in the end you're going to need some humble beginnings… that probably means not being able to punch out your mona lisa at the start
nateberkopec has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
<Flashmasterson>
butblack: that's fine
<butblack>
Flashmasterson: of course, that's how everyone does it
basmoura has joined #ruby
codeFiend has joined #ruby
<Flashmasterson>
banisterfiend: it will be similar to that in visual format
<butblack>
Flashmasterson: just keep plugging away, you'll get there :D
<Flashmasterson>
i think so too
<shevy>
Flashmasterson what kind of editing? .mp3 cutting and rejoining?
gja has quit [Quit: This computer has gone to sleep]
mlpinit has quit [Ping timeout: 272 seconds]
mary5030 has joined #ruby
Metal_01 has joined #ruby
shevy has quit [Ping timeout: 245 seconds]
brennanMKE has quit [Remote host closed the connection]
kaspergrubbe has quit [Remote host closed the connection]
burlyscudd has joined #ruby
kaspergrubbe has joined #ruby
codeFiend has quit [Quit: codeFiend]
brennanMKE has joined #ruby
brennanMKE has quit [Remote host closed the connection]
danshultz has quit [Remote host closed the connection]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
danshultz has joined #ruby
vpretzel has joined #ruby
astrobun_ has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby
nwertman has quit [Remote host closed the connection]
rurban has joined #ruby
nowthatsamatt has joined #ruby
burlyscudd has left #ruby [#ruby]
dmiller_ has joined #ruby
dmiller_ has quit [Remote host closed the connection]
Monie has quit [Ping timeout: 240 seconds]
dmiller_ has joined #ruby
danshultz has quit [Ping timeout: 272 seconds]
jonr22 has quit [Remote host closed the connection]
vpretzel has quit [Ping timeout: 240 seconds]
aantix has joined #ruby
jonr22 has joined #ruby
monsterment has quit [Ping timeout: 248 seconds]
m00nlight has joined #ruby
astrobun_ has joined #ruby
diegoviola has joined #ruby
theRoUS has joined #ruby
hiyosi has quit [Ping timeout: 240 seconds]
adeponte has quit [Remote host closed the connection]
dmiller_ is now known as dmiller
io_syl has joined #ruby
timonv has joined #ruby
jonr22 has quit [Ping timeout: 265 seconds]
falood has joined #ruby
efrainolivares has joined #ruby
<|jemc|>
banisterfiend: still bored?
chihhsin has quit [Ping timeout: 240 seconds]
endash has joined #ruby
goleldar has joined #ruby
timonv has quit [Ping timeout: 256 seconds]
freerobby has quit [Quit: Leaving.]
LAMBODIE has joined #ruby
gja has joined #ruby
<LAMBODIE>
haxorus has strong attack power for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
<LAMBODIE>
chandelure evolves using the dusk stone for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
<LAMBODIE>
arceus is the strongest pokemon in the game for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
<LAMBODIE>
fire type attacks beat grass type attacks for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
<LAMBODIE>
fighting type attacks beat normal type pokemon for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
<sevenseacat>
lol
<LAMBODIE>
zinc raises ur pokemons special defense stat for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
<LAMBODIE>
thunder stone evoles pikachu into raichu for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
<LAMBODIE>
quick claw may allow ur pokemon to go first for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
<LAMBODIE>
twisted spoon raises power of psychic attacks for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
<LAMBODIE>
quick claw may allow ur pokemon to go first for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
jaimef has quit [Excess Flood]
<LAMBODIE>
fire type attacks beat grass type attacks for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
<LAMBODIE>
dragon fang raises power of dragon type attacks for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
<LAMBODIE>
twisted spoon raises power of psychic attacks for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
<LAMBODIE>
haxorus has strong attack power for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
<LAMBODIE>
twisted spoon raises power of psychic attacks for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
rubyracer has joined #ruby
goleldar has quit [Ping timeout: 260 seconds]
LAMBODIE has quit [Remote host closed the connection]
LAMBODIE has joined #ruby
<LAMBODIE>
pokeflute wakes up snorlax for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
<LAMBODIE>
water stone evoles poliwhirl into poliwrath for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
<LAMBODIE>
darkglasses raises the power of dark type attacks for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
<LAMBODIE>
miracle seed raises power of grass type attacks for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
<LAMBODIE>
arceus is the strongest pokemon in the game for more tips like this just ask me LAMBODIE da pokemaster and join #LAMBODIE-CLAN server for da hangout of da best pokemon XY clan on da net.
greenrose has quit [Ping timeout: 245 seconds]
greenrose has joined #ruby
reset has quit [Quit: Leaving...]
metrix has joined #ruby
Mr_Wharfsnort has quit [Quit: Leaving]
efrainolivares has quit [Quit: efrainolivares]
<metrix>
I'm browsing through ruby's hasing funcitons and i'm having a hard time understanding this: #define EQUAL(table,x,y) ((x)==(y) || (*(table)->type->compare)((x),(y)) == 0)
<metrix>
I understand that it's comparing two objects, but I don't understand why it was written this way.
kung has quit [Read error: Connection reset by peer]
diegoviola has quit [Ping timeout: 248 seconds]
basmoura has quit [Quit: Computer has gone to sleep.]
dkamioka has joined #ruby
m00nlight has joined #ruby
jonahR has joined #ruby
idiocrash has joined #ruby
capicue has joined #ruby
sputnik13 has joined #ruby
idiocrash has quit [Remote host closed the connection]
<sputnik13>
noob question… when trying to install a gem it tries to install to the first GEM_PATH that's shown in `gem env` and fails… the first path is /Library/Ruby/Gems/1.8 and the second path is ~/.gem/ruby/1.8 (I'm on OSX)
<sputnik13>
I want the gem to install to my local (second) gempath… how do I accomplish this?
diegoviola has joined #ruby
navyant24 has quit [Quit: navyant24]
gja has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
<bnagy>
fix your environment
cpruitt has quit [Quit: cpruitt]
<bnagy>
basically osx system ruby is hoopy anyway, usually we recommend using a version manager, eg chruby
<sputnik13>
bnagy: well, I gathered that… the question was how do I fix it?
<bnagy>
then you can install a) an up to date version and b) everything will work
mrsolo has quit [Quit: This computer has gone to sleep]
<sputnik13>
i.e. how do I make it prefer my ~/.gem over /Library...
mac__ has quit [Remote host closed the connection]
astrobunny has joined #ruby
mac__ has joined #ruby
ebetancourt has joined #ruby
<bnagy>
sputnik13: well that is just unix
ebetancourt has quit [Max SendQ exceeded]
choobie has quit [Read error: Connection reset by peer]
devoldmx has quit [Ping timeout: 240 seconds]
<bnagy>
but honestly, installing using a version manager will just make all the pain go away
choobie has joined #ruby
<bnagy>
the real problem is probably that you're using a different version of 'gem'
brennanMKE has joined #ruby
ebetancourt has joined #ruby
codezomb has quit [Read error: Connection reset by peer]
timonv has joined #ruby
<bnagy>
and also, as I mentioned, 1.8 is deprecated, buggy, insecure and incompatible with a lot of recent code
<sputnik13>
github.com/postmodern/chruby?
<bnagy>
that's my recommendation, yeah, there are also other options
<sputnik13>
I'll check it out
codezomb has joined #ruby
<sputnik13>
thanks
ngpestelos has joined #ruby
<bnagy>
no worries, yell if it's not working out
devoldmx has joined #ruby
codezomb has quit [Remote host closed the connection]
codezomb has joined #ruby
codezomb has quit [Read error: Connection reset by peer]
mac__ has quit [Ping timeout: 272 seconds]
mike has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
mike is now known as Guest15293
<sputnik13>
if I use ruby 2.0.0 with code that was developed with 1.8.7, are there potential incompatibilities? or is 2.0.0 fully backward compatible with 1.8.7?
thepumpkin has quit [Remote host closed the connection]
Senjai has joined #ruby
Senjai has joined #ruby
thepumpkin has joined #ruby
<bnagy>
very no
<sputnik13>
very no?
maroloccio has quit [Quit: WeeChat 0.4.1]
<bnagy>
no. It is not.
timonv has quit [Ping timeout: 260 seconds]
brennanMKE has quit [Ping timeout: 272 seconds]
<bnagy>
it's not an insane amount of work to clean up 1.8 code, depending on how poorly it was written, but there is definitely no expectation thatr it will 'just work'
devoldmx has quit [Ping timeout: 265 seconds]
robonerd has joined #ruby
mac__ has joined #ruby
<sputnik13>
bnagy: I c… I'm just a user atm, so I can't risk things breaking on our production deployments :(
<robonerd>
ok, ruby wins over objc. i couldn't get the objc/cocoa wrapper for libircclient to work, and i'm not going to invest the time to build my bot in C, so ruby it is
<sputnik13>
bnagy: time for more research I guess, thank you for your input
<robonerd>
what again is the best ruby IRC module/library?
<robonerd>
cinch.rb, rbot.rb, other?
ananthakumaran has quit [Quit: Leaving.]
<dominikh>
cinch, obviously.
<bnagy>
robonerd: apeiros has a bot framework I think
thepumpkin has quit [Ping timeout: 260 seconds]
<dominikh>
bnagy: long time no see.
Alina-malina has quit [Ping timeout: 240 seconds]
<bnagy>
dominikh: augh now I'm all channel-confused :<
<dominikh>
:)
devoldmx has joined #ruby
<robonerd>
bnagy what's it called?
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
mac__ has quit [Remote host closed the connection]
<bnagy>
can't remember :) github / google probably know
<robonerd>
what if there were some plugin on thread a trying to write to sqlite and plugin on thread b were at same time
<robonerd>
Serialized. In serialized mode, SQLite can be safely used by multiple threads with no restriction.
<robonerd>
pure gold!
havenwood has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
yfeldblum has quit [Remote host closed the connection]
<robonerd>
erm, i've been away from ruby for like 7 years. i use os x. anyone willing to do a bit of hand holding till i get off? i'm stuck at how to go about setting up my dev environment
vpretzel has joined #ruby
petey_ has quit [Read error: Operation timed out]
Metal_01 has joined #ruby
brennanMKE has joined #ruby
nism-pi has joined #ruby
fgo has joined #ruby
gja has quit [Ping timeout: 246 seconds]
<robonerd>
wait, i found my old guides, nvm!
<robonerd>
Ruby Version Manager (RVM) Guide (Last updated: 24 February 2011)
<robonerd>
here's hoping i have her pretty well updated :P
<robonerd>
what is the most direct way i can run cinch? i just compiled and installed ruby 2 into /usr/local/bin. and now i've downloaded cinch's source code. what next?
ericmathison has joined #ruby
Alina-malina has joined #ruby
polaco_zZz is now known as polaco
jonr22 has quit [Ping timeout: 256 seconds]
bricker`LA has joined #ruby
rahulkmr has joined #ruby
hiyosi has quit [Ping timeout: 240 seconds]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
polaco is now known as polaco_zZz
kevinykchan has quit [Quit: Computer has gone to sleep.]
skaflem has joined #ruby
Guest28192 has joined #ruby
ngpestelos has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Guest28192 has quit [Client Quit]
ayaz_ has joined #ruby
jhaals has joined #ruby
ayaz_ has quit [Changing host]
ayaz_ has joined #ruby
tonni has quit [Remote host closed the connection]
Guest95456 has quit [Ping timeout: 245 seconds]
<apeiros>
robonerd: usually you'd just install the gem and then read its docs
<apeiros>
`gem install cinch`
riku has joined #ruby
riku is now known as Guest29506
<apeiros>
and the docs are probably linked from both, the github project and the rubygems website. if not, you can use `ri Cinch` in your command line.
coderhs has quit [Ping timeout: 272 seconds]
reset has joined #ruby
jonathancutrell has joined #ruby
<jonathancutrell>
Hello ruby folks. I'm working with RubyMotion, but I'm having what I believe to be a ruby-based issue.
Lewix has quit [Remote host closed the connection]
<jonathancutrell>
I have an asynchronous HTTP.get method in a controller
<jonathancutrell>
and I'm setting an instance variable outside of that method. (Using Bubble Wrap)
dkamioka has joined #ruby
<jonathancutrell>
I'm wondering if there's a way to have something like promises, except in Ruby.
OdNairy has joined #ruby
nisstyre has quit [Quit: Leaving]
<apeiros>
are promises the same as futures?
dkamioka has quit [Read error: Connection reset by peer]
KRISTINA83 has quit [Ping timeout: 248 seconds]
fomatin has joined #ruby
KRISTINA83 has joined #ruby
dkamioka has joined #ruby
robonerd has quit [Quit: ...]
ewnd9 has joined #ruby
<jonathancutrell>
I would assume that's probably correct.
rahulkmr has quit [Read error: Connection reset by peer]
<canton7>
I've given you the keywords you need to google :)
<freakcult>
caton7: thanks sir, that would be great
nkts has quit [Quit: xy]
<freakcult>
i just lose it easily if u knw wht i mean
<freakcult>
:)
pranny has quit [Quit: Leaving.]
huttan has joined #ruby
noname001 has joined #ruby
<sevenseacat>
he's given you the keywords, he's telling you to go google them
tonni has joined #ruby
<Nilium>
And he's telling you he's a help vampire in coded language and begging for you to put him out of his misery.
* sevenseacat
sharpens stake
<havenwood>
Help zombies, braaaiiiins!
rahulkmr has joined #ruby
rahulkmr has quit [Max SendQ exceeded]
<Nilium>
My biggest concern is being spirited away by a help demon.
Domon__ has quit [Remote host closed the connection]
luckyruby has joined #ruby
slash_nick has joined #ruby
pyrac has joined #ruby
gwb3 has joined #ruby
rahulkmr has joined #ruby
heftig has quit [Quit: Quitting]
<havenwood>
mm, daemonophobia
<havenwood>
a common fear of processes
<havenwood>
well, i guess for a Process it isn't a phobia, but a real threat!
huttan has quit [Ping timeout: 265 seconds]
<Nilium>
I have no fear of plant growths
<havenwood>
Nilium: Now that would be a phobia, unless plants are your natural predator.
<Nilium>
Or bone growths. Well, actually, I do have a fear of bone outgrowths, but nothing out of the ordinary.
ctp has quit [Read error: Connection reset by peer]
<Nilium>
(Note: entirely dependent on a semi-obscure definition of "process")
ctp has joined #ruby
<Nilium>
(Better to just ignore it)
Kabaka has quit [Ping timeout: 240 seconds]
DanKnox is now known as DanKnox_away
thepumpkin has joined #ruby
Scient has joined #ruby
braincrash has joined #ruby
braincra- has quit [Ping timeout: 245 seconds]
<havenwood>
freakcult: A Gist is usually a good place to start. Unless problem is trivial almost always helpful to see the code. ;)
<havenwood>
freakcult: Even if it is just pseudo code.
<freakcult>
Car 'BMW' do
<freakcult>
Engine 'ddd' do
<sevenseacat>
not here :(
<freakcult>
end
<freakcult>
end
<havenwood>
freakcult: The `do` signifies a block. This isn't Gist. :P
Kabaka has joined #ruby
<freakcult>
i want only to call engine inside the block of car
fgo has quit [Remote host closed the connection]
hotpancakes has quit [Remote host closed the connection]
<freakcult>
yes, def car name, █ yield end
<freakcult>
the trick i am lookin for is to have engine only avialable inside the block of car and NoMethodFound if called elsewhere
io_syl has quit []
ahawkins has joined #ruby
Domon has joined #ruby
ahawkins has quit [Client Quit]
thepumpkin has quit [Ping timeout: 246 seconds]
reset has joined #ruby
ahawkins has joined #ruby
DanKnox_away is now known as DanKnox
<havenwood>
The jet engines will be so sad.
rjhunter has joined #ruby
kaspergrubbe has joined #ruby
troessner has joined #ruby
pranny has joined #ruby
ericmathison has joined #ruby
fgo has joined #ruby
<havenwood>
freakcult: I'm not quite following. Seems you want to put the method with block in a namepace? Might be helpful to learn more of the lingo, to be able to 'talk Ruby'.
kvirani has quit [Remote host closed the connection]
<havenwood>
Well, g'night all. So tired! zz
havenwood has quit [Remote host closed the connection]
Jetchisel has joined #ruby
luckyruby has quit [Read error: Connection reset by peer]
luckyruby has joined #ruby
tonni has quit [Read error: Connection reset by peer]
dagobah has joined #ruby
agent_white has quit [Quit: leaving]
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
olivier_bK has joined #ruby
burgess|vayo has quit [Quit: ^zzz]
blueOxigen has joined #ruby
kaspergr_ has joined #ruby
kaspergrubbe has quit [Ping timeout: 240 seconds]
fomatin has quit [Quit: Computer has gone to sleep.]
bluOxigen has quit [Ping timeout: 240 seconds]
jonr22 has joined #ruby
jlebrech has joined #ruby
rdark has joined #ruby
barratt has joined #ruby
andikr has joined #ruby
fomatin has joined #ruby
jonr22 has quit [Ping timeout: 246 seconds]
Al___ has joined #ruby
adambeynon has joined #ruby
fgo has quit [Remote host closed the connection]
adambeyn_ has joined #ruby
adambeynon has quit [Client Quit]
adambeyn_ has quit [Client Quit]
reset has quit [Quit: Leaving...]
adambeynon has joined #ruby
tonni has joined #ruby
ybart has joined #ruby
maasha has joined #ruby
D4T has joined #ruby
Hanmac1 is now known as Hanmac
<maasha>
gday
tonni has quit [Remote host closed the connection]
tonni has joined #ruby
<maasha>
Is rdoc markup compatible with githubs so you can write documentation for ri and and github in a single ML?
workmad3 has joined #ruby
nomenkun has joined #ruby
pranny has quit [Quit: Leaving.]
fgo has joined #ruby
jrhe has quit [Quit: jrhe]
sevenseacat has quit [Remote host closed the connection]
tonni has quit [Read error: Connection reset by peer]
timonv has joined #ruby
_5kg has quit [Ping timeout: 240 seconds]
elaptics`away is now known as elaptics
wereHamster|work has quit [Ping timeout: 240 seconds]
lyanchih has quit [Quit: lyanchih]
jrhe has joined #ruby
mikker has joined #ruby
lyanchih has joined #ruby
<mikker>
Has anyone else had problems woith rbenv and pow on Mavericks?
<mikker>
with*
timonv has quit [Remote host closed the connection]
<mikker>
I can only get pow to use system ruby - no matter what I put in .powconfig
<mikker>
Pow isn't strictly rails - it's anything Rack, really. But I can notice a hint and will go ask there instead :)
<workmad3>
mikker: yeah, I know ;) I'm in #rubyonrails too... and I was pointing out that plenty of pow users are there, not than pow was exclusively rails ;)
sayan has quit [Ping timeout: 248 seconds]
ephemerian has joined #ruby
mikecmpbll has joined #ruby
tonni has joined #ruby
ghr has joined #ruby
<Bulters>
I need helps :S devise is trowing me some undefined method 'serialize_into_session' for <Class.... errors...
<Bulters>
anyone here 's seen that before?!?
svector has joined #ruby
svector has quit [Max SendQ exceeded]
svector has joined #ruby
svector has quit [Max SendQ exceeded]
pranny has joined #ruby
svector has joined #ruby
svector has quit [Max SendQ exceeded]
svector has joined #ruby
AndChat| has quit [Ping timeout: 245 seconds]
svector has quit [Max SendQ exceeded]
chihhsin has joined #ruby
svector has joined #ruby
svector has quit [Max SendQ exceeded]
newbiehacker_ has joined #ruby
jrhe has quit [Quit: jrhe]
jrhe has joined #ruby
jrhe has quit [Remote host closed the connection]
xk_id has joined #ruby
wereHamster|work has joined #ruby
svector has joined #ruby
Xeago has joined #ruby
svector has quit [Max SendQ exceeded]
sayan has joined #ruby
fomatin has quit [Quit: Computer has gone to sleep.]
<zipper>
All of you have just confused me even more
<bnagy>
. o O (surprise)
<zipper>
I appreciate the help though.
bassclef has joined #ruby
verazabeida has joined #ruby
bassclef is now known as Guest49233
akemrir has joined #ruby
<apeiros>
[1,2,3,4].inject {|sum,i| sum+i} --> (((1 + 2) + 3) + 4), the operation is *injected* between the elements of the array, if you want
<apeiros>
also hence no +=
h_kon has quit [Remote host closed the connection]
h_kon has joined #ruby
derebos has joined #ruby
<Hanmac>
inject has also a default value: [1,2,3,4].inject(0) {|sum,i| sum+i} --> ((((0+1) + 2) + 3) + 4) that is important if the array is empty
mobileblue has left #ruby [#ruby]
* apeiros
off for lunch
h_kon has quit [Read error: Operation timed out]
camilasan has joined #ruby
_rahim is now known as rahim
AlSquire has joined #ruby
dEPy has joined #ruby
OdNairy has quit [Remote host closed the connection]
verazabeida has quit [Remote host closed the connection]
<zipper>
If I run start ssh but fail to run stop ssh what would you call my ssh port? Open? or listening?
h_kon has joined #ruby
Squarepy has joined #ruby
<rjhunter>
zipper: that's not really a ruby question, but "open" or "listening" would both make sense in many contexts
platzhirsch has joined #ruby
<rjhunter>
zipper: "open" is usually more to do with access (firewalls), "listening" is usually more to do with there being something there to receive data
hiyosi has joined #ruby
<rjhunter>
zipper: but if you want to discuss any more, you'd probably better ask a networking or unix channel
<maasha>
Wow, I realize that creating gems like suggested in the Ruby cookbook is outdated.
mikker has quit [Quit: mikker]
<maasha>
Whats the way? hoe, gemcutter, jeweler?
Stygia has quit [Remote host closed the connection]
<Hanmac>
mmm i use rake for that ..
brtdv has quit []
gja__ has joined #ruby
ebetancourt has joined #ruby
ebetancourt has quit [Max SendQ exceeded]
<maasha>
Hanmac: jeweler uses rake as well.
hiyosi has quit [Ping timeout: 248 seconds]
pyrac has joined #ruby
mlpinit has joined #ruby
jmoeller has joined #ruby
gja has quit [Ping timeout: 256 seconds]
<andrewvos>
bundle gem gem_nam
<andrewvos>
e
<Hanmac>
i mean that its necessary to use extra software
<maasha>
andrewvos: me thinks that is also outdated perhaps
spider-mario has quit [Read error: Connection reset by peer]
<shevy>
hmm when I have 3813568 kB, I get megabytes by dividing through 1024 ?
freakcult has quit [Ping timeout: 260 seconds]
<maasha>
Right. There is a pletora of ways to create gems.
<Hanmac>
shevy wrong! megabytes are 1000
<rjhunter>
shevy: technically you'll get mebibytes (MiB) but everyone calls those megabytes ;-)
<Ivo>
Hi, I'm new to ruby and trying to help update jekyll to Maruku 0.7.0. Can anyone tell me if the \-escaped periods and /'s matter in this rake test output? http://pastie.org/pastes/8439768/text
<Hanmac>
rjhunter: thats the problem, ... everyone is dumb
blackmesa has joined #ruby
<rjhunter>
Ivo: /foo\.bar/ is a regular expression matching the literal string "foo.bar"
<rjhunter>
Ivo: I'm not sure whether you count that as whether they "matter" or not
<Ivo>
rjhunter: ok so i'm just hunting how the extra <hr /> gets inserted then'
mikker has joined #ruby
<rjhunter>
Ivo: the <hr />s aren't being matched it looks more like the CDATA section
xk_id has joined #ruby
adjo has joined #ruby
<rjhunter>
Ivo: the blank space between the open and closing script tags is "<![CDATA[ ]]>" but the test expects " "
brtdv has joined #ruby
wereHamster|work has joined #ruby
<Ivo>
rjhunter: i think introduced by the new library version
allsystemsarego has joined #ruby
<Ivo>
is there a way to run only a particular test?
<rjhunter>
Ivo: that sounds quite possible. the CDATA shouldn't make any real difference, but it's probably worth filing a bug with whichever library you believe is in error
ismlages has joined #ruby
<shevy>
hmm
<shevy>
why does <hr /> have a ' '
brennanMKE has joined #ruby
<Ivo>
shevy: not sure what you mean, if you were looking at my paste?
<shevy>
why not <hr/> ?
Mattx has quit [Ping timeout: 256 seconds]
sjltaylo_ has joined #ruby
<canton7>
shevy, it can be both
<Hanmac>
its because some browser *makes an evil stare at IE* does not work currectly with <hr/>
dr_bob_ has joined #ruby
<canton7>
some people prefer how the space looks
<canton7>
Hanmac, does IE still have that issue?
<Ivo>
I don't think so anymore
<Ivo>
for some set of the the newest IE
<canton7>
I thought that was pretty ancient. Pre IE6 maybe even
Mattx has joined #ruby
<Hanmac>
hm no i think the IE6 still does had that problem
<Hanmac>
maybe the current IE does not have this problem anymore, but it was long enough to make every web developer angry
noopq has joined #ruby
<canton7>
apparently the space was a xhtml requirement
cads has joined #ruby
dr_bob has quit [Ping timeout: 272 seconds]
brennanMKE has quit [Ping timeout: 272 seconds]
<shevy>
hmm
<Ivo>
space makes it valid xhtml which all ies can parse
<canton7>
and SO says it was netscape 4 that actually needed it
gja__ has quit [Quit: This computer has gone to sleep]
ewnd9 has joined #ruby
yalue has joined #ruby
<Ivo>
rjhunter: maruku switched a lot of rendering behaviour in its update to 0.7, and CDATA thing is a trick with scripts, against for xhtml, so I believe its the library behaviour thats changed
<zipper>
<< theBOFH : zipper, Microsoft co-founder BIll Gates celebrates his 58th birthday today. >>
AlSquire has quit [Read error: Connection reset by peer]
<sweeper>
most large projects have stuff like this
<sweeper>
easy low-hanging fruit
<sweeper>
if it doesn't get accepted, then you're doing it wrong :#
<workmad3>
zipper: if you're going that route, also grab a copy of 'Code Reading: The Open Source Perspective'
<sweeper>
and you shoud fix your code
<workmad3>
zipper: and Team Geek
<zipper>
workmad3: there's a book called Team Geek?
<workmad3>
zipper: there sure is :D
<zipper>
workmad3: that is a 2003 book man
<zipper>
Is it still relevant?
<sweeper>
are there still geeks? >.>
<zipper>
Talking about code reading
<workmad3>
zipper: yes, it's still relevant
<workmad3>
zipper: it's a book on how to get yourself immersed in a project quickly and find your way around
<sweeper>
namely, install ack, rejoice
<zipper>
sweeper: do people still get bullied in school?
mark_locklear has joined #ruby
<workmad3>
zipper: i.e. the sort of skills that don't date :)
<workmad3>
sweeper: yeah, there's a certain amount of that :D
<zipper>
workmad3: true
relix has joined #ruby
sailias has quit [Ping timeout: 264 seconds]
<workmad3>
zipper: Team Geek is more focussed on the team-skills that are useful for software (and other) projects, and a lot of the anecdotes and examples are taken from the authors' experiences with OSS projects like SVN
mephux has quit [Ping timeout: 245 seconds]
mephux has joined #ruby
<workmad3>
zipper: btw, as a personal endorsment of the Code Reading book - I had a student a couple of years ago who was non-stop asking me questions about a code base (they were doing a project on it, I was sort of in charge of the project and had passing familiarity with the code). I passed them that book, and within about a week the number of questions I was getting dropped to almost 0 :)
jonathanwallace has quit [Ping timeout: 246 seconds]
<workmad3>
zipper: because it just got them to the point where they knew how to figure shit out for themselves :)
<zipper>
workmad3: I will definitely start reading it this week.
<sweeper>
but anyways, check with your school. you might also be able to just start your own OSS project. if the school says "no it has to be a REAL COMPANY" or some stupid crap like that, then check with some OSS projects that have 'corporate' sides to them
<sweeper>
just be like "hey, can yousay I'm your intern and I'll work on your project" blah blah blah
<workmad3>
^^ that could work
<workmad3>
may want to approach github or engineyard on that front
cody-- has joined #ruby
<Vendethiel>
internship at github, that sounds cool :)
<zipper>
Vendethiel: very cool
<Vendethiel>
but I don't see remote-internships from here (europe) though
mmitchell has joined #ruby
ravster has joined #ruby
Nek has joined #ruby
Nek has left #ruby ["Quitte"]
brennanMKE has joined #ruby
<zipper>
I'm in Kenya though so almost everything that is exciting i
<zipper>
is happening overseas
jonr22 has joined #ruby
stringoO has joined #ruby
maroloccio has joined #ruby
drumusician has quit [Ping timeout: 272 seconds]
brennanMKE has quit [Ping timeout: 240 seconds]
thepumpkin has joined #ruby
jonr22 has quit [Ping timeout: 248 seconds]
rjhunter has quit [Remote host closed the connection]
<Hanmac>
shevy not yet... but i was working on my sfml binding again ... now it can play sounds
<shevy>
cool
<shevy>
and if you write docu...
<shevy>
it will be
<shevy>
AWESOME!
lmickh has joined #ruby
<Hanmac>
but i need to check why the shader is getting slower than the C++ app :/
<shevy>
wald0 please when you write ruby projects, always have some docu, at least working examples
<shevy>
that's easy
<shevy>
ruby is slow
<shevy>
it's one of the few known constants of the universe
<wald0>
shevy: what you mean exactly with docu? to write good formatted comments ?
<shevy>
E = m c²
<shevy>
RUBY = :slow
Kneferilis has quit [Ping timeout: 246 seconds]
<shevy>
wald0 nono usage examples, from developer to user documentation
lmickh has quit [Client Quit]
<shevy>
wald0 of course meaningful comments are helpful too, but noone will read through +2000 lines of code really...
<wald0>
well, i m going to write mostly applications, more than libs
ahawkins has quit [Read error: Operation timed out]
<shevy>
with or without documentation?
<wald0>
shevy: what i like about comments is that they can generate doc :), like doxygen
devoldmx has joined #ruby
Aryasam has joined #ruby
DouweM has joined #ruby
flapenguin has joined #ruby
zz_michael_mbp is now known as michael_mbp
derebos has quit [Quit: Leaving]
derebos has joined #ruby
<flapenguin>
hi, guiz. what the point to write "set :name, value" instead of "name/@name/@@name = value"?
ananthakumaran has quit [Quit: Leaving.]
jcarouth` is now known as jcarouth
devoldmx3 has quit [Ping timeout: 240 seconds]
basmoura has quit [Quit: Computer has gone to sleep.]
leonidlm has joined #ruby
ravster has joined #ruby
drumsrgr8forn8 has joined #ruby
kevind has joined #ruby
drumsrgr_ has joined #ruby
ebetancourt has joined #ruby
Soda has joined #ruby
krawchyk_ has joined #ruby
hiroyuki has joined #ruby
basmoura has joined #ruby
yfeldblum has joined #ruby
cpruitt has joined #ruby
momomomomo has joined #ruby
shredding has joined #ruby
AlSquire has quit [Ping timeout: 240 seconds]
sie has joined #ruby
uje_muje has quit [Read error: Connection reset by peer]
hogeo has quit [Remote host closed the connection]
asobrasil has joined #ruby
hogeo has joined #ruby
drumsrgr8forn8 has quit [Ping timeout: 272 seconds]
m0no has joined #ruby
AlSquire has joined #ruby
<sie>
Is it wrong to define dynamic 'it' blocks in rspec by using data from the database in the 'describe' block?
krawchyk has quit [Ping timeout: 272 seconds]
Guest93023 has quit [Ping timeout: 272 seconds]
<DouweM>
sie: example?
<wald0>
i think that im going to create a PDF version of this quickref by zenspider
robbyoconnor has quit [Max SendQ exceeded]
<wald0>
shevy: whats the difference between this channel and #ruby-lang ?
flapenguin has quit [Remote host closed the connection]
<shevy>
sie you have a weird nick
<shevy>
wald0 depends on who you ask. in general, #ruby-lang is the "official" ruby channel
<sie>
shevy, Only by german standards.
<m0no>
I have an array [['a', 1],['b',2] ..] and a Class MyClass that initializes with 2 arguemtns. Shouldn't I be able to myobjets = mypairs.each {|p| MyClass.new *p} and get an array of constructed objeccts?
<shevy>
sie yeah, good point
zxq9 has joined #ruby
Guest49233 has quit [Ping timeout: 256 seconds]
<shevy>
wald0 there are more people on #ruby though and #ruby-lang requires freenode registration in order to speak
<sevenseacat>
the word sie confuses me.
* sevenseacat
learning german
<shevy>
wald0 some people who are on #ruby-lang are never on #ruby and vice versa
<shevy>
drbrain... chris2 ... zenspider ... hmm
<sie>
DouweM, describe Foo; Foo.special_records.each do |r| it "should have made #{ r } this and that" do blabla.should be x; end; end; end
<wald0>
if i would have multi-editing realtime in vim too.. :/
<ccooke>
wald0: you can...
mrsolo has quit [Quit: This computer has gone to sleep]
TheMoonMaster_ has quit [Excess Flood]
<wald0>
ccooke: how ?
palms has joined #ruby
<ccooke>
wald0: which form of multi-editing do you mean? Multiple simultaneous users, or multiple files?
<ccooke>
(or something else, in which case I don't actually know if you can do it :-)
aspires has joined #ruby
<wald0>
shevy: im going to add the __callee__ too, what is for in comparison to __method__ ?
<wald0>
is the same?
* wald0
just tried it
<wald0>
ccooke: multiple-simultaneous users
wereHamster|work has quit [Ping timeout: 272 seconds]
TheMoonMaster has joined #ruby
mansi has joined #ruby
kvirani has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran has quit [Max SendQ exceeded]
<pskosinski>
I am quite sure that I have seen a very similar guide somewhere…
ananthakumaran has joined #ruby
<ccooke>
wald0: you can do that with screen. It's not as ideal as a dedicated app, of course, but you can have multiple people editing at once. If you're in a voice call, it's easy to coordinate. Just have to make sure only one person is active at a time.
<wald0>
pskosinski: yes, converted to "markdown" for print it in paper :)
<wald0>
ccooke: i dont think that we are talking about the same, i mean multiple users editing... with independent cursors / code, but affecting at the same file in realtime (just like this website)
sviesusisalus has joined #ruby
palms has quit [Ping timeout: 272 seconds]
<wald0>
ccooke: as you can see i just updated line (if is yours) on the web link
<ccooke>
wald0: it's the same thing, just a more limited form
ShellFu_afk is now known as ShellFu
zoee has quit [Quit: zoee]
akemrir has quit [Quit: WeeChat 0.4.2]
<sviesusisalus>
hello. i have rails 4 and ruby 3 environment, when i run simple rspec test i get following result : File to import not found or unreadable: foundation. what can be the problem ?
<wald0>
ccooke: with independent cursors?
* wald0
thinks that vim doesn't supports that
<ccooke>
wald0: no, it doesn't. But you can have multiple remote users controlling the same cursor.
<wald0>
ccooke: but then you are totally unable to work with multiple people :)
brain_shim has quit [Ping timeout: 272 seconds]
<shevy>
wald0 I think it is somehow related to the stack... I dont use it often... in fact, I think I used it only once
<shevy>
there is also caller()
<ccooke>
wald0: no, you aren't :-)
<wald0>
having the same cursor is like a "fight" lol
<samfisher>
i have this CSV file with name,id and URL to a picture. how can I make a PDF catalog that displays 4x5 pictures and their names?
eliasp has quit [Quit: No Ping reply in 180 seconds.]
andikr has quit [Quit: No Ping reply in 180 seconds.]
andikr has joined #ruby
bugsinlights has quit [Ping timeout: 240 seconds]
pixelgremlins has quit [Ping timeout: 240 seconds]
WanderingGlitch has quit [Ping timeout: 240 seconds]
TheSpect1e has quit [Ping timeout: 240 seconds]
withnale has quit [Quit: No Ping reply in 180 seconds.]
matchaw has quit [Quit: No Ping reply in 180 seconds.]
andikr has joined #ruby
andikr has quit [Changing host]
rtl has quit [Ping timeout: 240 seconds]
cody-- has quit [Quit: derp]
Mattx has quit [Read error: Connection reset by peer]
matchaw has joined #ruby
theoretick has joined #ruby
rtl has joined #ruby
lele` has joined #ruby
CaptainJet has joined #ruby
dhilipsiva has quit [Ping timeout: 272 seconds]
<havenwood>
samfisher: I'd prolly require 'csv' and use prawn
cpruitt has quit [Ping timeout: 272 seconds]
jonr22 has joined #ruby
macmartine has quit [Remote host closed the connection]
<havenwood>
samfisher: maybe HTTPClient to download the picture
blackmesa has quit [Quit: WeeChat 0.4.2]
cpruitt has joined #ruby
aantix has joined #ruby
anderson has quit [Quit: Leaving]
jonahR has quit [Quit: jonahR]
ssvo has joined #ruby
Mon_Ouie has quit [Ping timeout: 264 seconds]
anderson has joined #ruby
sepp2k has quit [Quit: Konversation terminated!]
jkhwan has quit [Remote host closed the connection]
happydude has joined #ruby
jonr22 has quit [Ping timeout: 240 seconds]
luckyruby has quit [Remote host closed the connection]
jkhwan has joined #ruby
sbos99 has joined #ruby
tesuji has quit [Ping timeout: 246 seconds]
Squarepy has quit [Remote host closed the connection]
achru has quit [Remote host closed the connection]
obs has quit [Ping timeout: 240 seconds]
lfox has quit [Quit: ZZZzzz…]
kevind_ has joined #ruby
jibi has quit [Quit: .]
aapzak has quit [Ping timeout: 272 seconds]
tatsuya_o has quit [Remote host closed the connection]
IceDragon has joined #ruby
pyrac has quit [Quit: pyrac]
tatsuya_o has joined #ruby
aapzak has joined #ruby
Al___ has quit [Quit: Al___]
Wandering_Glitch has quit [Changing host]
Wandering_Glitch has joined #ruby
CaptainJet has quit []
colonolGron has joined #ruby
colonolGron has quit [Client Quit]
colonolGron has joined #ruby
kevind has quit [Ping timeout: 272 seconds]
kevind_ is now known as kevind
kil0byte has quit [Remote host closed the connection]
thedonvaughn has quit [Ping timeout: 272 seconds]
Guest5881 has joined #ruby
CaptainJet has joined #ruby
Guest5881 is now known as zeldak
<zeldak>
#kkk
zeldak has quit [Changing host]
zeldak has joined #ruby
zeldak has joined #ruby
astrobu__ has joined #ruby
sayan has joined #ruby
<havenwood>
zeldak: That seems like a not-so-great channel. >.>
fomatin has quit [Quit: Computer has gone to sleep.]
tjbarber has joined #ruby
tatsuya_o has quit [Ping timeout: 248 seconds]
<zeldak>
havenwood: what?
alup has quit [Quit: Leaving]
<havenwood>
zeldak: #kkk, i mean, nevermind :P
ghr has quit [Quit: Computer has gone to sleep.]
<derebos>
hi
astrobun_ has quit [Ping timeout: 248 seconds]
<derebos>
how can i convert string to method, ex example: 'dns_name' => ec2.dns_name
jonathanwallace has quit [Ping timeout: 260 seconds]
moted has joined #ruby
<derebos>
'id' => ec2.id
<derebos>
something like this
<Hanmac>
derebos: use #send
blackmesa has joined #ruby
wak3r has joined #ruby
<zeldak>
havenwood: ok
pdimitrov has quit [Ping timeout: 272 seconds]
AlSquire has joined #ruby
<havenwood>
zeldak: What did you mean by it, now i'm curious?
pr0ggie has quit [Ping timeout: 264 seconds]
mansi has quit [Read error: Connection reset by peer]
pr0ggie has joined #ruby
pdimitrov has joined #ruby
<havenwood>
derebos: ec2 is an instance of a class?
thedonvaughn has joined #ruby
mansi has joined #ruby
sayan has quit [Ping timeout: 246 seconds]
<derebos>
havenwood, yeah the class is AWS::EC2
<tjbarber>
Hey guys, I'm using unicorn and sinatra. My API is receiving api tokens in my request payloads, querying the database using the token to make sure it's valid, and continuing from there. But is it possible for me to only perform that query once instead of with every request and store the results of the token query in a variable?
pyrac has joined #ruby
nwertman has joined #ruby
zeropx has joined #ruby
<havenwood>
derebos: what Hanmac said (of course :P), i just got what you're saying
<zeldak>
havenwood: when I meant that there's one key in my keabord that is loose, and I thinked that I'm where at the terminal and was about to enter kkk as comand so I put a # before it
<havenwood>
:O
<tjbarber>
from my current implementation though, the variable is set for all users in the server causing major issues, and that's no good
ShellFu has joined #ruby
Mon_Ouie has joined #ruby
<havenwood>
tjbarber: any code to show of what you've got right now?
<tjbarber>
sure, just a sec havenwood
mikecmpbll has joined #ruby
jlogsdon has joined #ruby
wak3r has quit [Ping timeout: 246 seconds]
<jlogsdon>
Has anyone had problems with bundler installing the debugger gem against OSX System ruby even if you're in another version? It's most likely related to my upgrade to 10.9 Mavericks as I haven't seen it before and google isn't coming up with much.
<tjbarber>
havenwood I'm performing a couple queries each time I send a token, but I'm wondering if I can do that once and store the results of it for this one user. creating an Identity object and changing of the value of "user" caused major issues because each time it was set it was set server wide.
Ox6abe has joined #ruby
<Hanmac>
jlogsdon: the better question: why do you want to use the system ruby? systemruby is in 99% cases shitty and outdated
Wandering_Glitch is now known as WanderingGlitch
kaspergrubbe has quit [Ping timeout: 246 seconds]
deception has joined #ruby
<jlogsdon>
Hanmac: i _don't_
platzhirsch has left #ruby [#ruby]
<jlogsdon>
thats the problem: its forcing me into using it for some reason
einarj has quit [Remote host closed the connection]
warmwaffles has joined #ruby
efrainolivares has joined #ruby
rdark has quit [Ping timeout: 260 seconds]
<jlogsdon>
but only for the debugger gem from what i can tell? it installs debugger-ruby_source or whatever but then debugger cant find it (and references system ruby....)
sayan has joined #ruby
<tjbarber>
brb
lukec has quit [Quit: lukec]
tjbarber has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sviesusisalus has quit [Quit: Leaving]
DanKnox_away is now known as DanKnox
rdark has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
cody-- has joined #ruby
Zeeraw has joined #ruby
spider-mario has joined #ruby
tjbarber has joined #ruby
dangerousdave has joined #ruby
<jlogsdon>
Hm, looks like the issue may lie with rbenv. `rbenv exec bundle install` works. time to figure out why rbenv is broken now :-/
<jlogsdon>
first time ive ever had issues with :-/
<warmwaffles>
wut
<warmwaffles>
lol
<Hanmac>
jlogsdon: i use rvm on mac ... but only to manage the different compiler
<jlogsdon>
cant stand rvm
<jlogsdon>
i may start using chruby
<warmwaffles>
I'm impartial on it
<warmwaffles>
I like rvm and rbenv
<warmwaffles>
comparing apples to oranges
<jlogsdon>
true
<jlogsdon>
but ive had nothing but problems with RVM
<jlogsdon>
we use it in production and its been horrid for some things
<|jemc|>
jlogsdon: run rbenv which bundle
fgo has quit [Remote host closed the connection]
<jlogsdon>
i did it was the correct patrh
tboerger has quit [Read error: Operation timed out]
<|jemc|>
how about 'which bundle'?
<|jemc|>
should point to the rbenv shim
aganov has quit [Remote host closed the connection]
<movedx_>
OK. I was just wondering. I'm trying to work out why my code, which utilises this class, times out when setting up a new NFW on an ASA. Was just wondering what that meant. Thanks for clearing it up and confusing me even further :P
jonathanwallace has joined #ruby
<hoelzro>
Claudiop: I haven't seen a bug yet, but you should probably turn on foreign keys unconditionally
<|jemc|>
class methods are 'singleton methods' as some call them
sayan has quit [Ping timeout: 240 seconds]
<hoelzro>
that setting is per-connection, iirc
goleldar has joined #ruby
<Claudiop>
It tells "sqlite.rb:33: syntax error, unexpected end-of-input, expecting keyword_end" when i execute it
<hoelzro>
also, you don't need to quote field names in column defitions
<hoelzro>
*definitions
* hoelzro
can't type today
<Hanmac>
Claudiop: you miss one "end" before exit
<Hanmac>
what is what the syntax error is trying to tell you
<hoelzro>
so id INTEGER NOT NULL PRIMARY KEY
<hoelzro>
also, I don't know if SQLite supports AUTOINCREMENT
<hoelzro>
not "id" INTEGER...
<hoelzro>
it implicitly does that if the primary key is a not null integer, iirc
<cout>
why can't ruby just tell me which one I left out
<Claudiop>
hoelzro: The sql works fine, the problem its on the script itself. I want to create a sqlite file with the sql instructions i wrote, how can i do it?
a1ph4g33k has joined #ruby
reset has quit [Ping timeout: 272 seconds]
<Claudiop>
And the end solved the bug, but now it says "Exception occured cannot commit - no transaction is active"
jojosch has joined #ruby
codeFiend has joined #ruby
kenneth has quit [Quit: kenneth]
tjbarber has joined #ruby
<hoelzro>
you commit without starting a transaction
<Claudiop>
You mean, writing data inside of the tables?
<Hanmac>
Claudiop: you can change /^[Ss]/ to /^s/i the i marks the regex as case-insensitive
sarlalian has quit [Quit: WeeChat 0.4.0]
<havenwood>
samfisher: updated with a few fixes after actually trying to run it :P, needs more robust image downloading and resizing stuff still
user258467 has quit [Quit: Quitte]
zz_michael_mbp is now known as michael_mbp
user258467 has joined #ruby
<Claudiop>
Hanmac: Suggestion accepted :) I removed the commit and added another exit to the loop and it works fine. Thank you guys ;)
eka has quit [Ping timeout: 245 seconds]
lukec has joined #ruby
nazty has joined #ruby
devoldmx has quit [Ping timeout: 260 seconds]
mansi has quit [Remote host closed the connection]
dagobah has quit [Remote host closed the connection]
whunt has quit [Quit: Computer has gone to sleep.]
brtdv has quit []
kidoz has joined #ruby
mansi has joined #ruby
thesheff17 has quit [Quit: Leaving]
<derebos>
Hanmac, i can get the dns_name of instance using ec2.instances[ins].dns_name, i'm using send :dns_name, ec2.instances[inst] give meundefined method `dns_name' for main:Object (NoMethodError)
SilverKey has joined #ruby
sayan has joined #ruby
jkline has joined #ruby
sarlalian has joined #ruby
endash has joined #ruby
jlogsdon has quit [Quit: Leaving.]
<Hanmac>
linduxed: like this if you have an nightly ruby: CSV.foreach("/some/file/here").with_object({}){|(k,v),h| h[k]=v}
<yfeldblum>
linduxed: commented
<a1ph4g33k>
Good morning all.
<linduxed>
a1ph4g33k: hello
<linduxed>
yfeldblum: hmm, yeah i guess that works
nowthatsamatt has quit [Quit: nowthatsamatt]
<Hanmac>
derebos: you need to call send on the object you want: ec2.instances[ins].send("dns_name")
SHyx0rmZ has joined #ruby
user258467 has quit [Quit: Quitte]
lfox has joined #ruby
jaimef has quit [Excess Flood]
<yfeldblum>
linduxed: careful in perf-critical code, though - it makes a temporary array for each row, which your original example does not do
jlogsdon has joined #ruby
adeponte has joined #ruby
_if has joined #ruby
jaimef has joined #ruby
ShellFu is now known as ShellFu_brb
sporkubus has quit [Quit: Page closed]
momomomomo has quit [Quit: momomomomo]
merica has joined #ruby
burlyscudd has quit [Quit: Leaving.]
ShellFu_brb is now known as ShellFu
Ox6abe has quit []
Stygia has quit [Quit: Leaving]
arietis has joined #ruby
whunt has joined #ruby
stkowski has joined #ruby
Andrevan has quit [Quit: WeeChat 0.4.2-rc1]
SHyx0rmZ has quit [Ping timeout: 272 seconds]
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
zipper has quit [Ping timeout: 256 seconds]
Shidash has joined #ruby
hiroyuki has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
boxmein has quit [Ping timeout: 264 seconds]
iamjarvo has joined #ruby
timonv has quit [Read error: Operation timed out]
froy has left #ruby ["byebye"]
warmwaffles has left #ruby [#ruby]
pixelgremlins has quit [Ping timeout: 240 seconds]
tylersmith has joined #ruby
kindjal has quit [Quit: Computer has gone to sleep.]
zeade has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
hiroyuki has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
Astralum has joined #ruby
Claudiop has quit [Ping timeout: 250 seconds]
iamjarvo has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
olivier_bK has quit [Ping timeout: 246 seconds]
iamjarvo has quit [Read error: Connection reset by peer]
pragmatism has joined #ruby
Soda has joined #ruby
iamjarvo has joined #ruby
jlogsdon has quit [Quit: Leaving.]
<maasha>
How can I use RDoc to parse a .rdoc file into a ruby structure and output selected sections as pretty printed text for the commanline?
pothibo has quit [Quit: pothibo]
<maasha>
The class documentation is not very helpful to me
jkhwan has quit [Remote host closed the connection]
sepp2k1 has joined #ruby
<Hanmac>
linduxed: did you read my comment too?
failshel_ has joined #ruby
<linduxed>
Hanmac: yes i did
<linduxed>
i'm... yeah i'm giving the various solutions some thought
<Hanmac>
PS: it may not works for you because your ruby may be to old ;P
<|jemc|>
maasha: check out the source for the 'ri' command line tool
<|jemc|>
maasha: can probably leverage some of that
<|jemc|>
maasha: or just use the tool, it it already does what you want
pixelgremlins has joined #ruby
ybart has quit [Quit: ybart]
jkhwan has joined #ruby
<maasha>
|jemc|: hm, could be done, but perhaps a bit overkill
saarinen has joined #ruby
<|jemc|>
maasha: you can probably 'require' some of the internal libs that ri uses
<maasha>
|jemc|: I may in fact just call rdoc. hm, lemmy test this.
kevinykchan has quit [Quit: Computer has gone to sleep.]
jonathanwallace has joined #ruby
jonathancutrell has quit [Quit: jonathancutrell]
mansi_ has joined #ruby
einarj has joined #ruby
jkline has quit [Quit: jkline]
timonv has joined #ruby
sayan has quit [Ping timeout: 248 seconds]
mansi has quit [Read error: Connection reset by peer]
<|jemc|>
I'm pretty sure ri displays pre-rendered rdoc files - it doesn't generate them from source
<|jemc|>
you just need to dig through the source and figure out how to point it to the right file if you're not putting your rdoc files in whatever the std dir is
Soda has quit [Ping timeout: 272 seconds]
<Eiam>
any sort of testing framework designed to just... hit all your routes with various parameters?
jibi has joined #ruby
einarj has quit [Ping timeout: 256 seconds]
nowthatsamatt has joined #ruby
nowthatsamatt has quit [Client Quit]
timonv has quit [Read error: Connection reset by peer]
timonv has joined #ruby
c0rn has joined #ruby
petey_ has quit [Remote host closed the connection]
petey_ has joined #ruby
Azulinho has quit [Quit: WeeChat 0.4.1]
Azulinho has joined #ruby
Astralum has quit [Quit: Leaving]
jojosch has quit [Quit: Verlassend]
echevemaster is now known as echevemaster_afk
thesheff17 has joined #ruby
kpshek has quit []
jonr22 has joined #ruby
Tuxist has joined #ruby
aspires has quit [Quit: Adios]
aspires has joined #ruby
apeiros has joined #ruby
petey_ has quit [Ping timeout: 260 seconds]
zarubin has joined #ruby
rdark has quit [Quit: leaving]
Xeago has quit [Remote host closed the connection]
sayan has joined #ruby
failshel_ has quit [Remote host closed the connection]
brennanMKE has quit [Remote host closed the connection]
failshell has joined #ruby
RichardBaker has joined #ruby
mikepack has quit [Remote host closed the connection]
jonr22 has quit [Ping timeout: 264 seconds]
achru has quit [Remote host closed the connection]
drizz has quit [Read error: Connection reset by peer]
jlebrech has quit [Quit: Konversation terminated!]
mikepack has quit [Ping timeout: 272 seconds]
kindjal has joined #ruby
shaunbaker has quit [Remote host closed the connection]
shaunbaker has joined #ruby
burlyscudd has joined #ruby
mlpinit has quit [Remote host closed the connection]
xk_id has joined #ruby
shaunbaker has quit [Ping timeout: 246 seconds]
<maasha>
wow, parsing rdoc files is a rather secret problem. google is to little help only, and locating the appropriate source from ri or rdoc is painful.
mlpinit_ has joined #ruby
petey has joined #ruby
camilasan has quit []
burlyscudd has quit [Ping timeout: 272 seconds]
michael_mbp is now known as zz_michael_mbp
<|jemc|>
did you look at RDoc::RI::Driver in 'rdoc/ri/driver'?
kobain has joined #ruby
atmosx has joined #ruby
mrsolo has quit [Quit: This computer has gone to sleep]
platzhirsch has joined #ruby
<platzhirsch>
Okay, let's rewrite some code. Ditch Yajl for Oj. JSON parser showdown... now!
sambao21 has quit [Quit: Computer has gone to sleep.]
mrsolo has joined #ruby
_HolyCow1 is now known as _HolyCow
Zai00 has quit [Quit: Zai00]
<Morrolan>
Pft, all those fancy JSON parsers. *hugs stdlib parser*
lmickh has quit [Quit: lmickh]
lmadrigal has joined #ruby
robonerd has quit [Quit: ...]
<maasha>
|jemc|: I am rather confused by anything in RDoc. I find the lack of examples frustrating.
Al_ has quit [Quit: Al_]
ffranz has quit [Ping timeout: 272 seconds]
<platzhirsch>
Morrolan: yeah, I am mean the stdlib parser does for most of the things the jobs :)
AndChat| has quit [Ping timeout: 248 seconds]
mark_locklear has quit [Ping timeout: 272 seconds]
timonv has quit [Remote host closed the connection]
blackratdog has joined #ruby
tjbarber has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tvw has quit []
ffranz has joined #ruby
kirun has joined #ruby
ewnd9 has quit [Ping timeout: 260 seconds]
zz_jrhorn424 is now known as jrhorn424
mvangala_ has quit [Remote host closed the connection]
mvangala has joined #ruby
Sauvin has quit [Remote host closed the connection]
alvaro_o has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
sambao21 has joined #ruby
mlpinit_ is now known as mlpinit
samfisher has joined #ruby
carraroj has joined #ruby
brennanMKE has joined #ruby
Soda has quit [Remote host closed the connection]
sayan has quit [Ping timeout: 240 seconds]
eeriegeek has joined #ruby
heftig has joined #ruby
<|jemc|>
maasha: well, what you need is there I believe but I don't have time at the moment to walk you through it. good luck.
<shafox>
hi, given a number lets say we declared a = 1221233232, and we need to multiply each digit by 1 and 3 alternately , how to take away each and decide from left , what to multiply depending upon the previous number ??
saarinen has quit [Ping timeout: 272 seconds]
<pragmatism>
Uh
<pragmatism>
What?
capicue has joined #ruby
<pragmatism>
I would turn it into a string, take the index of each character, set it back to an integer, perform the operation in a map.
bricker_ has joined #ruby
<pragmatism>
or something.
luckyruby has quit [Remote host closed the connection]
postmodern has joined #ruby
luckyruby has joined #ruby
<shafox>
pragmatism: that is what i though , but was looking for alternate answer
<Hanmac>
to_s.each_char.each_cons(2)
bricker_ is now known as bricker`work
Notte has joined #ruby
bricker has quit [Disconnected by services]
bricker`work is now known as bricker
kpshek has quit []
SpinningWheels has joined #ruby
aspires has quit [Quit: sudo making a sandwich]
eldariof has joined #ruby
pyrac has quit [Quit: pyrac]
SpinningWheels has left #ruby [#ruby]
mikepack has joined #ruby
palms has quit [Read error: Connection reset by peer]
hiyosi has joined #ruby
asobrasil has quit [Ping timeout: 240 seconds]
<shafox>
Hanmac: a.to_s.chars.map(&:to_i) a being 1231231231
sambao21 has quit [Quit: Computer has gone to sleep.]
jprovazn has joined #ruby
blaxter_ has quit [Quit: foo]
<Hanmac>
shafox: yeah and you says "depending upon the previous number" so thats why i use each_cons(2)
palms has joined #ruby
achru has quit [Remote host closed the connection]
Zai00 has joined #ruby
jaimef has quit [Excess Flood]
wildroman has joined #ruby
kpshek has joined #ruby
wildroma_ has joined #ruby
theRoUS has quit [Ping timeout: 246 seconds]
wildroma_ has quit [Remote host closed the connection]
kevinykchan has joined #ruby
wildroman has quit [Client Quit]
Soda has joined #ruby
|jemc| has quit [Ping timeout: 260 seconds]
hiyosi has quit [Ping timeout: 264 seconds]
mark_locklear has joined #ruby
kidoz has quit [Quit: Ухожу я от вас]
lmickh has joined #ruby
nkts has joined #ruby
fntzr has quit [Quit: Leaving]
nkts has quit [Max SendQ exceeded]
eldariof has quit [Ping timeout: 264 seconds]
aspires has joined #ruby
nkts has joined #ruby
nkts has quit [Max SendQ exceeded]
<havenwood>
shafox: is it cycling whether multiplied by 1 or 3, or some logic around the index, or looking back at previous number? Too much to guess.
pyrac has joined #ruby
nkts has joined #ruby
nkts has quit [Max SendQ exceeded]
sambao21 has joined #ruby
nkts has joined #ruby
Xeago has joined #ruby
nkts has quit [Max SendQ exceeded]
jaimef has joined #ruby
mocfive has joined #ruby
<platzhirsch>
I really enjoy to write code without time pressure, finally some time to breath and write unit tests,... so much better
BlakeRG has joined #ruby
<shafox>
havenwood: lets say constant a=42342512131, what i want to do is, (4*1)+(2*3)+(3*1)+(4*3)+....,
nkts has joined #ruby
<shafox>
Hanmac: ^^
nkts has quit [Max SendQ exceeded]
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
nkts has joined #ruby
decoponio has quit [Quit: Leaving...]
nkts has quit [Max SendQ exceeded]
<Hanmac>
ah so its only index based
theoretick has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sayan has quit [Ping timeout: 272 seconds]
nkts has joined #ruby
nkts has quit [Max SendQ exceeded]
hiyosi has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
<segfalt>
could convert to string and back, but that's slower, better to implement the math with some mixture of modulus and subtraction (mod 10 for 1's place, subtract that, mod 100 / 10 for 10's place, subtract that, repeat)
nkts has joined #ruby
<segfalt>
neat problem to solve
nkts has quit [Max SendQ exceeded]
Astralum has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
jalcine has quit [Excess Flood]
Azulinho has quit [Ping timeout: 246 seconds]
dhilipsiva has quit [Remote host closed the connection]
Notte has quit [Remote host closed the connection]
sambao21 has quit [Client Quit]
nkts has joined #ruby
Notte has joined #ruby
<BlakeRG>
does the exit method it's self throw an exception?
<BlakeRG>
and the code is the exit status?
Xeago has quit [Ping timeout: 272 seconds]
<shafox>
BlakeRG: if it is directed for me , i am unsure what you meant.
<shafox>
segfalt: doesn't matter, sum of all that number i want
<segfalt>
as a personal challenge, this should be done without string conversions.
<segfalt>
:-)
tjbarber has joined #ruby
<havenwood>
How bout this, use a cycle instead of index checking: 42342512131.to_s.each_char.with_object([1, 3].cycle).map { |n, c| n.to_i * c.next }.inject :+
c0rn has joined #ruby
<shafox>
even if 9*3= 27, it would just add at the end not like recursive
<havenwood>
Hanmac: ^ assuming we're talking 2.0+ (long live 2.1!)
<havenwood>
:)
`Chris` has quit [Read error: Connection reset by peer]
<havenwood>
Hanmac: i mean for the each_char chars distinction
`Chris` has joined #ruby
<Hanmac>
yeah
<havenwood>
yeah, i actually like cycle better than index checking
<havenwood>
segfalt: good idea
<havenwood>
hmm
thepumpkin has quit [Remote host closed the connection]
<segfalt>
working on it, does it have to be one line?
<segfalt>
:-)
<segfalt>
monkeypatching Fixnum now… :p
<havenwood>
haha
<shafox>
2.1 is not released yet, you on edge ? havenwood
* Hanmac
is on nightly
thepumpkin has joined #ruby
<shafox>
segfalt: no way.
<popl>
You sure are.
<havenwood>
shafox: actually on ruby-2.1.0-preview1 not nightly atm
kpshek has quit []
zeldak has quit [Ping timeout: 250 seconds]
jkline has joined #ruby
<platzhirsch>
Ruby aliases File.exist? with File.exists? … You know a language takes literate programming serious when it incorporates inflectional affix.
leonidlm has quit [Ping timeout: 264 seconds]
<shafox>
is mathematical way more faster ?
elaptics is now known as elaptics`away
johnnyfuchs has joined #ruby
<Hanmac>
havenwood: my ruby is more than 2 days old ... i think i rebuild ruby ;P
ForceMultiplier has joined #ruby
<ForceMultiplier>
Anyone know of a good guide to get Ruby and Rails setup on a clean install of OS X Mavericks?
<havenwood>
Hanmac: mmm, i should grab latest, couple things i wanna play with
<sweeper>
ForceMultiplier: RVM
<havenwood>
ForceMultiplier: ruby-install with chruby
<segfalt>
shafox: I'm trying to avoid using a stack
theRoUS has joined #ruby
<ForceMultiplier>
why do i want homebrew?
<sweeper>
segfalt: programming your CPU via DIP switches then?
<ForceMultiplier>
instead of RVM or whatever
thepumpkin has quit [Ping timeout: 259 seconds]
<havenwood>
ForceMultiplier: Homebrew is a package manager. You could use less popular tools like Fink or MacPorts, but Homebrew is the road most travelled.
<havenwood>
ForceMultiplier: Has little do do with the later choice of RVM, ruby-install/chruby, or rbenv/ruby-build.
reset has quit [Quit: Leaving...]
<ForceMultiplier>
so i need homebrew before rvm, is what you're saying?
<havenwood>
You need Homebrew period. To install packages. But yes.
robonerd has joined #ruby
pragmatism has quit [Quit: Leaving...]
reset has joined #ruby
<havenwood>
ForceMultiplier: Then install Rubies dependencies once you have Homebrew setup: brew install gdbm libffi libyaml openssl readline
Nisstyre-laptop is now known as nisstyre
sambao21 has joined #ruby
<havenwood>
ForceMultiplier: And install the Command Line Tools: xcode-select --install
jlast_ has joined #ruby
<ForceMultiplier>
i thought rvm did all of the dependencies
<ForceMultiplier>
nor does rvm's instructions mention homebrew
blackratdog has quit [Read error: Connection reset by peer]
<havenwood>
ForceMultiplier: Well, you *probably* want to be able to build gems, etc. Maybe build Ruby. Would be kinda gimped dev machine to not be able to build.
<havenwood>
Hanmac: People don't install build tools then start tickets that they can't build stuff.
jlast_ has quit [Ping timeout: 245 seconds]
<havenwood>
Hanmac: Apple's refusal to default install anything GPL3 is annoying. I get it, but annoying nonetheless.
<ForceMultiplier>
do i really want ruby 2.0.0? or should i stick w/ 1.9.3 if im relatively noobie
<havenwood>
Hanmac: Hence silliness like `bash` version 3.2 shipping with Mavericks. Latest `zsh` cause no licensing issue.
<havenwood>
Hanmac: So you gotta: brew update bash
Ripp__ has quit []
jmoeller has joined #ruby
<havenwood>
brew install bash, whatever
<havenwood>
ForceMultiplier: 2.0.0 is stable. Start there for best experience. (Unless you're on Win64 then wait a bit.)
<Hanmac>
hm i used macports on my OSX machine ... its not so bad
kayloos has joined #ruby
<havenwood>
Hanmac: Yeah, people seem to like them ports.
efrainolivares has quit [Quit: efrainolivares]
<havenwood>
Hanmac: For a multi-user system, most definitely.
<ForceMultiplier>
okay so i have homebrew
<ForceMultiplier>
now rvm?
<Hanmac>
but i curse mac every time that it does not have a package system like apt-get and synaptic
<havenwood>
ForceMultiplier: RVM is a popular choice. I'd recommend ruby-install with chruby. You'll be fine either way. A third option, if you don't want to swap between Rubies is to use the Homebrew Ruby package.
<ForceMultiplier>
whats the difference
<ForceMultiplier>
between rvm and chruby
<Nilium>
I will second chruby.
<Nilium>
chruby: not as hacky.
<havenwood>
ForceMultiplier: chruby is very small and simple, ~90 lines of code - rvm is very large and does lots of things, ~20,000 lines of code
<segfalt>
does chruby sandbox a gems environment?
<Nilium>
20,000 lines of _shellscript_ no less.
<postmodern>
segfalt, nope, you will have to use something like gs, chgems or just `bundle install --path vendor/...`
<havenwood>
segfalt: It merely sets the current Ruby. It defers to chgems or other tools for that.
<segfalt>
hm neat
<segfalt>
I use rvm, never tried anything else
<havenwood>
postmodern: speaking of chruby, hey! :)
<Nilium>
I almost used rvm, then found out that it did terrible things
<shafox>
segfalt: well, same trying a way around stack
Ripp__ has joined #ruby
<havenwood>
Maybe thinking of rbenv FUD? That was too bad.
dhilipsiva has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
nomenkun has joined #ruby
<frem>
I'm using rbenv with ruby 1.9.3-p448, but a repo I'm looking at has "ruby-1.9.3" in a .ruby-version file, and rbenv keeps saying "rbenv: version `ruby-1.9.3' is not installed". How does one fix this?
jonr22 has joined #ruby
pkrnj has quit [Quit: Computer has gone to sleep.]
c0rn has quit [Quit: Computer has gone to sleep.]
<postmodern>
frem, rbenv recommends symlinking it in ~/.rbenv/versions
<postmodern>
frem, rbenv matches the name exactly
thomasvs has quit [Quit: Coyote finally caught me]
mikepack has quit [Remote host closed the connection]
<havenwood>
postmodern: Would be really nice if everyone would adopt fuzzy matching for .ruby-version files. Seems to come up.
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
thams has joined #ruby
Vivekananda has quit [Remote host closed the connection]
<postmodern>
havenwood, totally, why does your app need to exactly use 1.9.3-p1234
<frem>
postmodern: link /usr/bin/ruby there?
<postmodern>
havenwood, probably works just as good on 1.9.3-p1235
<havenwood>
postmodern: srsly
<postmodern>
frem, symlink ~/.rbenv/versions/1.9.3-p123 to ~/.rbenv/versions/ruby-1.9.3
mansi_ has quit [Read error: Connection reset by peer]
thomasvs has joined #ruby
<frem>
ah. thanks!
mansi_ has joined #ruby
codezomb_ has joined #ruby
dhilipsiva has quit [Ping timeout: 260 seconds]
jonr22 has quit [Ping timeout: 248 seconds]
MrPoT4tO has joined #ruby
mrpot4to_ has joined #ruby
robustus has quit [Ping timeout: 264 seconds]
udon has quit [Quit: Leaving]
<havenwood>
postmodern: So looks like rvm does support fuzzy matching now, so just rbenv is odd-man-out.
w3pm has quit [Quit: Leaving]
<postmodern>
i think rvm supports [RUBY|VERSION][-PATCH] ?
codezomb_ has quit [Client Quit]
mityaz has joined #ruby
<havenwood>
ahhhh
codezomb_ has joined #ruby
iamjarvo_ has joined #ruby
<Nilium>
Ruby is a dying lanhahahahaha yeah right.
<Nilium>
My god that blog post reads like it was written by someone who doesn't even know what Ruby is
<Nilium>
"Ruby is failing to help businesses engage customers?" Really? Since when was it the programming language's failing that your code blows?
<Nilium>
Well, not even code, really. The product. The product _blows_.
zarubin has quit [Ping timeout: 240 seconds]
jacobw has joined #ruby
iamjarvo has quit [Ping timeout: 272 seconds]
aydin has quit [Quit: Leaving]
Jetchisel has quit [Quit: Unfortunately time is always against us -- *Morpheus*]
jalcine has joined #ruby
theoretick has joined #ruby
<Hanmac>
Nilium: except for PHP ... there is the language the problem ;D
<platzhirsch>
Nilium: yeah... it read kind of childish
<Nilium>
Well, that's debatable too.
kevinykchan has quit [Quit: Computer has gone to sleep.]
codezomb has quit [Client Quit]
kevinykchan has joined #ruby
<Nilium>
As much as I like to bash the hell out of PHP, there are some extremely successful things written in it
<platzhirsch>
You don't go into a room make such a bold statement if it's not backed by some actual facts and not that bs
lmickh has quit [Quit: lmickh]
tatsuya_o has joined #ruby
codezomb has joined #ruby
codezomb has quit [Client Quit]
reset has joined #ruby
<platzhirsch>
anyway, any good idea to access a block variable after the block is closed again? Assigning it to a variable outside looks a bit funky
<Nilium>
It honestly just read like something meant to appeal to managers and people who have no idea about programming so that they'll force their coders to all switch to whatever
<Hanmac>
Nilium: thats the point ... to write good software with a shitty language, then you must be very skilled ;P
codezomb has joined #ruby
<Hanmac>
platzhirsch: dont work on recent ruby
<platzhirsch>
Hanmac: say what?
kpshek has quit []
<platzhirsch>
recent Ruby?
<Nilium>
Which is why I use Intercal.
lmickh has joined #ruby
<Hanmac>
platzhirsch: ruby 1.9+ and 2.0 used shadowing
<Hanmac>
>> a = 1; p a; [1,2,3].each {|a| p a}; p a
<a1ph4g33k>
I monkey patch in my .irbrc for hex & binary representations ... class Integer ; def to_hex ; self.to_s(16) ; end ; def to_binary ; self.to_s(2) ; end ; end
<kraljev2>
how can I reuse this parameter hash multiple times?
<kraljev2>
%img{ ... long parameter list .. }
mansi_ has joined #ruby
pkrnj has joined #ruby
tonni has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
Xeago has joined #ruby
jblack has quit [Read error: Connection reset by peer]
Es0teric has quit [Ping timeout: 272 seconds]
kaspergrubbe has joined #ruby
mercwithamouth has joined #ruby
krawchyk has quit []
thepumpkin has joined #ruby
<a1ph4g33k>
how are you calling the haml render ? ( rails ? )
efrainolivares_ has joined #ruby
mudmaster has joined #ruby
ryanRT has quit [Read error: Connection reset by peer]
ForceMultiplier has left #ruby [#ruby]
kindjal has joined #ruby
<kraljev2>
template.render binding
<kraljev2>
I don't use rail
<kraljev2>
*rails
<kraljev2>
but that shouldn't matter, right?
efrainolivares__ has joined #ruby
<a1ph4g33k>
it doesn't but I wanted to give a relevant response ...
ryanRT_ has joined #ruby
RichardBaker has joined #ruby
efrainolivares has quit [Ping timeout: 268 seconds]
aspires has quit [Quit: sudo making a sandwich]
<a1ph4g33k>
in this case ... add a method to the object you are calling binding FROM ... call it standard_attributes or something of that nature ... then you can call it from haml ... as in %img{ standard_attributes }
theRoUS has joined #ruby
c0rn has joined #ruby
<a1ph4g33k>
... you could even go further and store multiple sets of attributes ... and then refer back to them by name.... as in %img{ standard_attributes( :logo ) }
<kraljev2>
hm, cool!
kaspergrubbe has quit [Ping timeout: 272 seconds]
<a1ph4g33k>
but if your attributes collection is static, you should be able to get away with just a variable in the space where you call render.
jmoeller has quit []
BlakeRG has quit [Read error: Connection reset by peer]
efrainolivares_ has quit [Ping timeout: 240 seconds]
<a1ph4g33k>
std_attributes = { alt: 'foo', src: 'blah' } ; template.render binding ... with %img{ std_attributes } in the haml.
<Eiam>
Tampon provides Gitflow integration with Capistrano, without unessecary restrictions to the deploy process.
<Eiam>
it even has an icon of a tampon.. good god, cmon engineers/nerds seriously..
<vpretzel>
What? you mad bro?
dhilipsiva has joined #ruby
<pragmatism>
What a fucking obnoxious name for a gem
<Eiam>
vpretzel: its an awful name for a gem. its very non descriptive and its a bit offensive
chriskk has joined #ruby
<vpretzel>
I've met the guy who made git-tampon - it fits his personality
<a1ph4g33k>
I'm not mad ... I don't mind the name ... I know some managers that would get uppity about having something with that name in the corp source tree ... but otherwise ... your project, your choise.
<Eiam>
(its not offensive to me, but i can see it definitely being offensive)
<a1ph4g33k>
s/se/ce/
<vpretzel>
so fork it and remove it
<Eiam>
a1ph4g33k: to be honest, enforcing process has been a big push for me, and moving to git-flow, bringing it capistrano-gitflow has been part of that enforcement
<Eiam>
a1ph4g33k: the other has been bringing online CI
kraljev2 has left #ruby [#ruby]
<banisterfiend>
♬ rubyists get all hysterical over trivial shit ♬
<Eiam>
banisterfiend: so much hysteria here! =)
<pragmatism>
We have several female devs on our team. Pretty sure it would be a no no
<a1ph4g33k>
I am so hysterical I call it catatonic.
<robonerd>
who cares if it's offensive
DanBoy has quit [Remote host closed the connection]
<robonerd>
there's always someone offended by something. it's not somehow a 'wrong' name. not tasteful, but not a big bad wolf
<pragmatism>
People who are getting paid to work with it?
<vpretzel>
If it's a valuable enough tool for you, you'll fork it and remove the offensiveness by it.
<robonerd>
i could definitely see a lib named "jockstrap" and that wouldn't be offensive
adambeynon has joined #ruby
<pragmatism>
vpretzel: Not a bad thing
<pragmatism>
robonerd: you're also working in a male dominated industry
<robonerd>
pragmatism welcome to the freedom of open source code. don't like it in your work place, don't use it
blueOxigen has quit [Ping timeout: 272 seconds]
<robonerd>
whatever with your politics, i'm just talking reason
bassclef has joined #ruby
<Eiam>
*shrug* its telling that someone felt that was the right name for the tool
<robonerd>
this is why you pay for business stuff, because it has no personality and is all business
bassclef is now known as Guest59834
CreativeEmbassy has joined #ruby
<robonerd>
each has its benefits
<Eiam>
robonerd: oh, I get the name. its not cute or funny, but I get it. its not charming either. so I'm not really sure WHAT the goal was
<Eiam>
tongue in cheek I guess
<robonerd>
k but my point is, who cares nothing to see here move along k thx ...
<robonerd>
yanno? we have stuff to build!
swemoney has joined #ruby
<|jemc|>
banisterfiend: so my yield-in-the-middle decorator trick doesn't work if the original method is meant to take a block argument. If you get bored, you should take a look at what I did instead and let me know if you think of any pitfalls: https://github.com/jemc/deco/blob/master/lib/deco.rb
Andrevan has joined #ruby
mikecmpbll has joined #ruby
pkrnj has quit [Quit: Computer has gone to sleep.]
<swemoney>
any help here? https://gist.github.com/swemoney/9584bac3fc588b0d7ec6 Trying to request something via an API and if it fails because the session is expired, login and retry again.. except login is never getting called
kvirani has joined #ruby
cescalante is now known as ce_afk
danshultz has quit [Read error: Connection reset by peer]
<banisterfiend>
|jemc| can't access that repo
<banisterfiend>
ah ignore that
danshultz has joined #ruby
<banisterfiend>
|jemc| have you got an example of using it?
tjbarber has joined #ruby
fella7s has joined #ruby
ephemerian1 has joined #ruby
jaredlevitz has joined #ruby
lupine has quit [Ping timeout: 245 seconds]
<robonerd>
rails is so dying off
<banisterfiend>
robonerd whycome
<robonerd>
haha, enjoy your php framework :P
<Eiam>
its.. big..
<Eiam>
i moved off rails last year
<robonerd>
the community has lost the spirit that carried it's flight, my friend
<robonerd>
case in point.
<banisterfiend>
Eiam into what?
felipe has quit [Ping timeout: 264 seconds]
MrPoT4tO has quit [Read error: Connection reset by peer]
mrpot4to_ has quit [Read error: Connection reset by peer]
MrPoT4tO has joined #ruby
<Eiam>
banisterfiend: sinatra/padrino
<robonerd>
PURE RUBYSSEMBLY
lectrick_ has joined #ruby
<robonerd>
k seriously, what's up with those names? sinatra? padrino? wtf
slash_nick has quit [Changing host]
slash_nick has joined #ruby
<Eiam>
it fits better with the types of deliverables I have anyway, which are smaller one off apps & tools to meet specific needs
<Eiam>
with an often common core framework
sambao21 has quit [Quit: Computer has gone to sleep.]
jaredlevitz has quit [Client Quit]
jgrevich2 has joined #ruby
jprovazn has quit [Quit: Odcházím]
tonini_ has joined #ruby
lsmola_ has joined #ruby
<robonerd>
are there any mini/micro web/network service frameworks which have it nailed? mature api, solid design, active/thriving community
mrpot4to_ has joined #ruby
<banisterfiend>
never thought i'd need 16gig ram, but with mavericks, i might need it..
drumusician has quit [Read error: Connection reset by peer]
<robonerd>
i'd like to shed a bunch of rails' weight
jkamenik has quit [Quit: Leaving.]
<Eiam>
banisterfiend: you should need *less* ram with mavericks, not more
<robonerd>
something just above ruby on bare metal, say ruby + http/others on bare metal
<canton7>
robonerd, sinatra is popular, and I believe camping is too
maddog__ has joined #ruby
<swemoney>
got dammit. stupid mistake. never mind.
<Eiam>
robonerd: .. sinatra? =)
<canton7>
robonerd, padrino is heavier, built on sinatra
sambao21 has joined #ruby
<banisterfiend>
Eiam apps seem more leaky under mavericks
drumusician has joined #ruby
mosez_ has joined #ruby
codenapper has joined #ruby
mityaz has quit [Quit: See ya!]
ephemerian1 has quit [Client Quit]
<Eiam>
you've wandered into my domain now
<Eiam>
what apps?
<Eiam>
have any specific examples?
allsystemsarego has quit [Quit: Leaving]
kayloos has joined #ruby
pipework_ has joined #ruby
__eka__ has joined #ruby
mansi_ has quit [Read error: Connection reset by peer]
danman has joined #ruby
<robonerd>
canton7 is the extra weight of padrino /worth/ it?
eliasp has joined #ruby
mansi has joined #ruby
<canton7>
robonerd, depends. if you're writing something bit, you'll end up adding weight anyway. you'll need to
<canton7>
but I haven't used padrino in anger
<robonerd>
i like how cinch bot puts all plugin operations into their own thread transparently. is there something like this for http ?
petey_ has joined #ruby
<robonerd>
so i could make it transparent to make my ruby web app multi threaded
<robonerd>
canton7 anger out of what?
CharlieS1 has joined #ruby
sam113101_ has joined #ruby
kayloos has quit [Remote host closed the connection]
mansi has quit [Read error: Connection reset by peer]
talntid has joined #ruby
marahin has quit [Changing host]
marahin has joined #ruby
<Eiam>
tobylane: #rubyonrails
randomnick_ has quit [Quit: Leaving]
<tobylane>
Thanks
<talntid>
why... puts true if (0.99999999999999999 == 1)
<talntid>
is true, but one less 9, is false
mansi has joined #ruby
<tobylane>
Rounding errors
sepp2k has joined #ruby
pixelgremlins has quit [Ping timeout: 272 seconds]
hiyosi has joined #ruby
<apeiros>
because floats
plotter has quit [Read error: Connection reset by peer]
<robonerd>
is nginx the best ruby web app server to use?
<Eiam>
its what i use
<Eiam>
+ passenger
<apeiros>
floats use a finite number of digits to represent a large array of numbers - there's limits to their precision
sailias has quit [Quit: Leaving.]
threesome has joined #ruby
mark_locklear has quit [Quit: Leaving]
__eka__ is now known as eka
raphaelivan has joined #ruby
sepp2k1 has quit [Ping timeout: 272 seconds]
opus has joined #ruby
shaunbaker has joined #ruby
kaldrenon has quit [Read error: Connection reset by peer]
kaldrenon has joined #ruby
dhilipsiva has quit [Ping timeout: 245 seconds]
nisstyre has quit [Ping timeout: 240 seconds]
hiyosi has quit [Ping timeout: 252 seconds]
<robonerd>
Eiam i found the web site and read about passenger, but i don't quite get it yet. i suppose i'll need to spend more time getting back into ruby before i remember all of the layers of the web app stack
lurch_ has joined #ruby
<robonerd>
it's overwhelming now how many modules and gems and packages and helper tools and ..... there are for ruby / web now
Notte has quit [Remote host closed the connection]
MissionCritical has joined #ruby
Notte has joined #ruby
<lurch_>
how can I generate a hash like {1=>0, 2=>0, 3=>0, ..., 100=>0} ? so a hash containing keys 1..100 all with value 0
einarj has joined #ruby
tonni has joined #ruby
dkamioka has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
<canton7>
Hash[(0..100).zip([0].cycle)] is one way
<Eiam>
robonerd: passenger fusion (for me) is about just pointing at a path on disk and saying "This needs to be served"
<Eiam>
and magic making it so.
danshultz has quit [Remote host closed the connection]
kaldrenon has quit [Ping timeout: 268 seconds]
danshultz has joined #ruby
Mitchellvanw has quit [Quit: Dozing off...]
Notte has quit [Ping timeout: 245 seconds]
angusiguess has quit [Ping timeout: 245 seconds]
<lurch_>
canton7: thank you! no idea how that even works
jlast has quit [Remote host closed the connection]
zeade has quit [Quit: Leaving.]
jlast has joined #ruby
<tobylane>
Elam is there anywhere else I can try?
<Eiam>
lurch_: (0..100) creates a range, .zip joins two arrays together, the second array being an enumerable that cycles the value [0] until it stops (like when you hit 100). then Hash takes that structure [0,0,1,0,2,0] and turns it into a hash
danshultz has quit [Ping timeout: 245 seconds]
zxq9 has quit [Quit: Konversation terminated!]
iamjarvo_ has quit [Remote host closed the connection]
<robonerd>
couldn't you just put shared functionality into a gem?
<robonerd>
ah
<Eiam>
robonerd: the shared functionality is in 4 gems
<robonerd>
so like, each feature is its own app?
jonr22 has joined #ruby
dr_bob has quit [Quit: Tune in next week when you'll hear Dr. Bob say...]
<Eiam>
robonerd: the contents & data at app1 may look & be presented (and serve) a different purpose than the stuff in app3, but both app1 and app3 share a bit of common code, they both pull data in the same way, they both have the same access control process, they have a lot of the same view problems. so they all share the same helpers & so on
<Eiam>
they all have the same error handling and so on
<Eiam>
(but its only written once)
<Eiam>
(in the "Padrino App" which serves out my smaller "apps")
Metal_01 has joined #ruby
<robonerd>
how do you name this stuff? name of project for the padrino app, then name of feature for the smaller apps?
<havenwood>
Another silly way: Hash[100.times.each_with_object(0).to_a]
<robonerd>
seems like, 1 core, many apps
chineduu has joined #ruby
jonr22_ has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
<Eiam>
robonerd: my padrino app overall has a codename, like "YellowDog" or whatever, then under it is a folder called "apps" and those are named by the routes they serve, which are self contained deliverables. any of them could be deployed without the others existing
<Eiam>
I have several gems that are stand alone gems
<Eiam>
robonerd: assuming you wanted more than one padrino app sure, but again, I only have one
<robonerd>
i would have let's say 2 personal projects and 2 client projects at a time. any combination of those could be using the same base of shared functionality
<robonerd>
ahh right, the gems
<Eiam>
robonerd: I work for a corporation. I have many masters and I develop tools for many teams, but I serve those tools all under the same padrino app
nfk has quit [Quit: yawn]
Naoe-Kanno has joined #ruby
<robonerd>
so you have 1 main padrino app, yellowdog, correct?
<Eiam>
right
DonRichie has quit [Quit: Verlassend]
<robonerd>
ahh gotcha
alex__c2022 has quit [Quit: alex__c2022]
<robonerd>
ok so in my situation, i'd have yellowdog client, smooches client, turnip personal, etc... padrino apps, yes?
Xeago has quit [Remote host closed the connection]
pyrac has quit [Quit: pyrac]
<Eiam>
I'm not 100% keen on what your situation is exactly, but what I've done is certainly not the only or best way to do it, its just the way that made sense for me and my constraints
SHyx0rmZ has quit [Ping timeout: 260 seconds]
<robonerd>
no it seems good
<Eiam>
there isn't any reason you couldn't have multiple padrino apps that serve multiple apps under them
a1ph4g33k has quit [Quit: Leaving]
<robonerd>
well yea
<Eiam>
for me, the point of pardino was to contain all my little apps in one place
mrpot4to_ has quit [Remote host closed the connection]
MrPoT4tO has quit [Read error: Connection reset by peer]
<Eiam>
while understanding they are fully seperate
<robonerd>
so anyway, the shared stuff i'd use in many/all of those main apps, i'dput into gems and load the gem within the main apps. yes?
<Eiam>
in rails I'd have these controllers that served one set of functionality and had *nothing* to do with anything else. I couldn't pull apart random pieces
<Eiam>
it was all one monolithic thing, which is what i wanted to get away from
<Eiam>
robonerd: yes, that seems perfectly sane
chineduu is now known as chinychinchin
<robonerd>
ok
<Eiam>
i have a gem for managing external data sources, like pulling in data over the wire, and another gem for managing people and their relationships
platypine has joined #ruby
platypine has quit [Changing host]
platypine has joined #ruby
<robonerd>
ah right, very good
<Eiam>
the padrino app loads those gems and makes all that available to the children apps because at some point or another, they will need to know *something* about those structures
<robonerd>
do you use an orm for db projects? like activerecord or?
<doug_f>
Anyone in the room want to help me look at a ruby function for puppet that seems to be giving an error I don't understand? https://gist.github.com/anonymous/7223066
Spami has quit [Quit: This computer has gone to sleep]
kaspergrubbe has quit [Ping timeout: 245 seconds]
wak3r has quit [Ping timeout: 240 seconds]
<Eiam>
robonerd: I was using data mapper, but I'm moving to Sequel for my next /apps/route
<robonerd>
but what about db?
<robonerd>
url?
<Eiam>
I'm not going to migrate *off* data mapper, just going forward I'll be using Sequel
<Eiam>
robonerd: postgresql
<robonerd>
is sequel an orm?
<Eiam>
data mapper & sequel are 'ORMs' like active record, just different
<Eiam>
robonerd: yep, sure is. it came highly recommended from some other folks here too
breakingthings has joined #ruby
<canton7>
sequel's models I guess are ORM-like, but I wouldn't call the datasets aspect ORM-like
* apeiros
prefers his sequel ORM-less
jonr22_ has quit [Remote host closed the connection]
<Eiam>
apeiros: well, as Sequel points out, both are available
<Eiam>
my boss said he didn't want an ORM (when I suggested Sequel, and prototyped some usage) so he used datamapper..
<robonerd>
dang
<Eiam>
and totally used it as an ORM.
<robonerd>
sequel looks good
<apeiros>
lol
* canton7
loves Sequel's models, and the power of falling back to datasets
<apeiros>
I use sequel because the ORM part is optional and I can leave it off
<Eiam>
apeiros: so now I just convinced him that we are moving to Sequel cause I'm not bringing up another project in datamapper
lfox has quit [Quit: ZZZzzz…]
<Eiam>
apeiros: If he'd listened to you the first time.. =)
<robonerd>
apeiros if you leave of 'orm' parts, what does your code look like?
<robonerd>
what does that even mean
pyrac has joined #ruby
<apeiros>
Eiam: he talked with me?
<lupine>
ORMs promote bad code. I have decided this
<Eiam>
it means a ruby DSL for sequel calls ?
<robonerd>
lupine example please?
interactionjaxsn has quit [Remote host closed the connection]
<apeiros>
robonerd: DB[:table] << {col: value}
<Eiam>
apeiros: well, via me as your proxy =)
<apeiros>
Eiam: ah
<apeiros>
yeah, people never listen to me and then they get hurt…
<Eiam>
apeiros: you may (or may not) recall I asked bout this about 6 months ago, you recommended Sequel. I looked into it, prototyped some stuff and said to him lets use this
interactionjaxsn has joined #ruby
<Eiam>
he checked in stuff using data mapper instead
<Eiam>
=)
<apeiros>
:)
<apeiros>
sh*t happens
<robonerd>
apeiros ok i somewhat follow that code...
<lupine>
robonerd, active record patterns as opposed to repository patterns
binaryplease has joined #ruby
<lupine>
especially in large, multithreaded applications this leads to massive pain
<robonerd>
is the point to being ormless is you just use programmatic constructs for manipulating state?
<Eiam>
robonerd: in this table for this column set this value
<apeiros>
robonerd: the point is not to use a *fucking plaintext protocol* to manipulate your data
Al_ has joined #ruby
<apeiros>
I mean - think about it. it's insane.
amacgregor has joined #ruby
<robonerd>
yea, totally
<apeiros>
SQL was built so *humans* could query DBs. Not code.
<robonerd>
yea good point
<lupine>
erm
<apeiros>
of course sequel will build SQL
sepp2k has joined #ruby
<apeiros>
but… at least you don't.
<robonerd>
yes but that should be abstraacted away
<lupine>
hence compiled queries
<robonerd>
interactions with data should be all programmatic
<Eiam>
I don't have any huge problem with ORMs so the discussion is moot to me. I'm not moving to Sequel to go "ORM-less", I'm moving because data mapper is de-facto dead
<robonerd>
but apeiros, isn't that what an ORM does?
<apeiros>
lupine: isn't "prepared statement" the de-facto term?
cspray has joined #ruby
<apeiros>
lupine: note that the most popular db (mysql) does not have them.
<lupine>
probably, I get confused by precise terminology very easily
freezey has quit [Remote host closed the connection]
<apeiros>
and they solve a somewhat different problem. you still use a f'ing plaintext protocol.
<lupine>
and mysql certainly does have them
<apeiros>
you just optimize some of its worst parts
freezey has joined #ruby
<lupine>
that's like complaining that C is inefficient because it's plaintext
<robonerd>
no
<apeiros>
lupine: no. it pretends to. it doesn't.
codenapper has quit [Quit: codenapper]
<lupine>
once it's been compiled, or prepared, the overhead of being plaintext is more or less gone
<lupine>
not that I particularly like SQL
<apeiros>
at least that was the state some 2 or 3 years ago. maybe they came up to speed.
<lupine>
it's just that this particular criticism is invalid
zarubin has joined #ruby
<apeiros>
22:53 lupine: that's like complaining that C is inefficient because it's plaintext
<apeiros>
that makes no sense
<lupine>
"sql is plaintext so it must be inefficient"
<lupine>
"c is plaintext so it must be inefficient"
<robonerd>
i like what apeiros is saying because, when i've had flawed sql queries in my code before, my app worked even though the data/db didn't. if i was coding against programmatic api of my data, i couldn't make query flaws like misspelling table names
lurch_ has quit [Quit: lurch_]
<apeiros>
again, that comparison makes no sense.
<lupine>
they are both programming langauages, that can be compiled
thams has joined #ruby
interactionjaxsn has quit [Ping timeout: 268 seconds]
<apeiros>
"it's all bits and bytes in the end so everything is efficient!"
<apeiros>
makes as much sense.
drumusician has joined #ruby
<lupine>
no, the thing that makes them make sense is that in both cases the compilation step is removing the work that is "turn this plaintext code into something machine-runnable"
tyleretters has quit [Quit: l8r]
<robonerd>
apeiros can you show me some more sequel code which does basic table queries etc?
Es0teric has joined #ruby
<robonerd>
i'd like to see what it looks like query/ormless
<apeiros>
robonerd: there is a whole website dedicated to sequel
mansi has quit [Remote host closed the connection]
<apeiros>
lupine: also performance is only one of the issues
mansi has joined #ruby
<robonerd>
hm yea prepared statements ar egood
<lupine>
sure, but it's the specific one we happen to be addressing right now
<apeiros>
lupine: the other is "oh lets convert every possible datatype into text and back"
<apeiros>
lupine: it's the specific one *you* chose to address.
<lupine>
not a feature of SQL
pothibo has joined #ruby
freezey has quit [Ping timeout: 272 seconds]
breakingthings has quit []
<robonerd>
~ is used for negation in Sequel it seems
felipe has joined #ruby
<lupine>
one of the less offensive operator overloadings, I guess
<butblack>
I'm looking at this question I asked… it's partially a rails question but I'm more interested in the OO portion of the question.. why would it make sense to call github.class_method over github::CONSTANT?
stringoO has quit [Quit: stringoO]
<robonerd>
butblack #rubyonrails
mlpinit has quit [Remote host closed the connection]
mansi_ has joined #ruby
<Eiam>
robonerd: anyway, I don't have any horse with Sequel either (I've not *used* it yet) I just suggest against using data mapper. Padrino supports all of these anyway (Sequel, DataMaper, ActiveRecord and a few others)
mansi has quit [Ping timeout: 245 seconds]
<robonerd>
sequel is looking good to me as i read through the docs
<robonerd>
i like that i can do both sql and non
<robonerd>
so i can start with sql since that's what i know and as i learn sequel's api more, convert queries into that
<robonerd>
seem like a good plan apeiros ?
<apeiros>
robonerd: sure, why not
ldnunes has quit [Ping timeout: 259 seconds]
<apeiros>
Eiam: I haven't used DM yet - it sounds like you had bad experiences?
<robonerd>
dunno?
<Eiam>
apeiros: I wouldn't say "bad experience" so much as the core team is focused on rom-rb, or "datamapper2"
pkrnj has joined #ruby
<apeiros>
ok
<Eiam>
apeiros: I have run into some issues that required I monkey patch data mapper core, but I was only able to get to that point with the help of the very nice data mapper folks
<Eiam>
(who are very busy with romrb) =)
<waxjar>
i found DM hard to work with if you want to do something other than the standard "select * from where x = y"
<|jemc|>
banisterfiend | |jemc| have you got an example of using it?
<Eiam>
waxjar: thats probably most of my usage anyway.
<Eiam>
my major complaint is its just an old obsolete project now, so I don't want to build my future on it
thesheff17 has quit [Remote host closed the connection]
freezey has joined #ruby
baordog_ has quit [Remote host closed the connection]
<havenwood>
rom looks neat
<markus_>
hi all. anybody familiar with the ruby community in denmark?
tvw has joined #ruby
<markus_>
or rails for that matter
<Eiam>
also ""Sequel has restored my faith in Ruby. It's really amazing. The O/RM I've been hoping for for years." -- Sam Smoot, creator of DataMapper"
<Eiam>
lol
<Eiam>
havenwood: rom-rb looks neat, and I would use it (over sequel) but the team has stated its not production ready
<havenwood>
Eiam: i use Sequel at the moment as well
seanz has left #ruby ["Konversation terminated!"]
yfeldblum has joined #ruby
Al_ has quit [Quit: Al_]
kaspergrubbe has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
petey_ has quit [Remote host closed the connection]
petey has joined #ruby
freezey has quit [Ping timeout: 272 seconds]
zeade has joined #ruby
<apeiros>
waxjar: I found pretty much all ORMs hard to use for any non-trivial problems.
<apeiros>
hm, "all ORMs" is hyperbole. I only ever tried 3 I think, and I don't even remember all their names :D
Authenticator has quit [Write error: Broken pipe]
<apeiros>
cutting it back to: AR is annoying too for any non-trivial problems.
volty has joined #ruby
claymore has joined #ruby
kpshek has quit []
petey has quit [Ping timeout: 245 seconds]
jonathancutrell has quit [Quit: jonathancutrell]
<platzhirsch>
apeiros: there are more than two ORMs?
theRoUS has quit [Ping timeout: 258 seconds]
<platzhirsch>
anyway, any example at hand for a non-trivial problem?
<apeiros>
none I'd want to paste
<apeiros>
I've some queries that span 50 lines.
<havenwood>
ORM, OMG! A threat to simple reliable code.
horofox has quit [Read error: Connection reset by peer]
Spami has joined #ruby
<apeiros>
I should get some sleep. End of deathmarch and I should get up early =(
<apeiros>
n8
horofox1 has quit [Client Quit]
dhilipsiva has joined #ruby
<Eiam>
why does this sound familiar
<Eiam>
apeiros: see ya
hiyosi has joined #ruby
reset has quit [Quit: Leaving...]
kindjal has quit [Ping timeout: 245 seconds]
<platzhirsch>
Any suggestions for a gem to mock web services? webmock or so?
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
<havenwood>
platzhirsch: webmock (1.15.1) exists
<Eiam>
ugh yeah this is relevant to my interests
<platzhirsch>
havenwood: yep, the only gem I found so far, just wondered if there are superior libraries
<lupine>
webmock is reasonable
<Eiam>
i need to unit test some of my code, but it all depends on working with data from an external service
drumsrgr_ has quit [Remote host closed the connection]
olivier_bK has joined #ruby
zipper has joined #ruby
<havenwood>
platzhirsch: oh, i read that horribly wrong >.> I thought you were looking for a name to name a gem :P
<platzhirsch>
Eiam: you don't want to query real servers then in the unit test I guess
<Eiam>
platzhirsch: right, I totally don't
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chinychinchin has quit [Quit: Konversation terminated!]
<Eiam>
I will if I have to, but I'd rather not =)
<platzhirsch>
well then let's integrate webmock and have a Fake HTTP Party
chinychinchin has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
reset has joined #ruby
jerius has quit [Ping timeout: 240 seconds]
ShellFu has quit [Quit: Leaving]
ephemerian1 has joined #ruby
zeade has joined #ruby
claymore has quit [Quit: Leaving]
hiyosi has quit [Ping timeout: 241 seconds]
dhilipsiva has quit [Ping timeout: 252 seconds]
<platzhirsch>
somewhen..
larissa has joined #ruby
pragmatism has quit [Read error: Connection reset by peer]
Metal_01 has quit [Ping timeout: 272 seconds]
<Eiam>
I'm still not 100% clear how I want to unit test this stuff anyway
<Eiam>
I know what I want, I want people to stop checking in code that breaks existing behavior. I'm just not sure how I'm going to achieve that goal with unit tests and what exactly they need to be testing
allsystemsarego has joined #ruby
InFlames has joined #ruby
petey has joined #ruby
apeiros has quit [Remote host closed the connection]
fomatin has joined #ruby
apeiros has joined #ruby
<havenwood>
some things sure don't lend themselves to testing
chinychinchin has quit [Ping timeout: 268 seconds]
tobylane has quit []
pr0ggie has quit [Read error: Operation timed out]
adjo has quit [Ping timeout: 240 seconds]
pdimitrov has quit [Ping timeout: 240 seconds]
pr0ggie has joined #ruby
Al_ has joined #ruby
freerobby has quit [Quit: Leaving.]
allsystemsarego_ has joined #ruby
allsystemsarego has quit [Ping timeout: 245 seconds]
jkhwan has quit [Remote host closed the connection]
nookie has joined #ruby
jkhwan has joined #ruby
guns has joined #ruby
jonathancutrell has joined #ruby
<Eiam>
I'm going to take a stab one day at just high level, for this given mock data set these functions should return these canned values
<Eiam>
if they don't, you broke something.
<Eiam>
havenwood: any suggestions on a gem that will "route test" ? I want to just load all my routes with either random or a specific set of parameters
jkhwan_ has joined #ruby
brennanMKE has quit [Remote host closed the connection]
jkhwan has quit [Read error: Connection reset by peer]
<Eiam>
(and make sure they load something thats not an error page)
JaTochNietDan has quit [Ping timeout: 245 seconds]
ehc has quit [Quit: ehc]
brennanMKE has joined #ruby
danshultz has joined #ruby
JaTochNietDan has joined #ruby
boxmein has quit [Quit: [02:26.00] <Ristovski> mozzarella filofax fadget]
<havenwood>
Eiam: like Rack::Test or something else?
<havenwood>
Eiam: I don't know of much.
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spider-mario has quit [Remote host closed the connection]
ssvo_ has joined #ruby
<havenwood>
Eiam: I'd like to know a good solution as well.
chriskk has quit [Remote host closed the connection]
Al_ has quit [Quit: Al_]
<Eiam>
hmm it would be nice if it looked at my routes dynamically
<Eiam>
instead of making me maintain them
JaTochNietDan is now known as JaTochNie
JaTochNie has quit [Excess Flood]
JaTochNietDan has joined #ruby
danshultz has quit [Ping timeout: 248 seconds]
brennanMKE has quit [Ping timeout: 248 seconds]
ssvo has quit [Ping timeout: 272 seconds]
nookie has quit []
nookie has joined #ruby
flayer has joined #ruby
<Eiam>
guess ill build something on top of this, seems close, I'll just have to generate Test::Unit::TestCases on the fly at runtime
lmickh has quit [Quit: lmickh]
brennanMKE has joined #ruby
jrhe has left #ruby [#ruby]
ewnd9 has joined #ruby
capicue has quit [Quit: Leaving...]
<havenwood>
nice, yeah there's room to improve, interesting idea
nookie has quit [Client Quit]
<Eiam>
havenwood: well the issue is users can create new records, but the data contained on *their* particular record is 100% different from any other route
<Eiam>
and our users are an unpredictable lot, always doing things I don't expect of them
<Eiam>
(this being due to the data loading from a 3rd party data source)
boboc has joined #ruby
<Eiam>
so yeah it would be great to go through every user record and load their page, ensuring it loads still with whatever wonky data they've dropped in
pdimitrov has joined #ruby
mansi_ has quit [Remote host closed the connection]
c0rn has joined #ruby
lmadrigal has joined #ruby
ReachingFarr has quit [Ping timeout: 272 seconds]
<havenwood>
our iOS devs are an unpredictable lot, i feel the same way about them!
mansi has joined #ruby
johnnyfuchs has quit [Quit: Leaving.]
<Eiam>
well you've got Bots there and some built in unit testing in Xcode right?
<snappy>
coming form python here -- is there a way in ruby to iterate over a range, do a transformation with the iterated value, and collect all transformation results in an array? this would usually be a list comprehension. E.g. (1..3).each do |i| i * i end would collect to [1,4,9]
tatsuya_o has quit [Remote host closed the connection]
<havenwood>
Eiam: Nope >.>
<Eiam>
snappy: you just wrote the code to do it =p
<Eiam>
doesn't that have to do with the implementation specifically for an array?
Spami has joined #ruby
<Eiam>
There's no difference, in fact map is implemented in C as rb_ary_collect and enum_collect (eg. there is a difference between map on an array and on any other enum, but no difference between map and collect).
<havenwood>
Eiam: yeah, i think wording on documentation is just what threw me
<Eiam>
effectively, map & collect are just like reduce & inject
<Eiam>
the same thing.
<havenwood>
Eiam: usually `see also` indicates difference
<Eiam>
I've stopped using collect, (just use map) but still use reduce/inject
<volty>
imo: 1) they should state that they are aliases 2) we should not care so much about that
Bry8Star{T2 has joined #ruby
CharlieS1 is now known as CharlieSu
baroquebobcat has quit [Quit: baroquebobcat]
<volty>
'map' makes more sense because we are mapping the values to new ones (and we are not collecting strawberry's
CharlieSu has left #ruby [#ruby]
<Eiam>
collecting the values to new ones
* Eiam
shrugs
<Eiam>
its pedantic either way
JaTochNietDan has quit [Ping timeout: 260 seconds]
<havenwood>
Eiam: yeah, i was just looking at Array#map versus Enumerable#collect... never mind me...
<havenwood>
>.>
<volty>
6. map, represent -- (to establish a mapping (of mathematical elements or sets)) // look yourself 'collect'
Es0teric has joined #ruby
<havenwood>
Eiam: Looking at both Enumerable, yeah of course. Doh!
<zipper>
I have get the following error whenever I try calling require relative with a filename: tests.rb:2: undefined method `require_relative' for main:Object (NoMethodError)
<havenwood>
zipper: nope, i don't think i have - though i started a fork reversing the order or assertion args and swapping to Minitest but petered out pretty quickly
<havenwood>
love it though
kayloos_ has joined #ruby
idiocrash has quit [Remote host closed the connection]
<volty>
EddSeabrook: try exposing that humor in #bash
kevind has quit [Quit: kevind]
<zipper>
Hey to me ruby-install and chruby seem to do the same thing
<volty>
(btw: the best chan)
kvirani has quit [Remote host closed the connection]
<zipper>
Install versions pf ruby
<zipper>
*of
jkhwan_ has quit [Remote host closed the connection]
<havenwood>
zipper: ruby-install *just* installs Ruby, and chruby *just* select which Ruby you're currently wanting to use
<havenwood>
zipper: They don't have to be used together, but work together seamlessly without any configuration.
jkhwan has joined #ruby
Naoe-Kanno has quit [Quit: ネウロイを負かさなきゃならないね]
merica has quit [Remote host closed the connection]
mmitchell has quit [Remote host closed the connection]
<zipper>
I get it now
<volty>
does rbenv do it as well?
<volty>
do that (seamlessly)
jkhwan has quit [Read error: Connection reset by peer]
<havenwood>
volty: you can use ruby-install with rbenv, but you have to pass it the dir to install to
jkhwan has joined #ruby
<bricker>
ruby golf question : I have an array of keys, and a hash. I want to create a new hash with only the keys from the array. Most succinct way to accomplish this? Here is mine that is way longer than I would like: https://gist.github.com/bricker/7224440
<volty>
thx
<zipper>
volty: is rbenv like virtualenv for ruby?
<volty>
zipper: i don't know :) // I just installed it (on kubuntu-12.04) and forgot about it
<havenwood>
zipper: rvm, rbenv, and chruby all fill a similar role, pick your poison
<terrellt>
zipper: A cursory glance says yes.
kayloos has quit [Ping timeout: 264 seconds]
<havenwood>
zipper: rbenv uses shims, so prepare to reshim - i prefer chruby for that amongst other reasons
zz_tsykoduk is now known as tsykoduk
<zipper>
terrellt: I am familiar with virtualenv from python so...
<volty>
i have only one prog that runs with 1.8.7 -- just by #!/usr/bin/ruby (that is the old 1.8.7)
hiroyuki has quit [Read error: Connection reset by peer]
<zipper>
I don't even know what shims are. I saw the word in the chruby readme
colonolGron has quit [Quit: leaving]
<havenwood>
volty: It really is a misnomer calling it rbenv, should be rbshim. :P
<havenwood>
volty: While chruby actually sets the env vars correctly.
<volty>
havenwood: i agree, i read about that it is all rbshim but forgot
jonathanwallace has joined #ruby
<havenwood>
Gotta point to the right Ruby. Pick a way. Either shim in front of every binary or set the environment variables correctly.
<havenwood>
rbenv shims it all up and chruby sets env vars correctly
<zipper>
havenwood: so they are all about setting the ruby version for that directory?
<zipper>
Cool
<zipper>
It's just what I need.
<zipper>
That plus some sleep.
<zipper>
Later gators :D
efrainolivares has joined #ruby
<volty>
I see but have neither time nor interest in running different versions (except the one that will go soon 1.9.3)
brennanMKE has quit [Remote host closed the connection]
<Eiam>
zipper: I prefer rvm cause its what i started with =p
brennanMKE has joined #ruby
gyre007 has quit [Remote host closed the connection]
JaTochNietDan has quit [Ping timeout: 246 seconds]
hiyosi has quit [Ping timeout: 272 seconds]
<zipper>
volty: it's all about solving dependency issues
<volty>
for me rbenv, from what i've read, is so clean that i would have implemented myself if not there
<zipper>
Some require conflicting versions of ruby
<zipper>
How else to solve this?
tonni has quit [Ping timeout: 252 seconds]
<volty>
like what havenwood said: it resolves dependencies by means of env
lmickh has joined #ruby
<havenwood>
zipper: I've never seen an app that requires two Ruby versions. But I don't doubt it. :P
<zipper>
if it's like pythons virtualenv I'll be more bent on using it than any other.
nari has joined #ruby
<volty>
zipper: there's only lib (with gems) different
<zipper>
havenwood: lol not an app that requires two ruby versions
<havenwood>
zipper: :P
<zipper>
I see that mostly in python
<zipper>
Since there are many in python 2. and many in python 3.
mansi has joined #ruby
<havenwood>
volty: rbenv does it by shims though, not by env like chruby
<zipper>
man I don't know what shims are
<havenwood>
or virtualenv (which named themselves sanely, albeit with no python reference)
<zipper>
I keep getting nothing useful from google
<terrellt>
zipper: Small executable scripts that manage routing to the right executable.
kvirani has joined #ruby
brennanMKE has quit [Ping timeout: 245 seconds]
kitak has joined #ruby
jonr22 has joined #ruby
<zipper>
virtualenv creates a new /bin in the working directory and adds it to $PATH me thinks
<volty>
and that change the env of the routed child ?
brennanMKE has joined #ruby
<volty>
@terelli
<havenwood>
zipper: So you put a little executable in the path in front of the real executables, yeah it is kinda nasty but does work with non-standard shells.
kayloos has joined #ruby
MrZYX is now known as MrZYX|off
<zipper>
hey you guys I'd love to stay and chat but my eyes hurt from all the sleepiness
<zipper>
Laters!
nfk has quit [Remote host closed the connection]
drumsrgr8forn8 has joined #ruby
mixel has quit [Quit: mixel]
boboc has quit [Remote host closed the connection]
pothibo has quit [Quit: pothibo]
kvirani has quit [Ping timeout: 272 seconds]
nfk has joined #ruby
boboc has joined #ruby
<zipper>
havenwood: uh ignoring the ambitious name do you think the following would've passed the test: http://pastebin.com/tzX5dnrm
jonr22 has quit [Ping timeout: 245 seconds]
nfk has quit [Client Quit]
<zipper>
learning about files and "sandwitches"
wesside has joined #ruby
DanBoy has joined #ruby
<havenwood>
zipper: I'd recommend opening files with blocks, which are self-closing, instead of procedural with an explicit #close.
<zipper>
but it's all good huh?
<zipper>
I am having trouble understanding blocks bro
<zipper>
but I could make it work
<zipper>
at least I think so
fomatin has quit [Quit: Computer has gone to sleep.]
<zipper>
plus they also seems related to lamdas
drumsrgr8forn8 has quit [Ping timeout: 245 seconds]
<havenwood>
zipper: I haven't parsed it carefully, but looks like Ruby to me! (Except for being all grey, where's the syntax highlighting? :P)
<havenwood>
zipper: Yeah, you should look at more examples of opening files in Ruby.
<havenwood>
zipper: Nope, not a sane way to do that i'm afraid, but a good starting point! :)
fomatin has joined #ruby
boboc has quit [Ping timeout: 246 seconds]
harumph has joined #ruby
JaTochNietDan has joined #ruby
harumph has left #ruby [#ruby]
einarj has quit [Remote host closed the connection]
<shevy>
zipper you can think of blocks as extra arguments that usually get attached to method calls, but may also live on their own
jonathancutrell has quit [Quit: jonathancutrell]
<volty>
IO.readlines(file_name)[line_number] does all your code does
jlast has quit [Remote host closed the connection]
jlast has joined #ruby
JaTochNietDan has quit [Quit: Right.]
<havenwood>
Or a much more cryptic: [*File.open(filename)][line_number.pred]
<havenwood>
so many ways
<havenwood>
read byte at a time until newlines, wooooh
einarj has quit [Ping timeout: 252 seconds]
tonni has joined #ruby
m8 has quit [Quit: Sto andando via]
jkhwan has quit [Remote host closed the connection]
jkhwan has joined #ruby
<volty>
File.open(file_name).each_with_index { |i, ln|return ln if i == line_number}
boboc has quit [Ping timeout: 245 seconds]
<volty>
lazy - do not read the entire file
jlast has quit [Read error: Operation timed out]
JaTochNietDan has joined #ruby
<volty>
(psst - he got asleep...)
<zipper>
No
<zipper>
lol I wanted the tests to run so I used require
<volty>
you were meditating about the future of humankind :)
theRoUS has joined #ruby
<zipper>
volty: you still remember that? lol
<volty>
it was still yesterday
brennanMKE has quit [Remote host closed the connection]
zarubin has quit [Ping timeout: 252 seconds]
<zipper>
So blocks, lamdas all very fuzzy
brennanMKE has joined #ruby
tatsuya_o has joined #ruby
<volty>
not fuzzy at all -- just think in terms of methods
sepp2k has quit [Quit: Leaving.]
<zipper>
readlines is a method of file objects? This is the first I'm hearing of it.
jkhwan has quit [Ping timeout: 272 seconds]
|jemc| has quit [Ping timeout: 246 seconds]
dhilipsi_ has joined #ruby
tonni_ has joined #ruby
kayloos_ has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
platzhirsch has left #ruby [#ruby]
jkhwan has joined #ruby
<volty>
a = [1,2,3]; a.map { |i| i * i } <=> def mult_self(i); i * i; end; i = 0; result =[]; while i < a.length; result.push(mult_self(a[i]); i += 1; end
burlyscudd has joined #ruby
thams_ has joined #ruby
<zipper>
volty: In the following:
<zipper>
File.open(file_name).each_with_index { |i, ln|Ireturn ln if i == line_numberI}
palms has quit [Ping timeout: 272 seconds]
musl_ has joined #ruby
<zipper>
where did line number come from?
[Neurotic]_ has joined #ruby
aapzak has quit [Read error: Connection reset by peer]
Ivo has quit [Quit: WeeChat 0.4.2]
<zipper>
and these "I" chars?
strax_ has joined #ruby
brennanMKE has quit [Ping timeout: 268 seconds]
opus has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tatsuya_o has quit [Ping timeout: 252 seconds]
ohcibi_ has joined #ruby
<volty>
from your func header ( find_line(file_name, line_number) )
earthquake has joined #ruby
<volty>
each_with_index calls the block (proc) with two params: the index (the line number) and the line itself
pyrac has quit [Quit: pyrac]
RichardBaker has joined #ruby
<zipper>
so that LOC runs inside my function? I thought it was on its own
dhilipsi_ has quit [Ping timeout: 245 seconds]
notjohn has quit [Quit: notjohn]
[Neurotic] has quit [Disconnected by services]
Blue_Ice_ has joined #ruby
kpmjf_ has joined #ruby
[Neurotic]_ is now known as [Neurotic]
DrForr_ has joined #ruby
TheNumb_ has joined #ruby
Boohbah_ has joined #ruby
tskogber1 has joined #ruby
framling_ has joined #ruby
nw_ has joined #ruby
<volty>
think of it as an anonymous-on-fly-method
drowl_ has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.1]
mary5030 has quit [Remote host closed the connection]
nowthatsamatt has joined #ruby
aapzak has joined #ruby
zeropx has quit [Quit: has left the room … Or did he?]
yfeldblum has quit [Ping timeout: 245 seconds]
unholycrab has joined #ruby
<zipper>
Thanks, I believe I'm good now.
zipper has quit [Quit: leaving]
c0rn_ has joined #ruby
brunto_ has joined #ruby
clocKwize_ has joined #ruby
sam113101 has joined #ruby
bretolius has joined #ruby
Synapsis has joined #ruby
toromaki has joined #ruby
unholycrab has quit [Quit: Changing server]
unholycr1b has joined #ruby
kayloos has quit [*.net *.split]
tonni has quit [*.net *.split]
narcan has quit [*.net *.split]
dhilipsiva has quit [*.net *.split]
reset has quit [*.net *.split]
thams has quit [*.net *.split]
sam113101_ has quit [*.net *.split]
jalcine has quit [*.net *.split]
devdazed has quit [*.net *.split]
joonty has quit [*.net *.split]
Bofu2U has quit [*.net *.split]
mfridh has quit [*.net *.split]
DrOwl has quit [*.net *.split]
clocKwize has quit [*.net *.split]
Inoperable has quit [*.net *.split]
freakazoid0223 has quit [*.net *.split]
flayer has quit [*.net *.split]
framling has quit [*.net *.split]
TheNumb has quit [*.net *.split]
tskogberg has quit [*.net *.split]
Boohbah has quit [*.net *.split]
gen0cide_ has quit [*.net *.split]
robawt has quit [*.net *.split]
mattp_ has quit [*.net *.split]
smlgs has quit [*.net *.split]
kpmjf has quit [*.net *.split]
nw has quit [*.net *.split]
strax has quit [*.net *.split]
Lorn has quit [*.net *.split]
brunto has quit [*.net *.split]
oddraisin has quit [*.net *.split]
DrForr has quit [*.net *.split]
juo has quit [*.net *.split]
musl has quit [*.net *.split]
bret has quit [*.net *.split]
Blue_Ice has quit [*.net *.split]
ohcibi has quit [*.net *.split]
drowl_ is now known as DrOwl
thams_ is now known as thams
bretolius is now known as bret
Synapsis is now known as Inoperable
unholycr1b is now known as holycrab
clocKwize_ is now known as clocKwize
pragmatism has joined #ruby
harumph has joined #ruby
toromaki is now known as gen0cide_
c0rn has quit [Read error: Operation timed out]
flayer has joined #ruby
gen0cide_ has quit [Remote host closed the connection]
jibi has quit [Quit: .]
juo_ has joined #ruby
flayer has quit [Changing host]
flayer has joined #ruby
<holycrab>
volumes.each_pair{|key,value|puts "#{key} is #{value.class()}"} => volume_index is Hash