<yorickpeterse>
man no wonder this office was super cold, all the radiators were turned off
<yorickpeterse>
(first world problems)
<erikh>
just turn on more computers.
<erikh>
seems to work in this 80 degree weather
<erikh>
err, 80F
<yorickpeterse>
we all have laptops here so the warmth is very local
<yorickpeterse>
also Fahrenheit is for scrubs
<mdedetrich>
agreed
<erikh>
let me know when you start taking our vast wealth
<erikh>
we'll talk about who the scrubs are then
<yorickpeterse>
You mean your vast debts? *runs*
<erikh>
dunno, lots of europeans working here
<yorickpeterse>
we should all use Kelvin anyway
pkondzior___ has quit [Quit: Connection closed for inactivity]
<erikh>
one of the unfortunate problems with our country is that government and corporate wealth are vasty disparate
<yorickpeterse>
288.2K is so much better than 15C
<erikh>
this keybaord makes me cry
<erikh>
haha yes, bigger numbers for everybody
mbj has quit [Quit: leaving]
jakolehm has left #ruby-lang [#ruby-lang]
Newbie0086 has quit [Quit: 离开]
alessio_rocco has quit [Ping timeout: 252 seconds]
mdedetrich has quit [Quit: Computer has gone to sleep.]
krohrbaugh has joined #ruby-lang
jxie_ has quit [Quit: leaving]
mdedetrich has joined #ruby-lang
alessio_rocco has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 240 seconds]
poga has quit [Read error: Connection reset by peer]
poga has joined #ruby-lang
vlad_starkov has joined #ruby-lang
<MouseTheLuckyDog>
Is there a way of doing macros in Lisp.
<erikh>
look at Object#send
<erikh>
or instance_eval and module_eval
<erikh>
if you're talking about the compile time / run time features of lisp macros, ruby doesn't really have that distinction, at least exposed to the user.
xxaM has quit [Quit: ZzZz]
hogeo has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 246 seconds]
<yorickpeterse>
You don't really need macros in Ruby anyway
<yorickpeterse>
it's not like it's actually going to speed things up
GeissT has quit [Ping timeout: 264 seconds]
<MouseTheLuckyDog>
Ohh. Both seem to be quite close but not what I want. What I want is essentially "caller_eval".
<yorickpeterse>
Now I want to get rid of it, because fuck long if/else or case statements. However, I can't really think of anything that would *not* be a if/else in disguise
<yorickpeterse>
(one that would be arguebly worse)
teleological has joined #ruby-lang
<krskrft>
that's not such a large if-else statement
<krskrft>
i thought it would be much longer
<manveru>
it's small, yeah :)
<yorickpeterse>
I have to add at least another case to it
_elia has joined #ruby-lang
<yorickpeterse>
and quite possibly moar
<manveru>
then do so?
<yorickpeterse>
I want to break this out from a single controller as well but for now I'ms tuck with it
<yorickpeterse>
* I'm stuck
<krskrft>
then do it
<manveru>
maybe polymorphism is what you want tho
<yorickpeterse>
Yeah no, before you know it you end up with 15 if/else statements
<krskrft>
seriously, you could add a ton more to it before it was "too long" in my view
elia has quit [Read error: Operation timed out]
<yorickpeterse>
manveru: well yeah, but I haven't really found something yet that I'm happy with
<manveru>
then maybe you're solving the wrong problem :P
<__carlos>
well you're just doing a "return" in each case anyway, so those elsif/else are unnecessary
<__carlos>
return @lol if a
<__carlos>
and then you could have like a trillion lines of those heh
<yorickpeterse>
*facedesk*
<manveru>
if you had a method like #scope on each, you could go [@company, @companies_group, Company].compact.first.scope
<yorickpeterse>
hmmm
<manveru>
but hey, that's really roundabout
<manveru>
straightforward if until you really feel it's too big
<yorickpeterse>
I have a better solution: tackle my CTO and tell him using one controller for differently scoped data is a terrible idea
<manveru>
not "what if" :P
<manveru>
that too
dfdf has joined #ruby-lang
teleological has quit [Ping timeout: 276 seconds]
<__carlos>
yorickpeterse: I know that feel bro
<yorickpeterse>
meh, at least it's easy here
<yorickpeterse>
"This is bad, I have a better idea" "k go for it"
<manveru>
but hey, i had CTOs that made 1200 lines controller methods
<mdedetrich>
i dont have the latest ruby, gimme a sec
<erikh>
this is 2.0
<erikh>
it should be fine. it's not a bug.
<erikh>
other than in the docs, maybe
<erikh>
zzak: ^^
<erikh>
so, what's happening here:
<erikh>
1) lambda validates arity
<mdedetrich>
yup I know that
<erikh>
2) module/class_eval passes in the Module/Class object as the first argument
<mdedetrich>
ah I see
<erikh>
3) lambda chokes because it has an arity of zero in your case
<mdedetrich>
cool, thanks for help
<erikh>
sure
<mdedetrich>
proc it is
<erikh>
:)
rippa has quit [Ping timeout: 240 seconds]
<erikh>
zzak: if you see this, the bug in the ri in -p195 is that the block definition in the docs prescribe module_eval { || block } and probably should be module_eval { |x| block } to be clear.
krohrbaugh has quit [Ping timeout: 252 seconds]
barttenbrinke has joined #ruby-lang
dr_bob has quit [Quit: Leaving.]
mdedetrich has quit [Quit: Computer has gone to sleep.]
robbyoconnor has quit [Remote host closed the connection]
<sandbags2>
Am I misunderstanding something about the 'optparse' OptionParser class, when I specify an argument is mandatory I am expecting the #parse! method to print an error, usage, and exit if the mandatory parameter is not specified
dr_bob has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 248 seconds]
<postmodern>
sandbags2, how are you defining the argument
barttenbrinke has quit [Remote host closed the connection]
ruby-lang483 has joined #ruby-lang
postmodern has quit [Quit: Leaving]
barttenbrinke has joined #ruby-lang
dr_bob has quit [Ping timeout: 252 seconds]
skade has quit [Quit: Computer has gone to sleep.]
barttenbrinke has quit [Remote host closed the connection]
poga has joined #ruby-lang
benlovell has quit [Ping timeout: 252 seconds]
Guedes0 has left #ruby-lang [#ruby-lang]
ia___ has quit [Quit: ia___]
poga has quit [Ping timeout: 264 seconds]
floyd2 has quit [Ping timeout: 252 seconds]
machuga|away is now known as machuga
teleological has joined #ruby-lang
lianj has quit [Ping timeout: 256 seconds]
mucker has quit [Quit: leaving]
ffio_ has joined #ruby-lang
ffio has quit [Ping timeout: 260 seconds]
teleological has quit [Ping timeout: 248 seconds]
vlad_starkov has joined #ruby-lang
faces has joined #ruby-lang
face has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Ping timeout: 246 seconds]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
<erikh>
it should do just that
<erikh>
note that optparse works destructively on ARGV, might be an issue
ldnunes has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 245 seconds]
floyd2 has joined #ruby-lang
enaqx has joined #ruby-lang
lianj has joined #ruby-lang
lianj has quit [Changing host]
lianj has joined #ruby-lang
enaqx has quit [Client Quit]
machuga has quit [Excess Flood]
machuga has joined #ruby-lang
<yorickpeterse>
slop > optparse
lianj_ has joined #ruby-lang
lianj_ has quit [Changing host]
lianj_ has joined #ruby-lang
<erikh>
agreed, but optparse is in the stdlib
<erikh>
makes it a little easier to sell to a team.
<erikh>
(which is what I'm trying to do at work currently)
lianj has quit [Client Quit]
lianj_ has quit [Client Quit]
lian_ has joined #ruby-lang
lian_ has quit [Client Quit]
hashkey has joined #ruby-lang
lianj has joined #ruby-lang
lianj has quit [Changing host]
lianj has joined #ruby-lang
benlovell has joined #ruby-lang
<yorickpeterse>
Tell them Slop comes with enterprise support and is maintained by the British Justin Bieber
poga has joined #ruby-lang
poga has quit [Remote host closed the connection]
nkr has joined #ruby-lang
poga has joined #ruby-lang
poga has quit [Remote host closed the connection]
poga has joined #ruby-lang
<boytoy>
yorickpeterse: who's that, the alunageorge guy?
<yorickpeterse>
that would be injekt, also known as inkjet
<judofyr>
dbussink: well yeah, but you never know if people use them correctly :)
<charliesome>
little intro
<dbussink>
judofyr: basically one marker running while code keeps running
<judofyr>
charliesome: kthx
<judofyr>
dbussink: do you pause for a second while grabbing the roots?
<dbussink>
judofyr: yeah, two small stop the world pauses
<dbussink>
one at the start, one at the end
teleological has joined #ruby-lang
breakingthings has joined #ruby-lang
wmoxam_ has joined #ruby-lang
<judofyr>
dbussink: how do you handle the case when an array/hash/string needs to be resized?
<dbussink>
judofyr: how do you mean?
<dbussink>
we already have write barriers in place that we use for our generational part
<dbussink>
and they also now check for writing a non marked pointer into a scanned object
DomKM has joined #ruby-lang
<dbussink>
(white pointer into black object in 3 color invariant speak)
<yorickpeterse>
giggity
<dbussink>
judofyr: basically because we removed the gil, operations like that are safe from the vm perspective
<dbussink>
judofyr: they reason that array isn't thread safe is that for example it could overwrite the same slot when appending
vlad_sta_ has joined #ruby-lang
<dbussink>
but that doesn't affect safety for the gc
<dbussink>
the fact that rubinius has no gil is what made this effort pretty easy in the first place
<judofyr>
dbussink: if you use realloc() to move an internal buffer, how do you ensure that the GC doesn't iterate the buffer after it's been realloced?
gnufied1 has joined #ruby-lang
<dbussink>
judofyr: we don't do that
<dbussink>
judofyr: string is backed with a static size bytearray
<dbussink>
same for array with a static sized tuple
<dbussink>
if we have to grow it, we allocate a new one and copy
teleological has quit [Ping timeout: 252 seconds]
<dbussink>
and assign it to the string
<dbussink>
that assignment goes through the write barrier
<judofyr>
ah
<dbussink>
we never use realloc / malloc etc. for gc managed memory
<dbussink>
so that's never a concern
<judofyr>
dbussink: do you dealloc after the write barrier, or do you let the GC clean up the bytearrays?
gnufied has quit [Ping timeout: 252 seconds]
<dbussink>
they are just like normal ruby objects
vlad_starkov has quit [Ping timeout: 245 seconds]
<dbussink>
so the gc takes care of that
<judofyr>
interesting
<dbussink>
same for example for inline caches etc.
<dbussink>
all gc managed objects
<dbussink>
so we can do thread safe swapping them easily
<dbussink>
and if they go out of scope, the gc will clean them u
<judofyr>
because that's one of the issues for adding concurrent GC to RGenCC in Ruby 2.1: sunny objects can use realloc()
<dbussink>
judofyr: because inline caches are just objects at call sites
kgrz has quit [Ping timeout: 245 seconds]
<dbussink>
judofyr: the bigger issue i think is non thread safe data structures inside mri i guess
<dbussink>
what if you miss a pointer write like that
<judofyr>
dbussink: hm?
<dbussink>
we actually have to do an additional gc for example for Data_Wrap_Struct objects
<dbussink>
because otherwise you break the no white pointers into black objects invariant
<judofyr>
dbussink: the idea was that only sunny objects would be concurrently marked
dhruvasagar has joined #ruby-lang
<dbussink>
i mean an additional iteration for all stuff wrapped with data_wrap_struct
spike|spiegel has quit [Quit: WeeChat 0.4.1]
<dbussink>
judofyr: ah ok
<dbussink>
judofyr: well, a lot flows out of the rbx internal design that this was actually easy to add
<judofyr>
dbussink: yeah, it's the C extension API that's keeping MRI from advancing here :(
<dbussink>
well, i also think it's probably some internal structures that you would have to lock around
vlad_sta_ has quit [Remote host closed the connection]
<dbussink>
from this experience, i think there's only a fairly small difference between removing the gil and concurrent gc
<dbussink>
they depend on quite a lot of the same things
vlad_starkov has joined #ruby-lang
spike|spiegel has joined #ruby-lang
<dbussink>
judofyr: it's just that i see parallels there basically
technik129 has joined #ruby-lang
<judofyr>
dbussink: yeah, I see your point, although I think it's easier getting "Ruby thread" and "marker thread" in parallel than "Ruby thread" and "Ruby thread"
mbj_ has joined #ruby-lang
<dbussink>
judofyr: perhaps, but in rubinius we had the second and write barriers everywhere for generational gc, those two combined made the effort fairly small
<dbussink>
judofyr: i just thing mri could be better at setting a path, maybe not break c-api stuff right away, but definitely announce stuff will be removed
<dbussink>
so extension writers can update their stuff
vlad_sta_ has joined #ruby-lang
<judofyr>
yeah
rikai_ is now known as rikai
<judofyr>
dbussink: it's interesting times in MRI now IMO. Ruby 2.1 is shaping up nicely.
mbj has quit [Ping timeout: 276 seconds]
vlad_sta_ has quit [Remote host closed the connection]
Mawk has joined #ruby-lang
m107 has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 264 seconds]
technik129 has quit [Quit: Leaving.]
dhruvasagar has quit [Read error: Operation timed out]
technik129 has joined #ruby-lang
mucker has joined #ruby-lang
dhruvasagar has joined #ruby-lang
UziMonkey___ has quit []
tomzx_mac has quit [Read error: Operation timed out]
krohrbaugh has joined #ruby-lang
rwilcox has joined #ruby-lang
mbj_ is now known as mbj
UziMonkey__ has quit []
DomKM has quit [Quit: Leaving.]
krohrbaugh has quit [Ping timeout: 252 seconds]
UziMonkey___ has joined #ruby-lang
mistym has quit [Remote host closed the connection]
snarfmason has joined #ruby-lang
hashkey has quit [Ping timeout: 256 seconds]
cstrahan has joined #ruby-lang
davemaurakis has joined #ruby-lang
S1kx has joined #ruby-lang
pipework has joined #ruby-lang
symm- has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
skade has joined #ruby-lang
vlad_starkov has joined #ruby-lang
nathanstitt has joined #ruby-lang
retro|cz has quit [Ping timeout: 264 seconds]
agile has quit [Ping timeout: 256 seconds]
kith_ has joined #ruby-lang
rippa has joined #ruby-lang
kith has quit [Ping timeout: 245 seconds]
teleological has joined #ruby-lang
kith_ is now known as kith
agile has joined #ruby-lang
retro|cz has joined #ruby-lang
northelks has quit [Read error: Connection reset by peer]
mytrile has quit [Remote host closed the connection]
gnufied has joined #ruby-lang
wmoxam_ has quit [Quit: Lost terminal]
deception has joined #ruby-lang
skade has joined #ruby-lang
* erikh
sighs
Senjai has quit [Ping timeout: 264 seconds]
<erikh>
over $elsewhere, trying to help someone I know get ruby installed on ubuntu
<dominikh>
run far, run fast
<judofyr>
$elsewhere is a nice place
<erikh>
judofyr: it is most of the time
<dominikh>
mostly because $elsewhere != self
<judofyr>
self is a nice place too IMO
<erikh>
I feel kind of bad, because ubuntu packages are such shit he's seriously considering rewriting the thing in python because it'll be less work
<erikh>
he should not have to do that.
<erikh>
judofyr: have you seen omnibus-ruby, btw?
<judofyr>
erikh: nope
<judofyr>
erikh: or, yes
<erikh>
next time postmodern's around, he should check that out too
<yorickpeterse>
erikh: did you tell him to use something like a version manager instead?
<judofyr>
erikh: the link was purple in my browser
<erikh>
yorickpeterse: he's doing ops work
<yorickpeterse>
aah
<erikh>
he wants real system packages.
<yorickpeterse>
yeah
<erikh>
can't say I blame him.
<injekt>
yeah fuck that
ridders24 has joined #ruby-lang
<yorickpeterse>
well, Ubuntu is terrible because of all the -dev packages
<erikh>
yeah.
<erikh>
and the system packages are shit builds.
<yorickpeterse>
librubyderp5-dev
<injekt>
can't you just do some kind of ruby-full hybrid piece of crap package nowadays?
<erikh>
injekt: le 1.8
<injekt>
and I was ready to be surprised
* yorickpeterse
gets angry when he sees somebody use "le"
<injekt>
wait is it possible to be ready to be surprised?
<yorickpeterse>
e.g. Bootstrap devs
<havenwood>
ruby1.9.1-full
<injekt>
le omakase
enaqx has quit [Ping timeout: 246 seconds]
<havenwood>
(actually 1.9.3, terribly named package)
<injekt>
havenwood: and that's like 1.9.3 eh?
<injekt>
haha yup
<erikh>
havenwood: yeah, then get used to ruby<tab>1<tab>9<tab>
<erikh>
etc
<erikh>
injekt: abi
<erikh>
1.9.1 is the abi version. it makes sense, if surprising.
<ridders24>
getting the error: ruby terminate called after throwing an instance of 'std::runtime_error' what(): Encryption not available on this event-machine Aborted (core dumped), when trying to run the following: https://github.com/intridea/tweetstream. Im running Ubuntu 13.04
<injekt>
yeah
<judofyr>
erikh: omnibus looks nice, but it overlaps a bit with Docker.
<havenwood>
<3 ruby-install
<erikh>
judofyr: ?!
<injekt>
I keep hearing about docker
<injekt>
what is this
<erikh>
not even remotely the same.
<erikh>
it's a way to isolate dependencies into a single package.
<erikh>
injekt: I'll tell you later
<erikh>
work time is now.
<erikh>
it's worth looking into though.
<injekt>
word
<injekt>
I just bought a ticket for my commute tomorrow, man trains are expensive
<injekt>
um
<injekt>
man, trains are expensive*
<injekt>
damn my comma usage
<yorickpeterse>
,,,,,,
carloslopes has joined #ruby-lang
io_syl has quit [Quit: Computer has gone to sleep.]
<injekt>
some kind of csv
<judofyr>
csi
<judofyr>
comma separated injekt
machuga is now known as machuga|away
skade has quit [Ping timeout: 264 seconds]
jxpx777 has quit [Ping timeout: 248 seconds]
mikewintermute has joined #ruby-lang
apeiros has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 264 seconds]
benlovell has quit [Read error: Operation timed out]
hogeo has joined #ruby-lang
krames has joined #ruby-lang
Nisstyre has quit [Read error: Connection reset by peer]
bzalasky has quit [Remote host closed the connection]
Nisstyre has joined #ruby-lang
krames has quit [Client Quit]
carloslopes has quit [Ping timeout: 252 seconds]
bzalasky has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
_elia has quit [Ping timeout: 246 seconds]
<erikh>
man train
<yorickpeterse>
No manual entry for train
krames has joined #ruby-lang
<erikh>
it's like soul train, but with less women
judofyr has quit [Remote host closed the connection]
<yorickpeterse>
"man train" sounds very...scary
<yorickpeterse>
I imagine some train full of bears (not the animal ones)
<erikh>
indeed
<erikh>
have you seen that south park episode when they design the new ipad?
<erikh>
that's all I can think of righ tnow
<kalleth>
man hammersmith_and_city_line
rwilcox has quit [Quit: Computer has gone to sleep.]
teleological has quit [Remote host closed the connection]
<yorickpeterse>
bah fuck you Rails
<yorickpeterse>
Couldn't find Company with ID=2 for CompanyGroup with ID=
<yorickpeterse>
fucking nested form bullshit
<bougyman>
ca/21
dhruvasagar has joined #ruby-lang
<yorickpeterse>
?
tlewin has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 245 seconds]
krohrbaugh has joined #ruby-lang
mikewintermute has joined #ruby-lang
dhruvasagar has joined #ruby-lang
apeiros has joined #ruby-lang
barttenbrinke has joined #ruby-lang
krohrbaugh has quit [Client Quit]
krohrbaugh has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
mdedetrich has quit [Quit: Computer has gone to sleep.]
solars has quit [Read error: Operation timed out]
machuga|away is now known as machuga
dhruvasagar has quit [Read error: Connection reset by peer]
alekst has joined #ruby-lang
carloslopes has joined #ruby-lang
tangy has quit [Ping timeout: 241 seconds]
duper has joined #ruby-lang
<injekt>
yorickpeterse: wat
gregmoreno has joined #ruby-lang
gregmoreno has quit [Remote host closed the connection]
gregmoreno has joined #ruby-lang
sabfer has joined #ruby-lang
wallerdev has joined #ruby-lang
teleological has joined #ruby-lang
dhruvasagar has joined #ruby-lang
tlewin has quit [Ping timeout: 250 seconds]
nathanstitt has quit [Quit: I growing sleepy]
<yorickpeterse>
for whatever reason creating a new instance of Derp, which has many Wtfs doesn't work using something like Derp.new(:name => "lolrails", :wtfs_attributes => { "0" => {:id => 1}})
<yorickpeterse>
Where `1` would point to a valid ID of a Wtf row
<plentz>
I receive my recover password mail, change the password but I can't login with the new one(already tried ~ 5 times, each time with simpler passwords)
skade has joined #ruby-lang
cofin has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 256 seconds]
vmoravec has quit [Ping timeout: 256 seconds]
nathanstitt has joined #ruby-lang
pr0ton has joined #ruby-lang
workmad3 has joined #ruby-lang
teleological has quit [Remote host closed the connection]
skade has quit [Read error: Connection reset by peer]
benlovell has joined #ruby-lang
pr0ton has quit [Ping timeout: 256 seconds]
krames has joined #ruby-lang
alekst has quit [Quit: Leaving...]
teleological has joined #ruby-lang
pr0ton has joined #ruby-lang
machuga is now known as machuga|away
tlewin has joined #ruby-lang
retro|cz has quit [Ping timeout: 245 seconds]
mbj has joined #ruby-lang
gregmore_ has joined #ruby-lang
saarinen has quit [Quit: saarinen]
gregmoreno has quit [Ping timeout: 264 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
bzalasky_ has joined #ruby-lang
benlovell has quit [Quit: leaving]
hogeo_ has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
firstdayonthejob has quit [Ping timeout: 276 seconds]
alessio_rocco has quit [Remote host closed the connection]
epus has joined #ruby-lang
cored has quit [Ping timeout: 252 seconds]
Silex has joined #ruby-lang
davemaurakis has quit [Remote host closed the connection]
cored has joined #ruby-lang
cored has joined #ruby-lang
solars has quit [Ping timeout: 246 seconds]
elia has quit [Quit: Computer has gone to sleep.]
bzalasky_ has quit [Remote host closed the connection]
breakingthings has quit [Quit: breakingthings]
wesside_ has joined #ruby-lang
pr0ton has quit [Ping timeout: 252 seconds]
krohrbaugh has quit [Read error: Connection reset by peer]
krohrbaugh1 has joined #ruby-lang
krohrbaugh1 has quit [Read error: Connection reset by peer]
Wardrop has joined #ruby-lang
krohrbaugh has joined #ruby-lang
<Wardrop>
Does anyone know of a gem that takes care of loading files for an app in an order-agnostic manner, like how Padrino loads libraries and models, where if any fail, it's retried. Make sense?
krames has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<whitequark>
it checks that the string being matched has a 8-bit encoding
workmad3 has joined #ruby-lang
<whitequark>
the //n.encoding returns whatever's in the encoding field which is weirdly present in all MRI objects
<zenspider>
I wish your rxr dealt with tabs+spaces properly
<zenspider>
but even more I wish ruby-core would stop with that bullshit
<whitequark>
zenspider: re tabs+spaces: tell me what to fix and I'll fix it.
<whitequark>
not sure how exactly is it broken
<zenspider>
oh... so //n is NOT the encoding field of the object... but of the regexp.
<zenspider>
jesus
<__carlos>
1.9.3-head :018 > r = Regexp.new("chars".force_encoding("binary"), Regexp::FIXEDENCODING)
<__carlos>
=> /chars/
<__carlos>
1.9.3-head :019 > r.encoding
<__carlos>
=> #<Encoding:ASCII-8BIT>
<__carlos>
oh yes
<whitequark>
what the hell
<zenspider>
I'm assuming 1275-1279 should be properly indented ... that's not necessarily the case... but ruby-core mixes tabs (8 space indent) and spaces for some bullshit reason
<zenspider>
FIXEDENCODING?!?!
<zenspider>
wtf
<__carlos>
yeah, FIXEDENCODING… new one for me :|
<zenspider>
__carlos: where the fuck did you find that?
<zenspider>
yes... I'm working on a file called fuck.rb. really.
<rickhull>
maybe i am seeing an bundler artifact then
<rickhull>
i am using bundle exec ruby, so the $LOAD_PATH is set up
<__carlos>
zenspider: seems too broad.. I just have files like "fix_fucking_users.rb" and "fucking_credits.rb"
<rickhull>
per bundler
<zenspider>
I use rake to test everything... and run nearly everything
<zenspider>
and my rake setup deals with the load path for me
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
<zenspider>
but generally, -Ilib:test will get you by on nearly everything
<rickhull>
hm, i might look at that
<rickhull>
the project i am working on has already selected bundler, and bundle exec ruby is sort of the baseline
epus has quit [Quit: epus]
<zenspider>
__carlos: it is too broad... but I know that if "blah" is in the name I can delete it without looking and if "fuck" is in the name I should look before deleting
<zenspider>
rickhull: that doesn't have jack shit to do with it
<__carlos>
hah.. sounds like a good technique
<zenspider>
holy FUCK I hate encodings
joast has quit [Quit: Leaving.]
woollyams has joined #ruby-lang
crudson has joined #ruby-lang
saarinen has quit [Quit: saarinen]
<zenspider>
file declares utf-8, but has the following:
<__carlos>
zenspider: computers suck… encodings are this thing that we inherited from the beginning of computing.. it's like joining a company with a bunch of legacy code
benanne has quit [Quit: kbai]
<zenspider>
so I'm not sure what to do with this crap. I'm tempted to tell the author of the source to go fuck themselves
<zenspider>
BUT... ruby19 -cw on the file? perfectly happy
<zenspider>
because C doesn't give a fuck about encodings
<zenspider>
rickhull: no. that's because "." isn't in your load_path and you're expecting it to be
<rickhull>
i don't think so
<zenspider>
if you did ./../test/helper.rb it would work
<rickhull>
i'm expecting .. to be relative to ~/test/project/lib
<rickhull>
require './../test/helper.rb' fails as well
<rickhull>
require 'fuck.rb' — it lives in a dir in your $LOAD_PATH
<zenspider>
require "test/helper" and ensure that "." is in your load path
<zenspider>
or require "helper" and make sure that "test" is in your load path
<whitequark>
or just use require_relative?
<zenspider>
this really isn't hard and you're making it so
<rickhull>
i'm not stuck on how to accomplish my goal
<rickhull>
i'm stuck understanding why my require doesn't behave like yours
<zenspider>
*shrug*
<zenspider>
that I can't tell you
<rickhull>
i'll see about making a tighter test case. i think i'm missing something in my example
<zenspider>
incompatible encoding regexp match (ASCII-8BIT regexp with UTF-8 string)... but if I ask the string and the regexp they both say they're utf-8