<manveru>
but if you were to count the number of rails features that allow you to blow your project up...
<andrewvos>
I explained why I don't like Rails today to a Java developer by saying that in Ruby you have Array#first and in Rails you also get Array#second and Array#third. He started swearing pretty much instantly.
<havenn>
lianj: Theoretically. Takes a lot of time though, Symbol creation slows waaay down as you keep generating em.
__butch__ has joined #ruby-lang
guns has joined #ruby-lang
__butch__ has left #ruby-lang [#ruby-lang]
ryanv-raptor has quit [Quit: Leaving.]
ryanv-raptor has joined #ruby-lang
zhul_mechanos has quit [Quit: zhul_mechanos]
ryanv-raptor has quit [Client Quit]
ryanv-raptor has joined #ruby-lang
datanois1 has quit [Ping timeout: 256 seconds]
tomzx_mac has joined #ruby-lang
wyhaines has quit [Remote host closed the connection]
megha is now known as gia
torrieri has joined #ruby-lang
mercwithamouth has joined #ruby-lang
phlipper has joined #ruby-lang
torrieri has quit [Client Quit]
chimkan_ has quit [Quit: chimkan_]
imajes has quit [Excess Flood]
torrieri has joined #ruby-lang
imajes has joined #ruby-lang
swav has quit [Remote host closed the connection]
swav has joined #ruby-lang
robotmay has quit [Ping timeout: 248 seconds]
<andrewvos>
Umm, how long ago did this user upload this malicious gem???
<drbrain>
I think it was this morning/last night
ryanv-raptor has quit [Quit: Leaving.]
<lianj>
about 14 hours ago
tsou has joined #ruby-lang
datanoise has joined #ruby-lang
<andrewvos>
How are we to know that the date was not tampered with?
<andrewvos>
Oh wait, S3 logs
<andrewvos>
So basically all gems older than a certain date should be considered dangerous.
<banisterfiend>
can anyone think of a sneaky way to get the name of an aliased method?
<drbrain>
I'm building checksums now on a mirror from Nov 26 or so
<banisterfiend>
from the method object
<banisterfiend>
(or however)
<drbrain>
other people have newer mirrors so we should be able to cover all gems up to that point
breakingthings has joined #ruby-lang
<andrewvos>
drbrain: So gems within roughly two months will have to be released again?
workmad3 has quit [Ping timeout: 252 seconds]
<andrewvos>
Okay
<andrewvos>
If you can trust those other people
<andrewvos>
Scary
<drbrain>
we have multiple people contributing sha512sums of gems
<drbrain>
so unless there's a conspiracy…
<andrewvos>
Heh okay
<chris2>
occupy rubygems!
<chris2>
:P
<lianj>
banisterfiend: class A; def foo; __method__; end; alias bar foo; end; A.new.bar ?
gjaldon has joined #ruby-lang
<banisterfiend>
lianj: did u actually try that? :P
<banisterfiend>
it returns foo
mrsolo has quit [Quit: Leaving]
<lianj>
isnt that what you want?
robotmay has joined #ruby-lang
<banisterfiend>
no, i want the name of the alias
<banisterfiend>
i want bar
Weems has joined #ruby-lang
Weems has joined #ruby-lang
Weems has quit [Changing host]
<banisterfiend>
not from the method object sorry, #name returns that, i want it from a Binding object that's created inside the method
<andrewvos>
Wait but I can still install gems?
<andrewvos>
Surely I should not be able to?
<banisterfiend>
class A; def foo; binding; end; alias bar foo; def foo; end; end
<banisterfiend>
A.new.bar #=> Binding how do i get 'bar' from here?
datanoise has quit [Ping timeout: 256 seconds]
<lianj>
banisterfiend: i dont understand :P but hey
<banisterfiend>
i was going to compare method source code but that woudl be really slow
<banisterfiend>
yeah
Aria has joined #ruby-lang
<banisterfiend>
currently 'whereami' is broken if binding.pry is started inside a method that was since decorated using the alias_method trick
<banisterfiend>
lianj: actually that will work, i just have to do a bit of static analysis to find the start of the method definition, just go up a few lines and look for a def ...'
<banisterfiend>
and then use: [__FILE__, __LINE__ - offset] == m.source_location
<lianj>
ha, madness :P
<banisterfiend>
life would be a lot easier if they restored behaviour of __callee__ :)
<banisterfiend>
i wonder if they'd accept a pull request
baba_bubba has left #ruby-lang [#ruby-lang]
<banisterfiend>
lianj: thanks for your help, before i talked to you i was actually going to compare source code :) (would have been extremely slow)
<lianj>
glad i coulld inspire a solution
therod has quit [Quit: Leaving...]
idkazuma has quit [Remote host closed the connection]
chendo_ has quit [Ping timeout: 252 seconds]
chendo_ has joined #ruby-lang
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
gia has joined #ruby-lang
blazes816 has quit [Quit: blazes816]
bzalasky has joined #ruby-lang
guns has quit [Quit: guns]
ryanv-raptor has joined #ruby-lang
<whitequark>
banisterfiend: I believe that __callee__ was removed because of performance concerns
<whitequark>
also, be wary: proc{}.binding is about to be nuked too.
chendo_ has quit [Ping timeout: 252 seconds]
lun_ has quit [Ping timeout: 255 seconds]
<banisterfiend>
__callee__ still exists, it just does the same thing as __method__ now, they both just return symbols, but __callee__ used to return the name of the alias rather than the original method
<banisterfiend>
yeah, sucks about Proc#binding
<banisterfiend>
that thing is magic
<whitequark>
also a real PITA for implementors
<whitequark>
it should die for good
chendo_ has joined #ruby-lang
gregmoreno has quit [Ping timeout: 260 seconds]
mjio has quit []
havenn has quit [Remote host closed the connection]
mistym has quit [Remote host closed the connection]
bzalasky has quit [Remote host closed the connection]
mjio has joined #ruby-lang
cirenyc has joined #ruby-lang
cirenyc has quit [Client Quit]
kentos has quit [Remote host closed the connection]
peppyheppy_ has joined #ruby-lang
ilyam has quit [Remote host closed the connection]
ilyam has joined #ruby-lang
peppyheppy_ has quit [Client Quit]
peppyheppy has quit [Ping timeout: 276 seconds]
ryanv-raptor has quit [Quit: Leaving.]
charliesome has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
mephux has quit [Excess Flood]
mephux has joined #ruby-lang
chimkan_ has joined #ruby-lang
djbender has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
headius has quit [Quit: headius]
guns has joined #ruby-lang
gregmoreno has joined #ruby-lang
s1n4 has quit [Quit: leaving]
bzalasky has joined #ruby-lang
datanoise has quit [Ping timeout: 256 seconds]
methods has left #ruby-lang [#ruby-lang]
towski has quit [Remote host closed the connection]
imajes has quit [Excess Flood]
techlife has quit [Ping timeout: 252 seconds]
imajes has joined #ruby-lang
Bearproof has joined #ruby-lang
Bearproof has left #ruby-lang [#ruby-lang]
intellitech has joined #ruby-lang
sepp2k has joined #ruby-lang
techlife has joined #ruby-lang
ruby-lang408 has joined #ruby-lang
ryanf has joined #ruby-lang
djbender has left #ruby-lang [#ruby-lang]
benwoody has quit [Remote host closed the connection]
benwoody has joined #ruby-lang
ilyam has quit [Quit: ilyam]
ruby-lang408 has left #ruby-lang [#ruby-lang]
alvaro_o has quit [Quit: Ex-Chat]
mrbloo has quit [Quit: mrbloo]
therod has joined #ruby-lang
mrbloo has joined #ruby-lang
mrbloo has left #ruby-lang [#ruby-lang]
imajes has quit [Excess Flood]
srbaker has quit [Quit: Computer has gone to sleep.]
imajes has joined #ruby-lang
therod has quit [Ping timeout: 264 seconds]
AndrewNTH has joined #ruby-lang
<AndrewNTH>
how do i install a gem for 1.8 when i have 1.9 too
<AndrewNTH>
1.8.7
krohrbaugh has joined #ruby-lang
lsegal has joined #ruby-lang
datanoise has joined #ruby-lang
towski has joined #ruby-lang
AndChat| has joined #ruby-lang
Banistergalaxy has quit [Ping timeout: 248 seconds]
bzalasky has quit [Remote host closed the connection]
swav has quit [Remote host closed the connection]
bluepojo has quit [Remote host closed the connection]
bluepojo has joined #ruby-lang
datanoise has quit [Ping timeout: 248 seconds]
mrsolo has joined #ruby-lang
sailias has joined #ruby-lang
ryanv-raptor has joined #ruby-lang
bluepojo has quit [Ping timeout: 264 seconds]
Rarrikins has joined #ruby-lang
ilyam has joined #ruby-lang
rsl has quit [Quit: Computer has gone to sleep.]
itsmeduncan has quit [Quit: itsmeduncan]
Rarrikins_v has joined #ruby-lang
lcdhoffman has joined #ruby-lang
Rarrikins has quit [Ping timeout: 248 seconds]
rsl has joined #ruby-lang
dhruvasagar has joined #ruby-lang
mrsolo has quit [Quit: Leaving]
ilyam has quit [Quit: ilyam]
mjio has quit []
ilyam has joined #ruby-lang
torrieri has joined #ruby-lang
bzalasky has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
dbelley has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
imperator has joined #ruby-lang
ryanv-raptor has quit [Quit: Leaving.]
sepp2k has quit [Ping timeout: 248 seconds]
ryanf has quit [Ping timeout: 260 seconds]
brianpWins has joined #ruby-lang
sepp2k has joined #ruby-lang
sepp2k has quit [Ping timeout: 248 seconds]
postmodern has joined #ruby-lang
datanoise has joined #ruby-lang
Aria has quit [Remote host closed the connection]
dcwu has joined #ruby-lang
erichmenge has quit [Quit: Arrivederci!]
techlife has quit [Ping timeout: 245 seconds]
jasiek has quit [Read error: Connection reset by peer]
jasiek has joined #ruby-lang
datanoise has quit [Ping timeout: 252 seconds]
erichmenge has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 245 seconds]
dhruvasagar has joined #ruby-lang
techlife has joined #ruby-lang
techlife has quit [Max SendQ exceeded]
techlife has joined #ruby-lang
techlife has quit [Max SendQ exceeded]
techlife has joined #ruby-lang
swav has joined #ruby-lang
swav has quit [Ping timeout: 248 seconds]
sepp2k has joined #ruby-lang
sailias has quit [Quit: Leaving.]
__BigO__ has joined #ruby-lang
cordax has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
spuk has quit [Ping timeout: 245 seconds]
__BigO__ has quit [Remote host closed the connection]
__BigO__ has joined #ruby-lang
tomzx_mac has quit [Read error: Operation timed out]
kgrz has joined #ruby-lang
AndrewNTH has left #ruby-lang [#ruby-lang]
spuk has joined #ruby-lang
bradland has quit [Quit: bradland]
ramonmaruko has quit [Remote host closed the connection]
__BigO__ has quit [Remote host closed the connection]
ramonmaruko has joined #ruby-lang
toretore has joined #ruby-lang
__BigO__ has joined #ruby-lang
mjio has joined #ruby-lang
ryanf has joined #ruby-lang
__BigO__ has quit [Remote host closed the connection]
ryanf has quit [Ping timeout: 255 seconds]
bluepojo has joined #ruby-lang
robbyoconnor has joined #ruby-lang
imperator has left #ruby-lang ["Leaving"]
ramonmaruko has quit [Remote host closed the connection]
mjio has quit []
mjio has joined #ruby-lang
CoverSlide has quit [Ping timeout: 240 seconds]
ramonmaruko has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
krz has joined #ruby-lang
chimkan_ has quit [Quit: chimkan_]
JohnBat26 has joined #ruby-lang
CoverSlide has joined #ruby-lang
Guest____ has joined #ruby-lang
Guest____ has quit [Client Quit]
ilyam has quit [Quit: ilyam]
bzalasky has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
cordax has quit [Quit: Computer has gone to sleep.]
solars has joined #ruby-lang
unlikely_monkey has quit [Remote host closed the connection]
peppyheppy has joined #ruby-lang
ruurd has joined #ruby-lang
mjio has quit []
savagecroc has joined #ruby-lang
neocoin has quit [Remote host closed the connection]
JohnBat26 has joined #ruby-lang
savagecroc has quit [Ping timeout: 244 seconds]
adam12 has quit [Read error: Operation timed out]
gregmore_ has quit [Remote host closed the connection]
mars777_ has joined #ruby-lang
mars777 has quit [Read error: Connection reset by peer]
mars777_ is now known as mars777
dhruvasagar has joined #ruby-lang
torrieri has quit [Quit: Leaving...]
sepp2k has quit [Remote host closed the connection]
adam12 has joined #ruby-lang
gjaldon has quit [Remote host closed the connection]
mercwithamouth has quit [Quit: leaving]
Weems2 has joined #ruby-lang
Weems has quit [Read error: Connection reset by peer]
mercwithamouth has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
chekcmate has joined #ruby-lang
<chekcmate>
hi all
neocoin has joined #ruby-lang
sn0wb1rd has joined #ruby-lang
havenn has joined #ruby-lang
therod has joined #ruby-lang
guns has quit [Quit: guns]
ryanf has joined #ruby-lang
vlad_starkov has joined #ruby-lang
therod has quit [Ping timeout: 255 seconds]
mercwithamouth has quit [Ping timeout: 260 seconds]
charliesome has joined #ruby-lang
facest has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
faces has quit [Ping timeout: 264 seconds]
towski has quit [Ping timeout: 276 seconds]
lun_ has joined #ruby-lang
charliesome has quit [Ping timeout: 252 seconds]
justinseiter has quit [Ping timeout: 276 seconds]
justinseiter has joined #ruby-lang
phlipper is now known as phlipper_zzz
charliesome has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
<injekt>
moin
jxie has quit [Quit: leaving]
wallerdev has quit [Quit: wallerdev]
cmatheson has joined #ruby-lang
<chekcmate>
injekt: my utf8 problem vanished
<chekcmate>
I don't know how or why, but after removing everything which had anything to do with setting UTF-8 and only keeping "#Encoding: UTF-8" at the beginning, it worked
<chekcmate>
though that's what I tried at the beginning... I wonder if it has anything to do on how I process the Nokogiri stuff...
havenn has quit [Remote host closed the connection]
havenn has joined #ruby-lang
ryanf has quit [Quit: broken pipes |||]
gnufied has joined #ruby-lang
havenn has quit [Ping timeout: 255 seconds]
ryanf has joined #ruby-lang
zmack has joined #ruby-lang
gix has quit [Ping timeout: 248 seconds]
gregmoreno has joined #ruby-lang
gregmoreno has quit [Ping timeout: 240 seconds]
gix has joined #ruby-lang
Averna has quit [Quit: Leaving.]
vlad_starkov has quit [Remote host closed the connection]
robotmay has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
<yorickpeterse>
Morning
chimkan__ has quit [Read error: Connection reset by peer]
maxmanders has joined #ruby-lang
chimkan_ has joined #ruby-lang
havenn has joined #ruby-lang
chimkan_ has quit [Ping timeout: 246 seconds]
ddv has quit [Ping timeout: 240 seconds]
chimkan has joined #ruby-lang
dhruvasagar has quit [Remote host closed the connection]
AntiTyping has quit [Quit: AntiTyping]
ddv has joined #ruby-lang
ryanf has quit [Quit: leaving]
dr_bob has joined #ruby-lang
<gnufied>
morning
rue has quit [Remote host closed the connection]
rue has joined #ruby-lang
ddv has joined #ruby-lang
ddv has quit [Changing host]
gia has quit [Ping timeout: 245 seconds]
v1p has joined #ruby-lang
workmad3 has joined #ruby-lang
adambeynon has joined #ruby-lang
dhruvasagar has joined #ruby-lang
<chekcmate>
tehe, everyone's slowly crawling out of their shells
judofyr has joined #ruby-lang
<judofyr>
morning!
Gekz has quit [Quit: No Ping reply in 180 seconds.]
Gekz has joined #ruby-lang
Gekz has quit [Changing host]
Gekz has joined #ruby-lang
wudofyr_ has quit [Ping timeout: 244 seconds]
freedrull has quit [Ping timeout: 260 seconds]
freedrull has joined #ruby-lang
nXqd has joined #ruby-lang
spectra- has quit [Ping timeout: 276 seconds]
spectra has joined #ruby-lang
justinseiter has quit [Remote host closed the connection]
jxie has joined #ruby-lang
wudofyr_ has joined #ruby-lang
rippa has joined #ruby-lang
mytrile has joined #ruby-lang
hakunin has quit [Remote host closed the connection]
hakunin has joined #ruby-lang
havenn has quit [Remote host closed the connection]
<banisterfiend>
postmodern: was it you who discovered that rubygems vulnerability?
sailias has joined #ruby-lang
mann has quit [Read error: Connection reset by peer]
<judofyr>
banisterfiend: discovered? well, there's been lots of people working on this. it's essentially the same vulnerability that was in Rails. and I know that blambeau reported it to rubygems.org a week ago
<postmodern>
banisterfiend, actually blambleau first reported it a couple weeks ago
<banisterfiend>
oh ok
spinagon has quit [Ping timeout: 240 seconds]
<postmodern>
banisterfiend, envygeeks also brought it up in an issue
innohero has quit [Quit: Leaving]
lajlev has quit [Quit: lajlev]
innohero has joined #ruby-lang
<judofyr>
it would be interesting to re-design the whole rubygems.org infrastructure. e.g. make it easier to create mirrors.
<postmodern>
judofyr, i think that's going to happen
<damncabbage>
Ruby CPAN? ;)
sailias has quit [Quit: Leaving.]
<postmodern>
judofyr, they are already rebuilding the infrastructure with chef, and people were working on an rsync mirror system
<judofyr>
postmodern: what about the dependency API?
<lianj>
its always easy to say afterwards, but why have checksums stored from the beginning? also would be nice if you could just link a github repo and let rubygems build the gem. then all you had todo is Gems.from_gitub_sources.rebuild!
<lianj>
s/why/why not/
<postmodern>
lianj, now there's an idea
<postmodern>
lianj, would be nice if gemspecs could become plain-text that just listed metadata
<postmodern>
would make it safer to pull down git repos and build gems from them
JohnBat26 has joined #ruby-lang
<lianj>
for siged gems the 'let rubygems build it' sadly wont work. unless they sign it then
<damncabbage>
postmodern: But won't you think of the (require 'lib/my_gem/version'; MyGem::VERSION)?
<judofyr>
postmodern: JSON would be nice
<judofyr>
damncabbage: the gemspec can still be Ruby
<damncabbage>
Now I'm confused. Plain-text, but still Ruby?
<judofyr>
damncabbage: that's actually how it is now. the gemspec file generates a YAML-file
<damncabbage>
Ah.
s1n4 has quit [Quit: leaving]
<postmodern>
damncabbage, yeah that's a tricky problem
<postmodern>
judofyr, totes
<postmodern>
judofyr, i use a plain YAML file for my gems, and a gemspec that loads it
<postmodern>
judofyr, Haskell has Cabal, which uses simple key: value settings in a plaintext file
<judofyr>
postmodern: I still feel JSON is the best format here. everybody knows it.
noop has quit [Remote host closed the connection]
<judofyr>
anyway
<judofyr>
I'm more interested in how to structure the actual files
<postmodern>
damncabbage, you could use the git tag as the version instead
<lianj>
postmodern: and should
<judofyr>
so that it's easy to mirror, and still possible to quickly figure out dependencies
<damncabbage>
judofyr: But then all the node.js and PHP people would laugh at us.
<damncabbage>
(Re: JSON. I kid.)
chimkan has joined #ruby-lang
<postmodern>
i also wish the .gem format would be simplified
<yorickpeterse>
lets not tie Rubygems into Git
<postmodern>
it's a tar containing data.tar.gz and metadata.gz
<postmodern>
yorickpeterse, we could support multiple SCMs, provided we can list tags
<judofyr>
(I'm mostly thinking about the Bundler-usecase where you have a bunch of requirements that you want to fulfill with as few requests to the server as possible)
<judofyr>
postmodern: meh. why not just keep it a ruby-file (that generates JSON) and then people can use whatever they want?
<yorickpeterse>
^
<postmodern>
judofyr, then you have to re-generate the file
<postmodern>
judofyr, like when we used to re-generate gemspecs back in the day
ryanv-raptor has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
<postmodern>
OpenSSL::Cipher::Cipher inherits from OpenSSL::Cipher
<postmodern>
down the rabbit hole i go
mytrile has joined #ruby-lang
<judofyr>
postmodern: I don't understand what you mean? re-generate the file?
<yorickpeterse>
Smurf::SmuftClass::Smurf
<postmodern>
judofyr, er when would the file be generated?
<judofyr>
postmodern: when you build a gem
<postmodern>
judofyr, think i confused it with like a static gemspec
<postmodern>
judofyr, ah right yeah
<judofyr>
:)
__BigO__ has joined #ruby-lang
<postmodern>
judofyr, you should have a dynamic gemspec with implicit files
<postmodern>
judofyr, and when you package, it becomes a static/explicit one
<postmodern>
judofyr, i find it anti-DRY that we keep repeating `git ls-files`
<postmodern>
yorickpeterse, Smurfs all the way down
agarcia has joined #ruby-lang
<postmodern>
#iv= but no #iv
ruby-lang321 has quit [Ping timeout: 245 seconds]
ddv has quit [Changing host]
ddv has joined #ruby-lang
<judofyr>
postmodern: *shrugs* I'm really more interested in the distribution part (supporting mirroring)
S1kx has quit [Read error: Connection reset by peer]
S1kx has joined #ruby-lang
<postmodern>
judofyr, i thought about the problem a little bit with Ore
<postmodern>
judofyr, really wish gems would just turn into .tgz packages
<postmodern>
judofyr, but yeah, verified mirrors would make me feel safer
<yorickpeterse>
judofyr: get your bro out, I want to hack a mirror system together this weekend
socialcoder has joined #ruby-lang
havenn has joined #ruby-lang
<yorickpeterse>
Though I most likely will start tomorrow afternoon during $WORK time
<yorickpeterse>
Since we need one anyway
<postmodern>
judofyr, that the ruby ecosystem couldn't be stopped by one power outage, backhoe or EC2 outage
<judofyr>
yorickpeterse: busy this weekend :/
<yorickpeterse>
pffffff
<yorickpeterse>
I'm busy every day, no fucks given
<postmodern>
*erry day
<socialcoder>
hi All
<postmodern>
socialcoder, hola
<judofyr>
yorickpeterse: so, will you base it on the current structure, or do you want to re-organize it?
<yorickpeterse>
What I have in mind is completely different
<judofyr>
yorickpeterse: e.g. will it just be a mirror system for the current rubygems.org, or do you want to solve the underlying "problem"? :-)
<yorickpeterse>
Basically what it would do is generate a list of static files that `gem` can work with
<yorickpeterse>
And it will *only* be a mirror, no pushing and what not
<yorickpeterse>
So basically Geminabox that is capable of handling large gems and has no pushing
<yorickpeterse>
and doesn't require Sinatra and the likes
<yorickpeterse>
that in turn means you can just mirror a mirror using rsync (For example)
<judofyr>
yorickpeterse: I like it. but, how to deal with dependencies?
havenn has quit [Ping timeout: 248 seconds]
<judofyr>
or, dependency resolution?
<judofyr>
(for Bundler)
<yorickpeterse>
I'd have to look into that but it should be possible by providing the correct structure
gjaldon has joined #ruby-lang
<yorickpeterse>
(as in, directory/file structure)
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
x0F_ is now known as x0F
<judofyr>
yorickpeterse: a good example: you have `gem "rails", "~> 3.2.0"; gem "foobar", "~> 1.2.3"` in a Gemfile. let's say rails depends on foobar through actionpack. how can you detect what version of foobar to pick?
<postmodern>
yorickpeterse, also could use symlinks creatively
<judofyr>
yorickpeterse: right now there's dependency API that helps out, but if it's too complex it falls back to "download metadata about *all* gems"
<vlad_starkov>
Question: how to convert ['0.25', '11', 'Welcome'] to { price: '0.25', count: '11', title: 'Welcome' } ?
<vlad_starkov>
*map
<heftig>
[:price, :count, :welcome].zip I've had it with people whining about 'guns kill people,' guns don't kill people, death kills people. Ask a doctor, it's a medical fact. You can't die from a bullet. You can die from a cardiac arrest or organ failure or a major hemorrhage, small piece of metal ain't the problem. Besides, I
<yorickpeterse>
judofyr: haven't really looked into that part yet, at this moment it's mostly just an idea in the back of my head
mytrile has quit [Remote host closed the connection]
erichmenge has quit [Quit: Arrivederci!]
erichmenge has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
tos9 has quit [Excess Flood]
tos9 has joined #ruby-lang
robotmay_ has joined #ruby-lang
robotmay has quit [Ping timeout: 260 seconds]
robotmay has joined #ruby-lang
socialcoder has quit [Ping timeout: 246 seconds]
robotmay_ has quit [Ping timeout: 248 seconds]
wycats__ has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Kallikanzarid has quit [Ping timeout: 240 seconds]
wycats_ has quit [Ping timeout: 240 seconds]
Kallikanzarid has joined #ruby-lang
wycats__ is now known as wycats_
sailias has joined #ruby-lang
remi has joined #ruby-lang
jrafanie has joined #ruby-lang
sailias1 has joined #ruby-lang
sailias has quit [Read error: Connection reset by peer]
dustint has joined #ruby-lang
sailias1 has quit [Client Quit]
sailias has joined #ruby-lang
chimkan__ has joined #ruby-lang
bradland has joined #ruby-lang
banisterfiend has quit [Ping timeout: 245 seconds]
chimkan has quit [Ping timeout: 252 seconds]
chimkan__ is now known as chimkan
kgrz has joined #ruby-lang
neocoin_ has joined #ruby-lang
neocoin has quit [Read error: Connection reset by peer]
carloslopes has quit [Remote host closed the connection]
mistym has joined #ruby-lang
lun_ has joined #ruby-lang
sailias has quit [Quit: Leaving.]
banisterfiend has joined #ruby-lang
s1n4 has joined #ruby-lang
<injekt>
haha
robotmay has quit [Ping timeout: 255 seconds]
<judofyr>
heftig: you're on the interwebs!
jtoy has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
jtoy_ has joined #ruby-lang
tomzx_mac has joined #ruby-lang
jtoy has quit [Ping timeout: 245 seconds]
jtoy_ is now known as jtoy
robotmay has joined #ruby-lang
postmodern has quit [Quit: Leaving]
tdy has quit [Ping timeout: 264 seconds]
tdy has joined #ruby-lang
dorei has joined #ruby-lang
<dorei>
hello, do you know how can I play a sound from within ruby?
<chekcmate>
require 'win32/sound' include Win32 Then, to play a sound file on the PC, call the Sound.play method, passing it the name of the file... Sound.play('chimes.wav') Sound.play('c:\sounds\hal9000.wav')
rsl has joined #ruby-lang
<chekcmate>
like that?
grough has joined #ruby-lang
<chekcmate>
it's for windows though
<dorei>
chekcmate: i'd prefer to feed it with an array of bytes, but i guess win32/sound is fine :) thanx a lot
tbuehlmann has quit [Remote host closed the connection]
ax has joined #ruby-lang
<ax>
is it possible to include one method from a module? say i'm using Math.log a bunch, like in c++ you can do using std::cout; ?
<drbrain>
ax: module inclusion is all or none
<ax>
ahh, bummer
mytrile has joined #ruby-lang
<ax>
i guess i can do m = Math and type m.log instead of Math.log
headius has quit [Quit: headius]
krohrbaugh has quit [Quit: Leaving.]
jonahR has joined #ruby-lang
therod has joined #ruby-lang
krohrbaugh has joined #ruby-lang
therod has quit [Read error: Connection reset by peer]
banisterfiend has quit [Remote host closed the connection]
sailias1 has joined #ruby-lang
rodrigo has quit [Ping timeout: 245 seconds]
Uranio has joined #ruby-lang
sailias has quit [Ping timeout: 264 seconds]
osaut has joined #ruby-lang
gnufied has quit [Quit: Leaving.]
jgv has joined #ruby-lang
mercwithamouth has quit [Ping timeout: 246 seconds]
socialcoder has quit []
banisterfiend has joined #ruby-lang
krohrbaugh has quit [Quit: Leaving.]
geopet has joined #ruby-lang
Stilo has joined #ruby-lang
bfleischer has quit [Quit: bfleischer]
maxmanders has joined #ruby-lang
__BigO___ has quit [Remote host closed the connection]
jtoy has joined #ruby-lang
<RickHull>
ax: yeah, i'll usually use a Capital for that, e.g. M = Math but Math is so short that i wouldn't bother
ilyam has joined #ruby-lang
bfleischer has joined #ruby-lang
<ax>
yeah.. editor completion, not _too_ bad
<ax>
was mostly just curious
agile has joined #ruby-lang
<ryanv-raptor>
couldn't you just define the method locally and proxy it to the Math module?
<RickHull>
if you really wanted to, you could just "def log" in whatever scope you want
bfleischer has quit [Client Quit]
<ryanv-raptor>
exactly
hahuang65 has joined #ruby-lang
therod has joined #ruby-lang
<ax>
yeah
<RickHull>
that's one of those things, if i came across it, i'd say WTF. better to optimize for maintenance, minimize mystery, than to optimize for typing less
mercwithamouth has joined #ruby-lang
<RickHull>
if it's a long name and would cause line wrapping, then sure, M = ArithmeticAndStuff
<RickHull>
but i wouldn't bother defining methods to save a few chars
<RickHull>
if you're really going to be doing a lot of math-heavy stuff, then you might go whole hog and make/use a math DSL to optimize for readability
bfleischer has joined #ruby-lang
krohrbaugh1 has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
havenn has joined #ruby-lang
therod has quit [Read error: Connection reset by peer]
havenn has quit [Ping timeout: 255 seconds]
mistym is now known as mistym_lunch
bzb has quit [Quit: Leaving]
tbuehlmann has joined #ruby-lang
therod has joined #ruby-lang
musl has quit [Quit: WeeChat 0.3.9.2]
ryanf has joined #ruby-lang
musl has joined #ruby-lang
grough has joined #ruby-lang
grough has quit [Client Quit]
grough has joined #ruby-lang
ax has left #ruby-lang [#ruby-lang]
derekprior has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
chimkan has quit [Quit: chimkan]
ivanoats has quit [Remote host closed the connection]
enebo has joined #ruby-lang
rippa has quit [Read error: Connection reset by peer]
rippa has joined #ruby-lang
setmeaway has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
Bosox20051 has joined #ruby-lang
mytrile has joined #ruby-lang
bluepojo has joined #ruby-lang
mytrile has quit [Read error: Connection reset by peer]
mytrile_ has joined #ruby-lang
rippa has quit [Ping timeout: 240 seconds]
chimkan has joined #ruby-lang
jacktrick has joined #ruby-lang
hahuang65 has quit [Quit: Computer has gone to sleep.]
__BigO__ has joined #ruby-lang
shtirlic has quit [Remote host closed the connection]
glebm has quit [Quit: Computer has gone to sleep.]
grough has quit [Quit: Computer has gone to sleep.]
Ubuntu80 has joined #ruby-lang
Ubuntu80 has quit [Quit: Leaving]
dankest has joined #ruby-lang
Uranio has quit [Quit: while you reading this, a kitty dies]
mistym has quit [Remote host closed the connection]
jbsan has quit [Quit: jbsan]
jbsan has joined #ruby-lang
mytrile_ has quit [Remote host closed the connection]
Weems2 is now known as Weems
Weems has quit [Changing host]
Weems has joined #ruby-lang
wnd has quit [Excess Flood]
wnd has joined #ruby-lang
datanoise has quit [Remote host closed the connection]
<blazes816>
jtoy: Ruby implements set with hash, so they should be the same
<blazes816>
O(1) test for inclusion
<jtoy>
blazes816 too bad there isn't a native set
mytrile has joined #ruby-lang
<injekt>
eh
<injekt>
it's a native hash
__BigO___ has joined #ruby-lang
<injekt>
your overhead is method calls
mytrile has quit [Remote host closed the connection]
mytrile has joined #ruby-lang
<banisterfiend>
i dont think sets are used often enough to warrant a literal syntax either
<banisterfiend>
do any mainstream-ish languages have set literals?
<injekt>
python?
toretore has quit [Quit: Leaving]
__BigO__ has quit [Ping timeout: 248 seconds]
carloslopes has quit [Remote host closed the connection]
<blazes816>
in python sets are in the stdlib
<injekt>
no
<injekt>
they're in core
<injekt>
in 2.7+ anyway
<blazes816>
you don't have to from sets import Set?
<injekt>
nope
<blazes816>
ah, I'm stuck on 2.6
<injekt>
set()
<injekt>
ah
<whitequark>
injekt: that's still not a set literal
<blazes816>
no, but it is in core
<injekt>
I just read this "Curly brackets are used to surround the contents of the resulting mutable set; set literals are distinguished from dictionaries by not containing colons and values" so perhaps not but I was quoting what I read
<injekt>
looks like their is
<injekt>
there*
<whitequark>
hm
<injekt>
2.7 backported them from 3.0
s1n4 has joined #ruby-lang
<injekt>
>>> {1,2,3}
<injekt>
set([1, 2, 3])
<injekt>
;)
hahuang65 has joined #ruby-lang
sora_h has quit [Excess Flood]
<injekt>
but anyway yeah I wouldn't see the benefit of having set literals in ruby
sora_h has joined #ruby-lang
<injekt>
however, using {1,2,3} could be implemented
lcdhoffman has joined #ruby-lang
<whitequark>
injekt: please, don't add 3rd overloaded semantics to {
<whitequark>
it's too complex as it is
<injekt>
whitequark: it's only discussion, don't wet yourself
<RickHull>
i'd rather have a tuple literal than an array literal
<RickHull>
i use arrays as tuples everywhere
<whitequark>
RickHull: arrays *are* tuples in ruby
<whitequark>
well, kind of
<RickHull>
they have a ton of non-tuple functionality
<RickHull>
but yes, i am in violent agreement
<RickHull>
i'd prefer to use mere tuples as tuples
srbaker has joined #ruby-lang
<injekt>
RickHull: you mean arrays having a single shared object type and tuples being basically what ruby arrays already are?
<RickHull>
i guess. maybe arrays don't have all that much non-tuple functionality
willdrew has joined #ruby-lang
<whitequark>
RickHull: in a dynamically typed language, the only distinction between arrays and types would be immutability of the latter
<RickHull>
i'm not arguing for homogenous types
<RickHull>
i'm just thinking of tuples as being the base collection type
mephux has quit [Excess Flood]
<RickHull>
and maybe array adds additional array specific functionality
<RickHull>
i regret using the word type after collection, above
<whitequark>
RickHull: what would be that "array specific functionality"?
<RickHull>
yeah, it looks like i'm barking up the wrong tree. both tuples and arrays are ordered collections with indices. i'm not seeing array methods going beyond that
tbuehlmann has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
jonahR has quit [Remote host closed the connection]
jonahR has joined #ruby-lang
osaut has quit [Quit: osaut]
dankest has quit [Quit: Leaving...]
CoverSlide has quit [Remote host closed the connection]
neocoin_ has quit [Remote host closed the connection]
dragonkh has joined #ruby-lang
MaddinXx has quit [Remote host closed the connection]
cored has quit [Ping timeout: 264 seconds]
jonahR has quit [Quit: jonahR]
Bearproof has joined #ruby-lang
blacktulip has quit [Remote host closed the connection]
sailias1 has quit [Ping timeout: 255 seconds]
cored has joined #ruby-lang
cored has quit [Changing host]
cored has joined #ruby-lang
thone_ has joined #ruby-lang
maxmanders has quit [Ping timeout: 256 seconds]
thone has quit [Ping timeout: 276 seconds]
Bearproof has quit [Quit: Leaving.]
Nisstyre has quit [Ping timeout: 252 seconds]
peppyheppy_ has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
jbsan has quit [Read error: Connection reset by peer]
peppyheppy has quit [Ping timeout: 252 seconds]
peppyheppy_ is now known as peppyheppy
pr0ton has joined #ruby-lang
<pr0ton>
if i have a function like
<pr0ton>
def fu(x) return x\n[]\nend
<pr0ton>
what does it mean?
<pr0ton>
does [] clone the array or something?
<ryanv-raptor>
is that a newline after the return statement?
<drbrain>
pr0ton: [] is never executed
<pr0ton>
what is that for then?
<ryanv-raptor>
nothing apparently
<pr0ton>
oh wait. my bad
<pr0ton>
it seems to be part of a ternary operator
maxmanders has joined #ruby-lang
<pr0ton>
return x if … \n []
<ryanv-raptor>
ah, so it returns an empty array if the condition isn't met
<drbrain>
pr0ton: ↑
<ryanv-raptor>
[] is just an empty array
brianpWins has quit [Remote host closed the connection]
<ryanv-raptor>
and it would be the last statement executed, so it would be the return value
<pr0ton>
alrighty thanks. and sorry for being silly -.-
brianpWins has joined #ruby-lang
<drbrain>
pr0ton: we welcome such questions
mjio has joined #ruby-lang
Nisstyre has joined #ruby-lang
bfleischer has left #ruby-lang [#ruby-lang]
peppyheppy has quit [Quit: peppyheppy]
willdrew has quit [Ping timeout: 264 seconds]
scampbell has quit [Quit: Leaving]
krohrbaugh has quit [Read error: Connection reset by peer]
Stilo has joined #ruby-lang
krohrbaugh has joined #ruby-lang
bantic has joined #ruby-lang
therod has quit [Remote host closed the connection]
Nisstyre-laptop has quit [Ping timeout: 245 seconds]
<andrewvos>
YAML: Not even once.
<pr0ton>
#yolo. you only yaml once
<pr0ton>
yoyo **
<pr0ton>
fml
<injekt>
you only laml once
<andrewvos>
haha
<andrewvos>
<3 injekt
<drbrain>
YAML Only Loved Once
<lianj>
but strong
<zzak>
drbrain: you removed yaml specs, right?
<drbrain>
zzak: no
<drbrain>
zzak: we've examined S3 gem YAML metadata for exploit payload and found none, status.rubygems.org links to a page with our current findings and stutus
<drbrain>
status
grough has quit [Quit: Computer has gone to sleep.]
<zzak>
nice, but i thought i remembered you removing yaml gem specs
maxmanders has quit [Ping timeout: 240 seconds]
tedwa98075 has joined #ruby-lang
solars has quit [Ping timeout: 246 seconds]
krohrbaugh has quit [Quit: Leaving.]
tedwa98075 has left #ruby-lang [#ruby-lang]
maxmanders has joined #ruby-lang
Bearproof has joined #ruby-lang
<drbrain>
no, if I do that old rubygems won't be able to install
mjolk has quit [Quit: This computer has gone to sleep]
carloslopes has joined #ruby-lang
idkazuma has joined #ruby-lang
Bearproof has quit [Quit: Leaving.]
Bearproof has joined #ruby-lang
<mistym>
drbrain: Out of curiosity, do you know what the oldest ruby version rubygems supports is?
<drbrain>
mistym: ruby 1.8.7 is supported by rubygems 1.8.25 and will be supported by rubygems 2.0.0
<drbrain>
I think you need to go back to RubyGems 1.3.x to get 1.8.6 support, but History.txt will say
<mistym>
I'll take a look, thanks.
forrest has quit [Quit: Leaving]
<drbrain>
mistym: you should be able to use RubyGems with rubygems.org back on ruby back to ruby 1.8.2
<drbrain>
rubygems 1.2.0 is the oldest that works with rubygems.org