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]
<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
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`?
<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
<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?
<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}
<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>
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>
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
<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?
<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=>' '
<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
<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?
<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.]
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.
<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]
<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"
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
<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 -]
* 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.]
<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.]
<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]