thumpba has quit [Remote host closed the connection]
n_blownapart has quit []
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<TristanBomb>
Hey, I was trying to install Gosu, but gem is telling me that it can't find JRuby
lolmaus has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
<TristanBomb>
Despite the fact that the Gosu website states it doesn't even work with JRuby
shinobi_one has joined #ruby
ccooke has quit [Ping timeout: 240 seconds]
bmurt has joined #ruby
<havenwood>
tristanbomb: What do you get for?: ruby -v
<havenwood>
tristanbomb: please mention if you're crossposting
<TristanBomb>
Pardon?
<TristanBomb>
I tried #ruby-lang first but a friend told me #ruby is far more popular
afhammad has joined #ruby
<TristanBomb>
Sorry, not very acquainted with IRC etiquette.
cndiv has quit [Ping timeout: 260 seconds]
<havenwood>
tristanbomb: Yeah, it is. I just mean if you ask in more than on channel say in each where all you're asking.
<havenwood>
np
bmurt has quit [Client Quit]
afhammad has quit [Client Quit]
<havenwood>
tristanbomb: But cross-posting aside. :P What do you get for your Ruby version?: ruby --version
<TristanBomb>
Anyway, I just used the gem command in Command Prompt (running Windows 8) and it gave me the following output: http://prntscr.com/4rxik4
andrewcarter has joined #ruby
<zenspider>
iamjarvo: yes, superclass
bogeyd6 has joined #ruby
<TristanBomb>
havenwood: Ruby 2.0.0p481
zz_karupa is now known as karupa
shinobi_one has quit [Ping timeout: 260 seconds]
bahar has joined #ruby
thomasxie has left #ruby [#ruby]
klaut has quit [Remote host closed the connection]
<havenwood>
tristanbomb: so it seems your `ruby` is cruby but your `gem` is jruby
<havenwood>
tristanbomb: check?: gem env gemdir
<havenwood>
(i don't even know if Win has which/whence/command -v/whereis or whatever)
<zenspider>
tristanbomb: a screen grab? really?
BTRE has quit [Ping timeout: 245 seconds]
nettoweb has quit [Ping timeout: 246 seconds]
<TristanBomb>
havenwood: Ah, so I am. Thanks
kristoff_ has joined #ruby
<TristanBomb>
zenspider: well... copypasting has formating issues and... well... I've got no excuse, really
mastr_bennett[x] has joined #ruby
oo_ has joined #ruby
<havenwood>
tristanbomb: just next time please take a video shot of your monitor and upload it so heads explode :)
coderdad has quit [Remote host closed the connection]
<TristanBomb>
havenwood: Will do
tjr9898 has joined #ruby
<havenwood>
tristanbomb: jruby really is nice on win
<havenwood>
tristanbomb: maybe even just go that way
kristofferR has quit [Ping timeout: 260 seconds]
<havenwood>
but do pick!
fgo has quit [Remote host closed the connection]
b00stfr3ak has quit [Ping timeout: 272 seconds]
<TristanBomb>
havenwood: I guess, but Gosu isn't compatible with JRuby. Obviously there are alternatives for JRuby, but from what I've heard (which is very little) Gosu is probably my best bet
<havenwood>
tristanbomb: maybe jgosu? not sure it's really supported.
<havenwood>
tristanbomb: yeah, you mentioned that earlier, i forgot :O
awc737 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<xcyclist>
I am trying to reference a class in minitest that is ../node1/node2/node3 from the test directory.
<TristanBomb>
havenwood: Just looked at JRuby. The site's homepage is one sentence on Google code. Probably not a good idea.
oo_ has quit [Remote host closed the connection]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<xcyclist>
My require statement for the file ../node1/node2/node3/file.rb works, but the class in it fails when I try to go MyClass.new.
<havenwood>
s/jruby/jgosu
<havenwood>
yeah
<havenwood>
tristanbomb: i've not done dev on win so i've not used it but i think pik is the Ruby switcher
<havenwood>
tristanbomb: or ditto, but maybe chocolatey could handle it: https://chocolatey.org/
spyderman4g63 has quit [Remote host closed the connection]
moritzs has quit [Remote host closed the connection]
tjr9898 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
tjr9898 has joined #ruby
<havenwood>
anyone ever used pik?
<xcyclist>
So, if I have a ruby require statement that works, but I cannot see something that is in the successfully required file, what is the category of thing I look into in order to access said thing?
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
<havenwood>
xcyclist: please say if you're posting questions in multiple channels :)
Kricir has joined #ruby
hamakn has joined #ruby
<xcyclist>
I am. Is that bad?
<havenwood>
xcyclist: require returns?: true
nettoweb has joined #ruby
nettoweb has quit [Max SendQ exceeded]
<havenwood>
xcyclist: it's fine but courtesy to say so those trying to answer can follow other answers
spyderman4g63 has quit [Ping timeout: 260 seconds]
<havenwood>
say so so those**
nettoweb has joined #ruby
<xcyclist>
Yes. Well, I just need one answer. I can repost it on the other if you like.
nettoweb has quit [Max SendQ exceeded]
oo_ has joined #ruby
<xcyclist>
Anyway, require returns?
<xcyclist>
I just don't get an error. Is there a method returns?
<havenwood>
e.g.: require 'rubygems' #=> false
nettoweb has joined #ruby
<havenwood>
require 'slop' #=> true
fgo has joined #ruby
dazeddev has quit [Ping timeout: 260 seconds]
<havenwood>
xcyclist: If no error and not already required, i'd assume it returned: true
BTRE has joined #ruby
<xcyclist>
Yes.
jelera has joined #ruby
<havenwood>
Can you paste a link to the file your requiring?
<xcyclist>
So, if I cannot access something from that require, is there some step I should do to expose it?
gsd has joined #ruby
kristofferR has joined #ruby
<xcyclist>
Presumably things are public unless otherwise specified.
iliketurtles has quit [Quit: zzzzz…..]
RegulationD has joined #ruby
<havenwood>
There must be some other problem.
<havenwood>
Doesn't sound like a require issue.
<xcyclist>
No. I can concoct something like it, but I fear I am dealing with some environment factor, or artifact of minitest.
oo_ has quit [Remote host closed the connection]
cephalostrum_ has quit [Ping timeout: 272 seconds]
patrick99e99 has quit [Ping timeout: 258 seconds]
<havenwood>
xcyclist: Maybe $LOAD_PATH isn't as you expect.
<xcyclist>
Is there something I may need to do in minitest?
<havenwood>
xcyclist: Does it work with require_relative.
Kricir has quit [Ping timeout: 272 seconds]
kristoff_ has quit [Ping timeout: 246 seconds]
emocakes has joined #ruby
<xcyclist>
What does require_relative do?
<havenwood>
xcyclist: Look at the $LOAD_PATH Array and require something relative to it or amend it or use require_relative.
<havenwood>
xcyclist: It requires relative to the __FILE__.
oo_ has joined #ruby
GriffinHeart has joined #ruby
<xcyclist>
Ok. I don't think that is necessary. Require is working.
<havenwood>
err, that's not a good way to say it
<xcyclist>
I think it must be something of the environment allowing exposure.
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
coderdad has joined #ruby
Sawbones has quit [Remote host closed the connection]
RegulationD has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
mmx has quit [Quit: leaving]
fabrice31 has quit [Ping timeout: 272 seconds]
Frogging101-chan has joined #ruby
krisquigley has joined #ruby
Frogging101-chan has left #ruby [#ruby]
fun has joined #ruby
robbyoconnor has joined #ruby
<fun>
hi folks I used rake secret and pasted value to the secrets.yml however when I start rails server it says I havent set it
robbyoconnor is now known as Guest6749
preyalone has quit [Quit: Connection closed for inactivity]
<fun>
whats the correct syntaks for the product enviroment secret key?
jasooon has joined #ruby
<fun>
I used secret_key_base: <%= ENV["76586f5073396f58bd6515026a15ca1c9638a47c9de3c1c4382f3cf3d43f64386d6f76cf"] %>
<fun>
i also trie secret_key_base: 76586f50733a10c0ace66509f413ba1915c20d34ba78e57a733f2d2734e76263c4d96f58bd6515026a15ca1c9638a47c9de3c1c4382f3cf3d43f64386d6f76cf
<fun>
tried
<sevenseacat>
the latter is fine
<sevenseacat>
the former is wrong, unless your environment key is actually that (which it isnt)
justinmburrous has quit [Remote host closed the connection]
duncannz has quit [Remote host closed the connection]
mjwhitta has joined #ruby
jasooon has quit [Client Quit]
jasooon has joined #ruby
krisquigley has quit [Ping timeout: 244 seconds]
mjwhitta has quit [Client Quit]
justinmb_ has joined #ruby
<fun>
sevenseacat: i am playing with spree former comes from spree file
<sevenseacat>
no it doesnt
* sevenseacat
is also working on a spree app
mocfive has quit [Remote host closed the connection]
<fun>
hmm where then it came from?
<fun>
i certainly added 0 of it
<fun>
sevenseacat: what do you use in your secrets file?
<sevenseacat>
a spree app just uses the default secrets.yml, which specifies ENV['SECRET_KEY_BASE']
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krz has joined #ruby
goodenough has joined #ruby
<fun>
sevenseacat: in spree gem file I did not specify min pg version maybe thats also mistake?
<sevenseacat>
thats fine.
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<fun>
I get error in log ERROR -- : PG::UndefinedTable: ERROR: relation "spree_preferences" does not exist
<TTilus>
oh dear, sudo gem install bdb throws "/usr/include/ruby-1.9.1/ruby/ruby.h:909:30: error: format not a string literal and no format arguments [-Werror=format-security]"
<sevenseacat>
but if you absolutely insist on doing so, you'll need to install spree *for production*.
<fun>
i wanted to get a feel of it :) I plan to use nginx when its time to open
<shevy>
the cat is teaching newcomers
mocfive has joined #ruby
<fun>
sevenseacat: yes I though it installs it for production, development and test at once
<sevenseacat>
fun: so you don't want production, you want development.
<sevenseacat>
no, it doesn't. and it shouldn't.
<fun>
eee
<fun>
but when its ready how to switch it to production?
<fun>
such app
<sevenseacat>
you dont 'switch it to production'
shock_one has joined #ruby
<sevenseacat>
you go and set up your production server, and install it there
<pontiki>
here is a problem: you cannot learn everything all at once
<sevenseacat>
then you deploy your development code to production
<sevenseacat>
i think fun is trying to take on way, way too much at once
<pontiki>
this is why Einstein invented time
<fun>
sevenseacat: lol why not just have it as production
msmith__ has joined #ruby
<pontiki>
lol why not!
<fun>
I get the idea of testing then pushing to production
<sevenseacat>
fun: you want all the work you are in progress of doing to be public and accessible so people can buy stuff while you're building the site?
<sevenseacat>
seriously?
<fun>
sevenseacat: well site is not open anyway
msmith_ has quit [Ping timeout: 246 seconds]
<sevenseacat>
yes it is
<sevenseacat>
if you're running it in production and you can give people the URL,then it is
<fun>
well they click url and see work in progress
<fun>
domain is not pointed at it
<sevenseacat>
and how do they know its a work in progress and they shouldnt buy anything
zB0hs has joined #ruby
zB0hs has quit [Client Quit]
<sevenseacat>
this is common sense 101
Guest6749 has quit [Quit: Konversation terminated!]
bthesorceror has quit [Quit: bthesorceror]
<sevenseacat>
don't make stuff public if it isn't ready to be public
<fun>
sevenseacat: I can add user:pass gateway
pagioss has joined #ruby
<fun>
honestly I dont mind who is going to click on that url
<fun>
its not like many even would
<sevenseacat>
sigh
<sevenseacat>
i really hope you're trolling now
<fun>
who would type some random ip?
<sevenseacat>
either that, or you're really up to date on all your security fixes
geggam has joined #ruby
<fun>
yes I am uptodate
livingstn has joined #ruby
<fun>
there arent much running there, spree, nginx to come, unicorn, ssl
shock_one has quit [Ping timeout: 272 seconds]
<Jason>
okay
<Jason>
oops wrong window
<sevenseacat>
you're crazy.
<fun>
db is on local only
yfeldblum has quit [Remote host closed the connection]
<fun>
sevenseacat: plus hackers hack working shops
<sevenseacat>
if you're opening up your personal machine to serving production apps, you're crazy. thats all i have to say.
<fun>
not some test box
<sevenseacat>
and i have nothing else to say.
<pontiki>
i think one does not know what production means
<pontiki>
that's all
mjwhitta has quit [Quit: leaving]
RegulationD has joined #ruby
<fun>
production means ready tested version
<fun>
but I realised i can work faster
<fun>
by doing dev test in same box
<fun>
then copy ready stuff to git
<pontiki>
production means customer-facing and taking users' input
<fun>
well anyways u also right but i want to do stuff really ast
<fun>
fast
<fun>
pontiki: yes
<shevy>
you wanna do stuff fast
zapho53 has joined #ruby
<shevy>
so code faster!
<fun>
pontiki: so I use box to develop it but in `production` mode
<pontiki>
and failures that bring the box down mean you lose customers, business, and money
<pontiki>
and failures that annoy customers, lose customers, business, and money
<fun>
if it works it works, the way I move it from production to production is pointing domain to it
<FarLight>
Pretty new to cl in general, but just started ruby cl today
grenierm has joined #ruby
* shevy
tries to Ctrl-C pontiki!
<pontiki>
interrupting shevy
<pontiki>
are you on a unix-type command line?
<FarLight>
yup
iliketurtles has quit [Quit: zzzzz…..]
<pontiki>
type: stty -a
<shevy>
there is hope
<shevy>
you could be stuck on windows
<pontiki>
you'll see what all the control characters are assigned to
<pontiki>
and a bunch of other things
<pontiki>
the man stty
<pontiki>
then: man stty
<FarLight>
Wow, handy
<pontiki>
and read about them
<shevy>
so much to read
<pontiki>
knowledge is power
<FarLight>
I'd figured out ctrl-c, mainly because I'd try to copy something while it was running and interrupt it.
koderok has joined #ruby
<shevy>
you can intercept ctrl-c
shock_one has joined #ruby
koderok has left #ruby [#ruby]
<shevy>
def register_sigint; Signal.trap('SIGINT') { puts 'Will we exit or will we not ...'; sleep 3; puts 'YES WE WILL!!!!'; exit }; end
<shevy>
awesome isn't it
jbueza has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<pontiki>
oh yes, signals are another huge thing
<shevy>
the reason I have it a method is because I use the same code in several different classes from the commandline, I hate when there is no graceful exit or boring exit when I hit ctrl c
iliketurtles has joined #ruby
<shevy>
puts 'Bye Master!'
jelera has quit [Quit: Leaving]
<pontiki>
which sort of *nix are you using FarLight ?
Insanity133 has quit [Remote host closed the connection]
<shevy>
the base was slackware but I recompiled around 98% of what is there from source
<shevy>
pontiki is dumbuntu I bet :)
<pontiki>
usually the choices are GNU/Linux, OS/X and BSD
<shevy>
how about windows
<pontiki>
type: man sigaction
shock_one has quit [Ping timeout: 250 seconds]
jasooon_ has quit [Ping timeout: 245 seconds]
jasooon has quit [Ping timeout: 245 seconds]
<sevenseacat>
lol 'dumbuntu'
<FarLight>
pontiki Interesting
<pontiki>
also, man 7 signal lists most of the defined signals
<pontiki>
anyway, there's depths and depths of informatoin
mengu has joined #ruby
mengu has joined #ruby
patrick99e99 has joined #ruby
<FarLight>
haha yeah there sure is
<pontiki>
good thing is, you don't have to learn it all at once :D
binaryhat has quit [Ping timeout: 250 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
justinmburrous has joined #ruby
goodenough has quit [Remote host closed the connection]
shinobi_one has joined #ruby
<shevy>
but pontiki wants you to learn it
fumk has quit [Ping timeout: 260 seconds]
Insanity133 has joined #ruby
<FarLight>
haha
sigurding has joined #ruby
<FarLight>
I'm just happy I got this script to work
<FarLight>
Clean svg's
aganov has joined #ruby
shock_one has joined #ruby
patrick99e99 has quit [Ping timeout: 272 seconds]
jontmorehouse has joined #ruby
fumk has joined #ruby
kaspergrubbe has joined #ruby
krz has joined #ruby
shinobi_one has quit [Ping timeout: 272 seconds]
Morkel_ has joined #ruby
nonmadden has quit [Remote host closed the connection]
Insanity133 has quit [Remote host closed the connection]
Red_Onyx has joined #ruby
krisquigley has joined #ruby
coderdad has quit [Remote host closed the connection]
Morkel has quit [Ping timeout: 260 seconds]
Morkel_ is now known as Morkel
Vile` has quit [Quit: brb]
jontmorehouse has quit [Ping timeout: 260 seconds]
kaspergrubbe has quit [Ping timeout: 260 seconds]
fabrice31 has joined #ruby
dx7 has quit [Remote host closed the connection]
icebourg has quit []
sinkensabe has quit [Remote host closed the connection]
sinkensabe has joined #ruby
lxsameer has joined #ruby
lxsameer has joined #ruby
msmith_ has joined #ruby
sinkensabe has quit [Remote host closed the connection]
mityaz has quit [Quit: See ya!]
neoxquick has quit [Read error: Connection reset by peer]
skammer4 has joined #ruby
krisquigley has quit [Ping timeout: 272 seconds]
fabrice31 has quit [Ping timeout: 245 seconds]
srnty has joined #ruby
ht__th has joined #ruby
nhhagen has joined #ruby
AlexRussia has quit [Read error: Connection reset by peer]
AlexRussia has joined #ruby
ner0x has quit [Quit: Leaving]
msmith_ has quit [Ping timeout: 272 seconds]
skammer4 has quit [Ping timeout: 260 seconds]
aspires has quit []
mikeg has joined #ruby
nrsk has quit [Read error: Connection reset by peer]
boombadaroomba has joined #ruby
nhhagen has quit [Ping timeout: 272 seconds]
rubyhaxor has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
craigp has joined #ruby
tagrudev has joined #ruby
Hyknua has joined #ruby
arrnas has joined #ruby
shock_one has quit [Quit: Computer has gone to sleep.]
nonmadden has joined #ruby
binaryhat has joined #ruby
boombadaroomba has quit [Ping timeout: 260 seconds]
willgo has quit [Remote host closed the connection]
dawkirst has quit [Remote host closed the connection]
kristofferR has joined #ruby
nrsk has joined #ruby
kaspergrubbe has joined #ruby
starkhalo has quit [Ping timeout: 245 seconds]
synergyz has joined #ruby
synergyz has quit [Remote host closed the connection]
krisquigley has joined #ruby
postmodern has joined #ruby
speaking1ode has joined #ruby
Vile` has joined #ruby
arup_r has joined #ruby
hiyosi has joined #ruby
speakingcode has quit [Ping timeout: 250 seconds]
codecop has joined #ruby
binaryhat has quit [Ping timeout: 244 seconds]
cndiv has joined #ruby
ta_ has quit [Remote host closed the connection]
kaspergrubbe has quit [Ping timeout: 272 seconds]
krisquigley has quit [Ping timeout: 272 seconds]
slyslick has joined #ruby
srnty has quit [Ping timeout: 272 seconds]
hiyosi has quit [Ping timeout: 250 seconds]
mengu has quit [Remote host closed the connection]
ciampix has joined #ruby
sinkensabe has joined #ruby
willgo has joined #ruby
sinkensabe has quit [Remote host closed the connection]
sinkensabe has joined #ruby
bal has joined #ruby
MACscr has joined #ruby
ghr has joined #ruby
russt has quit [Quit: russt]
HelperW has quit [Quit: Computer has gone to sleep.]
HelperW has joined #ruby
IceDragon has quit [Ping timeout: 260 seconds]
IceDragon has joined #ruby
binaryhat has joined #ruby
nik_-_ has joined #ruby
ghr has quit [Ping timeout: 260 seconds]
tectonic has quit [Read error: Connection reset by peer]
tectonic_ has joined #ruby
Aaaal has joined #ruby
HelperW has quit [Ping timeout: 260 seconds]
clauswitt has joined #ruby
msx has quit [Ping timeout: 250 seconds]
Jet4Fire has joined #ruby
ar has quit [Ping timeout: 250 seconds]
ar has joined #ruby
ar has joined #ruby
ar has quit [Changing host]
Aaaal has quit [Client Quit]
mengu has joined #ruby
clauswit_ has joined #ruby
clauswitt has quit [Ping timeout: 244 seconds]
dawkirst has joined #ruby
mary5030 has joined #ruby
bMalum has joined #ruby
bMalum has quit [Client Quit]
jack_rabbit has quit [Ping timeout: 245 seconds]
IceDragon has quit [Ping timeout: 260 seconds]
nik_-_ has quit [Quit: nik_-_]
QAEngineer has joined #ruby
<QAEngineer>
hi
mary5030 has quit [Ping timeout: 260 seconds]
<pontiki>
no, but thanks anyway
<QAEngineer>
anyone know how video chat site (e.g. chaturbate, myfreecams) are setup
reith2004 has joined #ruby
<QAEngineer>
are these sites hosted on the cloud?
<pontiki>
no idea
shinobi_one has joined #ruby
<pontiki>
chances are they are not, if i understand their resource uses, using a cloud service for hosting them would likely be very expensive. but the truth is, i have no idea
arup_r has quit [Remote host closed the connection]
<QAEngineer>
makes sense
<sevenseacat>
i like the examples you picked lol
<TTilus>
how would i go about reading berkeley db files (in ruby on debian jessie)
jack_rabbit has joined #ruby
<QAEngineer>
its amazing how much video feeds these sites pump
<Hanmac>
hmmm for my linux i need to find a image viewer that can read svg files from STDIN ...
<sevenseacat>
TTilus: will something like Sequel connect to it?
c107 has quit [Read error: Connection reset by peer]
<TTilus>
with fresh ruby i get "unsupported Ruby version: 2.1.3" from tuple install
jontmorehouse has joined #ruby
arup_r has joined #ruby
IceDragon has joined #ruby
Hyknua has quit [Ping timeout: 260 seconds]
ferr_ has joined #ruby
dawkirst has quit [Remote host closed the connection]
arup_r_ has joined #ruby
<TTilus>
with ruby-1.9.3-p547 tuple installs fine, but does not find any libdb headers, because it looks for 4.2-5.1 and jessie is fully migrated to libdb5.3 :(
<ferr_>
I just thought exploring Ruby source code would be helpful but since it's written in c... Any other suggestions?
<sevenseacat>
we dont know what you're trying to do
<sevenseacat>
how can we suggest anything?
<ferr_>
Sorry, I'm getting used to Ruby
<zenspider>
exploring ruby source code IS helpful
shinobi_one has joined #ruby
patrick99e99 has quit [Ping timeout: 258 seconds]
wallerdev has joined #ruby
Takle has quit [Remote host closed the connection]
sigurding has joined #ruby
lewix has quit [Remote host closed the connection]
<badhatter>
i found exploring all the standard lib useful earlyon and even lateron
jcdesimp has quit [Quit: Leaving...]
<Hanmac>
specially if you look how String and Array does share data between some objects of the same class ... like String#[] does return a new string, but it does not create new data "yet"
<TTilus>
ferr_: you mean you want to read good ruby source code to draw influence, inspiration and ideas from it?
<ferr_>
TTilus, this is correct
* TTilus
is looking into his chrystalball smiling
<ferr_>
I would like to knew how .each .sample .join and other methods are written
<TTilus>
ferr_: i bet zenspider has a lot of good pointers for you
shredding has quit [Quit: shredding]
oo_ has quit [Remote host closed the connection]
<pontiki>
wow, TTilus, you are *amazing*
<zenspider>
read the source &/or reimplement them yourself.
<zenspider>
implement Enumerable#map yourself using each
<TTilus>
pontiki: no, im not, i just have a quality chrystalball, you oughtta get one yourself ;)
sk87 has joined #ruby
<Hanmac>
dont look at my code, otherwise you get a headache like from MC.Eschers paintings ;P
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<pontiki>
i like escher :/
* sevenseacat
only has crappy code integrating with legacy things
nonmadden has quit [Quit: Leaving...]
flowerhack has quit [Remote host closed the connection]
wpp has joined #ruby
justinmburrous has joined #ruby
<Hanmac>
pontiki: yes, but would you also like my code? ;P my macros uses templates using macros and i am still suprised that the IDEs can understand that stuff ;P
<zenspider>
anyone here deep into (mac) homebrew?
<zenspider>
macros?
nonmadden has joined #ruby
<ferr_>
Ok, thanks for your help
oo_ has quit [Read error: Connection reset by peer]
<pontiki>
okay, escher makes *sense*. his stuff *fits together*
<pontiki>
i have no idea what's going on here :)
mityaz has joined #ruby
<pontiki>
maybe if you had some interlocking salamanders...
szarubin has quit [Client Quit]
<zenspider>
meh. I do NOT miss C++ in the slightest. what an _awful_ language.
Advocation has quit [Quit: Advocation]
Ulrike_Rayne has quit [Ping timeout: 246 seconds]
melik has quit [Quit: Computer has gone to sleep.]
ephemerian has quit [Quit: Leaving.]
Hyknua has quit [Quit: Hyknua]
emrox has quit [Ping timeout: 272 seconds]
krisquig_ has quit [Remote host closed the connection]
<MACscr>
Not expecting anything, but i will buy a few beers (paypal gift) for some help on this error. Its not my code and ruby isnt a language I typically use, but im hoping someone can still maybe help me troubleshoot it. Anyway, here is the error http://hastebin.com/efabezefam.vbs and here is the code http://hastebin.com/itafepicaw.vhdl. Luckily the code really isnt to long and the error gives some line
<MACscr>
numbers. Im completely open to ideas/suggestions.
krisquigley has joined #ruby
rdark has joined #ruby
<sevenseacat>
i love how everyone just decides how they want to present their code, and completely ignores the channel rules
mikecmpbll has joined #ruby
<zenspider>
uh. vbs and vhdl.... right.
<MACscr>
my apologies. I should have read them.
<MACscr>
i incorrectly assumed it was similar to other language channels
chiramiso has joined #ruby
<sevenseacat>
it is - we have a preferred paste site
<Hanmac>
pontiki: for sample i have macros like "macro_attr(Text,wxString)" with loosy translate into "VALUE_getText(VALUE self){return wrap(_self->GetText()); } VALUE _setText(VALUE self,VALUE val){_self->SetText(unwrap<wxString>(val))} " ... similar to attr_accessor does it create get and set methods for me with the less input as possible
<MACscr>
i will correct it
dumdedum has joined #ruby
<arup_r_>
I am writing a crawler.. I want to raise 2 kind of exceptions - "Unable to match the Exception on the page" and "Unable to find node on page" ... But not understanding What criterions I should consider for the both..
<zenspider>
MACscr: Seeking to 36600646085248964100096 in /dev/mapper/VolGroup00-jazz_img
<MACscr>
pontiki: ah, I thought Add file was for actually attaching (uploading) a file. Thanks for pointing that out
havenwood has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
skripnat has joined #ruby
Takle has joined #ruby
ta_ has joined #ruby
grenierm has joined #ruby
mrgrieves has quit [Quit: Lost terminal]
shock_one has quit [Read error: Connection reset by peer]
ta has quit [Ping timeout: 260 seconds]
HelperW has quit [Quit: Computer has gone to sleep.]
HelperW has joined #ruby
<MACscr>
so on line 205, is the file opened and assigned to a the variable 'r'? If so, what does snap and differences do? Seems like its looping through something, but im not sure what
sigurding has joined #ruby
anarang has joined #ruby
noop has quit [Ping timeout: 260 seconds]
Ulrike_Rayne has joined #ruby
jbueza has joined #ruby
clauswitt has joined #ruby
Scotteh has quit [Quit: Later, folks]
HelperW has quit [Ping timeout: 260 seconds]
oponder has joined #ruby
zeroXten has joined #ruby
zarubin has joined #ruby
elaptics`away is now known as elaptics
thumpba_ has joined #ruby
<zeroXten>
stupid question, but what is the best way of testing a gem post installation? So I'm running rspec while doing development, but I'd like to basically run rspec again once the gem has been installed onto a new system as an integration test to ensure compatibilities and dependencies etc.
thumpba has quit [Ping timeout: 272 seconds]
JeffBonds has quit [Quit: JeffBonds]
tvw has quit []
oo_ has quit [Remote host closed the connection]
oo_ has joined #ruby
HelperW has joined #ruby
grenierm has quit [Quit: grenierm]
alem0lars has joined #ruby
dawkirst has quit [Remote host closed the connection]
krisquigley has joined #ruby
abdulsattar has quit [Ping timeout: 272 seconds]
krisquigley has quit [Client Quit]
shinobi_one has joined #ruby
oo_ has quit [Ping timeout: 260 seconds]
i8igmac has quit [Ping timeout: 245 seconds]
sevenseacat has quit [Quit: Leaving.]
dawkirst has joined #ruby
kaspertidemann has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
JoshGlzBrk has joined #ruby
fgo has quit [Ping timeout: 260 seconds]
andrewlio has joined #ruby
awc737 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Insanity133 has joined #ruby
shinobi_one has quit [Ping timeout: 272 seconds]
joonty has joined #ruby
krisquigley has joined #ruby
alem0lars has quit [Quit: alem0lars]
kwd_ has joined #ruby
skammer4 has joined #ruby
tectonic_ has quit [Read error: Connection reset by peer]
msmith_ has joined #ruby
marr has joined #ruby
WormDrink has joined #ruby
alem0lars has joined #ruby
Wolland has joined #ruby
nrsk has quit [Read error: Connection reset by peer]
skammer4 has quit [Ping timeout: 272 seconds]
dawkirst has quit [Quit: Leaving...]
msmith_ has quit [Ping timeout: 272 seconds]
mosez has quit [Quit: Switching back to real life]
nrsk has joined #ruby
justinmburrous has joined #ruby
Tomme has joined #ruby
mosez has joined #ruby
Takle has quit [Remote host closed the connection]
klaut has quit [Remote host closed the connection]
yfeldblum has quit [Remote host closed the connection]
HelperW has quit [Quit: Computer has gone to sleep.]
lpaste has joined #ruby
shinobi_one has quit [Ping timeout: 240 seconds]
HelperW has joined #ruby
yfeldblum has joined #ruby
<rclsilve1>
apeiros: i've an hash which contains "source" and "dest" columns (with others).. i would like to sort my items to put lines with "all" value at the end
<rclsilve1>
what is the best way to achieve this?
ccooke has joined #ruby
<apeiros>
rclsilve1: use my sorting gem and map "all" to Sorting::Bigger
nettoweb has joined #ruby
<apeiros>
Sorting::Bigger compares as "bigger" than any other value
<rclsilve1>
can't use external gem
nettoweb has quit [Max SendQ exceeded]
<apeiros>
then have fun either copying that mechanism or coming up with your own solution
<apeiros>
ferr: and why do you think that involves #initialize? (because it does not)
<ferr>
otherwise instance did not work
JoshGlzBrk has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
crazydiamond has joined #ruby
kalz has joined #ruby
Xeago_ has quit [Ping timeout: 272 seconds]
<apeiros>
that makes no sense
<ferr>
Oh, I see
<apeiros>
to address your question: you can't reference the array being built within Array.new's block
<ferr>
It seems to be working now
<ferr>
Just to clarify, why?
<apeiros>
because you have no reference to it
<apeiros>
and the block of Array.new yields the index. assigning to that variable does nothing. relevant is the return value of the block.
msmith_ has quit [Ping timeout: 260 seconds]
Xeago_ has joined #ruby
<apeiros>
ah, you actually intend to access the current array with self there. ok. that works.
<ferr>
I thought the issue was "self" thing
Wolland has quit [Ping timeout: 260 seconds]
<ferr>
But it seems to be the instance
<ferr>
Spend like an hour thinking and testing
<zeroXten>
stupid question, but what is the best way of testing a gem post installation? So I'm running rspec while doing development, but I'd like to basically run rspec again once the gem has been installed onto a new system as an integration test to ensure compatibilities and dependencies etc.
krz has quit [Quit: WeeChat 1.0.1]
<apeiros>
that method won't do what sample does, though. since your method can have repeats. sample does not.
<ferr>
apeiros, thank you very much
moritzs has joined #ruby
<ferr>
it was stated in the exercise that it should repeat
<apeiros>
ok. then that exercise has an identity crisis :-D
sigurding has joined #ruby
<apeiros>
(it's either an identical copy of #sample or it has repeats - can't be both)
krz has joined #ruby
HelperW has joined #ruby
<apeiros>
ferr: also note that unlike sample, your version has a bias
<apeiros>
earlier elements will occur far more frequently
<apeiros>
ah, damn, no
professor_soap has joined #ruby
sk87 has joined #ruby
karupa is now known as zz_karupa
<apeiros>
sorry, still stuck with thinking that self in the block was intended to reference the new array.
<apeiros>
forget what I said about the bias :)
Aaaal has joined #ruby
<ferr>
(Note: those random numbers may be the same number.)
<apeiros>
that sounds more like a hint
Xeago has quit [Ping timeout: 272 seconds]
<ferr>
Since it technically works for me, is it decent as Ruby code?
<ferr>
Or how would you write this piece of code
stef_204 has joined #ruby
stef_204 has quit [Changing host]
stef_204 has joined #ruby
iamcyberbird has quit [Ping timeout: 272 seconds]
<apeiros>
ferr: leave away the superfluous self's and assignments
<apeiros>
def random_select(random_number); Array.new(random_number) { self[rand(length)] }; end
clauswitt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
otherwise, yes
* apeiros
off
naftilos76 has joined #ruby
Mdgd` has joined #ruby
<ferr>
apeiros, huge thanks!
<Mdgd`>
Hey gang, anyone familiar with Geocoder?
<Mdgd`>
I'm using its .near() method to find results based on distance, but I want to use an offset as well as a limit.
<Mdgd`>
I landed on will_paginate after a Google journey but I'm starting to doubt if this is what I actually need, provided I get it to work
<Mdgd`>
Originally I had @results = Garage.near(@s_location, @s_distance, :units => :km, :order => :distance).limit(5)
zarubin has quit [Quit: Leaving.]
eequ has joined #ruby
<Mdgd`>
There isn't a native .offset() method is there?
<naftilos76>
hi everyone, i am trying to use gsub to replace any of the two chars following a given string to something else: "given_string_??" to "given_string_en" . I have to use reg expressions but i do not know anything about them. Can anyone help?
<Mdgd`>
Hahaha there is, nvm
skripnat has quit [Ping timeout: 272 seconds]
<workmad3>
Mdgd`: there's an activerecord offset... so as long as Geocoder is working within the database and returning AR query objects, it's fine
cherwin has quit [Ping timeout: 250 seconds]
Insanity133 has joined #ruby
Spami has quit [Ping timeout: 272 seconds]
badhatter_ has joined #ruby
<workmad3>
Mdgd`: bear in mind that most of the work that will_paginate and kaminari do is really around providing you with the pagination UI components rather than query manipulation ;)
cherwin has quit [Read error: Connection reset by peer]
badhatter is now known as badhatter_
badhatter_ is now known as badhatter
abdulsattar has quit [Ping timeout: 258 seconds]
klmlfl has quit [Remote host closed the connection]
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
mleone has joined #ruby
mleone has quit [Max SendQ exceeded]
cocotton has joined #ruby
tonybird has joined #ruby
Xiti` has joined #ruby
cocotton has quit [Remote host closed the connection]
northfurr has joined #ruby
cocotton has joined #ruby
Insanity133 has joined #ruby
Guest82239 has quit [Quit: Konversation terminated!]
crazydiamond_ has joined #ruby
HelperW has quit [Quit: Computer has gone to sleep.]
Guest82239 has joined #ruby
hiyosi has quit [Ping timeout: 272 seconds]
HelperW has joined #ruby
Guest82239 has quit [Client Quit]
bmurt has joined #ruby
Takle_ has joined #ruby
Takle has quit [Read error: Connection reset by peer]
evrei has joined #ruby
larissa has quit [Ping timeout: 240 seconds]
Xiti has quit [Ping timeout: 240 seconds]
thejamespinto has quit [Read error: Connection reset by peer]
mengu has joined #ruby
mengu has joined #ruby
ferr has quit [Ping timeout: 240 seconds]
thejamespinto has joined #ruby
HelperW has quit [Ping timeout: 245 seconds]
skammer4 has quit [Ping timeout: 260 seconds]
Panicky has joined #ruby
larissa has joined #ruby
Insanity133 has quit [Ping timeout: 272 seconds]
{xenomorph} is now known as xenomorph
Panicky has quit [Remote host closed the connection]
IrishGringo has joined #ruby
jasooon_ has joined #ruby
jasooon has joined #ruby
mastr_bennett[x] has joined #ruby
sprihodko has joined #ruby
alipoor90 has joined #ruby
alipoor90 has left #ruby [#ruby]
doev has joined #ruby
<zeroXten>
surely I'm not the first person to want to rspec a gem after installation?
benzrf|offline is now known as benzrf
douglasssssss has joined #ruby
thejamespinto has quit [Read error: Connection reset by peer]
coderdad has joined #ruby
jcromartie has joined #ruby
thejamespinto has joined #ruby
sailias has joined #ruby
nonmadden has quit [Remote host closed the connection]
troulouliou_dev has joined #ruby
Imofftopic has quit [Quit: Leaving]
arcsky has joined #ruby
jasooon_ has quit [Ping timeout: 260 seconds]
jasooon has quit [Ping timeout: 260 seconds]
jerius has joined #ruby
oleo has joined #ruby
lxsameer has quit [Quit: Leaving]
jcromartie has quit [Client Quit]
momomomomo has joined #ruby
cherwin has joined #ruby
<klap>
anyone here done any micro-service architecture stuff? :)
koderok has joined #ruby
cocotton has quit [Remote host closed the connection]
koderok has quit [Client Quit]
<momomomomo>
klap: !used
<helpa>
klap: Don't ask "does anyone use <thing>?". It's better to just state your problem and if anyone has used <thing> they will most likely answer.
justinmburrous has quit [Remote host closed the connection]
mary5030 has joined #ruby
LiohAu_ is now known as LiohAu
robustus is now known as robustus|Off
Phrogz_ has quit [Remote host closed the connection]
DaniG2k has joined #ruby
aganov has quit [Quit: Leaving]
thejamespinto has quit [Read error: Connection reset by peer]
arup_r has quit [Remote host closed the connection]
<GPH|work>
If I have a class Foo (and an instance foo), is there a way that I can define foo.name and foo.name.first so that both are objects with to_s methods?
LiohAu has quit [Quit: LiohAu]
<GPH|work>
Or, rather, foo.name.first is a string and foo.name has a to_s method
momomomomo has quit [Ping timeout: 245 seconds]
momomomomo_ is now known as momomomomo
Soda has joined #ruby
zz_jrhorn424 is now known as jrhorn424
<banister>
GPH|work what the hell?
jcromartie has joined #ruby
<banister>
GPH|work sounds like something reallly weird about your design
nhhagen has joined #ruby
MaciejCzyzewski has joined #ruby
nhhagen has quit [Remote host closed the connection]
<banister>
GPH|work you want the to_s of an *array* to return a string, that's going to confuse the heck out of people playing with your objects in a repl
<banister>
(to return a string indicating a single element)
ctp_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<GPH|work>
s/=/==/
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy>
GPH|work you would have to return objects
obscured has joined #ruby
<shevy>
the question is - what does foo.name return to you
zer0ne has joined #ruby
<GPH|work>
foo.name should have some way to get at all of the parts, but it could be a separate method or variable like foo.name.data
havenwood has joined #ruby
Phrogz_ has quit [Ping timeout: 245 seconds]
<apeiros>
banister: expecting to_s to return a string seems sane ;-)
zer0ne has quit [Client Quit]
<apeiros>
GPH|work: just define your custom to_s method on the class returned by foo.name
banister has quit [Read error: Connection reset by peer]
<GPH|work>
is there a way to do, like, anonymous classes? or do I have to have a full separate class for each thing?
banister has joined #ruby
arup_r has joined #ruby
<apeiros>
GPH|work: this may come as a surprise to you - but we do not know your design
ayaz has joined #ruby
<apeiros>
we do not know what your foo.name returns
<GPH|work>
apeiros: That is an open question, as I mentioned.
krz has quit [Ping timeout: 260 seconds]
arup_r has quit [Remote host closed the connection]
<shevy>
what is an anonymous class
<GPH|work>
one without a name
<apeiros>
GPH|work: in that case - your question doesn't make sense to me.
<shevy>
GPH|work well you can have Class.new constructs
hiyosi has quit [Ping timeout: 272 seconds]
nhhagen has quit [Ping timeout: 272 seconds]
Bira has joined #ruby
<shevy>
_ = Class.new { def foo; "hello"; end }
<shevy>
pretty anonymous
<jeaye>
Writing a ruby plugin for vim, I'm having a tough time requiring something relative to the script. The $0 path is the vim working directory and __FILE__ is some other directory relative to the working directory. Any other ideas to get the directory of the ruby script?
<shevy>
though I really fail to see the point
oo_ has joined #ruby
<shevy>
whether the name is Class.new or Cat.new, it still does or does not do things
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<canton7>
jeaye, __FILE__ should be the absolute path to the ruby file?
gerep__ has joined #ruby
Mdgd` has joined #ruby
zegerjan has joined #ruby
<jeaye>
canton7: Unfortunately, I think it's fucked because the ruby is being run inline from a viml file.
dorbronah has quit [Ping timeout: 272 seconds]
<jeaye>
That would explain why __FILE__ is 'eval'
<canton7>
ah, yeah fun
russt has joined #ruby
tjr9898 has joined #ruby
<canton7>
so the ruby script doesn't actually exist, as such
<canton7>
*ruby script file
<jeaye>
Is my only solution to refactor it into a ruby script?
<canton7>
I know nothing of vim plugins
<GPH|work>
shevy: Well, the primary reason is because I'll have a lot of these, and I'd prefer not to have full classes for each. But there's a distinct possibility (as many have alluded to) that I'm going about this in the wrong way.
<canton7>
but if vim is reading the file, then eval-ing it, then there's no way for ruby to know where it was read from
<shevy>
sounds more like OpenStruct or something like that really GPH|work
Suchit_ has quit [Quit: Computer has gone to sleep.]
topolinux has quit [Quit: Sto andando via]
<shevy>
require 'ostruct'; record = OpenStruct.new; record.name = "John Smith"
<shevy>
btw this annoys me
<jeaye>
canton7: Yeah, makes sense.
<shevy>
to require 'ostruct' but the class is called OpenStruct :\
<jeaye>
I'll either get that info from vim or move the script to its own dedicated file.
Bira has quit [Ping timeout: 246 seconds]
<GPH|work>
hmm
tagrudev has quit [Quit: Me = Awesome]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gerep_ has quit [Ping timeout: 245 seconds]
jrhorn424 is now known as zz_jrhorn424
jasooon has joined #ruby
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy>
my rule of thumb in ruby is simple
jasooon_ has joined #ruby
<havenwood>
don't beat your ruby with a stick wider than your thumb
<shevy>
lol
<centrx>
my rule of thumb is ruby is simple
<GPH|work>
ruby is far from simple
<GPH|work>
but ok
<shevy>
GPH|work see? they are messed up
<centrx>
remember this rule when it seems not simple
<shevy>
nono
zz_jrhorn424 is now known as jrhorn424
<shevy>
that is the wrong thing you do here
cocotton has quit [Remote host closed the connection]
<shevy>
GPH|work you have to keep ruby simple
<shevy>
GPH|work you have to keep your ruby code simple, too
b00stfr3ak has joined #ruby
<GPH|work>
shevy: Happy to, if I knew how.
cocotton has joined #ruby
<apeiros>
ruby allows you to write simple code
<GPH|work>
shevy: I come from Python/JavaScript/PHP.
<apeiros>
doesn't mean ruby itself is simple, though. or that all code written with it was.
<shevy>
well that is the thing - when you look at a problem, then a simple solution in ruby code will form. it usually is the terse variant
sevenseacat has quit [Remote host closed the connection]
nrsk has joined #ruby
<shevy>
output = File.new
<shevy>
output.close
<GPH|work>
The bottom line is, I have a huge, multi-layered hash (from JSON) whose elements I would like to access consistently across uses, but sometimes I need to clean up or modify the data before I return it.
<shevy>
the first reply gives a somewhat better solution as the last point (though not very elegant IMO)
russt has quit [Quit: russt]
<shevy>
also I wonder why YAML.load_file() is not used hmm
<shevy>
GPH|work ok so you have a data structure yes?
<shevy>
the simplest way is to try to simulate it with an object as close as possible to its natural statue
<GPH|work>
the Hash/JSON, you mean?
<shevy>
*state
<shevy>
yes
<GPH|work>
ok
jasooon_ has quit [Ping timeout: 245 seconds]
Xeago_ has quit [Ping timeout: 240 seconds]
<shevy>
so your ruby object must mimic both the original dataset as closely as possible, but also have the necessary methods to clean up / modify the data
<GPH|work>
so what do I do with the nested hashes? have a new object for each?
<shevy>
that sounds like overkill
jasooon has quit [Ping timeout: 244 seconds]
rkalfane has joined #ruby
<GPH|work>
that's what I was thinking
<shevy>
the question is what you need from that hash exactly
alem0lars has joined #ruby
troulouliou_dev has quit [Quit: Leaving]
dawkirst has joined #ruby
gerep__ has quit [Ping timeout: 272 seconds]
<shevy>
let me give you an example for the object I use to modify a dataset I use to compile stuff from source
<GPH|work>
jhass, apeiros: I would like to create an abtraction layer between the data itself and the script waiting that data
<GPH|work>
I know the structure of it
<GPH|work>
But it's large
<GPH|work>
so I'm trying to keep it simple, if possible
<jhass>
"I think you won't get any good suggestions here until you fully describe your datastructure and your desired API to (in a gist)"
yeticry has joined #ruby
ffranz has joined #ruby
cocotton has joined #ruby
yfeldblum has joined #ruby
<GPH|work>
I don't know what more I can say. This isn't a particular specialized question.
<GPH|work>
particularly
abdulsattar has quit [Ping timeout: 260 seconds]
oo_ has quit [Remote host closed the connection]
robustus|Off is now known as robustus
lmickh has joined #ruby
bascht has quit [Quit: WeeChat 0.4.2]
<jhass>
okay, then I have no the slightest idea what you want from us
oo_ has joined #ruby
dangerousdave has joined #ruby
Wolland has joined #ruby
fsapo has quit [Ping timeout: 260 seconds]
<shevy>
GPH|work ok but what will you return from your nested hash exactly? I mean, you need to decide what to return in your methods
<shevy>
is it a string... will it be a sub-hash ...
Akagi201 has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 272 seconds]
Akagi201 has joined #ruby
Bira has joined #ruby
<ducklobster>
I'm trying to extend TCPSocket to add a separate method (basically an extension of #write) but when I try running my app I get a superclass mismatch error (https://gist.github.com/anonymous/be61b72bf0ec96e5bebb)
<jhass>
ducklobster: look up the original superclass and specify it while reopening the class (or just subclass to make your own TCPSocket). Though I thought you could reopen without, mmh
<shevy>
ok the problem is that you need to return an object that will respond to this method call GPH|work
<shevy>
the example you gave there: person.name #=> { "first" => "John", "middle" => "Quincy", "last" => "Doe" }
<jhass>
GPH|work: that's a single example, we can't deduce a general design from it
<shevy>
person.name.to_s #=> "John Quincy Public"
<shevy>
is of course not a Hash, it just looks like one
<shevy>
the example is perfectly clear
momomomomo has quit [Quit: momomomomo]
hmsimha has quit [Ping timeout: 250 seconds]
<jhass>
GPH|work: for example in the presented case a Person class and a (Person)Name class are completely sensible
`Dath has joined #ruby
<shevy>
he wants to treat a hash data structure as nested method calls
<GPH|work>
shevy: All of the things I want to do are analogous to this example
<jhass>
they could inherit from Struct or OpenStruct and define their own initializer + methods
alem0lars has quit [Quit: AFK..]
zorak8 has joined #ruby
<GPH|work>
I think I'm also restricted to Ruby 1.9.3
shinobi_one has joined #ruby
paulfm has joined #ruby
<shevy>
well both structs should work fine there
nettoweb has joined #ruby
Bira has quit [Ping timeout: 240 seconds]
geggam has joined #ruby
nettoweb has quit [Max SendQ exceeded]
<toretore>
ducklobster: also, don't add methods to a class like TCPSocket
<toretore>
subclass it
<GPH|work>
shevy: I don't see OpenStruct in the 1.9.3 docs
<shevy>
google is much better at finding those docs hehehe
<ducklobster>
jhass: When you say specify it, what is the syntax for that? SuperClass::TCPSocket isn't correct right? That would be the module / namespace, not the superclass?
<ducklobster>
jhass: Would it be TCPSocket < SuperClass?
<jhass>
ducklobster: class TCPSocket < Socket (I didn't look it up)
<shevy>
however, I don't think either of them will create nested methods
<jhass>
yes
robustus is now known as robustus|Off
twohlix has joined #ruby
<ducklobster>
toretore: if the naming isn't generic what are the dangers of adding methods to a class like TCPSocket?
`Dath has quit [Ping timeout: 240 seconds]
icebourg has joined #ruby
<jhass>
ducklobster: imagine everyone would do it, you have conflicting libraries in no time
silkfox has quit [Ping timeout: 272 seconds]
<toretore>
ducklobster: it's frowned upon for a lot of reasons
snath has joined #ruby
<toretore>
most of all because it's completely unnecessary
claymore has joined #ruby
shinobi_one has quit [Ping timeout: 244 seconds]
<Hanmac>
ducklobster: the order is important ... you can just use class TCPSocket; end AFTER you required "socket" ... if you use it BEFORE you require it only then that superclass mismatch does happen
<toretore>
you're double dipping your code into the bowl that is the stdlib
alem0lars has joined #ruby
freezey has joined #ruby
zeroNones has quit [Ping timeout: 244 seconds]
iFire has left #ruby [#ruby]
mastr_bennett[x] has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<apeiros>
ducklobster: if you want to extend core classes, then use refinements
Advocation has joined #ruby
<apeiros>
way less dangerous
<ducklobster>
All valid points, I think I will just subclass TCPSocket for my purposes
<jhass>
apeiros: did you use refinements in production yet?
<pagioss>
hi guys i have a weird problem where sometimes i get some partial writes on my yml file: http://pastebin.com/HfgX6PDJ
<apeiros>
jhass: no. my new framework uses them. I'm curious to see how well it goes.
chiramiso has quit [Ping timeout: 272 seconds]
<ducklobster>
However, question: If I extend TCPSocket somewhere, then in another file require 'socket', will the scope of the other file have my extended version or the original?
<apeiros>
but will be a while until that hits production
<pagioss>
it writes 0' on the last line of yml
freezey has quit [Remote host closed the connection]
<jhass>
apeiros: hah, any issue tracker I can watch for it? :P
freezey has joined #ruby
cocotton has quit [Remote host closed the connection]
<apeiros>
jhass: I'll quite surely announce it here and on the ML if/when I release it for public scrutiny ;-)
<jhass>
great
<pagioss>
so the question is is this a correct write? File.open("/var/www/profiles/current_general_config.yml","w") {|f| YAML.dump(data,f) }
<apeiros>
might well take another year, though. I don't have as much time to work on it as I wish.
silkfox has joined #ruby
<apeiros>
and due to time constraints I'm forced to use rails for its intended purpose atm :-/ so even less time to work on it.
<shevy>
GPH|work I think those nested method calls are a problem
<Hanmac>
pagioss: hm not so much
jontmorehouse has joined #ruby
<Hanmac>
ducklobster: like i said ... you need to require BEFORE you extend it ... its like making a roof without having walls in your house ...
<shevy>
this is possible
<shevy>
futurama showed us
einarj has quit [Remote host closed the connection]
<GPH|work>
shevy: "in `to_s': undefined method `values'"
zeroNones has joined #ruby
<shevy>
GPH|work yeah I guess you can remove the to_s method for now
lukeholder has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
I think there is no simple way to discern between object.foo # We want string output here; and object.foo.bar # We also want string output here
<shevy>
from a hash parent structure
<Hanmac>
shevy: hm no in that case you need your own object type that does have a to_s and maybe a to_str method too
<pagioss>
Hanmac: the file locks whrn it is writing right?
<shevy>
k
phoo1234567 has joined #ruby
<shevy>
GPH|work probably define to_str and see whether that works
thagomizer has joined #ruby
<GPH|work>
shevy, Hanmac: Is to_str a special method?
<shevy>
yeah
msmith has quit [Remote host closed the connection]
crazydiamond has quit [Remote host closed the connection]
crazydiamond_ has quit [Remote host closed the connection]
robustus is now known as robustus|Off
Insanity133 has quit [Ping timeout: 272 seconds]
<shevy>
apeiros I still have not reached the point of understanding .pack and .unpack - all I know is that it uses a special code which I just can't seem to remember offhand
<apeiros>
shevy: .unpack("U*") returns the unicode codepoints for each character
bal has quit [Quit: bal]
<apeiros>
.pack("U*") does the reverse. creates a string from unicode codepoints.
jonmorehouse has joined #ruby
<apeiros>
>> "Aä".unpack("U*")
Phrogz_ has joined #ruby
* apeiros
pokes eval-in_
gsd has joined #ruby
mikepack has joined #ruby
stef_204 has joined #ruby
jontmorehouse has quit [Ping timeout: 260 seconds]
tomgavin has joined #ruby
<Hanmac>
apeiros: evalin still does not like unicode :(
pagioss is now known as pagios
Advocation has quit [Quit: Advocation]
<shevy>
hmm
Phrogz_ has quit [Ping timeout: 246 seconds]
<shevy>
so that is why it is U I guess
<shevy>
if that is the case then I can remember it
<shevy>
except for the old simpson horror episodes
jrhorn424 is now known as zz_jrhorn424
oso|away is now known as oso96_2000
zz_jrhorn424 is now known as jrhorn424
skammer4 has quit [Ping timeout: 272 seconds]
Takle has joined #ruby
<Hanmac>
shevy: doctorWho episodes with Moffat are similar ... like gasmask zombies, clockwork soilders, stone-statues, empty spacesuits, agents in suits, meat-puppets, etc ...
ctp has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ndrei has quit [Ping timeout: 246 seconds]
<pontiki>
this is because the audience likes these things. and it's not the horror bits that are what bring people back, it's how they deal with them and each other along the way.
fabrice31 has quit [Remote host closed the connection]
jrhorn424 is now known as zz_jrhorn424
Phrogz_ has quit [Ping timeout: 258 seconds]
froggy has joined #ruby
sinkensabe has quit [Remote host closed the connection]
froggy is now known as Guest63715
jottr_ has quit [Ping timeout: 260 seconds]
<Hanmac>
pontiki: as long as the things does not sparkle everything is okay ;P
havenwood has quit [Remote host closed the connection]
jasooon_ has quit [Ping timeout: 260 seconds]
jasooon has quit [Ping timeout: 260 seconds]
havenwood has joined #ruby
<pontiki>
even in twilight, the sparkly vamps are just a tiny annoyance to the droning self-indulgence and wallowing self-pity of bella
nhhagen has joined #ruby
<shevy>
I kinda got stuck in the 1980es horror genre
<pontiki>
wes craven stuff?
<Hanmac>
shevy yeah you mean an old time ago when vampires still know how to be real vampires ;P
fgo has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
<pontiki>
nah, the 70's dracula was *nothing* on Nosferatu
niftyn8 is now known as nifteen8
<shevy>
Hanmac hmm...
dorbronah has joined #ruby
nifteen8 is now known as n1ftyn8
yfeldblum has joined #ruby
arup_r has joined #ruby
<shevy>
pontiki I think wes craven was older
<shevy>
but actually I guess I was wrong
LekeFly has joined #ruby
therue has left #ruby [#ruby]
<shevy>
"The Fearless Vampire Killers" - 1967 now that was great horror hahaha
naftilos76 has quit [Remote host closed the connection]
<shevy>
that graph says that activesupport is the most important component of rails
<Hanmac>
when gem A does need a special version of gem B
chrishough has joined #ruby
freerobby1 has joined #ruby
Aaaal has quit [Quit: Aaaal]
patrick99e99 has joined #ruby
lkba has quit [Ping timeout: 260 seconds]
<Hanmac>
the graph does also shows that many gems can be cleaned up, and other gems should be updated if not already happen (currently i still dont look at the server if possible newer versions can be installed)
freerobby has quit [Read error: Connection reset by peer]
rippa has joined #ruby
Aaaal has joined #ruby
zarubin has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
jheg has quit [Quit: jheg]
jespada has quit [Quit: Leaving]
doev has quit [Ping timeout: 245 seconds]
Wolland_ has joined #ruby
mikecmpbll has quit [Ping timeout: 245 seconds]
jrhorn424 is now known as zz_jrhorn424
patrick99e99 has quit [Ping timeout: 244 seconds]
AFKGeek has quit [Quit: Leaving]
cocotton has quit [Remote host closed the connection]
havenwood has joined #ruby
mikecmpbll has joined #ruby
Wolland has quit [Ping timeout: 240 seconds]
abdulsattar has joined #ruby
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
mkaesz has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
Takle has joined #ruby
_lucid_ has quit [Ping timeout: 258 seconds]
jackjackdrpr has quit [Read error: Connection reset by peer]
cocotton has quit [Remote host closed the connection]
Kricir has joined #ruby
Doc_IX has quit [Quit: 0.4.3]
Insanity133 has quit [Ping timeout: 244 seconds]
havenwood has quit [Remote host closed the connection]
_lucid_ has joined #ruby
Suchit_ has joined #ruby
havenwood has joined #ruby
AtumT has quit [Ping timeout: 260 seconds]
Akagi201_ has quit []
<eam>
rvm is so enormously slow
thejamespinto has quit [Read error: Connection reset by peer]
Doc_X has joined #ruby
Takle has quit [Ping timeout: 260 seconds]
<Sou|cutter>
eam: you have 4 options. 1) say nothing 2) help fix it 3) use something else / don't use it, 4) bitch about it. 4 is the lamest of the options
shredding has quit [Quit: shredding]
qba73 has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
thejamespinto has joined #ruby
ghr has quit [Ping timeout: 260 seconds]
jthomp has joined #ruby
msmith has quit []
krisquigley has quit [Remote host closed the connection]
kenneth has quit [Quit: Bye.]
justinmburrous has joined #ruby
Phrogz_ has joined #ruby
seamon has quit [Quit: Zzzzzzz]
krisquigley has joined #ruby
kaffeebohne has left #ruby ["WeeChat 1.0"]
<pontiki>
but complaining is the national sport!
wallerdev has joined #ruby
msmith has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
<Sou|cutter>
yeah, I do it all the time :)
Adran has quit [Quit: Este é o fim.]
<pontiki>
and our only exercise is leaping to conclusions
bigkevmcd_ is now known as bigkevmcd
* Sou|cutter
cheers
cocotton has joined #ruby
jthomp has quit [Ping timeout: 245 seconds]
justinmburrous has quit [Ping timeout: 246 seconds]
Phrogz_ has quit [Ping timeout: 250 seconds]
elaptics is now known as elaptics`away
shredding has joined #ruby
kenneth has joined #ruby
zz_jrhorn424 is now known as jrhorn424
krisquigley has quit [Ping timeout: 244 seconds]
Adran has joined #ruby
tylersmith has joined #ruby
axl_ has joined #ruby
Xeago_ has joined #ruby
skmp__ has joined #ruby
AtumT has joined #ruby
skmp__ is now known as skmp
ptrrr has joined #ruby
skmp is now known as skmp_
Advocation has quit [Quit: Advocation]
seamon has joined #ruby
<eam>
Sou|cutter: just an observation buddy, don't get all bent out of shape
wjimenez5271 has joined #ruby
<eam>
admitting there is a problem is the first step toward recovery
thejamespinto has quit [Read error: Connection reset by peer]
carraroj has quit [Ping timeout: 246 seconds]
thejamespinto has joined #ruby
fgo has joined #ruby
Drakevr has quit [Changing host]
Drakevr has joined #ruby
Xeago has quit [Ping timeout: 250 seconds]
jottr_ has joined #ruby
fgo has quit [Read error: No route to host]
<eam>
what I did was move the rvm hooks into a file I can source if I'm going to do ruby dev in that shell
alem0lars has quit [Quit: AFK..]
<eam>
and now it's not so bad
fgo has joined #ruby
ta has joined #ruby
iamjarvo has joined #ruby
chrishough has joined #ruby
<eam>
nice side effect is that my system ruby scripts no longer break when I happen to cd into a development directory
chrishough has quit [Client Quit]
moted has joined #ruby
chrishough has joined #ruby
douglasssssss has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jay__ is now known as rubyonrailed
jottr_ has quit [Ping timeout: 260 seconds]
seamon has quit [Quit: Zzzzzzz]
fgo has quit [Ping timeout: 245 seconds]
kaspertidemann has joined #ruby
robustus is now known as robustus|Off
tylersmith has quit [Read error: Connection reset by peer]
bbloom has quit [Ping timeout: 246 seconds]
tylersmith has joined #ruby
artmann has quit [Remote host closed the connection]
yfeldblum has joined #ruby
ep3static has quit [Ping timeout: 240 seconds]
jasooon has joined #ruby
jasooon_ has joined #ruby
User458764 has quit [Ping timeout: 272 seconds]
jottr_ has joined #ruby
iamcyberbird has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Hanmac>
mousa did you move the gems the installation or something similar? because somehow the gems where installed for a newer verison of the mysql lib that you have installed ...
Macaveli has joined #ruby
<mousa>
I just installed the gem for the first time
nhhagen has joined #ruby
noop has joined #ruby
<Hanmac>
jhass: and did you try gemfile--colorscheme with my gemtree?
zz_jrhorn424 is now known as jrhorn424
<jhass>
no
claymore has quit [Quit: Leaving]
<mousa>
what are these gems anyway?
<Hanmac>
mousa ... you might try to install the mysql gem again ... maybe then it does build against the correct version or something
<Hanmac>
mousa: third-party-software-packages
awc737 has joined #ruby
Pupeno has joined #ruby
ghr has quit [Ping timeout: 258 seconds]
nhhagen_ has quit [Ping timeout: 260 seconds]
moted has quit []
comma8 has quit [Remote host closed the connection]
<Hanmac>
jhass: in the file you did show there where 4 groups currently each of them colored yellow ... with using a colorscheme you can let each group colorize in a different color
<mousa>
Hanmac, I uninstalled and installed again, but that didn't help. I used the following command to install: gem install mysql -- \ --with-mysql-config=/opt/lampp/bin/mysql_config
mikepack has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
<Hanmac>
why do you have an extra mysql in opt?
moritzs has quit [Ping timeout: 260 seconds]
hellangel7 has quit [Ping timeout: 258 seconds]
Tomme has joined #ruby
Kricir has joined #ruby
Jason has left #ruby [#ruby]
Pupeno_ has quit [Ping timeout: 245 seconds]
jobewan has joined #ruby
choke has joined #ruby
dcarmich has joined #ruby
Morkel_ has joined #ruby
TommeHo has quit [Ping timeout: 240 seconds]
nrsk has joined #ruby
Morkel has quit [Ping timeout: 272 seconds]
Morkel_ is now known as Morkel
agjacome has quit [Quit: leaving]
wallerdev has quit [Quit: wallerdev]
mwlang has quit [Quit: mwlang]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spastorino has joined #ruby
RichardLitt has quit [Quit: RichardLitt]
daxroc has quit [Ping timeout: 260 seconds]
tiagonobre_ has quit [Ping timeout: 260 seconds]
omosoj has joined #ruby
RichardLitt has joined #ruby
einarj has joined #ruby
Sharker has joined #ruby
rfv has quit [Ping timeout: 260 seconds]
bedouin has quit [Ping timeout: 260 seconds]
mattyohe has quit [Ping timeout: 260 seconds]
bove has quit [Ping timeout: 260 seconds]
arrubin has quit [Ping timeout: 260 seconds]
Sharker_ has quit [Remote host closed the connection]
dukedave has quit [Ping timeout: 260 seconds]
kapowaz has quit [Ping timeout: 260 seconds]
yo61 has quit [Ping timeout: 260 seconds]
wallerdev has joined #ruby
kate_r has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
Insanity133 has joined #ruby
mjc_ has quit [Ping timeout: 272 seconds]
pusewicz has quit [Ping timeout: 260 seconds]
Tranquility___ has quit [Ping timeout: 260 seconds]
bjeanes has quit [Ping timeout: 260 seconds]
ELLIOTTCABLE has quit [Ping timeout: 260 seconds]
tiagonobre_ has joined #ruby
daxroc has joined #ruby
momomomomo has joined #ruby
rfv has joined #ruby
Deejay__ has quit [Quit: Computer has gone to sleep.]
chrishough has joined #ruby
lewix has quit [Quit: Leaving...]
bedouin has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Hanmac>
shevy you could use DATA in a rubyfile or something like that ...
<apeiros>
shevy: whitequark and zenspider are the implementors of the most well known parsers
moritzs has joined #ruby
Insanity133 has quit [Ping timeout: 260 seconds]
<apeiros>
oh, and there's ripper, which is part of ruby (stdlib)
<shevy>
Hanmac yeah but I'd have to use __END__ right? so I am constrained to have to put it at the end of the file... I'd love to get more control over the ruby parser itself
seamon has quit [Quit: Zzzzzzz]
<shevy>
I like this quote:
Hobogrammer has quit [Quit: WeeChat 0.4.3]
<shevy>
"Although I've talked about Ruby parsers, I haven't really explained why anyone sane would want to write one."
<shevy>
hehehe
omosoj has quit [Quit: leaving]
<shevy>
that is a job description for Mr. Hanmac
<Hanmac>
hm i currently didnt had the need to write my own ruby parser ... hm ask me again in 5 years
blueOxigen has joined #ruby
work_op_ has joined #ruby
oso96_2000 is now known as oso|away
bluOxigen has quit [Ping timeout: 250 seconds]
<work_op_>
can the ruby ast be transformed at runtime? im learning ruby after using lisp/scheme for several years and cant find a definitive answer on this
mikepack has joined #ruby
oso|away is now known as oso96_2000
<apeiros>
work_op_: no
omosoj has joined #ruby
<apeiros>
work_op_: you can manipulate a couple of things in ruby at runtime. but you have no access to the AST
<work_op_>
oh
<apeiros>
work_op_: though, there are implementation specific ways to manipulate things outside the scope of the language
shinobi_one has joined #ruby
lolmaus has joined #ruby
<work_op_>
thats really disappointing :(
<apeiros>
e.g. MRI/KRI allows you to compile, decompile and execute the internal bytecode. rubinius is probably more flexible too.
paulfm has joined #ruby
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
seamon has joined #ruby
<apeiros>
within the language scope is: classes and modules are open, you can modify them at any time (in fact, their definition happens at runtime)
joshingly has quit []
<apeiros>
same for about all vars and constants
joshingly has joined #ruby
seamon has quit [Client Quit]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lkba has joined #ruby
jhass has quit [Read error: Connection reset by peer]
<work_op_>
doesnt really fit the needs i have then. anyways, thanks for the info
<omosoj>
if i want to install it with rvm, rvm install 2.1.0p0?
<omosoj>
or do i need a dash before the p?
<Tricon>
omosoj: Yeah. You can be specific about the patch level available. It depends on how they have it written.
<Tricon>
Try it the first way if that's how you see it.
iliketurtles has joined #ruby
<omosoj>
but it doesn't matter really?
dangerousdave has joined #ruby
<Tricon>
omosoj: It does. It needs to be how they have it specified. I've seen it both ways.
<apeiros>
omosoj: if you want 2.1, you should install 2.1.3
<apeiros>
there's IMO no good reason to install 2.1.0
larsam has quit [Ping timeout: 260 seconds]
<omosoj>
i developed a rails app using 2.1.0p0 and now i'm trying to deploy to digital ocean.
<omosoj>
i'm trying to reduce any possible problems by loading the same ruby version on the vps
cocotton has quit [Remote host closed the connection]
gccostabr has quit [Quit: ZZZzzz…]
<omosoj>
well, i did it with the dash and it worked, so i guess i'll do it this way
HelperW has joined #ruby
rkalfane has quit [Ping timeout: 272 seconds]
nonmadden has quit [Remote host closed the connection]
flughafen_ has quit [Ping timeout: 258 seconds]
shinobi_one has joined #ruby
rkalfane has joined #ruby
bMalum has quit [Quit: bMalum]
Darryl has quit [Quit: Connection closed for inactivity]
Czupa has joined #ruby
krisquigley has quit []
noop has quit [Ping timeout: 258 seconds]
Czupa has quit [Remote host closed the connection]
cocotton has joined #ruby
cocotton has quit [Remote host closed the connection]
duggiefr_ has joined #ruby
cocotton has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Pupeno has joined #ruby
Xiti has quit [Quit: Leaving]
shinobi_one has quit [Ping timeout: 244 seconds]
Pupeno_ has quit [Ping timeout: 240 seconds]
duggiefresh has quit [Ping timeout: 246 seconds]
jcromartie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Jackneill has quit [Remote host closed the connection]
melik has quit [Quit: Computer has gone to sleep.]
dkphenom has joined #ruby
krisquigley has joined #ruby
krisquigley has quit [Remote host closed the connection]
simplyaubs has joined #ruby
melik has joined #ruby
krisquigley has joined #ruby
DaniG2k has joined #ruby
cocotton has quit [Read error: Connection reset by peer]
cocotton has joined #ruby
seamon has quit [K-Lined]
arescorpio has joined #ruby
dkphenom has quit [Client Quit]
Phrogz_ has joined #ruby
wallerdev has joined #ruby
cocotton has quit [Remote host closed the connection]
Pupeno has quit [Remote host closed the connection]
WormDrink has quit [Ping timeout: 245 seconds]
krisquigley has quit [Ping timeout: 272 seconds]
spyderma_ has joined #ruby
spyderman4g63 has quit [Ping timeout: 245 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
gccostabr has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pskosinski has quit [Remote host closed the connection]
Phrogz_ has quit [Ping timeout: 245 seconds]
pskosinski has joined #ruby
daxroc has quit [Ping timeout: 260 seconds]
boombadaroomba has quit [Remote host closed the connection]
daxroc has joined #ruby
yfeldblum has joined #ruby
kirun has quit [Quit: Client exiting]
hiyosi has quit [Ping timeout: 246 seconds]
cocotton has joined #ruby
fgo has joined #ruby
cocotton has quit [Remote host closed the connection]
cocotton_ has joined #ruby
artmann has joined #ruby
xcyclist has joined #ruby
RichardLitt has joined #ruby
<xcyclist>
Please tell me, what is the implication of a def initialize method defined for a module? Do I then need to do ModuleName.new to use the module? Do I treat it like a class?
MaciejCzyzewski has joined #ruby
boombadaroomba has joined #ruby
moritzs has quit [Remote host closed the connection]
<xcyclist>
Does the initialize automatically get executed when I do Include ModuleName?
ghostmoth has quit [Quit: ghostmoth]
jcromartie has joined #ruby
fgo has quit [Ping timeout: 260 seconds]
<apeiros>
xcyclist: none of those
<apeiros>
xcyclist: just like any other instance method of the module, it is added to the class you include the module into
IrishGringo has joined #ruby
mferrier has joined #ruby
<xcyclist>
In the code I am deciphering, I see this guy defining an initialize for his module, but he only includes said module.
<apeiros>
and if that class' initialize calls super (or does not define one), it'll hit that module's initialize
<apeiros>
again, just like any other instance method in a module
<xcyclist>
Ok. That makes sense.
<xcyclist>
Thank you.
<apeiros>
yw
nhhagen has quit [Remote host closed the connection]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ghostmoth has joined #ruby
pgmcgee has quit [Ping timeout: 260 seconds]
pgmcgee has joined #ruby
dangerousdave has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
freezey has joined #ruby
danijoo has joined #ruby
jasooon has joined #ruby
jasooon_ has joined #ruby
Mso150_g has quit [Read error: Connection reset by peer]
alem0lars has quit [Quit: AFK..]
decoponio has quit [Quit: Leaving...]
baroquebobcat has joined #ruby
zoo-zed has joined #ruby
endash has quit [Quit: endash]
omosoj has quit [Ping timeout: 246 seconds]
dcarmich has joined #ruby
cocotton_ has quit [Remote host closed the connection]
Juanchito has quit [Quit: Connection closed for inactivity]
Macaveli has quit [Ping timeout: 258 seconds]
jasooon_ has quit [Ping timeout: 245 seconds]
jasooon has quit [Ping timeout: 272 seconds]
omosoj has joined #ruby
jonmorehouse has joined #ruby
sepp2k has quit [Quit: Konversation terminated!]
ghostmoth has quit [Quit: ghostmoth]
aclearman037 has quit [Ping timeout: 245 seconds]
Insanity133 has joined #ruby
alem0lars has joined #ruby
aclearman037 has joined #ruby
melik has quit [Quit: Computer has gone to sleep.]
b00stfr3ak has joined #ruby
W0rmDr1nk has quit [Read error: Connection reset by peer]
triple_b has joined #ruby
centrx has joined #ruby
cocotton has joined #ruby
DaniG2k has quit [Quit: leaving]
jonmorehouse has quit [Ping timeout: 260 seconds]
chiramiso has quit [Ping timeout: 260 seconds]
obscured has quit [Quit: leaving]
triple_b has quit [Read error: Connection reset by peer]
triple_b_ has joined #ruby
melik has joined #ruby
bluehavana has quit [Quit: Connection closed for inactivity]
manzo has joined #ruby
cocotton has quit [Remote host closed the connection]
<_sillymarkets>
Quick question: How do I call a method and hten return to the place I called that method and continue my script from that next line?
bigmac is now known as i8igmac
KC9YDN-2 has joined #ruby
<xcyclist>
So, a method I put in an Include d module isn't visible as an object method.
nettowe__ has joined #ruby
nettoweb has quit [Ping timeout: 250 seconds]
<xcyclist>
Is there a special thing I need to do to make it visible? Apparently my initialize is visible, so I don't get it.
<xcyclist>
Basically, I have a class, with an included module. I had a method in the class, and moved said method to the module. Now I don't see the method from the object.
thejamespinto has quit [Read error: Connection reset by peer]
msmith has quit [Remote host closed the connection]
abdulsattar has quit [Ping timeout: 272 seconds]
douglasssssss has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nettoweb_ has quit [Ping timeout: 260 seconds]
<xcyclist>
Are perhaps module methods only inherited as class methods and not into the object?
jcromartie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shosti has joined #ruby
thejamespinto has joined #ruby
<xcyclist>
If so, how do I mix them into the object?
manzo has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
stef_204 has joined #ruby
KC9YDN has quit [Ping timeout: 245 seconds]
kaspertidemann has quit []
<_sillymarkets>
I have a method which calls another method. After that 2nd method is completed, I want to return to the first method and continue my script from that line. How can I do that?
jheg has quit [Quit: jheg]
duncannz has joined #ruby
stef_204 is now known as stef204
KC9YDN-2 has quit [Client Quit]
stef204 is now known as stef_204
xcv has quit [Remote host closed the connection]
duncannz has quit [Remote host closed the connection]
klaut has quit [Remote host closed the connection]
xcv has joined #ruby
<c107>
Does anyone use Arch and RubyGame?
thisislulu has joined #ruby
mpistone has quit []
JoshGlzBrk has joined #ruby
duncannz has joined #ruby
duggiefr_ has quit [Remote host closed the connection]
duggiefresh has joined #ruby
tonybird has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ht__th has quit [Remote host closed the connection]
<eam>
Chronic makes no sense to me whatsoever
<eam>
Chronic.parse("oct 31st", :guess => false) returns a Chronic::Span?!
<eam>
:guess appears to mean "return a span or a time"
duggiefresh has quit [Ping timeout: 250 seconds]
cherwin has quit [Ping timeout: 245 seconds]
shtirlic has quit [Ping timeout: 260 seconds]
zorak8 has quit [Ping timeout: 245 seconds]
<eam>
of apparently arbitrary duration
shtirlic has joined #ruby
dawkirst has quit [Remote host closed the connection]
iamjarvo has joined #ruby
hiyosi has joined #ruby
iamjarvo has quit [Client Quit]
jerius has joined #ruby
dawkirst_ has joined #ruby
sinkensabe has quit [Remote host closed the connection]
kaspertidemann has joined #ruby
<zenspider_>
xcyclist: you keep asking related questions. You need to back up and learn some ruby.
rezzack has quit [Quit: Leaving.]
hiyosi has quit [Ping timeout: 244 seconds]
<centrx>
Who dares ask me a question
krisquigley has joined #ruby
<fun>
centrx: how I can install spree on ubuntu?
<fun>
I got stuck on some step
<fun>
:D
<fun>
when reinstalling it
<fun>
i googled it yet to see what to do
ItSANgo has joined #ruby
<centrx>
If you were using Windows 95 it would be easy, I could tell you
<boombadaroomba>
Anyone have any experience with spree. I'm trying to call product.price but it isnt working
oleo is now known as Guest4240
oleo__ has joined #ruby
nhhagen has joined #ruby
<boombadaroomba>
fun: stop spamming all the channels please
<centrx>
I hear there is a channel dedicated to spree
bove has quit [Ping timeout: 260 seconds]
<boombadaroomba>
centrx: yeah, they threatened to ban him :P
<fun>
boombadaroomba: u talking about yourself
<fun>
:)
<boombadaroomba>
thats why he is spamming here
rezzack has joined #ruby
<fun>
as u asked same question there
<fun>
;)
<boombadaroomba>
this is ruby specific
<centrx>
looks like we have an e-commerce showdown here
<fun>
nope its cool
bove has joined #ruby
<fun>
centrx: since u asked someone to ask u question I did
<centrx>
You have stumped me. You win this round, Player #1
<fun>
hehe
<zenspider_>
#ruby ... like #ruby-lang but with shitty S:N... :/
shinobi_one has joined #ruby
<centrx>
#ruby-lang: super-wise masters and total noobs who found it on the website
ddv has quit [Ping timeout: 260 seconds]
<eam>
zenspider_: think of it like the planet Jupiter
comma8 has joined #ruby
endash has joined #ruby
krisquigley has quit [Ping timeout: 250 seconds]
<centrx>
at least it's not like that horrible channel about trains
<zenspider_>
centrx: pretty much. and those newbs get much better advice as a result of better S:N
sailias has quit [Quit: Leaving.]
iamjarvo has joined #ruby
klmlfl has quit [Remote host closed the connection]
Guest4240 has quit [Ping timeout: 272 seconds]
ddv has joined #ruby
<eam>
centrx: which one?
<fun>
what is S:N?
codeFiend has joined #ruby
<zenspider_>
S:N = signal to noise ratio
<centrx>
It was a standing entertainment with the less dignified members of the mess to invite attention to Ruby as he stood moping under this hideous housing.
Sawbones has quit []
Hobogrammer has quit [Ping timeout: 258 seconds]
<fun>
zenspider_: well many people simply gave up on IRC
<fun>
:)
<zenspider_>
reads like markov chain
<fun>
hence less noise of any kind
<zenspider_>
luckily you're helping fix that
nhhagen has quit [Ping timeout: 272 seconds]
<centrx>
The level of complete vandalism and trolling is very low at least
<fun>
yes
<centrx>
All across the Great Land of Freenode
<fun>
its cause we havent got many trolls
<fun>
trolls shortages
* centrx
checks ##php
<eam>
well one way to combat it is to talk about ruby, anyone want to clue me into how I'm supposed to apply a Chronic::Span to subtract from a Time?
lewix has joined #ruby
shinobi_one has quit [Ping timeout: 244 seconds]
<centrx>
Chronic pretty useful, for simple things at least
bw_ has joined #ruby
ryanleesipes has left #ruby ["Leaving"]
<fun>
centrx: is is true most php people love ruby?
<lewix>
hmm
<fun>
I was one guy rant
<eam>
all I want is times, intervals, and time + interval
<fun>
saw
<centrx>
fun, PHP is an abomination and a scourge on the face of the earth
<fun>
anyway its too funny to even type
<centrx>
fun, PHP is everything could be, and ever was, and ever more
<centrx>
I mean Ruby
<fun>
LOL
<fun>
i can barely type ty!
niklasb_ has quit [Ping timeout: 272 seconds]
<zenspider_>
eam: I haven't looked at chronic in years... but the code was SOO messy it seemed not worth it. I hope it's improved over time.
<eam>
I can't make sense of it
workmad3 has joined #ruby
<fun>
centrx: any easy way to learn ruby and rails like some book for humans?
<zenspider_>
relatively untested too iirc
justinmburrous has joined #ruby
<fun>
my plan is to read it tpnight
<fun>
then I know it all
<fun>
*tonight
kaspertidemann has quit []
<zenspider_>
looks like we have stephen wolfram here
<zenspider_>
eam: really? that seems... short sighted. :/
<centrx>
eam, span seems to have + and - for it, maybe they just forgot to implement the reverse coerce?
<zenspider_>
could be it's just untested. :P
freerobby has joined #ruby
<eam>
+ 1 appears to shift the Span forward one second
fun has quit [Quit: Page closed]
<eam>
eg "now until 24h from now" => "now + 1s until 24h 1s from now"
m8 has quit [Quit: Sto andando via]
<eam>
conceptually I think a span is a period between two dates and not an interval datatype at all
<eam>
this is not at all what I want
x1337807x has joined #ruby
<eam>
is there a better alternative? I think activesupport has stuff ...
justinmburrous has quit [Ping timeout: 260 seconds]
Phrogz_ has joined #ruby
cherwin has joined #ruby
braincrash has quit [Ping timeout: 245 seconds]
chiramiso has quit [Ping timeout: 272 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_1_Ezenwa has quit [Remote host closed the connection]
<zenspider_>
huh. I was just trying out `Time.now .. (Time.now+86400)` and you can't use include? on it because it doesn't define each. it DOES define succ tho. how odd
codeFiend has quit [Ping timeout: 245 seconds]
<eam>
what I also want is a plain language parser so "one day" works
braincra- has joined #ruby
<zenspider_>
TypeError: can't iterate from Time
<eam>
trying to turn Spans into seconds now
SCHAAP137 has joined #ruby
codeFiend has joined #ruby
<zenspider_>
I assume you want a length of seconds and then to be able to apply an offset based on your example above...
<eam>
what I really want is (in postgres) select now() + '1 day'::interval;
<twohlix>
you're assigning in your loops you know?
thejamespinto has quit [Read error: Connection reset by peer]
<twohlix>
you're doing an = rather than an ==
jobewan has quit [Quit: Leaving]
<zenspider>
you know that code isn't even syntactically correct, right?
freerobby has quit [Quit: Leaving.]
thejamespinto has joined #ruby
<centrx>
yeah for one thing == is different from =
* centrx
chimes in
lewix has quit [Remote host closed the connection]
<twohlix>
also there is no end on the second loop, could just be a copy paste issue there.
<_sillymarkets>
I'm sure its horrendous, this is like the 2nd thing i've written
Insanity133 has quit [Ping timeout: 272 seconds]
<zenspider>
right. never ending the first loop. second loop never has an end :)
jottr_ has quit [Ping timeout: 272 seconds]
<_sillymarkets>
first loop ends, and the second one i didnt copy-paste the end, because the condition was failing since i didnt even see the puts
<twohlix>
but yea, because you're doing = rather than == in lines 1 and 10, you'll be stuck in the first loop
<zenspider>
first loop CAN'T end
<centrx>
yeah GIL actually prevents Ruby from travelling into the future to determine whether infinite loop actually reaches and asymptotic value
<zenspider>
unless trial_graphs raises, I guess
<zenspider>
stupid GIL
<centrx>
lol
mousa has left #ruby ["Leaving"]
<centrx>
*GIL
msmith has joined #ruby
<_sillymarkets>
okay, let me try double equals for values, and first loop non-ending. Thanks guys. I'll read up on the assignment operator differences =, ==
nettowe__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<twohlix>
_sillymarkets: are you trying to check if @numDays is 5 and countdown_numDays is 1?
<_sillymarkets>
no, i want it to run through a block of code when numdays is 5 and countodnw is 1, then add to countdown (making it 2, and run through another block of code while num days = 5, and countdown is 2
jasooon_ has quit [Ping timeout: 272 seconds]
jasooon has quit [Ping timeout: 272 seconds]
<zenspider>
so why doesn't your code say that?
<_sillymarkets>
still learning? thats what I tried to get it to say
geggam has quit [Remote host closed the connection]
<zenspider>
ruby is such that you can pretty much translate thoughts to code pretty directly.
<centrx>
pseudocode = **ruby
tessi_zz is now known as tessi
Spami has joined #ruby
Mohd_ has joined #ruby
coderdad has quit [Remote host closed the connection]
niklasb_ has quit [Ping timeout: 260 seconds]
sepp2k has quit [Read error: Connection reset by peer]
computerex has quit [Ping timeout: 272 seconds]
blackmesa has joined #ruby
<eam>
not if you're thinking about performance
<eam>
*rimshot*
<centrx>
Alert: Premature Optimization detected
<rubie>
what would be the easiest way to evaluate a string like this "++d+===+c++==a" and tell if the letters are surronded by + signs?
<zenspider>
depends on how efficient your thoughts are
<centrx>
rubie, more specific?
<zenspider>
sure sounds like homework...
hellangel7 has quit [Remote host closed the connection]
<centrx>
rubie, you could capture all letters surrounded by +'s
<centrx>
rubie, but yes, do your homework, quit slacking off! We expect A's around here
<rubie>
so that string would be false because 'a' does not have a + on both sides
<rubie>
hah no its not homework
<rubie>
but is a problem im working on, no idea how to approach it
<centrx>
/\w/ not preceded by a + ?
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<twohlix>
rubie: do you want something that gives you if all letters are surrounded by +?
<zenspider>
either look for what you do want, or look for what you don't want
<rubie>
yes
<zenspider>
latter might be easier.
<centrx>
/[^+]\w[^+]/
Fabio has joined #ruby
<rubie>
i want it to return true of all letters have a + on both sides
<centrx>
*,/,*
<rubie>
a +94939+a+a would be false
skolman_ has quit [Remote host closed the connection]
<rubie>
but +a3904904+49a+ would be true
<apeiros>
centrx: "a+" and "+a"
<eam>
centrx: not always premature. see: anything realtime
<eam>
games etc
<rubie>
ahhh
skolman has joined #ruby
<rubie>
.scan ?
<zenspider>
centrx: that finds ONE
x1337807x has joined #ruby
<zenspider>
he needs to ensure ALL
<zenspider>
fuck. nevermind. I'll go get a coffee.
<apeiros>
meh. IMO the easiest is to do a negative test. to test whether there's a letter which does not have + on both sides.
<rubie>
how would you do that
b00stfr3ak has joined #ruby
<apeiros>
I'd do it with a regex
hiyosi has quit [Ping timeout: 240 seconds]
jottr_ has joined #ruby
<apeiros>
there are 4 cases: letter is at begin of string, letter is at end of string, character in front of letter is not a +, character after letter is not a +
fabrice31 has joined #ruby
Avahey has joined #ruby
work_op has quit [Read error: Connection reset by peer]
TorpedoSkyline has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eequ has quit [Quit: Leaving]
<rubie>
its a question from codebyte.com
shinobi_one has joined #ruby
fabrice31 has quit [Ping timeout: 272 seconds]
TorpedoSkyline has joined #ruby
threesixes has quit [Remote host closed the connection]
fgo has joined #ruby
niklasb_ has quit [Ping timeout: 250 seconds]
Takle has quit [Remote host closed the connection]
andrewlio has quit [Quit: Leaving.]
iamjarvo has joined #ruby
iamjarvo has quit [Max SendQ exceeded]
iliketurtles has joined #ruby
end_guy has quit [Remote host closed the connection]
iamjarvo has joined #ruby
i8igmac has quit [Ping timeout: 245 seconds]
bmurt has joined #ruby
narcan has joined #ruby
shinobi_one has quit [Ping timeout: 244 seconds]
<pontiki>
i get redirected to codebyteconsulting.com
C0deMaver1ck has quit [Ping timeout: 245 seconds]
mikecmpbll has quit [Quit: i've nodded off.]
chiramiso has joined #ruby
xxi is now known as ixx
baroquebobcat has quit [Quit: baroquebobcat]
<apeiros>
ugh, rvm is indeed quite slow. wrapper adds ~0.5s.
<apeiros>
and there I was almost happy about my bash completion in ruby
C0deMaver1ck_ has joined #ruby
<apeiros>
I guess it'll be the other approach then - generate a bash script from ruby. :(
freerobby has joined #ruby
end_guy has joined #ruby
<Sou|cutter>
or use rbenv?
niklasb_ has joined #ruby
MaciejCzyzewski has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<centrx>
fun, GET /default.ida?NNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNN%u9090%u6858%ucbd3%u7801%u9090%u6858%ucbd3%u7801%u9090%u6858%ucbd3%u7801%u9090%u9090%u8190%u00c3%u0003%u8b00%u531b%u53ff%u0078%u0000%u00=aHTTP/1.0
jasooon_ has quit [Ping timeout: 244 seconds]
<wasamasa>
I think github changed their color for syntax-highlighted strings
<zenspider>
doesn't matter in the slightest if the method is copied or a reference
justinmburrous has joined #ruby
danijoo has joined #ruby
eat_multi has joined #ruby
<EasyCo>
I thought that when the method got redefined the original method sort of ceased to exist
phoo1234567 has quit [Quit: Leaving]
<EasyCo>
Essentially, I thought the alias would point to the newly redefined method
<zenspider>
that's not how references work
<zenspider>
references are just pointers
<zenspider>
pointers to objects
chamblin has joined #ruby
<zenspider>
you replace a method in a method dictionary, you're just making a new reference to a new object
<zenspider>
the old references still point to the old objects
<EasyCo>
Gotcha
jonmorehouse has joined #ruby
<EasyCo>
Good to know
<zenspider>
even if the method was copied, it'd still be a reference to the copy
mwlang has joined #ruby
MACscr has left #ruby [#ruby]
<mwlang>
I’m on Ruby 1.8.7 and trying to figure out where a specific method is coming from (which gem in an non-bundled environment)
coderdad has quit [Remote host closed the connection]
<jhass>
mwlang: use pry and a newer ruby
cpruitt has quit [Quit: cpruitt]
<mwlang>
basically I’m look for where String#chars is defined as some gem is replacing ActiveSupport’s multibyte implementation of #chars
<mwlang>
jhass: not an option. I’m bringing up a Rails 1.2.6 app on a new server.
<EasyCo>
Yah I got that now, I suppose my original thought was that when you defined a method that already existed that it did it in place and any past references would now get the redefined method. Anyways, thanks for the clarification.
<jhass>
cool, wanna share ip? sounds like a free box
<mwlang>
the old server is ruby 1.8.6 on Windows. :-S
emmesswhy has joined #ruby
apeiros has quit [Remote host closed the connection]
pskosinski has quit [Remote host closed the connection]
<mwlang>
jhass: feel free to hack away at 127.0.0.1 :-)
<jhass>
I stick to :.1
<jhass>
*::1
apeiros has joined #ruby
<zenspider>
mwlang: still possible
Ankhers has joined #ruby
boombadaroomba has quit [Remote host closed the connection]
<zenspider>
class String; def self.method_added(m); raise "no" if m.to_s == "chars"; end; end
<mwlang>
anyway, I’m hoping for a way to query the Objectspace similar to the newer “”.method(:chars).source_location
<mwlang>
zenspider: ah! now we’re on to something. Let me give that a whirl
blackmesa has quit [Quit: WeeChat 1.0]
Deele has quit [Ping timeout: 260 seconds]
krisquigley has joined #ruby
bigmac_ has joined #ruby
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
bigmac_ is now known as i8igmac
spyderman4g63 has joined #ruby
moritzs has joined #ruby
entrenador has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
aspires has quit []
<mwlang>
hmmm….nothing triggered it…not even ActiveSupport’s multibyte support being loaded.
aspires has joined #ruby
<zenspider>
mwlang: are you sure it isn't the standard method then?
dx7 has joined #ruby
<mwlang>
zenspider: I’m double-checking.
jottr_ has joined #ruby
krisquigley has quit [Ping timeout: 272 seconds]
hiyosi has joined #ruby
<zenspider>
ya know... chars _might_ not be defined in 1.8.6, only 1.8.7... not sure
ffranz has quit [Quit: Leaving]
<jhass>
186>> "hey"
<mwlang>
I know its not in 1.8.6…I get NoMethodError if I try “”.chars.inspect before ActiveRecord::CoreExtension::String::Unicode is loaded
<zenspider>
so maybe what you're NOT hitting is AS checking to see if it isn't defined and putting in their own
KC9YDN has joined #ruby
mocfive has quit []
<mwlang>
but I always get Enumerable::Enumerator for the same in 1.8.7, even on a vanilla irb console
<zenspider>
so let's back up... what's the actual problem you're hunting down?
<mwlang>
rails 1.2.6 is bombing on a bunch of ActiveSupport text_helper methods (truncate for example).
stunder has quit [Remote host closed the connection]
<mwlang>
and these methods all cast strings to chars (as in text.chars.length instead of text.length) before operating on the strings.
<mwlang>
but the error I get is #length is not a method for Enumerable::Enumerator
jonmorehouse has quit [Ping timeout: 272 seconds]
_1_eapp123 has quit [Ping timeout: 244 seconds]
<zenspider>
this is on ruby 1.8.7, not on ruby 1.8.6... right?
<mwlang>
zenspider: yes, 1.8.7
<zenspider>
so the problem is the existance of String#chars on 1.8.7
<mwlang>
yup. as in where’s it coming from?
jottr_ has quit [Ping timeout: 240 seconds]
<zenspider>
it is coming from ruby
<zenspider>
that part is fine
<zenspider>
ok... in ruby 2 (and presumable 1.9), "blah".chars returns an array
<zenspider>
and in 1.8.7, it returns an enumerable
<mwlang>
ah, so maybe the real problem is ActiveSupport isn’t actually loading
<zenspider>
let's fuck with this...
marr has quit [Ping timeout: 258 seconds]
entrenador has joined #ruby
<zenspider>
no, it is... it's doing its job
<zenspider>
class String; alias :chars :real_chars; def chars; real_chars.to_a; end; end
kaspergrubbe has joined #ruby
<zenspider>
the other possibility is to undef chars and see what AS does to patch up their end
<mwlang>
NameError: undefined method `real_chars' for class `String'
<zenspider>
oh, did I do it backwards? :D
<zenspider>
>> class String; alias :real_chars :chars; def chars; real_chars.to_a; end; end