<andrewvos>
drbrain: Are there any plans to protect against this in thee future?
<zenspider>
rewrite everything in sinatra!
<andrewvos>
:)
<andrewvos>
Would that have even made a difference?
<manveru>
gemspecs in sinatra? way more secure!
<andrewvos>
I think I am getting trolled.
<drbrain>
andrewvos: I think the patch for the YAML vector for this exploit was fixed before the infrastructure rebuild started
<drbrain>
there was an aborted attempt to switch the infrastructure to AWS some months ago, so Evan and Nick decided to do that work now instead of delaying it further
<andrewvos>
drbrain: This was no Rails issue though was it? I guessed rubygems was just parsing some yaml inside the gem files.
<drbrain>
andrewvos: it was a combination of the Rails issue and YAML coming from .gem files
<zzak>
zenspider: i didnt even know minitest could lose 200 lines
<zenspider>
yeah. it's certainly got some cruft
<zzak>
is that from the tu bridge?
<zenspider>
no. tu bridge is entirely separate (and not maintained really)
<zzak>
oh ok
<zenspider>
this was assert_block and then a bunch of runtime hooks we added for spec
<zenspider>
but tenderlove and I wound up reworking the entire lifecycle hooks so that rails would be cleaner
<zzak>
always good to remove old code :)
<zenspider>
nice. now I flog 909 less than test/unit
<zzak>
when testing was brought up at burlington ruby, quite a few people favored minitest over rspec
<zenspider>
interesting
<zzak>
quite a few sinatra fans there too
<zenspider>
aja gave a lightning talk aa while back and we were both surprised at how few people rose their hands when she asked who did tdd
<zenspider>
double nice
<zzak>
so my next talk might inevitably be, testing sinatra apps with minitest haha
<zzak>
not specific to minitest, but thats what i plan to use
<zenspider>
I'd like to see that
<zzak>
you can do some neat stuff with Sinatra.new
kmlawson has quit [Quit: kmlawson]
<zzak>
haha i just realized you had planned assert_block removed on this exact date
<zzak>
zenspider: way to follow through and stand by your word +1
lcdhoffman has joined #ruby-lang
kmlawson has joined #ruby-lang
ReinH has quit [Read error: Connection reset by peer]
gregmore_ has joined #ruby-lang
kmlawson has left #ruby-lang [#ruby-lang]
tylersmith has quit [Quit: tylersmith]
gregmore_ has quit [Ping timeout: 276 seconds]
drbrain has quit [Ping timeout: 255 seconds]
OneWhoFrogs has joined #ruby-lang
Vektur has joined #ruby-lang
cardoni has quit [Quit: cardoni]
tenderlove has quit [Remote host closed the connection]
dzhulk has joined #ruby-lang
mercwithamouth has quit [Ping timeout: 252 seconds]
dous has joined #ruby-lang
mwjcomputing has joined #ruby-lang
krohrbaugh has joined #ruby-lang
rsl has quit [Quit: Computer has gone to sleep.]
benanne has quit [Quit: kbai]
dhruvasagar has joined #ruby-lang
dhruvasa1ar has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
mercwithamouth has joined #ruby-lang
JMcAfreak has quit [Ping timeout: 246 seconds]
tomzx_mac has joined #ruby-lang
shiro has quit [Remote host closed the connection]
cardoni has joined #ruby-lang
spuk has quit [Ping timeout: 264 seconds]
spuk has joined #ruby-lang
drbrain has joined #ruby-lang
cardoni has quit [Ping timeout: 255 seconds]
charliesome has joined #ruby-lang
ulisescab has quit [Remote host closed the connection]
havenn has joined #ruby-lang
chimkan_ has joined #ruby-lang
alvaro_o has quit [Quit: Ex-Chat]
chimkan_ has quit [Read error: Connection reset by peer]
banister_ has quit [Read error: Connection reset by peer]
Rarrikins_k has joined #ruby-lang
Rarrikins has quit [Ping timeout: 256 seconds]
dustint has quit [Remote host closed the connection]
phlipper is now known as phlipper_
banister`sleep has joined #ruby-lang
havenn has quit [Remote host closed the connection]
mwjcomputing has quit [Ping timeout: 245 seconds]
cardoni has joined #ruby-lang
Rarrikins_k_c has joined #ruby-lang
ryanf has quit [Read error: Connection reset by peer]
ryanf has joined #ruby-lang
imajes has quit [Excess Flood]
Rarrikins_k has quit [Ping timeout: 246 seconds]
imajes has joined #ruby-lang
Rarrikins has joined #ruby-lang
Rarrikins_k_c has quit [Ping timeout: 276 seconds]
bluepojo has quit [Remote host closed the connection]
bluepojo has joined #ruby-lang
cardoni has quit [Ping timeout: 276 seconds]
ryanf has quit [Read error: Connection reset by peer]
ryanf has joined #ruby-lang
bluepojo has quit [Ping timeout: 246 seconds]
lcdhoffman has quit [Quit: lcdhoffman]
dustint has joined #ruby-lang
dustint has quit [Read error: Connection reset by peer]
lcdhoffman has joined #ruby-lang
Rarrikins_z has joined #ruby-lang
dustint has joined #ruby-lang
swav has joined #ruby-lang
dustint has quit [Client Quit]
dustint has joined #ruby-lang
Rarrikins has quit [Ping timeout: 252 seconds]
dustint has quit [Client Quit]
dustint has joined #ruby-lang
noReligion has joined #ruby-lang
<noReligion>
hi. I'm very new to Ruby (just finished a track of codeacademy and the first course on rubymond). I'm trying to get a feel for the existing ruby gems out there. I have gems installed. I'm having difficulties finding a list of existing gems with a short explanation of what they do. Any help?
<zzak>
noReligion: there's essentially a gem for anything you want to do
<noReligion>
can you please tell me how you found it?
<zzak>
i went to google and searched "symbolic mathematics ruby"
dcwu has joined #ruby-lang
<noReligion>
I see (feeling sheepish).
<noReligion>
so is there no centralized place to search for gems?
Nisstyre-laptop has joined #ruby-lang
banister`sleep has left #ruby-lang [#ruby-lang]
<zzak>
rubygems.org when it is back online
postmodern has joined #ruby-lang
banisterfiend has joined #ruby-lang
<zzak>
please see status.rubygems.org and #rubygems on freenode
<banisterfiend>
also ruby-toolbox.com
<noReligion>
ok, great. Thanks!
dhruvasagar has quit [Read error: Operation timed out]
dhruvasa1ar has quit [Read error: Operation timed out]
__butch__ has quit [Quit: Leaving.]
dhruvasagar has joined #ruby-lang
dhruvasa1ar has joined #ruby-lang
noReligion has quit [Quit: noReligion]
glebm has quit [Quit: Computer has gone to sleep.]
bzalasky has joined #ruby-lang
io_syl_ has joined #ruby-lang
io_syl has quit [Ping timeout: 245 seconds]
io_syl_ is now known as io_syl
ryanf has quit [Read error: Connection reset by peer]
ryanf has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
dous has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
srbaker has joined #ruby-lang
dous has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
ryanf has quit [Read error: Connection reset by peer]
ryanf has joined #ruby-lang
puq has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
bzalasky_ has joined #ruby-lang
bzalasky has quit [Read error: Connection reset by peer]
jbsan has joined #ruby-lang
ivanoats has joined #ruby-lang
cardoni has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
gouthamvel has joined #ruby-lang
puq has quit [Quit: Leaving]
lcdhoffman has quit [Quit: lcdhoffman]
gouthamvel has quit [Remote host closed the connection]
cardoni has quit [Ping timeout: 240 seconds]
naquad has quit [Ping timeout: 264 seconds]
bzalasky_ has quit [Remote host closed the connection]
lcdhoffman has joined #ruby-lang
My_Hearing has quit [Read error: Operation timed out]
My_Hearing has joined #ruby-lang
peppyheppy has joined #ruby-lang
<zzak>
vbatts: ping! i replied to #7656 and assigned it to you, but your patch to debug.rb landed in r39019. thanks!
<banisterfiend>
debug.rb is the scariest thing
ryanf has quit [Ping timeout: 246 seconds]
slyphon has quit [Quit: slyphon]
gokul has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 244 seconds]
lcdhoffman has quit [Quit: lcdhoffman]
hakunin has quit [Ping timeout: 248 seconds]
Axsuul has quit [Read error: Connection reset by peer]
Averna has joined #ruby-lang
imajes has quit [Excess Flood]
imajes has joined #ruby-lang
chendo_ has quit [Ping timeout: 256 seconds]
mistym has quit [Remote host closed the connection]
jonahR has joined #ruby-lang
lsegal has joined #ruby-lang
gouthamvel has joined #ruby-lang
hakunin has joined #ruby-lang
hakunin has quit [Excess Flood]
hakunin has joined #ruby-lang
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
<zzak>
banisterfiend: it could be worse
<zzak>
zenspider: sent you a patch and some notes on minitest <3
noReligion has joined #ruby-lang
dous has quit [Remote host closed the connection]
dustint has quit [Remote host closed the connection]
peppyheppy has quit [Quit: peppyheppy]
<noReligion>
I have a very basic question: How can I load a file containing, say, some code defining some classes into and irb session so that I can use the classes in the file?
dustint has joined #ruby-lang
cardoni has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasa1ar has quit [Ping timeout: 276 seconds]
dhruvasagar has joined #ruby-lang
dhruvasa1ar has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
hakunin has quit [Ping timeout: 245 seconds]
crackity_jones has joined #ruby-lang
hakunin has joined #ruby-lang
hakunin has quit [Remote host closed the connection]
<certainty>
socialcoder: because '2' isn't smaller than '1' lexicograpically
<certainty>
socialcoder: try '1'.ord and '2'.ord and see for yourself
megha has quit [Quit: WeeChat 0.4.0]
<certainty>
btw. that isn't ruby specific ... on the unix command-line try to ls a directory in which you have 2_test and 10_test and check which file comes first
Mon_Ouie has quit [Quit: WeeChat 0.3.9.2]
megha has joined #ruby-lang
<certainty>
which uses glob(3) internally i believe
<socialcoder>
certainty - because '2' isn't smaller than '1' lexicograpically u mean o comes before T or that 1 comes before 2?
<certainty>
yes
<socialcoder>
err...yes to?
<certainty>
the char 1 comes before char 2
<socialcoder>
ah ok
osaut has quit [Quit: osaut]
facest has quit [Read error: Connection reset by peer]
My_Hearing is now known as Mon_Ouie
faces has joined #ruby-lang
io_syl has quit [Quit: Computer has gone to sleep.]
gustavnils has joined #ruby-lang
mytrile has quit [Ping timeout: 255 seconds]
hzx has joined #ruby-lang
banisterfiend has quit [Ping timeout: 245 seconds]
unlikely_monkey has quit [Remote host closed the connection]
lun_ has joined #ruby-lang
TvL2386 has joined #ruby-lang
cardoni has joined #ruby-lang
_carloslopes has joined #ruby-lang
carloslopes has quit [Ping timeout: 245 seconds]
sulo has joined #ruby-lang
intellitech has quit [Ping timeout: 240 seconds]
enebo has joined #ruby-lang
sulo has quit [Ping timeout: 245 seconds]
Stilo has joined #ruby-lang
mistym has joined #ruby-lang
cardoni has quit [Ping timeout: 256 seconds]
alexcp has left #ruby-lang [#ruby-lang]
srbaker has joined #ruby-lang
<MrWGW->
hey there
<MrWGW->
can ruby gems be used to distribute and compile a C portion of your code?
<MrWGW->
i.e. if your code consists of some Ruby and some C, can the gem install the ruby part and then via rake, act as a makefile and build the C component?
<MrWGW->
and for that matter, can ruby gems be used to distribute portions of your code that might be written in other languages, such as python?
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
<whitequark>
MrWGW-: google 'extconf.rb' and also check gem rake-compiler
<MrWGW->
I'm writing a program that has a significant python component but also has a ruby API
<MrWGW->
and I'd really like to make hte whole thing available via gems
<MrWGW->
not the least because gems is more widespread and easier to install and work with than python pip
jrafanie has quit [Quit: jrafanie]
mercwithamouth has quit [Ping timeout: 245 seconds]
jonahR has quit [Quit: jonahR]
jonahR has joined #ruby-lang
<hagabaka>
people with rubygems don't necessarily have python though
ryanf has joined #ruby-lang
nkr has quit [Ping timeout: 244 seconds]
miraks has joined #ruby-lang
banisterfiend has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
cardoni has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
sulo has joined #ruby-lang
lun_ has quit [Read error: Connection reset by peer]
lun_ has joined #ruby-lang
mercwithamouth has joined #ruby-lang
swav_ has quit [Remote host closed the connection]
mwjcomputing has quit [Ping timeout: 260 seconds]
intellitech has joined #ruby-lang
cardoni has quit [Ping timeout: 260 seconds]
skade has quit [Quit: Computer has gone to sleep.]
mwjcomputing has joined #ruby-lang
firefux has joined #ruby-lang
<firefux>
do I have to "require 'rubygems'" and "gem 'minitest'" for my programm to use the latest update version from "gem update" ?
mercwithamouth has quit [Ping timeout: 264 seconds]
mwjcomputing has left #ruby-lang ["Leaving"]
banisterfiend has joined #ruby-lang
Bearproof has joined #ruby-lang
rdw200169 has joined #ruby-lang
wallerdev has quit [Quit: wallerdev]
sulo has quit [Remote host closed the connection]
brianpWins has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
malev has joined #ruby-lang
miraks has quit []
<mistym>
firefux: You don't have to `require 'rubygems'` on 1.9 or newer.
<apeiros_>
and you shouldn't on 1.8 or older
<apeiros_>
(except in the executable)
<apeiros_>
actually even there not really.
lsegal has joined #ruby-lang
swav has joined #ruby-lang
havenn has quit [Remote host closed the connection]
swav has quit [Remote host closed the connection]
tdy has quit [Ping timeout: 255 seconds]
nkr has joined #ruby-lang
Nisstyre-laptop has joined #ruby-lang
cardoni has joined #ruby-lang
phlipper_ is now known as phlipper
Bearproof has quit [Quit: Leaving.]
sulo has joined #ruby-lang
_carloslopes has quit [Ping timeout: 245 seconds]
carloslopes has joined #ruby-lang
Aria has joined #ruby-lang
wallerdev has joined #ruby-lang
jamiguet has joined #ruby-lang
sulo has quit [Ping timeout: 240 seconds]
<firefux>
but I do need "gem 'minitest' to use the latest minitest from 'gem update' right? If not it will use the minitest bundled with 1.9?
<firefux>
mistym: apeiros_: ^^
snooc has joined #ruby-lang
<apeiros_>
firefux: no
<apeiros_>
require 'file/of/a/gem' will always use the newest gem
<apeiros_>
you *never* need plain `gem 'gemname'`
<apeiros_>
I have no idea why the second arg is optional
skade has joined #ruby-lang
<apeiros_>
drbrain: ping, could we make the second arg of Kernel#gem required? (of course, with a deprecation phase where it just warns)
<apeiros_>
people are obviously still confused about when/why they need that method…
<zzak>
defined? MiniTest
<firefux>
apeiros_: ok, thanks, is was just that
<zzak>
oh, i thought you were asking for #required?
<firefux>
'ri MiniTest' says to use require 'rubygems' and gem 'minitest'
<apeiros_>
waaa?
<apeiros_>
minitest is from zenspider, no?
<apeiros_>
unimaginable that out of all, he'd state that
<firefux>
On 1.9, you already have it. To get newer candy you can still install the gem,
<firefux>
but you'll need to activate the gem explicitly to use it:
<firefux>
require 'rubygems'
<firefux>
gem 'minitest' # ensures you're using the gem, and not the built in MT
<firefux>
require 'minitest/autorun'
<firefux>
^^ from ri
<zzak>
its from the README
<zzak>
apeiros_: also, re Kernel#gem can you file a ticket?
<zzak>
firefux: you _do_ have to use gem 'minitest' if you're on 1.8, which minitest may or may not still support
<apeiros_>
if you proof-read it before submission
* apeiros_
bad headache
joast has quit [Ping timeout: 245 seconds]
<apeiros_>
zzak: um, no, you don't have to
tdy has joined #ruby-lang
<zzak>
apeiros_: you mean with newer version of gems?
<apeiros_>
I mean there's only one use-case where you'd ever need `gem 'foo'` without a second argument
<apeiros_>
and that one use-case is a horrible one :)
spuk has quit [Quit: Human beings were created by water to transport it uphill.]
<apeiros_>
it's when a normal require would not trigger the rubygems loading mechanism
<zzak>
apeiros_: i thought it was fixed in a newer version of gems
<zzak>
so you dont need gem 'foo' and require will do all the work
banisterfiend has quit [Remote host closed the connection]
AndChat675444 has quit [Client Quit]
AndChat675444 has joined #ruby-lang
AndChat675444 has left #ruby-lang [#ruby-lang]
io_syl has joined #ruby-lang
<apeiros_>
zzak: you never needed it
<apeiros_>
you didn't need it back in 0.8 days either
<apeiros_>
you needed rubygems itself loaded
<apeiros_>
and people misused require_gem
<apeiros_>
and now they misuse gem
workmad3 has joined #ruby-lang
<apeiros_>
the use-case for the gem method today is when you need a specific version of a gem
<apeiros_>
e.g. `gem 'minitest', '=1.0.0'; require 'minitest'`
<apeiros_>
and with regards to `require 'rubgems'` - you didn't need that in 1.8 either, because if you depended on rubygems, you'd normally write your thing as a rubygem too
<apeiros_>
and in that case, rubygems would already be loaded
<apeiros_>
the myth, that you need "require 'rubygems'" stems from the same misconception as todays "oh you need require_relative" - it's that people totally don't understand "development" vs. "installed"
<zzak>
so how should someone use minitest gem vs stdlib?
<apeiros_>
ah, fun - that'd actually be that one horrible case I mentioned
<apeiros_>
(20:41 apeiros_: it's when a normal require would not trigger the rubygems loading mechanism )
<zzak>
same goes for psych
<zzak>
so ryan's readme and psych's readme still apply?
<apeiros_>
mhm, that's the bad thing about stdlib not yet being gemified
<apeiros_>
yes, that'd explain it
<zzak>
do you still need to require gems first tho?
<apeiros_>
no
<zzak>
i didnt think so
<zzak>
even on older gems?
<apeiros_>
not even on older gems
<zzak>
only 1.8, right?
<apeiros_>
see what I said above. even with 1.8 it wasn't necessary if you did it right
<apeiros_>
1.9 makes it easier as you don't even have to "do it right" (since rubygems is loaded by ruby)
<zzak>
:D
<workmad3>
if you have something packaged as a gem, it's valid to assume rubygems is loaded
<workmad3>
otherwise, how is your code loaded in the first place? :)
<manveru>
via $RUBYLIB of course
<workmad3>
the responsibility of ensuring rubygems is loaded is that of the application using the gem
<manveru>
just because you have a gem doesn't mean i can't use the repo instead
s0ber_ has joined #ruby-lang
<workmad3>
manveru: right, but then it's still your responsibility to ensure that things are set up for the gem to function
<workmad3>
manveru: not the gems
<manveru>
yeah
<manveru>
though i'm not sure what needs to be set up?
<workmad3>
nowadays, nothing
<manveru>
in 1.8 you needed RUBYOPT=-rubygems but nobody uses 1.8 anymore and it finally dies in summer :)
<workmad3>
it's harking back to the old idea (that's still a bit prevalent for '1.8 support' I'm guessing) of gems doing 'require "rubygems" ' or doing something like $:.unshift(File.dirname(__FILE__))
sepp2k has quit [Remote host closed the connection]
<manveru>
yeah
<apeiros_>
silly
<workmad3>
apeiros_: indeed
s0ber has quit [Ping timeout: 276 seconds]
carloslopes has quit [Remote host closed the connection]
s0ber_ is now known as s0ber
<apeiros_>
as you said - if you package it as a gem, rubygems is already loaded when your code executes
<apeiros_>
and if somebody installs your stuff not as a gem, he's responsible of installing the dependencies
<apeiros_>
so technically I disagree on the application being responsible for rubygems :)
<workmad3>
apeiros_: and hell, it isn't even that a gem assumes rubygems is loaded... it's just that the gem assumes the load path is set up in a manner similar to rubygems would achieve
<apeiros_>
right
<apeiros_>
the only case where you explicitly need rubygems loaded is when you access something rubygems specific
<workmad3>
which is what bundler does... it sets up the load path and then deactivates rubygems override of 'require'
<whitequark>
hell yes. also require "rubygems" broke for me in strange ways in warbler.
<zzak>
apeiros_: thanks dude, ill send ryan a patch to remove the require bit, but otherwise its good
<apeiros_>
somehow I assume zenspider put it in because it was easier than to deal with support requests of people who don't understand how requiring works…
<apeiros_>
or setting up an env
nmeum has joined #ruby-lang
jfelchner has quit [Ping timeout: 264 seconds]
havenn has joined #ruby-lang
banisterfiend has joined #ruby-lang
robotmay has joined #ruby-lang
lcdhoffman has quit [Quit: lcdhoffman]
swav has joined #ruby-lang
brianpWins_ has joined #ruby-lang
Stilo has joined #ruby-lang
brianpWins has quit [Ping timeout: 252 seconds]
brianpWins_ is now known as brianpWins
swav has quit [Ping timeout: 245 seconds]
srbaker has joined #ruby-lang
xcombelle has quit [Remote host closed the connection]
jfelchner has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
carloslopes has joined #ruby-lang
io_syl has quit [Ping timeout: 256 seconds]
io_syl has joined #ruby-lang
ddv has joined #ruby-lang
Aria has quit [Remote host closed the connection]
innohero has quit [Quit: Leaving]
nkr has quit [Ping timeout: 255 seconds]
Aria has joined #ruby-lang
Aria has quit [Remote host closed the connection]
Aria has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
io_syl has quit [Ping timeout: 246 seconds]
slaytanic has quit [Quit: mmmb0p.]
ddv has quit [Changing host]
ddv has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
Bearproof has joined #ruby-lang
joast has joined #ruby-lang
Bearproof has left #ruby-lang [#ruby-lang]
io_syl has joined #ruby-lang
rippa has quit [Ping timeout: 240 seconds]
havenn has quit [Remote host closed the connection]
<yorickpeterse>
awwww hell yeah, my mirror is actually working
<yorickpeterse>
573 gems with a total size of 50MB, notbad.jpg
havenn has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
havenn has quit [Ping timeout: 252 seconds]
<rking>
yorickpeterse: What for? Speed/reliability?
carloslopes has quit [Remote host closed the connection]
<rking>
yorickpeterse: It'd be cool if you blogged your setup steps.
<yorickpeterse>
you can get this thing running in 3 commands
<yorickpeterse>
You'll spend more time downloading the Gems than actually using it
ivanoats has quit [Remote host closed the connection]
<yorickpeterse>
(this is a Rubygems mirror btw)
<yorickpeterse>
The only annoying thing is that it fetches *all* versions of a Gem since I really cbf doing dependency resolution
robotmay has quit [Remote host closed the connection]
cardoni has quit [Quit: cardoni]
carloslopes has joined #ruby-lang
<yorickpeterse>
Hm on the other hand, if something uses a range I can probably just install the newest one
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
idkazuma has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
osaut has joined #ruby-lang
bzalasky has joined #ruby-lang
srbaker has joined #ruby-lang
jrafanie has joined #ruby-lang
TvL2386 has quit [Quit: Ex-Chat]
vlad_starkov has joined #ruby-lang
srbaker has quit [Ping timeout: 255 seconds]
snooc has quit [Remote host closed the connection]
bzalasky has quit [Remote host closed the connection]
carloslopes has quit [Remote host closed the connection]
cardoni has joined #ruby-lang
s1n4 has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 255 seconds]
srbaker has joined #ruby-lang
havenn has joined #ruby-lang
ttilley has quit [Quit: ttilley]
lun_ has quit [Ping timeout: 245 seconds]
lun_ has joined #ruby-lang
mwjcomputing has joined #ruby-lang
mwjcomputing has quit [Ping timeout: 245 seconds]
sullenel has quit [Quit: WeeChat 0.4.0]
solars has quit [Ping timeout: 252 seconds]
sustainableweb has joined #ruby-lang
ivanoats has quit [Ping timeout: 248 seconds]
bzalasky has joined #ruby-lang
jamiguet has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
workmad3 has quit [Ping timeout: 255 seconds]
jrafanie has quit [Quit: jrafanie]
kurko_ has joined #ruby-lang
banisterfiend has joined #ruby-lang
slaytanic has joined #ruby-lang
io_syl has quit [Ping timeout: 248 seconds]
cardoni has quit [Quit: cardoni]
<injekt>
50mb for 573 gems? noice
io_syl has joined #ruby-lang
brianpWins has joined #ruby-lang
havenn has quit [Read error: Connection reset by peer]
blacktulip has quit [Remote host closed the connection]
jonahR has quit [Quit: jonahR]
nazty has quit [Read error: Connection reset by peer]
Stilo has joined #ruby-lang
tesseract has joined #ruby-lang
cored has quit [Ping timeout: 256 seconds]
cored has joined #ruby-lang
kentos has joined #ruby-lang
mwjcomputing has joined #ruby-lang
peppyheppy has quit [Quit: peppyheppy]
bzalasky has joined #ruby-lang
hakunin has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
osaut has quit [Quit: osaut]
tbuehlmann has quit [Remote host closed the connection]
robotmay has joined #ruby-lang
io_syl_ has joined #ruby-lang
<epitron>
masterkorp: is that a metaphor for ruby
<epitron>
if so you should try ruby 2.0 it is responsive like a bored penpal
<hakunin>
I'm implementing a dsl for something, and i have a case where a method sets something as a side effect, and also returns a string it sets. In my DSL the method can be called standalone, or as an argument to another method. I'm trying to solve this issue where I want this method to set if it's run standalone, and return if passed as an argument, but seems impossible.
io_syl has quit [Ping timeout: 240 seconds]
io_syl_ is now known as io_syl
<epitron>
why don't you use blocks instead of arguments then you can nest blocks problem solved
<hakunin>
I'm aware that I might be better off redesigning this.
tbuehlmann has joined #ruby-lang
<hakunin>
epitron: blocks are used and it does behave correctly with them. Arguments are allowed too however, and make more sense visually for certain things
<epitron>
well in that case maybe you want to chain methods instead of arguments
<epitron>
object.can(:blurf).and(:snargle)
<epitron>
your vague description makes it difficult to suggest real remedies though
bzalasky has joined #ruby-lang
<hakunin>
epitron: Yeah i didn't give enough info, in my case this wouldn't be pretty. I'm wrapping imagemagick, and i want to get `convert { convert(clone) }` (equivalent to `convert { convert { clone } }`), and having convert { convert.clone } makes mapping to original imagemagick much more confusing
Asher has quit [Quit: Leaving.]
<epitron>
waaaa
<epitron>
why do you convert a convert
<epitron>
that's too many converts
<epitron>
is clone a method or an image?
<hakunin>
epitron: imagemagick allows for infinite nesting and clone translates literally to imagemagick's "+clone" or "-clone" opt
<epitron>
i see
<epitron>
(i don't know what that does)
<epitron>
ok i'm out!
* epitron
tags someone else in
<hakunin>
epitron: :) thanks for trying
mistym has quit [Remote host closed the connection]
Asher has joined #ruby-lang
robbyoconnor has quit [Ping timeout: 240 seconds]
<hakunin>
It comes down to the fact that I don't think there's a way in ruby to know from inside the method whether the method was called from an argument list or not
elico has joined #ruby-lang
<hakunin>
which is a crazy thing to want kind of
elico has quit [Client Quit]
<hakunin>
one method def foo; end cannot behave differently when it's called: foo; or when it's supplied as arg: bar(foo);
Swimming_Bird has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby-lang
<hakunin>
there might be a clever way to reconcile behavior duplication by getting nested and parent objects to communicate. parent: "Hey something just get set in me", nested: "Cool story bro, I just had same exact thing passed in as an argument"
enebo has quit [Quit: enebo]
<hakunin>
but gee. perhaps not worth it
<whitequark>
this is simply not possible
<whitequark>
on the level of language semantics, there isn't such a thing as "calling something from an argument list"
<hakunin>
of course
<hakunin>
it just executes method blindly, then result ends up in an argument list
<hakunin>
but if you're trying to force method to modify its context if it's not passed as an argument, or not modify context if it is passed as an argument - there might be a way to get the two contexts to reconcile the outcomes
<hakunin>
i just think it's too complex
<hakunin>
to bother
<hakunin>
if my method was returning an object with certain object id, while at the same time setting this object in current context, then it could be easy to tell that 2 identical objects were added. but what if that's intentional?... so nevermind
mephux has quit [Excess Flood]
vlad_starkov has quit [Ping timeout: 264 seconds]
mephux has joined #ruby-lang
robbyoconnor has joined #ruby-lang
blowfly has joined #ruby-lang
malev has quit [Remote host closed the connection]
solars has joined #ruby-lang
workmad3 has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]