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]
<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]
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
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]
<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>
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]
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
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.]
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]
<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]
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
<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
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?
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]
<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 ...
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
<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
<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
<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]
<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"
<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.
* 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 :(
<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+(?=\]))/)
<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*
<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..
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]
<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
<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 ;)
<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
<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
<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.