<raggi>
swills: if you `open('somegem.gemspec', 'w+:utf-8') { |io| io.write YAML.load(metadata).to_ruby }`, you'll be able to build wiht that
<kojul>
any idea why on 2.0.2 install, I get an invalid byte sequence in US-ASCII error originating from like 1072 of History.txt?
<swills>
raggi: thanks, that's very helpful
<swills>
kojul: set LANG and see if that helps?
<swills>
raggi: is there a different file I should be using tho?
Elhu has joined #rubygems
Elhu has quit [Client Quit]
mockra has joined #rubygems
havenwood has quit [Remote host closed the connection]
<raggi>
swills: metadata is fine, that's the only gemspec you'll find generally inside a .gem file
crandquist has joined #rubygems
<raggi>
swills: gem files aren't really designed to be round-tripped with gem build
<kojul>
swills: set lang to what? I set it to en_US.utf8 and I get an invalid byte sequence in UTF-8.
<raggi>
swills: out of interest, what's your use case?
<swills>
raggi: i'm working on packaging gems in FreeBSD
<raggi>
swills: ah right, why do you need to rebuild them?
<swills>
raggi: we have a limit that we can only install one version of something at a time... so we have to be able to patch gems to fix version conflicts on occasion. the way we do that is extract things, patch then build via gem build
<swills>
so, am i basically working around gems that haven't been converted to a new format?
<raggi>
no, gem build is different form the unpack process
<raggi>
gems are always built from ruby gemspecs
<raggi>
these days
<raggi>
but the yaml format is used for transport
<swills>
sorry, i don't get what you mean
<raggi>
(as it was once deemed "more safe")
<raggi>
there is no new format
<swills>
how is gem build different?
<raggi>
gem build is a development process
mockra has quit [Ping timeout: 245 seconds]
<swills>
so gem unpack then gem build is different than gem install
<raggi>
gem unpack doesn't give you all the data you need to gem build
<raggi>
gem unpack only extracts data.tar.gz into a directory
<swills>
right, i also have a step to get the gemspec out of the metadata
yfeldblum has joined #rubygems
<swills>
hmm, i see
<swills>
it looks like gem unpack behaves differently in 2.0
<raggi>
it does?
<swills>
actually, no i'm confused, i was misremembering something i think
<swills>
basically, i do a gem unpack
<swills>
then untar the gem to get the metadata and pull the gemspec out of that
prognostikos has left #rubygems [#rubygems]
<raggi>
yeah
<swills>
but the gemspec i'm getting is yaml
<swills>
not ruby
<raggi>
just run that gemspec through the above, and you''l get somethign you can build
<swills>
ok
<swills>
i guess i'm trying to figure out why the gemspec i'm getting is yaml and not ruby
<raggi>
it always is in teh .gem files
<raggi>
for historical reasons
<raggi>
but almost no one uses yaml format for development
<raggi>
as it's less practical
<swills>
histerical raisins!
kojul has quit [Quit: kojul]
<swills>
hysterical raisins even
<swills>
so if that's the case, why did gem lose the ability to use that gemspec?
Emily is now known as EmilyAFK
EmilyAFK is now known as Emily
<raggi>
swills: i'm not sure, probably just to simplify the code, and under the assumption no one was using it
PawelPacana has joined #rubygems
<swills>
ok
<swills>
that takes me back to why the two are differen tho
<swills>
different
Emily is now known as EmilyAFK
<raggi>
swills: it's a design decision before my time
<raggi>
swills: it's likely that the yaml metadata format was seen as being more safe
<raggi>
swills: but i'm not sure, i wasn't there
<swills>
ok
<swills>
trying to make that conversion thing work
<raggi>
i'm not 100% sure if that passes through transparently
<swills>
oh yeah, good point, thanks
<raggi>
i think it should
<swills>
i wonder what this code does if it encounters a ruby gemspec
<swills>
probably barfs...
crandquist has quit [Quit: Bye!]
<raggi>
i don't think there are any ruby metadata files
<swills>
but they should all be, imho. :)
<raggi>
well
<raggi>
that's a topic up for debate
<raggi>
around some notion of "security"
<raggi>
that honestly, i don't really believe in either side of the argument
<raggi>
but more to the point
<raggi>
changing the .gem format substantially at this point will lead to backward compatibility problems that aren't worht the trouble
<swills>
ok
<swills>
so i can rely on this not changing
<raggi>
correct
<raggi>
i mean, i can't ensure all rubygems devs will agree with the above forever, but it won't change any time soon
<raggi>
i doubt evan or drbrain have any desire to alter that, and moreover i'd place a fairly sizable bet that they hold the same opinion that it's not worht changing
<swills>
ok
<raggi>
swills: if you sent a PR to get gem build to work with yaml specs again, and included some docs regarding the use case, i'm sure it would be considered, and maybe accepted
<swills>
ok
baburdick has joined #rubygems
<swills>
i'll consider that, thanks
<swills>
first i want to play with this and see if it works
baburdick has quit [Ping timeout: 264 seconds]
<swills>
hmm, the comment for the commit says "Removed broken YAML gemspec support in `gem build`"
<swills>
so i guess it was removed because it didn't work somehow
ckrailo has joined #rubygems
Guest85414 has quit [Read error: Operation timed out]
Guest85414 has joined #rubygems
huoxito has joined #rubygems
mockra has joined #rubygems
<swills>
oh dear
<swills>
the yaml that comes with 1.8 doesn't have a to_ruby method.
mockra has quit [Ping timeout: 248 seconds]
<Defiler>
I can't do it today, but I've been meaning to look harder at rubygems 2.0 and see if I can assist in removing any remaining YAML gizmos
<Defiler>
YAML should never cross a version-control-of-code-that-reads-it barrier, IMO
<raggi>
it's not yaml that provides that method, it's Gem::Specification
<swills>
raggi: the to_ruby method?
<raggi>
yes
<swills>
well, i'm confused tehn
<swills>
because using 1.9 and rubygem 2.0 that to_ruby bit works fine
<Defiler>
well, think back to your original bug
<swills>
but on 1.8 it gives -e:1: undefined method `to_ruby' for #<YAML::Object:0x802132950> (NoMethodError)
<Defiler>
and it's that we're seeing YAML where we expect to find a Gem::Specficiation
<Defiler>
so it's not unexpected that you're getting that error
<Defiler>
since the latter has that method and the former does not
<swills>
Defiler: no, i patched things to convert the yaml to ruby
<swills>
and that is what is failing
<Defiler>
well #<YAML::Object:0x802132950> is clearly not a successful example of it
<drbrain>
swills: you need to require 'gem/specification' before loading a gempsec on 1.8
<drbrain>
err, require 'rubygems'
huoxito has quit [Ping timeout: 248 seconds]
<swills>
drbrain: tahnks, that helps a lot
anon4224124 has joined #rubygems
<swills>
now to figure out how to get docs
<swills>
find: /usr/local/lib/ruby/gems/1.8/doc/sass-3.2.7: No such file or directory
<swills>
:/
<drbrain>
maybe they weren't generated?
<drbrain>
everything in doc/ is generated
<swills>
yeah, i think rdoc isn't installed
<swills>
you're probably wondering why...
<drbrain>
not really :D
<drbrain>
I know some linux distributions purposefully remove parts of the stdlib
<Defiler>
oh is this some linux distro?
<Defiler>
which one? if you said I failed to notice, and I apologize
<drbrain>
Defiler: swills is a FreeBSDer
<Defiler>
huh then that error is very strange
<Defiler>
ohh yeah
<Defiler>
ruby-doc-stdlib
<Defiler>
I forgot that had gotten split out
<drbrain>
Defiler: the YAML::Object one? that's what happens when you load a YAML object with !ruby but you haven't loaded the class
<Defiler>
drbrain: no sorry I meant the doc error
Elhu has joined #rubygems
EmilyAFK is now known as Emily
<swills>
yeah, we split rdoc into a separate package and don't install it with ruby, so that we can update it separately.
<swills>
(because we can't have two packages install the same file...)
<Defiler>
yeah, makes sense
crandquist has joined #rubygems
<Defiler>
(I personally don't think programming language runtimes should ever be directly the job of the OS, but that's just my personal crusade)
crandquist has quit [Client Quit]
baburdick has joined #rubygems
<swills>
so what you're really saying is that you don't want to have any package management
baburdick has quit [Ping timeout: 248 seconds]
<swills>
after all, if the package management doesn't install language runtimes, it can't install apps that depend on those.
Elhu has quit [Quit: Computer has gone to sleep.]
<swills>
and why should the OS package management manage apps that only use C/C++ or other compiled languages, but not others?
<raggi>
i guess i never knew where you worked, but for some reason i thought it was ATTI
<Defiler>
you can catch some hints there
<raggi>
provisioning home clouds is still frustrating i find
<Defiler>
but shortly you're going to be able to run fun combinations like "Mesos cluster in my basement" using engine yard
<raggi>
i have a plethora of machines all over the planet, some in DC's, some in homes
<raggi>
they run different OSes, different services, etc
<Defiler>
yeah, me too, and that's what I'm building shanghai for
<raggi>
many of which are singletons
<Defiler>
meta-agent for command and control
<raggi>
chef, puppet, etc are really horrible for this task
<raggi>
IME
<Defiler>
up
terracotta has joined #rubygems
<Defiler>
yup, I mean
<raggi>
my DR plans are horrific, they're different for each one, and often non-existent
<raggi>
other than having some git repos and a general practice for how to get something back up
Guest25251 has joined #rubygems
<Defiler>
The final desired end-state is a system that makes the minimum number of possible network requests and shell commands in order to configure heterogenous things to your desire
<raggi>
i'd say 50% are potentially ready for instant death
Guest25251 has quit [Excess Flood]
<Defiler>
that is totally open and repeatable
<raggi>
one of the things i've wanted for a while, wiht all of this, which would make life much easier
<Defiler>
my new stuff finally adds freebsd support (and any UNIX) support to EY
<raggi>
is a distributed FS that had node-tunable replication parameters
<raggi>
and run on all of them
<Defiler>
by ceasing to care what OS you run
Rakko has joined #rubygems
<raggi>
then i could just mount services from the FS, and transition them by altering FS data
<Defiler>
raggi: oh yeah some people have tried to achieve that with bittorrent, even
<Defiler>
but that would be super nice
<raggi>
so, the other part of this
<Defiler>
Everything I've used made it super easy to get a kernel panic
<raggi>
is that because these machines are so unstable
<drbrain>
Defiler: woo BSD!
<raggi>
many of the existing things are horrible
havenwood has joined #rubygems
<Defiler>
drbrain: I wanted ZFS hehe
<Defiler>
that and the general awesomeness of FBSD
anon4224124 has quit [Ping timeout: 245 seconds]
<raggi>
most of the distributed DB's and/or distributed FS' do not support arbitrary node rejoins
<raggi>
or dynamic topology changes
<Defiler>
we finally got that working with cassandra at the startup I worked at but good god
<Rakko>
drbrain: mpapis tells me you might know something about the status of a bug with generating docs with rvm
mephux- has joined #rubygems
<raggi>
(the latter i really want to enable so i can just have my laptop attach to the ring)
<raggi>
periodically, you check groups of nodes (i.e. whole directories), to just check they're in sync
<raggi>
when a daemon has been up for a long time
<raggi>
and it's using FS monitoring, it can rely on those directory fingerprints to communicate
<raggi>
- so no disk thrashing
<raggi>
and the tree aggregation means little bandwidth per node too
<Defiler>
also, I'm going to finally make a redis plugin for this using the awesome redis-objects gem, and that will be handy for some other things https://github.com/wilson/revenant
<Defiler>
I stopped using mysql though its lock() semantics are great
<raggi>
this kind of design totally doesn't scale for other things, but for this kind of use case, it works fine
<raggi>
oh, this is what you mentioned the other day
<raggi>
:)
<Defiler>
Yeah, I like this pattern
<Defiler>
I've used it a lot for things like email notifications
<raggi>
yeah
<Defiler>
where you already have some datastore that needs to be available to do the work
<raggi>
things like singular cron jobs, etc
<Defiler>
so why not lean on its locking features to avoid races
<raggi>
chef/puppet/etc and most of the related orchestration tools
<raggi>
just handle not at all
<raggi>
which is ok, but as is so often teh case, no one truly fixes it
<Defiler>
Yeah I have difficulty taking them seriously, if I'm honest
<raggi>
not in open source, anyway
<Defiler>
even though I know I should
<raggi>
Defiler: i am not a fan, generally
<Defiler>
I'm working on open sourcing a lot of my personal patterns, as you can see
<raggi>
Defiler: it saves me writing some code, but 2 years in, i'd rather i'd written the code
<Defiler>
I'm always skeptical of things that have built-in decisions that preclude the ideal
<Defiler>
which in this case would be an infinitely-fast, infinitely-wise sysadmin typing at the keyboard
<raggi>
haha
<raggi>
jboss solves this problem
<raggi>
and the clustering problem
<Defiler>
I see that as the 'Platonic ideal' config management solution
<Defiler>
and measure things against it
<raggi>
i'm just not sure i want to move tons of my personal shit to java/scala/clojure yet
<Defiler>
and Chef abdicates any interest in knowing when something is already done
<Defiler>
Yeah I want UNIX solutions, not Java solutions
<raggi>
i am moving a lot fo stuff to go
<Defiler>
It irks me that you can't daemonize but Go is still pretty awesome within its scope
terracotta has joined #rubygems
<raggi>
because the resource usage to performance ratio is a big win
<Defiler>
I'm hoping 2013 is my year of Rust and Erlang :)
<raggi>
when a lot of these machines are low on resources
<raggi>
i keep looking at rust on and off
<raggi>
and i just recoil at the complexity
<Defiler>
I want to help contribute some simplifications
<Defiler>
but in general it's close to what I've been looking for.. better than D
<raggi>
i looked earlier this week, and it was better than the last time i looked
<raggi>
but it's still big, when you want to do anything concurrent
<raggi>
high level apis get annoying wiht this stuff, as you have to read em to be sure what's going on
<raggi>
but i also don't much like the bsd apis in this regard either
<raggi>
i'd rather they had errors for invalid sockopts
<drbrain>
Addrinfo was added in 1.9, and it's a helper for the mid-level stuff
<raggi>
(before send)
<raggi>
yeah
<raggi>
i'm totally onboard with ruby having high level apis
<raggi>
it just gets hard to mix and match sometimes
<raggi>
multicast is a good fiddly example
<raggi>
i am thankful ruby has Socket.new, though :)
<drbrain>
I'm going to need to add if_nametoindex to the ruby Socket API
<raggi>
yeah, that happens
<drbrain>
I have a patch for Addrinfo.socket that does Socket.new, but akr gave it a preliminary rejection due to naming, so I'll need to think about that
<drbrain>
brb laundry
<raggi>
drbrain: honestly, i'd love you a lot of you just plain exported most of inet, arpa* etc under respective constants
nirvdrum has joined #rubygems
<raggi>
drbrain: the high level apis are nice, but it's also nice sometimes to be able to "just port the C", to make life more unixy