<hagabaka>
is there a way to easily toggle debug lines within a specific method? for example, I can put "magic_debug stuff" in lots of places, and DEBUG_ONLY=foo ruby program.rb, and then only the debug lines in foo() will run
brianpWins has joined #ruby-lang
<rue>
You mean like a method, or block?
<hagabaka>
or is there a better approach to do the similar
<hagabaka>
debug lines in the method called foo()
<rue>
Depends. If it's production code, the cost of checks might be prohibitive
<hagabaka>
basically, foo is a kind of buggy method, but sometimes I want to focus on other parts of the code...
<rue>
I'd probably spend time testing it instead.
<hagabaka>
well maybe not buggy, but I just need to inspect a variable in it sometimes. I'm trying to use QtRuby to interact with a Qt program, which sends serialized objects through a socket, and depending on the type of the object, sometimes the QtRuby library just crashes trying to unserialize them. I have to special case those cases
<hagabaka>
and I don't know which types they are until I come across them
<hagabaka>
it does let me call a "typename" method to see the type beforehand, so what I do when it crashes is to print the typename, which would be done for all the objects including those who could be unserialized, and see which typename was last printed before it crashes
frem has joined #ruby-lang
<hagabaka>
trapping SEGV and printing typename doesn't seem to work :(
dfr|mac has joined #ruby-lang
mikeric has joined #ruby-lang
olesu has joined #ruby-lang
chimkan___ has joined #ruby-lang
rippa has joined #ruby-lang
<hagabaka>
hmm I didn't know trollop was a real word
rking has joined #ruby-lang
rking has joined #ruby-lang
rking has joined #ruby-lang
rohit has joined #ruby-lang
chimkan_ has joined #ruby-lang
gix has joined #ruby-lang
burns180_ has joined #ruby-lang
nanothief has joined #ruby-lang
Banistergalaxy has joined #ruby-lang
Radium has joined #ruby-lang
nofxxx has joined #ruby-lang
senthil has joined #ruby-lang
krz has joined #ruby-lang
tonesfrommars has joined #ruby-lang
burns180 has joined #ruby-lang
Rezwan has joined #ruby-lang
jxie_ has joined #ruby-lang
cirwin has joined #ruby-lang
x0F_ has joined #ruby-lang
jmfcool has joined #ruby-lang
woollyams has joined #ruby-lang
jmfcool has joined #ruby-lang
burns180 has joined #ruby-lang
kitallis has joined #ruby-lang
gnufied has joined #ruby-lang
cirwin has joined #ruby-lang
srbaker has joined #ruby-lang
WillMarshall has joined #ruby-lang
brushbox has joined #ruby-lang
rohit has joined #ruby-lang
dcorbin has joined #ruby-lang
dcorbin has joined #ruby-lang
robbyoconnor has joined #ruby-lang
kitallis has joined #ruby-lang
Joeysomo_ has joined #ruby-lang
Joeysom__ has joined #ruby-lang
jimmyy111 has joined #ruby-lang
wubino has joined #ruby-lang
sandbags has joined #ruby-lang
mechanic_ has joined #ruby-lang
morozovm has joined #ruby-lang
andkerosine1 has joined #ruby-lang
uniqanomaly_ has joined #ruby-lang
Radium has joined #ruby-lang
nofxx has joined #ruby-lang
apeiros_ has joined #ruby-lang
nofxx has joined #ruby-lang
hakunin has joined #ruby-lang
hakunin has joined #ruby-lang
savage- has joined #ruby-lang
mikeric has joined #ruby-lang
sj26 has joined #ruby-lang
Nss has joined #ruby-lang
batmanian has joined #ruby-lang
justinmcp has joined #ruby-lang
sdeobald_ has joined #ruby-lang
kitallis_ has joined #ruby-lang
manojhans has joined #ruby-lang
adambeynon has joined #ruby-lang
manojhans has joined #ruby-lang
rubicon917 has joined #ruby-lang
adriann has joined #ruby-lang
<adriann>
hi
chendo_ has joined #ruby-lang
krzkrzkrz has joined #ruby-lang
<andkerosine1>
A dreadful silence greets you.
manojhans has joined #ruby-lang
manojhans has joined #ruby-lang
<owen1>
is there a way to rename a cloned repo?
<owen1>
(github)
solars has joined #ruby-lang
<owen1>
how will people understand the difference between my clone and the original repo?
<owen1>
i can change the readme, but also want the name to be a bit different.
rohit has joined #ruby-lang
manojhans has joined #ruby-lang
benanne has joined #ruby-lang
pbjorklund has joined #ruby-lang
manojhans has joined #ruby-lang
postmodern has joined #ruby-lang
mssola has joined #ruby-lang
dragonkh has joined #ruby-lang
robotmay has joined #ruby-lang
kashyapkmbc has joined #ruby-lang
francisfish has joined #ruby-lang
Stalkr_ has joined #ruby-lang
achamian has joined #ruby-lang
jtoy has joined #ruby-lang
d3vic3 has joined #ruby-lang
WillMarshall has joined #ruby-lang
<dragonkh>
hi
<dragonkh>
how to convert minutes into milliseconds?
<apeiros_>
you multiply
<dragonkh>
10.minutes * 60 * 1000 ?
<apeiros_>
depends on what 10.minutes returns
<dragonkh>
do I need to use a float
<apeiros_>
depends on what you want to use it for
<dragonkh>
a countdown timer
<apeiros_>
in milliseconds? o0
<apeiros_>
I doubt you'd need a float for that
<dragonkh>
I thought rails might provide a nice way - like 10.minutes.in.milliseconds
<apeiros_>
you're in the wrong channel for that
<dragonkh>
yeah I cant get into rubyonrails channel at the moment
<apeiros_>
o0
<apeiros_>
that doesn't make this channel the right one to ask rails questions.
<dragonkh>
well it was a general question I suppose
<apeiros_>
10.minutes is not a core/stdlib method, so no.
<dragonkh>
I wonder if there is a nice gem for time stuff
<apeiros_>
I don't see why you'd use the .minutes method, though.
<dragonkh>
10.minutes is like saying 10 * 60
<dragonkh>
so it's a bit easier to understand the context
<dragonkh>
so a nice time gem would do stuff like - 10.minutes.in.seconds or ten.minutes.in.seconds
<shevy>
but I really think that I am not going to use anything that touches facets
<andrewvos>
Dubious
<shevy>
hehe
<shevy>
I am going to try and live by minimal code
<shevy>
or rather, minimal per project
jmfcool has joined #ruby-lang
fayimora_ has quit ["Leaving..."]
gregf has joined #ruby-lang
senthil has joined #ruby-lang
<senthil>
unroller looks interesting
<senthil>
except it doesn't work
<senthil>
shevy: i think you mentioned unroller right? (lost my history)
<shevy>
yeah
<shevy>
didnt work for me either, but I am just annoyed at facets
<senthil>
shevy: grr, me too now
<shevy>
heeh
<ReinH>
andrewvos: y u no want the reinh one?
<andrewvos>
rue: I just drew pretty much the exact same picture as you. Different word though. Oh and mine looks like it was done my a 5 year old.
mark-_ has joined #ruby-lang
<rue>
Distilling the essence of the image is…essential
<andrewvos>
ReinH: It's not that I don't want it. I just wanted to try that one.
<andrewvos>
I wish there was a feature in github that allowed me to store repos in a sort of toolbox. Like, a list of repos I actually use in anger. Watching a repo adds unnecessary noise to the front page.
<rue>
Yep
<andrewvos>
Startup time!
<rue>
I think they're focusing on that for this next iteration
<rue>
Dashboard
<andrewvos>
Think ycombinator would accept me?
<andrewvos>
Oh damn
<rue>
I think you probably test too much
* andrewvos
stops registering domain names.
<andrewvos>
rue: me?
<rue>
Sure
<rue>
I know ReinH tests way too much, too, though.
<andrewvos>
Kindly elaborate, Sir.
<rue>
Hipster News brogrammers don't test
<andrewvos>
heh
<rue>
It's too slow when disrupting a synergy or whatever
<andrewvos>
Oh right. You were talking about the startup thing.
<andrewvos>
Yeah you're probably right
* andrewvos
is not startup material.
<erikh>
herp
<andrewvos>
erikh: Quite.
<erikh>
I'm full of insightful commentary
havenn has joined #ruby-lang
<drbrain>
I'm testing RIGHT NOW
<erikh>
andrewvos: speaking of that watcher thing; I'd like that too. I'd also like being able to fork something without watching it
<drbrain>
it's the only way I could possibly avoid insanity
<erikh>
'cause I forked bootstrap and my github feed is useless now.
<ddfreyne>
Speaking of domain names…
<rue>
drbrain: It's a wonder you can get any of the TONS OF STUFF THAT YOU DO done with all that testing
<ddfreyne>
Any buyers for ↑↑↓↓←→←→ba.ws ?
<erikh>
ddfreyne: niiiice.
<rue>
Haha
<erikh>
my god that's like, the best irc domain ever
codewrangler has joined #ruby-lang
solars has joined #ruby-lang
<ddfreyne>
hah
<ddfreyne>
erikh: it would probably be changed to xn-whatever
<rue>
You have to keep that, someone would just use it for evil
<ddfreyne>
I’ve had it for a while but I don’t use it. If somebody has a good use for it…
<erikh>
no I'm pretty sure i'd slap an irc server behind it
<ddfreyne>
currently it’s not being put to use at al
<ddfreyne>
erikh: it does have an irc server :)
<erikh>
yes!
<erikh>
I'm satisfied. my work is done here.
<andrewvos>
erikh: So I just want a page that lists all the projects I like. Something like: Title: description
<erikh>
andrewvos: definitely.
<andrewvos>
erikh: Maybe it could list the rubygems page or something
<erikh>
well, I think they're getting away from being so ruby-oriented
<erikh>
(which is probably good)
<andrewvos>
erikh: What name should we have for this site?
<erikh>
but I'm guessing. either way, you should tell them and send a feature request, but I imagine they get a lot of them.
<erikh>
oh you want to build something?
<erikh>
I've got too much on my plate
<andrewvos>
Yeah. I'm looking for something to write and this looks kind of fun.
<erikh>
yeah, I guess you could power it with oauth and so forth
<erikh>
like-a-repo.com
<erikh>
dunno.
<erikh>
if you look at my gems list, I'm not particularly good at naming things
<erikh>
things like "ip" and "stringformat" and "dbi"
<drbrain>
is rbi really your fault?
<drbrain>
err, dbi
<erikh>
hahah partially.
<erikh>
sorry
<erikh>
I swear I made it better
<erikh>
I at least made rubygems out of it
<erikh>
it was this gargantuan tarball and a setup.rb with tons of flags before then
<erikh>
I tried a reboot of the project: http://github.com/rdbi - and eventually threw in the towel
<rue>
erikh: The chef console looks pretty good, I didn't play much with it
io_syl has joined #ruby-lang
bawer has joined #ruby-lang
<erikh>
rue: thanks! I hope to release it soonish
<erikh>
once I get it deployed and have all the chef tooling to get it working (something I'm finishing up nightly) I'll push it out there.
<andrewvos>
erikh: I imagine this thing would have some sort of community tag/category feature
<andrewvos>
erikh: So you could socially find new repos
<andrewvos>
WILL YOU INVEST
Indian has joined #ruby-lang
kyrylo has joined #ruby-lang
kyrylo has joined #ruby-lang
fayimora has joined #ruby-lang
<drbrain>
erikh:
<drbrain>
erikh: I meant, the name was not your fault
* apeiros_
is working on a grammar of his own right now…
<yxhuvud>
oh god, that file mixes tabs and spaces. eeeew.
<rue>
Couldn't you just have those as separate?
havenn has joined #ruby-lang
curtism has joined #ruby-lang
curtism has joined #ruby-lang
<andrewvos>
rue: a*
tekin has joined #ruby-lang
<erikh>
Aria is awesome
<apeiros_>
she hasn't been in irc in a while :(
thrcka has joined #ruby-lang
<erikh>
I think she's drinking the node.js koolaid these days
<erikh>
at least, according to her twitter
<apeiros_>
ah
* apeiros_
can't stand js
<apeiros_>
I do a lot in it, there are merits to it. but it's a horribly contorted language
thrcka_ has joined #ruby-lang
<erikh>
woohoo! office cleaned!
<rking>
apeiros_: That's interesting. I find JS to be pretty simpleminded of a language. Maybe I don't know it well enough to hate it.
<erikh>
I don't care much for the syntax. the power it provides is nice though.
<apeiros_>
rking: probably
<apeiros_>
erikh: it doesn't even have integers!
<apeiros_>
its Date class sucks even more than rubys! (quite an achievement…)
<erikh>
I dunno; it was nice in perl to be able to do dirty things with strings masquerading as integers
<erikh>
yeah, heh. you have to work hard to get there.
<yxhuvud>
I mostly dislike the overuse of type coercsion
<erikh>
date/time is a hard problem
<apeiros_>
I mean, I had to write an implementation of Date#week, ffs >:(
<apeiros_>
meh, it's a couple of algorithms
<apeiros_>
I don't ask them to implement anything but the gregorian calendar…
<erikh>
apeiros_: meh! you were crying like a baby about it when you were writing your chronos lib
<erikh>
:P
<apeiros_>
not true!
<erikh>
man this new desk is soooo nice.
<apeiros_>
I was just soliciting attention :)
<apeiros_>
heh
<apeiros_>
we have a clean desk policy at work. I don't think my desk was clean once this year…
<shevy>
pics!!!
<shevy>
the legendary swiss unclean desk I CAN NOT BELIEVE THIS COULD EVER BE TRUE
<apeiros_>
shevy: it's saturday. I'm not at work…
<shevy>
ok, but monday pics!!!
kesor_ has joined #ruby-lang
<shevy>
conan the barbarian is so hilarious
<shevy>
now he stabs a giant snake
<shevy>
and the snake looks like animated papier m
<apeiros_>
ancient special effects…
cirwin has joined #ruby-lang
<shevy>
hehe
SkramX has joined #ruby-lang
<erikh>
they were bad back then too
<rue>
Imagine if someone remade Conan with a huge budget, top-of-the-line SFX and everything!
<rue>
Oh, wait.
simon_weber has quit [#ruby-lang]
<rue>
Conan is a great film. Mostly because the fights are so nasty and brutish.
<erikh>
my cat wants to go outside so bad..
<erikh>
so getting back on topic; can anyone tell me if 1.8.7 and 1.9.3 build on clang now?
<shevy>
erikh way to let HER OUT TO FREEDOM!
<shevy>
tell her to earn her living from now on
<erikh>
oh it's a he
<shevy>
ok, feed him more then
<erikh>
but our apartment is close to the train and lots of traffic
<shevy>
ewwww
<erikh>
oh it's quiet inside
<erikh>
the walls here are so great
srbaker has joined #ruby-lang
<heftig>
erikh: i'll try to build 1.9.3 using clang
<erikh>
but yeah.... not suitable for el gato
<heftig>
may take a while
<erikh>
heftig: oh, no worries. I need 1.8.7 as well.
<erikh>
I just want to upgrade xcode is all
<erikh>
I'm still on 4.1 because of this issue
<manveru>
erikh: i built 1.9.3 with clang
stamina has joined #ruby-lang
<manveru>
erikh: just don't try to use an MRI built with clang to build rbx
<manveru>
haven't noticed much other strangeness
<manveru>
no idea about 1.8
thrcka has joined #ruby-lang
andkerosine1 has joined #ruby-lang
<erikh>
manveru: ok, thanks.
<rue>
Clang clang
<heftig>
manveru: clang-built mri is buggy?
<rue>
erikh: Houseplants, some wheat or barley for eating
<rue>
erikh: Also, walkways near the ceiling are the bestest.
<manveru>
heftig: no
<manveru>
heftig: just the rbx build process doesn't take it into account yet
<heftig>
what ends up being different?
<erikh>
rue: we have some cat trees, but yeah, some plants around here wouldn't hurt.
<shevy>
hmm
<shevy>
cat trees
acts_as has joined #ruby-lang
stamina has joined #ruby-lang
dous has joined #ruby-lang
<andrewvos>
cat trees | grep pine
nofxx has joined #ruby-lang
<erikh>
a cat tree is a carpeted thing that cats sit on
<shevy>
and read books on?
<shevy>
I am sure andrewvos has no cat
<drbrain>
shevy: so you checked under the bed?
<shevy>
waaaah!
<shevy>
dont scare me like that :(
<shevy>
I always thought those beasts would jump down from above and land on the shoulders... and then use their stiletto like claws to pierce into the flesh for better grip ...
<jtoy>
do I need any escaping for this: `sed 's/\("id":\)\([[:digit:]]\{1,\}\)/\1"\2"/g' -i #{f}` , it doesn't work from in ruby, but it works fine from the command line
CCD has joined #ruby-lang
<jtoy>
I thought I don't need to escape since I am using back ticks
<drbrain>
jtoy: IO.popen ['sed', 's/\("id":\)\([[:digit:]]\{1,\}\)/\1"\2"/g'], 'r+' do |io| io.write 'hello'; io.close_write; io.read end
<drbrain>
I left out -i since it's not processing files
<drbrain>
if you are processing files, system 'sed', 's/.../g', '-i', f, file1, file2, ...
<jtoy>
drbrain: if I'm going to open/read/write files with ruby, mine as well just run the regex from ruby? its 1.5 million files
<drbrain>
jtoy: I wrote it that way since I assumed f was ".bak" or something
<drbrain>
but with the Array form of #system, you can give it as many files as you like
<drbrain>
and you won't have to read/write the files from ruby
<drbrain>
if you are going to read/write the files from ruby and run the regexp yourself, use ARGF#inplace_mode
<drbrain>
since it'll take care of all that stuff for you
<drbrain>
if I'm misunderstanding something, please let me know
<jtoy>
drbrain: why do you have the block in there, just for example/? the io.write part i mean
<drbrain>
jtoy: since you used ``, I assumed you wanted the output of sed as a string
<jtoy>
drbrain: no, sorry, i just want to fix the files
<drbrain>
so IO.popen is the closest way to `` to get the result of sed as a string without having a nightmare of extra escaping
<drbrain>
in that case, I would use system 'sed', 's/.../g', '-i', 'bak', file1, file2, ...
<drbrain>
you could run it one at a time, too
<drbrain>
Dir['*.mumble'].each do |file| system 'sed', …, file end
<jtoy>
drbrain: yeah, i will run it one at a time, too many files, does Dir use the same method as ls? if so that won't work, I need to use find
<drbrain>
Dir uses glob like ls
<drbrain>
… similar to
<drbrain>
I think '*/**/*.mumble' will traverse a directory for .mumble files
<drbrain>
I've always had to experiment with Dir[] to get the result I want
<shevy>
hehe
postmodern has joined #ruby-lang
chessguy has joined #ruby-lang
<apeiros_>
*/** is the same as **
<apeiros_>
ah, no, not quite, sorry
<apeiros_>
you want to specifically ignore the first level?
<drbrain>
apeiros_: I have no idea
<apeiros_>
:)
<drbrain>
this is why I always experiment, I've never bothered to internalize the rules ☹
<apeiros_>
*/**/*.mumble will not find foo.mumble, only foo/bar.mumble (and deeper)
<drbrain>
I'm sure they're not hard, but it's never been a priority ☹
<apeiros_>
:D
<apeiros_>
yeah, they ain't hard. it's not too much anyway. similar to a subset of regexen
<matled>
I find the behaviour concerning nul-bytes quite astonishing. Dir["/tmp/\0/"] is the same as Dir["/tmp/", "/"]
t has joined #ruby-lang
<drbrain>
matled: ha, I never knew
<robgleeson|mba>
drbrain: those smileys sure are hard to dicipher :(
<drbrain>
robgleeson|mba: yeah, my IRC font is a little small for them, but I'm typing them so it matters less to me ☺
<apeiros_>
aaah, I thank the geekgods for youtube tutorials
<robgleeson|mba>
hahaha
* apeiros_
is too stupid for certain things
* apeiros_
remembers that he forgot to tweet his TIL yesterday… (utf turd)
<drbrain>
earlier this week I found U+1F4B8 Money With Wings:
<erikh>
*/** means match all directories and all files and directories underneath those directories
<erikh>
sorry, all files directories + sub files directories
Sailias has joined #ruby-lang
<rking>
So, I did the Ruby Koans a couple of days ago, and I'm bothered by my implementation of the Greed scoring thing... the idea is that you have a 1 = 1000, and 2..6 are each 200, 300, ... 600 points. I did this, but I want to see what you guys do instead: triplet_multipliers = Hash.new do |hash, face_value| hash[face_value] = 1 == face_value ? 1000 : 100 * face_value end
<drbrain>
if 1..6 are the only values, I would just write it out: TRIPLET_MULTIPLIERS = { 1 => 1000, 2 => 200, 3 => 300, 4 => 400, 5 => 500, 6 => 600 }
<rking>
Looking at the code now, I see that it's not really neessary to build a hash for this -- putting the ternary inline later on would probably have been simpler. Still, I think I'm missing some other way of building a hash overlay.
<rking>
drbrain: That's fair enough, yes. But now I'm curious about how you would declare a hash that's half explicitly stated { :a => 1, :b => 2 } and then the rest generated or comes from elsewhere.
<drbrain>
rking: hint: check out Hash[], for example, Hash[1, 2]
<drbrain>
zenspider: you ruined it!
<zenspider>
erikh: I was going to frame #2 in terms of pull requests to minitest and how they could be improved.
<zenspider>
at least for the concrete stuff
<rking>
Hehe
<rking>
OK, yes, array initialization of a Hash. Now I'm remembering.
ericmuyser has joined #ruby-lang
<rking>
I knew all of this so long ago.
<zenspider>
I guess #2 could be more explicit... like: Contributing to Open Source --or-- How to Extend MiniTest to Suit More Than Just Your Needs
<drbrain>
zenspider: MiniTest — Extensibility from Simplicity
<drbrain>
or the other way around
<drbrain>
they're rather hand-in-hand
<zenspider>
what do you mean?
<drbrain>
you were talking about taking 100s of lines of somebody's extension and simplifying it to just a few lines
<drbrain>
and the simpler solution does more than the complex one
<drbrain>
or, allows more
<rking>
drbrain: zenspider: Thanks. =)
<zenspider>
drbrain: *nod*
<drbrain>
seems like a mix of #1 and #2 is what's on your mind
<zenspider>
yeah. prolly
cirwin has joined #ruby-lang
<zenspider>
current working title: Extensibility from Simplicity
<zenspider>
--or--
<zenspider>
How to Contribute to Open Source (to meet more than just your own needs)
<erikh>
zenspider: seems cool
<erikh>
is this for rubyconf?
igotnolegs has joined #ruby-lang
<rking>
"Extensibility from Simplicity" doesn't quite work for me. It's fairly nonsimple sounding.
<rking>
Better as a subtitle, if that.
<erikh>
agree
<rue>
zenspider: Contributing doesn't require anything beyond your own needs, though
<rue>
Necessarily
<erikh>
sometimes the feeling of helping a project is enough.
<rking>
rue: Good point. The "Everybody scratches their own itch" idea
<erikh>
maybe that counts as "your need" but it's a rather... ethereal one
<rue>
If you're going for the angle of someone who wants to add “extra” functionality, I think that can be phrased differently
dabradley has joined #ruby-lang
Radium has joined #ruby-lang
<erikh>
fair enough.
<zenspider>
erikh: madison ruby conf
<erikh>
ah
Nisstyre has joined #ruby-lang
<erikh>
phooey.
* apeiros_
wonders whether there's a good non-naive implementation for a fast & compact hash/array hybrid (access by key or index) (for parameter passing, with keyword-args)
<erikh>
or are you talking about something like perl's list forms?
<apeiros_>
not the syntax, the implementation
<apeiros_>
I already settled on the syntax :)
<erikh>
well Hash#to_a exists and ... yeah. I mean, I guess I don't see what there is to create here
<erikh>
maybe some wrappings around that, but even then I'm not sure if it's actually useful for anything beyond decoration.
<erikh>
either way, I strongly suggest you look into what perl calls a list. this is exactly what you're after most likely.
* apeiros_
failed at providing context, also I'm probably in the wrong channel for that :D
<erikh>
ah sorry
kvirani has joined #ruby-lang
Nisstyre has joined #ruby-lang
<apeiros_>
erikh: nah, I'm wondering about an efficient datastructure to implement argument passing myself
<apeiros_>
and since I have kwargs and normal args (they may be mixed too), I need both, named & indexed lookup
<cirwin>
apeiros_: look how python does it
<apeiros_>
that's actually not a bad idea. does python allow mixing kw and non-kw args?
<apeiros_>
i.e., are both, foo(1, b: 2) and foo(a: 1, 2) valid?
<cirwin>
you can call a function: def foo(bar=baz, *args, **kwargs): like foo(**{'bar':'baz'})
<cirwin>
you can't have any more non-named parameters after the first named one
<apeiros_>
ok, then I can't use python as a reference
tonesfrommars has joined #ruby-lang
<apeiros_>
I can still peek at its implementation
<cirwin>
I tihnk the reason for that restriction is quite a good one
<cirwin>
foo(b: 1, 2) <-- what value has b?
<cirwin>
I guess 1, and you shunt 2 to be a?
diegoviola has joined #ruby-lang
<cirwin>
quite confusing
<shevy>
b would be one
<shevy>
2 would go to the first unnamed arg
<cirwin>
yeah; not elegant — but then I guess this is ruby not python ;)
<apeiros_>
cirwin: I think it's quite obvious that you don't assign to the same target twice.
<apeiros_>
and you not being used to it doesn't equal it being confusing
<apeiros_>
you have an expectation which is formed by where you come from
<cirwin>
maybe
<apeiros_>
I mean, as for the confusing - you figured it out quickly yourself…
<cirwin>
true enough
<cirwin>
I guess a more confusing example would be def foo(a,b,c); foo(1, 2, b:3)
<apeiros_>
yes, because it wouldn't be resolved ltr
<apeiros_>
named ones are taken out of the equation first
<apeiros_>
rest is just like you're used from ruby
<cirwin>
yeah
<cirwin>
nomity nom
<cirwin>
you could have great fun if the keyword args come from a hash
<cirwin>
depending on which keys in the hash, which positional parameters are filled :)
<zenspider>
rue: sorry. pretty girl showed up and distracted me... do you have any suggestions for rewording the parenthetical?
<shevy>
a pretty girl? lies!
<rue>
zenspider: Well, is the focus on just generally getting into open source, or specifically transcending one's own needs?
<zenspider>
the concrete examples I have primarily address the latter
<zenspider>
specifically, 50-200 line pull requests that are monkeypatch-erific vs a 3 line change that can totally do what the former does and much more
<zenspider>
new working title: How to Contribute to Open Source: Extensibility from Simplicity
robotmay has joined #ruby-lang
<rue>
The why is outside the scope, right, it's assumed that the audience will want to contribute?
<zenspider>
sure
<drbrain>
if they don't contribute I'm sure they'll be duly lit on fire
<rue>
Heh
<rue>
In that case, it sounds pretty good. I'd maybe go with a dryer “the importance/ramifications of simplicity/KISS” or something along those lines
<zenspider>
we've worked together before... right? :P
<rue>
Essential simplicity
dous has joined #ruby-lang
<rue>
Maybe a lightning talk titled “Contributing to Open Source: the Importance of Naming” as a corollary…
Clordio_ has joined #ruby-lang
WillMarshall has joined #ruby-lang
nofxx has joined #ruby-lang
<zenspider>
drbrain: do you have any other examples that I might be able to use in this talk?
hagabaka has joined #ruby-lang
hagabaka has joined #ruby-lang
mikeric has joined #ruby-lang
<andrewvos>
rue: Did you like how my drawing looked like it might be a penis, then I pivoted and made it a keychain? Some fine work if I do say so myself.
Banistergalaxy has joined #ruby-lang
<drbrain>
zenspider: I think Aaron might have some, since he's working on more tractable stuff
<drbrain>
I can't recall any for rdoc/rubygems right now, but I'll think about it
<zenspider>
kk
<zenspider>
thanks guys... I'm out
rhizmoe has joined #ruby-lang
<rhizmoe>
true || true = true # does that derive from a classical implementation of "or"?
<rhizmoe>
dunno if that makes sense
<apeiros_>
o0
<apeiros_>
doesn't to me
<apeiros_>
true = true - assignment to true is not valid, so what did you want to say with it?
<drbrain>
I see a syntax error
<rhizmoe>
"or" when both true is kind of an "and," no?
<rhizmoe>
sorry ==
<apeiros_>
not sure I get the question
<rhizmoe>
i don't know if i can articulate one
<apeiros_>
execution-wise or short-cuts. i.e., if the first operand evaluates to true, the second is ignored