apeiros_ changed the topic of #ruby to: programming language || ruby-lang.org || Paste >3 lines of text in http://pastie.org || Rails is in #rubyonrails
seanstickle has quit [Quit: Nihil sub sole novum]
baroquebobcat has quit [Quit: baroquebobcat]
iamjarvo has joined #ruby
cousine has joined #ruby
tomb_ has quit [Quit: Computer has gone to sleep.]
<Sigma00> anyone have any good experiences with an irc bot framework other than rbot? It looks really nice but I keep having issues with bdb
khakimov has joined #ruby
dbgster has joined #ruby
gchristensen has left #ruby ["WeeChat 0.3.7"]
kenichi has quit [Remote host closed the connection]
looopy has joined #ruby
robdodson has joined #ruby
robdodson has quit [Client Quit]
beneggett has joined #ruby
krz has joined #ruby
Y_Ichiro has quit [Quit: No Ping reply in 180 seconds.]
Y_Ichiro has joined #ruby
Y_Ichiro has joined #ruby
kenperkins has quit [Ping timeout: 246 seconds]
mengu has quit [Remote host closed the connection]
deryl has quit [Quit: to add to local group]
DarthGandalf has quit [Ping timeout: 245 seconds]
tomb_ has joined #ruby
mikeric has joined #ruby
DarthGandalf has joined #ruby
DarthGandalf has quit [Changing host]
DarthGandalf has joined #ruby
itnomad has joined #ruby
Targen has quit [Ping timeout: 245 seconds]
yannis has joined #ruby
bambanx has joined #ruby
<bambanx> hi
btanaka has quit [Remote host closed the connection]
ken_barber has joined #ruby
gks has joined #ruby
<bambanx> bnagy, are you there?
savage-_ has quit [Remote host closed the connection]
ken_barber has quit [Remote host closed the connection]
stephenjudkins has quit [Quit: stephenjudkins]
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
gregorg_taf has quit [Ping timeout: 250 seconds]
classix has quit [Ping timeout: 244 seconds]
deryl has joined #ruby
niklasb has quit [Ping timeout: 252 seconds]
ZachBeta has joined #ruby
test34- has joined #ruby
_numbers has joined #ruby
cbuxton1 has quit [Quit: Leaving.]
<_numbers> ehat does <<- do?
<_numbers> what*
cbuxton has joined #ruby
<bambanx> << <----- this?
<deryl> its heredoc
<bambanx> is like a push ?
<deryl> tghe << by itself adds to like an array
cbuxton has quit [Client Quit]
<deryl> s/ge/the/
<bambanx> yeah
<deryl> or concatenating a string.
<moshee> <<- is not the same as <<
<deryl> also used in heredocs iirc
<bambanx> myarray << thisisadd_to_my_array
<moshee> <<- is exclusively for heredocs as far as I know
<deryl> moshee, yeah i was trying to cover both usage patterns. << and <<-
stephenjudkins has joined #ruby
test34 has quit [Ping timeout: 250 seconds]
<deryl> so he didn;'t think that both uses were specifically for heredocs (like some people getting confused in rails with <% > and <%= >
<deryl> )
<bambanx> guys
<bambanx> is possible make a custom gui in ruby?
ten00 has joined #ruby
<deryl> bambanx, green shoes or straight shoes iirc
<bambanx> i mean
<bambanx> deryl make my custom
noyb has joined #ruby
<deryl> someone else mentioned a tutorial in here the other day about gtk and ruby but not sure
<bambanx> gui
<bambanx> not using gtk or shoes or wx
goodieboy has quit [Remote host closed the connection]
<bambanx> drawing a new one
<deryl> sure, write your own GUI lib, and make it ruby aware :shrug:
<bambanx> yeah
cordoval has joined #ruby
<ten00> Hello
<Manhose> Anyone experienced with heroku? #heroku is awful quiet.
<bambanx> this is what i wanna
<deryl> not asking, saying what you would need to do
cordoval has left #ruby [#ruby]
<Manhose> I get this when I `heroku run rake db:migrate'
<bambanx> so where i can start to find deryl?
_numbers has left #ruby [#ruby]
adeponte has joined #ruby
<Manhose> rake aborted! database configuration does not specify adapter
odinswand has joined #ruby
<deryl> if you don't want to use any of the shoes, then you need to write your own GUI lib, or take one of the existing ones and then wrap ruby around it. use shoes as a guideline/tutorial
<deryl> i don't know of *any* tutorials for teaching you do make your own and then wrapping it
<deryl> so you'd have to look at the existing solutions and morph on your own
<bambanx> yeah
<bambanx> i wanna make my custom editor
<bambanx> i hate all
<bambanx> xd
<ten00> Is it GUI editor?
igotnolegs has joined #ruby
<deryl> if you're that good that you can write your own, why noit take one of the existing, reuse what you DO like, and then add what you find missing
<deryl> almost all fo them are opensource. except like rubymine or textmate
stephenjudkins has quit [Quit: stephenjudkins]
<bambanx> i like very much how looks sublime text and intype editor
<ten00> in type
dbgster has quit [Quit: dbgster]
<deryl> aren't they both opensource?
<gks> sublime is not
<deryl> ahh thought it was, my bad
ten00 has quit [Quit: Leaving...]
<bambanx> all goods ones are not opensource :P
<gks> so many editors out there it is easy to simply forget or be confused :)
<deryl> hehe true
<gks> take a look at Kod
<gks> that one _IS_ open source
<deryl> never heard of that one
* deryl googles
<gks> while it may not be fantastic, it does give you something to work with
<bambanx> kod run on windows gks ?
<deryl> kodapp.com?
<gks> negative, mac only
<gks> deryl: that's the one
<deryl> nice. i run linux and osx. i'll look at kod as well
<bambanx> i dont have mac i was installed hackingtosh on my dell but now dont work :/
<gks> i assumed since textmate was mentioned we were talking about macs :)
<deryl> i like playing around with different editors. maybe one day i'llo even settle on one thats not vim :)
<bambanx> deryl you know sublime text?
<deryl> oh no i was just mentioning potentials
<gks> deryl: i should note that Kod seems to be abandoned
<deryl> yes, and i don't like it. tried it
<deryl> gks, got ya
<bambanx> intype is like textmate clon
<bambanx> but free
<gks> bambanx: gotcha, yea, i understand your plight.. i gave up on windows long ago though
<deryl> i tend to spend most of my days in tmux+vim+vim_plugins+tmuxinator
<deryl> i rarely use textmate even, anymore
adamkitt_ has quit [Remote host closed the connection]
<gks> i want to use vim more, but i just find myself incapable of sticking with it
<gks> i currently use Sublime Text 2, which isn't half bad
<deryl> gks, i've been forcing myself to
<bambanx> vim bored me is freak hehehe
<deryl> finding i actually kind of like it since i poicked up Practical Vim and the tmux book
<gks> deryl: i find myself having a hard time navigating quickly through files, where with a gui text editor i'm not complaining as much
<deryl> and with NERDTree in there as well as snipmate and a few other plugins, its more than fairly usable for me
<gks> i know it's just a matter of being more familiar but, blah, i hate always feeling like i have to look something up to use it
<deryl> gks, yeah lots of people say the same.
jjjj1 has joined #ruby
<deryl> editors are really really touchy subjects for people.
<gks> i can't do nerdtree, but i do like commandt
Manhose has quit [Ping timeout: 245 seconds]
<deryl> we all work a bit differently. don't think there is really a one-stop-solution for all things. vim is pretty decent for me though
<bambanx> i like simplistic and looks clean and dark
<gks> i believe its commandt
<deryl> tselect based?
<bambanx> komodo maybe can be a good choise too
mikepack has quit [Remote host closed the connection]
<deryl> komodo isn't half bad
<deryl> not great, but not bad
<deryl> checking
<gks> it's based on the TextMate fast open thing
ramblex has quit [Quit: ramblex]
<bambanx> i recognize i have a compulsion for editors like a paranoia hehehehe
Manhose has joined #ruby
<deryl> yeah seeing that
<Manhose> Dropped, any answers?
<deryl> i'll try it. if it works cleaner than nerdtree i might change
<gks> deryl: i like it, but it does require knowing part of the name of the file
<deryl> the whole ctl-w w thing to bounce between the open file and nerdtree does tend to bug me :)
<gks> at least somewhat
<deryl> thats easy enough :)
<bambanx> you debug ruby on vim?
<deryl> in probably 99% of my use cases
<bambanx> i see a few debuggers for vim
<gks> personally i just like Pry for debugging
<deryl> bambanx, i use pry for my ruby debugging
dankest has joined #ruby
jonathanwallace has joined #ruby
<bambanx> is for vim? deryl or is a external tool?
<deryl> edit opens vim for me
<bambanx> i need a tool
<deryl> no its a gem
<bambanx> can you link me docs pls
<deryl> gem install pry pry-doc pry-nav pry-stack_explorer pry-exception_explorer pry-syntax-hacks pry-editline
<deryl> then run pry
ianbishop has joined #ruby
<deryl> color coding, stepping back and forth like a regular debugger etc
<deryl> exception management, the works
<deryl> gks, hehe nice, kept me from having to :to in FF to find it
<gks> that gives an example of how it works
<deryl> love pentadactyl for firefox - vim keysets
<ianbishop> is there a convention for naming gems that should start with a number?
<deryl> don't think convention encourages starting with a number i thought
<deryl> err didn't
<ianbishop> well, it doesn't - you can't have modules start with numbers
<deryl> then its not convention :)
<ianbishop> but, for instance, i'm writing an API for the 500px api
<ianbishop> what do I call it? :)
<ianbishop> that's what I'm asking
<ianbishop> *a gem for the 500px api
<deryl> five-hundred-api or something
<deryl> nothing wrong with a longer name if you want to follow conventions
Boohbah has quit [Ping timeout: 276 seconds]
<ianbishop> hm, ok - thanks
<deryl> np
<bambanx> brb
pdtpatrick has quit [Quit: pdtpatrick]
Boohbah has joined #ruby
berkes has quit [Ping timeout: 265 seconds]
perryh_away is now known as perryh
apok has quit [Quit: apok]
voodoofish430 has quit [Quit: Leaving.]
niklasb has joined #ruby
Hanmac1 has joined #ruby
beneggett has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Hanmac has quit [Ping timeout: 245 seconds]
gks has quit [Quit: Linkinus - http://linkinus.com]
classix has joined #ruby
Zolrath has quit [Ping timeout: 252 seconds]
mdw_ has quit [Remote host closed the connection]
Zolrath has joined #ruby
ymasory has quit [Quit: Ex-Chat]
Targen has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
IPGlider has quit []
Tomasso has joined #ruby
xiaotian has quit [Ping timeout: 252 seconds]
c0rn has quit [Ping timeout: 245 seconds]
sporkbomb has quit [Quit: leaving]
TobsCore has joined #ruby
gilaniali has joined #ruby
<gilaniali> Hi. What is the difference in using a block loop or using an each/do loop? Dont they achive the same purpose
jayrulez has quit [Ping timeout: 252 seconds]
_numbers has joined #ruby
<_numbers> im trying to do @cycle = lambda{ i=0; (i += 1).odd? 'odd' : 'even' }
<_numbers> but i dont understand how to use closures to make the variable i static so that it is remembered each time @cycle is called
davidpk has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
fayimora_ has joined #ruby
c0rn has joined #ruby
kenperkins has joined #ruby
vitor-br has quit [Ping timeout: 246 seconds]
williamcotton has quit [Quit: williamcotton]
fayimora has quit [Ping timeout: 264 seconds]
fayimora_ is now known as fayimora
itnomad has quit [Remote host closed the connection]
<_numbers> zebra = lambda { i = 0; self.class.send(:define_method, :stripe) do; i += 1; i.odd? ? 'odd' : 'even'; end }; zebra.stripe; zebra.stripe;
cousine has quit [Remote host closed the connection]
kenperkins has quit [Client Quit]
goodieboy has joined #ruby
looopy has quit [Remote host closed the connection]
niku4i has joined #ruby
gilaniali has quit [Ping timeout: 245 seconds]
MrGando has joined #ruby
_numbers has left #ruby [#ruby]
luckyruby has joined #ruby
vitor-br has joined #ruby
looopy has joined #ruby
<bambanx> i to much diference of ruby 1.9.3 and 1.9.2?
indian has quit [Ping timeout: 240 seconds]
Zolrath has quit [Quit: Computer has gone to sleep.]
DRCALKIN has joined #ruby
rasbonics has joined #ruby
indian has joined #ruby
indian has quit [Changing host]
indian has joined #ruby
alfakini has joined #ruby
MrGando has quit [Quit: Bye]
Aaton is now known as Aaton_off
khakimov has quit [Quit: Computer has gone to sleep.]
nowthatsamatt has joined #ruby
albemuth has joined #ruby
alfakini has quit [Client Quit]
maletor has quit [Quit: Computer has gone to sleep.]
kenperkins has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
noyb has quit [Ping timeout: 245 seconds]
xpot-station has quit [Ping timeout: 260 seconds]
albemuth has quit [Client Quit]
c0rn has quit [Quit: Computer has gone to sleep.]
oddraisin has quit [Ping timeout: 244 seconds]
yannis has quit [Quit: yannis]
<shevy> bambanx well 1.9.3 has more bug fixes
<shevy> so more broken behaviour should be on 1.9.2
kenperkins has quit [Quit: Computer has gone to sleep.]
<bambanx> ok thanks shevy
dbgster has joined #ruby
jmontross has quit [Quit: Leaving.]
jjjj has quit [Quit: Leaving.]
jjjj1 has quit [Quit: Leaving.]
jjjj has joined #ruby
jmontross has joined #ruby
krusty_ar has quit [Remote host closed the connection]
Urth|Away is now known as Urthwhyte
JStoker has quit [Ping timeout: 244 seconds]
cpruitt has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
heyjax has joined #ruby
cpruitt has quit [Read error: Connection reset by peer]
serroba has joined #ruby
jjjj has quit [Ping timeout: 248 seconds]
jmontross has quit [Ping timeout: 248 seconds]
cpruitt has joined #ruby
kvirani has joined #ruby
digitalcakestudi has quit [Quit: Leaving.]
niklasb has quit [Ping timeout: 246 seconds]
alfakini has joined #ruby
nfk has quit [Quit: yawn]
kenneth has joined #ruby
<kenneth> hey, so i'm trying to gem install zmq, and i'm getting compiler errors rbzmq.c:126: warning: ISO C90 forbids mixed declarations and code
heyjax has quit [Quit: heyjax]
<kenneth> er well actually that's a warning, but there's a bunch of errors too
prtksxna_ has joined #ruby
deryldoucette has quit [Read error: Connection reset by peer]
prtksxna has quit [Read error: Connection reset by peer]
deryldoucette has joined #ruby
deryldoucette is now known as Guest82308
eurek has joined #ruby
adeponte has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
<td123> kenneth: if the errors are the problem, you should probably paste the errors :)
<kenneth> rbzmq.c:1675: error: ‘ZMQ_HWM’ undeclared (first use in this function)
<kenneth> for example
pting has quit [Quit: Ex-Chat]
eurek has quit [Client Quit]
<kenneth> here's the whole lot of them
robacarp_ has joined #ruby
horseman has quit [Remote host closed the connection]
<td123> kenneth: which zeromq version are you using?
noyb has joined #ruby
<kenneth> latest stable
<td123> kenneth: 2.2.0?
<kenneth> zeromq-3.1.0
alfakini has quit [Quit: This computer has gone to sleep]
<td123> that's a beta release :P
<Boohbah> the log says zmq-2.1.4
<kenneth> oh wait really?
<kenneth> whoops
alfakini has joined #ruby
<td123> Boohbah: that's the gem version, I was wondering about the zeromq service :)
khakimov has joined #ruby
<Boohbah> oh, my bad
<td123> kenneth: I got it to build fine with zeromq 2.2.0
igotnolegs has quit [Quit: Computer has gone to sleep.]
niklasb has joined #ruby
seanstickle has joined #ruby
alfakini has quit [Client Quit]
<Manhose> Quick question.
Bosma has joined #ruby
<Manhose> I have a Rails app (disclaimer: question not rails related).
<Manhose> I have to validate:
<Manhose> - A facebook oauth token
<Manhose> - A google oauth2 token
<Manhose> Any gems that do this for me?
looopy has quit [Remote host closed the connection]
jayrulez has joined #ruby
araujo has quit [Quit: Leaving]
horseman has joined #ruby
franksort has joined #ruby
<franksort> What does the ||= operator do?
<seanstickle> franksort: conditional assignment
<graspee> i would have guessed wrong!
<deryl> if the left hand variable is not set, then set it to the right hand. if it is set, use it
<bambanx> franksort, || is OR
looopy has joined #ruby
iamjarvo has quit [Quit: Leaving.]
<bambanx> || = OR && = AND franksort
<bambanx> hey graspee
<bambanx> :)
<franksort> Thanks
choffstein has quit [Remote host closed the connection]
<Manhose> If anyone has a minute to read my question I'd be thankful!
<seanstickle> Manhose: the answer is "yes"
looopy has quit [Remote host closed the connection]
<Manhose> seanstickle: why are you so mean
<Manhose> Let me rephrase
<Manhose> Which gems do this for me?
<seanstickle> Manhose: because I am not a cheap replacement for google?
fayimora has quit [Read error: Connection reset by peer]
<Manhose> seanstickle: google yielded no decent results
fayimora has joined #ruby
baroquebobcat has joined #ruby
<Manhose> if it did for you, do share your search query if you would be so kind
<Urthwhyte> Manhose: omniauth, devise are the two big ones
<Manhose> keep in mind, I'm not interested in authentication
<horseman> seanstickle: sup stick
<Manhose> I just want to validate a token my android app will pass to my rails app
<seanstickle> Hey horseman
<seanstickle> Do I knows you?
<Urthwhyte> So you want to check it's a valid token?
<Urthwhyte> Just make a request with it
<Urthwhyte> problem solved.
radic has quit [Disconnected by services]
radic_ has joined #ruby
<Manhose> Urthwhyte: can you explain?
radic_ is now known as radic
<horseman> seanstickle: u bet yo candy ass
<Urthwhyte> You want to validate a token, i.e make sure it's a usable token?
<Manhose> Yes.
indian has quit [Ping timeout: 252 seconds]
<seanstickle> horseman: I seem to not recognize your nick
<Urthwhyte> Make a request to the service with it
dankest has quit [Ping timeout: 244 seconds]
<kenneth> /home/kenneth/chartbot/chartboost.rb:2:in `require': libzmq.so.1: cannot open shared object file: No such file or directory - /home/kenneth/.rvm/gems/ruby-1.9.3-p0/gems/zmq-2.1.4/lib/zmq.so (LoadError)
<kenneth>
<Manhose> Hm, Urthwhyte
<kenneth> what's going on here, why is it trying to use zmq.so in the gem folder
<kenneth> shouldn't it just use the system zmq lib?
<Urthwhyte> kenneth: open up a ruby shell and try 'which zmq`?
<kenneth> a ruby shell?
khakimov has quit [Ping timeout: 265 seconds]
looopy has joined #ruby
<Urthwhyte> make sure you're using `
<Urthwhyte> ruby-1.9.2-p290 :003 > `which ruby`; => "/Users/Nick/.rvm/rubies/ruby-1.9.2-p290/bin/ruby\n"
khakimov has joined #ruby
<Manhose> hey Urthwhyte, is there an inbuilt gem for these sort of simple requests?
<kenneth> what are you trying to achieve Urthwhyte ? i can do a which from a regular shell (no need for ruby), but that won't help me with zmq, it's a library not a binary
<kenneth> [d ~/chartbot•master]$ ls /home/kenneth/.rvm/gems/ruby-1.9.3-p0/gems/zmq-2.1.4/lib
<kenneth> zmq.so
<kenneth> the native extension is there tho
<Urthwhyte> Trying to work out why it's loading from the gempath
<kenneth> i think that's just the native extension
<Manhose> thanks, man
<Urthwhyte> cheers
williamcotton has joined #ruby
Carson_ has joined #ruby
<Urthwhyte> kenneth: when you installed zmg did you pass it with -- --with-zmq-dir ?
<kenneth> i did not
zeromodu_ is now known as zeromodulus
stefanp has quit [Ping timeout: 265 seconds]
<kenneth> my zmq is in the default /usr/local, but i'll give that a try
<kenneth> oh yeah that did the trick
<kenneth> i guess it was looking in… uh… /usr?
<Urthwhyte> Yea, probably
khakimov has quit [Quit: Computer has gone to sleep.]
robacarp_ has quit [Ping timeout: 249 seconds]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
fayimora has quit [Quit: Be back in a gifii]
<Urthwhyte> kenneth: http://gembundler.com/rationale.html#faq-4 has the info to add the flag to bundler
<bambanx> Urthwhyte, what is zeromq?
<kenneth> bambanx: awesomeness
<Urthwhyte> It's a messaging library
<bambanx> kenneth, ?
<bambanx> for what you use for example?
<Urthwhyte> You use it to tie together queues, backend workers, etc...
<bambanx> in simple words pls :)
<kenneth> bambanx: for large distributed systems
<bambanx> is a library?
<kenneth> so you can decouple the components and have true separation of concerns between processes
<kenneth> also, language agnosticness
<bambanx> is like a node.js?
<kenneth> no, not really
<kenneth> it's a library you can use to communicate between different component. you can use it to send messages between processed, and scale various bits independently
<bambanx> nice
<kenneth> say you have an api that uploads images
<kenneth> you might create on zmq message from the api endpoint and return immediately
<bambanx> cool
<bambanx> its works with rails?
<kenneth> and then one of 20 workers (because it's a resource intensive task) will resize and reformat the images, which create new zeromq messages
<kenneth> another step might pick it up, and create a "publish message" that is then used by several more pieces
austinbv has joined #ruby
n8ji has quit [Remote host closed the connection]
<kenneth> eventually, analytics and the friend feed service and accounting service all listen for that message for different reasons
<kenneth> (analytics wants to track everything, feed service wants to add the image to the feed, and accounting wants to bill you the $1 it costs to upload an image)
<bambanx> damn
<kenneth> a lib like zeromq lets you build all these components independently, scale them independently, and have them work together within an extremely complex system
<kenneth> it works on every language, every platform
<kenneth> so i can use a ruby api and a php dashboard and a java accounting system and a pure c fraud detection service, if i wanted
iamjarvo has joined #ruby
iamjarvo has quit [Remote host closed the connection]
griffindy has joined #ruby
goodieboy has quit [Remote host closed the connection]
ZachBeta has quit [Quit: Computer has gone to sleep.]
fearoffish has quit [Quit: Computer has gone to sleep.]
<horseman> seanstickle: sup stick
<seanstickle> Hey horseman
<seanstickle> Do I knows you?
<bambanx> hey
<horseman> ye
<seanstickle> horseman: I seem to not recognize your nick
<horseman> banister
dankest has joined #ruby
<seanstickle> Ahhh
<seanstickle> You are a sneaky one
<horseman> seanstickle: whta's up stick
<seanstickle> Got a job, excited to start.
<seanstickle> How about you?
<bambanx> guys can give me a hand with this pls
<bambanx> i have a file csv data = files.map {|file| CSV.read(file, :headers => true, :converters=>:all) };
adeponte has joined #ruby
<bambanx> and i am filtering using this p data[0].find_all {|f| f['jumps'] == 0 && f['bid'] == "True" && f['price'] > 6.04}
<bambanx> the result of this filters data, for example how i can get the max or min value?
<bambanx> p data[0].max dont work =/
<kenneth> excellent
<horseman> seanstickle: programming cocoa shiznite
<kenneth> i got it working
<seanstickle> horseman: hey, me too!
<seanstickle> With the MacRuby
<kenneth> i now have an irc chatbot that will publish every message it sees over zmq, and say anything it receives over another zmq socket
<horseman> seanstickle: objc here, i dont trust macruby yet
<kenneth> which means that we can now connect our entire backend to our chatbot seamlessly. fuck yeah!
<seanstickle> Dirty Ruby traitor!
<Urthwhyte> kenneth: there's no limit on message size right?
<horseman> seanstickle: when macruby gets stable i'll prob. switch, but i experienced too many weird crashes and missing features
Manhose has quit [Ping timeout: 245 seconds]
<horseman> seanstickle: also objc is a nice language it's mind expanding to learn it
baroquebobcat has quit [Quit: baroquebobcat]
one8zero has quit [Quit: one8zero]
<seanstickle> I have enough languages to expand my mind
<seanstickle> I just want to build some stuff
<horseman> seanstickle: wht are you building?
<seanstickle> horseman: right now, vim package manager
<horseman> oh ok
<kenneth> Urthwhyte: nope
<seanstickle> you?
<horseman> seanstickle: why did u choose cocoa rather than a cross platform solutionn?
<seanstickle> horseman: because I use a Mac
<horseman> seanstickle: ah ok, so it's just for u?
<seanstickle> horseman: and whoever else wants to use it
DRCALKIN has quit [Ping timeout: 260 seconds]
<seanstickle> Maybe I'll put it in the Mac App Store
<horseman> seanstickle: how far have you got with cocoa? understanding all the strange target/action and outlet idioms?
<seanstickle> horseman: nope
jetblack has joined #ruby
<horseman> seanstickle: oh ok, just started then?
<seanstickle> Mostly just pretty looking GUIs
<horseman> seanstickle: oh ok, so u haven't wired up the GUI yet?
<seanstickle> Right
razer123 has quit [Quit: Lost terminal]
<seanstickle> Although the HotCocoa stuff looks pretty easy that way
DRCALKIN has joined #ruby
<horseman> seanstickle: one annoying thing about learning macruby (i guess) is that all the documentation is still in objc, right?
goodieboy has joined #ruby
<horseman> esp. if u want to stray off the beaten path and use 3rd party libraries like GCDASync, for example
<horseman> seanstickle: so you'll have to at least be able to read objc i think
<seanstickle> More like interpret
<horseman> seanstickle: well for some of the non trivial examples you'll probably have to read it, i guess
<seanstickle> We'll find out.
<horseman> since the syntax can get pretty weird :P
<seanstickle> This app is a warmup to a Puppet configuration Cocoa app
williamcotton has quit [Quit: williamcotton]
<bambanx> guys give me a hand here pls http://pastie.org/3969514
jayrulez has quit [Quit: Leaving]
Carson_ has quit [Ping timeout: 248 seconds]
khakimov has joined #ruby
<bambanx> ?
bambanx has quit [Read error: Connection reset by peer]
bambanx has joined #ruby
<bambanx> i lost conexion
adeponte has quit [Remote host closed the connection]
<bambanx> i dunno if someone answer me about this pls /msg NickServ identify
<bambanx> sorry this http://pastie.org/3969514
JC_SoCal_ has quit [Quit: Connection closed for inactivity]
<bambanx> hello?
baroquebobcat has joined #ruby
brngardner has quit [Remote host closed the connection]
Dreamer3 has joined #ruby
Eiam has quit [Ping timeout: 252 seconds]
<bambanx> guys how i can replace this WHERE from this code pls : p data.each {|p| p p['price'].max WHERE p['bid'] == True}
<bambanx> i mean using ruby language
ryanf has quit [Quit: leaving]
<seanstickle> Are you following some tutorial, or a book or something?
<bambanx> tutorials from diferent places
<bambanx> and i am making my own program
<bambanx> i need filter this data
<seanstickle> bambanx: you might consider getting one of the standard texts
<bambanx> what u mean seanstickle ?
<seanstickle> bambanx: your questions are all over the map, but they're all covered in the first couple chapters of any Ruby book
kalleth__ has quit [Ping timeout: 252 seconds]
ank has quit [Quit: ank]
niklasb has quit [Ping timeout: 265 seconds]
kalleth_ has joined #ruby
<bambanx> is not easy read in english all books for me
<bambanx> english is not my native language
<seanstickle> What is your native language?
<bambanx> but dont worry seanstickle
<bambanx> spanish
ank has joined #ruby
albemuth has joined #ruby
L-----D has joined #ruby
vitor-br has quit [Quit: Saindo]
ipoval has joined #ruby
choffstein has joined #ruby
looopy has quit [Remote host closed the connection]
austinbv has quit [Quit: austinbv]
<bambanx> seanstickle,
<bambanx> when i use to._i sometimes its trunk my number , how i can pre define my format ?
cha1tanya has quit [Read error: Connection reset by peer]
<seanstickle> I don't know what that means
choffstein has quit [Ping timeout: 240 seconds]
<graspee> it always truncates your number that's what it does
<graspee> 15.7 goes to 15
<graspee> 15.1 goes to 15
<graspee> 15.99999999999 goes to 15
<bambanx> thanks graspee :)
<graspee> if you want to round up if it's over .5 or something then you need a different function
<bambanx> graspee, but in case i need use float . i mean decimals?
tk___ has joined #ruby
<graspee> i'm not sure what you mean
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
<bambanx> if i dont wanna truncate
<kenneth> it's weird, i have this code: https://gist.github.com/312bb21c181b9b962bf6
<bambanx> use all number
<bambanx> including .919129
<kenneth> if i comment out the mongo connect, my zmq socket works fine
<kenneth> if i connect to mongo my zmq socket doesn't receive anything. wtf?
looopy has joined #ruby
neersighted has quit [Read error: Connection reset by peer]
fayimora has joined #ruby
khakimov has quit [Ping timeout: 252 seconds]
kenneth has quit [Quit: kenneth]
td123 has quit [Quit: WeeChat 0.3.7]
williamcotton has joined #ruby
khakimov has joined #ruby
noyb has quit [Ping timeout: 244 seconds]
shadoi has joined #ruby
advorak has joined #ruby
neersighted|AFK has joined #ruby
choffstein has joined #ruby
neersighted|AFK is now known as neersighted
diegoviola has joined #ruby
<diegoviola> how do i pass a variable from one class/method to another class/method?
cha1tanya has joined #ruby
<diegoviola> sorry for the n00b question
<bnagy> greetings humans, happy saturday
<diegoviola> human? what's that?
<diegoviola> j/k
<bnagy> bambanx: Float#round, not to_i (but don't use Floats for money)
<bambanx> lol
<bnagy> diegoviola: I dunno what you mean by 'pass variables'? Can you pastie pseudocode or something?
<horseman> diegoviola: you've been a noob for about 1 year now, right? :)
<bambanx> thanks bnagy
<bnagy> hm kenneth left
<bnagy> horseman: and it's not even my birthday!
<diegoviola> horseman: i will forever be one i guess
<bambanx> bnagy, can you give me a hand with this pls http://pastie.org/3969514 i am trying to do a analog code for ruby like this WHERE from this code pls : p data.each {|p| p p['price'].max WHERE p['bid'] == True}
<bnagy> if you replaced WHERE with if in that line it would be ruby
shadoi has quit [Remote host closed the connection]
<bnagy> diegoviola: oh. Don't do that. :)
<bnagy> it shatters encapsulation
albemuth has quit [Quit: Computer has gone to sleep.]
<Boohbah> diegoviola: what are you trying to do?
<bnagy> diegoviola: however, you'd need an instance of A where foo has already been called
<diegoviola> k
<diegoviola> ty
<diegoviola> that works too
<diegoviola> tought it's not the same
<bambanx> bnagy, p data.each {|p| p p['price'].max if p['bid'] == True} this give me this error : uninitialized constant Trader::True (NameError)
<bnagy> well it's 'True' in your data (a string)
<bnagy> diegoviola: yeah that's 'normal' code
kenneth has joined #ruby
<diegoviola> bnagy: ty
<bambanx> bnagy, i fix 'true' now return this :[#<CSV::Table mode:col_or_row row_count:456>]
<bnagy> bambanx: you need to experiment yourself in irb
<bambanx> bnagy, yeah i am doing
ryanf has joined #ruby
kenichi has joined #ruby
<bnagy> in that pastie, you have an array of CSV::Row objects
kenichi has quit [Remote host closed the connection]
<bnagy> bambanx: http://ruby-doc.org/core-1.9.3/Enumerable.html read that, memorize it all
<bambanx> bnagy, ok
<bnagy> Enumerable is arguably the most important module in Ruby
<bambanx> bnagy, look this pls http://pastie.org/3969655
<bnagy> in this case, I suspect max_by {|row| row['price']} might be what you're after
goodieboy has quit [Remote host closed the connection]
choffstein has quit [Remote host closed the connection]
yankov has joined #ruby
goodieboy has joined #ruby
savage- has joined #ruby
seanstickle has quit [Quit: Nihil sub sole novum]
<bambanx> damn bnagy you are my hero all days \o/ ( not gay shit)
<bambanx> works !!!
razer123 has joined #ruby
emmanuelux has quit [Ping timeout: 264 seconds]
<bambanx> bnagy, looks maybe is not a elegant code i know can be improved but works well http://pastie.org/3969672
adeponte has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
<bnagy> bambanx: just fyi most people just write select instead of find_all
<bnagy> but they're the same method
<bambanx> ok
<bnagy> and you know that's only the max from the first file, I assume
cha1tanya has quit [Ping timeout: 246 seconds]
<bambanx> yeah
<bnagy> read those Enumerable docs
<bambanx> i am thinking on use a while bnagy for iterate all files
<bnagy> there will be a test
<bnagy> do not use while. I still stab you if you go back to using your crazy loops
<bnagy> s/still/will
<bambanx> ok i will read now
<bnagy> pay special attention to 'each', for example ;)
kenperkins has joined #ruby
rippa has joined #ruby
<bambanx> ok bnagy and thanks
lkba has quit [Ping timeout: 245 seconds]
ananthakumaran has joined #ruby
<bambanx> yeah i can use a each instead a while
<bnagy> :)
havenn has joined #ruby
<bambanx> bnagy, u use git for control version?
<bnagy> yeah
<bnagy> I'm not sure how it got so popular, since torvalds is a fucking lunatic, but hey
<bambanx> lol
gtuckerkellogg has joined #ruby
<bambanx> i will download all your code and sell to bill gates
<bnagy> sounds like a good business plan
<bambanx> :P
<bnagy> I'm oretty sure MS wouldn't be able to work out how to write a COM wrapper for their own debugger
<bambanx> hehe
harukomoto has joined #ruby
<bambanx> bnagy, which editor you use rubymine?
<bambanx> vim?
<bnagy> vim for life, man
ananthakumaran has quit [Quit: Leaving.]
yetanotherdave has joined #ruby
<diegoviola> vim for ever
<diegoviola> my vimrc
havenn has quit [Remote host closed the connection]
lkba has joined #ruby
DRCALKIN has quit [Quit: Leaving]
<bambanx> diegoviola, which plugins use? nerdtree?
<ryanf> pretty short list
<diegoviola> i keep my config small
<diegoviola> i'm thinking about splitting my config into multiples files but it's ok like that still
<diegoviola> bambanx: I just go around with :e C^d or n /path/to/dir/*.rb
<diegoviola> bambanx: then ,p and ,n to switch between buffers, etc
<diegoviola> bambanx: or ctags
baroquebobcat has quit [Quit: baroquebobcat]
<bambanx> cool
<diegoviola> ctrl ], ctrl T, etc
<bambanx> i used vim now i am using sublime text
<diegoviola> ctrl-], ctrl-t, etc
<diegoviola> ok
<bambanx> i feel good looking sublime is very nice
<bambanx> but i now the power of vim
<diegoviola> vim is <3
wvms has left #ruby [#ruby]
aruntomar has joined #ruby
igotnolegs has joined #ruby
<bambanx> .each is awesome
<bambanx> python have some like .each on ruby?
<diegoviola> for()?
<bambanx> k
goodieboy has quit [Remote host closed the connection]
<bambanx> why you choose ruby? diegoviola ? and bnagy ?
<bambanx> this is my first language i try to learn serious
<bambanx> python dont like me the spaces shits
<bambanx> and java have a lot of tecnical stuff i dont need , this is why i choose ruby and is easy i think
franksort has quit [Quit:]
<diegoviola> bambanx: i remember i was doing php back in the days then i heard of the rails hype and i switched to it, but before that i knew ruby already, from projects like xmms2 that used it and other things
<diegoviola> bambanx: then i tried rails and i liked it at first but rails 2.x was kinda opinionated and then i started learning ramaze and other frameworks in ruby
<diegoviola> bambanx: i still kinda like rails but i prefer ramaze now, and i don't like activerecord :D
<bambanx> i am learning ruby for use rails, in some blogs i readed for learn rails i dont need learn ruby cos its have all his own things, what u thing?
<diegoviola> bambanx: i prefer sequel
<diegoviola> ok
<bambanx> ramaze is a framework too like rails?
<deryl> hah, if you want to use rails, you're going to have to learn ruby. its a framework for ruby. how could you not
<diegoviola> bambanx: i guess you can say that, it's a framework that works around rack (like rails) but it's more modular
<diegoviola> bambanx: http://ramaze.net check it out
<deryl> manveru wrote it
<bnagy> my brain likes ruby
<bambanx> yeah i am checking
AlbireoX`Laptop has joined #ruby
<bambanx> who is manveru?
<diegoviola> deryl: rails is fine but i don't like ActiveRecord
<bambanx> why dont like? diegoviola
<diegoviola> it hides too much i think
<deryl> good thing even rails doesn't limit you to ar
gtuckerkellogg has quit [Ping timeout: 252 seconds]
<bnagy> it's as 'efficient' as perl, but I can read my own code after I've written it
<bambanx> and sinatra ?
<bambanx> never i used a framework on ruby i will choose one later
Chryson has quit [Quit: Leaving]
<bnagy> I think I wrote one web app, ever, cause I was forced to
<diegoviola> try working with an existing PostgreSQL database that has about 1000 tables and custom relationships, store prodecures, triggers and try to map all that to ActiveRecord and tell me how fun it is....
<bambanx> for now i think rails cos i am not a guru programmer i can find solutions of all in google
<bnagy> used ramaze and Sequel
<diegoviola> *procedures
<bnagy> they both work, without loading too much crap onto you
prtksxna_ has quit [Remote host closed the connection]
<diegoviola> bnagy: so what do you use now?
<horseman> bambanx: what country are you from, out of interest?
<bnagy> diegoviola: I don't write web apps :)
<diegoviola> bnagy: what you write?
<bambanx> in many blogs i read about the 'revolution' of non-blocking frameworks (or servers? ) in ruby we have too? i hear about golliath
<bambanx> horseman, i am from chile
<bnagy> diegoviola: concurrent stuff, essentially
<bambanx> :)
<diegoviola> bnagy: with ruby?
<bambanx> 30 minutes from here http://www.google.cl/search?q=salto+del+laja&oe=utf-8&rls=org.mozilla:es-ES:official&client=firefox-a&channel=np&um=1&ie=UTF-8&hl=es&tbm=isch&source=og&sa=N&tab=wi&ei=RmbAT9DLB4m88ASo3c2XCw&biw=1280&bih=661&sei=SGbAT6XeO4mSgweB88XACQ
<bnagy> yeah, with ruby, but with beanstalkd and zeromq underneath
griffindy has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
amalvagomes_ has joined #ruby
<diegoviola> nice
<bambanx> annd u horseman ?
<bnagy> I should rewrite on celluloid, but it's a lot of agents
<horseman> bambanx: cool, i knew a girl from chile once, she was an overstayer in holland and got discovered and booted out :P
<bambanx> hehe
<bnagy> so I think I'll just steal all his ideas and add them to my messaging layer instead :)
anton-zaytsev has joined #ruby
<bambanx> guys this things non-blocking like node.js or tornado we have in ruby too?
<anton-zaytsev> it is calling eventmachine as I know
<diegoviola> celluloid doesn't do that?
<bambanx> is zeromq?
<bnagy> non blocking doesn't really mean all that much by itself
amalvagomes has quit [Ping timeout: 240 seconds]
amalvagomes_ is now known as amalvagomes
<diegoviola> yawn @node, i wouldn't be happy coding with JS
albemuth has joined #ruby
<bambanx> this eventmachine are more faster than a simple server like apache , tomcat?
<bnagy> goliath is a really nice use of the technology
<bnagy> apache is not a 'simple' anything
<bnagy> except 'security disaster' maybe
<bambanx> i wanna do a web for sell cars, i am very confused in the future which technology i will use
<diegoviola> bambanx: ramaze
<bnagy> yeah, and in a year or so when the JVM coroutine support is all shiny you'll be able to run it on jruby :P
<bambanx> i wanna use ruby with some framework but i dont know more :/
<diegoviola> bambanx: join #ramaze
<bambanx> ok
<diegoviola> ramaze is a good web framework, it's just ruby
<diegoviola> i like it
<bambanx> i dunno i need ask to my master first bnagy what u think about it?
<bambanx> hehehe
<bnagy> pff
<diegoviola> i don't understand why rails overcomplicates things too much
<diegoviola> like activerecord
<diegoviola> too much abstraction
<diegoviola> ...
<bnagy> I know nothing about web stuff
<bambanx> diegoviola, and sinatra?
<bnagy> but I will admit that ramaze is more my style than rails
<diegoviola> bambanx: it's fine too
<diegoviola> ramaze is KISS
<bambanx> have a good performance?
<bnagy> I dunno how it performs though
<diegoviola> bambanx: yup
<bambanx> better than rails?
<bnagy> diegoviola: what's the engine?
<diegoviola> bnagy: in ramaze?
<diegoviola> bnagy: it's build on rack
<bnagy> surely it would be hard to perform worse than rails
<diegoviola> and it runs on rubinius, jruby, mri, etc, etc
<diegoviola> so performance depends in how those VMs perform too
<diegoviola> i guess
<diegoviola> i'm not an expert though
<diegoviola> manveru is the man
<bambanx> i will check thanks diegoviola
austinbv has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
<bambanx> but i think my problem is when i find a new or a little comunity framework it dont have a lot of tutorials and solutions you need to make all code , i think is good , but if i am not a expert coder maybe the best choise is use some have a lot of things on the web
<bnagy> bambanx: nah just learn to code
<bambanx> at least i found one bnagy on the ramaze channel lol
<bnagy> cargo cult programming is a disease
dhruvasagar has joined #ruby
<bambanx> i think i choose a knowin framework like rails for learn basics like sessions , cache , and all this stuff have a web app and later i change for some more flexible
looopy has quit [Remote host closed the connection]
<diegoviola> bambanx: one thing i like so much about ramaze is that it's minimal, it doesn't force a specific structure for your application and it's very modular, it gets out of the way
<diegoviola> bambanx: and it's all ruby
<diegoviola> bambanx: the community might be small but very friendly
pdtpatrick has joined #ruby
<bambanx> cool
freakazoid0223 has quit [Remote host closed the connection]
yxhuvud has joined #ruby
<bambanx> what hosting are u using for this diegoviola ?
<bambanx> heroku?
benyarb has joined #ruby
anton-zaytsev has quit [Quit: Leaving]
gtuckerkellogg has joined #ruby
<diegoviola> bambanx: ramaze works fine in heroku like any other rack application
<diegoviola> bambanx: but i'm using linode right now
<bambanx> cool
ciopte7 has joined #ruby
<diegoviola> i like heroku too, though
Urthwhyte is now known as Urth|Away
<bambanx> i think is expensive heroku
<bambanx> i used webfaction
<bambanx> you use mongo with ramaze? diegoviola
fserb has joined #ruby
benyarb has left #ruby [#ruby]
nlc has quit [Remote host closed the connection]
<diegoviola> bambanx: i use postgresql with the sequel library http://sequel.rubyforge.org/
<diegoviola> bambanx: but i like mongo too, and it works fine with ramaze
benyarb has joined #ruby
<diegoviola> Sequel is super awesome
davidcelis has joined #ruby
<bambanx> i pay a linode for experiment with ramaze
<diegoviola> the people in #sequel are just amazing (jeremyevans), he is very supportive
<bambanx> tomorrow i will my credit card is far now :P
<diegoviola> i never seen anyone else that is as dedicated as this guy is
<diegoviola> to support people
<diegoviola> with a project
<bnagy> Sequel is doing it right
<bambanx> bnagy, support me all days is my best ruby friend hehehe
<diegoviola> you can spend days asking stuff in #rubyonrails about your activerecord problem, but with sequel it's 100% guaranted you will get help in less than 24 hours, if you are in #sequel
<bnagy> you can have fluffy ORM or you can use actual SQL
<bambanx> afk 4m
<bnagy> bambanx: I'll help anyone that shows signs that they are also working themselves and trying to learn
* offby1 does pushups
<bnagy> but I won't be a human interface to the docs
fayimora has quit [Quit: Busy…..zzzzz]
<horseman> offby1: sup pig
savage- has quit [Remote host closed the connection]
<bnagy> I weep for the idleness of #jruby and #zeromq :(
Oog_ has joined #ruby
ank has quit [Quit: ank]
* bnagy shakes his tiny fist FIX MY PROBLEM FOR ME!!
Oog_ is now known as Oog
cirwim has joined #ruby
dhaskew_ has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ is now known as dhaskew
ank has joined #ruby
<Oog> im using a library that uses Daemons - i need the child processes to redirect their stdout to the parent process. how can i do this?
dbgster has quit [Quit: dbgster]
dankest has quit [Quit: Leaving...]
bigkm has joined #ruby
<diegoviola> bambanx: take a look at how simple it's to layout a ramaze app, 3 files: https://gist.github.com/2792468
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
<diegoviola> bambanx: with rails i'd had to "rails new app" for that, and create a huge tree just for that
<diegoviola> i can even put that in the same file and make it even simpler
<diegoviola> ...
icy` has joined #ruby
icy` has quit [Changing host]
icy` has joined #ruby
dhruvasagar has quit [Ping timeout: 244 seconds]
aruntomar has quit [Ping timeout: 246 seconds]
imami|afk is now known as banseljaj
pwned has joined #ruby
<bnagy> Oog: in general I think that's a job for open3
<bnagy> btu I dunno how that ties in with Daemons
<Oog> what is open3
<Oog> i see
<bnagy> open3 is what opens your child process and gives you access to its 3 pipes
<bnagy> in out err
<bnagy> it's almost certainly how Daemons works under the hood
<bnagy> but I didn't read their code
visof has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
Urth|Away is now known as Urthwhyte
EspadaV8 has left #ruby [#ruby]
Urthwhyte is now known as Urth|Away
pen has quit [Remote host closed the connection]
Hanmac1 is now known as Hanmac
austinbv has quit [Quit: austinbv]
gh has joined #ruby
<bambanx> bnagy, a xml is a csv file? if not i can work with it like a csv file?
ananthakumaran has joined #ruby
ananthakumaran has quit [Client Quit]
kenperkins has quit [Quit: Computer has gone to sleep.]
adeponte has quit [Ping timeout: 240 seconds]
gh has left #ruby [#ruby]
kil0byte has joined #ruby
aruntomar has joined #ruby
<bnagy> no, they're not even vaguely similar
L-----D has quit [Quit: Leaving]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
tommyvyo_ is now known as tommyvyo
<davidcelis> lol
<bnagy> you'd need to ask one of the web guys, but I believe nokogiri is the go-to xml tool?
jenrzzz-mac has joined #ruby
davidcelis has quit [Remote host closed the connection]
<epochwolf> bnagy: it's a good one
<epochwolf> libxml can also be used.
<epochwolf> I prefer nokogiri
davidcelis has joined #ruby
mdw has joined #ruby
ghanima has quit [Quit: Leaving.]
<cirwim> nokogiri is the best!
<davidcelis> the docs kinda suck tho
<cirwim> that's why pry has the show-source command aliased to $ :)
<diegoviola> we could improve the docs
<cirwim> I'm not sure exactly what I'd change
<cirwim> maybe an introductory article or two
<cirwim> there are API docs that are pretty thorough, but it's hard to find what you are looking for like that
rippa has quit [Ping timeout: 245 seconds]
Criztian has joined #ruby
cantonic has quit [Quit: cantonic]
austinbv has joined #ruby
<kenneth> so
<kenneth> oh wait nvm
<bambanx> the code what generate ruby is binary?
<kenneth> bambanx: ruby is interpreted
<kenneth> not compiled
<bnagy> uh
<bambanx> but it generate other code for the machine?
<bnagy> interpreted and compiled stopped being distinct sets many years ago
<kenneth> well, sure, you've got JIT
<bnagy> kenneth: did you sort your zmq problem btw?
<bnagy> I was gonna help but you bailed
<kenneth> sorry, had to drive home
martisj has joined #ruby
<kenneth> i was still at the office at 9pm
<bnagy> :<
<bambanx> here is 2 22 am lol
visof has quit [Ping timeout: 246 seconds]
<bnagy> kenneth: my first guess is that the mongodb call hangs so it only looks like your zmq stuff isn't working
<kenneth> right, i just tested that and looks correct
<bnagy> the only thing weird about your code is not creating the context as its own var, and then creating the socket
<bnagy> but it obviously works without the db conn
<bnagy> ok cool :)
<martisj> I am trying to find best practices for developing with ruby on mac os x. My biggest concern is how I should interact with the default ruby version installed on Mac OS X, and how i should install gems?
<kenneth> it's weird because the exact same mongodb call worked in a different script earlier, but looks like that's the problem
<kenneth> martisj: i use rvm
<bnagy> martisj: imho use a version manager
<bnagy> the system ruby on osx sucks
<kenneth> gave up on the default osx packages a long time ago, they're all crappy
<martisj> what about rbenv?
<bnagy> <3 rbenv
<martisj> lesser system footprint
<martisj> alright ;)
<bnagy> works fine for me on lion
<davidcelis> rbenv++
<martisj> bnagy: and when you want to install gems do you run sudo gem install?
<davidcelis> i was glad to switch to it from RVM
mdw has quit [Remote host closed the connection]
<davidcelis> martisj: god no
<bnagy> martisj: no just gem install
<martisj> bnagy: where does that install the gems?
serroba has quit [Quit: This computer has gone to sleep]
<bnagy> rbenv doesn't have gemsets, so you need to do it once per version, but that;s fine by me
<davidcelis> martisj: your home folder
aruntomar has quit [Quit: Leaving]
<bnagy> martisj: by default in your ~/.rbenv tree
<davidcelis> martisj: rbenv gets installed in ~/.rbenv
<martisj> bnagy: so you've set rbenv global and then you can use gem install ?
<davidcelis> and every ruby/gem you install gets put in there
<martisj> davidcelis, bnagy sweet :)
<martisj> thanks
austinbv has quit [Quit: austinbv]
<martisj> i assume i have to set rbenv global first .?
Natch| has quit [Ping timeout: 248 seconds]
<kenneth> oh hey, bnagy more weirdness
<bnagy> martisj: depends, sometimes I use rvm shell, but yeah whichever ruby is in use will also be the gem shim in use
<kenneth> i tried using a context var for the zmq context, and boom, fixed…?
<martisj> bnagy: i see thanks
<kenneth> what the major … f?
albemuth has quit [Quit: Leaving...]
<bnagy> kenneth: ahh, nice. Like I said, that was the only weirdness about your code
Natch| has joined #ruby
<bnagy> maybe it got GC'ed cause you didn't assign it :)
<kenneth> i don't understand… like , at all, why it would do that. gc makes sense, kind of…?
sepp2k has joined #ruby
<kenneth> i take it that assigning mongo put it over the edge and made the gc kick in, or something?
<bnagy> well you never assigned it to a variable, so I guess it's fair game, no?
cj3kim has joined #ruby
<bnagy> it was probably always going to fail at some point, then
<kenneth> yeah, i guess. that's why i don't like gcs
<bnagy> kenneth: try GC.disable at the start, if you're curious
<kenneth> you think you don't have to worry about memory, but it fucks you over
<kenneth> okay lemme try that
<bnagy> and go back to the old pattern, obviously
<kenneth> right, and yep
<kenneth> it's totally the GC
<kenneth> facepalm
* bnagy wins
* kenneth slaps GC with a trout
charliesome has joined #ruby
* kenneth likes C better than ruby right now because i can malloc and free as i please
<bnagy> well, to be fair, it was dodgy code
<kenneth> hmm, sure, but i've never heard of having to worry about the gc in ruby
<bnagy> also, the stuff they say about crossing over stuff in threads? They mean that shit.
<kenneth> you'd figure something like creating a socket with the context ought to retain the context until the socket goes away
<bnagy> kenneth: well it was just doing its job - you didn't keep a ref to your context
<kenneth> right
<kenneth> i'm just glad i caught it
<kenneth> any good articles on threading and memory management
<kenneth> like, low-level gotchas kinda thing
<kenneth> ?
<bnagy> zmq guide :)
mengu has joined #ruby
<kenneth> no i mean, for ruby
<kenneth> not zmq
<kenneth> in general
<bnagy> because the FFI gem is a fairly thin wrapper about a C lib, you have to be a tony bit more careful than usual, that's all
<bnagy> \*tiny
<bnagy> well the GC is interpreter dependant
tomb_ has quit [Ping timeout: 240 seconds]
<bnagy> as are the threading implementations
<kenneth> omg! i just thought of the greatest thing
<kenneth> rubygem for libdispatch
<kenneth> could that be done?
tomb_ has joined #ruby
<bnagy> I don't know what that is :)
<bnagy> oic
<bnagy> for some reason I thought macruby already used gcd
<bnagy> but I dunno if it is (or will ever be) ready for prod
dankest has joined #ruby
<bnagy> I'm not that great with internals, but my guess is that something that deep would need to be done in the interpreter, not as a gem
<bnagy> but that could just be wrong
<kenneth> yeah i have no idea how deep you can go with native extension gems
<kenneth> but i've been using lib dispatch a lot (which is available on all unix platforms, actually, not just OSX)
<kenneth> and it's fantastic
<kenneth> best concurrency model i've seen yet
<Hanmac> in my wx- bindings i tricked the GC so the objects are not GC'd as long wx itself says no
<bnagy> holy crap someone ported it to win32
<kenneth> i should probably file an issue with the zmq gem github
Oog has quit [Quit: Page closed]
voodoofish has quit [Ping timeout: 245 seconds]
robert___ has joined #ruby
Axsuul has quit [Read error: Connection reset by peer]
<bnagy> Hanmac! You'll be happy to know I ran this: find . -type f | xargs sed -i '' -e "s/require File.dirname( __FILE__ ) + ['\"]\//require_relative '/"
<bnagy> kenneth: imho it's not an issue
* Hanmac is happy 'aye'
mosheee has joined #ruby
mosheee has quit [Changing host]
mosheee has joined #ruby
fayimora has joined #ruby
<bnagy> the example code also assigns the context as its own var - and there is doc on how to deal with contexts vs sockets etc in multithreaded patterns
baroquebobcat has joined #ruby
<bnagy> ie one context per process etc
baroquebobcat has quit [Client Quit]
fayimora_ has joined #ruby
<Hanmac> bnagy in my wx binding you dont need variables :P
<bnagy> well ffi-rzmq is a nice thin FFI wrapper, which I endorse, because I can read the code and understand exactly how it works
<bnagy> like he wrote 0 C code
<bnagy> tricking the GC goes under the heading of 'spooky' for me :)
<bnagy> now I just need to work out why ffi-rzmq does not work with jruby and a JVM that uses invokedynamic :(
fayimora has quit [Ping timeout: 264 seconds]
fayimora_ is now known as fayimora
robert___ has quit [Ping timeout: 244 seconds]
<bnagy> debugging deep jvm voodoo makes me weep salty tears
robert_ has quit [Read error: No route to host]
moshee has quit [Read error: No route to host]
nyuszika7h has quit [Quit: WeeChat 0.3.8-rc2]
<davidcelis> bro if your tears weren't salty you'd have a serious problem
<bnagy> like what?
igotnolegs has quit [Read error: Connection reset by peer]
<horseman> davidcelis: bro it's not worth it, davidcelis is a troll, dont go there bro, just let it go srsly
igotnolegs has joined #ruby
<horseman> i'll back u up no matter what, but im just sayin he aint worth it
igotnolegs has quit [Client Quit]
<davidcelis> like a salt deficiency
<davidcelis> horseman: GIRL YOU DONT KNOW MY WORLD
<bambanx> csv need to be separate by comas ?
<bambanx> coms ' , '
igotnolegs has joined #ruby
<bnagy> bambanx: do Comma Separated Value files need to be separated by commas?
<bnagy> no idea, man
<davidcelis> i vote: no
<Hanmac> bambanx no, but you otherwise i need to say it whats the seperator is
<bambanx> just spaces
* cirwim saves his tsv's with csv extensions for Microsoft Excel compatibility
<bambanx> i need read a file with two columns and all data is separate by spaces
<cirwim> bambanx: you can use String#split for this
schovi has joined #ruby
<bambanx> yeah
mikeric has quit [Quit: mikeric]
mengu has quit [Ping timeout: 246 seconds]
nyuszika7h has joined #ruby
<bambanx> i am learning to use csv maybe i can use it too
<bnagy> or if you want to still use the CSV lib you can use :col_sep=>' '
razer123 has quit [Quit: Lost terminal]
<bnagy> but it's not csv, dammit!
<bambanx> this structure have http://pastie.org/3970030
voodoofish has joined #ruby
b1rkh0ff has joined #ruby
<bnagy> irb use. test must.
nirakara has joined #ruby
davidpk has quit [Quit: Computer has gone to sleep.]
<bnagy> but I reckon if you just add that col_sep option to your existing pattern it should work
cha1tanya has joined #ruby
<bambanx> bnagy, and make some like data.each { |line| myarray << line } ?
<bnagy> well not if you're using CSV, it will make it a nice 2d array for you already
<bambanx> irb use. test must. <== this sound like master yoda
ananthakumaran has joined #ruby
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
<bambanx> i will try both
<bnagy> File.foreach('fname.NOTADAMNCSV').with_object([]) {|l, ary| ary << l.split(' ')}
<bnagy> r something
davidpk has joined #ruby
<bnagy> it's definitely time to get stars
Criztian has quit [Remote host closed the connection]
ph^ has joined #ruby
<kenneth> uh god ømq is finicky
<kenneth> can't get this to work quite right
looopy has joined #ruby
<kenneth> making progress, but slowly
<bambanx> bnagy, here is the path ? ('fname.NOTADAMNCSV')
foofoobar has joined #ruby
tvw has joined #ruby
<bambanx> damn my editor is stucked bnagy i need to find other way is to much data
nirakara has quit [Quit: This computer has gone to sleep]
ananthakumaran has quit [Quit: Leaving.]
cj3kim has quit [Quit: This computer has gone to sleep]
<kenneth> can you see something obviously wrong with my code? https://gist.github.com/72dfecf39a96a6173d61
mucker has quit [Quit: leaving]
horseman has quit [Read error: Connection reset by peer]
mengu has quit [Remote host closed the connection]
horseman has joined #ruby
havenn has joined #ruby
<charliesome> kenneth: what's supposedly wrong with it?
havenn has quit [Remote host closed the connection]
<kenneth> not sure, it's not pulling messages
<bambanx> bnagy, :col_sep=>' ' this works but take all the spaces any way to take only the first space?
Andrew__ has joined #ruby
ph^ has quit [Remote host closed the connection]
khakimov has quit [Quit: Computer has gone to sleep.]
<Andrew__> quiet ehre..
pdtpatrick has quit [Quit: pdtpatrick]
Andrew__ has quit [Client Quit]
charliesome has quit [Quit: charliesome]
<kenneth> oh looks like it works now
<kenneth> and i didn't even change my code
charliesome has joined #ruby
<kenneth> this is freaking alchemy
horseman has quit [Ping timeout: 244 seconds]
Andrew__ has joined #ruby
Solnse has joined #ruby
CheeToS has joined #ruby
tomzx has quit [Ping timeout: 245 seconds]
Andrew__ has quit [Client Quit]
yankov has quit [Quit: yankov]
<Hanmac> kenneth its maybe the pull variable ... what version of zmq did you use? the ffi one or the native one?
<kenneth> native
<kenneth> i have an error on line 20 but that should not affect it
<kenneth> fixed it
<kenneth> btw
<kenneth> anyway, it's past midnight on a friday night
<kenneth> i really should not be coding
<kenneth> especially work stuff
<kenneth> bnagy: i'm curious, why are you using jruby / jvm?
<kenneth> performance?
banseljaj is now known as imami|afk
martisj has quit [Remote host closed the connection]
danielpunt has joined #ruby
dankest has quit [Quit: Linkinus - http://linkinus.com]
<bambanx> gn all thanks bnagy
bambanx has quit [Quit: Saliendo]
ukwiz has joined #ruby
horseman has joined #ruby
ph^ has joined #ruby
piotr_ has joined #ruby
Codif has joined #ruby
ddv has joined #ruby
luckyruby has quit [Remote host closed the connection]
Morkel has joined #ruby
danielpunt has quit [Remote host closed the connection]
sepp2k has quit [Remote host closed the connection]
araujo has joined #ruby
jobicoppola has quit [Quit: Leaving...]
bosphorus has joined #ruby
Morkel has quit [Quit: Morkel]
banseljaj has joined #ruby
arturaz has joined #ruby
austinbv has joined #ruby
rindolf has joined #ruby
looopy has quit [Remote host closed the connection]
jenrzzz-mac has quit [Quit: jenrzzz-mac]
akem has quit [Ping timeout: 260 seconds]
blacktulip has joined #ruby
horseman has quit [Remote host closed the connection]
tvw has quit [Ping timeout: 246 seconds]
tvw has joined #ruby
jenrzzz-mac has joined #ruby
nilg` has joined #ruby
horseman has joined #ruby
cha1tanya has quit [Ping timeout: 256 seconds]
ryanf has quit [Quit: leaving]
tvw has quit [Ping timeout: 245 seconds]
icooba has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ has joined #ruby
bigkm has quit [Quit: Computer has gone to sleep.]
azm has joined #ruby
cha1tanya has joined #ruby
Azure is now known as zz_Azure
ipoval has quit [Quit: ipoval]
fayimora_ has joined #ruby
icooba has quit [Quit: icooba]
fayimora has quit [Ping timeout: 264 seconds]
fayimora_ is now known as fayimora
BeLucid has quit [Remote host closed the connection]
zeromodulus has quit [Remote host closed the connection]
foofoobar has quit [Quit: Computer has gone to sleep]
emmanuelux has joined #ruby
jenrzzz-mac has quit [Quit: jenrzzz-mac]
ph^ has quit [Remote host closed the connection]
davidpk has quit [Quit: Computer has gone to sleep.]
zeromodulus has joined #ruby
foofoobar has joined #ruby
visof has joined #ruby
visof has quit [Changing host]
visof has joined #ruby
visof has quit [Client Quit]
AlbireoX`Laptop has quit [Remote host closed the connection]
banseljaj has quit [Quit: Ex-Chat, Bye Bye]
TheHunter_1039 has quit [Quit: TheHunter_1039]
ixti has joined #ruby
piotr__ has joined #ruby
indian has joined #ruby
piotr_ has quit [Ping timeout: 260 seconds]
Jackneill has joined #ruby
Codif has quit [Remote host closed the connection]
BeLucid has joined #ruby
kaspernj has joined #ruby
Shoobdidoo has joined #ruby
Shoobdidoo has quit [Remote host closed the connection]
mvangala_ has joined #ruby
codespectator has quit [Quit: Computer has gone to sleep.]
CheeToS has quit [Ping timeout: 248 seconds]
shevy has quit [Read error: Operation timed out]
king313 has joined #ruby
foofoobar has quit [Quit: bb]
blacktulip has quit [Remote host closed the connection]
jbw has quit [Ping timeout: 240 seconds]
igotnolegs has quit [Quit: Computer has gone to sleep.]
mdw has joined #ruby
serroba has joined #ruby
indian has quit [Read error: Operation timed out]
odinswand has quit [Ping timeout: 240 seconds]
mdw has quit [Remote host closed the connection]
dbgster has joined #ruby
sohocoke has joined #ruby
indian has joined #ruby
mikeric has joined #ruby
perryh is now known as perryh_away
lkba has quit [Ping timeout: 240 seconds]
jbw has joined #ruby
bigkm has joined #ruby
dnyy has quit [Remote host closed the connection]
imami|afk is now known as banseljaj
cirwim has quit [Quit: Leaving.]
mikeric has quit [Quit: mikeric]
RegEchse has joined #ruby
odinswand has joined #ruby
nfk has joined #ruby
mvangala_ has quit [Ping timeout: 260 seconds]
keppy has joined #ruby
mikeric has joined #ruby
<keppy> in python you can pass a key to a method as a parameter; can you do this in ruby? method(param, key=alphanumeric)
mikeric has quit [Client Quit]
<Alantas> Not as such, but you *can* pass a hash. method(herp, derp, fire: hot, water: wet) # 1.9 syntax
<Alantas> 1.8 would be method(herp, derp, :fire=>hot, :water=>wet)
<Alantas> Either way, the method receives three args, the third being a Hash.
<Alantas> (It's syntactic sugar for method(herp, derp, {:fire=>hot, :water=>wet}))
<keppy> Ah I see, thanks.
mvangala_ has joined #ruby
mvangal__ has joined #ruby
Muz_ is now known as Muz
iocor has joined #ruby
dnyy has joined #ruby
indian has quit [Ping timeout: 244 seconds]
mvangala_ has quit [Ping timeout: 245 seconds]
RegEchse has quit [Remote host closed the connection]
nikhil_ has joined #ruby
RegEchse has joined #ruby
ananthakumaran has joined #ruby
TobsCore has quit [Ping timeout: 252 seconds]
joshman_ has joined #ruby
gemmes has joined #ruby
gemmes has quit [Client Quit]
nimred has quit [Ping timeout: 260 seconds]
A124 has joined #ruby
A124 has left #ruby [#ruby]
nikhil_ has quit [Quit: This computer has gone to sleep]
mikeric has joined #ruby
yonggu has quit [Read error: Connection reset by peer]
yonggu has joined #ruby
Y_Ichiro has quit [Read error: Connection reset by peer]
ph^ has joined #ruby
sohocoke has quit [Quit: Computer has gone to sleep.]
mohits has joined #ruby
Ammar_iD has joined #ruby
ddv has quit [Quit: *poof*]
<arturaz> python way is better though :(
<arturaz> method(herp, derp, fore: hot, water: wet) <-- still no error
krz has quit [Quit: krz]
Ammar01 has quit [Ping timeout: 252 seconds]
Guest73052 has quit [Ping timeout: 240 seconds]
<horseman> arturaz: what are you trying to do
<horseman> arturaz: ah nm
sohocoke has joined #ruby
ananthakumaran has quit [Ping timeout: 260 seconds]
ananthakumaran has joined #ruby
oktapodi has joined #ruby
dnyy has quit [Remote host closed the connection]
nirakara has joined #ruby
cha1tanya has quit [Read error: Connection reset by peer]
Solnse has quit [Read error: No route to host]
sonkei has quit [Ping timeout: 245 seconds]
dhaskew has joined #ruby
dhaskew_ has quit [Read error: Connection reset by peer]
kaneda has joined #ruby
kaneda is now known as Guest385
austinbv has quit [Quit: austinbv]
ramblex has joined #ruby
webusnix has joined #ruby
JStoker has joined #ruby
dhaskew has quit [Ping timeout: 245 seconds]
bigkm has quit [Quit: Computer has gone to sleep.]
bigkm has joined #ruby
gtuckerkellogg has joined #ruby
zastaph has joined #ruby
fr0gprince_mac has joined #ruby
andriod has joined #ruby
andriod has left #ruby [#ruby]
banseljaj is now known as imami|afk
ramblex has quit [Ping timeout: 244 seconds]
<charliesome> arturaz: nothing stopping you from making sure that the hash keys are correct, just like you'd want to do in python with **kwargs
davidcelis has quit [Read error: Connection reset by peer]
<arturaz> charliesome, yeah, but well, extra work!
<charliesome> arturaz: yeah, true
ramblex has joined #ruby
ramblex has quit [Client Quit]
cha1tanya has joined #ruby
<keppy> meh potato potato
nimred has joined #ruby
nimred has quit [Changing host]
nimred has joined #ruby
davidcelis has joined #ruby
oktapodi has quit [Remote host closed the connection]
Resure has joined #ruby
charliesome has quit [Ping timeout: 265 seconds]
noganex has quit [Ping timeout: 245 seconds]
mvangal__ has quit [Ping timeout: 244 seconds]
<keppy> Yeah but ruby is better cause you don't HAVE to say "method(halla, key=othermethod)"... we get to say blueunicorns: foobar :p
noganex has joined #ruby
mneorr has joined #ruby
<arturaz> is it really so different?
lxsameer has joined #ruby
<keppy> No, but the word key is so... 'exclusive'. heh. I want to use syntactic sugar in EVERY LINE.
dbgster has quit [Quit: dbgster]
yannis has joined #ruby
sei has joined #ruby
<keppy> I propose we do away with line breaks and indentation completely. Where's mats? Tell him to get someone on this.
oktapodi has joined #ruby
indeterminate has quit [Ping timeout: 252 seconds]
Shoobdidoo has joined #ruby
becom33 has joined #ruby
Shoobdidoo has quit [Client Quit]
<arturaz> i have no idea what you're talking about
kvirani has quit [Remote host closed the connection]
mikeric has quit [Quit: mikeric]
Guest385 has quit [Ping timeout: 240 seconds]
tayy has joined #ruby
ramblex has joined #ruby
nirakara has quit [Quit: This computer has gone to sleep]
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Ping timeout: 245 seconds]
bgupta has quit [Remote host closed the connection]
bgupta has joined #ruby
dhaskew has joined #ruby
oktapodi has quit [Remote host closed the connection]
<Alantas> You can also pass a pre-prepared hash in place of using the literals.
<Alantas> args[:foo] = bar if herp?(derp); method(lol, wut, args) # choosing at runtime whether to pass a given arg.
cantonic has joined #ruby
cousine has joined #ruby
manizzle has quit [Quit: Leaving]
pygospa has quit [Disconnected by services]
graspee has quit [Quit: leaving]
pygospa has joined #ruby
nirakara has joined #ruby
bigkm has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
kaneda_ has joined #ruby
nirakara has quit [Ping timeout: 265 seconds]
mengu has joined #ruby
arturaz has quit [Ping timeout: 246 seconds]
nirakara has joined #ruby
impulze has joined #ruby
<impulze> i'm facing a problem in this code snippet http://dpaste.com/752346/
<impulze> what can i do to overcome the problem that the condition_variable is signaled (i.e. true) before i start waiting?
charliesome has joined #ruby
VegetableSpoon has joined #ruby
<impulze> or better yet, i want to wait until one thread finished working if one thread did even start in my producer queue
<impulze> not sure if this is the right approach
<impulze> i've always seen it the other way round, the main thread notifies, the threads wait
`brendan has joined #ruby
cousine has quit [Remote host closed the connection]
Morkel has joined #ruby
andriod has joined #ruby
andriod has left #ruby [#ruby]
TheHunter_1039 has joined #ruby
tchebb has quit [Quit: Leaving.]
tomb_ has quit [Quit: Computer has gone to sleep.]
kil0byte has quit [Remote host closed the connection]
tchebb has joined #ruby
cantonic has quit [Remote host closed the connection]
ddv has joined #ruby
nirakara has quit [Quit: This computer has gone to sleep]
<keppy> impulze: what version of ruby is the referenced code going to run on?
<impulze> 1.9.3
gmci has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
mohits has quit [Ping timeout: 244 seconds]
charliesome has quit [Read error: Connection reset by peer]
mohits has joined #ruby
charliesome has joined #ruby
VegetableSpoon has quit [Quit: Leaving]
kil0byte has joined #ruby
nirakara has joined #ruby
goodieboy has joined #ruby
goodieboy has quit [Remote host closed the connection]
gift has quit [Remote host closed the connection]
fbernier has joined #ruby
gift has joined #ruby
fgwaegeawgfwa has quit [Ping timeout: 245 seconds]
RegEchse has quit [Quit: <3 WeeChat (v0.3.8-rc2)]
<burgestrand> impulze: if this is a producer/consumer thing, you might want to consider using Queue
tomb_ has joined #ruby
d34th4ck3r has joined #ruby
<burgestrand> And as far as working with mutexes/condvars go I usually find it more convenient to use ruby’s Monitor along with #new_cond, the API is usually nicer to work with
<burgestrand> impulze: finally, you should always do your condvar.wait in a loop and check against a certain condition, because you might receive spurious wakeups while in wait (i.e. before somebody has signalled)
<burgestrand> (but the #new_cond condvar from Monitor actually does this for you if you use the Monitor::ConditionVariable#wait_until method)
<impulze> ah
tchebb has quit [Quit: Leaving.]
<impulze> i've seen Queue but don't know how to apply it to my problem
<burgestrand> impulze: it’s not entirely clear what your code is supposed to do, or why you even need a mutex/condvar in that code — is workers.process block supposed to be something executed in another thread?
nirakara has quit [Quit: This computer has gone to sleep]
<impulze> wait i think i can come up with a better example
* burgestrand popcorn
<impulze> ;)
tchebb has joined #ruby
amalvagomes_ has joined #ruby
amalvagomes has quit [Ping timeout: 244 seconds]
amalvagomes_ is now known as amalvagomes
zinjacoder has joined #ruby
Gavilan has joined #ruby
foofoobar has joined #ruby
fr0gprince_mac has quit [Quit: Leaving...]
kenperkins has joined #ruby
fixl has joined #ruby
choffstein has joined #ruby
<impulze> that was my idea
<impulze> so if the main thread doesn't have to poll but only wake up if a thread finished working (or of course continue the loop if no thread started)
<burgestrand> impulze: you don’t want some kind of return value from the worker threads when they finish?
<impulze> hm nope
jcromartie has joined #ruby
tchebb has quit [Quit: Leaving.]
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<horseman> burgestrand: burgdiggitydogg!
<burgestrand> looks just like a regular work queue, but the loop/process is a bit strange
<burgestrand> horseman: \o — how’s your machine learning going?
becom33 has quit [Ping timeout: 245 seconds]
<horseman> burgestrand: pretty good, onto neurtal networks
<horseman> burgestrand: i have a compiler course 'mid term' on monday :P
<burgestrand> hehe
<horseman> burgestrand: how's your course going
<burgestrand> horseman: it’s nice, but I’m finishing my bachelor thesis this week so it’ll have to be on hold for another week
<impulze> burgestrand: my problem is the notification to the main thread once one thread has finished working
schovi has quit [Remote host closed the connection]
<impulze> i'm not sure how to make sure that the notification doesn't happen before the waiting
<burgestrand> impulze: I’d use two queues; one where you put work, and another queue where you put results
<burgestrand> impulze: to wait for a worker to finish, you just try to take a value out of the result queue
horseman has quit [Read error: Connection reset by peer]
<impulze> i want to avoid polling though
<burgestrand> the queues don’t do polling, if you try to pop something from it Ruby will block until there is something that can be popped
Morkel has quit [Quit: Morkel]
<impulze> ah right
<impulze> queue.deq(false) won#t
<impulze> burgestrand: thanks, that makes sense :)
<burgestrand> something like that
horseman has joined #ruby
<burgestrand> doesn’t really matter what kind of value you push on the result queue either
<impulze> Thread.start(@work_queue, @result_queue) do |workq, resultq|
<burgestrand> if you want you could just push a bunch of profanity symbols
<impulze> what's the point of this?
<impulze> can't you just use @*queue inside the thread?
<burgestrand> impulze: yeah, difference is that @*queue variables can also be reassigned, might be or might not be what you want, I just do it by reflex
<burgestrand> Essentially it just assigns two locals to those values
<impulze> ah
mohits has quit [Ping timeout: 246 seconds]
<impulze> burgestrand: "Retrieves data from the queue. If the queue is empty, the calling thread is suspended until data is pushed onto the queue. If non_block is true, the thread isn’t suspended, and an exception is raised."
<impulze> appearently i'm using the wrong queue?
bbttxu has quit [Quit: bbttxu]
goodieboy has joined #ruby
<burgestrand> impulze: non_block is the parameter you give to pop/dequeue
<burgestrand> impulze: if you try to retrieve a value of an empty queue without blocking an error is raised instead, so you know you got no value
<impulze> yeah but that's polling than again
pxjorge has joined #ruby
<impulze> *then
<impulze> i want to avoid looping if i have no new results
<burgestrand> impulze: yeah, but that’s only if you use non_block, if you don’t the default behaviour for Ruby is to wait
horseman has quit [Read error: Connection reset by peer]
<impulze> ah
<burgestrand> ruby uses mutex/condvar internally to wait for the queue to be filled by someone if it’s empty
<impulze> *too much going on in my brain* ;)
<burgestrand> Give me a minute I’ll show you :)
<impulze> no need
<impulze> really
<impulze> the more i do with this, the more i know
<impulze> you've already shown enough
<impulze> never would've thought of using two queues
<impulze> but that seems like a nice way to do it
goodieboy has quit [Remote host closed the connection]
<burgestrand> Well, it works well if you don’t care if the threads may start/finish before you have time to wait for exactly when it happens
<impulze> what's the "but"? :)
<burgestrand> You!
horseman has joined #ruby
<burgestrand> I don’t know what you’re asking for impulze ^^
<impulze> i mean you said "it works well .... "
<impulze> i expected a "but ..."
<burgestrand> hehe
<burgestrand> It doesn’t work well if you want to do something between process/waiting while at the same time being sure the worker threads don’t start before you have time to do whatever you want to do
<burgestrand> But it looks like you don’t care if the worker threads finish before you have time to wait for them to finish
<impulze> yep
<burgestrand> And frankly I can’t think of a case where it would matter, but I’m sure there is some constraint somewhere that would want that behaviour
<burgestrand> I’d probably just use another queue if that was the case, I like the Queue :P
sepp2k has joined #ruby
tchebb has joined #ruby
tchebb has quit [Read error: Connection reset by peer]
tchebb has joined #ruby
joshman_ has quit [Quit: Computer has gone to sleep.]
sohocoke has quit [Ping timeout: 252 seconds]
jmeeuwen has quit [Quit: Disconnecting from stoned server.]
yannis has quit [Quit: Bye!]
Tux|Ubuntu has joined #ruby
jmeeuwen has joined #ruby
SimSala has joined #ruby
<impulze> works perfectly :D thanks a lot
<burgestrand> :)
<Tux|Ubuntu> Hi
<impulze> ho
<Tux|Ubuntu> how to add custom lib for ruby install with rvm ?
<Tux|Ubuntu> i have docbook/dockbook.rb for ruby 1.8
<Tux|Ubuntu> can use this with 1.9 with rvm ruby install ?
<Tux|Ubuntu> I want to use dbtoepub :)
sohocoke has joined #ruby
ronniy has joined #ruby
choffste_ has joined #ruby
choffstein has quit [Read error: Connection reset by peer]
shevy2 has joined #ruby
becom33 has joined #ruby
niku4i has quit [Remote host closed the connection]
ZachBeta has joined #ruby
pxjorge has quit [Ping timeout: 244 seconds]
choffste_ has quit [Read error: Connection reset by peer]
choffstein has joined #ruby
mvangala_ has joined #ruby
yankov has joined #ruby
choffstein has quit [Remote host closed the connection]
dhaskew has quit [Read error: Connection reset by peer]
dhaskew has joined #ruby
dhaskew_ has joined #ruby
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ is now known as dhaskew
fbernier has quit [Ping timeout: 246 seconds]
Gavilan has quit [Ping timeout: 256 seconds]
dhaskew has quit [Read error: Connection reset by peer]
dhaskew_ has joined #ruby
dhaskew_ is now known as dhaskew
niklasb has joined #ruby
mickn has joined #ruby
Gavilan has joined #ruby
nilg` has quit [Remote host closed the connection]
jcromartie has quit [Quit: jcromartie]
pxjorge has joined #ruby
rushed has joined #ruby
bbttxu has joined #ruby
Resure has quit [Remote host closed the connection]
krusty_ar has joined #ruby
kil0byte has quit [Remote host closed the connection]
distax has joined #ruby
distax has quit [Client Quit]
distax has joined #ruby
SimSala has quit [Quit: Reconnecting]
SimSala has joined #ruby
distax has quit [Client Quit]
ramblex has quit [Quit: ramblex]
thecreators has joined #ruby
brngardner has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
bbttxu has quit [Quit: bbttxu]
ramblex has joined #ruby
ramblex has left #ruby [#ruby]
bbttxu has joined #ruby
ramblex has joined #ruby
ZachBeta has joined #ruby
fixl has quit [Remote host closed the connection]
yetanotherdave has quit [Quit: yetanotherdave]
pxjorge has quit [Ping timeout: 244 seconds]
diegoviola has quit [Quit: leaving]
kil0byte has joined #ruby
fbernier has joined #ruby
sonkei has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
iocor has quit [Quit: Computer has gone to sleep.]
chson has quit [Remote host closed the connection]
<shevy2> lalla
pxjorge has joined #ruby
blacktulip has joined #ruby
mvangala_ has quit [Remote host closed the connection]
<horseman> shevy2: hey!!
fbernier has quit [Ping timeout: 246 seconds]
foofoobar has quit [Quit: Computer has gone to sleep]
<shevy2> :P
<shevy2> my damn internet connection...
shevy2 is now known as shevy
<rking> One shevy is already more than enough, but 2??
<shevy> when I get reconnected
<shevy> was easier to append a number to the nick
<shevy> than come up with another nick
<shevy> :)
rindolf has quit [Quit: Yay! I'm a llama again. http://www.shlomifish.org/]
pxjorge has quit [Ping timeout: 250 seconds]
td123 has joined #ruby
mvangala_ has joined #ruby
mvangala_ has quit [Remote host closed the connection]
iocor has joined #ruby
Larudac has joined #ruby
itnomad has joined #ruby
Larudac has left #ruby [#ruby]
mickn has quit [Quit: Leaving]
bbttxu has quit [Quit: bbttxu]
ananthakumaran has joined #ruby
<rking> phord, dodj, pontyyac, and rollzroice were all taken?
ananthakumaran1 has quit [Ping timeout: 252 seconds]
<shevy> that sounds like random names!
<rking> =|
<rking> I can't decide if I should explain and risk countertroll.
<rking> I already got trololol'd pretty good the other day, I'll pass, this time.
ipoval has joined #ruby
<shevy> what happened the other day?
pxjorge has joined #ruby
fr0gprince_mac has joined #ruby
<Hanmac> he forgot to block banister
choffstein has joined #ruby
<shevy> lol
gtuckerkellogg has quit [Quit: Computer has gone to sleep.]
mvangala_ has joined #ruby
kenperkins has quit [Quit: Computer has gone to sleep.]
<horseman> shevy: hey shevrolet
kenperkins has joined #ruby
<shevy> okular annoys me
<shevy> when I am on fluxbox it wants to open a new instance
<shevy> so I get spawned one okular instance per .pdf file
<Hanmac> is he a horse, a man or a troll?
<shevy> so, now I use wine + acrobat reader because that opens in only one instance + tabs
<shevy> :(
<shevy> Hanmac, I think he is one of the four apocalyptic horsemen rider
choffstein has quit [Ping timeout: 245 seconds]
<Hanmac> yeah he is plague
Morkel has joined #ruby
pastjean has joined #ruby
pxjorge has quit [Ping timeout: 244 seconds]
<RBV> How would you read data from a file written in something like C, like struct { int a; char b; float c; } into ruby?
bondar has joined #ruby
kyktommy has joined #ruby
bondar has quit [Client Quit]
<canton7> RBV, String#unpack
cantonic has joined #ruby
seanstickle has joined #ruby
mvangala_ has quit [Remote host closed the connection]
<td123> I know this isn't specific to ruby, but I don't know what channel to ask this in: say I want to insert a lot of documents (rows) into a database and I want to keep a constraint of having a unique field. are there any techniques to do this in any db?
mvangala_ has joined #ruby
<seanstickle> td123: unique constraints are built in to virtually every dbms
<seanstickle> td123: consult #sql
<rking> You can create SQL tables with constraints like that.
palmfrond has quit [Quit: palmfrond waves good bye]
ZachBeta has quit [Quit: Computer has gone to sleep.]
<td123> the problem is, I can't find an efficient way to bulk insert, keeping only the unique rows, and ignoring the duplicates
RudyValencia has joined #ruby
<td123> inserting row by row is going to be extremely inefficient for me
mvangala_ has quit [Remote host closed the connection]
<rking> td123: You can't dedup prior?
<seanstickle> Well, then write some Ruby code to preprocess the stuff you want to insert
<rking> It only takes a Hash.
<rking> Yes! I outtyped seanstickle on Round 2.
<seanstickle> Ha
<td123> :)
<seanstickle> Damn you Dragon Naturally Speaking!
<seanstickle> Hurry up.
<rking> Next one's tiebreaker/
digitalcakestudi has joined #ruby
mikeycgto has joined #ruby
Morkel has quit [Quit: Morkel]
<rking> seanstickle: Interesting. I'm on Android+ConnectBot.. This is (somehow) like Kasparov v. Deep Blue.
pxjorge has joined #ruby
<seanstickle> I'm not really using speech recognition.
<horseman> seanstickle: stick.
Eldariof59-ru has joined #ruby
fgwaegeawgfwa has joined #ruby
<rking> Hehe... darn. Actually, I have been meaning to set up voice control.
<td123> rking: I'm trying to avoid any in memory objects because the data will grow much larger than the memory available
<seanstickle> So memoize the thing you want to dedupe
Gavilan has quit [Ping timeout: 240 seconds]
ZachBeta has joined #ruby
<seanstickle> It's hard to give advice when you are not sharing the nature of the problem in more detail.
<td123> ya, i just reallized i need to give a bit more background
urlwolf has joined #ruby
<rking> td123: Then trade space for time - dedup one set per pass.
<td123> so, I want to write a web crawler, and I need to keep track of urls visited :)
thecreators has quit [Quit: thecreators]
pastjean has quit [Remote host closed the connection]
thecreators has joined #ruby
horseman has quit [Read error: Connection reset by peer]
dtang has joined #ruby
<RBV> td123: what will you do the crawling with?
<td123> RBV: a couple of machines, it's only a side project to see how far I can get with it :)
mohits has joined #ruby
horseman has joined #ruby
pxjorge has quit [Ping timeout: 248 seconds]
<RBV> Oh I mean what gem etc
csavola has joined #ruby
<td123> nokogiri
giftfrosch has joined #ruby
csavola has quit [Client Quit]
<td123> for html parsing
AlbireoX`Laptop has joined #ruby
<td123> the problem with web crawling is you need to implement it using a db since you will run out of memory with so many links in memory :)
<canton7> text file?
<RBV> You can get 8GB RAM and 1TB disk very cheap, you're going to crawl for a long time before you run out ;)
ZachBeta has quit [Quit: Computer has gone to sleep.]
<deryl> hell my macbook pro has 16GB of RAM in it, and 500GB drive. cheap these days to get ram and disk space :)
<td123> I'm still trying to figure out how to use a db efficiently
<Hanmac> cheap and mac cant be used in the same line
<deryl> yes they can. again you talk out your butt
<deryl> apple parts and mac can't be used in the same line, cheap and mac can. not everyone is stupid enough to pay the 3x the actual cost to apple.
fearoffish has joined #ruby
<RBV> HP and Dell charge the same for upgrades as Apple
dubellz has joined #ruby
king313 has quit [Ping timeout: 256 seconds]
<deryl> umm, dell charges 1000 for a 27" monitor? since when
Norrin_ has joined #ruby
<deryl> dell charges 1200 for an SSD drive? since when?
<RBV> We're talking RAM/HD upgrade
thecreators has quit [Read error: Connection reset by peer]
dubellz has quit [Client Quit]
<RBV> 512GB (SATA3) Mobility Solid State Drive [add $970.00] - that's Dell, Apple has theirs listed at 1,100
<deryl> well i covered the HD, and just now looking at store.apple.com I see Apple has come to their senses and started charging 200 for the 8GB upgrade
<RBV> The 128GB is the same price and the 256GB is $50 more from Apple
<deryl> when I got my MBP 11 months ago they were charging almost 800
<RBV> RAM is always going to be cheaper from NewEgg, they don't have to certify the memory with a product or provide warranty or do installations...
<seanstickle> I'm getting 16GB of RAM this week for my MBP
<seanstickle> Crazy speed, at an affordable price
pxjorge has joined #ruby
<RBV> seanstickle: It's only like $75 now right?
<deryl> seanstickle, yep. can even turn off swapping if you want.
<deryl> i did. haven't had a need for it yet
<seanstickle> RBV: $160
<seanstickle> RBV: 8GB is about $70
Tux|Ubuntu has left #ruby [#ruby]
<deryl> yeah 2x8GB 1333MHz DDR-3 MBP compatibile ram is 149.95-159.95 depending
<deryl> think I got mine from newegg.ca for 160 iirc
<seanstickle> I look forward to running many things
serroba has quit [Quit: This computer has gone to sleep]
<RBV> Slickdeals had a Corsair 16GB kit for $76 last week http://bit.ly/xgFGln
<RBV> I have almost hit 8GB on my iMac a couple times, we ordered all the new ones with 16GB upgrades (4x4GB)
<seanstickle> RBV: MBP only have 2 slots
<RBV> seanstickle: I'm talking about iMacs
<seanstickle> Aha
<deryl> seanstickle, with aperture 3, firefox, chrome, Mail, Preview, Terminal + vim + tmux et al (usually 3 or 4 term sessions going),, and 2 vmware fusion sessions constantly running, I routinely still have about 5-6GB free
<seanstickle> deryl: excellent!
Targen has quit [Ping timeout: 244 seconds]
<deryl> and it doesn't 'chug' anymore thankfully (with all that in the 8GB .. wow)
<RBV> Whoops, I goofed up the last bitly link - http://bit.ly/MPqVcR that's the RAM one
<seanstickle> I have a need for 3 VirtualBox sessions running
<seanstickle> So it sounds like 16GB will work well
<deryl> seanstickle, i don't use VB because I routinely use my wifi as my inet, and bridging wifi under VB is bomb city
<RBV> virtualboax has been crashing like crazy for me the last 3 months or so. It was 1 time a month now it does it within a few hours of starting a Ubuntu vm
<deryl> so i got fusion which runs extremely stabley
<deryl> stably
<seanstickle> deryl: Yah, I have VMware too
<RBV> deryl: And I shut off wifi bridging because I thought that was the problem but it didn't fix it
<seanstickle> deryl: but Vagrant seems to be VirtualBox specific
<deryl> seanstickle, it is unfortunately
thecreators has joined #ruby
thecreators has quit [Client Quit]
<deryl> RBV, i routinely ran ubuntu, opensuse, centos, fedora, and a couple of the minor linux distribs under VB. using the wifi constantly puked VB (and thus the VMs) Changed to fusion.. all problems went bye bye
<RBV> 8GB+SSD is enough for me for now. I just stuck my OEM MBP RAM in my iMac after upgrading
bbttxu has joined #ruby
baroquebobcat has joined #ruby
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
pxjorge has quit [Ping timeout: 256 seconds]
<deryl> ok, time for one more cup of coffee, then off to walk my rottweiler before she gets too bored and starts eating my plants again. later
sohocoke has quit [Quit: Computer has gone to sleep.]
fayimora has quit [Read error: Connection reset by peer]
zinjacoder has quit [Remote host closed the connection]
fayimora has joined #ruby
kirun has joined #ruby
cha1tanya has quit [Quit: Leaving]
zinjacoder has joined #ruby
bashdy has joined #ruby
impulze has left #ruby ["Leaving"]
brngardner has quit [Remote host closed the connection]
mpereira has joined #ruby
brngardner has joined #ruby
dkissell_ has joined #ruby
nirakara has joined #ruby
jadon has quit [Quit: jadon]
binaryplease has joined #ruby
dkissell has quit [Ping timeout: 252 seconds]
dkissell_ is now known as dkissell
pxjorge has joined #ruby
binaryplease has quit [Client Quit]
brngardner has quit [Remote host closed the connection]
ZachBeta has joined #ruby
andrewhl has joined #ruby
S1kx has quit [Ping timeout: 244 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
adeponte has joined #ruby
<bgupta> is "if variablename" functionally equivalent to "if variablename == true" for all recent versions of ruby?
<seanstickle> bgupta: no
<horseman> Stick.
<seanstickle> foo = "17"; if foo then 12 end
<seanstickle> Will return 12
<burgestrand> bgupta: it’s not for any version
<seanstickle> And you'll note that 17 != true
<seanstickle> horsie!
tdubz has joined #ruby
<Hanmac> bgupta: in ruby mosty everything is true ... except nil and false
ph^ has quit [Remote host closed the connection]
pxjorge has quit [Ping timeout: 246 seconds]
ph^ has joined #ruby
fayimora_ has joined #ruby
fayimora has quit [Read error: Connection reset by peer]
fayimora_ is now known as fayimora
<seanstickle> Hanmac: ++
indian has joined #ruby
jackiechan0 has joined #ruby
fayimora has quit [Read error: Connection reset by peer]
<jackiechan0> hey there i have a question about ELSE
<seanstickle> Well then, you should ask it
<QKO> Hanmac: yeah I thought that ruby followed C standards on that one
fayimora has joined #ruby
<seanstickle> jackiechan0: Otherwise, you'll always be frustrated and regret not asking it
sbanwart has joined #ruby
S1kx has joined #ruby
S1kx has quit [Changing host]
S1kx has joined #ruby
<Hanmac> @KO: not realy ... 0 and "" are treaten as true
<jackiechan0> when i use if else end for example if "if said == said.upcase" that means tha "else" everything else i imput goes for the other option
<QKO> 0?
<jackiechan0> seanstickle: did i make myself clear?
<QKO> "" is true in C++ too
<QKO> (be cause it's a pointer value)
ph^ has quit [Ping timeout: 252 seconds]
<jackiechan0> QKO: talking to me?
<jackiechan0> QKO: ops no sorry
<Hanmac> QKO but 0 is false in C ...
bashdy has quit [Quit: bashdy]
<QKO> jackiechan0: else means code to run for if the aforementioned if is not true
<QKO> Hanmac: yeah
<QKO> Hanmac: kinda weird it isn't in ruby tho
tdubz has quit [Read error: Connection reset by peer]
<jackiechan0> QKO: can u take a look http://codepad.org/deYkZbqy
tdubz has joined #ruby
<Hanmac> and as far as i knew it cant be changed from ruby allone
<jackiechan0> QKO: i would like to know why if i write something capitalized (Example) my program does nothing
tdubz has quit [Client Quit]
<jackiechan0> QKO: but if write something UPCASE works, numbers works, something downcase works
<Hanmac> jackiechan0 while true is dump ... use loop
<jackiechan0> Hanmac: tnx for suggestion i'm learning, using loop it suppose to have an end too?
<QKO> jackiechan0: for as far as I know it should write EN PARLA NIPOTE CARO!! to the terminal
<jackiechan0> QKO: it works sorry for the question, i'm testing it right now and if i write something different form UPCASE Word it say PARLA NIPOTE CARO right
<jackiechan0> tnx
<QKO> np
fayimora_ has joined #ruby
nirakara has quit [Read error: Connection reset by peer]
d34th4ck3r has quit [Quit: Konversation terminated!]
<jackiechan0> QKO: do you believe that running this proble into th embedded terminal of the Geany it stucks as i said ??
d34th4ck3r has joined #ruby
d34th4ck3r has quit [Remote host closed the connection]
fayimora_ has quit [Read error: Connection reset by peer]
<jackiechan0> QKO: if i run from another terminal it works!! unbelivable
fayimora_ has joined #ruby
indian has quit [Ping timeout: 246 seconds]
balazs has joined #ruby
pxjorge has joined #ruby
fayimora has quit [Ping timeout: 264 seconds]
tdubz has joined #ruby
fayimora has joined #ruby
wallerdev has joined #ruby
<balazs> hi, I'm trying to "gem install pg -- --with-pg-lib=/usr/lib" but get the error "Can't find the PostgreSQL client library (libpq)" but libpq *is* installed with "sudo apt-get install libpq"
<balazs> I have a /usr/lib/libpq.so.5.4
becom33 has quit [Ping timeout: 252 seconds]
fayimora_ has quit [Ping timeout: 264 seconds]
jackiechan0 has quit [Quit: Sto andando via]
<ramblex> balazs: try `sudo apt-get install libpq-dev`
<balazs> ramblex:that's what I did
<balazs> already the latest version
<ramblex> with the -dev?
<balazs> yes
tdubz is now known as thomas
<balazs> libpq-dev is already the newest version.
thone_ has joined #ruby
nilg` has joined #ruby
sepp2k has quit [Remote host closed the connection]
<balazs> ruby 1.9.3p194
pxjorge has quit [Ping timeout: 245 seconds]
<balazs> gem 1.8.12
choffstein has joined #ruby
thone has quit [Ping timeout: 245 seconds]
taterbase has joined #ruby
tomb_ has joined #ruby
Faris has joined #ruby
xbayrockx has quit []
ramblex has quit [Ping timeout: 256 seconds]
<Hanmac> balazs: what happend if you only do "gem install pg" ? without the extra --with stuff?
<balazs> Hanmac: same error: Can't find the PostgreSQL client library (libpq)
<balazs> googling the error suggested the extra args
<Hanmac> whats your system?
<balazs> grabbed the bitnami ubuntu server on AWS
<Hanmac> hm i have ubuntu too with lower ruby an gem versions ... and it works for me ... :/
<Hanmac> balazs: did you get more information? ... pastie me the entire log wich is printed from gem install
<balazs> Building native extensions. This could take a while...
<balazs> ERROR: Error installing pg:
<balazs> ERROR: Failed to build gem native extension.
<balazs> /opt/bitnami/ruby/bin/ruby extconf.rb
<balazs> checking for pg_config... yes
<balazs> Using config values from /usr/bin/pg_config
<balazs> checking for libpq-fe.h... yes
<balazs> checking for libpq/libpq-fs.h... yes
<balazs> checking for pg_config_manual.h... yes
<balazs> checking for PQconnectdb() in -lpq... no
<balazs> checking for PQconnectdb() in -llibpq... no
<balazs> checking for PQconnectdb() in -lms/libpq... no
<balazs> Can't find the PostgreSQL client library (libpq)
<balazs> *** extconf.rb failed ***
<balazs> Could not create Makefile due to some reason, probably lack of
<balazs> necessary libraries and/or headers. Check the mkmf.log file for more
<deryl> dude, don't paste to the damned channel
<balazs> details. You may need configuration options.
<deryl> really?
<balazs> Provided configuration options:
<balazs> --with-opt-dir
walbert has joined #ruby
<balazs> --without-opt-dir
<balazs> --with-opt-include
<deryl> gist.github.com for sharing
<balazs> --without-opt-include=${opt-dir}/include
<balazs> --with-opt-lib
<balazs> --without-opt-lib=${opt-dir}/lib
<balazs> --with-make-prog
<deryl> dumbass
<balazs> --without-make-prog
<balazs> --srcdir=.
<balazs> --curdir
<balazs> --ruby=/opt/bitnami/ruby/bin/ruby
<balazs> --with-pg
ananthakumaran1 has joined #ruby
<balazs> --without-pg
<balazs> --with-pg-dir
<balazs> --without-pg-dir
<balazs> --with-pg-include
<balazs> --without-pg-include=${pg-dir}/include
<balazs> --with-pg-lib
<balazs> --without-pg-lib=${pg-dir}/lib
<balazs> --with-pg-config
<balazs> --without-pg-config
<balazs> --with-pg_config
<balazs> --without-pg_config
<balazs> --with-pqlib
<balazs> --without-pqlib
<balazs> --with-libpqlib
<balazs> --without-libpqlib
<balazs> --with-ms/libpqlib
<balazs> --without-ms/libpqlib
<balazs> Gem files will remain installed in /opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/pg-0.13.2 for inspection.
<balazs> Results logged to /opt/bitnami/ruby/lib/ruby/gems/1.9.1/gems/pg-0.13.2/ext/gem_make.out
looopy has joined #ruby
<seanstickle> Oh go to hell
<deryl> what a fuckin idiot
dekroning has joined #ruby
<keppy> *claps*
<shevy> hahaha
<drizz> calm the fuck down
ananthakumaran has quit [Ping timeout: 244 seconds]
<shevy> balazs you should put such long information on pastie.org
<balazs> f me
<balazs> ok dude... I don't use IRC a lot...
<keppy> no it's cool ;)
<shevy> well there is always a first time, now you know so it should be ok
<shevy> unless you do it again ;)
<shevy> I know its tempting but dont ;)
* shevy prepares for a spam attack on his own ...
<shevy> you can hear the channel-happiness with the responses :)))
* deryl cats /dev/random to shevy's terminal on an endless loop
<shevy> balazs btw that is an unusual gem path that you use
<shevy> the /opt/bitnami/ruby
<shevy> you should try to find where libpq is exactly. It isn't in /usr/lib I bet
<balazs> shavy: it's /usr/lib/libpq.so.5.4
<shevy> and a libpq.so exists too?
<Hanmac> shevy he didnt know what a pastie is
<shevy> well pastie.org
<shevy> his brain can connect it
<shevy> paste goes into pastie.org
<shevy> :)
<shevy> spam goes into #ruby ;)
Faris has quit [Quit: Leaving.]
<balazs> shevy: yeah, it's a symlink
<offby1> So I already know Python, Perl, and Lisp fairly well, and am thinking "Ruby is fine but it doesn't really add anything new". Is that crazy, or is that reasonable?
<offby1> I'm not trolling, I swear :)
<offby1> (Not intentionally anyway)
<shevy> balazs well then those checks should work really. perhaps you miss some .h files
<shevy> offby1, with this list of language, I dont think ruby is any new
<shevy> they have very similar use cases
<shevy> well perhaps (lisp(is(different
<offby1> shevy: yep, pretty much my feeling. But I don't want to miss out on something slick (rails, perhaps) because of my hubris
<shevy> I dont really see any "lisp scripts", but I see shell scripts perl scripts python scripts and ruby scripts
bier has quit [Ping timeout: 265 seconds]
<offby1> unfortunately lisp isn't terribly useful.
<offby1> Even though it's my favorite language for just futzing around in
sbanwart has quit [Ping timeout: 265 seconds]
<offby1> (and to be precise: there is no one "lisp" language; instead there's a whole family of Lisp languages: Clojure, Racket, various flavors of Scheme, various Common Lisps, even Emacs Lisp)
<shevy> hehe
<shevy> oh dear
<shevy> that sucks
<shevy> that sounds as if you have 100 different languages called "lisp"
<shevy> just look at the python2 to python3 transition mess
<seanstickle> That's ok, we have a lot of different languages called "math"
<seanstickle> But we don't get too confused
<shevy> there are build scripts, in modular xorg (from source), which work with python2 but if you have python3 installed, they dont work. I reported one such error, they promised to provide a compatibility script that should work (or a new configure option, where one can disable the python bindings)
<seanstickle> Who uses Python 3 anyways?
<shevy> :P
<seanstickle> It's the Perl 6 of the Python world.
<horseman> seanstickle: Stick.
<shevy> they always say, everyone should switch
<seanstickle> horsie.
<offby1> seanstickle: I don't think it's quite _that_ bad.
<shevy> I'll wait until that transition is finished
<seanstickle> The transition will never finish.
<shevy> hehehe
<seanstickle> We'll see Python 2.28 even
AlbireoX`Laptop has quit [Remote host closed the connection]
<seanstickle> It'll just be a continuously maintained 2 series
<shevy> see, I think that sucks
<seanstickle> And some goofballs in the 3 world saying "hey, it's not so bad, some things even work!"
khakimov has joined #ruby
<shevy> oh well
<shevy> one thing python still leads on clearly is the online documentation
<seanstickle> MacPython is not so great though.
<seanstickle> I'd like to write Cocoa apps with Python, and that seems less great.
<seanstickle> Certainly when compared to MacRuby or even RubyCocoa
dekroning has quit [Ping timeout: 246 seconds]
ZachBeta has quit [Read error: Connection reset by peer]
bier has joined #ruby
ZachBeta has joined #ruby
ramblex has joined #ruby
nlc has joined #ruby
Carson__ has joined #ruby
schovi has joined #ruby
Targen has joined #ruby
sbanwart has joined #ruby
andrewhl has quit [Quit: andrewhl]
fayimora_ has joined #ruby
fayimora_ has quit [Read error: Connection reset by peer]
fayimora_ has joined #ruby
fayimora_ has quit [Remote host closed the connection]
fayimora has quit [Ping timeout: 264 seconds]
palmfrond has joined #ruby
wvms has joined #ruby
berserkr has joined #ruby
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
rushed has quit [Quit: rushed]
<Hanmac> hey ged are you avaliable?
fayimora has joined #ruby
kyktommy has quit [Quit: Linkinus - http://linkinus.com]
seanstickle has quit [Quit: Nihil sub sole novum]
CheeToS has joined #ruby
* offby1 reads about "Why class variables are bad"
<Hanmac> offby1 because in 99.9% of cases, class instance variables are better
<offby1> so I'm told.
baroquebobcat has joined #ruby
taterbase has quit [Ping timeout: 252 seconds]
looopy has quit [Remote host closed the connection]
Nies has joined #ruby
<Hanmac> shevy: b;alazs' problem is that his ruby is more "cripped" that common rubies ... it has no ssl support, and the pg gem is to dumb to work with that
baroquebobcat has quit [Quit: baroquebobcat]
dhruvasagar has joined #ruby
looopy has joined #ruby
neektza has joined #ruby
<neektza> join #git
andrewhl has joined #ruby
wallerdev has quit [Quit: wallerdev]
itnomad has quit [Quit: Leaving]
ZachBeta has quit [Quit: Computer has gone to sleep.]
Solnse has joined #ruby
adeponte has quit [Remote host closed the connection]
Carson__ has quit [Quit: leaving]
Shoobdidoo has joined #ruby
looopy has quit [Remote host closed the connection]
williamcotton has quit [Quit: williamcotton]
Shoobdidoo has quit [Client Quit]
dhruvasagar has quit [Ping timeout: 260 seconds]
cj3kim has joined #ruby
<offby1> good idea
<neektza> offby1: haha, now i get it :)
imami|afk is now known as banseljaj
balazs has quit [Ping timeout: 246 seconds]
krusty_ar has quit [Remote host closed the connection]
<shevy> Hanmac ewww
Urth|Away is now known as Urthwhyte
<horseman> shevy: hey shevy what's up
sspiff has joined #ruby
AlRazi has joined #ruby
foofoobar has joined #ruby
manizzle has joined #ruby
ZachBeta has joined #ruby
prtksxna has joined #ruby
choffstein has quit [Remote host closed the connection]
lxsameer has quit [Quit: Leaving]
advorak has quit [Quit: This computer has gone to sleep]
<Hanmac> shevy exist an easy test for the extconf.rb to check if ruby is build against ssl?
schovi has quit [Read error: Connection reset by peer]
flip_digits has joined #ruby
schovi has joined #ruby
mucker has joined #ruby
schovi has quit [Read error: Connection reset by peer]
fr0gprince_ has quit [Ping timeout: 260 seconds]
schovi has joined #ruby
fr0gprince_ has joined #ruby
flip_digits has quit [Client Quit]
jackiechan0 has joined #ruby
t0mmyvyo has joined #ruby
icooba has joined #ruby
sepp2k has joined #ruby
xpot-station has joined #ruby
AlRazi has quit [Remote host closed the connection]
ZachBeta has quit [Read error: Connection reset by peer]
wvdschel has joined #ruby
wvdschel has quit [Changing host]
wvdschel has joined #ruby
ZachBeta has joined #ruby
sspiff has quit [Ping timeout: 244 seconds]
zinjacoder has quit [Remote host closed the connection]
azm has quit [Ping timeout: 260 seconds]
cj3kim has left #ruby ["Leaving"]
wvdschel has quit [Remote host closed the connection]
JuanMiguel2 has joined #ruby
vitor-br has joined #ruby
mohits has quit [Ping timeout: 248 seconds]
JuanMiguel2 has left #ruby [#ruby]
mnaser has quit [Quit: Computer has gone to sleep.]
<Mon_Ouie> Ruby doesn't have SSL built-in, it's in a separate C extension
ukwiz has quit [Quit: Leaving]
<Mon_Ouie> So you can require "openssl" — but checking if it's available at compile time sounds pointless to me
horseman has quit [Read error: Connection reset by peer]
fr0gprince_ has quit [Ping timeout: 260 seconds]
<shevy> Hanmac not sure. I think usually only via require 'openssl'
mvangala_ has joined #ruby
horseman has joined #ruby
<shevy> perhaps there would be a macro check for extconf.rb
dbgster has joined #ruby
fr0gprince_ has joined #ruby
benregn has joined #ruby
cpruitt has quit [Quit: cpruitt]
jgrevich has joined #ruby
jgrevich has quit [Remote host closed the connection]
icooba has quit [Quit: icooba]
dbgster has quit [Client Quit]
test34- has quit [Ping timeout: 250 seconds]
<benregn> hey, I'm trying to parse a date which has this format: "Xyz DD.MM" and sometimes "Xyz DD.MM kl. HH.MM", I am not sure where to begin...
jgrevich has joined #ruby
<shevy> benregn and parse it into what
<shevy> if your data is "Xyz DD.MM", what will you do with it
vitor-br has quit [Quit: Saindo]
<benregn> shevy: hopefully into some data structure which I can sort the dates
<benregn> from newest to oldest
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
<shevy> ok but I still dont know into what format that is
<shevy> Date.parse is often quite good
<shevy> for instance, input like this:
<shevy> Date.parse("11 march 2011") # => #<Date: 4911263/2,0,2299161>
hmmmm has joined #ruby
<shevy> should work
looopy has joined #ruby
<hmmmm> hi, how long does it take to learn ruby?
<benregn> shevy: does Date have a built in sort?
<yxhuvud> benregn: it responds to <=> yes.
<horseman> hmmmm: well shevy is 46 now but he started when he was 19, and he's still a noob
<benregn> yxhuvud: what exactly do you mean? (new to ruby)
Morkel has joined #ruby
<shevy> hmmmm depends. if you want to do simple scripts, I think a few months are enough
<benregn> hmmmm: depends if you already know another language
<benregn> it's going to be faster
mikeric has joined #ruby
mikepack has joined #ruby
<horseman> benregn: why do you tell lies
techgenie has joined #ruby
<benregn> horseman: what do you mean?
<Hanmac> shevy i think net/ssh could help ... :P
<horseman> u know what i mean, all these lies you're telling, it's unbelievable
techgenie has left #ruby [#ruby]
<benregn> I have no idea what you are talking about...
<yxhuvud> benregn: <=> is the method sort requires to be able to sort. Define it and you will automatically have < >= <= etc
ZachBeta has quit [Quit: Computer has gone to sleep.]
<Hanmac> yxhuvud: you get the others only if you include Comparable
c0rn has joined #ruby
<Hanmac> (or extend)
<yxhuvud> right.
mneorr has quit [Remote host closed the connection]
r0bby has joined #ruby
techgenie has joined #ruby
Eldariof59-ru has quit []
bosphorus has quit [Remote host closed the connection]
techgenie has left #ruby [#ruby]
robbyoconnor has quit [Ping timeout: 245 seconds]
Eldariof59-ru has joined #ruby
benregn has quit [Quit: See ya!]
techgenie has joined #ruby
r0bby_ has joined #ruby
techgenie has quit [Quit: Leaving]
r0bby has quit [Ping timeout: 246 seconds]
foofoobar has quit [Quit: Computer has gone to sleep]
havenn has joined #ruby
techgenie has joined #ruby
ddv has quit [Quit: *poof*]
tomzx has joined #ruby
maletor has joined #ruby
pastjean has joined #ruby
dnyy has joined #ruby
<techgenie> quit
<techgenie> exit
techgenie has quit [Quit: Leaving]
stepnem has quit [Ping timeout: 252 seconds]
jackiechan0 has quit [Ping timeout: 245 seconds]
ronniy has quit [Remote host closed the connection]
ZachBeta has joined #ruby
Mark__ has joined #ruby
ddv has joined #ruby
horseman has quit [Read error: Connection reset by peer]
mnaser has joined #ruby
mnaser has quit [Changing host]
mnaser has joined #ruby
stepnem has joined #ruby
joukokar has quit [Read error: Operation timed out]
joukokar has joined #ruby
horseman has joined #ruby
kenichi has joined #ruby
mnaser has quit [Client Quit]
tenseiten has quit [Remote host closed the connection]
jayrulez_ has joined #ruby
mnaser has joined #ruby
davidpk has joined #ruby
Eldariof59-ru has quit [Read error: Connection reset by peer]
Eldariof59-ru has joined #ruby
altious has joined #ruby
Eldariof59-ru has quit [Client Quit]
ryanf has joined #ruby
pastjean has quit [Remote host closed the connection]
Eldariof59-ru has joined #ruby
sohocoke has joined #ruby
jackiechan0 has joined #ruby
fayimora has quit [Quit: Busy…..zzzzz]
jackiechan0 has quit [Read error: Connection reset by peer]
jackiechan0 has joined #ruby
Mark__ has quit [Quit: leaving]
rippa has joined #ruby
mosheee is now known as moshee
mvangala_ has quit [Remote host closed the connection]
Norrin_ has quit [Ping timeout: 245 seconds]
Norrin_ has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
Jackneill has quit [Ping timeout: 252 seconds]
jayrulez_ has quit [Ping timeout: 248 seconds]
BrianE has joined #ruby
tomb_ has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
jimeh has quit [Quit: bye]
nfk is now known as Kamijou_Touma
azm has quit [Ping timeout: 245 seconds]
adeponte has joined #ruby
Criztian has joined #ruby
test34 has joined #ruby
td123 has quit [Quit: WeeChat 0.3.7]
test34- has joined #ruby
mucker has quit [Quit: Lost terminal]
test34 has quit [Ping timeout: 246 seconds]
tomb_ has joined #ruby
mdw has joined #ruby
fearoffish has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
tk___ has quit [Quit: ばいばい]
mdw has quit [Ping timeout: 246 seconds]
banseljaj is now known as imami|afk
zalesz has joined #ruby
<offby1> ^d
c0rn has quit []
<offby1> part
kaneda_ has quit [Read error: Connection reset by peer]
kaneda_ has joined #ruby
ryanf has quit [Quit: leaving]
sepp2k has quit [Remote host closed the connection]
fayimora has joined #ruby
fukushim_ has joined #ruby
fukushima has quit [Ping timeout: 249 seconds]
Manhose has joined #ruby
mengu has quit [Quit: Konversation terminated!]
tayy has quit [Ping timeout: 245 seconds]
fayimora has quit [Ping timeout: 245 seconds]
brngardner has joined #ruby
zalesz has quit [Quit: Wychodzi]
c0rn has joined #ruby
<shevy> ok
c0rn has quit [Client Quit]
<shevy> who will help me write a package and system manager in ruby
ZachBeta has joined #ruby
akem has quit [Ping timeout: 252 seconds]
sbanwart has quit [Ping timeout: 245 seconds]
andrewhl_ has joined #ruby
dtang has quit [Quit: dtang]
ZachBeta has quit [Read error: Connection reset by peer]
andrewhl has quit [Ping timeout: 244 seconds]
andrewhl_ is now known as andrewhl
cantonic has quit [Ping timeout: 256 seconds]
azm has joined #ruby
azm has quit [Changing host]
azm has joined #ruby
kenichi has quit [Remote host closed the connection]
chson has joined #ruby
Eldariof59-ru has quit []
ZachBeta has joined #ruby
Jacek1988 has joined #ruby
flockalyfe has joined #ruby
test34 has joined #ruby
test34 has quit [Changing host]
test34 has joined #ruby
altious has quit [Quit: Leaving]
test34- has quit [Ping timeout: 260 seconds]
nowthatsamatt has joined #ruby
nowthatsamatt has left #ruby [#ruby]
flockalyfe has quit [Quit: AndroIRC - Android IRC Client ( http://www.androirc.com )]
Jacek1988 has quit [Quit: Page closed]
macmartine has joined #ruby
CheeToS has quit [Ping timeout: 240 seconds]
ddv has quit [Quit: *poof*]
Morkel has quit [Quit: Morkel]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
BrokenCog has quit [Quit: leaving]
jcromartie has joined #ruby
ZachBeta has quit [Read error: Connection reset by peer]
ZachBeta has joined #ruby
indian has joined #ruby
timepilot has joined #ruby
daze21 has joined #ruby
<daze21> How do I take something like "1/2/2012" and figure out how many DAYS ago it was? Is there a function for that?
tayy_ has joined #ruby
yannis has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
ZachBeta has quit [Quit: Computer has gone to sleep.]
havenn has quit [Remote host closed the connection]
blacktulip has quit [Remote host closed the connection]
banghouse has joined #ruby
noyb has joined #ruby
blacktulip has joined #ruby
shevy has quit [Quit: ""]
jgrevich has quit [Read error: Connection reset by peer]
jackiechan0 has quit [Ping timeout: 252 seconds]
<billiamii> how about (DateTime.now - DateTime.parse('1/2/2012')).to_i
<Boohbah> daze21: require 'date'; old = Date.new(2012,1,2); p Date.today - old
jgrevich has joined #ruby
<daze21> billiamii: to_i doesn't give days
rippa has quit [Ping timeout: 244 seconds]
<Boohbah> p (Date.today - Date.new(2012,2,1)).to_i
<billiamii> Really?
cirwim has joined #ruby
<daze21> Boohbah: what is "p"?
azm has quit [Ping timeout: 260 seconds]
<Boohbah> p() is a Kernel method that write's obj.inspect to the standard output.
<billiamii> I think it does, it's just that "1/2/2012" is ambiguous
<daze21> Oh, okay. Thanks guys!
hoelzro|away is now known as hoelzro
<daze21> Boohbah: 'p' seems to do the same as 'puts'
<keppy> .to_i for a date?
<Boohbah> daze21: not quite
<billiamii> .to_i for a difference between dates.
ZachBeta has joined #ruby
<keppy> Oh okay I see.
<Hanmac> isnt date - date allready in days?
n1x has joined #ruby
shevy2 has joined #ruby
<Boohbah> Hanmac: my output was a fraction so i used to_i
<keppy> Does anyone have real strong objections to @billiamii: (DateTime.now - DateTime.parse('1/2/2012)).to_i? Why?
fserb has quit [Quit: ttyl]
<Hanmac> keppy: use Date.strptime('03-02-2001', '%d-%m-%Y') if you think that your format cant be trusted
Synthead has joined #ruby
austinbv has joined #ruby
mxweas_ has joined #ruby
timepilot has quit [Quit: timepilot]
keppy has quit [Quit: Leaving]
schovi has quit [Remote host closed the connection]
jcromartie has quit [Quit: jcromartie]
bluOxigen has joined #ruby
bluOxigen has quit [Changing host]
bluOxigen has joined #ruby
zz_Azure is now known as Azure
hoelzro is now known as hoelzro|away
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
BrokenCog has joined #ruby
brngardner has quit [Remote host closed the connection]
<daze21> whereeee is the doc for days.since and days.ago ?!
shevy2 is now known as shevy
<Hanmac> daze21 i think this are rails creap functions
seanstickle has joined #ruby
<shevy> hmm
<shevy> I am wondering
<shevy> right now my local docu uses mostly .cgi files using ruby
sbanwart has joined #ruby
<shevy> one advantage I have is that I can easily layout everything that is displayed in any way I want to
ixti has quit [Quit: So Long, and Thanks for All the Fish!]
<shevy> on the other hand, storing in something like markdown is easier to read and modify
<daze21> Hanmac yeah, rails stuff...
<daze21> what does 2.days.since do?
<seanstickle> daze21: bad form to simultaneously ask the same question in multiple channels
pygospa has quit [Read error: Operation timed out]
Criztian has quit [Remote host closed the connection]
<daze21> seanstickle: apologies; not sure where it belongs.
<seanstickle> daze21: choose one.
<seanstickle> daze21: have you tried typing 2.days.since and seeing what happens?
scb has joined #ruby
yxhuvud has quit [Ping timeout: 265 seconds]
mxweas_ has quit [Quit: Computer has gone to sleep.]
daze21 has left #ruby [#ruby]
nilg` has quit [Remote host closed the connection]
prtksxna has quit [Ping timeout: 250 seconds]
sbanwart has quit [Read error: Operation timed out]
c0rn has joined #ruby
prtksxna has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
mxweas_ has joined #ruby
pygospa has joined #ruby
Dreamer3 has joined #ruby
mxweas_ has quit [Client Quit]
cableray has joined #ruby
Dreamer3 has quit [Remote host closed the connection]
blast_hardcheese has joined #ruby
mxweas_ has joined #ruby
fayimora has joined #ruby
kil0byte has quit [Remote host closed the connection]
seitensei has joined #ruby
jbw has quit [Ping timeout: 248 seconds]
yankov has quit [Quit: yankov]
jbw has joined #ruby
ZachBeta has quit [Quit: Computer has gone to sleep.]
Solnse has quit [Read error: No route to host]
BrianE has quit [Quit: Leaving...]
bbttxu has quit [Quit: bbttxu]
RegEchse has joined #ruby
imami|afk is now known as banseljaj
<undyingrage> hi, when im refering to a key in a hash, a symbol should work right? myhash.has_key(:id)? right?
serroba has joined #ruby
<seanstickle> If they key is a symbol, yes
<seanstickle> If the key is a string, then no
<Mon_Ouie> And a key could be anything else actually
<seanstickle> True fact
serroba has quit [Client Quit]
<seanstickle> If you're using Rails' HashWithIndifferentAccess, then you can use a string and symbol interchangeable
<seanstickle> interchangeably
pastjean has joined #ruby
serroba has joined #ruby
classix has quit [Ping timeout: 265 seconds]
serroba has quit [Client Quit]
kenichi has joined #ruby
dankest has joined #ruby
Ajacmac has joined #ruby
mxweas_ has quit [Quit: Computer has gone to sleep.]
c0rn has quit [Ping timeout: 245 seconds]
cableray has quit [Ping timeout: 246 seconds]
seitensei has quit [Read error: Connection reset by peer]
akem has joined #ruby
akem has quit [Changing host]
akem has joined #ruby
n1x has quit [Quit: Ex-Chat]
cousine has joined #ruby
c0rn has joined #ruby
mikeric has quit [Quit: mikeric]
johnduhart has joined #ruby
mxweas_ has joined #ruby
mxweas_ has quit [Client Quit]
sohocoke has quit [Quit: Computer has gone to sleep.]
mikeric has joined #ruby
seitensei has joined #ruby
mikeric has quit [Client Quit]
piotr__ has quit [Ping timeout: 245 seconds]
sohocoke has joined #ruby
fserb has joined #ruby
fr0gprince_mac has quit [Quit: Leaving...]
mnaser has quit [Quit: Computer has gone to sleep.]
noyb has quit [Ping timeout: 244 seconds]
indian has quit [Ping timeout: 244 seconds]
<Tasser> seanstickle, depends wherever they overwrite has_key, but with strings, you're on the secure side
vitor-br has joined #ruby
Beoran__ has quit [Ping timeout: 246 seconds]
<shevy> the name alone, HashWithIndifferentAccess, is an atrocity to mankind
CheeToS has joined #ruby
* _br_ nods at shevy in agreement
<Tasser> Mash ;-)
<shevy> how is python going about access to hashes? do they have string keys and something like symbols as well?
cousine has quit [Read error: Connection reset by peer]
<shevy> reason I ask is... sometimes I wonder if it were not better if symbols in ruby would not exist, from a usability point of view at least
<seanstickle> They don't have hashes, they have "dictionaries"
<Tasser> shevy, python strings are symbols
digitalcakestudi has quit [Read error: Operation timed out]
<offby1> shevy: python doesn't have symbols
<shevy> hmm
cousine has joined #ruby
<shevy> "dictionary" ...
<shevy> "tuple" ...
<shevy> they use funny words
<shevy> knights = {'gallahad': 'the pure', 'robin': 'the brave'}
<shevy> that's actually valid ruby syntax too, since 1.9.x, or? :)
<shevy> eww
<shevy> irb says no
<seanstickle> It's a funny language
Axsuul has joined #ruby
<shevy> knights = {gallahad: 'the pure', robin: 'the brave'} works
Dreamer3 has joined #ruby
<seanstickle> With 90% of the people in Python 2, and an angry contingent in Python 3 making fun of the others
Beoran__ has joined #ruby
Synthead has quit [Quit: p33 ba115]
cousine_ has joined #ruby
cousine has quit [Read error: Connection reset by peer]
berserkr has quit [Quit: Leaving.]
bluOxigen has quit [Ping timeout: 250 seconds]
defendguin has joined #ruby
Azure is now known as zz_Azure
<defendguin> i'm writing a ruby script to pull some data off the web and i was cleaning things up and i made a class to define some functions. when i try to load the class using require I get an error saying "cannot load such file" the name of the file is ftm_utls.rb and it resides in the same directory as my main script file. i am trying to load it doing require 'ftm_utils' am i missing something here?
<_br_> Hm, add a $:.push('.')
<seanstickle> defendguin: read up on require_relative
<_br_> seanstickle: Whats the best practice currently to make the stuff compatible between 1.8 and 1.9?
<seanstickle> Probably something along the lines of require File.join(File.dirname(__FILE__), 'path/to/file')
<_br_> I see, thanks for the info
andrewhl has quit [Quit: andrewhl]
<defendguin> seanstickle: seems to load it now but it's not recognizing my methods when i call them
<defendguin> maybe i need to make the methods public
banseljaj is now known as imami|afk
blacktulip has quit [Remote host closed the connection]
classix has joined #ruby
<defendguin> i would have thought they were public by default
kenichi has quit [Remote host closed the connection]
<_br_> defendguin: give a paste on gist.github.com otherwise its nearly impossible to figure out whats going on imo
otters has quit [Ping timeout: 246 seconds]
Alantas has quit [Quit: The sum of the universe is zero.]
yetanotherdave has joined #ruby
<defendguin> undefined method `get_latest_filings' for FTMUtils:Class (NoMethodError)
davidpk has quit [Quit: Computer has gone to sleep.]
digitalcakestudi has joined #ruby
sohocoke has quit [Quit: Computer has gone to sleep.]
otters has joined #ruby
<_br_> defendguin: Yes, I see. You are using the FMTUtils class like a module. That doesn't work since you declared it as a class so you need to do a FMTUtils.new
<defendguin> hmmm it's a static class
<defendguin> or should be anyway
irk3z has quit [Read error: Operation timed out]
mrmist has quit [Read error: Operation timed out]
bubuz has quit [Read error: Operation timed out]
sts has quit [Read error: Operation timed out]
sts_ has joined #ruby
<defendguin> guess i'll just change it to module
AnswerGuy has quit [Read error: Operation timed out]
bubu\a has joined #ruby
irk3z has joined #ruby
ex0a has quit [Read error: Operation timed out]
Foxandxss has joined #ruby
ex0a has joined #ruby
froy has quit [Read error: Operation timed out]
froy has joined #ruby
mrmist has joined #ruby
Solnse has joined #ruby
cirwim has quit [Quit: Leaving.]
AnswerGuy has joined #ruby
<defendguin> _br_: changing it to a module doesn't seem to work either
<_br_> defendguin: I didn't suggest you should use it as a module anyway. Change it to FTMUtils.new.get_latest_filings(config)
<defendguin> something about that seems wrong. not that it doesn't work but it's not how i should be doing it
yetanotherdave has quit [Quit: yetanotherdave]
<defendguin> like where i go YAML.load_file I don't have to do YAML.new.load_file
<_br_> Yes, because YAML is defined as a module. Please read up on when to use a Module and when to use a class.
tayy_ is now known as tayy
sbanwart has joined #ruby
<defendguin> i'm fairly certain that i should be using a module instead
ken_barber has joined #ruby
<_br_> defendguin: well, why don't you declare it as a module then?
<defendguin> tried and failed
* offby1 empathizes
peterhil has quit [Ping timeout: 272 seconds]
otters has quit [Read error: Connection reset by peer]
c0rn has quit [Ping timeout: 246 seconds]
sohocoke has joined #ruby
c0rn has joined #ruby
mikeric has joined #ruby
davidpk has joined #ruby
kirun has quit [Quit: Client exiting]
otters has joined #ruby
otters has quit [Changing host]
otters has joined #ruby
Targen has quit [Ping timeout: 245 seconds]
austinbv has quit [Quit: austinbv]
samuelkadolph has joined #ruby
seanstickle has quit [Quit: seanstickle]
otters has quit [Read error: Connection reset by peer]
xiaotian has joined #ruby
c0rn has quit [Ping timeout: 240 seconds]
classix has quit [Ping timeout: 240 seconds]
c0rn has joined #ruby
b1rkh0ff has quit [Ping timeout: 252 seconds]
kenichi has joined #ruby
peterhil has joined #ruby
cousine_ has quit [Read error: Connection reset by peer]
williamcotton has joined #ruby
andrewhl has joined #ruby
graspee has joined #ruby
BrokenCog has quit [Quit: leaving]
seanstickle has joined #ruby
c0rn has quit []
looopy has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
cousine has joined #ruby
b1rkh0ff has joined #ruby
billiamii has quit [Ping timeout: 245 seconds]
Guest82308 has quit [Quit: Time To Go, So Sad!]
dhaskew has quit [Read error: Connection reset by peer]
deryldoucette has joined #ruby
dhaskew has joined #ruby
noyb has joined #ruby
gtuckerkellogg has joined #ruby