apeiros_ changed the topic of #ruby to: Ruby 1.9.3-p385: http://ruby-lang.org (ruby-2.0.0-rc1) || Paste >3 lines of text on http://gist.github.com
hackerdude has quit [Remote host closed the connection]
<jokke> banisterfiend: if i implement <=> on an object, do i have to implement < == and > too?
<banisterfiend> no
<jokke> ok great
<banisterfiend> just include Comparable
<banisterfiend> and u get that for free
<jokke> ah
<jokke> great
cyong has quit [Quit: Leaving.]
AntiTyping has quit [Quit: AntiTyping]
Mon_Ouie has quit [Ping timeout: 264 seconds]
zigidias has joined #ruby
dnordstrom has joined #ruby
BRMatt has quit [Quit: Leaving]
AntiTyping has joined #ruby
<jokke> banisterfiend: do i have to think about the case when <=> is used with an object of another class?
zzing has quit [Quit: Computer has gone to sleep.]
<jokke> or does ruby raise an exception automatically?
jfl0wers has quit [Read error: Connection reset by peer]
jfl0wers has joined #ruby
cyong has joined #ruby
dmiller has joined #ruby
cyong has quit [Max SendQ exceeded]
jowee has left #ruby [#ruby]
<danneu> ShellFu: yeah find the keys that the hashes have in common. (h1.keys & h2.keys)
cyong has joined #ruby
<danneu> ShellFu: then you can loop through them and merge them into the hash with predominance or something
hackerdude has joined #ruby
relixx has quit [Quit: relixx]
<ShellFu> ill keep stabbin at it. APpreciate the tips
<danneu> ShellFu: look at something like `(h1.keys & h2.keys).each { |key| h1[key].merge!(h2[key]) }`. could work something out from there
spaceships has quit [Read error: Operation timed out]
etcetera has joined #ruby
erry has quit [Quit: Segmentation fault]
havenwood has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
x82_nicole has joined #ruby
Xeago has quit [Remote host closed the connection]
wargasm has joined #ruby
havenwood has quit [Ping timeout: 264 seconds]
qpf has quit [Remote host closed the connection]
qpf has joined #ruby
<ShellFu> couldnt get that to work, but I ended with this this messy line :) >h1.merge!(h2) {|key, v1, v2| if v1.class == Hash then v1.merge(v2) else v2 end }<
<ShellFu> thanks for the merge! tip. Didnt even realize, but it seemed to work in this case
Opettaja has joined #ruby
chussenot has joined #ruby
joofsh has quit [Remote host closed the connection]
erry_ has joined #ruby
dmiller has quit [Ping timeout: 255 seconds]
erry_ is now known as erry
aaronmcadam has quit [Quit: aaronmcadam]
Opettaja has quit [Remote host closed the connection]
subbyyy has quit [Ping timeout: 244 seconds]
idiocrash has quit [Remote host closed the connection]
jfl0wers has quit [Ping timeout: 248 seconds]
m8 has quit [Quit: Sto andando via]
zzing has joined #ruby
dnordstrom has quit [Ping timeout: 248 seconds]
angusiguess has joined #ruby
mengu_ has joined #ruby
emocakes has quit [Quit: emocakes]
alexturner has joined #ruby
Opettaja has joined #ruby
subbyyy has joined #ruby
angusiguess has quit [Ping timeout: 256 seconds]
Virunga has quit [Remote host closed the connection]
caleb_io has joined #ruby
kmurph has quit [Quit: kmurph]
dmiller has joined #ruby
rakun has quit [Remote host closed the connection]
hmarr has joined #ruby
zigidias has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby
Spooner has quit [Remote host closed the connection]
stormetrooper has quit [Quit: Leaving]
havenwood has quit [Ping timeout: 246 seconds]
subbyyy has quit [Ping timeout: 255 seconds]
jblack has joined #ruby
dnordstrom has joined #ruby
subbyyy has joined #ruby
sailias has quit [Quit: Leaving.]
ffranz has joined #ruby
chrishough has joined #ruby
brian_ has joined #ruby
zigidias has joined #ruby
LiquidInsect has quit [Remote host closed the connection]
<etcetera> is there a good canonical post for using jekyll for a blog?
emmanuelux has quit [Quit: emmanuelux]
angusiguess has joined #ruby
havenwood has joined #ruby
cyong has quit [Quit: Leaving.]
emmanuelux has joined #ruby
daniel_hinojosa has quit [Ping timeout: 244 seconds]
kofno has quit [Read error: Connection reset by peer]
dnordstrom has quit [Ping timeout: 248 seconds]
kofno has joined #ruby
marr has quit [Ping timeout: 248 seconds]
ffranz has quit [Quit: Leaving]
subbyyy has quit [Ping timeout: 244 seconds]
<jokke> is there a fast method to determine if an array of version requirements like ['<=4','<3', '>2', '>=2'] conflicts?
dnordstrom has joined #ruby
TheFuzzball has quit [Quit: Computer has gone to sleep.]
adeponte has quit [Remote host closed the connection]
<jokke> and get the highest version number, that doesn't?
frewsxcv has joined #ruby
<jokke> (doesn't conflict)
<frewsxcv> how do you get a reference to a global method?
adeponte has joined #ruby
hackerdude has quit [Remote host closed the connection]
naquad has joined #ruby
<banisterfiend> frewsxcv: Object.method(name)
spaceships has joined #ruby
<frewsxcv> banisterfiend, is Object the global object?
<banisterfiend> frewsxcv: depends what u mena by 'global object'
<banisterfiend> mean*
<frewsxcv> i don't even know :P
<workmad3> frewsxcv: do you mean the top-level object context?
<banisterfiend> the only way i know how to get the top-level object is by: TOPLEVEL_BINDING.eval('self')
<banisterfiend> but it's not that useful
<frewsxcv> workmad3, i think so
<workmad3> banisterfiend: aren't methods you define at the top level put on Object as new instance methods though?
<frewsxcv> my brain is in javascript mode, so when i was looking to get a reference for the top level object, i thought 'window'
emmanuelux has quit [Quit: emmanuelux]
<banisterfiend> workmad3: yeah
<frewsxcv> so i could just do window.myMethod
ozgura has quit [Remote host closed the connection]
xbayrockx has joined #ruby
xbayrockx is now known as wf2f
moshee has quit [Ping timeout: 276 seconds]
t-mart has joined #ruby
t-mart has quit [Changing host]
t-mart has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
karancho has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
bradleyprice has quit [Remote host closed the connection]
chussenot has quit [Quit: chussenot]
dyrot has joined #ruby
alanjc has quit [Ping timeout: 244 seconds]
dyrot is now known as alanjc
tjbiddle has quit [Quit: tjbiddle]
kofno has quit [Remote host closed the connection]
bricker`LA has joined #ruby
jdstraughan has quit [Remote host closed the connection]
niklasb has quit [Ping timeout: 255 seconds]
eka has joined #ruby
hmarr has quit [Quit: Computer has gone to sleep.]
jblack has quit [Ping timeout: 245 seconds]
mercwithamouth has joined #ruby
oscardelben has joined #ruby
rakl has left #ruby ["gone"]
joeycarmello has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 252 seconds]
icole has joined #ruby
subbyyy has joined #ruby
brianpWins has joined #ruby
Takehiro has joined #ruby
icole has quit [Ping timeout: 255 seconds]
Billiam_ has quit [Read error: Connection reset by peer]
Puck6633 has joined #ruby
billiam has joined #ruby
dmiller has quit [Read error: Connection reset by peer]
skattyadz has quit [Quit: skattyadz]
<Puck6633> I'm trying to use the aws-s3 gem following the instructions on http://amazon.rubyforge.org/ but whenever I try to access the module I'm getting 'uninitialized constant <classname>::AWS'. What do I need to do?
frewsxcv has left #ruby ["Leaving"]
dmiller has joined #ruby
subbyyy has quit [Ping timeout: 255 seconds]
zigidias has quit [Ping timeout: 260 seconds]
skattyadz has joined #ruby
octoberry has quit [Ping timeout: 248 seconds]
blf has joined #ruby
zigomir has joined #ruby
petersaints_ is now known as petersaints
<blf> Is there a generally accepted range for the number of connections a client should make to a remote web service?
blaxter has quit [Quit: foo]
mengu_ has quit [Read error: Connection reset by peer]
mengu_ has joined #ruby
<ThePicard> how can you detect in a ruby file if that file was loaded via require as opposed to run directly via the interpreter?
dmiller has quit [Ping timeout: 246 seconds]
<ThePicard> aaaah
<ThePicard> __FILE__ == $0
charliesome has joined #ruby
kofno has joined #ruby
zigidias has joined #ruby
brianpWins has quit [Quit: brianpWins]
<ShellFu> Hey all, I just released my MongoDB back enc for puppet. Im a unix admin learning ruby, and would appreciate any feedback on how i might improve my code. I come from shell scripting, and am learning ruby. >https://github.com/shellfu/mongoenc/blob/master/enc.rb<
adeponte has quit [Remote host closed the connection]
brianpWins has joined #ruby
hmarr has joined #ruby
x82_nicole has quit [Quit: Computer has gone to sleep.]
Norrin has joined #ruby
Norrin has left #ruby [#ruby]
dmiller has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
brianpWins has quit [Quit: brianpWins]
Kuifje has quit [Ping timeout: 245 seconds]
PanPan_ has joined #ruby
danielpcox has joined #ruby
<mcatch> definitely not on-topic, but i figured i'd just ask around and see what i find... does anyone know of any good "terminal" style/skinned command prompt applications for Windows?
crackfu has joined #ruby
danielpcox has quit [Read error: Connection reset by peer]
Hanmac1 has joined #ruby
<jrajav> mcatch: What, you mean like a real terminal? Like http://www.secretgeometry.com/apps/cathode/ ?
<jrajav> (That's OS X)
<jrajav> Or a sensible terminal emulator you can actually use?
zigidias has quit [Ping timeout: 260 seconds]
kmurph has joined #ruby
Banistergalaxy has joined #ruby
mengu_ has quit [Read error: Connection reset by peer]
mengu_ has joined #ruby
<mcatch> jrajav: the latter :) and for Windows
Opettaja has quit [Ping timeout: 252 seconds]
<jrajav> mcatch: mintty
<mcatch> looking for some sort of linux-style feel for when I am on Windows
<jrajav> mcatch: And I highly recommend installing msys as well
<jrajav> In fact, install msys first
<mcatch> ty
karancho has quit [Remote host closed the connection]
<jrajav> And then use it to install mintty
<jrajav> mingw-get install mintty
mengu_ has quit [Client Quit]
Hanmac has quit [Ping timeout: 255 seconds]
ferdev is now known as ferdev|away
skattyadz has quit [Quit: skattyadz]
<mcatch> nice, thanks
zigidias has joined #ruby
txdv has joined #ruby
moshee has quit [Ping timeout: 248 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
danielpcox has joined #ruby
d2dchat has joined #ruby
havenwood has quit [Remote host closed the connection]
Takehiro has quit [Read error: Connection reset by peer]
sorbo_ has joined #ruby
havenwood has joined #ruby
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
ahokaomaeha has joined #ruby
subbyyy has joined #ruby
zigomir has quit [Quit: zigomir]
Opettaja has joined #ruby
zenoamaro has joined #ruby
postmodern has joined #ruby
zigomir has joined #ruby
kmurph has quit [Quit: kmurph]
zenoamaro has left #ruby [#ruby]
Takehiro has joined #ruby
qpf has quit [Remote host closed the connection]
yacks has joined #ruby
qpf has joined #ruby
octoberry has joined #ruby
danielpcox has quit [Ping timeout: 252 seconds]
main has quit [Ping timeout: 248 seconds]
caleb_io has quit [Quit: caleb_io]
Loaft has quit [Read error: Connection reset by peer]
iamjarvo has joined #ruby
joeycarmello has joined #ruby
joeycarmello has quit [Ping timeout: 276 seconds]
pu22l3r has joined #ruby
megha has joined #ruby
iamjarvo has quit [Quit: Leaving.]
daniel_- has quit [Ping timeout: 244 seconds]
<davidokner> Is there a package to get Macvim with all the features for ruby programming?
<davidokner> or just vim
bradleyprice has joined #ruby
<danneu> davidokner: what do you mean? if you're talking about plugins, i think you should install them yourself. other rubyists can give you advice on plugins to checkout.
<davidokner> Do you know which?
<danneu> i mean, i don't really know what you need that's ruby specific.
<davidokner> ok, any programming plugins
<danneu> Rails.vim is nice for Rails syntax highlighting and such
<danneu> Get Vundle for plugin management
<danneu> Check out ctrlp.vim for rapidly getting around a project
<danneu> vim isn't the type of tool where you can just through a bunch of plugins at it from the get go. if you want that, then check out Sublime Text 2
<davidokner> Ok, I was just wondering to give it a try. I already use RubyMine.
kmurph has joined #ruby
LouisRoR has quit [Ping timeout: 255 seconds]
<danneu> davidokner: are you brand new to vim? might wanna run 'vimtutor' from command line
<davidokner> Wow, I didn't know about that. I am familiar with its basics though.
<danneu> then i think the next step is arriving at a workflow (the hardest part).
<danneu> like, how to actually get shit done in a real project
locriani has quit [Ping timeout: 276 seconds]
<danneu> frankly i think it's a lot of luck ever actually arriving at a workflow you like in vim
<jrajav> A "workflow", eh
<danneu> as in actually doing things
<davidokner> Well, I've seen vim look different in videos before just doing C programming even. I wanted to see if I could figure out what the plugins were, but I don't normally get anywhere asking.
<jrajav> That's about as vague as you could *possibly* get
<davidokner> I like the way sublime looks and like the features of RubyMine, so I'm covered, just curious.
kofno has quit [Remote host closed the connection]
<davidokner> I think I've seen an autocomplete drop down before in vim.
IceDragon has quit [Ping timeout: 260 seconds]
<jrajav> You can traverse and manipulate text in both vim and Sublime
<jrajav> You can also traverse and manipulate objects at a higher level - e.g., symbols in code
<jrajav> Or even files
<jrajav> Those are more well-defined actions than "getting shit done". What is it that you want to accomplish?
<davidokner> Ok, thanks. Maybe I'll investigate more plugins. I'm in no hurry.
joeycarmello has joined #ruby
billiam has quit [Ping timeout: 248 seconds]
<danneu> jrajav: i'm talking about the chasm between grasping hjkl and being productive in a project folder.
adeponte has joined #ruby
etcetera has quit [Ping timeout: 255 seconds]
<danneu> "getting shit done" is vague because you don't what you don't know. maybe you think Peak Vim is alt-tabbing to Finder, iterating to the file you want, right-clicking, and selecting "Open with MacVim".
blf has quit [Quit: Page closed]
oscardelben has quit [Quit: oscardelben]
hmarr has quit [Quit: Computer has gone to sleep.]
zigomir has quit [Quit: zigomir]
adeponte has quit [Ping timeout: 245 seconds]
<jrajav> That's exactly why I was advocating being clearer and more precise about what you're advising
<jrajav> Quickly traversing source files and symbols by name is a well-defined action with clear benefits
davidokner has left #ruby [#ruby]
yourmysin has joined #ruby
<danneu> yeah, but it's just one of many aspects of being a productive programmer.
kofno_ has joined #ruby
ericmathison has joined #ruby
billiam has joined #ruby
locriani has joined #ruby
mibitzi has joined #ruby
djwonk has quit []
codezombie has joined #ruby
thufir_ has quit [Quit: Leaving.]
chendo_ has quit [Quit: Leaving...]
IceDragon has joined #ruby
codezombie has quit [Client Quit]
CmdrTallen has quit [Quit: Leaving]
otters has quit [Quit: WeeChat 0.4.0]
joeycarmello has quit [Remote host closed the connection]
otters has joined #ruby
netrealm has joined #ruby
netrealm has left #ruby [#ruby]
jonathanwallace1 has quit [Ping timeout: 276 seconds]
Bosox20051 has joined #ruby
hmarr has joined #ruby
manizzle has joined #ruby
<manizzle> wat
jasond has quit [Ping timeout: 264 seconds]
jonathanwallace1 has joined #ruby
otters has quit [Quit: WeeChat 0.4.0]
chrishough has quit [Quit: chrishough]
otters has joined #ruby
otters has quit [Client Quit]
fixl has quit [Remote host closed the connection]
otters has joined #ruby
brain_shim has joined #ruby
<brain_shim> howdy y'all!
chendo_ has joined #ruby
<brain_shim> I've got a scraper script that uses nokogiri/open-uri,
<brain_shim> and it has a bunch or 'rescue's to catch http errors
<brain_shim> but one last one that I can't seem to find a rescue handler for is
<brain_shim> /usr/lib/ruby/1.9.1/net/http.rb:762:in `initialize': getaddrinfo: Name or service not known (SocketError)
<brain_shim> So far I'm accounting for:
<brain_shim> rescue Timeout::Error, Errno::EINVAL, Errno::ECONNRESET, EOFError, Net::HTTPBadResponse, Net::HTTPHeaderSyntaxError, Net::ProtocolError => e
<brain_shim> When I check the site it choked on,
Takehiro has quit [Remote host closed the connection]
<brain_shim> "The server at www.thesiteinquestion.com can't be found because the DNS look-up failed."
<brain_shim> Anybody know what I can do to catch that case and just skip the url?
<danneu> socketerror?
<danneu> better option is to parse url and skip urls that arent valid
<brain_shim> kk
<danneu> oh wait, DNS look-up failed
<danneu> nvm
rezzack has joined #ruby
cparen has joined #ruby
reppard has joined #ruby
cparen has quit [Client Quit]
zigidias has quit [Ping timeout: 248 seconds]
hmarr has quit [Quit: Computer has gone to sleep.]
rezzack has quit [Quit: Leaving.]
<brain_shim> Think i found it.
<brain_shim> rescue SocketError, Errno::ECONNREFUSED => e | print "Error connecting to server: #{e}\n"
zigidias has joined #ruby
chrishough has joined #ruby
subbyyy has quit [Ping timeout: 252 seconds]
subbyyy has joined #ruby
swarley| has quit [Ping timeout: 276 seconds]
danneu has quit [Ping timeout: 252 seconds]
Takehiro has joined #ruby
etcetera has joined #ruby
felipe_Brz has joined #ruby
<brain_shim> Yup. Totally caught it.
iamjarvo has joined #ruby
h4mz1d has joined #ruby
<felipe_Brz> i find myself needing something that looks like has already been done and it's called OptionParser. However, it seems there's a third party tool that is better than the one that come by default on ruby so I'd like to know what you guys think
<felipe_Brz> Is OptionParser good or should I start out with the third party tool
<brain_shim> Depends. What's the 3rd party tool?
<felipe_Brz> which is called TrollOp
<brain_shim> there we go
<felipe_Brz> i didn't want to mention it but ok
<brain_shim> why not?
aapzak has quit [Ping timeout: 260 seconds]
generali_ has joined #ruby
tenmilestereo has quit [Quit: Leaving]
<felipe_Brz> don't know, would sound like advertising
<brain_shim> no way to make a comparison otherwise, logically
<brain_shim> psh
<brain_shim> what's your use case?
<felipe_Brz> well
<felipe_Brz> heavy OS scripting, file parsing, file creation
aapzak has joined #ruby
danneu has joined #ruby
<brain_shim> fun fun fun
<felipe_Brz> sure
<brain_shim> There are a couple of good gems for that
<felipe_Brz> yes but right now I'm focusing on the option parsing tool
<brain_shim> Good site to see what's popular/trending
Chryson has quit [Quit: Leaving]
zigidias has quit [Ping timeout: 252 seconds]
<brain_shim> Looks like Highline is ahead of the pack by a huge margin in this category
<felipe_Brz> not bad
<felipe_Brz> not bad at all
whitedawg has joined #ruby
whitedawg has quit [Max SendQ exceeded]
Caleb has joined #ruby
Caleb is now known as Guest29692
<felipe_Brz> my main doubt would be whether to stick to core OptionParser or try something else
<brain_shim> Just compare the top 3 (OptionParser included) and decide which one fits your coding style best.
<brain_shim> If you intend to share your code with a lot of people, using a popular lib could be a good way to ensure it has lots of eyes on it,
Vert has quit [Ping timeout: 252 seconds]
<felipe_Brz> I see. Thanks for helping brain_shim , that will sure give me a lot of material to look at
<brain_shim> :)
baphled has joined #ruby
zigidias has joined #ruby
oldB has joined #ruby
PanPan has quit [Read error: Connection reset by peer]
oldB has quit [Client Quit]
PanPan has joined #ruby
Loaft has joined #ruby
dnordstrom has quit [Read error: No route to host]
dnordstrom has joined #ruby
h4mz1d has quit [Ping timeout: 255 seconds]
backjlack has quit [Ping timeout: 264 seconds]
felipe_Brz has quit [Quit: ChatZilla 0.9.90 [Firefox 18.0.2/20130201190421]]
Guest29692 has quit [Quit: Guest29692]
h4mz1d has joined #ruby
system30101 has quit [Read error: Connection reset by peer]
system30101 has joined #ruby
toekutr has quit [Remote host closed the connection]
reppard has quit [Ping timeout: 256 seconds]
huoxito has quit [Quit: Leaving]
cparen has joined #ruby
billiam has quit [Ping timeout: 244 seconds]
cparen has quit [Read error: Connection reset by peer]
ozgura has joined #ruby
cparen has joined #ruby
adeponte has joined #ruby
hmarr has joined #ruby
forced_request has quit [Read error: Connection reset by peer]
yourmysin has quit [Read error: Connection reset by peer]
megha has quit [Quit: WeeChat 0.4.0]
radic has quit [Disconnected by services]
ahokaomaeha has quit [Ping timeout: 276 seconds]
radic_ has joined #ruby
kmurph has quit [Quit: kmurph]
poga has joined #ruby
hmarr has quit [Quit: Computer has gone to sleep.]
pac1 has quit [Read error: Operation timed out]
billyoc has joined #ruby
zipace has joined #ruby
h4mz1d has quit [Ping timeout: 276 seconds]
Opettaja has quit [Remote host closed the connection]
Loaft has quit [Ping timeout: 252 seconds]
pskosinski has quit [Quit: Red Eclipse: http://pawelk.pl/quinton-reeves]
lukeholder has joined #ruby
Loaft has joined #ruby
hmarr has joined #ruby
joofsh has joined #ruby
fir_ed has joined #ruby
adeponte has quit [Remote host closed the connection]
Edward_ has quit [Ping timeout: 248 seconds]
fir_ed has quit [Ping timeout: 248 seconds]
billyoc has quit [Ping timeout: 245 seconds]
cobragoat has joined #ruby
Phenax has joined #ruby
<Phenax> Hi, If I have a string like "Hello ${x}, how are you?" where #{x} is always a firstname and lastname (i.e., 2 words), what would be the easiest way to get the firstname and lastname?
<Phenax> I can use regular expressions to see if it fits the format, I know this
<lewellyn> so, after cross-compiling ruby, what's the best way to test that the interpreter works properly on the target?
<Phenax> i.e., "Hello John Doe, how are you?"
<lewellyn> i'm not looking to exercise it in every way, but just enough to be fairly confident it's not hosed in pretty obvious ways.
<lewellyn> (and i don't mean "lol run --version!")
ahokaomaeha has joined #ruby
<havenwood> Phenax: first, last = x.split
baphled has quit [Ping timeout: 246 seconds]
<Phenax> havenwood: No, I mean I have the string "Hello John Doe, how are you?" and I want to extract "John Doe" into a new string
<Phenax> Or whatever name is there
<zipace> Phenax: s="Hello John Doe, how are you?"; p s.scan(/Hello (.+?),.*?/)[0] # <-- not sure if this is what you are looking for, though
rezzack has joined #ruby
DrShoggoth has quit [Ping timeout: 245 seconds]
fwaokda has quit [Ping timeout: 252 seconds]
danneu has quit [Ping timeout: 252 seconds]
Demux has joined #ruby
<Phenax> zipace: Not exactly, but the approach is about what I want and I'll be able to adjust it, thanks
Loaft has quit []
DrShoggoth has joined #ruby
Loaft has joined #ruby
<zipace> Phenax: alright
nazty has quit [Read error: Connection reset by peer]
ebobby has quit [Quit: Lost terminal]
nazty has joined #ruby
toto- has joined #ruby
mnaser has quit [Read error: Operation timed out]
ToTo has quit [Read error: Connection reset by peer]
wookiehangover has quit [Ping timeout: 240 seconds]
joofsh has quit [Remote host closed the connection]
joofsh has joined #ruby
crackfu has quit [Remote host closed the connection]
joofsh_ has joined #ruby
greenarrow has quit [Ping timeout: 252 seconds]
Nisstyre-laptop has quit [Ping timeout: 240 seconds]
mibitzi has quit [Ping timeout: 248 seconds]
crackfu has joined #ruby
greenarrow has joined #ruby
Nisstyre-laptop has joined #ruby
wookiehangover has joined #ruby
<orospakr> hey, I'd like to make a lazily evaluated ruby array from a C extension, to avoid greedily copying/converting all the elements a the C array. Any way to do this other than making my own Enumerable?
<charliesome> orospakr: no
joofsh has quit [Ping timeout: 248 seconds]
mnaser has joined #ruby
kmurph has joined #ruby
<orospakr> charliesome, dang. does making my own enumerable seem like a good idea?
<charliesome> depends what you're trying to do
<charliesome> making lazy array-ish things is not so uncommon
<charliesome> see ActiveRecord::Relation
crackfu has quit [Ping timeout: 244 seconds]
manizzle has quit [Ping timeout: 245 seconds]
jonahR has joined #ruby
Umren has joined #ruby
lukeholder has quit [Quit: Computer has gone to sleep.]
Petru has joined #ruby
IcyDragon has joined #ruby
IceDragon has quit [Ping timeout: 248 seconds]
qpf has quit [Remote host closed the connection]
jrajav has quit [Quit: I tend to be neutral about apples]
manizzle has joined #ruby
chrishough has quit [Quit: chrishough]
pu22l3r has quit [Remote host closed the connection]
faen has quit [Remote host closed the connection]
d2dchat has quit [Remote host closed the connection]
maletor has joined #ruby
iamjarvo has quit [Quit: Leaving.]
toekutr has joined #ruby
megha has joined #ruby
joofsh_ has quit [Remote host closed the connection]
Hecatic has joined #ruby
wmoxam has joined #ruby
Petru has quit [Quit: Leaving]
cobragoat has quit [Read error: Connection reset by peer]
<brain_shim> Howdy y'all!
cobragoat has joined #ruby
<brain_shim> My friend is getting smtp timeouts in his script (http://pastie.org/6107871, http://pastie.org/6107882#)
<brain_shim> and we were wondering how to go about increasing the timeout
thone_ has joined #ruby
tjbiddle has joined #ruby
alex571 has joined #ruby
thone has quit [Ping timeout: 255 seconds]
onemanjujitsu has joined #ruby
alex571 has quit [Read error: Connection reset by peer]
havenwood has quit [Remote host closed the connection]
adeponte has joined #ruby
theshow has quit [Ping timeout: 252 seconds]
alex57 has joined #ruby
kofno_ has quit [Remote host closed the connection]
sorbo_ has left #ruby [#ruby]
Jackneill has joined #ruby
Jackneill has joined #ruby
adeponte has quit [Ping timeout: 244 seconds]
ryanf has quit [Ping timeout: 255 seconds]
danneu has joined #ruby
ryanf has joined #ruby
zzing has quit [Quit: Computer has gone to sleep.]
browndawg has joined #ruby
alex57 has quit [Read error: Connection reset by peer]
bradleyprice has quit [Remote host closed the connection]
cobragoat has quit [Read error: Connection reset by peer]
megha has quit [Quit: WeeChat 0.4.0]
alex57 has joined #ruby
theshow has joined #ruby
alex57 has quit [Read error: Connection reset by peer]
alex57 has joined #ruby
shock_one has joined #ruby
JohnBat26 has joined #ruby
liquid-silence has joined #ruby
theshow has quit [Ping timeout: 244 seconds]
wallerdev has quit [Quit: wallerdev]
xemu has quit [Ping timeout: 248 seconds]
marco has quit [Ping timeout: 248 seconds]
JonnieCa1he has joined #ruby
adeponte has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
JonnieCache has quit [Ping timeout: 240 seconds]
pothibo has quit [Quit: pothibo]
yacks has quit [Remote host closed the connection]
alex57 has quit [Read error: Connection reset by peer]
angusiguess has quit [Ping timeout: 246 seconds]
onemanjujitsu has quit [Quit: onemanjujitsu]
alex57 has joined #ruby
arya has joined #ruby
alex57 has quit [Read error: Connection reset by peer]
alex57 has joined #ruby
BrindleFly_ has joined #ruby
BrindleFly has quit [Read error: Operation timed out]
BrindleFly_ is now known as BrindleFly
hmarr has quit [Quit: Computer has gone to sleep.]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
IcyDragon has quit [Quit: Space~~~]
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
tewlz_ has joined #ruby
stormetrooper has joined #ruby
appamatto has quit [Changing host]
appamatto has joined #ruby
BrindleFly has quit [Quit: BrindleFly]
rezzack has quit [Quit: Leaving.]
guns has joined #ruby
fir_ed has joined #ruby
kmurph has quit [Quit: kmurph]
alex57 has quit [Read error: Connection reset by peer]
alex57 has joined #ruby
d34th4ck3r has joined #ruby
liquid-silence has quit [Quit: Computer has gone to sleep.]
kmurph has joined #ruby
alex57 has quit [Read error: Connection reset by peer]
alex57 has joined #ruby
Fretta_ has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
Fretta has quit [Ping timeout: 256 seconds]
Fretta_ is now known as Fretta
alex57 has quit [Read error: Connection reset by peer]
alex57 has joined #ruby
angusiguess has joined #ruby
kofno has joined #ruby
cdt has joined #ruby
cdt has quit [Client Quit]
alex57 has quit [Read error: Connection reset by peer]
alex57 has joined #ruby
angusiguess has quit [Ping timeout: 252 seconds]
v0n has joined #ruby
ananthakumaran has joined #ruby
arya has quit [Ping timeout: 248 seconds]
arya has joined #ruby
cableray has quit [Quit: cableray]
Loaft has quit [Ping timeout: 245 seconds]
meoblast001 has quit [Read error: Connection reset by peer]
Nisstyre-laptop has quit [Read error: Connection reset by peer]
alanjc has quit [Quit: alanjc]
Nisstyre-laptop has joined #ruby
cableray has joined #ruby
liquid-silence has joined #ruby
v0n has quit [Ping timeout: 246 seconds]
zigidias has quit [Remote host closed the connection]
shock_one has quit [Remote host closed the connection]
Loaft has joined #ruby
t-mart has quit [Remote host closed the connection]
alex57 has quit [Read error: Connection reset by peer]
zigidias has joined #ruby
alex57 has joined #ruby
cableray has quit [Quit: cableray]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
Es0teric has quit [Quit: Computer has gone to sleep.]
alex57 has quit [Read error: Connection reset by peer]
kmurph has quit [Quit: kmurph]
Dreamer3 has joined #ruby
alex57 has joined #ruby
alex57 has quit [Read error: Connection reset by peer]
cobragoat has joined #ruby
alex57 has joined #ruby
therod has joined #ruby
Loaft has quit [Read error: Connection reset by peer]
Loaft has joined #ruby
cobragoat has quit [Ping timeout: 246 seconds]
cableray has joined #ruby
arya has quit [Ping timeout: 248 seconds]
alex57 has quit [Read error: Connection reset by peer]
Dreamer3 has quit [Quit: Computer has gone to sleep.]
Dreamer3 has joined #ruby
alex57 has joined #ruby
Jeaye has quit [Quit: zzzZZZzzz]
alex57 has quit [Read error: Connection reset by peer]
tjbiddle has joined #ruby
fedza__ has joined #ruby
arya has joined #ruby
dcwu has quit [Quit: Leaving.]
Puck6633 has quit [Ping timeout: 252 seconds]
fedza__ has quit [Max SendQ exceeded]
fedza_ has quit [Ping timeout: 264 seconds]
fedza__ has joined #ruby
alex57 has joined #ruby
tjbiddle has quit [Client Quit]
recycle has joined #ruby
alex57 has left #ruby [#ruby]
ryanf has quit [Quit: leaving]
Morkel has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
icole has joined #ruby
grzywacz has joined #ruby
Morkel_ has joined #ruby
rshetty has joined #ruby
Morkel has quit [Ping timeout: 252 seconds]
Morkel_ is now known as Morkel
AntiTyping has quit [Quit: AntiTyping]
nimred has quit [Quit: leaving]
tewlz_ has quit [Quit: leaving]
rshetty has quit [Remote host closed the connection]
ninegrid has quit [Read error: Operation timed out]
ninegrid has joined #ruby
swex_ has joined #ruby
swex has quit [Ping timeout: 244 seconds]
Xeago has joined #ruby
arya has quit [Ping timeout: 248 seconds]
Bosox20051 has quit [Ping timeout: 276 seconds]
icole has quit [Ping timeout: 252 seconds]
Xeago has quit [Remote host closed the connection]
cableray has quit [Quit: cableray]
arya has joined #ruby
angusiguess has joined #ruby
braoru has joined #ruby
emocakes has joined #ruby
angusiguess has quit [Ping timeout: 245 seconds]
fir_ed has quit [Ping timeout: 252 seconds]
yours_truly has joined #ruby
<unstable> NoMethodError: undefined method `>' for nil:NilClassfrom euler.rb:75:in `high_five'
<unstable> Why do I get this error? Also, what is an efficient way to debug this?
lkba has quit [Ping timeout: 252 seconds]
<unstable> I threw in the debugger to test it, and I did steps.. though I can go through dozens of iterations without a bug.
<unstable> Is there a way to tell the debugger to freeze right before it gives me the NilClass error?
<brain_shim> use a puts
<brain_shim> throw a couple of them in there to spit out the variables at point in your loop
<Mon_Ouie> The problem is inject(:*)
<Mon_Ouie> [].inject(:*) => nil
icole has joined #ruby
<Mon_Ouie> You can set a default value like so : [].inject(1, :*) => 1
<unstable> good idea
Y_Ichiro has quit [Remote host closed the connection]
mercwithamouth has quit [Ping timeout: 276 seconds]
ananthakumaran1 has joined #ruby
<unstable> Mon_Ouie: I get a new error now.
<unstable> NoMethodError: undefined method `inject' for nil:NilClass
<unstable> With the 1 as the default.
spaceships has quit [Ping timeout: 248 seconds]
ananthakumaran has quit [Ping timeout: 256 seconds]
<Mon_Ouie> That's because you're not checking the bounds of NUM
<Mon_Ouie> You're accessing a range that's not in NUM, hence you get nil back
zeade has quit [Quit: Leaving.]
jgrevich has quit [Remote host closed the connection]
Puck6633 has joined #ruby
<unstable> Mon_Ouie: weird, when I make the while loop != NUM.count, it works. When it's NUM.count -1 it breaks.
yacks has joined #ruby
<BlankVerse> how do i do a read, then truncate then write in a single File::open call
jkitchen has joined #ruby
<jkitchen> question: bundle exec irb can load one gem but not another for some reason. the paths seem correct: (kramdown can be loaded, flickraw cannot)
<jkitchen> vendor/bundle/ruby/1.9.1/gems/kramdown-0.13.8/lib/kramdown.rb
<jkitchen> vendor/bundle/ruby/1.9.1/gems/flickraw-0.9.6/lib/flickraw.rb
<jkitchen> doing `require 'kramdown'` works fine, but `require 'flickraw'` says 'cannot load such file -- flickraw'
<jkitchen> any pointers?
ziprar has joined #ruby
guns has quit [Ping timeout: 256 seconds]
<Mon_Ouie> unstable: Here's a method that might help you: Enumerable#each_cons
toekutr has quit [Remote host closed the connection]
<Hanmac1> jkitchen do you install both at the same way?
<jkitchen> Hanmac1: they're in my Gemfile and were installed with bundle install --deployment
Hanmac1 is now known as Hanmac
zipace has quit [Ping timeout: 240 seconds]
<Hanmac> huch bundle ... i dont trust it so you may ask at #bundler
quest88 has quit [Quit: quest88]
<jkitchen> ok
<unstable> Thanks Mon_Ouie!
icole has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
gosshedd has joined #ruby
SilentStorm has joined #ruby
SilentStorm has quit [Client Quit]
arya has joined #ruby
lkba has joined #ruby
ananthakumaran has joined #ruby
ananthakumaran1 has quit [Ping timeout: 252 seconds]
octoberry has quit [Ping timeout: 248 seconds]
danneu has quit [Quit: WeeChat 0.3.8]
zeade has joined #ruby
d34th4ck3r has quit [Quit: Konversation terminated!]
emocakes has quit [Quit: emocakes]
yours_truly has quit [Quit: Leaving]
emocakes has joined #ruby
arietis has joined #ruby
joeycarmello has joined #ruby
thufir_ has joined #ruby
arya has quit [Ping timeout: 248 seconds]
grzywacz has quit [Ping timeout: 276 seconds]
monkegjinni has joined #ruby
zeade has quit [Ping timeout: 255 seconds]
dnordstrom has quit [Ping timeout: 252 seconds]
joeycarmello has quit [Remote host closed the connection]
arya has joined #ruby
<shevy> dont believe Hanmac
Takehiro has quit [Remote host closed the connection]
<shevy> Hanmac secretly LOVES bundler
<shevy> he was very happy when someone on #OpenRubyRMK announced that it will switch to bundler :D
angusiguess has joined #ruby
<shevy> jkitchen for normal gems, "gem list" should list all available gems. and you only have to locate where flickraw*.gem is on your filesystem, if you did "gem install flickraw"
<Hanmac> shevy did you get my button sample for rwx?
<shevy> Hanmac hmm no
<shevy> got the link?
<lewellyn> yes. i agree. bundler is the best thing *ever*.
<lewellyn> oops. did i drip something there?
<shevy> the best thing about bundler is that one can avoid it
manizzle has quit [Remote host closed the connection]
<Hanmac> shevy you wanted some rwx samples? https://github.com/Hanmac/rwx/blob/master/tests/button.rb
<jkitchen> shevy: interesting. gem list doesn't show it. bundle exec gem install flickraw succeeded but gem list doesn't show it still.
<shevy> jkitchen bundler probably keeps the gem it installs separate from "gem list"
<shevy> one would only have to find out where it installs it
<shevy> @frame.bind(:button_clicked,&@proc)
<shevy> hmm what is the &@proc Hanmac
<shevy> .bind adds to a widget?
<shevy> I'd love to have:
Throlkim has joined #ruby
<shevy> @frame << :button_clicked, &@proc
<shevy> oh wait
<shevy> does that even work with {} ?
<shevy> hmmmm
<shevy> @frame.bind(:filepicker_changed){|e| p e.path }
<shevy> @frame << (:filepicker_changed){|e| p e.path }
<shevy> I guess no :(
<shevy> never noticed that before with <<
Hecatic has quit [Quit: HecAtic]
Throlkim has quit [Remote host closed the connection]
thufir_ has quit [Quit: Leaving.]
Puck6633 has quit [Ping timeout: 255 seconds]
arya has quit [Ping timeout: 248 seconds]
<Hanmac> thats why i use bind, but you canuse { } too with bind, i only used a variable because the block was the same
arya has joined #ruby
monkegjinni has quit [Remote host closed the connection]
marr has joined #ruby
Xeago has joined #ruby
DrCode has quit [Remote host closed the connection]
emergion has joined #ruby
zeade has joined #ruby
gommo has joined #ruby
DrCode has joined #ruby
zomgbie has quit [Ping timeout: 245 seconds]
monkegjinni has joined #ruby
workmad3 has joined #ruby
arya has quit [Ping timeout: 248 seconds]
cparen has quit [Quit: cparen]
alexturner has quit [Quit: alexturner]
Mon_Ouie has quit [Quit: WeeChat 0.4.0]
codecop has joined #ruby
berkes has joined #ruby
arya has joined #ruby
icole has joined #ruby
zeade has quit [Ping timeout: 276 seconds]
arya has quit [Ping timeout: 248 seconds]
adeponte has joined #ruby
Phenax has left #ruby ["http://quassel-irc.org - Chat comfortably. Anywhere."]
arya has joined #ruby
icole has quit [Ping timeout: 260 seconds]
adeponte has quit [Ping timeout: 244 seconds]
snearch has joined #ruby
snearch has quit [Max SendQ exceeded]
chrishough has joined #ruby
daniel_- has joined #ruby
backjlack has joined #ruby
backjlack has quit [Remote host closed the connection]
poga has quit [Remote host closed the connection]
backjlack has joined #ruby
beardyjay has joined #ruby
beardyjay has quit [Changing host]
beardyjay has joined #ruby
arturaz has joined #ruby
relixx has joined #ruby
decoponio has joined #ruby
Fretta has quit [Quit: Fretta]
arya has quit [Ping timeout: 248 seconds]
shock_one has joined #ruby
jkitchen has left #ruby [#ruby]
arya has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
nari has joined #ruby
nomadic has joined #ruby
zeade has joined #ruby
adambeynon has joined #ruby
joeycarmello has joined #ruby
lolzbgr has joined #ruby
Takehiro has joined #ruby
lolzbgr has left #ruby [#ruby]
joeycarmello has quit [Ping timeout: 240 seconds]
colonolGron has joined #ruby
timonv has joined #ruby
zeade has quit [Ping timeout: 276 seconds]
Al__ has joined #ruby
arya has quit [Ping timeout: 248 seconds]
emocakes has quit [Quit: emocakes]
elico has joined #ruby
arya has joined #ruby
naquad has quit [Ping timeout: 245 seconds]
<BlankVerse> i am installing a gem using sudo and then not able to access it in a normal user's irb session
<BlankVerse> sudo gem install net-sftp; irb ; require 'net-sftp'; error
elaptics`away is now known as elaptics
emocakes has joined #ruby
<banisterfiend> BlankVerse: what version of ruby
<BlankVerse> ruby 1.8.7 (2011-06-30 patchlevel 352) [i686-linux]
<BlankVerse> inside the default lucid32 vagrant box if that matters?
qohelet_ has joined #ruby
zommi has joined #ruby
<jrabbit> BlankVerse: net/sfto no?
Niamkik has quit [Quit: Disconnecting from stoned server.]
<jrabbit> *p
<Hanmac> BlankVerse require "rubygems" first?
<BlankVerse> jrabbit: net/sftp
qohelet_ has left #ruby [#ruby]
Niamkik has joined #ruby
shock_one has quit [Ping timeout: 255 seconds]
<BlankVerse> Hanmac: thanks !
* Hanmac cant wait until june2013 ... it will be the end of the world for most ruby users :P
<jrabbit> how so?
gener1c has quit [Disconnected by services]
<Hanmac> jrabbit june2013 is the end of life for 1.8.7
<jrabbit> ah
zeade has joined #ruby
Loaft has quit [Remote host closed the connection]
main has joined #ruby
charliesome has joined #ruby
samphippen has joined #ruby
ninegrid has quit [Ping timeout: 245 seconds]
arya has quit [Ping timeout: 248 seconds]
Neomex has joined #ruby
chrishough has quit [Quit: chrishough]
arya has joined #ruby
ferdev|away is now known as ferdev
zeade has quit [Ping timeout: 248 seconds]
mityaz has joined #ruby
m8 has joined #ruby
DerekPow has joined #ruby
<DerekPow> I need job
gommo has quit [Remote host closed the connection]
AwayLex is now known as Quadlex
atno has quit [Read error: No route to host]
razibog has joined #ruby
<emocakes> i need a blow job
<Quadlex> you can use a gem for that
<emocakes> gem install thai_whore
<Quadlex> wait. Diamond. Im thinking a diamond.
pavilionXP has joined #ruby
atno has joined #ruby
workmad3 has joined #ruby
reset has quit [Quit: Leaving...]
<DerekPow> Lol
Virunga has joined #ruby
mityaz has quit [Remote host closed the connection]
<DerekPow> Php or ruby?
<DerekPow> Ruby or python?
pyrac has joined #ruby
<Quadlex> for what purpose?
<Quadlex> Theyre both Turing complete
Neomex has quit [Quit: Neomex]
<Quadlex> They all have people using them,
<Quadlex> lots of docs
poga has joined #ruby
PanPan_ has quit [Quit: ChatZilla 0.9.90 [Firefox 18.0.2/20130201065344]]
imami|afk has quit [Ping timeout: 252 seconds]
<DerekPow> Ruby is not as good documented as R
<DerekPow> As php
<banisterfiend> DerekPow: what's your native language?
beiter has joined #ruby
maxmanders has joined #ruby
zigomir has joined #ruby
<Quadlex> Sure, but there is still plenty of documentation.
<Hanmac> "C" :D
<Quadlex> Including tutorials et al
banseljaj has joined #ruby
<Quadlex> Its really much of a muchness
<banisterfiend> Hanmac: guten tag?
<JoeHazzers> the reason php has so much documentation is because it has so many special cases, warnings, and incomprehensible function names
<JoeHazzers> :D
<DerekPow> I dont code
<Quadlex> Are you looking to start coding?
<DerekPow> I just think what to learn
<DerekPow> Yep
<Quadlex> Because otherwise im not sure what kind of comparison you're after
Takehiro has quit [Remote host closed the connection]
<shevy> who has got the biggest of course
<Quadlex> Well, in my opinion, PHP isn't going to be a growing language in the future
mityaz has joined #ruby
<Quadlex> shevy: I figured only developers would care about language pissing contests
<shevy> depends on the growth, if we have + 300 million new net-users on the www in the next decade, then all languages might profit due to sheer size increase alone, some more than others
<Quadlex> DerekPow: Either language is good to learn. I prefer Ruby for no reason other then it "feels" better
Takehiro has joined #ruby
<banisterfiend> DerekPow: can you do this? http://www.youtube.com/watch?v=WqAvuPkt2mc
xargoon has quit [Ping timeout: 260 seconds]
kristofers has joined #ruby
Criztian has joined #ruby
xargoon has joined #ruby
sepp2k has joined #ruby
mityaz has quit [Quit: See ya!]
angusiguess has quit [Ping timeout: 255 seconds]
pavilionXP has quit [Read error: Connection reset by peer]
poga has quit [Remote host closed the connection]
a_run has joined #ruby
<unstable> https://gist.github.com/JohnTheodore/4749324 TypeError: nil can't be coerced into Fixnum ... why am I getting this error when I run grid_sweep?
backjlack has quit [Remote host closed the connection]
<banisterfiend> unstable: use pry-rescue to tell u
Kuifje has joined #ruby
Kuifje has quit [Changing host]
Kuifje has joined #ruby
timonv has quit [Remote host closed the connection]
DerekPow has quit [Quit: Bye]
zeade has joined #ruby
<unstable> banisterfiend: Holy crap that helps so much
<unstable> Thanks a lot
<unstable> It dropped me into debugger right when the problem occurred
anderse has joined #ruby
<unstable> full_delta?([0, 17], [0, 1]) #<< this returns true, and it should return false.
zeade has quit [Ping timeout: 256 seconds]
Neomex has joined #ruby
arya has quit [Ping timeout: 248 seconds]
subbyyy has quit [Ping timeout: 246 seconds]
anderse has quit [Quit: anderse]
shock_one has joined #ruby
arya has joined #ruby
Neomex has quit [Quit: Neomex]
banisterfiend has quit [Remote host closed the connection]
<unstable> hell yes, I got the right answer.
<unstable> damn that feels good
samphippen has quit [Quit: Computer has gone to sleep.]
Virunga has quit [Remote host closed the connection]
sayem has joined #ruby
BrindleFly has joined #ruby
therod has quit [Quit: Leaving...]
arya has quit [Ping timeout: 248 seconds]
skattyadz has joined #ruby
Takehiro has quit [Remote host closed the connection]
arya has joined #ruby
eka has joined #ruby
RurouniJones has joined #ruby
moofy has joined #ruby
<moofy> Ahoyhoy
<moofy> Hoy.
skogis has quit [Ping timeout: 245 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
skogis has joined #ruby
TheFuzzball has joined #ruby
<moofy> So rubix cubes
workmad3 has quit [Ping timeout: 252 seconds]
zeade has joined #ruby
niklasb has joined #ruby
Virunga has joined #ruby
a_run has quit [Ping timeout: 264 seconds]
Vektur has quit [Ping timeout: 255 seconds]
a_run has joined #ruby
a_run has quit [Client Quit]
ferdev is now known as ferdev|away
arya has quit [Ping timeout: 248 seconds]
pskosinski has joined #ruby
ycy has joined #ruby
banisterfiend has joined #ruby
F1skr has joined #ruby
banisterfiend has quit [Remote host closed the connection]
banisterfiend has joined #ruby
arya has joined #ruby
daniel_- has quit [Ping timeout: 252 seconds]
zeade has quit [Ping timeout: 260 seconds]
therod has joined #ruby
browndawg1 has joined #ruby
angusiguess has joined #ruby
ferdev|away is now known as ferdev
browndawg has quit [Ping timeout: 248 seconds]
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
zomgbie has joined #ruby
therod has quit [Ping timeout: 256 seconds]
<BlankVerse> i get the error : /opt/ruby/lib/ruby/gems/1.8/gems/net-ssh-2.6.5/lib/net/ssh/config.rb:60:in `expand_path': non-absolute home (ArgumentError)
<BlankVerse> when using exec <myscript> in upstart
<BlankVerse> but not which running it normally via ./myscript
BrindleFly has quit [Quit: BrindleFly]
chussenot has joined #ruby
Al__ has quit [Quit: Al__]
zomgbie has quit [Ping timeout: 255 seconds]
browndawg has joined #ruby
nimred has joined #ruby
<shevy> that is a strange path
browndawg1 has quit [Ping timeout: 255 seconds]
baphled has joined #ruby
kofno has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
arya has quit [Ping timeout: 248 seconds]
razibog has quit [Ping timeout: 252 seconds]
eka has quit [Quit: Computer has gone to sleep.]
Icarot has joined #ruby
arya has joined #ruby
zomgbie has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
zeade has joined #ruby
Icarot has quit [Client Quit]
Icarot has joined #ruby
browndawg has quit [Quit: Leaving.]
moofy has quit [Quit: moofy]
sayem has quit [Remote host closed the connection]
arietis has quit [Quit: Computer has gone to sleep.]
robustus has quit [Ping timeout: 276 seconds]
arya has quit [Ping timeout: 248 seconds]
arietis has joined #ruby
robustus has joined #ruby
Al__ has joined #ruby
zeade has quit [Ping timeout: 256 seconds]
Al__ has quit [Client Quit]
zomgbie has quit [Ping timeout: 276 seconds]
pac1 has joined #ruby
arya has joined #ruby
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
arya has quit [Ping timeout: 248 seconds]
wf2f has quit []
colonolGron has quit [Quit: Lost terminal]
DDAZZA has joined #ruby
arya has joined #ruby
tk__ has joined #ruby
timonv has joined #ruby
muz0xd has joined #ruby
Al__ has joined #ruby
TomJ has joined #ruby
TomJ has quit [Changing host]
TomJ has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
Al__ has quit [Client Quit]
timonv has quit [Ping timeout: 245 seconds]
Al__ has joined #ruby
muz0xd has left #ruby ["Ухожу я от вас (xchat 2.4.5 или старше)"]
Takehiro has joined #ruby
Spooner has joined #ruby
sam113101 has joined #ruby
<sam113101> if I load a file which is already loaded, and some class in the file as been modified, does it modify existing objects or only future objects?
timonv has joined #ruby
<sam113101> has*
Al__ has quit [Client Quit]
monkegjinni has quit [Remote host closed the connection]
<Hanmac> sam13101 it depends
<Hanmac> normaly it modify the existing classes, so the object are affected too, ... (ecxept you do shity things)
muz0xd has joined #ruby
apoch632 has quit [Quit: Leaving.]
<sam113101> ok
Catbuntu has joined #ruby
F1skr has quit [Quit: WeeChat 0.4.0]
apoch632 has joined #ruby
muz0xd has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
ananthakumaran has quit [Read error: No route to host]
muz0xd has joined #ruby
<Hanmac> sam113101: for sample when a superclass is created from a method like class A < Fuction("A"); end then it may fail when you load the stuff again
ananthakumaran has joined #ruby
muz0xd has left #ruby [#ruby]
elaptics is now known as elaptics`away
muz0xd has joined #ruby
razibog has joined #ruby
muz0xd has quit [Client Quit]
kristofers has quit [Read error: Connection reset by peer]
banisterfiend has quit [Remote host closed the connection]
Icarot has quit [Remote host closed the connection]
kristofers has joined #ruby
zeade has joined #ruby
muz0xd has joined #ruby
daig0ro has joined #ruby
monkegjinni has joined #ruby
Xeago has joined #ruby
AntiTyping has joined #ruby
nari has quit [Ping timeout: 276 seconds]
moshee has quit [Ping timeout: 245 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
w|t has quit [Quit: Cya.]
damagednoob has joined #ruby
arya has quit [Ping timeout: 248 seconds]
w|t has joined #ruby
w|t has quit [Changing host]
w|t has joined #ruby
zeade has quit [Ping timeout: 264 seconds]
samphippen has joined #ruby
davetherat has quit [Remote host closed the connection]
melty has quit [Remote host closed the connection]
davetherat has joined #ruby
<sam113101> I didn't know that was possible
arya has joined #ruby
AntiTyping has quit [Quit: AntiTyping]
kofno has joined #ruby
timonv has quit [Remote host closed the connection]
Elhu has joined #ruby
<jokke> hey, is there something like intervalls in ruby that can exclude a number?
<jokke> like (0,5]
qpf has joined #ruby
<jokke> which would be the interval from 0 to 5 exluding 0
<yxhuvud> 0...5
<yxhuvud> that excludes the 5 though ..
<jokke> ah
<jokke> so three dots excludes both numbers
<yxhuvud> excluding the start is not possible afaik.
<yxhuvud> no.
TheFuzzball has quit [Ping timeout: 276 seconds]
<jokke> ah
<jokke> only the last
TheFuzzball has joined #ruby
<jokke> well but i could do something like 5...0 then, right?
mcatch_2 has joined #ruby
apoch632 has left #ruby [#ruby]
<jokke> can i somehow determine the intersection of two such intervals?
<jokke> probably not..
ShellFu has quit [Quit: Leaving]
<jokke> because only one end can be open
<jokke> well, i'll just write a class for that then
muz0xd has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<mcatch_2> Does anyone want to get involved in a project for fun/learning using rails? Nothing serious, just wanting to further our abilities and experience.
hmarr has joined #ruby
banisterfiend has joined #ruby
<arturaz> mcatch_2, I want to do that for scala/play
joofsh has joined #ruby
ferdev is now known as ferdev|away
m8 has quit [Ping timeout: 276 seconds]
main has quit [Ping timeout: 248 seconds]
aedornm has quit [Remote host closed the connection]
kofno has quit [Remote host closed the connection]
<mcatch_2> But not RoR :(
<arturaz> I already know ror :)
kristofers has quit []
<arturaz> And I moved on to Scala. I even have an idea
idkazuma has joined #ruby
therod has joined #ruby
Gwyxx has joined #ruby
rdark has joined #ruby
m8 has joined #ruby
mcatch_2 has quit [Quit: mcatch_2]
m8 has quit [Read error: Connection reset by peer]
banisterfiend has quit [Read error: Connection reset by peer]
m8 has joined #ruby
banisterfiend has joined #ruby
liquid-silence has quit [Ping timeout: 252 seconds]
ferdev|away is now known as ferdev
therod has quit [Ping timeout: 264 seconds]
zomgbie has joined #ruby
Elhu has quit [Quit: Computer has gone to sleep.]
mityaz has joined #ruby
zeade has joined #ruby
Vektur has joined #ruby
motto has joined #ruby
m8 has quit [Ping timeout: 256 seconds]
zomgbie has quit [Ping timeout: 276 seconds]
daig0ro has quit [Quit: Computer has gone to sleep.]
embs has joined #ruby
AtoxIO has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
hmarr has quit [Ping timeout: 245 seconds]
kofno has joined #ruby
Elhu has joined #ruby
browndawg has joined #ruby
browndawg has left #ruby [#ruby]
hmarr has joined #ruby
xemu has joined #ruby
sayan has joined #ruby
RurouniJones has quit [Remote host closed the connection]
Elhu has quit [Quit: Computer has gone to sleep.]
qpf has quit [Remote host closed the connection]
zeade has quit [Ping timeout: 245 seconds]
qpf has joined #ruby
jonahR has quit [Quit: jonahR]
elico has quit [Ping timeout: 252 seconds]
rdark has quit [Ping timeout: 240 seconds]
the_drow has joined #ruby
ferdev is now known as ferdev|away
samuelj has joined #ruby
ferdev|away is now known as ferdev
jonathanwallace2 has joined #ruby
<the_drow> does ruby has a standard ini parser?
<samuelj> Hey, can anyone recommend an alternative to websocket-rack that's compatible with JRuby? The problems are caused by Thin's C extensions. Any ideas?
heftig has quit [Quit: leaving]
jonathanwallace1 has quit [Ping timeout: 264 seconds]
Inoperable has quit [Quit: ZNC - http://znc.in]
Stilo has joined #ruby
Trudko has joined #ruby
<Trudko> guys I am using prawn plugin for pdfs and I clearly am setting variables wrong for table on line 4 http://pastie.org/6109959. I got error ndefined method `position=' for #<Prawn::Table:0x53a09d8>
jamescarr has joined #ruby
browndawg has joined #ruby
monkegjinni has quit [Remote host closed the connection]
reppard has joined #ruby
joofsh has quit [Remote host closed the connection]
heftig has joined #ruby
shock_one has quit [Read error: Operation timed out]
tenmilestereo has joined #ruby
pothibo has joined #ruby
pothibo has quit [Client Quit]
elico has joined #ruby
Vektur has quit []
marco_ has joined #ruby
kmurph has joined #ruby
kmurph has quit [Client Quit]
LouisRoR has joined #ruby
acrocity has quit [Quit: leaving...]
Inoperable has joined #ruby
emocakes has quit [Quit: emocakes]
elico has quit [Ping timeout: 256 seconds]
mibitzi has joined #ruby
subbyyy has joined #ruby
mando has joined #ruby
kofno has quit [Remote host closed the connection]
kirun has joined #ruby
Inoperable has quit [Quit: ZNC - http://znc.in]
DDAZZA has quit [Quit: Leaving]
skattyadz has quit [Quit: skattyadz]
Inoperable has joined #ruby
ryanh has quit [Ping timeout: 245 seconds]
zeade has joined #ruby
rheoli has joined #ruby
emmanuelux has joined #ruby
Inoperable has quit [Client Quit]
Inoperable has joined #ruby
rheoli has left #ruby [#ruby]
ryanh has joined #ruby
workmad3 has joined #ruby
zigomir has quit [Quit: zigomir]
the_drow has quit [Ping timeout: 245 seconds]
Inoperable has quit [Client Quit]
m8 has joined #ruby
Inoperable has joined #ruby
Monie has joined #ruby
ananthakumaran1 has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
therod has joined #ruby
mando has quit [Remote host closed the connection]
motto has quit [Ping timeout: 256 seconds]
daig0ro has joined #ruby
F1skr has joined #ruby
arturaz has quit [Remote host closed the connection]
daniel_- has joined #ruby
therod has quit [Ping timeout: 260 seconds]
Puck6633 has joined #ruby
emocakes has joined #ruby
pyrac has quit [Quit: pyrac]
skattyadz has joined #ruby
iamjarvo has joined #ruby
b1rkh0ff has joined #ruby
zeade has quit [Ping timeout: 264 seconds]
reppard has quit [Ping timeout: 260 seconds]
octoberry has joined #ruby
d2dchat has joined #ruby
pooriaazimi has joined #ruby
d2dchat has quit [Remote host closed the connection]
tk__ has quit [Quit: ばいばい]
hmarr has quit [Ping timeout: 264 seconds]
idkazuma has quit [Remote host closed the connection]
wting has quit [Ping timeout: 252 seconds]
<jokke> i have a class Version and a method Version#conflict? other. If i have an array with Version objects, how would i check if none of the object conflict with the other?
<jokke> *pbjects
<jokke> *objects
wting has joined #ruby
hmarr has joined #ruby
<jokke> other than versions.each {|ver| versions.each {|other| ver.conflict? other} or something
<jokke> you know what i mean?
`brendan has joined #ruby
binaryplease has joined #ruby
AlSquire has joined #ruby
skattyadz has quit [Quit: skattyadz]
<Hanmac> jokke: [1,2,3,4,5].permutation(2).none?{|a,b| a.conflict?(b)}
<Hanmac> ups relace the array with yours
elico has joined #ruby
AlSquire has quit [Client Quit]
sayan has quit [Read error: Connection reset by peer]
<jokke> oh ok
<jokke> i thought of using inject
<jokke> but not sure how
atmosx has joined #ruby
<jokke> Hanmac, problem is with your solution, that it always takes n^2 iterations
colonolGron has joined #ruby
elico has quit [Ping timeout: 252 seconds]
<jokke> when a single conflict would be enough to break
_br_ has quit [Excess Flood]
<Hanmac> jokke: wrong, it breaks if one conflict says true ... thats the magic of none? because permutation returns an enumerator (on GOOD ruby)
AlSquire has joined #ruby
AlSquire has quit [Client Quit]
Nisstyre-laptop has quit [Read error: Connection reset by peer]
<atmosx> hello
<jokke> Hanmac: ah okay
<jokke> good thing!
<jokke> thanks
yshh has joined #ruby
Nisstyre-laptop has joined #ruby
_br_ has joined #ruby
_br_ has quit [Excess Flood]
emocakes has quit [Quit: emocakes]
daig0ro has quit [Quit: Computer has gone to sleep.]
himsin has quit [Remote host closed the connection]
himsin has joined #ruby
h8R has quit [Remote host closed the connection]
jamescarr has quit [Quit: jamescarr]
ferdev is now known as ferdev|away
skattyadz has joined #ruby
_br_ has joined #ruby
samuelj has quit [Quit: Page closed]
kmurph has joined #ruby
Choobie has joined #ruby
skattyadz has quit [Client Quit]
sayan has joined #ruby
zeade has joined #ruby
therod has joined #ruby
h8R has joined #ruby
s1n4 has joined #ruby
dmiller has quit [Ping timeout: 260 seconds]
Inoperable has quit [Quit: ZNC - http://znc.in]
skattyadz has joined #ruby
otherj has joined #ruby
arya has quit [Ping timeout: 248 seconds]
ferdev|away is now known as ferdev
naquad has joined #ruby
s1n4 has quit [Ping timeout: 252 seconds]
arya has joined #ruby
skattyadz has quit [Ping timeout: 245 seconds]
havenwood has joined #ruby
F1skr has quit [Ping timeout: 255 seconds]
tommyvyo has joined #ruby
daniel_- has quit [Ping timeout: 276 seconds]
workmad3 has quit [Ping timeout: 255 seconds]
dmiller has joined #ruby
zeade has quit [Ping timeout: 276 seconds]
erlingur has joined #ruby
Xeago has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 248 seconds]
Xeago has joined #ruby
subbyyy has quit [Ping timeout: 252 seconds]
kmurph has quit [Quit: kmurph]
skattyadz has joined #ruby
arya has quit [Ping timeout: 248 seconds]
Neomex has joined #ruby
pooriaazimi has quit [Read error: Connection reset by peer]
pooriaazimi has joined #ruby
k3rn3lito has quit [Ping timeout: 276 seconds]
Roa has quit [Ping timeout: 252 seconds]
jimeh has joined #ruby
jonathanwallace2 has quit [Ping timeout: 245 seconds]
pooriaazimi has quit [Client Quit]
k3rn3lito has joined #ruby
Roa has joined #ruby
arya has joined #ruby
maletor has joined #ruby
workmad3 has joined #ruby
jonathanwallace2 has joined #ruby
gosshedd has quit [Ping timeout: 252 seconds]
hmarr has quit [Ping timeout: 240 seconds]
nomenkun has joined #ruby
F1skr has joined #ruby
gosshedd has joined #ruby
Neomex has quit [Quit: Neomex]
the_mentat has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
reppard has joined #ruby
skattyadz has quit [Quit: skattyadz]
larissa has joined #ruby
Takehiro has quit [Ping timeout: 244 seconds]
Takehiro has joined #ruby
neohunter has joined #ruby
emocakes has joined #ruby
<neohunter> I'm a beginner, i have this: author = m.match(/regex/)[1].strip
SCommette has joined #ruby
<neohunter> it sometimes throw me a "undefined []" exception
<neohunter> its there any way i can assign a fixed value if the regex dont match?
zeade has joined #ruby
pu22l3r has joined #ruby
Skillachie has joined #ruby
<Hanmac> neohunter: author = m[/regex/,1] || "yourvalue"
megha has joined #ruby
<neohunter> Wow =o
<Skillachie> Hi guys
<Skillachie> I am having some trouble, ran into the StringMax for open-uri in a rake task. Because of the value instead of getting a fileIO i get a StringIO
<neohunter> Hanmac, thanks, amazing!
<Skillachie> I have tried
<Skillachie> to set the OpenURI::BUffer.const_set 'StringMAX',0
<Skillachie> in my rake task
<Skillachie> but it still does not seem to help
<Skillachie> Anyone have any ideas ? Or does it mean that the StringMax value is just not being set in the rake task
<Skillachie> ?
pdamer has joined #ruby
<Hanmac> haha stackoverflow got an stack overflow :D
braoru has quit [Quit: Leaving]
Stilo has quit [Quit: Textual IRC Client: www.textualapp.com]
<Hanmac> Skillachie: try Kernel::open
anonymuse has joined #ruby
hmarr has joined #ruby
pdamer has quit [Client Quit]
Puck6633 has quit []
zeade has quit [Ping timeout: 264 seconds]
wallerdev has joined #ruby
<Skillachie> Hanmac: Yup still returns StringIO
binaryplease has quit [Ping timeout: 276 seconds]
stormetrooper has quit [Ping timeout: 252 seconds]
<shevy> hey Hanmac
<shevy> I think I will stay on 1.9.x finally
billiam has joined #ruby
timonv has joined #ruby
<shevy> there are a few things not working perfectly well for my setup right now - two projects have warnings, that I have to fix (one is circular require warning and already initialized constant, the other project reads from a file from the hdd, then shouts that it cant find a match to the encoding
<shevy> both projects work fine on 1.8.x
<shevy> hmm but I think that's it... ah a few more warnings about multiple case-clauses
<shevy> but I can ignore those warnings for the most part
<shevy> so I think I am finally 100% on 1.9.x
subbyyy has joined #ruby
DimmuR has joined #ruby
DimmuR has left #ruby ["Ex-Chat"]
anonymuse has quit [Quit: Leaving.]
<Hanmac> imo MiniMagick::Image should work with stringIO too
Elhu has joined #ruby
<Hanmac> Skillachie: what does method(:open).source_location shows to you? and what does it show to you in the unit test?
hmarr has quit [Ping timeout: 244 seconds]
alanjc has joined #ruby
meoblast001 has joined #ruby
AntiTyping has joined #ruby
neohunter has left #ruby ["Linkinus - http://linkinus.com"]
reppard has quit [Ping timeout: 246 seconds]
relixx has quit [Quit: relixx]
BRMatt has joined #ruby
emocakes has quit [Quit: emocakes]
marco_ has quit [Read error: Connection reset by peer]
relixx has joined #ruby
hmarr has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
stormetrooper has joined #ruby
psyprus has quit [Ping timeout: 248 seconds]
binaryplease has joined #ruby
psyprus has joined #ruby
eka has joined #ruby
<Skillachie> Hanmac: i dont have any unit test for this rake task, but came across that solution. I am able to download and save all large files successfully but not small files since i keep getting StringIO returned
Elhu has quit [Quit: Computer has gone to sleep.]
vifanq has joined #ruby
timonv has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 248 seconds]
angusiguess has joined #ruby
<Hanmac> Skillachie did you use my line? what did it response?
hmarr has quit [Read error: Connection reset by peer]
zzing has joined #ruby
<vifanq> Hello. How to append a line to a file, without having it constantly open?
jimeh_ has joined #ruby
AtoxIO has quit [Remote host closed the connection]
sayan has quit [Ping timeout: 245 seconds]
mattbl has joined #ruby
d2dchat has joined #ruby
PragCypher has joined #ruby
eka has quit [Client Quit]
jimeh has quit [Ping timeout: 264 seconds]
jimeh_ is now known as jimeh
otherj has quit [Quit: otherj]
ctp has quit [Quit: Linkinus - http://linkinus.com]
samphippen has quit [Quit: Computer has gone to sleep.]
zeade has joined #ruby
apoch632 has joined #ruby
hmarr has joined #ruby
<havenwood> vifanq: Open it, append, close it? Not sure I understand what you mean by constantly open?
miskander has joined #ruby
liquid-silence has joined #ruby
<havenwood> vifanq: File.open('file.txt', 'a') { |file| file << 'appended' }
<havenwood> vifanq: (block closing closes the file)
apoch632 has quit [Remote host closed the connection]
<Skillachie> Hanmac: /.rvm/rubies/ruby-1.9.2-head/lib/ruby/1.9.1/open-uri.rb", 27
<Hanmac> hm that looks okay ...
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
evansbee has joined #ruby
skattyadz has joined #ruby
hmarr has quit [Ping timeout: 252 seconds]
pavilionXP has joined #ruby
emaiax has joined #ruby
<Skillachie> Hanmac: Hmm unless its another reason behind the scenes
damagednoob has quit [Quit: Leaving]
<Skillachie> Hanmac: I am trying to get this file using open-uri http://snowy.arsc.alaska.edu/gutenberg/cache/generated/7376/pg7376.epub
subbyyy has quit [Ping timeout: 245 seconds]
<vifanq> havenwood: thanks
PanPan has quit [Read error: Connection reset by peer]
PanPan has joined #ruby
<Hanmac> Skillachie, works for me, it returns an tmp file
<Skillachie> Hanmac: What!!
<Skillachie> Hanmac: 1.9.2 head ?
<Skillachie> Hanmac: what version of ruby ruby are you using ?
<Hanmac> 1.9.3
<Skillachie> Hanmac: let me give that a try i might not be able to upgrade but trying now
<Hanmac> isnt 1.9.2 allready unsuported yet??
x82_nicole has joined #ruby
quest88 has joined #ruby
BlankVerse has quit [Quit: leaving]
baphled has quit [Ping timeout: 260 seconds]
s1n4 has joined #ruby
<banisterfiend> Hanmac: sup
octoberry has quit [Ping timeout: 256 seconds]
spaceships has joined #ruby
x82_nicole has quit [Client Quit]
anderse has joined #ruby
baphled has joined #ruby
reppard has joined #ruby
monkegjinni has joined #ruby
Xeago has quit [Remote host closed the connection]
zomgbie has joined #ruby
emocakes has joined #ruby
crackfu has joined #ruby
toto- has quit [Quit: Linkinus - http://linkinus.com]
zeade has quit [Ping timeout: 264 seconds]
etcetera has quit []
qpf has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
reppard has quit [Ping timeout: 240 seconds]
daig0ro has joined #ruby
chussenot__ has joined #ruby
kmurph has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
s1n4 has quit [Quit: leaving]
miskander has quit [Quit: miskander]
Takehiro has joined #ruby
chussenot has quit [Ping timeout: 246 seconds]
chussenot__ is now known as chussenot
mibitzi has quit [Ping timeout: 246 seconds]
<shevy> let's jump into the future and use ruby 3.0
senayar has joined #ruby
anderse has quit [Quit: anderse]
skattyadz has quit [Quit: skattyadz]
samphippen has joined #ruby
daig0ro has quit [Quit: Textual IRC Client: www.textualapp.com]
<havenwood> shevy: ruby 3000
<Hanmac> shevy someday i want to use a time maschine only for the sentence: "the technology of the future, already yesterday" :P
baphled has quit [Ping timeout: 240 seconds]
baphled has joined #ruby
daniel_- has joined #ruby
matti has quit [Ping timeout: 255 seconds]
Dann1 has joined #ruby
ferdev is now known as ferdev|away
<shevy> find_duplicates.rb:38:in `split': invalid byte sequence in US-ASCII (ArgumentError)
<shevy> find_duplicates.rb:31: warning: Unsupported encoding ascii-bit ignored
<shevy> hmm
<shevy> when using File.readlines()
<shevy> and the second option, the hash entry for :encoding
pavilionXP has quit [Quit: Forget progress by proxy. Land on your own moon.]
AlSquire has joined #ruby
<shevy> encoding makes me violent
matti has joined #ruby
matti has quit [Changing host]
matti has joined #ruby
JumpMast3r has quit [Quit: JumpMast3r]
chussenot has quit [Ping timeout: 256 seconds]
elico has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
emmanuelux has quit [Ping timeout: 245 seconds]
zeade has joined #ruby
<Dann1> how can I check if there is an undefined value in a hash
<Hanmac> Dann1 what do you mean with "undefined value"?
muz0xd has joined #ruby
<Hanmac> Dann1 you can do: hash.has_key?(key)
<shevy> yeah or .has_value?
<Dann1> Oh that's it
<Dann1> Thanks
chussenot has joined #ruby
<Dann1> :has_value might help too mmm
vlad_starkov has joined #ruby
<muz0xd> anybody looking changes at ruby 2-rc1?
csaunders has joined #ruby
Criztian has quit [Remote host closed the connection]
elico has quit [Ping timeout: 256 seconds]
fir_ed has joined #ruby
dallasm has joined #ruby
main has joined #ruby
<shevy> muz0xdnah, there will surely be 10000 bugs
<shevy> I let others test it
ananthakumaran1 has quit [Quit: Leaving.]
jonathanwallace2 has quit [Ping timeout: 276 seconds]
<Skillachie> Hanmac: trying to use 1.9.3 but seem to be giving me other errors
Trudko has quit [Quit: ChatZilla 0.9.89-rdmsoft [XULRunner 1.9.0.17/2009122204]]
doublelisk has joined #ruby
<Hanmac> :P its because you use rails :P
<Skillachie> Hanmac: haha
<muz0xd> <shevy> when we can to use official release?
<Skillachie> Skillachie: will try to upgrade to ruby 1.9.3 later, will play around some more...yes i used rails haha
<Dann1> What use would it be to have a @var that equals nil?
browndawg has quit [Quit: Leaving.]
<shevy> muz0xd dunno, in two months?
<Hanmac> Skillachie did you look that your rails version is compatible with 1.9.3?
<shevy> not sure, there is some release schedule
emaiax has quit [Remote host closed the connection]
<Hanmac> Dann1: instance_variable_defined?
<muz0xd> <shevy> and what most changes expecting?
<Dann1> Oh yeah
<Dann1> Seems worthless though but okay
<Hanmac> Dann1 defining an instance variable to nil should not be needed because they allready defined at nil when accessing them
maletor has joined #ruby
<muz0xd> very interesting situation, i just begin to learn ruby, using 1.8.3 version - and now i hear thet after 2 month 2.0 version relising
emmanuelux has joined #ruby
<muz0xd> it's awesome
jrajav has joined #ruby
<muz0xd> very dinamic language
Fretta has joined #ruby
angusiguess has quit [Ping timeout: 240 seconds]
ninp0 has joined #ruby
<emocakes> muz0xd, why arent you learning with 1.9.3?
<emocakes> :\
subbyyy has joined #ruby
<muz0xd> 1.8.7
<muz0xd> because i used debian. lol
<shevy> muz0xd dunno. to be honest, I dont really care. I loved 1.8.x, I dont really feel the same amount of love at all for 1.9.x
<Hanmac> (debian had 1.9.* too. maybe not as default, but it has)
anderse has joined #ruby
<muz0xd> emocakes> in original i have the book rails way - 1.8 version
<shevy> ewww rails
<shevy> emorails!
<emocakes> why dont you love 1.9.x shevy?
<shevy> emocakes the encoding gives me nothing but problems
<emocakes> i actually prefer the way 1.8 hashes look
<emocakes> really? :\
<shevy> find_duplicates.rb:31: warning: Unsupported encoding ascii-bit ignored
<emocakes> i've only ever run into a few of them
<shevy> oh wai
<shevy> wait
<emocakes> and i just put UTF8 at the top
zeade has quit [Ping timeout: 255 seconds]
<shevy> yeah
otherj has joined #ruby
<shevy> I hear that again
<shevy> the UTF8 users dont have any problem
<shevy> I forgot the 8 though
<shevy> :encoding => 'ascii-8bit'
<shevy> this works :)
<muz0xd> i have just 3 week experience with ruby - but it's really cool
<emocakes> whats wrong with utf8 shevy?
<emocakes> :(
<Hanmac> shevy :encoding => 'binary' should work too
<shevy> emocakes it always wants to screw with my german umlauts
<muz0xd> thnx guys! i'l be back :3 interesting room
<Skillachie> Hanmac: Hmm decided to just test using irb for 1.9.3
<shevy> Hanmac hmm lemme try
<Skillachie> Hanmac: it will still return a stringIO http://pastebin.com/Q5tHWsph
ferdev|away is now known as ferdev
<shevy> Hanmac yeah, seems to work fine, cool
<shevy> hmm
<shevy> with .uniq on an array
<shevy> I can get back the unique entries
<emocakes> bist du ein schnitzel shevy?
<shevy> how to return the non-unique entries (all duplicates)?
<shevy> emocakes lol
<emocakes> ein or eine ?
<emocakes> :P
<shevy> I could change my nick to emoschnitzel
<shevy> ein is correct
<emocakes> my other IRC nick is actuall schnitzel :p
<emocakes> i like food you see
mmitchell has joined #ruby
<shevy> emocakes is useful, because you can use cakes for more things
<shevy> like throw at people
<Hanmac> Skillachie: huch, that line returns an stringio for me too
<Skillachie> Hanmac: I noticed that even if i set the StringMax it still returns a StringIO something else might be at work here....possible the encoding on the file ...
therod has quit [Quit: Linkinus - http://linkinus.com]
mattbl has quit [Quit: This computer has gone to sleep]
etcetera has joined #ruby
<Skillachie> Hanmac: was just about to ask you how did you get FileIO for 1.9.3 http://pastebin.com/VSAu9LcX
etcetera has quit [Remote host closed the connection]
Fretta has quit [Ping timeout: 246 seconds]
doublelisk_ has joined #ruby
otherj has quit [Quit: otherj]
shock_one has joined #ruby
zomgbie has quit [Ping timeout: 245 seconds]
<emocakes> wo bist du shevy
<Hanmac> Skillachie imo the StringIO is not the problem ... why cant you life with it? is it because of MiniMagick ?
aspiers has joined #ruby
<shevy> emocakes in wien
PragCypher has quit [Quit: Leaving]
<Skillachie> Hanmac: StringIO does not have .path . I use tempfile.path to save the file
<emocakes> vienna? :o
<emocakes> schön
anderse has quit [Quit: anderse]
ilovemyherbz has joined #ruby
<emocakes> mein cousin lebt in linz
<Skillachie> Hanmac: so because stringIO does not have the path method and i am expecting a File which has .path throughout the code
BRMatt has quit [Quit: Leaving]
<shevy> emocakes cool
<emocakes> and my german is crap ;)
doublelisk has quit [Ping timeout: 245 seconds]
<shevy> emocakes do you know falco?
<Dann1> If I have a method that takes in a hash of items
megha has quit [Quit: WeeChat 0.4.0]
monkegjinni has quit [Remote host closed the connection]
doublelisk_ has left #ruby [#ruby]
<Hanmac> Skillachie why cant you just read the IO object?
<Dann1> like, thing(h={})
<emocakes> i love falco shevy
<shevy> hehe
<shevy> he was mixing in the viennese dialect into the english language on occasion
<emocakes> der kommissar
<emocakes> or something
<Hanmac> Skillachie: File.write("yourpath",io.read)
<Dann1> can I do thing(key:'value', kye:'value')
<shevy> yeah
* emocakes is listening to "Der Kommissar" by Falco, from the album Vienna Greatest Hits via Spotify.
<emocakes> :p
<shevy> the words he used often didn't make sense, not even in viennese, but he used them stylistically to just go with the flow of the song
monkegjinni has joined #ruby
<Skillachie> Hanmac: the file.path was just being pushed to paperclip to be saved
gvz has joined #ruby
jonathanwallace2 has joined #ruby
onemanjujitsu has joined #ruby
<Hanmac> ... maybe just another gem that ignore stringio ...
<Skillachie> Hanmac: guess this might require some refactoring. So do yo suggest to reading and writing the object to a file
ilovemyherbz has quit []
<Skillachie> Hanmac: will check for open-uri alternative thx
johnmilton has quit [Remote host closed the connection]
crackfu has quit [Remote host closed the connection]
Virunga has quit [Ping timeout: 248 seconds]
<aspiers> MRI 1.9.3-p385 segfaults for me in yard-0.7.4/lib/yard.rb:38
Virunga has joined #ruby
<aspiers> seems to be the same callcc issue that was supposedly fixed already: http://bugs.ruby-lang.org/issues/4651
berkes has quit [Quit: Ex-Chat]
berkes_ has joined #ruby
mcqueenorama has joined #ruby
postmodern has quit [Quit: Leaving]
kmurph has quit [Quit: kmurph]
petersaints_ has joined #ruby
ryannielson has joined #ruby
petersaints has quit [Ping timeout: 256 seconds]
berkes_ has quit [Ping timeout: 246 seconds]
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
niklasb has quit [Read error: Operation timed out]
zomgbie has joined #ruby
punkrawkR has joined #ruby
reppard has joined #ruby
kmurph has joined #ruby
arya has quit [Ping timeout: 248 seconds]
uris has joined #ruby
decoponio has quit [Quit: one sheep, two sheep, three sheep, , , zzz...]
kmurph has quit [Client Quit]
zeade has joined #ruby
<Skillachie> Hanmac: figured it out
ninegrid has joined #ruby
Virunga has quit [Remote host closed the connection]
<Skillachie> Hanmac: so the problem was that the when you use open on files that where small as said before it automatically returns StringIO
anderse has joined #ruby
<Skillachie> Hanmac: in my case i set StringMax to 0, but the size of the file was also 0
<Skillachie> Hanmac: So setting StringMax to -1 automatically returns File instead of StringIO
<Skillachie> Hanmac: Thanks for all your help and pushing me along
Dann1 has quit [Quit: GODDAMNIT]
arya has joined #ruby
volte has joined #ruby
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
<Hanmac> imo the other gem should support stringio too ... even my libarchive does support stringio
mattbl has joined #ruby
berkes_ has joined #ruby
maletor has quit [Ping timeout: 256 seconds]
Jeaye has joined #ruby
maletor has joined #ruby
arturaz has joined #ruby
crackfu has joined #ruby
zeade has quit [Ping timeout: 260 seconds]
tjbiddle has joined #ruby
petersaints has joined #ruby
petersaints_ has quit [Ping timeout: 256 seconds]
caleb_io has joined #ruby
shock_one has quit [Quit: Ex-Chat]
shock_one has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
jgrevich has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
zomgbie has quit [Ping timeout: 245 seconds]
Tuxero has joined #ruby
reppard has quit [Ping timeout: 252 seconds]
IceDragon has joined #ruby
razieliyo has joined #ruby
<razieliyo> hi
<razieliyo> can I do this? def initialize(first second *rest) ?
josh0x0 has quit [Ping timeout: 240 seconds]
SeanLazer has joined #ruby
<havenwood> razieliyo: if you add commas between args
onemanjujitsu has quit [Quit: onemanjujitsu]
<razieliyo> havenwood: huh, fine
epicurus has joined #ruby
<razieliyo> but the concept has been caught
Virunga has joined #ruby
TomJ has quit [Read error: Connection reset by peer]
onemanjujitsu has joined #ruby
TomJ has joined #ruby
TomJ has quit [Changing host]
TomJ has joined #ruby
etcetera has joined #ruby
zommi has quit [Quit: Leaving.]
zeade has joined #ruby
ahokaomaeha has joined #ruby
zeade has quit [Client Quit]
<epicurus> hi. i'm a ruby programming fool. what the hell is this ? --> ||=
<epicurus> i can't google a ||=
<havenwood> epicurus: it is a pictograph of a sandwich with toothpicks
crackfu has quit [Remote host closed the connection]
pavilionXP has joined #ruby
<Hanmac> epocurus: obj ||= value is (mostly) the short from of obj = obj || value
crackfu has joined #ruby
ninegrid has quit [Ping timeout: 252 seconds]
<havenwood> epicurus: a || a = b
<epicurus> havenwood: are these the chips ( )
<havenwood> nom nm
<havenwood> s/nm/nom
ninegrid has joined #ruby
<epicurus> ok thznks
chico_ch` has joined #ruby
crackfu_ has joined #ruby
crackfu has quit [Read error: Connection reset by peer]
chussenot has quit [Quit: chussenot]
beardyjay has quit [Ping timeout: 246 seconds]
Takehiro has quit [Remote host closed the connection]
chussenot has joined #ruby
grzywacz has joined #ruby
Takehiro has joined #ruby
Takehiro has quit [Read error: Connection reset by peer]
steffes has joined #ruby
elico has joined #ruby
elico has quit [Remote host closed the connection]
josh0x0 has joined #ruby
v0n has joined #ruby
josh0x0 has quit [Client Quit]
arietis has quit [Quit: Computer has gone to sleep.]
albakry has joined #ruby
shevy has quit [Ping timeout: 260 seconds]
Catbuntu has quit [Quit: Kubuntu will be tried soonie]
blf has joined #ruby
objectivemo has quit [Quit: objectivemo]
epicurus has quit [Ping timeout: 264 seconds]
satman has quit [Ping timeout: 246 seconds]
etcetera has quit []
Xeago has joined #ruby
havenwood has quit [Remote host closed the connection]
etcetera has joined #ruby
<blf> I'm using Net::HTTP to send some requests (in parallel) to a web service, but am receiving results sporadically. Sometimes I get all of the requested results, and other times I get maybe only half of the results. I'm guessing that this is a server side error, but is there anything I should be checking on my end? Maybe I'm trying to field too many connections at once or something?
maletor has quit [Quit: Computer has gone to sleep.]
Indubit has joined #ruby
epicurus_ has joined #ruby
chico_ch` has quit [Remote host closed the connection]
ryanh has quit [Quit: Computer has gone to sleep.]
onemanjujitsu has quit [Quit: onemanjujitsu]
vlad_starkov has quit [Remote host closed the connection]
<epicurus_> ok i get it. a ||= b means if a is nil, then a = whatever b evaluates as
d2dchat has quit [Remote host closed the connection]
epicurus_ is now known as epicurus
qizwiz has joined #ruby
beardyjay has joined #ruby
<Indubit> Hi, Im trying to write a simple web-proxy for school and I have a (probably) simple problem. Im trying to use socket.puts(string_of_html) where the socket would be the same socket from wich I've recieved a GET. Why doesn't this work?..
wallerdev has quit [Quit: wallerdev]
dallasm has quit [Remote host closed the connection]
gcoderre has joined #ruby
atyz has joined #ruby
shevy has joined #ruby
<qizwiz> from within irb, if I were to do something like Array.new and I DIDN'T assign it to a variable and I didn't know about the underscore method, how could I get that specific array back?
<qizwiz> Knowing about underscore, I can do ObjectSpace._id2ref(_.object_id)
havenwood has joined #ruby
<qizwiz> but what if I didn't?
jonathanwallace2 has quit [Ping timeout: 255 seconds]
canton7 has joined #ruby
onemanjujitsu has joined #ruby
LouisRoR has quit [Ping timeout: 248 seconds]
drago757 has joined #ruby
Kingy has joined #ruby
LouisRoR has joined #ruby
jamescarr has joined #ruby
muz0xd has quit [Remote host closed the connection]
ralxz has joined #ruby
<shevy> qizwiz how do you want to find it if it is just another array object?
ferdev is now known as ferdev|away
<shevy> you could look at all arrays ObjectSpace.each_object(Array)
<ralxz> hey guys. how would i break up this string category_5 into "category" and 5
ryanh has joined #ruby
<emocakes> .split :p
<shevy> ObjectSpace.each_object(Array).select {|x| x.empty?}.size
ryannielson has quit [Quit: ryannielson]
<shevy> hehe
<shevy> damn it
<shevy> I have 883 empty arrays on irb startup :(
<emocakes> 'cate_5'.split('_')
<shevy> wow cool
<shevy> in a .rb file
<ralxz> emocakes: perfecto thanks
<shevy> puts ObjectSpace.each_object(Array).select {|x| x.empty?}.size
<shevy> what does this give you?
<shevy> I get 45
gcoderre has quit [Quit: gcoderre]
ferdev|away is now known as ferdev
fedza_ has joined #ruby
picca has joined #ruby
<qizwiz> wow, that's a lot of objects
kmurph has joined #ruby
Opettaja has joined #ruby
JumpMast3r has joined #ruby
havenwood has quit [Ping timeout: 256 seconds]
jonathanwallace2 has joined #ruby
havenwood has joined #ruby
stkowski has joined #ruby
Bosox20051 has joined #ruby
Kingy has quit [Quit: Leaving]
<qizwiz> how do I narrow that down? with that many objects, how do I possibly find the one I just created?
dr_neek has joined #ruby
fedza__ has quit [Ping timeout: 255 seconds]
jamescarr has quit [Read error: Connection reset by peer]
<Morkel> Why is 0.0918.to_d.to_s('F') ==> "0.09180000000000001" ??
KevinSjoberg has joined #ruby
<shock_one> Morkel, because of the way computers work
tjbiddle has joined #ruby
<shock_one> ping
<shock_one> Use decimal if you need precision
<qizwiz> heh...I think this irb (which I'm running in emacs) is also the same one as my rails console
billiam has quit [Ping timeout: 246 seconds]
<qizwiz> 'cause its giving me 895 :-)
pyrac has joined #ruby
larissa has quit [Quit: Leaving]
jamescarr has joined #ruby
theshow has joined #ruby
<Morkel> shock_one: Does a Decimal class exist in ruby? I know only BigDecimal
<shock_one> Morkel, yes, BigDecimal
Skillachie has left #ruby [#ruby]
whowantstolivef1 has joined #ruby
LouisRoR has quit []
epicurus has quit [Remote host closed the connection]
<Morkel> shock_one: Thx
SeanLazer has quit [Quit: SeanLazer]
maletor has joined #ruby
<shock_one> Morkel, no problem
billiam has joined #ruby
wallerdev has joined #ruby
<ralxz> ok, new question, how do i seperate this string "category[1]" into category and 1
<ralxz> :)
wallerdev has quit [Client Quit]
wallerdev has joined #ruby
mercwithamouth has joined #ruby
<Hanmac> ralxz: str[/\[(\d+)\]/,1]
<qizwiz> I guess I'll throw up the question on stack overflow
petersaints_ has joined #ruby
LouisRoR has joined #ruby
aaronmcadam has joined #ruby
yacks has quit [Quit: Leaving]
<ralxz> Hanmac: how do i use that?
petersaints has quit [Ping timeout: 256 seconds]
<Hanmac> ralxz: "category[1]"[/\[(\d+)\]/,1] #=> "1"
<Morkel> shock_one: can i change the rounding mode from bigdecimal. I need 1.499 > 1.49
<Morkel> 1.499 to 149
<Morkel> 1.49
objectivemo has joined #ruby
<ralxz> Hanmac: how do i get "category" ?
<Hanmac> ralxz: "category[1]".scan(/(\w+)\[(\d+)\]/)[0] #=> ["category", "1"]
Virunga has quit [Remote host closed the connection]
<ralxz> Hanmac: ah perfect, thanks :)
<shock_one> >> puts "category[1]".split(/\[|\]/)
<eval-in> shock_one: Output: "category\n1\n" (http://eval.in/9421)
ahokaomaeha has quit [Ping timeout: 256 seconds]
PragCypher has joined #ruby
hmarr has joined #ruby
<Hanmac> >> p "category[1]".match(/(\w+)\[(\d+)\]/)[1..2]
<eval-in> Hanmac: Output: "[\"category\", \"1\"]\n" (http://eval.in/9422)
zigomir has joined #ruby
Virunga has joined #ruby
havenn_ has joined #ruby
<jokke> is it possible to find out, who called new on an object?
<jokke> as in find out the instanciator or how you call it
jonathanwallace2 has quit [Ping timeout: 260 seconds]
pen has joined #ruby
<shevy> what
zomgbie has joined #ruby
<shevy> ClassName.new
<shevy> it called itself! it instantiated a new object man!
havenwood has quit [Ping timeout: 276 seconds]
<Spooner> jokke, You almost certainly don't need to know and if you do, you can pass this information into #new manually.
jamescarr has quit [Quit: jamescarr]
<shock_one> Spooner, in initialize
<Spooner> jokke, I often have MyClass.new(self)
havenwood has joined #ruby
havenn_ has quit [Ping timeout: 260 seconds]
havenwood has quit [Remote host closed the connection]
<Spooner> shock_one, You pass it into MyClass.new which in turn passes it into MyClass#initialize.
picca has quit [Ping timeout: 264 seconds]
<shock_one> Why do we have to explicitly call String.new('smth') instead of String('smth') like in other languages?
havenwood has joined #ruby
ahokaomaeha has joined #ruby
<Spooner> shock_one, Because String is an object, not a method.
<banisterfiend> Spooner: it's a method too :)
Indubit has quit [Quit: Leaving]
<banisterfiend> String(1) works
<wallerdev> what is this
<banisterfiend> wallerdev: wat
<Spooner> banisterfiend, Ah, well, yes, there are global methods that allow you to do that, but I can't do MyClass() unless I add the method myself.
<wallerdev> idk seems like an odd question
<banisterfiend> for rizzle
carraroj has joined #ruby
objectivemo has left #ruby [#ruby]
objectivemo has joined #ruby
<qizwiz> for anyone that's interested
<shock_one> class String
<shock_one> def ()(*args)
<shock_one> end
<shock_one> end
<shock_one> new(args)
<wallerdev> lol
<shock_one> oh, self.()
<banisterfiend> shock_one: () is not a method
<shock_one> banisterfiend, but it *could* be
<banisterfiend> shock_one: no it couldn't be in Ruby, IMO
<banisterfiend> shock_one: due to the fact we have optional parentheses, it would make the language too confusing
<banisterfiend> to have both optional parentheses and also a parentheses method
<Spooner> qizwiz, That is a pretty daft question. Just give it a variable name.
<banisterfiend> god knows what the rules would be
BrindleFly has joined #ruby
aaronmcadam has quit [Quit: aaronmcadam]
<banisterfiend> shock_one: it would mean in some circumstances (i.e when the method is defined) the parentheses are not optional, otherwise they are? ..? or god knows what
whowantstolivef2 has joined #ruby
<havenwood> Quiz... so which Ruby am I using?: String nil.object_id; #=> "8"
<qizwiz> Spooner: eh. I reject that notion. I'm curious about the internals of ruby and irb and I think this question is fruitful to that end.
<shock_one> banisterfiend, what is wrong with BigDecimal '1.12'
<wallerdev> im confused lol
<wallerdev> cant you just do def BigDecimal(x); end
hmarr has quit [Quit: Computer has gone to sleep.]
relixx has quit [Quit: relixx]
<wallerdev> methods can be capitalized in ruby if you want
hmarr has joined #ruby
whowantstolivef1 has quit [Ping timeout: 256 seconds]
timonv has joined #ruby
danielpcox has joined #ruby
<shock_one> wallerdev, so, I can make method missing which would automatically define such methods for me :)
mackesque has joined #ruby
<wallerdev> yeah if you wanted no one to be able to understand your code
onemanjujitsu has quit [Quit: onemanjujitsu]
chrishough has joined #ruby
<havenwood> Okay, Topaz definitely has the weirdest nil.object_id i've seen: #=> 4301972992
chrishough has quit [Client Quit]
<havenwood> Even in Ruby 2.0, false is 0. In Topaz, 4302126512.
ralxz has quit [Quit: Leaving.]
<shock_one> havenwood, JRuby?
<havenwood> shock_one: 0
main has quit [Ping timeout: 255 seconds]
petersaints has joined #ruby
albakry has quit [Ping timeout: 252 seconds]
LouisRoR has quit []
petersaints_ has quit [Read error: Operation timed out]
albakry has joined #ruby
albakry has quit [Changing host]
albakry has joined #ruby
<havenwood> shock_one: JRuby seems to mirror 1.9.
<havenwood> shock_one: false is 0, nil is 4, etc
<Spooner> havenwood, Python is fundamentally undermining false for us!
<havenwood> Spooner: Indeed! False is 0! False is 0! Lets chop cats!
zomgbie has quit [Ping timeout: 246 seconds]
miskander has joined #ruby
<havenwood> Spooner: Now all my code is gunna break where i did: nil.object_id.times { pp 1.0/false.object_id }
<havenwood> I mean, that should clearly print Infinity 4 to 8 times... but now with Topaz...
<Spooner> havenwood, I think you should stage a boycott and, if that goes well, a sit-in of Python.
<havenwood> Yeah, Topaz prints millions of "0.000000" when 4 to 8 "Infinity" are expected.
<havenwood> >.>
etcetera has quit []
<havenwood> RPython...
picca has joined #ruby
<banisterfiend> havenwood: you *could* argue that object_ids are implementation details thought
<havenwood> banisterfiend: :P
<banisterfiend> though
mackesque has quit [Quit: Textual IRC Client: www.textualapp.com]
<Spooner> banisterfiend, That would be naive. Everyone knows that object_ids are always mostly predictable.
<banisterfiend> i dont think so, i haven't read it, but i would say if you read the ruby standard all it would say about them is that the given object_id for an object remain static for the duration of the program
<banisterfiend> that's it
<bean> >> p nil.object_id
<eval-in> bean: Output: "4\n" (http://eval.in/9424)
<banisterfiend> Spooner: also, what kind of weird-ass program would be relying on them? :)
<Spooner> One like havenwood's. I have loads of code very similar.
blf has quit [Quit: Page closed]
Morkel_ has joined #ruby
<havenwood> Spooner: hahaha
sorbo_ has joined #ruby
<bean> lolllll
<bean> sounds like poor implementation to me.
ralxz has joined #ruby
emmanuelux has quit [Ping timeout: 256 seconds]
<havenwood> bean: case false.object_id; when 20; 'omg, you're in maglev!'; when 0; 'whew'; end
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
picca has quit [Ping timeout: 276 seconds]
<Spooner> randomly_monkey_patch_internals unless [4, 8].include? nil.object_id # That will screw those Python nerds and their Topazery!
<havenwood> Spooner: abort 'Python sucks!' if false.object_id > 1_000_000
* Spooner adds that code to all his gems.
Morkel has quit [Ping timeout: 264 seconds]
Morkel_ is now known as Morkel
d34th4ck3r has joined #ruby
<Spooner> havenwood, Sadly, Python does suck, but I'm doing it at the moment :D
<banisterfiend> Spooner: why?
chussenot has quit [Quit: chussenot]
<banisterfiend> why are you doing it
<Spooner> $$$
<Spooner> Why else?
<banisterfiend> :)
whowantstolivef2 has quit [Quit: quit]
mahmoudimus has joined #ruby
<havenwood> a startup gal told me the other day she was hiring php devs for a new stack because rubyists were too hard to find >.>
<Spooner> havenwood, I think it is too hard to find Rubyists who know Rails or Railists who know Ruby :P
<shock_one> havenwood, do she has remote job vacancy?
<shock_one> does she have
<bean> I'm a sysadmin, I wish i could just write fun stuff in ruby all day
<havenwood> shock_one: I dunno. Her name is Cooper Harris, here in LA. Actress turned startup CEO.
<Spooner> havenwood, Even Python would be a better place to regress to than PHP :D
<mityaz> Spooner, yep, rails is kinda magic :D
stormetrooper has quit [Quit: Leaving]
<havenwood> shock_one: ya, her
<shock_one> havenwood, really?
cisco has joined #ruby
Al__ has joined #ruby
<havenwood> shock_one: yup, met her at a hackathon - she did a good pitch
mahmoudimus has quit [Client Quit]
razieliyo has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<shock_one> havenwood, what is her startup about? Do you have her email?
<havenwood> shock_one: it was something about celebrities and e-commerce
<shock_one> havenwood, suddenly
ryanf has joined #ruby
pavilionXP has quit [Ping timeout: 246 seconds]
colonolGron has quit [Quit: leaving]
<havenwood> shock_one: i have her digits, but dunno her email - startup is called 'ClickIt'
Dann1 has joined #ruby
<havenwood> shock_one: if you want me to pass her your contact info, happy to - I don't know the team (if there is one yet)
<havenwood> Or whether the idea is any good. :P
albakry has quit [Quit: Leaving]
relixx has joined #ruby
jonathanwallace2 has joined #ruby
<emocakes> php :(
timonv has quit [Remote host closed the connection]
<emocakes> havenwood, her name?
<emocakes> i do PHP
<emocakes> and ruby :p
<emocakes> and sweet love making
Jackneill has quit [Ping timeout: 255 seconds]
<havenwood> emocakes: cooper harris, ceo of clickit
petersaints_ has joined #ruby
<havenwood> so many startups in California....
<shock_one> havenwood, it would be nice. I'm a rails developer, but can also do front-end. I live in Europe, so I can only work remotely. She could write me to vshatsky@me.com
<emocakes> i know right havenwood
emmanuelux has joined #ruby
petersaints has quit [Ping timeout: 256 seconds]
carraroj has quit [Quit: Konversation terminated!]
<emocakes> if she gets me a visa I might move to Cali-forn-ia
<emocakes> :p
steffes has quit [Remote host closed the connection]
<havenwood> emocakes: it is pretty here! rent costs too much, i need to get paid more.. >.>
beardyjay has quit [Read error: Operation timed out]
voodoofish has quit [Ping timeout: 244 seconds]
<emocakes> haha, I'm in Berlin at the moment
<havenwood> emocakes: my little sis is in Berlin
<emocakes> moving to BA for 4-5 months
<emocakes> at the end of feb
<havenwood> emocakes: invited me to come stay with her in Berlin for a couple weeks in March
swills has joined #ruby
<havenwood> emocakes: BA?
<emocakes> Buenos Aires
petersaints has joined #ruby
<emocakes> Berlin is a nice city
<havenwood> emocakes: Ahhh, never been there. That is a big change!
<emocakes> Public transport here rocks
<swills> someone run "pkgconf --libs ruby-1.9" and tell me what they get?
<emocakes> BA is nice
<emocakes> kinda
<emocakes> :p
<havenwood> emocakes: Thats what she said. No car, no problem.
<swills> and what OS/version and ruby version you're on
otherj has joined #ruby
<havenwood> emocakes: Katie Skipper
<emocakes> what is pkgconf?
jblack has joined #ruby
thufir_ has joined #ruby
<swills> or pkg-config if you don't have pkgconf
blf has joined #ruby
<emocakes> pkg-config --libs ruby-1.9
<emocakes> Package ruby-1.9 was not found in the pkg-config search path.
<emocakes> Perhaps you should add the directory containing `ruby-1.9.pc'
<emocakes> No package 'ruby-1.9' found
<emocakes> to the PKG_CONFIG_PATH environment variable
<emocakes> :p
<blf> Any ideas why: /(?<=ref\|)((NP | XP)_[0-9]+([.][0-9]+)?)(?=\|.*[\n]*)/ would not match the string "NP_01230123.3" ?
<emocakes> what is your sis doing in Berlin?
<blf> or rather, the string 'ref|NP_01230123.3| A Test"
pen has quit [Remote host closed the connection]
<Spooner> blf, Because there is a space after NP in the regexp.
banseljaj is now known as imami|afk
<havenwood> emocakes: moved there last summer with her boyfriend.. she's been studying German and has some shared space at an art studio
F1skr has quit [Quit: WeeChat 0.4.0]
<havenwood> emocakes: They broke up, a couple months ago, but she's staying in Berlin - at least so far
pu22l3r has quit [Remote host closed the connection]
<blf> Spooner: ah, so I need /(?<=ref\|)((NP|XP)_[0-9]+([.][0-9]+)?)(?=\|.*[\n]*)/
<emocakes> nice
petersaints_ has quit [Ping timeout: 256 seconds]
<swills> emocakes: ok, someone who has ruby 1.9 installed...
<swills> thanks tho
<emocakes> swills, i have ruby installed
<emocakes> :p
<Spooner> blf or //x which makes spaces ignored.
<emocakes> 1.9 as well
daig0ro has joined #ruby
<emocakes> havenwood, well I'm not single so yeah, sorry :'(
<arturaz> havenwood, is it hard to live in Berlin without knowing German?
<emocakes> arturaz,nope
<emocakes> i live here without knowing german
<havenwood> arturaz: I don't know, never lived there. My sis seems to really like it.
<blf> Spooner: excellent! Thanks indeed :)
<emocakes> basically everyone speaks english, and basic german is easy enough
<arturaz> I've been there a few times. Had interesting time in local cafes ;)
<emocakes> how to buy food, say sorry, etc etc
<Spooner> swills Ruby installed via package manager, which is probably not many here.
<swills> Spooner: fair enough...
spider-mario has joined #ruby
<emocakes> swills installed with macports
<emocakes> :(
<shock_one> emocakes, how to buy marichuana...
<swills> i guess macports doesn't enable the pkgconfig bits like it should
<arturaz> emocakes, any ideas about Munich? It seemed much greener to me :)
<havenwood> emocakes: Important German = bitteshein und apfel strudel mit vanillasauce et und glasse zweigelt (I can't spell)
<emocakes> more expensive arturaz
<Hanmac> atruraz depends on the citypart ... i heard in some of them turkish is primary language :P
<emocakes> and the people are far more stuck up
<emocakes> sorry Hanmac
<emocakes> ;)
<arturaz> emocakes, stuck up?
<emocakes> berlin is relaxed as hell, and cheap
<Spooner> I got by in Sweden with nothing more than "Jag talar inte Svenska" ;)
<emocakes> Munich is not so relaxed, but the city is beautiful and more expensive
julian-delphiki has joined #ruby
<emocakes> you speak no swedish Spooner?
beardyjay has joined #ruby
<emocakes> :p
beardyjay has quit [Changing host]
beardyjay has joined #ruby
<Spooner> Yep.
<Hanmac> emocakes, i am from dresden
<arturaz> damn, perhaps I should move.. :)
<havenwood> I'd like to visit Norway for a Summer.
<emocakes> ahh that is alright then Hanmac
<emocakes> arturaz, stuck up is umm, they are more rigid
havenwood has quit [Remote host closed the connection]
<emocakes> more conservative, more catholic etc
bean has quit [Ping timeout: 248 seconds]
<atmosx> I'd like to visit Norway for summer too.
bean has joined #ruby
julian-delphiki has quit [Ping timeout: 256 seconds]
Vektur has joined #ruby
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
voodoofish has joined #ruby
petersaints has quit [Read error: Connection reset by peer]
crackfu_ has quit [Remote host closed the connection]
petersaints has joined #ruby
crackfu has joined #ruby
petersaints has quit [Client Quit]
punkrawkR has quit [Read error: Connection reset by peer]
zzing has quit [Quit: Textual IRC Client: www.textualapp.com]
d2dchat has joined #ruby
Al__ has quit [Quit: Al__]
ferdev is now known as ferdev|away
havenwood has joined #ruby
ellogub has joined #ruby
<havenwood> #ruby channel title could use a bump to ruby-2.0.0-rc2
crackfu has quit [Ping timeout: 264 seconds]
<Dann1> how do I check a variable's class on a class instance
<shock_one> Dann1, var.class
adambeynon has joined #ruby
<Dann1> Yes, okay
<Dann1> but
<havenwood> Dann1: An instance var that isn't exposed?
<Dann1> var.is_a?(Class) will go for Klass::Class
miskander has quit [Quit: miskander]
<shock_one> Dann1, what?
relixx has quit [Quit: relixx]
dan_ has joined #ruby
dan_ is now known as Guest74569
Dann2 has joined #ruby
miskander has joined #ruby
<shock_one> Dann1, is_a? checks if the class of var is a Class or down it's hierarchy tree.
miskander has quit [Client Quit]
<havenwood> Dann1: class Sekret; def initialize; @sekret = "I'll never tell."; Sekret.new.instance_variable_get(:@sekret).class; #=> String
jblack has quit [Ping timeout: 256 seconds]
<havenwood> Oops, forgot a couple `end`s in there.
Guest74569 has quit [Read error: Connection reset by peer]
<havenwood> Always forget `end` when writing inline, grr
<Dann2> no prob
<Dann2> But
<Dann2> I need the opposite
<Dann2> Wait no
Dann1 has quit [Ping timeout: 240 seconds]
<havenwood> Dann2: The above (presuming you `end; end` out of the class) grabs an unexposed instance var from the instantiated object and returns its class.
<havenwood> s/its class/the class of the instance variable
dan__ has joined #ruby
* Dann2 got it
dan__ is now known as Guest37263
<Guest37263> quick question guys: why does puts ?A put A instead of 65? in ruby 1.9.1
plotter has joined #ruby
kmurph has quit [Quit: kmurph]
ralxz has quit [Quit: Leaving.]
<Hanmac> Guest37263 to be equal to "A"[0]
relixx has joined #ruby
<havenwood> Guest37263: Change in the language between 1.8 and 1.9. 65.chr #=> "A"
<Guest37263> got it
<Guest37263> thanks!
tomzx_mac has joined #ruby
Virunga_ has joined #ruby
Guest37263 has quit [Quit: Ex-Chat]
<Dann2> Bleh
<Dann2> help?
berkes_ has quit [Ping timeout: 246 seconds]
<havenwood> Dann2: .py?
ferdev|away is now known as ferdev
<arturaz> .py is all the rage
<arturaz> OT: who's here from a small country (< 5 million people) and how do they feel living in it?
maletor has quit [Quit: Computer has gone to sleep.]
<Dann2> guys
Virunga has quit [Ping timeout: 245 seconds]
<Dann2> hastebin is great
<Dann2> but it sorta sucks at checking the language used
<Dann2> It's a ruby file, hastebin was a jerk.
matti has quit [Ping timeout: 245 seconds]
<havenwood> Dann2: Ha, kk. My DNS is apparently broken (on 4G) so I couldn't follow the link.
<orospakr> hey, I'm creating a ruby class from C in the style of defining an rb_class with an initialize method. However, I'd like to set the data field (because I am wrapping a struct, but need my own constructor code and thus don't want to use Data_Wrap_Struct()) and dfree callback field on the object in my initialize method.
<Dann2> http://hastebin.com/lubaruyisu.rb there, better?
<orospakr> however, VALUE appears to cast a pointer to a ruby object to an unsigned long.
totoCZ has joined #ruby
<havenwood> Dann2: Much less anxiety inducing!
<orospakr> is it at all kosher to cast it back inorder to get at ->data and ->dfree?
adambeynon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
matti has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
<orospakr> s/inorder/in order/
<havenwood> I need to learn C. :(
hackeron has quit [Quit: leaving]
dyrot has joined #ruby
<orospakr> havenwood, don't start by writing a Ruby C extension ;)
<havenwood> orospakr: haha, kk
hackeron has joined #ruby
<Hanmac> yeah, why write a C extension when it could be a C++ extension? ;D
<shock_one> havenwood, start by writing C compiler ;)
Dann1 has joined #ruby
<Dann1> so??
pdamer has joined #ruby
<ellogub> Anyone here played with the soundcloud-ruby wrapper?
<Hanmac> Dann1 the HS::Character oject is in the wrong scope
<Dann1> Mmmh?
alanjc has quit [Ping timeout: 255 seconds]
Dann2 has quit [Ping timeout: 256 seconds]
<Hanmac> Dann1 you set it as a class instance variable but you try to access it as a instance variable
dyrot has quit [Ping timeout: 245 seconds]
<Dann1> So how can I create an instance variable in a class?
EspenA has joined #ruby
<Dann1> Wait
<Dann1> WAIT
<Dann1> @variables can't be instance classes?
<Hanmac> Dann1 you allready do create an instance variable in a class, but you try to access it wrong
zigomir has quit [Quit: zigomir]
<Hanmac> orospakr: why do you need to set the free functions inside the initialize? why not in the alloc?
<Dann1> Oh
<Dann1> OH
<Dann1> wait
<Dann1> mmm
<Dann1> No
<orospakr> Hanmac, hm, I don't even know what that is, which is encouraging
<Dann1> that method, is that what you mean?
jim_r0x has joined #ruby
<Dann1> OH
havenwood has quit [Ping timeout: 260 seconds]
<Dann1> OOOOH
<Dann1> Thanks :)
* Dann1 sighs for the lack of recognition for that obvious reference
havenwood has joined #ruby
razieliyo has joined #ruby
<orospakr> Hanmac, my goal is to have MyClass.new() as usual, then on construction I call a factory function in my C library to get an "instance" structure, and then stash it such that I can get at it in the methods of the MyClass instance.
<Hanmac> orospakr you can use your own free methods at Data_Wrap_Struct in your allocate function, you normaly dont need to set them later in your initialize
<orospakr> as such, I don't want to use Data_Wrap_Struct(), because initialize is provided with an already constructed VALUE of self.
<orospakr> hm.
EspenA has quit [Client Quit]
seanmccann has joined #ruby
totoCZ has left #ruby ["Leaving"]
mahmoudimus has joined #ruby
pyrac has quit [Quit: pyrac]
csaunders has quit [Quit: Computer has gone to sleep.]
ellogub has quit [Quit: Leaving]
<Hanmac> orospakr it is the allocate function you need to define with rb_define_alloc in this alloc you use Data_Wrap_Struct to create that MyClass Object
<orospakr> do you mean db_define_alloc_func?
seanmccann has quit [Quit: Computer has gone to sleep.]
one has quit [Ping timeout: 255 seconds]
<Hanmac> yeah rb_define_alloc_func
<orospakr> excellent, thanks. :)
gommo has joined #ruby
jim_r0x has quit [Remote host closed the connection]
<orospakr> Hanmac, uh oh, wait a sec. problem is, in order to ask my C library to allocate it's instance struct, I need my parameters to initialize (some pathnames and whatnot).
razieliyo has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
<orospakr> s/it's/its/ :P
reset has joined #ruby
black_13 has joined #ruby
<Hanmac> hm yeah that is a bit difficulter to make :(
dnordstrom has joined #ruby
<Dann1> >> ['hey', 'hye'].has?('hye')
<eval-in> Dann1: Output: "/tmp/execpad-2aed02bdeb1c/source-2aed02bdeb1c:1:in `<main>': undefined method `has?' for [\"hey\", \"hye\"]:Array (NoMethodError)\n" (http://eval.in/9435)
<Hanmac> you could undefine the allocator and overwrite the new method
<Hanmac> Dann1 include?
<orospakr> Hanmac, hm. does my original strategy of doing it in initialize by setting data and dfree on the object seem feasible?
<Dann1> Yes, I know.
<Dann1> Just checking
qizwiz has quit [Ping timeout: 244 seconds]
<Hanmac> it can be but it its a little bit more diffucult and i currently dont have the time to show how it works
<orospakr> ah, fair enough.
<orospakr> thanks anyway. :)
<blf> Is it possible to match lookahead and lookbehind from the end of a line with ruby regular expressions?
ottbot has joined #ruby
<Hanmac> blf i dont think so ...
_br_ has quit [Excess Flood]
<black_13> whats a paste bin for this channel is there one?
<Dann1> what
<blf> Hm.. Well suppose I have a string with a variable number of opening and closing square brackets and I want to get the text inside the last occurrence on a line. Like: "some text [hello] some more text [goodbye]" -> goodbye
<blf> Is this possible with regular expressions?
<Dann1> use eval.in or pastebin.com or hastebin.com
<black_13> what does the following error http://pastebin.com/JFEs4Snt mean custom_require.rb:36:in `require': cannot load such file -- ./vendor/unity/auto/generate_test_runner (LoadError)
<blf> I tried this, /((?<=\[)[\s\w]*(?=\]))$/ but like Hanmac said, it's not working. :/
workmad3 has quit [Ping timeout: 240 seconds]
<Dann1> black_13: it means your code isn't good enough for loading
Inoperable has joined #ruby
_br_ has joined #ruby
<Dann1> go through it again and fix the error
<Dann1> (s)
<black_13> ok
ralxz has joined #ruby
atyz has quit [Quit: Leaving...]
Nisstyre-laptop has quit [Read error: Connection reset by peer]
jonathanwallace2 has quit [Ping timeout: 276 seconds]
Asher has quit [Quit: Leaving.]
colonolGron has joined #ruby
Asher has joined #ruby
KevinSjoberg has joined #ruby
ferdev is now known as ferdev|away
<orospakr> Hanmac, actually, heck, I might as well just do it with my own singleton method rather than new. "self.load" or whatever.
blf has quit [Quit: "back in a few"]
Nisstyre-laptop has joined #ruby
_br_ has quit [Excess Flood]
Es0teric has joined #ruby
sam101 has joined #ruby
<Hanmac> blf:
atyz has joined #ruby
<Hanmac> >> p "some text [hello] some more text [goodbye]".match(/((?<=\[)\w+(?=\]))/)
<eval-in> Hanmac: Output: "#<MatchData \"hello\" 1:\"hello\">\n" (http://eval.in/9443)
<sam101> good evening all
<sam101> ERROR: While executing gem ... (Errno::EACCES)
<sam101> Permission denied - /usr/lib/libsh/.gem
<shock_one> sam101, use sudo
<Hanmac> p "some text [hello] some more text [goodbye]".scan(/((?<=\[)\w+(?=\]))/)
ferdev|away is now known as ferdev
<Hanmac> >> p "some text [hello] some more text [goodbye]".scan(/((?<=\[)\w+(?=\]))/)
<eval-in> Hanmac: Output: "[[\"hello\"], [\"goodbye\"]]\n" (http://eval.in/9444)
<Hanmac> >> p "some text [hello] some more text [goodbye]".scan(/\[(\w+)\]/)
<eval-in> Hanmac: Output: "[[\"hello\"], [\"goodbye\"]]\n" (http://eval.in/9445)
<sam101> sudo gem install -y rails
<sam101> like that?
<sam101> let me see if this work
<Dann1> @bot = Robotics::Digibot.new do ... end
<Dann1> Would this work?
* Hanmac thinks that install rails is a bad idea ...
<sam101> Hanmac: but what can i do to get ruby to work
<sam101> i have a file.rb
<Hanmac> ruby is already working, you dont need rails for it :P
<sam101> ahhhh
miskander has joined #ruby
_br_ has joined #ruby
<Dann1> Open the file.rb with X:\Ruby\bin\irb.bat
mengu has quit [Ping timeout: 248 seconds]
<Dann1> Open the file.rb with X:\Ruby\bin\irb.sh
<Dann1> Sorry, -nix-es.
havenwood has quit [Remote host closed the connection]
<sam101> ./flashpolicyd.rb: /usr/bin/ruby: bad interpreter: No such file or directory
baphled has quit [Ping timeout: 260 seconds]
<Hanmac> löl?
stringoO has joined #ruby
<sam101> you saying ruby is installed but when i do this nothing
jonathanwallace2 has joined #ruby
<sam101> ruby-1.8.7
gvz has quit [Remote host closed the connection]
<X-Jester> t [Read error: Connection reset by peer]
black_13 has quit [Ping timeout: 245 seconds]
<X-Jester> ergh, sorry
<Dann1> sam, is this the first time you're using Ruby?
BadLarry has quit [Ping timeout: 248 seconds]
<sam101> Dann1 yes
<Dann1> You should use the latest version then
<Dann1> 1.9.3
<Dann1> What OS are you on
<sam101> redhat
<Dann1> Uhh
<Dann1> That a Unix
<sam101> yes
<orospakr> new question: is it safe in Ruby 1.9 to override allocate() with rb_define_singleton_method ala Ruby 1.6?
dnordstrom has quit [Ping timeout: 252 seconds]
wallerdev has quit [Quit: wallerdev]
<sam101> but i din't have ruby installed
aaronmcadam has joined #ruby
<Dann1> hold on..
<Dann1> sam, the easy way to get ruby is the regular way.
<Dann1> Or, for UNIX users, RVM.
<sam101> ok please tell me
<sam101> :)
<sam101> thanks
<sam101> i am downloading this as we speak
<Hanmac> orospakr: you can only overwrite with rb_define_alloc_func or rb_undef_alloc ... i get an error otherwise
<orospakr> sam101, Dann1, if I recall rightly, rbenv is much nicer than rvm.
robert___ has joined #ruby
robert___ has quit [Changing host]
robert___ has joined #ruby
<orospakr> Hanmac, shoot. okay, I've just defined initialize with function that raises an error telling the dev to use my custom singleton method that uses Data_Wrap_Struct() instead.
<sam101> ah ok
BadLarry has joined #ruby
<sam101> sorry
joeycarmello has joined #ruby
<sam101> i should listen
* Dann1 has no idea, as he is a Windows user. MWAHAHAHAHAHHA
end_guy has quit [Ping timeout: 276 seconds]
<Dann1> $ sudo apt-get install ruby1.9.1
<Dann1> that installs plain ruby
<orospakr> sam101, generally, you should be able to use the version of Ruby from your distro (in this case, Red Hat) unless you need something very specific from one slightly newer from upstream.
<Dann1> with no version managing
<Hanmac> install the ruby-full or the ruby1.9.1-full package, not the plain one
kofno has joined #ruby
<sam101> hmmm
<sam101> sudo apt-get install ruby1.9.1-full
<sam101> or you just saying that general
<Dann1> (( I'm just gonna go back to my coding and let you guys help him ))
<sam101> thanks anyway Dann1
emergion has joined #ruby
<Dann1> np
robert_ has quit [Ping timeout: 245 seconds]
etcetera has joined #ruby
miskander has quit [Quit: miskander]
macmartine has joined #ruby
dnordstrom has joined #ruby
emergion has quit [Read error: Connection reset by peer]
generali_ has quit [Remote host closed the connection]
<unstable> I wouldn't sudo apt-get install ruby, I would use rbenv then install ruby.
joofsh has joined #ruby
Dann1 has quit [Quit: GODDAMNIT]
<unstable> Certain gems can't install when they try to modify global files they don't have permission to, I've found in my experience.
<unstable> It's better to have everything in a local environment. *shrugs*
quest88 has quit [Quit: quest88]
subbyyy has quit [Ping timeout: 264 seconds]
ferdev is now known as ferdev|away
<unstable> s/1.9.3-p362/1.9.3-p385/) rather.
<unstable> I found that guide worked really well.
jonathanwallace2 has quit [Ping timeout: 276 seconds]
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
arturaz has quit [Read error: Connection reset by peer]
fwaokda has joined #ruby
<sam101> confused
<sam101> all i want is to use a file.rb
<sam101> :)
<unstable> sam101: Just apt-get install if you're not setting up a developer environment. It's probably fine.;
<sam101> ok
<jokke> i have to do the same block twice for an 'each' on an array. I'd like to define a proc for that. however one variable has to be different in the block the second time i use it..
<sam101> i will try before i tar xvf
<jokke> afaik i can't manually pass the proc extra variables..
<jokke> or can i? :P
Dreamer3 has quit [Ping timeout: 276 seconds]
<Hanmac> jokke show us what you allready have
lot49 has joined #ruby
<jokke> kay. wait
alanjc has joined #ruby
mengu has joined #ruby
PanPan has quit [Read error: Connection reset by peer]
emergion has joined #ruby
PanPan has joined #ruby
<jokke> the symbol :make needs to change the second time i'd call the block
Dreamer3 has joined #ruby
ralxz has quit [Quit: Leaving.]
<Hanmac> what is it the second time?
<shock_one> jokke, you can use regular function or lambda
<cornfeedhobo> hello, i need some help. to start, this project is the first time I have ever had to deal ruby. I am currently running gentoo + ruby 1.9 and trying to install the RoR app "Gitlab"...in the process of installing, i read somewhere i should use 'bundle install' to install dependancies that are missing....when i did that it starting installing a huge list and then got hung on this: http://dpaste.org/m
alanjc has quit [Client Quit]
<jokke> Hanmac: second time it's :normal
<jokke> actually i need to call it three times
<jokke> third time it's :check
<Hanmac> cornfeedhobo: #rubyonrails
<cornfeedhobo> it complain about needing a config file, but where would i source that? and why would i need a special one for this package? why did all the other packages get pulling in just fine?
<cornfeedhobo> okay thanks!
<unstable> cornfeedhobo: Your url is broken.
<jokke> shock_one: lambda sounds good..
emergion has quit [Client Quit]
<Hanmac> jokke so is it three times on the same @info[:makedepends] array?
gosshedd has quit [Read error: Operation timed out]
<jokke> no it's not
<shock_one> jokke, function sounds better for me. You don't need any context except dep
<cornfeedhobo> unstable: thx i will see if i can find out how to find another source
<jokke> shock_one: alright
emergion has joined #ruby
nomenkun has quit [Remote host closed the connection]
quest88 has joined #ruby
atmosx has quit [Quit: And so the story goes…]
thufir_ has quit [Quit: Leaving.]
<Hanmac> jokke something like that? http://hastebin.com/bokapoyuxa.rb
KevinSjoberg has quit [Quit: Textual IRC Client: www.textualapp.com]
codecop has quit [Remote host closed the connection]
emergion has quit [Ping timeout: 264 seconds]
mengu has quit [Read error: Connection reset by peer]
miskander has joined #ruby
mengu has joined #ruby
<jokke> thanks, both of you
<jokke> i extracted it to a method
quest88 has quit [Client Quit]
miskander has quit [Client Quit]
otherj is now known as otherj__
kofno has quit [Remote host closed the connection]
ralxz has joined #ruby
marr has quit [Ping timeout: 252 seconds]
m8 has quit [Quit: Sto andando via]
quest88 has joined #ruby
ferdev|away is now known as ferdev
otherj has joined #ruby
quest88 has quit [Remote host closed the connection]
otherj__ has quit [Quit: otherj__]
_br_ has quit [Excess Flood]
mengu has quit [Read error: Connection reset by peer]
_br_ has joined #ruby
sorbo_ has quit [Quit: sorbo_]
mengu has joined #ruby
mityaz has quit [Quit: See ya!]
spider-mario has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
graeme has joined #ruby
k776 has joined #ruby
jonathanwallace2 has joined #ruby
Loaft has joined #ruby
eric_ has joined #ruby
_br_ has quit [Excess Flood]
<eric_> Sirs I need help
_br_ has joined #ruby
<eric_> I have this ruby script right here: http://pastebin.com/megQ09md
_br_ has quit [Excess Flood]
<eric_> It doesnt seem to connect or accept connections
arya has quit [Ping timeout: 248 seconds]
picca has joined #ruby
_br_ has joined #ruby
angusiguess has joined #ruby
jim_r0x has joined #ruby
kofno has joined #ruby
kofno has quit [Remote host closed the connection]
<eric_> can anyone help me
ziprar is now known as zipace
shock_one has quit [Read error: Connection reset by peer]
arya has joined #ruby
kofno has joined #ruby
shock_one has joined #ruby
ninegrid has quit [Ping timeout: 252 seconds]
etcetera has quit []
ninegrid has joined #ruby
<eric_> ANYONE THERE
graeme has quit [Quit: graeme]
pen has joined #ruby
SCommette has quit [Quit: SCommette]
daig0ro has quit [Quit: Textual IRC Client: www.textualapp.com]
juzprawiedaz is now known as DaZ
Trudko has joined #ruby
shock_one has quit [Ping timeout: 252 seconds]
<Trudko> guys simple question, I iterate over some data and I would like to store some of that data in new object. What is best data structure for that in ruby? For example in javascript I would use object because I cant add new properties to it. In java I would have to create new class just for that purpose
Virunga has joined #ruby
colonolGron has quit [Quit: leaving]
maletor has joined #ruby
mmitchell has quit [Remote host closed the connection]
<eric_> CAN ANYONE HELP ME
onemanjujitsu has joined #ruby
Morkel has quit [Quit: Morkel]
<jokke> do hashes keep their order in ruby?
<banisterfiend> jokke: Yeah
statarb3 has quit [Read error: Connection reset by peer]
<jokke> great
<banisterfiend> jokke: in > 1.9, anyway
<jokke> ah kk
Elhu has joined #ruby
<eric_> Can anyone help me
<banisterfiend> eric_: no
<eric_> why not
grzywacz has quit [Ping timeout: 246 seconds]
<otherj> because you're obnoxious
<banisterfiend> because you haven't even asked a question
Virunga_ has quit [Ping timeout: 264 seconds]
<eric_> yes I have
ninegrid has quit [Ping timeout: 255 seconds]
<eric_> Its all the way up there
<eric_> I have this ruby script right here: http://pastebin.com/megQ09md
<eric_> It doesnt seem to connect or accept connections
<banisterfiend> eric_: post it on stackoverflow.com
ninegrid has joined #ruby
<eric_> Mmmmmmmmmmmmmmmmmmmmmmmmmmm, will I get help there
<Trudko> or maybe I could store hash map of hasham maps ? :)...
reset has quit [Quit: Leaving...]
<Spooner> eric_, Sort your indentation out first though ;)
kirun has quit [Quit: Client exiting]
<eric_> I will but I just need to fix the script first
<sam101> guys to run a file.rb do i need rubygems to be installed
<eric_> no
<Spooner> Trudko, That rather depends what the data actually is.
<sam101> thanks eric_: and i hope someone helps you
stormetrooper has joined #ruby
jim_r0x has quit [Remote host closed the connection]
crackfu has joined #ruby
d34th4ck3r has quit [Ping timeout: 245 seconds]
<Trudko> Spooner: yeap to give you idea I have through Player object which have name ofc, team. What I do is take all players and find out how many matches they played, and how much points they have total, this information is not stored in player object
workmad3 has joined #ruby
<Trudko> but I need to somehow get this info into one object so I can create simple table for it. Maybe not best solution but it is one I am familiar with.
<sam101> /usr/bin/ruby: bad interpreter: No such file or directory
<sam101> :S
<sam101> after second install
<sam101> still nowthig
<Spooner> sam101, You do need Ruby installed though ;)
<sam101> Spooner: this is second time i installed
pen has quit [Ping timeout: 252 seconds]
<Spooner> sam101, Installed what and how?
johnpcamara has joined #ruby
plotter has quit [Remote host closed the connection]
<sam101> ./configure
<sam101> make
<sam101> make install
jonathanwallace2 has quit [Ping timeout: 256 seconds]
<Trudko> Spooner: personalyl i like approach from js when I can create ojbect and add new attributes to it. something like hashmap really
<Spooner> Why not just use rvm, etc?
<sam101> Spooner: ok how do i install that
<Spooner> Trudko, Yeah, a Hash is like that.
<sam101> some1 told me also that
stringoO has quit [Quit: stringoO]
java_cpp has joined #ruby
<Trudko> Spooner can't i do something like that with ruby objects? for example to add simply neew attributes to object of certain class?
<Spooner> sam101, https://rvm.io/rvm/install/ Though personally I use rbenv install, but all the same sort of thing.
<sam101> ok Spooner: thanks i will have a look
<Spooner> Trudko, You can, but you need a special object for that.
alanp has joined #ruby
<eric_> can anyone take a look through this script. It doesnt accept connections or connect to other servers: http://pastebin.com/megQ09md
<Trudko> Spooner: ok so it wouldn't be crime if I use hashmap of hashmaps?
<sam101> curl: (60) SSL certificate problem, verify that the CA cert is OK. Details:
<sam101> error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed
alanp_ has quit [Ping timeout: 246 seconds]
<sam101> sorry for the trouble, anyone can help on this please
<Spooner> No, a Hash is fine. Also you could use Struct since you know what attributes you want in the object.
Tuxero has left #ruby [#ruby]
seba4 has quit [Ping timeout: 248 seconds]
jaygen has quit [Read error: Connection reset by peer]
jaygen has joined #ruby
<Trudko> will check it also I would then have to sort these players by number of points they have and then take top 10
jaygen has quit [Read error: Connection reset by peer]
<Spooner> players.sort_by {|p| -p.points }.take(10)
reppard has joined #ruby
jaygen has joined #ruby
<Trudko> lol ok :D
<Trudko> i think I will like ruby :D
<jokke> Trudko: you will
nathancahill has joined #ruby
<jokke> i started with it a few weeks ago and now i'm hooked
<jokke> i can't stop coding in it.
marr has joined #ruby
jonathanwallace2 has joined #ruby
<Trudko> heh hopefully I will have chance to continuie in it. I am doing it for smaller project but in work I am doing in java and javascript
<Trudko> btw struct looks greate
johnpcamara has quit [Quit: johnpcamara]
<Spooner> Trudko, Really, creating a full object is barely any more effort. Ruby isn't like those two, very verbose, languages ;)
Elhu has quit [Quit: Computer has gone to sleep.]
<Trudko> what do you mean by full object? creating new class ?
<Trudko> and js is great language :)
<ralxz> i have an array like this: ["category[3]=1", "category[2]=1"]
<ralxz> how can i loop through it and have all 3 variables available: category, 3, 1
PanPan has quit [Read error: Connection reset by peer]
<Spooner> Trudko, Yeah, a proper class rather than a Struct or Hash.
PanPan has joined #ruby
picca_ has joined #ruby
br4ndon has joined #ruby
<Spooner> Trudko, All languages seem good until you realise there are better ones.
<Trudko> frankly still dont like it , it so java like solution :D
<Trudko> personally I dont like create classes if I use them only in one case
sepp2k has quit [Remote host closed the connection]
seba4 has joined #ruby
<Trudko> thats why I like class free dynamic lang as js, and I hoped that something like that could be done in Ruby
atyz has quit [Quit: Leaving...]
<Spooner> The reason you don't make classes with JAva is because it makes you spend a lot of time on it.
<Trudko> yeah I guess but nto really in this case and what is wrong with struct in this case? why should I use class over struct or hashmap?
jonathanwallace2 has quit [Ping timeout: 255 seconds]
jfl0wers_ has joined #ruby
Kingy has joined #ruby
emaiax has joined #ruby
<Trudko> if I will only need the new class on two places really
anonymuse has joined #ruby
picca has quit [Ping timeout: 245 seconds]
etcetera has joined #ruby
atyz has joined #ruby
<Spooner> Struct/Hash are probably fine. I was just suggesting that using a full class isn't a lot more trouble and gives more.
<Spooner> If you need it.
picca_ has quit [Ping timeout: 252 seconds]
multi_io has joined #ruby
mcqueenorama has quit [Remote host closed the connection]
<Spooner> I think a Hashie::Mash is what you were asking for specifically (https://github.com/intridea/hashie) - though I'm sure they exist in numerous other libraries.
Xeago has joined #ruby
<Spooner> I mean equivalents.
<Trudko> yeah ok maybe I will use class anyway I mean I have to take a clooser look on them anyway
relixx has quit [Quit: relixx]
skattyadz has joined #ruby
invariant has quit [Ping timeout: 248 seconds]
atno has quit [Quit: Get MacIrssi - http://www.sysctl.co.uk/projects/macirssi/]
<unstable> 500000500000 ... what is a good way to count how many divisors this number has?
tjbiddle has quit [Quit: tjbiddle]
<unstable> (1..(num)).select { |i| (num % i == 0) }
<unstable> That works very poorly.
skattyadz has quit [Ping timeout: 264 seconds]
stringoO has joined #ruby
reppard has quit [Ping timeout: 256 seconds]
<Spooner> unstable, You can do 1..(num/2) as a start ;)
<ralxz> anyone have a good way to iterate through an array like this?
<ralxz>  ["category[3]=1", "category[2]=1"]
<ralxz> i'd like to have [category, 3, 1] available e.g.
<unstable> Spooner: ok, that's a start. It still takes more than several minutes. :p
k610 has joined #ruby
fasta has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 276 seconds]
TheFuzzball has quit [Quit: Computer has gone to sleep.]
fasta has joined #ruby
emaiax has quit [Remote host closed the connection]
adeponte has joined #ruby
bean has quit [Read error: Connection reset by peer]
mockra has quit [Remote host closed the connection]
nathancahill has quit [Quit: nathancahill]
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
atno has joined #ruby
felipe_Brz has joined #ruby
<Spooner> ralxz, ["category[3]=1", "category[2]=1"].map {|s| s.split(/\W+/) }.each {|c, i, n| }
eka has joined #ruby
one has joined #ruby
<Spooner> unstable, Yeah, halving is good, but isn't going to help a lot.
bean has joined #ruby
eka has quit [Client Quit]
dmiller has quit [Ping timeout: 255 seconds]
kofno has quit [Remote host closed the connection]
<ralxz> Spooner: you're a lifesaver, thanks man :)
<felipe_Brz> what is the criterium over when to use {}-style blocks and when to use do end ?
<unstable> felipe_Brz: {} is for one line, do/end are for more than one line.
<Spooner> Main one is {} on one line. do-end on multiple lines.
<felipe_Brz> unstable: Spooner thx
<Spooner> ralxz, ["category[3]=1", "category[2]=1"].map {|s| s.match(/(\w+)\[(\d+)\]=(\d+)/).captures }.each {|c, i, n| } is "more correct", but both work.
KeyboardNotFound has joined #ruby
KeyboardNotFound has left #ruby ["Leaving"]
<Es0teric> ok what does the "raise" keyword do exactly?
<Spooner> Or .each {|s| c, i, n = s.match(/(\w+)\[(\d+)\]=(\d+)/).captures; ... }
<Es0teric> what is that equivalent to in php? Exception() ?
<Spooner> Es0teric, Throws an exception that can be caught with try/rescue.
<Es0teric> AH HA i see... so then raise ArgumentError and raise AccessDeniedError is all part of that
<Spooner> Es0teric, No, more like try/catch. Exception is what you throw/raise.
<Es0teric> so then how would that... work
<Spooner> throw/try/catch that is.
<Spooner> We have throw/try/catch too, but it isn't used much at all.
<David_Miller> how do people feel about singletons?
<David_Miller> useful or not?
<banisterfiend> David_Miller: depends what u mean by..
stringoO has quit [Quit: stringoO]
idkazuma has joined #ruby
<David_Miller> classes that can only be instantiated once
<Spooner> Useful if you have a use for one. They aren't useless like headless monkeys.
<Es0teric> Spooner i am asking because i've been reading the poignant guide to ruby
<Es0teric> and i see alot of different raise types
<Spooner> Es0teric, Probably not the best way to _learn_ ruby, but have fun ;)
<Es0teric> like raise ArgumentError, AccessDeniedError
<Es0teric> Spooner well its easier for me to understand it... since i come from a OO php background
arya has quit [Ping timeout: 248 seconds]
<jokke> i need to send some data in a http get request. Problem is, i have a variable arg[] multiple times in the url always with a different value. Until now i used a hash in the form {:key => 'value'} but now i have multiple identical keys.. what can i do?
<jokke> i could conveniently pass the hash to URI.encode_www_form
<jokke> but now..?
<Spooner> PHP try { throw new MyException("Hello") } catch(MyException $e) {} => Ruby begin; raise MyException, "Hello"; rescue MyException => e; ... end
<David_Miller> Can't I do evertyhing i could with singletons with modules or class variables?
ctp has joined #ruby
<Es0teric> Spooner what about
idkazuma has quit [Ping timeout: 246 seconds]
<David_Miller> I just want someone to show me the value of them
<David_Miller> heh
<Spooner> David_Miller, Singletons are implemented with class variables (or class instance variables).
pen has joined #ruby
<Es0teric> raise ArgumentError, AccessDeniedError, etc?
<Es0teric> are those just shorthand?
<David_Miller> insted of a singleton I could just instantiate a class as needed that shares class variables
<Spooner> David_Miller, The advantage is that a) It isn't created until it is first requested and b) everyone has access to exactly one instance and c) you can't make more than one.
pyx has joined #ruby
<jokke> ah wait.
<Spooner> David_Miller, You could do that.
lot49 has quit [Remote host closed the connection]
skattyadz has joined #ruby
samuelj has joined #ruby
<jokke> maybe i can just do {:arg => [value1, value2, value3]} and it would convert into the correct url?
<jokke> probably does, knowing now how awesome ruby is
<Spooner> jokke, Maybe you should try that then.
<Spooner> Es0teric, What do you mean by "shorthand"? That is just the same as the example I gave.
<Es0teric> Spooner shorthand as in... a shorter way of writing it
<Spooner> Es0teric, But it isn't shorter.
Xeago has quit [Remote host closed the connection]
cobragoat has joined #ruby
<Es0teric> Spooner oh i see
<samuelj> Hi, does anyone have any experience with Goliath? I've got a sinatra app (so on top of rack) that I need to start programatically with Goliath. I'm using Goliath::Server.new(host, port){|s| s.app = my_rack_app}.start
<Spooner> The begin/rescue is the bit you need to the raised exception.
Vektur has quit []