Topic for #ruby-lang is now Ruby 1.9.3p0: http://ruby-lang.org | Paste >3 Lines of Text on http://pastie.org
Banistertab joined #ruby-lang
havenn joined #ruby-lang
tomzx joined #ruby-lang
butchanton joined #ruby-lang
mrsolo left #ruby-lang
phlipper_ joined #ruby-lang
ryanf joined #ruby-lang
Banistertab joined #ruby-lang
wyhaines joined #ruby-lang
Banistergalaxy joined #ruby-lang
yfeldblum joined #ruby-lang
fridim_ joined #ruby-lang
mnoble joined #ruby-lang
mnoble left #ruby-lang
chessguy joined #ruby-lang
saLOUt joined #ruby-lang
reset joined #ruby-lang
nuclearsandwich joined #ruby-lang
igotnolegs joined #ruby-lang
io_syl joined #ruby-lang
zedUNDginger joined #ruby-lang
rmascarenhas joined #ruby-lang
ilyam joined #ruby-lang
edwardsharp joined #ruby-lang
zmack joined #ruby-lang
brianpWins joined #ruby-lang
zedUNDginger joined #ruby-lang
ilyam joined #ruby-lang
dhruvasagar joined #ruby-lang
darkf joined #ruby-lang
queequeg1 joined #ruby-lang
s0ber joined #ruby-lang
_inc joined #ruby-lang
tenderlove joined #ruby-lang
Marco joined #ruby-lang
uniqanomaly_ joined #ruby-lang
marcostoledo joined #ruby-lang
<masterkorp> you like ? made in lunch breaks
<rue> Damn, kids
Axsuul joined #ruby-lang
<erikh> spell check.
<rue> Adults born in the 90's should be illegal.
<erikh> I like the fonts but some of hte colors don't mesh with the background.
<erikh> rue: we're just crusty old men
<erikh> also, you don't need semicolons in that shell snippet
<shevy> ewww
<shevy> shell stuff
<erikh> I wish someone would make a music video parodying eddie murphy's "party all the time"
<erikh> only s/party/ruby/
cantonic joined #ruby-lang
<erikh> I mean it'd be only slightly less nerdy than the free software song
<erikh> also this: http://meowmania.jqln.org/
<shevy> there is a free software song?
<ChloeD> yeah
<ChloeD> "join us now and share the software..."
<ChloeD> based on the classical "sadi moma" tune
Marco joined #ruby-lang
macmartine joined #ruby-lang
dhruvasagar joined #ruby-lang
achamian joined #ruby-lang
perryh joined #ruby-lang
dhruvasagar joined #ruby-lang
krz joined #ruby-lang
ecin joined #ruby-lang
nuclearsandwich joined #ruby-lang
cschneid joined #ruby-lang
Weems joined #ruby-lang
<cschneid> Can somebody recommend a lightweight irc bot library? I'd prefer it to be relatively small, and stay out of my way if possible.
resetexistence joined #ruby-lang
<rue> Matzbot?
<theconartist> cinch
<dominikh> yeah, cinch.
<dominikh> it'll stay out of your way if you know ruby
<cschneid> cool - thanks.
zedUNDginger joined #ruby-lang
dhruvasagar joined #ruby-lang
zedUNDginger joined #ruby-lang
Pip joined #ruby-lang
hagabaka joined #ruby-lang
dhruvasagar joined #ruby-lang
zedUNDginger joined #ruby-lang
spuk joined #ruby-lang
ryanf joined #ruby-lang
dhruvasagar joined #ruby-lang
bhrgunatha joined #ruby-lang
zedUNDgi_ joined #ruby-lang
zedUNDginger joined #ruby-lang
dhruvasagar_ joined #ruby-lang
<zedUNDginger> dhruvasagar_: http://i.imgur.com/BYYse.jpg
<dominikh> zedUNDginger: that is the kind of stuff that, quite frankly, should get you banned from this place.
<zedUNDginger> dominikh: remember to tell frank when he's online
<dominikh> oh, I have other people in mind to tell about this, don't worry.
<injekt> zedUNDginger: dude really?
<zedUNDginger> dominikh: remember to fill out the form correctly when you hand it to the principle
slyphon joined #ruby-lang
slyphon joined #ruby-lang
dhruvasagar joined #ruby-lang
<slyphon> man
<zedUNDginger> principal*
<slyphon> fuck haskell
* slyphon just read the wikipedia article on monads
<slyphon> what a bunch of weenies
Marco joined #ruby-lang
dr0id joined #ruby-lang
the_great_cornho joined #ruby-lang
brianpWins joined #ruby-lang
laszlokorte joined #ruby-lang
<andrewvos> wtf is this?
<andrewvos> warning: imgur link above contains naked fat guy.
<the_great_cornho> thanks
<zedUNDginger> andrewvos: btw, you hsould check out 'who's afraid of virginia woolf'
<zedUNDginger> andrewvos: young elizabeth taylor vs youngish richard burton
<rue> andrewvos: That's the part you found offensive?
<rue> zedUNDginger: Told you, you need your hangout channel… clean it up OR ELSE
<rue> Shoulda clearly gone to bed. My decision to stay up because I've a race in the morning was clearly a bit misguided
<zedUNDginger> rue: do you have a punishment under that white lace?
<rue> Sure do
<zedUNDginger> spank me with a mechanical corset
mqt joined #ruby-lang
<rue> That sounds really ineffective
<zedUNDginger> rue: why did you think it was a good idea to stay up all night before the race?
<zedUNDginger> r u playing chariots of fire on repeat
seydar joined #ruby-lang
<seydar> ahoy
<seydar> not a ruby question, but a general programming one
<seydar> how do i determine the red, green, and blue for a color gradient?
<zedUNDginger> seydar: google for linear interpolation
<dominikh> tbh, the RGB system isn't the easiest for color gradients
<seydar> dividing the max number (0xFFFFFF or for me 0xFF0000) doesn't work
<seydar> dominikh: yeah that's what i'm discovering
<seydar> zedUNDginger: thank you, i will
<dominikh> seydar: you might enjoy HSL/HSV more
<shevy> what
<shevy> HIV
<seydar> dominikh: ah, i saw that listed as an option but didn't know what it was
<samuelkadolph> Nice one
<drbrain> OOPS!!!
<injekt> sure about that?
<samuelkadolph> Butterfingers
<injekt> haha
<drbrain> tricky space bar
<injekt> those space bars!
<seydar> drbrain: ...
<rue> Group psychology
was kicked by drbrain: zedUNDginger
<injekt> lol
<shevy> lol
<seydar> so confused at what is happening
<injekt> unexpected naked dudes are not cool, amirite
<andrewvos> You are correct.
<mksm> yeah only chicks are ok
<mksm> :D
<shevy> overweight chicks for mksm
<drbrain> injekt: you can cut that down to "naked is not cool"
<injekt> drbrain: true this
<injekt> 'unexpected naked is not true, amirite'
<seydar> dominikh: to be clear, gradients in RGB are difficult and i'm not just being stupid?
<injekt> true?
<injekt> shit I've been writing too much ruby today
<andrewvos> Still, no need to ban EVERYONE.
<seydar> injekt: what drbrain meant to say was "naked is awesome"
<shevy> every gradient surely follows some pattern
<drbrain> seydar: yes, naked is awesome, but not in this channel
<dominikh> seydar: well, they're possible, but harder than necessary, yes. they're easy if you have to gradiate between two base colors though. so red->green is easy, e.g.
<rue> There's #nudie
<injekt> oO
<rue> (That's the sound of a thousand IRC clients joining a channel)
<seydar> actually it's just me there
<shevy> I don't go into channels advertized by rue
<shevy> but he follows me :(
<seydar> hahaha
<andrewvos> shevy: Not since last time. *shudder*
<rue> Oh come on, it wasn't that bad
<rue> A little spaghetti and everyone goes crazy
* andrewvos stares off into the distance, with a dead look in his eyes.
<seydar> i heard rue once led someone into a channel so dark that he was kicked out of north america
<seydar> and that's why he's in finland
<seydar> <insert dark in here you are likely to be eaten by a rue joke/>
<shevy> finland is dark
<rue> 'Tis
<rue> Sun 8:59-15:16 today.
<rue> Eww, +2. A little chilly
<seydar> isn't it like 5AM for you?
mksm joined #ruby-lang
<dominikh> certainly is for me :/
<rue> Almost 6
<seydar> why are you still up
<rue> I've a race in a couple hours
Marco joined #ruby-lang
<seydar> do you always not sleep before races?
<seydar> Marco: what year are you
<seydar> Marco: slash do you know prof jayanti
mksm joined #ruby-lang
duckydwaarf joined #ruby-lang
<seydar> rue: why do you choose to go sleepless the night before races?
<rue> Incurable stupidity?
<seydar> dominikh: thank you so much, i have a nice lil two-base gradient
x0F_ joined #ruby-lang
<seydar> rue: you're not the first person to do that. kid in my ROTC unit last year would do that
<rue> I am too the first!
<rue> No-one shall take the glory
<seydar> i'm sorry you're the first
<rue> Indeed.
<dominikh> seydar: glad I could help
aasmith joined #ruby-lang
laszlokorte left #ruby-lang
<Marco> seydar: 14
m0wfo joined #ruby-lang
<Marco> seydar: no, I don't
macmartine joined #ruby-lang
phlipper joined #ruby-lang
snafoo joined #ruby-lang
snafoo joined #ruby-lang
EvilJStoker joined #ruby-lang
<seydar> Marco: unfortunately you have now given away a lot of personal information, but your secret is safe with me
<seydar> Marco: do you know any kids who went to highschool in hanover?
<seydar> i'm gonna freak him out in the spring
<seydar> i'll pretend i've been stalking him for 8 months
tenderlove joined #ruby-lang
<rue> Good plan
heftig joined #ruby-lang
RomyEatsDrupal joined #ruby-lang
<RomyEatsDrupal> hi room… hope you all are well. i wrote a ruby code, then tried to call it in rib via "require file.rb" or "-r file.rb" but i get the following error:
<RomyEatsDrupal> SyntaxError: compile error
<RomyEatsDrupal> (irb):1: syntax error, unexpected tIDENTIFIER, expecting $end
<RomyEatsDrupal> require file.rb
<RomyEatsDrupal> ^
<RomyEatsDrupal> from (irb):1
<RomyEatsDrupal> >> exit
<RomyEatsDrupal> Help would be appreciated, thank you.
<lianj> require 'file.rb'
<rue> Drop the .rb, too. If you just write require file.rb it assumes file is an identifier, to which you're sending the method rb
<rue> Whereas "file.rb" is a String
<RomyEatsDrupal> Thank you, lianj , it worked when i wrapped it in single quotes and took out the .rb
shevy joined #ruby-lang
kitallis joined #ruby-lang
<RomyEatsDrupal> hm…. i am running into problems still. it appears that require 'file' doesn't work on some files
<RomyEatsDrupal> so i bought the book 'ruby by example' by kevin baird, typed up one his examples, tried invoking that file via IRB, which didn't work, so i actually downloaded the source code and tried to do require on his code, but i ran into the following error:
<RomyEatsDrupal> irb(main):001:0> require '1_99bottles'
<RomyEatsDrupal> LoadError: cannot load such file -- 1_99bottles
<RomyEatsDrupal> from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
<RomyEatsDrupal> from (irb):1
<RomyEatsDrupal> from /usr/bin/irb:12:in `<main>'
<shevy> where is the file "1_99bottles.rb"
<RomyEatsDrupal> in the directory from which i ran the Irb
<RomyEatsDrupal> if it would help you all, i would be happy to provide you a join.me screenshare code so you can see how i'm trying to do this, so long as you don't laugh too hard at my girlish terminal
<RomyEatsDrupal> weird...
<shevy> RomyEatsDrupal, if you start irb from the directory, from which that .rb file is
<shevy> then "require 'name_of_rb_file.rb'" will work
<shevy> I don't know what is join.me, but require 'foobar.rb' works in my IRB here
<shevy> RomyEatsDrupal you can also try the absolute path to it
<shevy> require "/bla/ble/1_99bottles.rb"
<RomyEatsDrupal> will try once more
<lianj> shevy: "if you start irb from the directory, from which that .rb file is"
<lianj> he uses 1.9. it will not work
<RomyEatsDrupal> join.me is a screen sharing utility BTW
<lianj> -I. is needed
<shevy> ah
<RomyEatsDrupal> *she :P
<RomyEatsDrupal> Ruby coders are girls too
<lianj> pssh, there a no girl on irc
<shevy> lianj, but using -I not from within a .rb script or?
<RomyEatsDrupal> i'm usually the only girl in tech meet ups, sigh
<RomyEatsDrupal> i'm the only girl in linux meet ups… and sys admin meet ups :(
<lianj> pssh
<lianj> shevy: no, on commandline
<RomyEatsDrupal> so lianj how would i get it to work? require -l ?
<shevy> :(
<shevy> I feel old and outdated with my 1.8.x
<lianj> no but irb -I. -rfoo
<lianj> shevy: you are :)
<RomyEatsDrupal> shevy: i was sticking with 1.8 forever until I purchased the book 'The Well Grounded Rubyist' which requires 1.9
<RomyEatsDrupal> so I finally downloaded 1.9… took FOREVER with my Debian virtual machine because the maintainers of Debian/Ruby have some issues, sigh...
<RomyEatsDrupal> irb -l
<RomyEatsDrupal> from /usr/lib/ruby/1.9.1/irb/init.rb:18:in `setup'
<RomyEatsDrupal> from /usr/lib/ruby/1.9.1/irb.rb:53:in `start'
<RomyEatsDrupal> from /usr/bin/irb:12:in `<main>'
<RomyEatsDrupal> more errorz :(
<shevy> hmm
<lianj> "I" not "l"
<shevy> hehe
<RomyEatsDrupal> capitol i as in igloo?
<shevy> you didn't do a capital i there
<lianj> RomyEatsDrupal: heh, yes
<shevy> hmm lianj, would require "./foobar.rb" work?
<lianj> shevy: yes
<RomyEatsDrupal> error message :
<RomyEatsDrupal> irb(main):002:0> require '1_99bottles'
<RomyEatsDrupal> LoadError: cannot load such file -- 1_99bottles
<RomyEatsDrupal> from /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
<RomyEatsDrupal> from (irb):2
<shevy> ah ok
<RomyEatsDrupal> from /usr/bin/irb:12:in `<main>'
<lianj> echo "p :hello" > hi.rb; ruby -I. -e 'require "hi"'
<shevy> RomyEatsDrupal did you try require './1_99bottles.rb' too?
<lianj> echo "p :hello" > hi.rb; ruby -e 'require "./hi.rb"'
<RomyEatsDrupal> shevy: will do that now
<RomyEatsDrupal> shevy: that worked!
<RomyEatsDrupal> eugh! does that mean something is configured incorrectly?
<RomyEatsDrupal> i am highly averse to the idea of having to type out the ./ all the time :(
<RomyEatsDrupal> <------- linux n00b
<shevy> RomyEatsDrupal it probably just means that 1.9.x is using a different approach now, compared to 1.8.x
<lianj> shevy: no
<RomyEatsDrupal> i am using two Ruby books, one for 1.9 and one for 1.8
<lianj> RomyEatsDrupal: you just have to understand how require work. ie, how it looks for files
<ryanf> yes, it's because 1.9 no longer keeps . in the load path
<ryanf> require './filename' is wrong though
<ryanf> it will only work as long as you start the script from the directory it's in
<shevy> why? on linux it works the same
<lianj> require looks for the file inside all directory that are in ruby -e 'p $LOAD_PATH'
<shevy> aha
<shevy> it won't work with the full, absolute path?
<lianj> 1.9 stop putting "." inside your $LOAD_PATH
<lianj> thats why you can/must add it via -I. for example
<ryanf> it's better to use require_relative or else require File.expand_path('../filename', __FILE__)
<ryanf> the former is only 1.9, latter is backwards compatible with 1.8
<lianj> or that ^
<RomyEatsDrupal> lianj: so every time i fire up IRB i have to do irb -I?
<ryanf> obviously require_relative is nicer
<shevy> hmm
<ryanf> RomyEatsDrupal: no, you should just not expect . to be in the load path
<shevy> require_relative reads nicer than File.expand_path
hagabaka joined #ruby-lang
hagabaka joined #ruby-lang
<RomyEatsDrupal> ryanf: i'm new to the Linux system, so I guess when you say load path I'm kind of confused
<ryanf> if you really want it there you can just put $:.unshift('.') at the top of your file, but they took it out for a reason
<ryanf> sorry
<ryanf> the load path is the list of places ruby will look for a file when you use require
<RomyEatsDrupal> <--------- is a super tech n00b girl
<ryanf> in 1.8, that list includes the directory you're in
<ryanf> but in 1.9 it doesn't, because it's unpredictable
<RomyEatsDrupal> wow
<lianj> $:.unshift(File.expand_path('.'))
<ryanf> it means that if you run a script that's like ~/bin/my_script.rb, but it requires a file that also happens to exist in the directory you're in, stuff breaks
<ryanf> or has security issues
<ryanf> yeah lianj that is better
<shevy> security hmm
<RomyEatsDrupal> so when i am running examples from 1.8 and 1.9 , what would be the best, most uncomplicated way to require files?
<shevy> :)
<ryanf> I'd probably just put lianj's last message at the top of your file tbh
<ryanf> not a good idea for "real" code, but for just doing examples it's not going to hurt anything
<shevy> it reads ugly though
Marco joined #ruby-lang
<RomyEatsDrupal> ah, i see. so maybe i should have lianj 's code snippet pasted on my desktop at all times? so i can just paste that into my files?
<bnagy> I usually do require File.dirname(__FILE__) + '/something'
<bnagy> still ugly, but at least you know what's going on
<shevy> yeah I like that one a bit more
<lianj> i like -Ipath/where -Irequire/should -Ilook/in
<RomyEatsDrupal> bnagy: you mean i just type 'rib' and then require File.dirname(__FILE__) + '/myrubyscript' ?
<RomyEatsDrupal> sorry, IRB. stupid autocorrect
tallship joined #ruby-lang
<bnagy> yes
<lianj> RomyEatsDrupal: just do irb -I. and then require 'yourscript'
<bnagy> well that means the user has to know to run the interpreter with the correct -I args, which I don't like, personally
<bnagy> but yeah it's not really tht big a deal
<lianj> File.dirname('(irb)') + '/foo' is funny too. then you can just do './foo'
<lianj> shevy wins!
<lianj> but should still move to 1.9 ;)
<shevy> lianj, I have my masterplan ready
<shevy> all my german umlauts will be moved into a standalone yaml file
<RomyEatsDrupal> thanks, guys! :D i guess the easiest thing for me to do, for now is just type the -I when I fire up IRB
<lianj> for 2012?
<shevy> for the time being, I will then just ignore that file
<RomyEatsDrupal> IRB -I
<shevy> lianj, nah, I tested it. the yaml issue is the last thing that prevented me from switching
<shevy> so when my yaml files are correct, all my config things work, so I can switch!!!
<lianj> shevy: yea, but it was no ruby issue :)
<shevy> oh damn
<shevy> its 03.12.2011, you are right, that will be close ...
<shevy> well, perhaps early 2012 then ;)
Dreamer3 joined #ruby-lang
<RomyEatsDrupal> anywayz… did anyone here ever check out the book 'Well Grounded Rubyist'? it has the most awesome illustration on the cover (though I bought it b/c it was backed up with stellar reviews… that and it was Black Friday and Barnes n Nobles had sent me 30% off and I decided to treat myself to an awesome Ruby book versus clothes :P)
<mitchty> day month year /twitch
<lianj> RomyEatsDrupal: or try: echo 'require "irb/autocompletion"; $:.unshift(Dir.pwd)' >> $HOME/.irbrc
<RomyEatsDrupal> hmmm
<RomyEatsDrupal> sounds risky
<shevy> hehehe
<shevy> RomyEatsDrupal, press the red button
<lianj> trust me :)
<RomyEatsDrupal> i feel… risky
<RomyEatsDrupal> lol
<RomyEatsDrupal> alright
<RomyEatsDrupal> done
<shevy> >> means "append"
<RomyEatsDrupal> now what?
<shevy> now you should have a .irbrc file in your home directory
<RomyEatsDrupal> oh yes, i've used that before :D
<shevy> and that should be loaded every time you start IRB
<RomyEatsDrupal> so i don't have to type the -I each time i start IRB?
<lianj> ok. now your irb has autocompletion, try pressing <tab>, AND the -I. thing is done automatically
<shevy> hopefully not, but ask lianj
<RomyEatsDrupal> hm, it looks like the -I is automatic, but the tab autocompletion doesn't seem to work
<RomyEatsDrupal> ahh… you think it's because i need to open up a new terminal?
<shevy> hmm
<shevy> type "Di"
<shevy> then press the TAB key
<shevy> any result?
<RomyEatsDrupal> i know sometimes when one makes edits, they need to fire up a new session
<shevy> well restart irb hehe
<RomyEatsDrupal> hehe
<shevy> but that with the TAB key *should* work
<shevy> there was once a kind of ruby-shell, which used ncurses, and had coloured drop-down boxes, which you could navigate to select what you wanted
<RomyEatsDrupal> aaaahhhhhhh……. here are my observations
<RomyEatsDrupal> it worked!!!! but it appends a ./ before the file name! :)
<shevy> hmm
<shevy> see what you did there lianj
<imperator> bnagy, ping
<bnagy> imperator: morning
<lianj> shevy: made her somewhat more happy :D
<RomyEatsDrupal> lianj: that you did :)
<RomyEatsDrupal> i am sitting here grinning !
<imperator> bnagy, where you at again?
<imperator> "RomyEatsDrupal" - interesting username
<RomyEatsDrupal> i am having so much fun teaching myself ruby. i'm located in NYC but instead of going out Friday night I decided to have the most awesome exciting Ruby date with myself and my two new Ruby books :D :D
<shevy> imperator I always have to think of star wars when I read your nick
<RomyEatsDrupal> Yeah, i"m an active member of the New YOrk Drupal community
<lianj> RomyEatsDrupal: did you try the autocompletion? enter irb. in there type "1." then press tab twice. it will show you all methods that the number "1" allows you to call
<imperator> well I went out AND came back and coded ruby! nyah!
<RomyEatsDrupal> that's me!
<imperator> beer #3
<RomyEatsDrupal> i delivered a talk in Los Angeles Drupal this past august
<RomyEatsDrupal> i designed that website too.. but the front end developer did NOT do a job coding it… sigh
<RomyEatsDrupal> imperator: i went out too… i attended in AWESOME talk on Data Visualisation
<RomyEatsDrupal> as usual i was the only girl in the room again
<imperator> data visualization...saw a cool TED talk on that i think
<mitchty> the swedish professor guy?
<shevy> what
<RomyEatsDrupal> thank you, lianj :D
<shevy> swedish professor guy???
<lianj> nice picture and food taste
<mitchty> forgot his name
<shevy> oh
<mitchty> hans rosling
<imperator> yeah, i think that's the one
<RomyEatsDrupal> lianj: when i enter IRB and type 1 and press tab twice, i get, actually a listing of ALL my ruby files in my directory, but with a ./ in front of each file
<shevy> hmm
<RomyEatsDrupal> thanks… that pic of me was earlier, taken in California
<shevy> wait
<shevy> "1" or "1."
<imperator> RomyEatsDrupal, yes, but, did you have beer?
<RomyEatsDrupal> imperator: beer where?
<RomyEatsDrupal> you should see my 99bottles ruby script
<imperator> at the data visualization talk!
<RomyEatsDrupal> every time i write those scripts, i always change "Beer" to "milk"… because i NEVER drink beer :D
<shevy> what, do you visualize beer
<imperator> bnagy, gonna add trollop as a dev dependency
<RomyEatsDrupal> trollop is an awesome word
<RomyEatsDrupal> my friends and i use to call each other that
<RomyEatsDrupal> now we just call each other s**** and s******
<imperator> shevy, my nick reminds you of star wars?
<shevy> yeah imperator
<shevy> that evil guy... not the one with the black mask, the old man
<RomyEatsDrupal> but no imperator i didn't have any beer… afterwards i ate falafels , went to a cafe, and started to read ruby. then i got sleepy, took the subway home, and got confused while doing ruby scripts inside the subway lol… decided i was going to hit you guys up when i arrived back into the apartment
<RomyEatsDrupal> where is everyone located, by the way?
<shevy> I actually think I never watched any of the star wars movie to the end
<shevy> but I <3 some of the quotes
<shevy> "I am your father"
<lianj> use the source!
<mitchty> http://starwars.wikia.com/wiki/Imperial_I-class_Star_Destroyer i'm feeling lucky search for star wars imperator
<imperator> RomyEatsDrupal, hipster status confirmed
<shevy> <--- Europe, Austria, Vienna
* RomyEatsDrupal =! hipster
<shevy> lianj, oh ... yoda ... yoda speak is great too
<RomyEatsDrupal> not a hipster!!! i am NOT a hipster at all!
<RomyEatsDrupal> I am the UberNerdDorkGeekQueen
<shevy> nah
<RomyEatsDrupal> ja, ja, ja… ich bin
<imperator> lives in NYC? check. Eats Falafels? check. Doesn't drink beer? check. Writes code? check.
<shevy> there was ... what was the name... "uberfrau" here in #ruby-lang
<shevy> lianj's best friend ;)
<lianj> shevy: naaah, dont remind me of her
<imperator> j/k
<shevy> haha
<RomyEatsDrupal> imperator: yeah, but i don't go to bars or live shows or things like that
<RomyEatsDrupal> literally i am a fuc*ing insane Ruby lunatic right now
<RomyEatsDrupal> as soon as I wake up, i open my ruby book
<lianj> :)
<shevy> hmm
<RomyEatsDrupal> while making breakfast, i'm reading the ruby books. on the subway i read ruby and type furiously on the terminal
<shevy> I had that with Pickaxe for a while
<RomyEatsDrupal> late at night I climb into bed lovingly with the Ruby books
<shevy> what the
<imperator> i'm getting a little creeped out here
<lianj> ^^
<RomyEatsDrupal> lianj: if i type in 1. and then hit tab twice, nothing happens :(
<shevy> oh
<RomyEatsDrupal> get used to it
<RomyEatsDrupal> i'm a f*ing freak
<shevy> continue RomyEatsDrupal!!! imperator is chickening out
towski joined #ruby-lang
<RomyEatsDrupal> yes, I have "naughty" thoughts of Ruby, also
<lianj> RomyEatsDrupal: hm, no autocompletion huh? :( not sure why not
<RomyEatsDrupal> nobody believes me except for my best friends. they know how obsessed I am with Ruby and learning programming
<imperator> mitchty, so cool looking; star wars has one of the best openings in cinematic history imo
<imperator> RomyEatsDrupal, ok, we believe you
<RomyEatsDrupal> currently I am teaching myself Ruby, Lisp, and Java
<imperator> now put away the caffeine
<shevy> the star wars theme is nice
<RomyEatsDrupal> check out my twitter, all i talk about is ruby or hacking things
<lianj> yea, dont become uberfrau_twp
<shevy> but I always found star wars as a whole weird
<lianj> *two
<RomyEatsDrupal> lianj: no autocompletion :(
<shevy> the really cool thing about ruby is matz
<RomyEatsDrupal> it would've been nice to have autocompletion in IRB
<RomyEatsDrupal> oh, i speak Japanese ! :D
* RomyEatsDrupal is proud she taught herself Japanese
<imperator> shevy, yes and no
<RomyEatsDrupal> now I am speaking Rubynese
<shevy> hehe
<shevy> imperator you mean, when he says "no" :)
<shevy> his english got better!
<imperator> shevy, not really what i meant, but i think my criticisms are well known :)
<shevy> but he seems to think in japanese, and then translates this into english
<shevy> imperator, hmm not sure ... you once had your own language rolling for a while or?
<imperator> yeah
<shevy> I mean, I am used to that a bit, in #io they tend to talk about other languages a lot more than about Io these days
<shevy> imperator hmm you don't happen to have put your criticisms into a text that can be read online by chance, do you? :)
<shevy> *have you, rather than do you
<imperator> still up on livejournal somewhere, though i haven't blogged there in a while
<shevy> okies
<RomyEatsDrupal> do you guys have twitter?
<RomyEatsDrupal> or websites?
<imperator> twitter? what's that?
<RomyEatsDrupal> i have a github! :D <------ is proud
<RomyEatsDrupal> but no repositories of my own yet :)
<imperator> take some of mine
<RomyEatsDrupal> my github username is "syntactic sugar"
<shevy> github yeah... twitter ... I tried to... but somehow I am too lazy to twitter anything
<shevy> github made me start to use git though, which is kinda weird feeling...
<lianj> heh, i think shevy hold a record for longest no repo on github account
<RomyEatsDrupal> all i EVER talk about is nerd stuff
<imperator> ever?
<shevy> lianj I think I actually registered two ...
<lianj> shevy: hihi
<imperator> RomyEatsDrupal, you taught yourself japanese? you kinda look...japanese
<shevy> lianj but yeah, took me a long time to get started with git actually. at first I just wanted to follow people doing things on github :)
* imperator has a love/hate relationship with git
<RomyEatsDrupal> i speak, in order of fluency, English, Spanish, Korean, Japanese, French, Farsi, und bisschen Deutsch :)
joshfng joined #ruby-lang
<imperator> local repo out of sync? fuck it, delete and reclone!
<mitchty> one of my coworkers managed to squash his entire git repo back to one commit
<imperator> oh lord
<duckydwaarf> Imperator just reset --hard noob
<lianj> ^^
<imperator> people are always fucking with the commit tree
<imperator> that drove me nuts
<mitchty> he was writing a script to squash his branches automatically
<mitchty> was on master though
<shevy> RomyEatsDrupal that would confuse me to no ends
Weems joined #ruby-lang
Weems joined #ruby-lang
<lianj> RomyEatsDrupal: come to the ccc congress and learn some more
<RomyEatsDrupal> omg!!!! i would LOOOOVE to go to CCC congress!
<RomyEatsDrupal> look!
<RomyEatsDrupal> brb
<RomyEatsDrupal> look at my github!
<RomyEatsDrupal> the "company" part!!!!!!
<lianj> hehe
<imperator> duckydwaarf, i can never remember the command
<RomyEatsDrupal> lianj: where are you?
<RomyEatsDrupal> are you in Germany?
<lianj> its in 23 days :>
<RomyEatsDrupal> i soooooooo wanted to go t CCC
<shevy> why reset --hard when rm -rf .git is available!!!
<lianj> yes
<RomyEatsDrupal> but i lost my passport
<RomyEatsDrupal> ich verstehe und bisschen Ruby :)
<RomyEatsDrupal> ich verstehe und bisschen Linux
<imperator> ein
<shevy> ich verstehe ein bisschen Ruby
<shevy> und = and
<RomyEatsDrupal> oops :P
ryanf joined #ruby-lang
<shevy> RomyEatsDrupal do you understand ... what is a dwit-dollyo chagi ?
Defusal joined #ruby-lang
Defusal joined #ruby-lang
<RomyEatsDrupal> nein.
<RomyEatsDrupal> i recognize it sounds korean but i would have to hear it spoken
<dr0id> ihiu dwef defoij lkoewf wefojo
<heftig> いいえ。
<dr0id> ¡¡¡
<RomyEatsDrupal> çççççç
<shevy> I can't read those characters :(
<dr0id> ¿¿¿¿
<imperator> bnagy, take a look at how i've set things up
<heftig> おやすみなさい
<RomyEatsDrupal> lianj: where in germany do you live?
<RomyEatsDrupal> i have a friend who lives in Hamburg
<dr0id> ‏‎夜の友™
<heftig> i can't read kanji :(
<RomyEatsDrupal> lianj.location.print
<shevy> lol
<dr0id> 'japan'
<lianj> RomyEatsDrupal: ruhrpott
<postmodern> is it possible to get OptionParser to pass invalid options to a special callback to handle them?
setmeaway joined #ruby-lang
<postmodern> or is there an option parsing library that supports callbacks for unrecognized options?
<imperator> oh, korean not japanese, my bad
<shevy> perhaps injekt slop
<RomyEatsDrupal> & what are you, imperator
<RomyEatsDrupal> imperator.ethnicty.print.now
<imperator> postmodern, would that callback always be "unrecognized option" ?
<imperator> *wouldn't*
<imperator> RomyEatsDrupal, german and polish
<bnagy> imperator: sorry my screen died, I thought things had just gone quiet :/
<RomyEatsDrupal> imperator.ethnicity.is_equal?(something_boring) puts "boooooring" : "Siberians are an interesting people"
<postmodern> imperator, in my case, i want to support doing dynamic parsing of options
<postmodern> imperator, think method_missing for --options
<bnagy> did you check out trollop?
<postmodern> imperator, just pass it argv and let the callback pop things off
<bnagy> I think it lets you get at its underlying parse method
<postmodern> bnagy, briefly, let me check
<imperator> bnagy, didn't look at it, just noticed it inside the one program
<imperator> RomyEatsDrupal, my ethnicity is boring? well, here, quick, let me alter it to something cooler
<bnagy> although it doesn't have a 'just leave it in ARGV if you don't fricking understand it' switch
<imperator> look, now i'm basque, with a dash of flemish!
<bnagy> imperator: yeah I was going to mention about the trollop thing, but you already did it
<bnagy> imperator: why would you pick the two laughing stocks of europe for your ficticious race? :)
<imperator> postmodern, i dunno man, sounds fraught with danger
<bnagy> although that one guy left if etta is pretty scary I guess
<bnagy> *in
<imperator> bnagy, sssh, i'm trying to be cool here
<RomyEatsDrupal> bnagy: don't hate just b/c you're jealous
<RomyEatsDrupal> anyone from New York here?
<RomyEatsDrupal> or… Southern California?
<imperator> francis hwang is from nyc i think, though i haven't seen him around in a while
<RomyEatsDrupal> I'm going home to SoCal in a couple weeks and I want to meet up with Ruby coders to have some fun hack nights
<RomyEatsDrupal> oh, i recognize that name
<RomyEatsDrupal> i saw him at the Nyc.Rb meetup
<imperator> RomyEatsDrupal, big nyc ruby group i thought
<RomyEatsDrupal> we were looking at each other
<RomyEatsDrupal> yep, big group
<RomyEatsDrupal> i think it was b/c we both were guessing the other was Korean
<imperator> i thought gregory brown was up there, too
<RomyEatsDrupal> who's that?
<RomyEatsDrupal> generally, i was not as enthused at the Ruby meet ups… people are kind of cliquey
<shevy> I think he wrote some pdf-thingy in ruby
<RomyEatsDrupal> only a few people came up to talk to me :(
<RomyEatsDrupal> whereas, in Drupal meet ups, people are always warmly greeting the newcommers
<shevy> you need to trick them RomyEatsDrupal, wear hipster outfit for instance and make them believe you are a hipster!
<RomyEatsDrupal> wow this guy seems so cool
<imperator> shevy, he's done a bit more than that, but yes he did that, too
<RomyEatsDrupal> omg!
<RomyEatsDrupal> WOW!!!!
<lianj> at the coworking house here, most drupal guys migrated to rails when i introduced them to it
<RomyEatsDrupal> I NEED to learn ruby FAST! and apply!!!!
<imperator> RomyEatsDrupal, there you go
<imperator> my former co-worker *hated* drupal
<imperator> because basically some schlub in the office would install it without knowing wtf he was doing, and he'd end up having to maintain the thing
<shevy> write a replacement for drupal in ruby!
<lianj> replace 42 million drupal modules?
<imperator> shevy, sure, i'll get right on that
<RomyEatsDrupal> :(
<RomyEatsDrupal> i've a feeling puzzlenode.com is over my capabilities :(
<postmodern> lianj, sounds like you should write a PHP parser, IN RUBY! :)
<imperator> drupal is php right?
<RomyEatsDrupal> just yesterday i taught myself attribute accessors
<shevy> think so imperator but I meant RomyEatsDrupal, not you!
<RomyEatsDrupal> drupal is PHP, yes
<lianj> postmodern: like https://github.com/tenderlove/phuby ?
<lianj> heh, that talk was fun
<postmodern> lianj, or that, idk if it still works :P
<imperator> ruby is so much cooler than php
<imperator> i mean, we have our own song and music video, php has those two slutty cheerleaders
<imperator> need i say more?
<RomyEatsDrupal> PHP has two slutty cheerleaders? i never knew that! where!!!
<bnagy> waitwat?
<RomyEatsDrupal> fabulous
<RomyEatsDrupal> omg (dies ROTFLMAO)
<shevy> hmm
<RomyEatsDrupal> i think want to change my twitter name from RomyEatsDrupal to RomyEatsTuple
<shevy> ruby has hipster cheerleaders
<RomyEatsDrupal> ruby has a blonde asian stalker!
<shevy> or be tough and become RomyEatsConcrete !
<imperator> see? you be polish and still be hip!
<lianj> yea, that one was good
<imperator> er, ^can^
<RomyEatsDrupal> sorry imperator i' not going to click on your link i'm still stuck on this blonde cheerleader
<RomyEatsDrupal> she has a belt with stars on it :P
<bnagy> I know quite a few poles and none I would describe as 'hip' :/
<shevy> hehe
<bnagy> gthen again the only 'hip' I really know anything about is the bit that keeps my legs from falling off
<shevy> man
<shevy> what about hip hop !
<imperator> bnagy, you german?
<shevy> baggy pants, fancy looks, silly dances
<bnagy> nein
<lianj> shevy: is that the php compiler?
<shevy> hehe
<shevy> Fanta4!
<bnagy> australian, although I've been out for almost 10 years now
<RomyEatsDrupal> sigh .. . i am so depressed… this Mendicant University sounds so awesome but I am afraid I'm too much of a noob to be able to solve those puzzles… sigh :(
<RomyEatsDrupal> how depressing
<shevy> RomyEatsDrupal, german hip hop from ~20 years ago http://www.youtube.com/watch?v=QG-zPgyQDD8&ob=av2e
<imperator> RomyEatsDrupal, aren't there beginner's courses? if not i'll bet you could find some
<imperator> bnagy, where you at these days?
<bnagy> kathmandu
<imperator> also, aussy accents add +3 charisma here in the US
<shevy> and to contrast it with korean hip hop ... MC Sniper http://www.youtube.com/watch?v=XM76RlIyaWc
<shevy> hmm kathmandu?
<imperator> kathmandu? srsly?
<shevy> isn't that kinda exotic a location?
<bnagy> I don't know if 'exotic' is the way I'd describe it :)
<bnagy> .. for instance the internet sucks pretty badly. I have like 2 second keypress lag at the moment :(
<shevy> hehe
<shevy> could be worse!
<shevy> could be gunfire outside!
<bnagy> yeah that hsn't happened for years
<bnagy> although the last strikes were a bit freaky
<imperator> naturally the bob segar song is now stuck in my head
Dreamer3 joined #ruby-lang
<imperator> RomyEatsDrupal, i know david black used to teach ruby courses; dunno if he's up in the nyc area ever
<imperator> i mean, when you're done checking out the starry belt and all
cantonic joined #ruby-lang
<bnagy> that puzzlenode thing has some nice stuff
<imperator> i was looking at that but...i don't get it
RomyEatsDrupal_ joined #ruby-lang
<RomyEatsDrupal_> i wish i had some ruby girl best friends
<imperator> looks like someone's connection died
<RomyEatsDrupal> i could sleep over at their houses and we could stay up late having ruby together
<RomyEatsDrupal> ruby sessions
<imperator> RomyEatsDrupal_, isn't there linuxchicks or something?
<bnagy> they have what looks like a travelling salesman, a gidden markov model...
<bnagy> *hidden
<bnagy> dammit I can't see my line after I type it, unless I want to wait another 20 seconds :(
<RomyEatsDrupal> bnagy: traveling salesman? where?
<bnagy> 'fast tourist cheap tourist'
ryanf joined #ruby-lang
<bnagy> oh man I could so #12 in about an hour
<imperator> gem install crypt-rot13 ;)
<bnagy> guess I'll do some boring work instead
<RomyEatsDrupal> bnagy: i'm looking at 12 right now
<RomyEatsDrupal> it looks so interesting
workmad3 joined #ruby-lang
<bnagy> they give you the vignere key which makes it a bit wimpy
<bnagy> you could solve it just by knowing the length of the key
<imperator> gem install vigenere
<bnagy> as it is you could just try caesar shifts on the key until you hti something in /usr/dict/words
<bnagy> then the rest is mechanical
<bnagy> more fun is to split the cipher into keylen partitions, then solve each partition by guessing a shift and comparing the result to the normal english letter frequency
<RomyEatsDrupal> bnagy: i just started to teach myself ruby 2 months ago
<RomyEatsDrupal> sometimes i would go for several days not studying
<bnagy> well this isn't really ruby, it's just the algorithm
<RomyEatsDrupal> about how long do you think it might take for someone to know enough ruby to solve something like that if they study like three hours of ruby a day?
<bnagy> no idea? Someone that had a compsci degree? One day
<bnagy> if you know HOW to dio it then you just need the rubymachanics
<bnagy> (sry for terrible typing, can't see input)
<bnagy> if you're effectively learning ruby and compsci at the same time then longer, obviously
looopy joined #ruby-lang
<RomyEatsDrupal> hmmm i see
<RomyEatsDrupal> i come from an English/Philosophy background
<bnagy> me too :D but hacking pays much better :(
<lianj> ('a'..'z').to_a.repeated_combination(5).each{|i| p i.join }
<imperator> wait, you couldn't get a job with an english/philosophy background? shocking
<looopy> require 'digest' returns false using ruby 1.9.2 am i missing something?
<imperator> i kid, i kid
<bnagy> looopy: you probably want 'digest/md5' or something
<imperator> looopy, think they changed it to digest/md5 and stuff
<imperator> what bnagy said
<looopy> hmm no dice there either
<bnagy> then someone already required it?
<imperator> looopy, debian?
<looopy> actually i should tell the entire truth. not from irb...from the rails console
<looopy> osx
<looopy> using irb it returns true as it should
<imperator> #rubyonrails
<bnagy> looopy: try Digest::MD5.hexdigest 'foo'
<looopy> imperator: yeah, just hopped over. it's clearly rails
<imperator> oh, returns false? means it's already loaded
<looopy> bnagy: ok
<looopy> ahh no kidding
<imperator> false does not mean failure; LoadError means failure
<imperator> true means wasn't loaded already
<imperator> false means already loaded
<looopy> imperator: ahh, i see. good to know =P
<imperator> confuses lots of newbies
<shevy> man
<looopy> and that i am
<shevy> I wish I could jump back in time to see when imperator was a newbie to ruby himself :)
<shevy> or drbrain!
tomzx joined #ruby-lang
Marco joined #ruby-lang
<RomyEatsDrupal> shevy, lianj imperator thank you for all your help tonight
<imperator> shevy, 2001 or so :)
<imperator> RomyEatsDrupal, you're welcome
<RomyEatsDrupal> maybe one of these days we can have a Skype ruby study session and solve these Puzzlenode puzzles, one at a time. i'll need good wifi though
<imperator> it's like 2:30 there or something
<RomyEatsDrupal> my apt wit is spotty
<RomyEatsDrupal> yea
<RomyEatsDrupal> i'm analyzing a simple ruby code right now :)
<imperator> good luck!
<RomyEatsDrupal> a rendition on the 99 bottles of beer, i changed it to 99 bottles of milk
<RomyEatsDrupal> but the way the code is written (by Kevin Baird, the writer of Ruby by Example) is quite beautiful
<RomyEatsDrupal> because at the end he runs pure Ruby syntax and it is … oh.. so… beautiful…. sigh
<RomyEatsDrupal> and he uses the ternary operator in a way i do not yet quite immediately grasp… i'm studying it now…be back later
<shevy> RomyEatsDrupal ruby should read like poetry
<RomyEatsDrupal> shevy: Ruby is like poetry. the end of this script reads like this:
huug joined #ruby-lang
<RomyEatsDrupal> wall.sing_one_verse? until wall.empty?
<RomyEatsDrupal> so coooool :)
<shevy> hehe
rippa joined #ruby-lang
<imperator> i'm out, good night folks
imperator left #ruby-lang
Diaoer joined #ruby-lang
<bnagy> night
Pip joined #ruby-lang
Pip joined #ruby-lang
ecin joined #ruby-lang
dr0id joined #ruby-lang
robotmay joined #ruby-lang
Codif joined #ruby-lang
zmack joined #ruby-lang
apeiros_ joined #ruby-lang
twittard joined #ruby-lang
zmack joined #ruby-lang
robotmay joined #ruby-lang
postmodern joined #ruby-lang
burgestrand joined #ruby-lang
ecin joined #ruby-lang
dstaar joined #ruby-lang
dstaar left #ruby-lang
michael_mbp joined #ruby-lang
yxhuvud joined #ruby-lang
adambeynon joined #ruby-lang
saLOUt joined #ruby-lang
Codif joined #ruby-lang
tbuehlmann joined #ruby-lang
jasox joined #ruby-lang
<bnagy> so... is yaml / psych broken in 1.9.3 or what?
<bnagy> I have a file that loads perfectly on 1.9.2-p290
<bnagy> fails on 1.9.3p5
<shevy> hehe
<shevy> good old psych
<shevy> always breaking when I feed it my yaml files
<shevy> where do you see 1.9.3p5 though
hzlocky joined #ruby-lang
<hzlocky> Hello, everyone
<hzlocky> I have an architecture question:
<bnagy> shevy: that's what's on 1.9.3-head for rvm
<bnagy> how big are the messages?
<hzlocky> ~ 10 kb each
<bnagy> either amqp or beanstalkd, imho
<shevy> that's a lot of data
<bnagy> 10k is quite big for amqp messages, I'd probably look at beanstalkd first
<hzlocky> Since, I like ruby I`d like to make calculation with it, but the app really need to be very fast
<hzlocky> thats why I cant do the whole application in ruby - cause of green threads problem
<bnagy> I don't think it should be a problem
<hzlocky> each message should be processed less then in 10 secs
<bnagy> and anyway, you can have multiple workers for your db inserts, so you scale by processes not threads
<bnagy> what's the calculation stuff?
<bnagy> that should be your only bottleneck
<bnagy> just handling ~200 10k messages / sec is fine
<hzlocky> it is kind of gps calculations
<hzlocky> geofence and etc
<bnagy> have you timed it with a single ruby worker, for throughput? just for the calculations I mean
<hzlocky> actually we timed it with jruby about 1 year ago
<hzlocky> it worked fine
<hzlocky> the only problem we had with time is green thread in mri
<hzlocky> *green threads
<apeiros_> but jruby doesn't have green threads…
<bnagy> just don't scale by threads
<hzlocky> yes, I mean it worked fine with native java threads with jruby(but we dont want jvm), but in mri we have problems cause of native threads
<hzlocky> cause of green threads
<hzlocky> sorry
<bnagy> except for speeding up multiple blocking things
<hzlocky> you think it is better just to create several processes?
<hzlocky> eh, just found that they added native threads since ruby 1.9.1
<hzlocky> isnt it?
<bnagy> if you write your app to scale by processes then it will be a lot easier if you have to scale across multiple boxes
<hzlocky> if its really works now, I can implement it based on event machine framework
<hzlocky> bnagy: this is task for one machine
<bnagy> eventmachine won't magically speed up high cpu workloads
<bnagy> it's a reactor
<bnagy> single threaded, usually
<bnagy> at least that's the idea of the pattern
Mark2 joined #ruby-lang
<hzlocky> why single threaded?
<Mark2> test
<apeiros_> Mark2: test failed. please reboot immediatly.
<hzlocky> I though eventmachine dispatches each received event in different process, isn`t it?
<bnagy> no, not last time I used it
<bnagy> that's not what a reactor is for
<Mark22> :)
<hzlocky> bnagy: what solution you can recommend to be basement for my app?
<hzlocky> cause I though to use eventmachine, but since it is single threaded - thats not good
<bnagy> the whole point of a reactor is to avoid the nightmares of threading etc, it's like a select() loop on steroids
<hzlocky> aha, I see now, thanks
<bnagy> well you can thread out with defer, but I think you'd need to be on jruby for that to work properly (OS threads)
<bnagy> and once you start using threads with EM it starts to get brainbending, imho
<hzlocky> did they add native threads in mri already? at least I dont see any references to green threads now in pthread.c
<josh9> can i run jruby with whatever dispacher i want? (thin/unicorn/etc)?
benanne joined #ruby-lang
<bnagy> hzlocky: not as far as I know, but I don't scale with threads :)
<bnagy> my internet is having one of its tantrume, but github have a work queue system like this which I forget the name of
<bnagy> I built mine on beanstalkd
<bnagy> you could also use redis
<bnagy> or probably a ton of things
<bnagy> something like Parallel on github makes it easy to fork() out to ncpus
<hzlocky> Parallel?
<bnagy> yes, grosser/parallel on github from memory
<bnagy> like I said I can't search at the moment
<hzlocky> wow, this parallel seems to solve part of my problem
<bnagy> resque that's it
<bnagy> personally I would do something like [producer]->[beanstalkd]->[Parallel.map Consumer x ncpus]->[redis]
<hzlocky> producer is somewhere in internet
<hzlocky> and I should store everything in mysql as a final point
<bnagy> *shrug*
<bnagy> I wouldn't touch mysql with someone else's 10 foot pole, but ymmv
<hzlocky> thats requirements
<hzlocky> not my wish
<shevy> ruby is so cool
<shevy> array1 - exclude_these
<shevy> beautiful :)
sepp2k joined #ruby-lang
jimmy1980 joined #ruby-lang
marcostoledo joined #ruby-lang
Manhose joined #ruby-lang
tallship joined #ruby-lang
Spooner joined #ruby-lang
jimmy1980 joined #ruby-lang
chessguy joined #ruby-lang
jensn joined #ruby-lang
yorickpeterse joined #ruby-lang
thrcka joined #ruby-lang
jimmy1980 joined #ruby-lang
publicvoid joined #ruby-lang
AlHafoudh joined #ruby-lang
AlHafoudh joined #ruby-lang
cantonic joined #ruby-lang
Manhose_ joined #ruby-lang
mssola joined #ruby-lang
m0wfo joined #ruby-lang
sopheak joined #ruby-lang
shevy joined #ruby-lang
Marco joined #ruby-lang
jimmy1980 joined #ruby-lang
jensn joined #ruby-lang
rkk joined #ruby-lang
<shevy> hmm
<shevy> that's the first time my bugs made me laugh
geoffwright joined #ruby-lang
beiter joined #ruby-lang
SteveG joined #ruby-lang
SteveG joined #ruby-lang
Squarepy joined #ruby-lang
mnoble joined #ruby-lang
Squarepy joined #ruby-lang
publicvoid joined #ruby-lang
robotmay joined #ruby-lang
looopy joined #ruby-lang
<chris2> shevy: you must have a sad life
<apeiros_> chris2: or he has a very entertaining bug…
<chris2> perhaps :)
<apeiros_> with shevy, I'm actually inclined to believe that :D
saLOUt joined #ruby-lang
tty234 joined #ruby-lang
dr0id left #ruby-lang
<andrewvos> What's happening now?
<andrewvos> shevy: Explain!
thrcka joined #ruby-lang
melic joined #ruby-lang
lenilson_dias joined #ruby-lang
<shevy> andrewvos well, I wanted to do something, and in the process of doing this, I discovered a bug. When trying to work around, two more bugs hit me. I felt as if they were beating me into submission.
deryl joined #ruby-lang
<shevy> It's like you go in a labyrinth and all ways out are blocked
lenilson_dias joined #ruby-lang
jensn joined #ruby-lang
jondot joined #ruby-lang
io_syl joined #ruby-lang
io_syl joined #ruby-lang
<jondot> hi all. i'm trying to model an infrastructure for something i've been reimplementing several times over. i'm basically queueing work from email and then letting workers work on those queued items. however it gets interesting when input is from SMS, Jabber etc. I can't ignore the generic nature of this - anyone knows of some project that abstracts over this?
michas joined #ruby-lang
<jondot> i guess such a thing might ring a bell when it comes to enterprise service bus. even hook-io might be good (but not suitable since it doesn't have a persistent queue based backend). next up is nanite but i think it might be not simple enough.
<rue> All you're doing is converting the incoming requests into your common format?
<jondot> well yea. i guess an ideal goal, is to _configure_ input sources, and then code workers. let the infrastructure do the polling of email, listening of sockets, then pushing to a persistent queue, and run workers as daemons and distribute the work (and manage failures) to them.
solars joined #ruby-lang
<jondot> i guess like a delayed_job but with pluggable inputs, pluggable worker types and *maybe* pluggable backend-although it doesnt matter as much.
* apeiros_ doesn't see the problem…
<jondot> apeiros_: it isn't a problem really, a couple of hours would get me 80% of what I need i guess. however - i wouldn't like to reinvent the wheel, i don't see all of the requirements i might need right now, and i wouldn't have the time to write a good suite of tests for it.
<apeiros_> ah, so you're looking for existing software to hook into…
<rue> Nanite seems like it's solving the opposite problem
<rue> Or, well, if you need it (YAGNI), you could use it as your “pluggable backend”
<jondot> well any kind of idea for an existing library, yes. i have a couple of hours of free time to perhaps make generic a thing i've been implementing a lot.
IoGA joined #ruby-lang
<rue> Especially if you only have input from sources, it'd seem reasonable to have a couple frontends converting into a format to feed to your backend
<rue> The problem of handling that queue is pretty much solved (resque, nanite, &c.)
<jondot> yes, each of the problems is solved. i'm looking for the glue - i'm starting to realize this would be any kind of 'bus'.
<rue> I suppose I see the architecture differently.
<jondot> just as general discussion, you could take a look at that ^^
andrewhl joined #ruby-lang
<andrewhl> with nokogiri, if I want to grab, say, all the rows in a table /except/ the first one (which contains <th>s), how might I do that?
<rue> Looks terrifying. Are you intending to support arbitrary transport with arbitrary messages to arbitrary backends?
<apeiros_> andrewhl: grab all, throw away the first.
<jondot> rue: no :). i'm looking up to the idea of pluggability
<apeiros_> alternatively, tr:not(:first) might work
<apeiros_> or was that :first-child?
<andrewhl> how do you discard the first? doc.css('<tr>[1]') would grab the first, yeah? but how would I discard it?
<apeiros_> <tr> is not really the selector you want…
<apeiros_> you don't have the <> part of a tag in css selectors.
<andrewhl> oh
<jondot> i guess no such servicebus exists in ruby. my decision now either to implement a generic bus or to keep doing what i did up to now.
<andrewhl> right I was using xpath
<rue> andrewhl: Effectively, nodeset[1..-1]
<andrewhl> nodeset is for parsing xml right?
<rue> jondot: I'm still not sure that's the right problem to solve (or maybe I misunderstand the term “bus”). That is, if truly the only variant are the various input sources
<andrewhl> ok brilliant, got it working. Thanks all
<jondot> rue: well if you follow me, here is what i'd like to do. 1 - configure a source 'email', 'sms'. both those components come prepackaged with the library. i just plug in email's credentials. 2 - configure a queue backend to which inputs push contents. 3 - write worker_email.rb, worker_sms.rb 4 - start up the concoction with a single command.
macmartine joined #ruby-lang
<rue> jondot: Why do you need worker_N.rb? I assume the messages are the same, just sent through different channels
<jondot> both worker_email and worker_sms get only their own messages (based on input source). now, stage 1 of computation is done. but worker_email and worker_sms have results - so lets reply. how would you reply to an email? to SMS?. again lets configure input sources and workers with a 2nd queue. replyer_email.rb replyer_sms.rb -- soon enough we have a statemachine over queues and workers.
Pip joined #ruby-lang
<rue> I'd probably try to just have N translation layers and 1 backend queue… If you want to do it this way, though, you don't need a single queue, do you?
michael_mbp joined #ruby-lang
<jondot> sure, you can do it with a single queue and then put the state into the message
curtism joined #ruby-lang
Pip joined #ruby-lang
cyri_ joined #ruby-lang
<jondot> well, i realize through discussing with you that there isn't such a thing so far, and it would be beneficial to implement over delated_job or qu, etc. it's actually something that i've been planning some time ago. here is an interesting example: http://camel.apache.org/simple-jira-bot.html
<jondot> if you can ignore the XML and enterprisy lingo, it's kinda attractive.
Pip joined #ruby-lang
<andrewhl> so I'm getting all the rows from a table using rows = doc.each do |stuff| puts stuff.content end, however it's doing stuff like Cell1Cell2 Cell3Cell4 Cell5Cell6. How can I space these individually?
<jondot> actually its worth a question to jruby guys.
<andrewhl> i really need to learn how to read this api documentation... sigh
niklasb joined #ruby-lang
jensn joined #ruby-lang
malev joined #ruby-lang
<andrewhl> actually it's not doing what I described. Those are internal spaces. It's doing: <td></td><td></td><td></td>, and grabbing the content from each. I need to add spaces between the tds...
cantonic_ joined #ruby-lang
apeiros_ joined #ruby-lang
dejongge joined #ruby-lang
saLOUt joined #ruby-lang
danishman joined #ruby-lang
imperator joined #ruby-lang
<imperator> bnagy, ping
solars joined #ruby-lang
matti joined #ruby-lang
matti joined #ruby-lang
Marco joined #ruby-lang
toretore joined #ruby-lang
looopy joined #ruby-lang
thrcka joined #ruby-lang
burgestrand joined #ruby-lang
scottschecter joined #ruby-lang
slyphon joined #ruby-lang
aasmith joined #ruby-lang
aasmith joined #ruby-lang
mkscrg joined #ruby-lang
srbaker joined #ruby-lang
adambeynon joined #ruby-lang
ecin joined #ruby-lang
looopy joined #ruby-lang
thone joined #ruby-lang
jasox joined #ruby-lang
heppy joined #ruby-lang
mztriz joined #ruby-lang
gokulnath joined #ruby-lang
Silowyi joined #ruby-lang
jimmy1980 joined #ruby-lang
scampbell joined #ruby-lang
felipegb joined #ruby-lang
gokulnath_ joined #ruby-lang
flip_digits joined #ruby-lang
m0wfo joined #ruby-lang
imperator2 joined #ruby-lang
m0wfo joined #ruby-lang
niklasb joined #ruby-lang
niklasb joined #ruby-lang
RomyEatsDrupal joined #ruby-lang
jimmy1980 joined #ruby-lang
niklasb joined #ruby-lang
geoffwright joined #ruby-lang
niklasb joined #ruby-lang
Jake232 joined #ruby-lang
yank joined #ruby-lang
yank left #ruby-lang
jimmy1980 joined #ruby-lang
Phrogz joined #ruby-lang
workmad3 joined #ruby-lang
darkf joined #ruby-lang
kyrylo joined #ruby-lang
DotMH joined #ruby-lang
livinded joined #ruby-lang
Codif_ joined #ruby-lang
<DotMH> can anyone tell me what this is called in a module class << self , I am not sure what it does but not sure what to google for to find out ?
m0wfo joined #ruby-lang
<apeiros_> DotMH: `class << obj` opens the eigenclass of obj
<apeiros_> s/eigenclass/singleton_class/
<apeiros_> which is where you put methods that should only be available on obj itself (such as class methods)
Pip joined #ruby-lang
<DotMH> apeiros_: thanks thats brilliant
looopy joined #ruby-lang
lsegal joined #ruby-lang
<shevy> hmm
<shevy> I just googled for "using vim to remove leading blanks of a line"
<shevy> then I changed my mind and used ruby instead :)
<apeiros_> gsub(/^ +/, '')?
<shevy> it was an "aha" experience
<shevy> "Why use vim when I can use Ruby instead."
<rue> Why use Ruby when you can use Sed and AWK
<shevy> I don't use dinosaur tools
phaedrix joined #ruby-lang
<shevy> I wouldn't be able to figure out awk syntax anyway
phaedrix joined #ruby-lang
<rue> shevy: Well, true. Some -pe is usually pretty workable
phaedrix joined #ruby-lang
<rue> -Eex[:in] :(
sepp2k1 joined #ruby-lang
<shevy> I am actually writing this into a method, put it into a file, and then call that method via aliases. The alias is then something like ruby -r some_file_here -r some_file_there -e name_of_method so it boils down to something like "rin strip_blanks"
DMKE joined #ruby-lang
jimmy1980 joined #ruby-lang
srbaker joined #ruby-lang
towski joined #ruby-lang
jimmy1980 joined #ruby-lang
m0wfo joined #ruby-lang
tomzx joined #ruby-lang
rane_ joined #ruby-lang
DotMH joined #ruby-lang
macmartine joined #ruby-lang
solars joined #ruby-lang
livinded joined #ruby-lang
towski joined #ruby-lang
JosephRuby joined #ruby-lang
joseph_ joined #ruby-lang
JosephRuby joined #ruby-lang
RomyEatsDrupal joined #ruby-lang
RomyEatsDrupal joined #ruby-lang
jimmy1980 joined #ruby-lang
workmad3 joined #ruby-lang
RomyEatsDrupal joined #ruby-lang
thrcka joined #ruby-lang
empity joined #ruby-lang
RomyEatsDrupal joined #ruby-lang
marting joined #ruby-lang
phaedrix joined #ruby-lang
QaDeS joined #ruby-lang
Banistergalaxy joined #ruby-lang
Codif joined #ruby-lang
michas joined #ruby-lang
workmad3 joined #ruby-lang
<erikh> why use ruby -pe when I can use perl -pe
<erikh> the syntax is almost exactly the same and it's about 400% faster
bryno joined #ruby-lang
<andrewhl> can someone point me to GOOD nokogiri documentation? Everything I have found so far is useless and unhelpful
<rue> erikh: Because almost
<rue> andrewhl: http://nokogiri.org
<erikh> rue: does ruby have perl's -i? I guess I could check, but I've never used ruby that way
<rue> I've found it rather well-documented
<andrewhl> arghhh. I'm trying to read it, rue, but I can't make heads or tails of it
<rue> erikh: i.bak ?
<rue> Yes
<erikh> ah yes
<erikh> it does!
<erikh> in-place edit is one of my favorite perl on the command line features
cornholio joined #ruby-lang
<erikh> awk is a dinosaur tool!
<cornholio> no way
<erikh> that's hilarious
<rue> andrewhl: I'm not sure what the trouble is? You can parse HTML or XML into DOM XML. Then you can filter that doc with either CSS selectors or XPath, and/or use Node/NodeSet and relevant methods, mostly for iteration and transforms
<rue> Maybe you should play with it in pry/irb if you have trouble visualizing the data
y3llow joined #ruby-lang
s0ber joined #ruby-lang
<andrewhl> rue: i've figured out how to parse a table into rows and extract the tag content with .content, and separately how to extract a url from an <a> tag, but I have no idea how to do both at the same time.
<andrewhl> such that it iterates through each <td> in the row, putting .content where appropriate, and attributes for the <a> tags
saLOUt joined #ruby-lang
<injekt> andrewhl: do you have an example of the html you want to parse (a small snippet) and what you'd like to extract from it?
<andrewhl> sure, let me put it up a gist
looopy joined #ruby-lang
cornholio joined #ruby-lang
telotism joined #ruby-lang
telotism joined #ruby-lang
<erikh> injekt: rue: fwiw, libcheck has been great to me, thanks for telling me about it.
<injekt> erikh: sweet!
<andrewhl> injekt: thank you!
<erikh> still trying to figure out how to better test some of my stuff
<injekt> I did used to enjoy it, haven't done much C lately
<injekt> andrewhl: sure
<erikh> well you could, uh, help me
<erikh> because you have copious amounts of free time
<erikh> and like to help
<erikh> right?
<injekt> haha
<injekt> erikh: not sure if I'll be much help, but of course I'll give it a shot
<erikh> eh, I was mostly kidding but if you want to get involved that'd be great
<injekt> and right, all packed for my flight already!
<erikh> oh heading back to the isle?
<injekt> yeah on monday morning, seeing the family for xmas then flying back in the new year
<erikh> nice. yeah, we're heading up to pdx for the holiday
<injekt> sweet
<telotism> can someone help me understand why this is not working: http://pastie.org/2961429
<erikh> define "not working"
<injekt> I guess I'm milking it a little leaving on the 5th of dec, but heh :)
<erikh> yeah, I simply can't do that being an ops guy now
<erikh> kind of sucks.
<injekt> aye
<erikh> getting a week was enough trouble
Jake232 joined #ruby-lang
<injekt> 3 months w/o girlfriend is not fun
<erikh> ha
<injekt> :P
<telotism> sorry, I'm trying to get the while statement to loop until the parametric fraction is smaller than the increment
<erikh> oh! I should be up in vancouver in feb. gonna be there?
<injekt> telotism: you never alter j or a or b, how do you think your while loop is going to stop?
<injekt> erikh: should be! what you up here for? :)
<erikh> telwell, j will always be 0 on first iteration
<rue> telotism: 1/10 == 0
<erikh> telotism
<erikh> even if it wasn't a float issue, * i where i is 0
<telotism> i've tried floating too
<telotism> it locks up
<telotism> or runs on forever
<erikh> j will always be zero, no matter what the left hand side of that equation is
<rue> What's that supposed to do?
<telotism> so it wont add in the increment += 1?
<erikh> no, look at your code
<erikh> j = (1/10) * i
<erikh> right above it
<erikh> i = 0
<erikh> so, j = (1/10) * 0
<telotism> :P
<erikh> as long as a and b are positive...
<telotism> so the i is not being changed by the while loop
<rue> telotism: i is, but j isn't.
<erikh> nor is a and b
<telotism> I feel retarded right now
<erikh> while 0 < (3/7) # always true
<telotism> I'm new to ruby
<erikh> shit happens, that's why code review is good
<telotism> and to coding
<erikh> don't sweat it, just fix your code
<injekt> code review is awesome
<telotism> ok
<telotism> what's code review?
<injekt> even people as awesome as me make mistakes too!
<injekt> har har
<erikh> telotism: just the idea of having someone else look at your code and point out mistakes
<injekt> ^
<telotism> oh :D
<telotism> sorry
<erikh> very simple process, like a writing proofread
<injekt> good programmers should always ask other good programmers to review their code
<injekt> I do
<telotism> yes, thank you for that :)
<erikh> anyhow; fix your code and let us know if you're still having trouble with ruby
<telotism> ok,
<injekt> erikh: so anywho, what brings you to the land of poutine and bears?
<erikh> injekt: company retreate
<injekt> in van? snap
geoffw8_ joined #ruby-lang
<erikh> whistler to be precise
<injekt> oh yes!
<erikh> but I should be flying through there, we should get a drink
<injekt> bad ass retreat, whistler is the bomb
<injekt> we should
<erikh> never been but that's what I hear
<injekt> Yeah man, whistler is crazy awesome
<erikh> I still need to get a passport if I'm going to fly
<injekt> I'm about 40min drive from there
<erikh> which I should be working on asap
<injekt> hah
<erikh> nice.
<rue> I've heard of pivots, but a full-scale retreat?
looopy joined #ruby-lang
<erikh> heh
<injekt> hm maybe a bit more than 40 minutes actually, I slept a lot :/
<erikh> ha
<rue> Travel time: approx. 40 minutes if you sleep a lot.
<injekt> was hoping to get some boarding in before I left, but dont have time or money :(
<injekt> rue: precisely!
<injekt> worst thing is that I can see the snowy mountains from my apartment
<injekt> worst or best thing, I guess :)
<rue> #firstworldproblems
<injekt> hehe
<erikh> ha
<erikh> I think I'm just going to start exercising and trying to quit smoking after that
<erikh> fell off the wagon again
* erikh is a sad sack
<injekt> :(
<injekt> takes time, you'll get there
<erikh> yeah I plan to try again in about 2 weeks
workmad3 joined #ruby-lang
<injekt> I've spent the last 3 months working out trying to get fit, legs are still a little weak from the accident, but it's going well
<injekt> that's good
artOfWar joined #ruby-lang
<artOfWar> I got this error when running cukes pastie.org/2961496
<artOfWar> Radar: epochwolf: I got this error when running cukes http://www.pastie.org/2961496
<injekt> #ror
<Radar> artOfWar: wtf dude
Axsuul joined #ruby-lang
stamina joined #ruby-lang
<erikh> gherkin is a C extension IIRC
<erikh> does that work on jruby now?
<erikh> I heard some rumors but I don't know for sure
<rue> Pickle!
<telotism> k, got it: http://pastie.org/2961429
<telotism> :P
<telotism> i'm a nimrod
artOfWar joined #ruby-lang
<erikh> nice job
<injekt> well done
<telotism> Thank you, sir
<telotism> :)
<telotism> baby steps
<telotism> ...
<erikh> learn to program in 10 years
<erikh> wise advice, google it
<artOfWar> I got this error when running cukes http://www.pastie.org/2961496
<telotism> i'm doing the "Learn Ruby the Hard Way" tut
<injekt> wait, i thought you could do that in 24 hours!
<erikh> artOfWar: stop pasting in here if you're going to close your laptop every 10 seconds
<injekt> artOfWar: you told us already
<injekt> jruby, windows, cukes, count me out!
me345 joined #ruby-lang
<erikh> C extension too
<erikh> he's hit the pantheon
<injekt> looks like the gem is -java, maybe they have a java extension too?
<erikh> oh I see
<injekt> I don't know, I can't stand cukes, and I hope I never have to use it
<erikh> yeah I really don't get it personally
<injekt> same
<erikh> rspec I at least understand the attraction
<erikh> not that it's the way I particularly like to think
<rue> You're just not staking enough holders
<erikh> holders: the new vampires
<artOfWar> forced to use at work :(
<injekt> <3 not having managers
saLOUt joined #ruby-lang
nofxx joined #ruby-lang
marcostoledo joined #ruby-lang
<telotism> why won't this variable (i) convert to an integer, I've tried round and to_i, nothing: http://pastie.org/2961647
<Mon_Ouie> You can't change the class of an object after its creation
<telotism> oh,
<Mon_Ouie> Therefore to_i returns a new object
<telotism> ah
<telotism> so i would have to stuff that into a new variable
<telotism> and call that up?
<j`ey> yes
<Mon_Ouie> You can use the same variable
<telotism> Thank you!!!!
<telotism> oh
<j`ey> or i = i.to_i
<telotism> ah!
<telotism> even better :)
<telotism> I <3 you guys, man I spend hours trying to figure this stupid stuff out myself
<workmad3> telotism: why not just start with i = 0 ?
<workmad3> telotism: you never do any float stuff with i
<telotism> I divided the points / max, no?
<workmad3> telotism: yeah, but you're comparing that to j, not i
<telotism> You're right!
<telotism> crap :P
<telotism> please forgive my peanut sized brain
<workmad3> telotism: also, that entire thing looks like you could replace it with '(points * 10 / max.to_f).ceil'
* apeiros_ likes fdiv
<telotism> let me try that
<telotism> yep
<telotism> worked
<telotism> i'm very much still struggling through the syntax
<telotism> totally new to programming
<workmad3> telotism: we all started somewhere :)
<telotism> :0
<telotism> :)
Bwild joined #ruby-lang
<telotism> also, zee math, she no good
<telotism> to me
<telotism> (twisting my mustache...)
<workmad3> telotism: :)
riush joined #ruby-lang
ecin joined #ruby-lang
oilpastels_ joined #ruby-lang
fahadsadah joined #ruby-lang
looopy joined #ruby-lang
gix joined #ruby-lang
igotnolegs joined #ruby-lang
rmascarenhas joined #ruby-lang
geoffw8_ joined #ruby-lang
petercooper joined #ruby-lang
fahadsadah joined #ruby-lang
looopy joined #ruby-lang
kyrylo joined #ruby-lang
publicvoid joined #ruby-lang
fridim_ joined #ruby-lang
thrcka joined #ruby-lang
DotMH joined #ruby-lang
artOfWar joined #ruby-lang
gearaholic joined #ruby-lang
singpolyma joined #ruby-lang
looopy joined #ruby-lang
geoffw8_ joined #ruby-lang
niklasb joined #ruby-lang
Bwild joined #ruby-lang
jimmy1980 joined #ruby-lang
mkscrg joined #ruby-lang
kain joined #ruby-lang
mnoble joined #ruby-lang