mistym has quit [Remote host closed the connection]
scmx has joined #ruby-lang
softrli has quit [Remote host closed the connection]
Ch00k has joined #ruby-lang
jonahR has quit [Ping timeout: 260 seconds]
Nilium has quit [Ping timeout: 256 seconds]
scmx has quit [Client Quit]
solars has joined #ruby-lang
sedrickcz has joined #ruby-lang
corundum has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
MaddinXx_ has joined #ruby-lang
rwk1_ has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Read error: Connection reset by peer]
Caliban has quit [Ping timeout: 245 seconds]
<yorickpeterse>
morning
dhruvasagar has joined #ruby-lang
Johz has joined #ruby-lang
Ch00k has quit []
elia has joined #ruby-lang
Ch00k has joined #ruby-lang
Ch00k has quit [Client Quit]
Caliban has joined #ruby-lang
skade has joined #ruby-lang
kstuart has quit [Quit: kstuart]
benlovell has joined #ruby-lang
go|dfish has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
kstuart has joined #ruby-lang
havenwood has joined #ruby-lang
go|dfish has joined #ruby-lang
havenwood has quit [Ping timeout: 264 seconds]
wallerdev has quit [Quit: wallerdev]
julweber has joined #ruby-lang
benlovell has quit [Ping timeout: 264 seconds]
jonahR has joined #ruby-lang
tbuehlmann has quit [Ping timeout: 250 seconds]
benlovell has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
tonni has joined #ruby-lang
dhruvasagar has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mdedetrich has quit [Quit: Computer has gone to sleep.]
mdedetrich has joined #ruby-lang
Ch00k has joined #ruby-lang
mdedetrich has quit [Client Quit]
GeissT_ has joined #ruby-lang
havenwood has joined #ruby-lang
GeissT has quit [Ping timeout: 240 seconds]
<joonty>
morning
havenwood has quit [Read error: Connection reset by peer]
<erikh>
hello!
djinni` has quit [Ping timeout: 264 seconds]
banister`gym has quit [Quit: Computer has gone to sleep.]
tbuehlmann has joined #ruby-lang
mdedetrich has joined #ruby-lang
djinni` has joined #ruby-lang
closer has joined #ruby-lang
adambeynon has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
Criztian has joined #ruby-lang
dhruvasagar has joined #ruby-lang
Gues_____ has joined #ruby-lang
closer009 has quit [*.net *.split]
chendo has quit [*.net *.split]
wudofyr has quit [Ping timeout: 245 seconds]
chendo has joined #ruby-lang
io_syl has quit []
wudofyr has joined #ruby-lang
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JoshuaPaling has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has joined #ruby-lang
relix has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
scholar01 has joined #ruby-lang
scholar01 has joined #ruby-lang
Ch00k has left #ruby-lang [#ruby-lang]
dhruvasagar has quit [Read error: Connection reset by peer]
JoshuaPaling has joined #ruby-lang
dhruvasagar has joined #ruby-lang
jxie has quit [Ping timeout: 264 seconds]
TvL2386 has joined #ruby-lang
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dagobah has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
zenspider has joined #ruby-lang
Nss has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
jonahR has quit [Quit: jonahR]
<TvL2386>
hi guys, I'm trying to use net-scp but it keeps failing on me... I can't login. Can someone check what I'm doing wrong: https://gist.github.com/TvL2386/6447834
dhruvasagar has joined #ruby-lang
Forgetful_Lion has joined #ruby-lang
<kith>
says auth failed
julweber_ has joined #ruby-lang
jiuweigui has joined #ruby-lang
<TvL2386>
yes I know, but I am 100% sure that my password is correct. If i do `ssh me@localhost` using the password it works
julweber has quit [Ping timeout: 264 seconds]
<ljarvis>
ohi
<TvL2386>
changed to using Net::SFTP and it works
<TvL2386>
hmmmzzzz
<maloik>
scp is cp over ssh... you don't use a username and password, you use your ssh keys
<maloik>
(right?)_
<kith>
not quit
<kith>
e
<kith>
you can use user/pass with scp
<maloik>
oh, hmm
<kith>
you could try to get more verbose error messages
<kith>
or try Net::SCP.start(user, pass, etc) { |scp| ... }
<TvL2386>
Thanks for the suggestions, I was just wondering weather I was making some simple rookie mistake.
<kith>
did you fix it?
<TvL2386>
I'm also wondering why net-ssh & net-sftp have a v1 and v2 implementation, but net-scp does not... maybe that's also related
<TvL2386>
No kith, I tried net-sftp and that worked
<kith>
hmm thats not the same :D
<TvL2386>
I know, but the end result is :)
<kith>
k :D
<TvL2386>
I'll probably run into the issue that hosts I'm connecting to in production won't support net-sftp :)
<kith>
i know back when i was messing with net/scp
<kith>
boy did that suck
<kith>
unix machines would do without problems, the appliance it was designed for just dropped the connection
<kith>
sucked big time
<TvL2386>
appliance is a citrix netscaler in my case :)
<kith>
to me it was various firewall appliances
<TvL2386>
I see :)
<kith>
they wrote their own ssh daemon instead just embedding openssh
Plyturon has joined #ruby-lang
<TvL2386>
I'm creating a tool for running commands and retrieving configs from switches (hp, dell, cisco,brocade) and from the citrix netscaler
hashkey has joined #ruby-lang
<kith>
hehe i did that for firewalls ;)
sedrickc_ has joined #ruby-lang
sedrickcz has quit [Read error: Connection reset by peer]
<TvL2386>
and from the netscaler I need to retrieve files... that's what the scp is for...
<kith>
yeah
<TvL2386>
I've automated the firewalls the other way around, I'm only pushing config :)
<kith>
we dont want that
<TvL2386>
why not?
<zenspider>
why bother with net-ssh?
hashkey has quit [Read error: Connection reset by peer]
<kith>
zenspider: what else then?
<kith>
TvL2386: you pushing it via ssh?
hashkey has joined #ruby-lang
<zenspider>
ssh / scp / rsync
<TvL2386>
kith, nah, firewalls run linux and we use broker like software to communicate with it
hashkey is now known as Guest64074
Guest64074 is now known as hashkey
Nilium has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
<zenspider>
all he wants to do is push config... there's no call for net-ssh
dhruvasagar has joined #ruby-lang
<kith>
hes pulling them with sftp
<TvL2386>
I'm trying to download a directory using net/scp
<erikh>
that's like, what that tool is for, maaaaaaaan
<zenspider>
rsync is god in this application. there's no reason to use net-ssh
<erikh>
yeah. 1) small files 2) lots of them == rsync
<TvL2386>
well, it's against appliances like: Cisco ASA, Citrix Netscaler... Don't know if they support rsync. Either way, my first thought was using pure ruby libraries/gems
<erikh>
ah, right
<kith>
need rsync on both ends?
<erikh>
so, if rsync is installed it'll just tunnel over ssh
<TvL2386>
rsync needs rsync yeah
<erikh>
easy to test
<zenspider>
"my first thought was using pure ruby libraries" just doesn't make any sense to me
<erikh>
ssh foo@blabla 'rsync --help'
<kith>
on one end is sufficient no?
ledestin has joined #ruby-lang
<TvL2386>
I don't think so
<erikh>
no, you need a client and a daemon
<erikh>
the daemon is automatically started over ssh mode
<kith>
ah ok
<TvL2386>
yup that's what I thought
arBmind has joined #ruby-lang
<maloik>
hmmm client from hell stuff going on over here
havenwood has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
soba has quit [Ping timeout: 245 seconds]
sr78ger has joined #ruby-lang
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
runeb has joined #ruby-lang
<yorickpeterse>
"Fetching source index from http://rubygems.org/" *5 minutes later*
<yorickpeterse>
Grrrrrr, REE 1.8
<yorickpeterse>
good thing that will be gone within a month
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
wudofyr has quit [Ping timeout: 264 seconds]
Plyturon has quit [Ping timeout: 264 seconds]
JoshuaPaling has quit [Ping timeout: 264 seconds]
julweber_ has quit [Remote host closed the connection]
wudofyr has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
GeissT_ has quit [Quit: MillBroChat AdIRC User]
GeissT has joined #ruby-lang
mdedetrich has quit [Quit: Computer has gone to sleep.]
dhruvasagar has quit [Read error: Connection reset by peer]
cads has quit [Ping timeout: 240 seconds]
benlovell has quit [Ping timeout: 260 seconds]
dhruvasagar has joined #ruby-lang
jiuweigui has quit [Ping timeout: 260 seconds]
tomplast has quit [Ping timeout: 240 seconds]
Criztian has quit [Remote host closed the connection]
face has joined #ruby-lang
brianpWins has quit [Quit: brianpWins]
benlovell has joined #ruby-lang
cads has joined #ruby-lang
jsullivandigs has joined #ruby-lang
rwk1 has joined #ruby-lang
jsullivandigs has quit [Ping timeout: 245 seconds]
julweber has joined #ruby-lang
Nisstyre has joined #ruby-lang
ikrima has quit [Quit: Computer has gone to sleep.]
tomplast has joined #ruby-lang
postmodern has quit [Quit: Leaving]
rwk1 has quit [Ping timeout: 264 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
Nisstyre has quit [Remote host closed the connection]
hogeo has quit [Remote host closed the connection]
tomplast2 has joined #ruby-lang
hogeo has joined #ruby-lang
hogeo has quit [Remote host closed the connection]
antulik-afk is now known as antulik
dhruvasagar has quit [Read error: Connection reset by peer]
tomplast has quit [Ping timeout: 264 seconds]
dhruvasagar has joined #ruby-lang
tomplast2 has quit [Ping timeout: 240 seconds]
Domon has quit [Remote host closed the connection]
Domon has joined #ruby-lang
julweber has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
ikrima has joined #ruby-lang
Domon has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby-lang
antulik is now known as antulik-afk
tomplast has joined #ruby-lang
damncabbage has left #ruby-lang [#ruby-lang]
hashkey has quit [Quit: Leaving]
havenwood has quit [Ping timeout: 246 seconds]
julweber has joined #ruby-lang
rue|w has joined #ruby-lang
<joonty>
has this channel got anything to do with ruby-lang.org specifically?
<joonty>
or does it just share the name?
<apeiros>
rofl, rubygems warning: "TODO" or "FIXME" is not an author!
<apeiros>
awesome :D
<maloik>
I know of at least one contributor in here, but most likely several others that I simply don't know by name or recognize
rue|w has quit [Ping timeout: 264 seconds]
<maloik>
why do you ask joonty ?
<joonty>
maloik: i'm trying to register to submit a bug, but i haven't received a confirmation email
<joonty>
so my account is in limbo
<maloik>
didn't even know you can register... although not a solution to the problem, I'd say going to github is a safe bet as well ?
ldnunes has joined #ruby-lang
<yorickpeterse>
joonty: this is the official channel but I'm not sure if any Redmine admins are around
<maloik>
both ruby and ruby-lang.org are on github
alekst has joined #ruby-lang
<joonty>
:<
hashkey has joined #ruby-lang
<joonty>
maloik: bugs aren't handled on github for ruby
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
yxhuvud has quit [Ping timeout: 260 seconds]
tkuchiki has joined #ruby-lang
hellome has quit [Read error: Connection reset by peer]
jxie has joined #ruby-lang
havenwood has quit [Ping timeout: 245 seconds]
JasonA has joined #ruby-lang
tomzx_mac has quit [Ping timeout: 264 seconds]
hellome has joined #ruby-lang
lfox has joined #ruby-lang
toretore has joined #ruby-lang
arBmind has joined #ruby-lang
dhruvasagar has joined #ruby-lang
gja has joined #ruby-lang
vmoravec_ has joined #ruby-lang
vmoravec has quit [Quit: Leaving]
vmoravec_ has quit [Client Quit]
vmoravec has joined #ruby-lang
MaddinXx_ has quit [Remote host closed the connection]
cored has quit [Ping timeout: 264 seconds]
cored has joined #ruby-lang
MaddinXx has joined #ruby-lang
runeb has quit [Remote host closed the connection]
nathanstitt has joined #ruby-lang
Uranio has quit [Quit: while you reading this, a kitty dies]
sr78ger has quit [Read error: Operation timed out]
<yorickpeterse>
16:22: Dear diary, it appears I've successfully managed to get this app through the entire Jemkins/Deploy setup
fedesilva has joined #ruby-lang
richardburton has joined #ruby-lang
<gnufied>
nice
<gnufied>
I haven't been keeping tab on yorick's stuff for awhile and I feel guilty
<yorickpeterse>
However
chris2_ has joined #ruby-lang
<yorickpeterse>
2 fucking bundle installs take 24 minutes on REE
<yorickpeterse>
I wonder if the new --jobs option makes it faster (about to test out)
<chris2>
hilarious :P
<yorickpeterse>
would've been a lot faster if Bundler could just cp shit from GEM_HOME instead of having to re-install stuff locally
<gnufied>
depends if resolution is time taking or gem installation
chris2 has quit [Quit: und wech...]
chris2_ is now known as chris2
<gnufied>
Yes, skip —path option for that
<gnufied>
:P
<yorickpeterse>
No, see what we're doing is this:
<yorickpeterse>
bundle install [...] run tests
<yorickpeterse>
Then
<yorickpeterse>
(optionally do this): bundle install --deployment [...] package stuff
richardburton has quit [Client Quit]
<yorickpeterse>
it would be nice to do that without actually having to recompile nokogiri, etc
runeb has joined #ruby-lang
<yorickpeterse>
I could probably write some Bash for that but meh
* chris2
still doesn't understand why this solution turned out to be the default way to do it
adambeynon has joined #ruby-lang
julweber_ has quit [Ping timeout: 264 seconds]
<yorickpeterse>
eh?
<chris2>
it's not like noone knew how package managers could work
<yorickpeterse>
you're not making sense
<yorickpeterse>
(as in, what are you on about?)
<chris2>
the whole gem/bundler/whatever infrastructure is duct tape on duct tape
<yorickpeterse>
oh right
<chris2>
(duct tape is the nice word i can think of)
<yorickpeterse>
How so?
<yorickpeterse>
I mean, it has its flaws but it certainly is a lot better than for example easy_install/pip
<yorickpeterse>
or fuck me it's easier than cpan
<yorickpeterse>
or cpanm
<yorickpeterse>
(versions? what versions?)
<chris2>
cpan has support for binary packages, no?
<yorickpeterse>
(here fuck you latest release always)
<chris2>
cpan has the problem that it can't uninstall
<chris2>
it certainly can build old versions
<yorickpeterse>
cpanm can
<chris2>
ok
<yorickpeterse>
and PAUSE is rolling release
<yorickpeterse>
either way, RubyGems itself isn't that bad, just slow in some regards
gja has quit [Quit: This computer has gone to sleep]
<darix>
imho bundler should have been part of rubygems
<chris2>
yes
<darix>
doesnt make sense to have 2 different solver for the same problem
julweber has joined #ruby-lang
<yorickpeterse>
That Pip at least does
<yorickpeterse>
hihi, I think I have a solution for our Gem problem
<darix>
you package them as rpms/debs
<darix>
and just deploy those?
<darix>
works well for me.
<darix>
(:
<yorickpeterse>
What do you think we're doing>?
<yorickpeterse>
The problem here is that to get there I basically have to install Gems twice, which takes forever
<darix>
yorickpeterse: i have one rpm/deb per gem
seydar has joined #ruby-lang
<yorickpeterse>
I'm not going to RPM a few hundred Gems separately
<darix>
and tell bundler only to use system gems
<darix>
gem2rpm
<chris2>
darix: that works until you have two apps that need different versions?
<chris2>
or can rpm do that now?
<yorickpeterse>
Then I might as well start harassing Gem authors on GitHub to tell them to do some BS thing so Debian can do it's perverted magic
<darix>
chris2: versioned names. ;)
<chris2>
gosh
<darix>
chris2: rpm and zypper can do multiple versions
<darix>
but
<darix>
other package manager, people might use, dont
<darix>
so we play it safe
<darix>
chris2: and so far I only use name-x.y
<darix>
as the most common thing you run into is ~> x.y.z
<whitequark>
... and then rails do breaking changes in minor version
<chris2>
;)
<darix>
yorickpeterse: if you want you could even use patch + find_requires provider
<chris2>
just vendor the shit out of everything
<darix>
whitequark: then you can still go x.y.z
<yorickpeterse>
darix: my current solution is a bit easier
<yorickpeterse>
so basically bundle install --deployment just mirrors $GEM_HOME
<darix>
yorickpeterse: you could just add some plugin/addon for bundler to bring back rake gem:freeze
<yorickpeterse>
I'm thinking of just cp-ing everything over to vendor/bundle and create .bundle manually
enebo has joined #ruby-lang
<yorickpeterse>
easy enough, takes like 1 second
<chris2>
why not have a per-app GEM_HOME?
<yorickpeterse>
eeehh doesn't entirely work with our structure
jsullivandigs has joined #ruby-lang
<seydar>
so i want to do a regex for a giant list of words. basically /(hello|world|cool|...)/ with a list that could be in the thousands. it will be run pretty often.
<seydar>
this strikes me as dumb to do
<yorickpeterse>
basically shit lives in /var/lib/jenkins/jobs/NAME/workspaces/RUBY_VERSION/XXXX
<yorickpeterse>
so I'd have to install it there or still cp it
<seydar>
but i'm not sure of what else there is. has anyone solved this before?
<yorickpeterse>
but the workspace gets cleaned upon running
<chris2>
seydar: "why?"
<yorickpeterse>
there are a few ways to approach this though, I'm just trying out to see what's the fastest/least trouble
<chris2>
seydar: try a hash?
<seydar>
chris2: good point. i think i'm going about this all wrong
cmckni3 has joined #ruby-lang
<seydar>
chris2: i'm trying to use a parser to do more than just parsing. i was trying to make it do some thinking as well.
<seydar>
i should be punished for this
<chris2>
the regexp will likely not be fast (i don't know the engine very well)
<chris2>
else, Regexp.union
<seydar>
i'm trying to avoid making a regexp at all because i want the list of words to be updated during the life of the program
<chris2>
yep
<chris2>
use a hash. or a set
seydar has quit [Quit: leaving]
havenwood has joined #ruby-lang
RubyRook_ has joined #ruby-lang
<tubbo>
hey guys, i need some EventMachine advice
tonni has quit [Remote host closed the connection]
corundum has quit [Read error: Connection reset by peer]
<tubbo>
i've been toying with replacing a part of our system's architecture with another solution. this particular program relies on event_machine, and one of the thing it relies on EM for is to periodically check RSS feeds and recompile Ruby templates if any of the feed contents have changed.
<tubbo>
(which might just be every time it hits the RSS feed, it recompiles)
RubyRookie has quit [Ping timeout: 268 seconds]
<tubbo>
my thought was to just have this happen in a Ruby script that runs every 60 seconds (the previous timespan of the periodic EM task), but I'm wondering does EM provide any kind of tolerance in case the task takes longer than 60 seconds?
charliesome has joined #ruby-lang
<tubbo>
because i know Cron is dumb and won't care if it's running two overlapping Ruby scripts
<darix>
there are quite a few converters already :)
<chris2>
is that the one using minisat?
<gnufied>
No. they wrote it from ground up.
<gnufied>
code is "inspired" by minisat though
<chris2>
ok
julweber has quit [Remote host closed the connection]
<gnufied>
strictly speaking package dependency resolution is not a SAT problem
<gnufied>
because then you end up with "any" version of required package
<gnufied>
where is what we want is highest version possible
JasonA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gnufied>
so, libsolv handles that
<yorickpeterse>
So Bundler uses "1.8" for its directories opposed to, for example, "1.8.7", how does Bundler get the 1.8? Does it just slap off minor version numbers?
headius has joined #ruby-lang
Plyturon has quit [Ping timeout: 264 seconds]
<gnufied>
afaik, bundler uses Gem::Install provided by rubygem
rwilcox has quit [Ping timeout: 264 seconds]
<gnufied>
bundler doesn't have its own classes for gem installation
<yorickpeterse>
Hm
shinnya has joined #ruby-lang
<darix>
yorickpeterse: see rbconfig
corundum has joined #ruby-lang
Nisstyre-laptop has quit [Ping timeout: 256 seconds]
<chris2>
gnufied: so?
<chris2>
just add better-than relations
rwk1 has quit [Remote host closed the connection]
<yorickpeterse>
darix: hmmmm
<darix>
and Recommends/Enhances
<yorickpeterse>
Eh, what was the RbConfig::CONFIG thing on 1.8 again?
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse>
yup, and it works too
<yorickpeterse>
booyah
havenwood has joined #ruby-lang
charliesome has joined #ruby-lang
LauraE has quit [Quit: Leaving]
GaelanAintAround has quit [Ping timeout: 240 seconds]
zz_dlu has quit [Ping timeout: 245 seconds]
dagobah has quit [Remote host closed the connection]
rwilcox1 has quit [Ping timeout: 260 seconds]
rwilcox has joined #ruby-lang
cored has quit [Ping timeout: 245 seconds]
hogeo has joined #ruby-lang
mistym has joined #ruby-lang
mistym has joined #ruby-lang
pskrz has left #ruby-lang [#ruby-lang]
shtirlic has quit [Ping timeout: 264 seconds]
pskrz has joined #ruby-lang
julweber has joined #ruby-lang
aaronmiler has joined #ruby-lang
shtirlic has joined #ruby-lang
tylersmith has joined #ruby-lang
rwilcox1 has joined #ruby-lang
runeb has quit [Remote host closed the connection]
runeb has joined #ruby-lang
tylersmith has quit [Remote host closed the connection]
rwilcox has quit [Ping timeout: 264 seconds]
ismaelrb has joined #ruby-lang
io_syl has quit []
lightcap has joined #ruby-lang
zz_dlu has joined #ruby-lang
GaelanAintAround has joined #ruby-lang
mbj has joined #ruby-lang
runeb has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby-lang
pumper has joined #ruby-lang
thillux has quit [Quit: Leaving]
saarinen has joined #ruby-lang
snarfmason has joined #ruby-lang
Gues_____ has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
retro|cz has quit [Ping timeout: 264 seconds]
enebo has quit [Quit: enebo]
aaronmiler has left #ruby-lang [#ruby-lang]
verto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aaronmiler has joined #ruby-lang
verto has joined #ruby-lang
havenwood has quit [Ping timeout: 264 seconds]
deedoubleyou has joined #ruby-lang
havenwood has joined #ruby-lang
<Hauleth>
Anyone have idea why Ruby 2.0 introduced new syntax for named params?
benlovell has quit [Ping timeout: 256 seconds]
<apeiros>
Hauleth: because it introduced named params
<havenwood>
Hauleth: Keyword arguments (something Ruby didn't have before) were introduced for greater flexibility and expressiveness.
<apeiros>
(there were no named params before 2.0)
mistym_ has joined #ruby-lang
elia has quit [Ping timeout: 260 seconds]
mistym_ has quit [Remote host closed the connection]
<Hauleth>
apeiros: I know what are named/keyword params
<apeiros>
Hauleth: then your question makes no sense.
<Hauleth>
Make sense. Why Ruby doesn't do it like R
bondar has quit []
<Hauleth>
So argument name is keyword name
<Hauleth>
I.e. function foo(bar, baz) can be called like foo(baz: 10, bar: 20)
<Hauleth>
IMHO it will be easier
<Hauleth>
And make libraries valid between versions (mostly).
<Hauleth>
apeiros: havenwood: What do you think about it?
<tubbo>
Hauleth: i think it had to do with a common bit of boilerplate in ruby classes:
<tubbo>
def initialize(options={}); options.each { |key,val| send("#{key}=", val) if respond_to? "#{key}=" }; end
<tubbo>
i do this every day :P
<tubbo>
would be nicer if i can just do def initialize(the: options, that: i_would, want: dawg); end
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arBmind has quit [Quit: Leaving.]
<havenwood>
Hauleth: There is a tradeoff in complexity. There is going to be connaissance of name or of position. The addition of kwargs let you choose the name route without fiddling with a Hash like tubbo mentioned.
<rsl>
tubbo: openstruct?
<Hauleth>
tubbo: You can use Struct class
<tubbo>
if you just want an object that does that, but typically you want to do other things in a class.
<rsl>
tubbo: true dat
<Silex>
tubbo: inherit from OpenStruct?
<tubbo>
i guess i could make my class extend Struct.new(:whatever)
<tubbo>
Silex: laaaame ;)
charliesome has joined #ruby-lang
<tubbo>
if i wanted to quickly build one i usually just do class Whatever < Struct.new(:property, :attribute, :candidate); Whatever.new(property, attribute, candidate)
RubyRookie has quit [Remote host closed the connection]
<Hauleth>
havenwood: But it make hard to implement required named params
<Hauleth>
havenwood: My way solve this problem
<Hauleth>
havenwood: The only problem would be C extensions
rwk1 has joined #ruby-lang
relix has joined #ruby-lang
tharindu has joined #ruby-lang
rwk1 has quit [Ping timeout: 264 seconds]
ruby-lang112 has joined #ruby-lang
jaimef has quit [Excess Flood]
MaddinXx has quit [Remote host closed the connection]
jaimef has joined #ruby-lang
ruby-lang112 has quit [Ping timeout: 250 seconds]
runeb has joined #ruby-lang
elia has joined #ruby-lang
wallerdev has joined #ruby-lang
iliketur_ has joined #ruby-lang
iliketur_ has quit [Max SendQ exceeded]
saarinen has quit [Quit: saarinen]
iliketur_ has joined #ruby-lang
jiuweigui has quit [Quit: Gone...]
dhruvasagar has quit [Ping timeout: 260 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hauleth has quit [Ping timeout: 264 seconds]
jp- has joined #ruby-lang
sstrickl has quit [Quit: sstrickl]
elia has quit [Ping timeout: 260 seconds]
iliketur_ has quit [Client Quit]
wallerdev has quit [Quit: wallerdev]
retro|cz has joined #ruby-lang
rwilcox1 has quit [Quit: Leaving.]
hogeo has quit [Remote host closed the connection]
bantic has quit [Quit: bantic]
intellitech has quit [Quit: SMOKE BOMB!]
iliketur_ has joined #ruby-lang
iliketur_ has quit [Max SendQ exceeded]
iliketur_ has joined #ruby-lang
io_syl has joined #ruby-lang
malev has quit [Remote host closed the connection]
ismaelrb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bantic has joined #ruby-lang
x0f_ has quit [Ping timeout: 246 seconds]
richardburton has quit [Quit: Leaving.]
apeiros has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
tkuchiki has joined #ruby-lang
x0F has joined #ruby-lang
tkuchiki has quit [Ping timeout: 276 seconds]
JohnBat26 has joined #ruby-lang
wallerdev has joined #ruby-lang
<darix>
tubbo: or just use ostruct
vlad_starkov has quit [Remote host closed the connection]
tharindu has quit [Remote host closed the connection]
vlad_starkov has joined #ruby-lang
VTLob has joined #ruby-lang
saarinen has joined #ruby-lang
malev has joined #ruby-lang
tharindu has joined #ruby-lang
ismaelrb has joined #ruby-lang
apeiros has joined #ruby-lang
ismaelrb has quit [Client Quit]
tenderlove has joined #ruby-lang
julweber has quit [Remote host closed the connection]