t47921 has quit [Remote host closed the connection]
t5875 has joined #ruby-lang
<burgestrand>
seoaqua: are you trying to require it for development, testing, or just like a user? If like a user, have you installed the gem with rubygems? And finally, which version of ruby are you using (ruby -e 'p RUBY_VERSION')?
|Vargas| has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
<seoaqua>
ruby 1.9.3 and i installed the gem with 'gem'
<drbrain>
seoaqua: then root's umask may be different
<seoaqua>
drbrain, not following u
<seoaqua>
drbrain, but i will note this
<drbrain>
seoaqua: if the file was 644, but root's umask is 022 then, when written, the result will be a 600 file
<burgestrand>
drbrain: huh, cool, so the gem author essentially decides the permissions of the files in the gem when installed on somebody else’s system?
<drbrain>
burgestrand: yes
<burgestrand>
or, well, except for the umask
<drbrain>
burgestrand: yes
<burgestrand>
drbrain: interesting!
<drbrain>
Breaking Bad time!
<seoaqua>
drbrain, noted
cha1tanya has joined #ruby-lang
yats has joined #ruby-lang
t5875 has quit [Remote host closed the connection]
akira989 has quit [Remote host closed the connection]
akira989 has joined #ruby-lang
tooky has joined #ruby-lang
igotnolegs has quit [Quit: Computer has gone to sleep.]
zmack has joined #ruby-lang
eydaimon has quit [Ping timeout: 260 seconds]
arooni-mobile has quit [Ping timeout: 272 seconds]
mytrile has joined #ruby-lang
voker57__ has joined #ruby-lang
zmack_ has joined #ruby-lang
voker57_ has quit [Ping timeout: 240 seconds]
[1]dtribble has joined #ruby-lang
zmack has quit [Ping timeout: 265 seconds]
dtribble has quit [Ping timeout: 268 seconds]
s1n4 has quit [Quit: Lost terminal]
dc5ala has joined #ruby-lang
tooky has quit [Remote host closed the connection]
chendo_ has joined #ruby-lang
brdude has joined #ruby-lang
Criztian has joined #ruby-lang
iamlacroix has joined #ruby-lang
tooky has joined #ruby-lang
chendo_ has quit [Ping timeout: 245 seconds]
workmad3 has joined #ruby-lang
t91917 has quit [Remote host closed the connection]
t49908 has joined #ruby-lang
s0ra_h is now known as sora_h
chendo_ has joined #ruby-lang
dhruvasagar has joined #ruby-lang
shyouhei has quit [Ping timeout: 272 seconds]
shyouhei has joined #ruby-lang
shyouhei has quit [Client Quit]
shyouhei has joined #ruby-lang
iamlacroix has quit [Remote host closed the connection]
robbyoconnor has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 244 seconds]
brdude has quit [Ping timeout: 240 seconds]
PantsMeh has quit [Read error: Connection reset by peer]
krz has quit [Quit: krz]
krz has joined #ruby-lang
banister`sleep has joined #ruby-lang
enroxorz-work has quit [Read error: Connection reset by peer]
sora_h is now known as s0ra_h
Criztian has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 268 seconds]
seoaqua has quit [Ping timeout: 265 seconds]
dhruvasagar has joined #ruby-lang
t49908 has quit [Remote host closed the connection]
t11436 has joined #ruby-lang
ConstantineXVI has quit [Ping timeout: 245 seconds]
krz has quit [Quit: krz]
runeb has joined #ruby-lang
wallerdev has joined #ruby-lang
banister`sleep has quit [Read error: Connection reset by peer]
thone_ has quit [Ping timeout: 244 seconds]
banister`sleep has joined #ruby-lang
thone has joined #ruby-lang
tooky has quit [Remote host closed the connection]
futurechimp has joined #ruby-lang
burgestrand has quit [Quit: Leaving.]
wcook has joined #ruby-lang
srbartle_ has quit [Remote host closed the connection]
<yorickpeterse>
HELLO PEOPLE
<rue>
Hi there
wcook has quit [Client Quit]
seoaqua has joined #ruby-lang
Jay_Levitt has joined #ruby-lang
hakunin has quit [Read error: Connection reset by peer]
hakunin has joined #ruby-lang
Nisstyre has quit [Read error: Connection reset by peer]
Nisstyre has joined #ruby-lang
runeb- has joined #ruby-lang
runeb has quit [Read error: Connection reset by peer]
runeb- is now known as runeb
charliesome has joined #ruby-lang
s0ra_h is now known as sora_h
tbuehlmann has joined #ruby-lang
chendo_ has quit [Ping timeout: 244 seconds]
d3vic3 has quit [Ping timeout: 246 seconds]
cdt has joined #ruby-lang
s1n4 has joined #ruby-lang
fgomez has joined #ruby-lang
d3vic3 has joined #ruby-lang
fgomez has quit [Client Quit]
fgomez has joined #ruby-lang
chendo_ has joined #ruby-lang
voker57 has joined #ruby-lang
voker57__ has quit [Ping timeout: 265 seconds]
seoaqua has quit [Quit: 离开]
fgomez has quit [Read error: Connection reset by peer]
fgomez has joined #ruby-lang
fgomez has quit [Read error: Connection reset by peer]
[1]dtribble has quit [Ping timeout: 248 seconds]
stayarrr has joined #ruby-lang
ttilley has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
Criztian has joined #ruby-lang
ttilley has quit [Changing host]
ttilley has joined #ruby-lang
GeekOnCoffee has quit [Read error: Connection reset by peer]
|Vargas| has quit [Quit: ...]
ConstantineXVI has joined #ruby-lang
gnufied has joined #ruby-lang
charliesome has quit [Ping timeout: 265 seconds]
wallerdev has quit [Quit: wallerdev]
banister`sleep has quit [Read error: Connection reset by peer]
cantonic has joined #ruby-lang
runeb has quit [Read error: Connection reset by peer]
banister`sleep has joined #ruby-lang
runeb has joined #ruby-lang
fgomez has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
Wardrop has quit [Quit: Wardrop]
fgomez has quit [Read error: Connection reset by peer]
aashish has joined #ruby-lang
fgomez has joined #ruby-lang
workmad3 has joined #ruby-lang
postmodern has quit [Quit: Leaving]
Criztian has quit [Remote host closed the connection]
Hakon has joined #ruby-lang
rolfb has joined #ruby-lang
t11436 has quit [Remote host closed the connection]
t18291 has joined #ruby-lang
jbsan has quit [Quit: jbsan]
jbsan has joined #ruby-lang
d3vic3 has quit [Ping timeout: 252 seconds]
fgomez has quit [Read error: Connection reset by peer]
s1n4 has quit [Quit: Lost terminal]
anildigital has quit [Changing host]
anildigital has joined #ruby-lang
toretore has joined #ruby-lang
dr_bob has quit []
d3vic3 has joined #ruby-lang
bluemonk_ has quit [Ping timeout: 252 seconds]
bluemonk has joined #ruby-lang
charliesome has joined #ruby-lang
eydaimon has joined #ruby-lang
eydaimon has joined #ruby-lang
eydaimon has quit [Changing host]
cantonic_ has joined #ruby-lang
cantonic has quit [Ping timeout: 248 seconds]
cantonic_ is now known as cantonic
AnarchoTroll has joined #ruby-lang
Jay_Levitt has quit [Quit: Leaving...]
mytrile has quit [Remote host closed the connection]
apeiros_ has joined #ruby-lang
jbsan has quit [Quit: jbsan]
^sandbags^ has joined #ruby-lang
^sandbags^ has joined #ruby-lang
^sandbags^ has quit [Changing host]
akira989 has quit [Read error: Connection reset by peer]
akira989 has joined #ruby-lang
esad has joined #ruby-lang
cyndis_ has joined #ruby-lang
sandbags has quit [Ping timeout: 240 seconds]
cyndis has quit [Ping timeout: 240 seconds]
Nisstyre has quit [Ping timeout: 246 seconds]
Nisstyre has joined #ruby-lang
workmad3 has quit [Ping timeout: 252 seconds]
esad has quit [Quit: Computer has gone to sleep.]
AnarchoTroll has quit [Quit: Leaving]
schroedinbug has quit [Read error: Operation timed out]
dhruvasagar has quit [Ping timeout: 246 seconds]
t18291 has quit [Remote host closed the connection]
t11747 has joined #ruby-lang
dhruvasagar has joined #ruby-lang
gnufied1 has joined #ruby-lang
gnufied has quit [Ping timeout: 244 seconds]
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
bytephilia has joined #ruby-lang
voker57 has quit [Remote host closed the connection]
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
schroedinbug has joined #ruby-lang
burgestrand has joined #ruby-lang
zz_chrismcg is now known as chrismcg
t11747 has quit [Remote host closed the connection]
t15009 has joined #ruby-lang
itsmeduncan has joined #ruby-lang
shaman42 has quit [Ping timeout: 265 seconds]
shaman42 has joined #ruby-lang
srbartlett has joined #ruby-lang
adambeynon has joined #ruby-lang
dous has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
burgestrand has quit [Quit: Leaving.]
eydaimon has quit [Ping timeout: 265 seconds]
d3vic3 has quit [Ping timeout: 246 seconds]
d3vic3 has joined #ruby-lang
dr_bob has joined #ruby-lang
<andrewvos>
rue: Pretty fucked up that thing about storming the Ecuadorian embassy right?
<injekt>
heh
esad has joined #ruby-lang
jbsan has joined #ruby-lang
maek has joined #ruby-lang
sora_h is now known as s0ra_h
s1n4 has joined #ruby-lang
<maek>
can anyone explain to me why this nested hash of server['config']['servers'] is 1 'layer' deeper then I logically think it should be? https://gist.github.com/3369301
s0ra_h is now known as sora_h
t15009 has quit [Remote host closed the connection]
t59369 has joined #ruby-lang
<injekt>
because 'servers' is an array
<injekt>
not a hash
<injekt>
it's an array of hashes
<maek>
yeah
agile has quit [Quit: Ex-Chat]
sora_h is now known as s0ra_h
<maek>
oh
<maek>
OH
<maek>
ty
<injekt>
OH
<injekt>
np
<maek>
no key, value for an array
s0ra_h is now known as sora_h
<injekt>
;)
itsmeduncan has quit [Quit: itsmeduncan]
Axsuul has quit [Ping timeout: 256 seconds]
grin_ has joined #ruby-lang
Axsuul has joined #ruby-lang
agile has joined #ruby-lang
workmad3 has joined #ruby-lang
cha1tanya has quit [Quit: cha1tanya]
mwjcomputing has joined #ruby-lang
gregmoreno has quit [Read error: Connection reset by peer]
gregmoreno has joined #ruby-lang
^sandbags^ has quit [Ping timeout: 246 seconds]
jxie has quit [Quit: leaving]
t59369 has quit [Remote host closed the connection]
t47671 has joined #ruby-lang
erichmenge has joined #ruby-lang
maek has left #ruby-lang [#ruby-lang]
Criztian has joined #ruby-lang
workmad3 has quit [Ping timeout: 252 seconds]
sockmonk has joined #ruby-lang
lcdhoffman has joined #ruby-lang
sepp2k has joined #ruby-lang
Silex^^ is now known as Silex
esad has quit [Quit: Computer has gone to sleep.]
wcook has joined #ruby-lang
gnufied has joined #ruby-lang
itsmeduncan has joined #ruby-lang
erichmenge has quit [Quit: Be back later]
gnufied1 has quit [Ping timeout: 240 seconds]
pbjorklu1d has left #ruby-lang [#ruby-lang]
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
bryancp has joined #ruby-lang
cha1tanya has joined #ruby-lang
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby-lang
zmack_ is now known as zmack
bytephilia has quit [Quit: Computer has gone to sleep.]
kvirani has joined #ruby-lang
mistym has quit [Remote host closed the connection]
<rue>
andrewvos: Yeah, I’m quite boggled that someone was able to say that and wasn’t immediately ‘reassigned to other duties’
masterkorp has joined #ruby-lang
<masterkorp>
Hello
<diegoviola>
i have some code i want to run in a child process,fork() works but i want to avoid getting spawning a new child process if my code is already running in one, how do i go in doing that?
<andrewvos>
Don't understand why the UK would make themselves look so stupid just to get Julian.
<andrewvos>
rue: ^
erichmenge has joined #ruby-lang
<darix>
diegoviola: put up a semaphore or so somewhere that tracks that you started the dask already?
<manveru>
if i had a dollar for every time i've seen that...
<workmad3>
manveru: you'd have 5 dollar? :D
andrewhl has joined #ruby-lang
dous has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
<apeiros_>
indeed
<manveru>
well, in general people will use anything possible in any language, whether it makes sense or not
<masterkorp>
i agreed with you both
<manveru>
masterkorp: not blaming you, i know you wouldn't do that :)
<masterkorp>
but its settled down to use it like this in chef
<masterkorp>
also makes sense to use it on the chef dsl
<masterkorp>
the less visible logic, the better
<manveru>
a ton of people learn chef like they learn rails... without thinking about ruby
<masterkorp>
manveru: yeap
<manveru>
iota ~ % ack -hc '"#{\w+}"' github/
<manveru>
741
<manveru>
and that's just the couple of repos i have locally
dous__ has joined #ruby-lang
<masterkorp>
i see people here misusing normal variable and :variable a lot also
dous has quit [Ping timeout: 272 seconds]
soahccc has joined #ruby-lang
dous__ has quit [Remote host closed the connection]
hynkle has joined #ruby-lang
t47671 has quit [Remote host closed the connection]
dous has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
t38980 has joined #ruby-lang
eydaimon has joined #ruby-lang
eydaimon has joined #ruby-lang
eydaimon has quit [Changing host]
<soahccc>
Is there a way to include a gem from a local directory in a simple one-file-script? I tried gem with path option but it looks like that the normal gem command (in ruby not on CLI) only provides version checking… Is that right?
<manveru>
soahccc: what do you mean?
<manveru>
ah, you mean the gem method?
<manveru>
just require("gemname")
<manveru>
you only use the gem method to specify a version
srbartlett has quit [Remote host closed the connection]
carloslopes has joined #ruby-lang
<soahccc>
manveru: Yeah I now that but to test the gem I always have to "recompile" the gem. I tried gem("foo", path: "somewhere") which works in normal Gemfiles but with the gem method it seems to not work
<manveru>
gemfiles are not normal
<manveru>
maybe explain what you actually want to do, not what is going wrong
<zzak>
i just want to love you
<soahccc>
manveru: I'm working on a gem with executable so I moved the exeutable out of the gem and now I want to test and develop. But for any change I have to recreate and reinstall the gem until I can run the command...
erichmenge has quit [Quit: Be back later]
<manveru>
ok, do it like this
<manveru>
make the directories bin and lib
<manveru>
put the executable into bin/whatever
<manveru>
and the first two lines should be
<manveru>
#!/usr/bin/env ruby
<manveru>
require_relative '../lib/whatever'
<manveru>
then run whatever from anywhere and it will work
jbwiv has joined #ruby-lang
<soahccc>
hmm this is much better :)
cha1tanya has joined #ruby-lang
<manveru>
the youth these days... how do you think we did that in the past? :)
dous has quit [Remote host closed the connection]
snorkdude has joined #ruby-lang
mistym has quit [Remote host closed the connection]
<soahccc>
manveru: :) I doesn't like the require_relative as it is not needed later in the gem and you might change these… So I found that one here which works best: $:.unshift File.realpath("#{File.dirname(__FILE__)}/../lib")
cha1tanya has quit [Quit: cha1tanya]
<soahccc>
Thank you anyway though :) the solution is usually one hint away
<manveru>
?
t38980 has quit [Remote host closed the connection]
t4736 has joined #ruby-lang
<manveru>
it doesn't hurt in the gem, modifying $LOAD_PATH instead is even worse
<soahccc>
manveru: I only need the additional path for testing. if it is a gem the loading is already handled. this is basically what a loaded gem automatically does (appending the path)
dous has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
snorkdude has quit [Remote host closed the connection]
<manveru>
no
wallerdev has joined #ruby-lang
<manveru>
if you only need it for testing, set RUBYLIB env var in your shell
<injekt>
so yeah the value in the ensure block is not returned
t45136 has quit [Remote host closed the connection]
<injekt>
which is intended
t22464 has joined #ruby-lang
eydaimon has joined #ruby-lang
eydaimon has joined #ruby-lang
<injekt>
jasiek: you almost ALWAYS want the code block above ensure to be returned
esad has quit [Quit: Computer has gone to sleep.]
<injekt>
ensure is for cleaning stuff up
<apeiros_>
return in ensure ensures nothing but the ensure's return will ever be returned
<injekt>
and that
<apeiros_>
which is rarely the case and usually a bad idea. as injekt said, ensure is there for cleanup, not returning.
esad has joined #ruby-lang
kvirani has quit [Remote host closed the connection]
<injekt>
return in ensure should not be allowed, kinda silly
<jasiek>
what is the rule according to which a value is returned from a method? i mean the value of which expression is returned if there's no explicit return statement?
<injekt>
the value of the last evaluated expression
<apeiros_>
except expressions in ensure
<injekt>
we dont speak about ensure here because it wasn't even designed for that
<injekt>
right
<apeiros_>
which in turn: except from an explicit return in ensure
<injekt>
hehe
<injekt>
which ruby should yell at you for imo
<apeiros_>
warnings are useless
<injekt>
fine, an exception
<injekt>
:D
<apeiros_>
rm -rf on sight
<apeiros_>
at the very least
<injekt>
that'd work
coryf has joined #ruby-lang
localhost has joined #ruby-lang
localhost has quit [Excess Flood]
localhost has joined #ruby-lang
<jasiek>
so i guess the idea with ensure is to use it for cleanups ONLY, and if that isn't the case i should wrap the block inside the method into begin...end and return the output value from outside that block?
<injekt>
sure
<apeiros_>
o0
<apeiros_>
jasiek: def foo; []; ensure; end # <-- good form, returns []
<apeiros_>
no need to do an explicit begin/end
apeiros_ has quit [Remote host closed the connection]
t22464 has quit [Remote host closed the connection]
<jasiek>
thanks, i'll play with it.
t59737 has joined #ruby-lang
apeiros_ has joined #ruby-lang
wcook has quit [Remote host closed the connection]
<awalrond>
Where is trunk at these days? Out of loop I'm afraid. Is it 1.9.3+ or something more exotic?
gregmoreno has joined #ruby-lang
brdude has quit [Quit: brdude]
<drbrain>
awalrond: it's more than 1.9.3+, but not exotic
<drbrain>
there's some new syntax, the GC has further improvements, but no glaring incompatibilities in the language come to mind
<awalrond>
I'll backport the fix, just to be safe ;)
<awalrond>
I do like 1.9.3 - It is something of I sweet spot I think
<awalrond>
drbrain: Thanks for your input - saved me some time
lcdhoffman has joined #ruby-lang
<drbrain>
cool
Hakon has joined #ruby-lang
nofxx has joined #ruby-lang
scampbell has quit [Remote host closed the connection]
titaniumNoob has quit [Read error: Connection reset by peer]
hynkle has quit [Quit: Computer has gone to sleep.]
elux has quit [Quit: Bye!]
<zzak>
drbrain: what os?
<drbrain>
zzak: ?
<zzak>
with bison 2.3
<drbrain>
OS X 10.8
<drbrain>
Xcode 4.4
nofxx has quit [Changing host]
nofxx has joined #ruby-lang
carloslopes has quit [Quit: Leaving.]
<zzak>
ahh
<awalrond>
I love mac hardware, but mine runs linux ;)
<zzak>
does that void the warranty?
<matti>
LOL
<matti>
zzak: ;p
<whitequark>
drbrain: what new syntax?
<awalrond>
probably!
<drbrain>
whitequark: there have been some changes for keyword arguments, I think… I was actually thinking of refinements (which is in testing) and not actually syntax
rippa has quit [Read error: Connection reset by peer]
<whitequark>
ahh, refinements
<injekt>
heh
<whitequark>
they're quite controversional, I'd say
sailias has quit [Read error: Connection reset by peer]
<injekt>
are they squeezing in before the big freeze/
manuw has quit [Ping timeout: 252 seconds]
<awalrond>
Refinements? got a link?
<whitequark>
brian (of rubinius) was quite negative on them
macmartine has quit [Quit: Computer has gone to sleep.]
<RickHull>
guys, i have a confession to make
<RickHull>
i'm starting to buy into prototype objects
<RickHull>
or whatever it's called
<RickHull>
prototype inheritance?
<whitequark>
yep
<RickHull>
it does seem to solve a lot of the problems with class-based
<whitequark>
and let me guess, you mean JavaScript and not Self or any other language better than JS?
<RickHull>
i was thinking go, but i'm not 100% sure
<RickHull>
but yeah, from reading about js / coffeescript
<whitequark>
oh, go has PI too.
banister`sleep has quit [Ping timeout: 246 seconds]
<whitequark>
coffeescript is not a language ;)
<RickHull>
i think it may be
<RickHull>
it's got syntax and semantics and a compiler
snorkdude has joined #ruby-lang
<injekt>
yes it is
<whitequark>
it has exactly the same semantics
havenn has joined #ruby-lang
<RickHull>
i remember reading about refinements when they were first proposed, is that related to inheritance?
publicvoid has quit [Read error: Operation timed out]
<whitequark>
RickHull: refinements are a way to monkey-patch a class locally
<RickHull>
so, possibly something that PI actually does better?
dRbiG has quit [Read error: Operation timed out]
<whitequark>
nope
<whitequark>
with refinements you can modify the behavior of objects which came from different parts of your program
jtoy has joined #ruby-lang
<whitequark>
e.g. define Object#to_boolean only for your library, or something like that
itsmeduncan has quit [Quit: itsmeduncan]
<RickHull>
it still sounds like something you could do instead with PI
<RickHull>
(better or worse)
<whitequark>
it does not relate to PI
<RickHull>
but this is just from reading about PI
<RickHull>
i.e. this is ruby making up for a lack of PI
<heftig>
no, it's not
<heftig>
PI won't help
<RickHull>
(and not that you can't extend objects in ruby)
kvirani has quit [Read error: Connection reset by peer]
<whitequark>
you don't create new classes of objects with refinements, you are modifying behavior of existing classes of objects locally while altering every existing object of such class
<whitequark>
(here I use "class" not as in "instance of class Class", but in a more generic way)
jmcphers has quit [Quit: Leaving]
<RickHull>
sure, but i'm not seeing the distinction. creating vs modifying
<RickHull>
when you say create, you mean you havea new one, but the original is untouched
jmcphers has joined #ruby-lang
<RickHull>
vs modifying the original?
<whitequark>
exactly
<manveru>
for one you have to copy your data, for the other you don't
dRbiG has joined #ruby-lang
<RickHull>
ok, i see. opening up a class vs inheriting one
<RickHull>
(i think?)
<whitequark>
yeah
banisterfiend has joined #ruby-lang
<whitequark>
refinements allow you to open and modify a class without affecting every other part of a program
publicvoid has joined #ruby-lang
IPGlider has quit []
<RickHull>
clearly i need to read some more before pontificating. but it does seem a little scary to me, that refinements can make monkey patching more sane, but they might make reasoning about code (from a higher level) much more difficult
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<whitequark>
yup. I personally don't think that refinements are that good
<whitequark>
they're an interesting tool and a concept not widely implemented, yes
<whitequark>
time will show
bytephilia has quit [Quit: Computer has gone to sleep.]
isale-eko has joined #ruby-lang
<awalrond>
Blimey. Just scanned the Refinements thread
<awalrond>
Must agree with above - Looks juicy but could obfuscate code if used overzealously
t87281 has quit [Remote host closed the connection]
t7856 has joined #ruby-lang
brdude has joined #ruby-lang
<manveru>
as long as people stop with the core_ext insanity :)
<drbrain>
manveru: indeed
<RickHull>
i imagine the practice will be, similar to monkeypatching: don't do it except as a last resort. then it's strictly better than naive monkeypatching
postmodern has joined #ruby-lang
<Harzilein>
hmm
<Harzilein>
it sounds like it could do with external metaprogramming as well, just using a lot of it?
toretore has quit [Quit: This computer has gone to sleep]
<RickHull>
gotta run, toodles
RickHull has left #ruby-lang [#ruby-lang]
<awalrond>
_external_ metaprogramming?
<awalrond>
explain?
<injekt>
you go outside to write it
<Harzilein>
not in ruby core
<Harzilein>
i mean, would that Refinements thing end up in "core" or in stdlib?
<drbrain>
Harzilein: core, it's a language feature
<injekt>
did anything happen with the 'use' feature matz proposed some time ago?
<zenspider>
I hope to god it dies
<injekt>
:D
<drbrain>
sounds like refinements, since refinements has "using"
<drbrain>
there was also prepend which died
<injekt>
nope wasn't that
<awalrond>
what what what? I need to rejoin the ML!
<drbrain>
then it's dead
<injekt>
cool
<injekt>
oh wait
<injekt>
it was mix
<injekt>
not use
<injekt>
iirc
<drbrain>
there was also "mixin" I think
<injekt>
:/
<injekt>
they all died?
<drbrain>
I think all other implementations have been rejecte
<drbrain>
d
<injekt>
heh
<whitequark>
zenspider: what's so bad about that?
<zenspider>
hopefully... I asked during the Q&A what their plans were to make debugging and tracing understandable and all I got was "ummmmmmm" back. they've not thought this through.
<injekt>
zenspider: understandable in what sense? just overall more sane?
slyv has joined #ruby-lang
adgar has quit [Ping timeout: 256 seconds]
havenn has quit [Remote host closed the connection]
adgar has joined #ruby-lang
<zenspider>
injekt: overall, yeah. you wont't be able to tell what code you're running at any given time. you may have the instance, but unless you see this extra contexct that is orthogonal to pretty much everything else, you can't tell what code will be running at any given time.
havenn has joined #ruby-lang
<injekt>
heh
<whitequark>
well, but how do you do that with monkeypatching? I can use obj.method(:foo) and receive the place where it was defined
<whitequark>
I guess that'll still work with refinements
justinmcp has joined #ruby-lang
bryancp has quit [Remote host closed the connection]
bytephilia has joined #ruby-lang
Future[Chimp] has quit [Quit: This computer has gone to sleep]
sailias has joined #ruby-lang
<zenspider>
whitequark: will it?
<zenspider>
if so, how?
<zenspider>
what will it do if I return a closure from within a refinement?
<zenspider>
etc etc etc
<zenspider>
I haven't seen this work well in any language yet. I don't see ruby as a language design pioneer. I don't expect this to work out well.
<whitequark>
#method works by, well, doing a method lookup, just like a method call works
<whitequark>
closure is a nice catch. theoretically it should capture the refinement scope stack as well
ilyam has joined #ruby-lang
<zenspider>
which works via OBJECT STRUCTURE... not via stack
<whitequark>
hm?
<zenspider>
how does method lookup work?
<zenspider>
it works by walking object structure until it finds what it wants
<zenspider>
object structure is not dependent upon the stack
<zenspider>
closures don't capture object structure at a given time
[1]dtribble has joined #ruby-lang
t7856 has quit [Remote host closed the connection]
t33661 has joined #ruby-lang
<whitequark>
I guess refinements themselves don't alter the object structure even temporarily, it's more like adding a mixin--i.e. if a refinement is monkey-patched, the change will be immediately applied. So you don't need to capture complete object structure
dtribble has quit [Ping timeout: 240 seconds]
<injekt>
tl;dr ruby is going down the shitter
<whitequark>
you only need to remember which refinements were applied
<zenspider>
adding a mixin alters the ancestors path
<whitequark>
meh, I'll just look at the code
<whitequark>
it's already in HEAD
<mistym>
What would be the better directory structure for this gem?
<mistym>
I've got a C library I'm wrapping (Exempi) and my Ruby wrapper for it (Fasttrack). They have their own module spaces, and are separate so that you can require only Exempi without the Fasttrack wrapper, if you hate convenience.
<mistym>
Would it be better to have both lib/exempi/ and lib/fasttrack/ directories, or hide exempi/ in lib/fasttrack/exempi?
sockmonk has quit [Ping timeout: 240 seconds]
<Harzilein>
mistym: as a user i'd prefer the former
<whitequark>
mistym: maybe it's better to simply release two gems
<whitequark>
(I presume that you wrap Exempi via FFI)
<mistym>
whitequark: FFI, yeah.
<mistym>
whitequark: Maybe I should, yeah. And have Fasttrack depend on Exempi.
<whitequark>
yeah, there's no reason to install fasttrack for people who just want the raw C API
<mistym>
Harzilein: Was leaning to that too, just wasn't sure if that was considered bad style. But releasing as two gems would solve that.
<whitequark>
they could also have different versioning. exempi gem should follow the C library and fasttrack should be yours
<mistym>
Good point.
<mistym>
Thanks!
<zenspider>
because disk space is such an expensive commodity
<whitequark>
because the underlying library can have some API changed, etc.
<whitequark>
zenspider: API changes matter more.
erichmenge has joined #ruby-lang
bytephilia has quit [Remote host closed the connection]
tenderlove has quit [Ping timeout: 245 seconds]
tenderlove has joined #ruby-lang
jbsan_ has joined #ruby-lang
justinmcp has quit [Remote host closed the connection]