nghialv2_ has quit [Remote host closed the connection]
baronmango has left #ruby-lang [#ruby-lang]
yfeldblum has quit [Ping timeout: 245 seconds]
banister`sleep has quit [Remote host closed the connection]
mytrile has quit [Remote host closed the connection]
mytrile has joined #ruby-lang
blacktulip has joined #ruby-lang
nghialv2607 has joined #ruby-lang
DomKM1 has joined #ruby-lang
vlad_starkov has joined #ruby-lang
DomKM has quit [Ping timeout: 252 seconds]
divout has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby-lang
yknot_ has joined #ruby-lang
yknot_ has quit [Client Quit]
sush24 has joined #ruby-lang
DomKM1 has quit [Quit: Leaving.]
DomKM has joined #ruby-lang
r0bglees0n has quit [Ping timeout: 252 seconds]
neverminding has joined #ruby-lang
kgrz has joined #ruby-lang
nXqd has joined #ruby-lang
jerrytgarcia has joined #ruby-lang
mucker has quit [Quit: leaving]
neilc has joined #ruby-lang
jerrytgarcia has quit [Client Quit]
havenwood has joined #ruby-lang
<neilc>
is it possible to write constructors that just initialize instance variables more concisely?
<neilc>
i.e., my initialize methods are usually "def initialize(x,y,z); @x = x; @y = y; @z = z; end;"
<neilc>
is there any way (metaprogramming?) to avoid the boilerplate?
nXqd has quit [Ping timeout: 260 seconds]
snarfmason has joined #ruby-lang
nXqd has joined #ruby-lang
vlad_starkov has joined #ruby-lang
tomzx_mac has joined #ruby-lang
havenwood has quit [Ping timeout: 264 seconds]
Bosox20051 has quit [Quit: Leaving]
Polish_ has joined #ruby-lang
Polish_ has quit [Remote host closed the connection]
sandbags has joined #ruby-lang
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
<drbrain>
neilc: beyond @x, @y, @z = x, y, z; no
<drbrain>
you can use a Struct, I guess
<drbrain>
but then you don't get instance variables
<neilc>
drbrain: thanks!
<drbrain>
I don't really consider it boilerplate
<drbrain>
… if I get past four or five instance variables created from arguments to initialize I probably try to refactor that into more objects
<neilc>
yeah, it is debatable i guess
<neilc>
the scala syntax is kinda nice
jkline has quit [Quit: jkline]
<neilc>
but maybe more confusing if you don't have static typing
<drbrain>
there have been some proposals to add a way to make it simpler
tbuehlmann has joined #ruby-lang
<drbrain>
but I don't think any have stuck
<neilc>
cool, just curious
<neilc>
thanks again
asunderland has quit [Ping timeout: 256 seconds]
tonni has quit [Remote host closed the connection]
<TTilus>
neilc: you could use kw args, but then again having enough constructor params to consider it boilerplate is prolly a signal for rethinking that part of architecture
cordax has quit [Quit: Computer has gone to sleep.]
cordax has joined #ruby-lang
neverminding has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ryanf>
I like coffeescript's shortcut for that
<ryanf>
def initialize(@x, @y, @z)
<ryanf>
but it might be a little too cute for ruby
<tbuehlmann>
ryanf, it's been discussed before
jkline has joined #ruby-lang
<rue>
I’d sooner import the {} deconstruction syntax
tonni has joined #ruby-lang
<ryanf>
rue: for hashes I guess? that would be kind of interesting
<ryanf>
it wouldn't be as useful since hashes and objects are different
<ryanf>
but that is great sugar in coffeescript
richardjortega has quit [Quit: richardjortega]
<ryanf>
urgh plus do you assume the hash has symbol keys or string keys :(
workmad3 has joined #ruby-lang
sandbags has quit [Remote host closed the connection]
sduckett has joined #ruby-lang
erikh has joined #ruby-lang
tbuehlmann has quit [Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org]
<erikh>
whitequark, andrewvos: not sure if you guys care, but there's a freakin' example of how to do the http streaming bits in the Net::HTTP documentation
tbuehlmann has joined #ruby-lang
<erikh>
kind of sad that I immediately looked for something else. on the bright side, I guess documentation is a lot better these days. :)
cordax has quit [Quit: Computer has gone to sleep.]
sduckett has quit [Ping timeout: 252 seconds]
benlovell has joined #ruby-lang
jerrytgarcia has joined #ruby-lang
jxie has quit [Quit: leaving]
xcombelle has joined #ruby-lang
Mon_Ouie has joined #ruby-lang
neilc has quit [Quit: leaving]
DomKM has quit [Quit: Leaving.]
barttenbrinke has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
workmad3 has quit [Ping timeout: 264 seconds]
cordax has joined #ruby-lang
kgrz has quit [Ping timeout: 257 seconds]
jkline has quit [Quit: jkline]
<yorickpeterse>
morning
mjio has quit []
cordax has quit [Quit: Computer has gone to sleep.]
cordax has joined #ruby-lang
tonni has quit [Remote host closed the connection]
marr has joined #ruby-lang
kgrz has joined #ruby-lang
rwk1 has joined #ruby-lang
gnufied has joined #ruby-lang
kgrz has quit [Ping timeout: 255 seconds]
Axsuul has quit [Ping timeout: 256 seconds]
maxmanders has joined #ruby-lang
woollyams has quit [Ping timeout: 256 seconds]
havenwood has joined #ruby-lang
havenwood has quit [Remote host closed the connection]
tonni has joined #ruby-lang
cordax has quit [Quit: Computer has gone to sleep.]
cordax has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
headius has quit [Quit: headius]
headius has joined #ruby-lang
Asher has quit [Quit: Leaving.]
swav has joined #ruby-lang
rwk1 has quit [Remote host closed the connection]
marr has quit [Ping timeout: 258 seconds]
rwk1 has joined #ruby-lang
marr has joined #ruby-lang
arooni-mobile has joined #ruby-lang
MaddinXx has joined #ruby-lang
<andrewvos>
morning
ruurd has joined #ruby-lang
zachlatta has quit [Remote host closed the connection]
arooni-mobile has quit [Ping timeout: 245 seconds]
cordax has quit [Quit: Computer has gone to sleep.]
glebm has joined #ruby-lang
solars has joined #ruby-lang
Mon_Ouie has quit [Remote host closed the connection]
Mon_Ouie has joined #ruby-lang
<manveru>
morning
headius has quit [Ping timeout: 240 seconds]
workmad3 has joined #ruby-lang
face has quit [Ping timeout: 256 seconds]
retro|cz has quit [Ping timeout: 245 seconds]
rwk1 has quit [Remote host closed the connection]
sduckett has joined #ruby-lang
nghialv2607 has quit [Remote host closed the connection]
dc5ala has joined #ruby-lang
sduckett has quit [Ping timeout: 276 seconds]
divout has quit [Ping timeout: 268 seconds]
<injekt>
morning
divout has joined #ruby-lang
glebm has quit [Ping timeout: 245 seconds]
retro|cz has joined #ruby-lang
glebm has joined #ruby-lang
workmad3 has quit [Ping timeout: 252 seconds]
oiuzikov has joined #ruby-lang
oiuzikov has quit [Read error: Connection reset by peer]
oiuzikov has joined #ruby-lang
<gnufied>
morning guys
Olipro has joined #ruby-lang
oneirophren has quit [Ping timeout: 256 seconds]
GarethAdams has joined #ruby-lang
rwk1 has joined #ruby-lang
wpp has joined #ruby-lang
Asher has joined #ruby-lang
GeissT_ has joined #ruby-lang
marr has quit [Ping timeout: 248 seconds]
oiuzikov has quit [Quit: oiuzikov]
oiuzikov has joined #ruby-lang
oiuzikov has quit [Client Quit]
GeissT has quit [Ping timeout: 240 seconds]
wpp has quit [Client Quit]
wpp has joined #ruby-lang
wpp has left #ruby-lang [#ruby-lang]
poga has joined #ruby-lang
rwk1 has quit [Ping timeout: 245 seconds]
sepp2k has joined #ruby-lang
adambeynon has joined #ruby-lang
oiuzikov has joined #ruby-lang
glebm has quit [Ping timeout: 255 seconds]
glebm has joined #ruby-lang
oiuzikov has quit [Remote host closed the connection]
beiter has joined #ruby-lang
hramrach_ has joined #ruby-lang
oiuzikov has joined #ruby-lang
oiuzikov has left #ruby-lang [#ruby-lang]
oiuzikov has joined #ruby-lang
joshH10 has quit [Read error: Connection reset by peer]
hramrach has quit [Ping timeout: 276 seconds]
Criztian has joined #ruby-lang
<ndrst>
moring
GeissT_ has quit [Ping timeout: 245 seconds]
hhatch has joined #ruby-lang
jxie has joined #ruby-lang
Maax has joined #ruby-lang
jxie has quit [Quit: leaving]
xxaM has quit [Ping timeout: 260 seconds]
baba has joined #ruby-lang
cod3r has quit [Ping timeout: 252 seconds]
jxie has joined #ruby-lang
jg has joined #ruby-lang
shevy has joined #ruby-lang
glebm has quit [Ping timeout: 245 seconds]
Criztian has quit [Remote host closed the connection]
glebm has joined #ruby-lang
anthonym has joined #ruby-lang
Maax has left #ruby-lang [#ruby-lang]
xxaM has joined #ruby-lang
pskosinski has quit [Ping timeout: 252 seconds]
glebm has quit [Ping timeout: 252 seconds]
glebm has joined #ruby-lang
sush24 has quit [Quit: This computer has gone to sleep]
headius has joined #ruby-lang
rwk1 has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
jovy88 has quit [Read error: Connection reset by peer]
marr has joined #ruby-lang
jovy88 has joined #ruby-lang
<andrewvos>
Hey programmer bros. Say I do this in bash `command1; command2` where command2 is a ruby script. How do I get the exit code of command1 inside command2?
<andrewvos>
$? is nil
divout has quit [Quit: Leaving.]
<yorickpeterse>
I don't think you can pass exit statuses in Bash
<yorickpeterse>
also, that runs them as two separate commands
<yorickpeterse>
so command2 doesn't know anything from command1
<andrewvos>
I know
<andrewvos>
Ergh really?
<yorickpeterse>
yeah, the only way to pass data is using pipes
<andrewvos>
Gehh so I have to do something like `command2 -c "command1"`
<andrewvos>
FFUUUUU
<yorickpeterse>
`foo; bar` is bascially "run foo, do something completely unrelated, run bar"
<manveru>
you can pass the exit status of course
<manveru>
`foo; bar $?`
<yorickpeterse>
wouldn't that require you to deal with it using ARGV?
<yorickpeterse>
as in, it becomes an actual argument to the second script
<andrewvos>
I don't like having to type $? all the time
<andrewvos>
I've just take all args from command2 and sent them to #system
pskosinski has joined #ruby-lang
headius has quit [Ping timeout: 264 seconds]
<andrewvos>
Erm, `system(ARGV*)` should work right
<andrewvos>
?
kgrz has joined #ruby-lang
<andrewvos>
Oh, errr, never mind.
anthonym has left #ruby-lang [#ruby-lang]
divout has joined #ruby-lang
v0yager_ has joined #ruby-lang
barttenbrinke has quit [Remote host closed the connection]
headius has joined #ruby-lang
judofyr has joined #ruby-lang
zmack has joined #ruby-lang
v0yager has quit [Ping timeout: 240 seconds]
sduckett has joined #ruby-lang
zmack has quit [Remote host closed the connection]
glebm has quit [Ping timeout: 256 seconds]
GeissT_ has joined #ruby-lang
glebm has joined #ruby-lang
<andrewvos>
Ok so command2 now take all args and just throws them into #system. Problem is, I want to see the output of the command and useit later on
<andrewvos>
How do?
<andrewvos>
I am writing a script that goes like `alert_me_when_this_script_is_done curl google.com` and I want to push notify my phone with a title of SUccess or Fail and in the message I want to put some of the output of the command.
sduckett has quit [Ping timeout: 256 seconds]
<judofyr>
andrewvos: IO.popen ?
<andrewvos>
judofyr: Not entirely sure how I would do this though
rwk1 has quit [Remote host closed the connection]
mbj has joined #ruby-lang
pieux has joined #ruby-lang
headius has quit [Ping timeout: 256 seconds]
glebm has quit [Ping timeout: 252 seconds]
marr has quit [Ping timeout: 252 seconds]
tonni has quit [Remote host closed the connection]
glebm has joined #ruby-lang
tonni has joined #ruby-lang
pieux has quit [Quit: 离开]
headius has joined #ruby-lang
v0yager_ has quit [Read error: Connection reset by peer]
v0yager has joined #ruby-lang
barttenbrinke has joined #ruby-lang
tedstriker has joined #ruby-lang
judofyr has quit [Ping timeout: 245 seconds]
judofyr has joined #ruby-lang
runeb has joined #ruby-lang
glebm has quit [Ping timeout: 264 seconds]
<ddfreyne>
A question about exception handling style…
<ddfreyne>
Suppose I have a method that raises an exception, but the method doesn’t have enough context to create a meaningful error message
<ddfreyne>
i.e. parse_data(string) fails, but I would like the exception to have a filename as well
benlovell has quit [Ping timeout: 264 seconds]
<ddfreyne>
My idea was to catch the exception in parse_file(), set the filename and continue, like this:
<yorickpeterse>
I'm pretty sure those are just bots
tonni has quit [Remote host closed the connection]
glebm has joined #ruby-lang
marr has quit [Ping timeout: 268 seconds]
outoftime has joined #ruby-lang
mistym_ has joined #ruby-lang
spectra has quit [Ping timeout: 246 seconds]
<tedstriker>
judofyr: re tilt… might be something i'm looking for, i'm building a gem for testing that renders the layouts and checks for broken links in the rendered content, from the docs looks just ticket?
<judofyr>
tedstriker: well, what type of layouts? if it's a Rails application it might depend on ActionView-helpers
melter has joined #ruby-lang
intellitech has quit [Ping timeout: 245 seconds]
tarruda has quit [Quit: leaving]
<tedstriker>
yeah, lots of potential snag points for it, but sounds like it might work.. current gem is cohesion which works for a url, but wanting to integrate that with rails to test the render
r0bglees0n has joined #ruby-lang
chrismar035 has joined #ruby-lang
chrismar035 has quit [Client Quit]
vlad_starkov has quit [Remote host closed the connection]
tarruda has joined #ruby-lang
cordax has joined #ruby-lang
tonni has joined #ruby-lang
marr has joined #ruby-lang
barttenbrinke has joined #ruby-lang
sailias has joined #ruby-lang
nghialv2607 has joined #ruby-lang
workmad3 has quit [Ping timeout: 252 seconds]
yfeldblum has joined #ruby-lang
wmoxam has joined #ruby-lang
nXqd has quit [Ping timeout: 248 seconds]
mistym_ has quit [Remote host closed the connection]
glebm has quit [Ping timeout: 268 seconds]
glebm has joined #ruby-lang
sailias has quit [Ping timeout: 256 seconds]
barttenbrinke has quit [Remote host closed the connection]
<injekt>
there's no reason to use it over proc{} it's just syntactic sugar
<ericwood>
yeah but I like syntactic sugar!
kvs has joined #ruby-lang
yknot_ has joined #ruby-lang
<injekt>
some people prefer it, like : over hash rocket in hashes
<ericwood>
I prefer rockets
<injekt>
and I prefer : :)
<ericwood>
=> => =>
<ericwood>
pew pew pew
<judofyr>
injekt: well, there's one reason: lambda vs. proc
<judofyr>
>> ->{}.call(1)
<eval-in>
judofyr => /tmp/execpad-4ed1b0daa52b/source-4ed1b0daa52b:2:in `block in <main>': wrong number of arguments (1 for 0) (ArgumentError) ... (http://eval.in/19154)
<eval-in>
judofyr => /tmp/execpad-afa600f46ba1/source-afa600f46ba1:2:in `block in <main>': wrong number of arguments (1 for 0) (ArgumentError) ... (http://eval.in/19156)
<injekt>
it's syntactic sugar for lambda not proc
<injekt>
judofyr was making an example of me!
<ericwood>
>> foo = ->{}; foo.call(1)
<eval-in>
ericwood => /tmp/execpad-43ffbd9891c2/source-43ffbd9891c2:2:in `block in <main>': wrong number of arguments (1 for 0) (ArgumentError) ... (http://eval.in/19157)
<eval-in>
zzak => /tmp/execpad-7aafd4130c0e/source-7aafd4130c0e:2:in `<main>': undefined local variable or method `inkjet' for main:Object (NameError) (http://eval.in/19165)
<injekt>
:D
<andrewvos>
>>injekt = inkjet
<eval-in>
andrewvos => /tmp/execpad-7da5017fcb7d/source-7da5017fcb7d:2:in `<main>': undefined local variable or method `inkjet' for main:Object (NameError) (http://eval.in/19166)
<injekt>
that's long enough and close enough for me to be able to go possibly
<zzak>
yay
imperator has joined #ruby-lang
jxie has joined #ruby-lang
erpuds has joined #ruby-lang
mytrile has quit [Ping timeout: 252 seconds]
maxmanders has quit [Client Quit]
fungus_ has joined #ruby-lang
fungus_ has quit [Client Quit]
rlb3 has joined #ruby-lang
headius has quit [Quit: headius]
dkannan has quit [Quit: dkannan]
<zzak>
wo 6
<zzak>
mt
<yorickpeterse>
judofyr: regarding your Sprockets tweet, isn't it standard Github/37Basecamps procedure to not maintain something after lots of people use it?
<yorickpeterse>
e.g. rbenv, jekyll (though that's solved now I believe), etc
kevinfagan_ is now known as kevinfagan
chris2_ has joined #ruby-lang
chris2 has quit [Remote host closed the connection]
bzalasky has joined #ruby-lang
mytrile has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
maxmanders has joined #ruby-lang
<judofyr>
yorickpeterse: :)
jg has quit [Ping timeout: 255 seconds]
headius has joined #ruby-lang
judofyr has quit [Remote host closed the connection]
odcinek has joined #ruby-lang
rlb3 has left #ruby-lang ["ERC Version 5.3 (IRC client for Emacs)"]
<zzak>
maintaining software takes all the fun out of it
enebo has joined #ruby-lang
<injekt>
:D
<injekt>
i really need to find time for chronic
<imperator>
irony?
asunderland has joined #ruby-lang
erpuds has quit [Quit: erpuds]
<injekt>
no?
<andrewvos>
Yeah, I've been wanting to get back into soft drugs for a while too
yknot_ has quit [Ping timeout: 276 seconds]
<yorickpeterse>
aaaaand that one is going on Shitter
<injekt>
har
<andrewvos>
I was responding to injekt ;)
<yorickpeterse>
suuuuure
<andrewvos>
haha
zachlatta has joined #ruby-lang
zachlatta has quit [Remote host closed the connection]
thorncp has left #ruby-lang [#ruby-lang]
erpuds has joined #ruby-lang
glebm has quit [Ping timeout: 260 seconds]
glebm has joined #ruby-lang
snafoo has joined #ruby-lang
snafoo has quit [Changing host]
snafoo has joined #ruby-lang
gnufied1 has joined #ruby-lang
ruurd has quit [Ping timeout: 245 seconds]
benlovell has quit [Ping timeout: 276 seconds]
gnufied has quit [Ping timeout: 252 seconds]
srbaker has joined #ruby-lang
bzalasky has quit [Remote host closed the connection]
sush24 has quit [Quit: This computer has gone to sleep]
ndrst has quit [Ping timeout: 245 seconds]
r0bby has quit [Ping timeout: 256 seconds]
ndrst has joined #ruby-lang
wesside has quit [Remote host closed the connection]
glebm has quit [Ping timeout: 264 seconds]
beiter has quit [Quit: beiter]
r0bby has joined #ruby-lang
glebm has joined #ruby-lang
io_syl has quit [Quit: Computer has gone to sleep.]
kgrz has quit [Ping timeout: 246 seconds]
kgrz has joined #ruby-lang
gnufied has joined #ruby-lang
tedstriker has quit [Quit: Anti-Fraping status set.]
gnufied1 has quit [Ping timeout: 252 seconds]
jovy88 has quit [Read error: Connection reset by peer]
maxmanders has quit [Quit: Computer has gone to sleep.]
glebm has quit [Ping timeout: 252 seconds]
jovy88 has joined #ruby-lang
glebm has joined #ruby-lang
workmad3 has joined #ruby-lang
vlad_starkov has joined #ruby-lang
glebm has quit [Read error: Connection reset by peer]
runeb has quit [Remote host closed the connection]
tarruda has joined #ruby-lang
tarruda has quit [Client Quit]
beiter has joined #ruby-lang
headius has quit [Quit: headius]
wesside has joined #ruby-lang
sush24 has joined #ruby-lang
alessio_rocco has joined #ruby-lang
kogent has joined #ruby-lang
brianpWins has joined #ruby-lang
__butch__ has joined #ruby-lang
DomKM has joined #ruby-lang
headius has joined #ruby-lang
athaeryn has joined #ruby-lang
tylersmith has joined #ruby-lang
headius has quit [Client Quit]
benlovell has joined #ruby-lang
holgerno has joined #ruby-lang
holgerno has quit [Changing host]
holgerno has joined #ruby-lang
sepp2k has joined #ruby-lang
<rue>
zzak: We must found a united front to combat the anti-author presumption that the creator of a work is by default responsible for its maintenance
glebm has quit [Ping timeout: 252 seconds]
headius has joined #ruby-lang
tarruda has joined #ruby-lang
glebm has joined #ruby-lang
marr has quit [Ping timeout: 256 seconds]
headius has quit [Client Quit]
snafoo has quit [Read error: Connection reset by peer]
Kuukunen has quit [Ping timeout: 245 seconds]
vlad_starkov has quit [Remote host closed the connection]
<zzak>
rue: noone wants to do it
swav has quit [Remote host closed the connection]
Criztian has quit [Remote host closed the connection]
<rue>
Well too bad then
<zzak>
someone else usually has to step up
<rue>
Maybe something like automatic commit rights too
oneirophren has quit [Ping timeout: 256 seconds]
vlad_starkov has joined #ruby-lang
<zzak>
i always try to encourage people to assume responsibility
<zzak>
make the maintainers life easier, not harder
benlovel1 has joined #ruby-lang
benlovell has quit [Read error: Connection reset by peer]
wmoxam_ has joined #ruby-lang
wmoxam has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Remote host closed the connection]
<rue>
That never works
<rue>
Dump it in their laps, a leader will emerge!
nghialv2607 has quit [Remote host closed the connection]
oneirophren has joined #ruby-lang
benlovel1 has quit [Quit: leaving]
benlovell has joined #ruby-lang
barttenbrinke has quit [Remote host closed the connection]
mrsolo has joined #ruby-lang
joast has quit [Quit: Leaving.]
vlad_starkov has joined #ruby-lang
cored has quit [Ping timeout: 256 seconds]
cored has joined #ruby-lang
cored has joined #ruby-lang
cored has quit [Changing host]
yknot has joined #ruby-lang
snafoo has joined #ruby-lang
snafoo has quit [Changing host]
snafoo has joined #ruby-lang
adambeynon has quit [Quit: Computer has gone to sleep.]
erpuds has quit [Quit: erpuds]
xcombelle has quit [Read error: Connection reset by peer]
benlovel1 has joined #ruby-lang
io_syl has joined #ruby-lang
bothra has quit [Read error: Connection reset by peer]
bothra has joined #ruby-lang
jovy88 has quit [Read error: Connection reset by peer]
<imperator>
are we talking about any project in particular?
tjcravey has joined #ruby-lang
DarkBushido has joined #ruby-lang
imajes_ has joined #ruby-lang
davidbalber|away has joined #ruby-lang
ahf_ has joined #ruby-lang
anekos_ has joined #ruby-lang
agile has quit [*.net *.split]
flexd has quit [*.net *.split]
scottschecter has quit [*.net *.split]
knu has quit [*.net *.split]
pbjorklund has quit [*.net *.split]
ahf has quit [*.net *.split]
pcboy_ has quit [*.net *.split]
fuzzy8balls has quit [*.net *.split]
rtl has quit [*.net *.split]
imajes has quit [*.net *.split]
dvorak has quit [*.net *.split]
aef has quit [*.net *.split]
anekos has quit [*.net *.split]
baseonmars has quit [*.net *.split]
badeball has quit [*.net *.split]
tpope has quit [*.net *.split]
mfn has quit [*.net *.split]
davidbalbert has quit [*.net *.split]
_dumfries has quit [*.net *.split]
imajes_ is now known as imajes
dvorak has joined #ruby-lang
agile has joined #ruby-lang
scottschecter has joined #ruby-lang
pcboy_ has joined #ruby-lang
fuzzy8balls has joined #ruby-lang
badeball has joined #ruby-lang
pbjorklund has joined #ruby-lang
kstuart has quit [Remote host closed the connection]
rtl has joined #ruby-lang
tpope has joined #ruby-lang
ahf_ is now known as ahf
kstuart has joined #ruby-lang
knu has joined #ruby-lang
headius has joined #ruby-lang
mistym has quit [Remote host closed the connection]
aef has joined #ruby-lang
_dumfries has joined #ruby-lang
richardjortega has joined #ruby-lang
cod3r has joined #ruby-lang
baba has quit [Ping timeout: 264 seconds]
symm- has joined #ruby-lang
justinram has joined #ruby-lang
tarruda has joined #ruby-lang
baseonmars has joined #ruby-lang
joshH10 has joined #ruby-lang
flexd has joined #ruby-lang
wmoxam_ is now known as wmoxam
wmoxam has quit [Changing host]
wmoxam has joined #ruby-lang
mfn has joined #ruby-lang
swav has joined #ruby-lang
chris2 has joined #ruby-lang
knu has quit [*.net *.split]
fuzzy8balls has quit [*.net *.split]
pbjorklund has quit [*.net *.split]
badeball has quit [*.net *.split]
swav_ has joined #ruby-lang
oneirophren has quit [Ping timeout: 256 seconds]
randallagordon has joined #ruby-lang
swav has quit [Ping timeout: 252 seconds]
knu has joined #ruby-lang
badeball has joined #ruby-lang
fuzzy8balls has joined #ruby-lang
randalla1ordon has quit [Ping timeout: 264 seconds]
pbjorklund has joined #ruby-lang
krohrbaugh has joined #ruby-lang
benanne has joined #ruby-lang
dc5ala has quit [Quit: Ex-Chat]
yknot has quit [Ping timeout: 260 seconds]
DarkBushido has quit [Quit: Leaving...]
yknot_ has joined #ruby-lang
<headius>
drbrain: rdoc gem works fine on 1.8.7, right? I think we're going to rip it out of our stdlib and either preinstall the gem or just let users do it
hhatch has quit [Ping timeout: 248 seconds]
<drbrain>
headius: yep
<drbrain>
I still support 1.8.7
<headius>
do you know if it's gem-upgradable in MRI?
<headius>
it's obviously shipped in stdlib
<drbrain>
or all supported versions, yes
<headius>
how do they do that, exactly? I'm still confused about how they handle gem-upgradable stdlibs
<drbrain>
on 1.8.7, gems get preference thanks to RubyGems
<drbrain>
for 1.9 it's hairy, let's not discuss it :)
<drbrain>
for 2.0 there's special rubygems support
<drbrain>
look for "default gems" in rubygems 2
<headius>
I want to do whatever 2.0 does, I believe...got a pointer to that or can you describe it?
<headius>
load path munging or something?
<drbrain>
there are special specs and a test at the front of require that says "is this file part of a default gem?"
<drbrain>
if so, it requires through rubygems
<drbrain>
otherwise it requires through Kernel.require
<headius>
ah-ha...and they have a generated list of what's a default gem
<drbrain>
yeah
<drbrain>
I need to bus, bbiab
<headius>
ok, thanks, I'll look at the code
<drbrain>
Ok, back
GarethAdams has joined #ruby-lang
GarethAdams has quit [Changing host]
GarethAdams has joined #ruby-lang
swav has joined #ruby-lang
<drbrain>
In GEM_HOME/specifications/default there's a bunch of specs for gems from stdlib
divout has quit [Quit: Leaving.]
tophalf01 has quit [Quit: I must go. My people need me.]
swav_ has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby-lang
runeb has joined #ruby-lang
swav_ has joined #ruby-lang
<spike|spiegel>
that's just.... silly.
asunderland has quit [Ping timeout: 252 seconds]
sush24 has quit [Quit: This computer has gone to sleep]
vlad_starkov has quit [Remote host closed the connection]
Nisstyre has quit [Read error: Operation timed out]
vlad_starkov has joined #ruby-lang
krohrbaugh has joined #ruby-lang
glebm has joined #ruby-lang
glebm has quit [Read error: Connection reset by peer]
glebm has joined #ruby-lang
glebm has quit [Read error: Connection reset by peer]
ndrst has quit [Ping timeout: 260 seconds]
glebm has joined #ruby-lang
glebm has quit [Read error: Connection reset by peer]
amerine has joined #ruby-lang
Nisstyre has joined #ruby-lang
krohrbaugh has quit [Ping timeout: 246 seconds]
outoftime has quit [Quit: Leaving]
glebm has joined #ruby-lang
outoftime has joined #ruby-lang
symm- has quit [Ping timeout: 258 seconds]
nilibanili has joined #ruby-lang
jovy88 has quit [Read error: Connection reset by peer]
jovy88 has joined #ruby-lang
nilibanili has quit [Remote host closed the connection]
nilibanili has joined #ruby-lang
srbaker has quit [Read error: Operation timed out]
amerine has quit [Ping timeout: 272 seconds]
vlad_sta_ has joined #ruby-lang
amerine has joined #ruby-lang
vlad_starkov has quit [Ping timeout: 272 seconds]
benlovell has joined #ruby-lang
amerine has quit [Client Quit]
Luwe has joined #ruby-lang
Luwe has quit [Client Quit]
Austin__ has quit [Quit: Leaving.]
nilibanili has quit [Remote host closed the connection]
Austin__ has joined #ruby-lang
blazes816 has joined #ruby-lang
blazes816 has quit [Remote host closed the connection]
tylersmith has quit [Remote host closed the connection]
chessguy has joined #ruby-lang
tylersmith has joined #ruby-lang
chessguy has quit [Remote host closed the connection]
amerine has joined #ruby-lang
srbaker has joined #ruby-lang
tylersmith has quit [Client Quit]
benlovell has quit [Ping timeout: 256 seconds]
srbaker has quit [Client Quit]
tylersmith has joined #ruby-lang
vlad_starkov has joined #ruby-lang
TheNotary has joined #ruby-lang
krohrbaugh has joined #ruby-lang
maxmanders has joined #ruby-lang
maxmanders has quit [Client Quit]
Nisstyre-laptop has joined #ruby-lang
vlad_sta_ has quit [Ping timeout: 255 seconds]
symm- has joined #ruby-lang
swav has quit [Remote host closed the connection]
<TheNotary>
I'm working on a gem that will do file patches. They're lines of code in a .js file. Are there any gems that deal with patching files? I'm wondering if I can use diffs to patch/unpatch a file even if it's been edited elsewhere and the line of the target to be patched has changed.
<TheNotary>
Anyone have any thoughts or know of existing gems?
glebm has quit [Ping timeout: 268 seconds]
ndrst has joined #ruby-lang
glebm has joined #ruby-lang
srbaker has joined #ruby-lang
jtmitch has joined #ruby-lang
<jtmitch>
good afternoon
<jtmitch>
I was hoping someone could help me figure out how to detect when a key is let up - I want to run some code when a key is pressed and run another bit of code when the key is let up
glebm has quit [Ping timeout: 240 seconds]
voker57 has quit [Remote host closed the connection]
voker57 has joined #ruby-lang
voker57 has quit [Changing host]
voker57 has joined #ruby-lang
jperry2 has quit [Read error: Operation timed out]
headius has quit [Quit: headius]
glebm has joined #ruby-lang
<drbrain>
jtmitch: on the console?
<badeball>
TheNotary: a patch usually consists of changes along with the context. a context is used to identify the intended location of the change. therefore, if the context has changed, there is no way to unambiguously apply a patch. this is for instance why git will multiple people to work on the same file, but as soon as they start working in the vicinity of each others, conflicts does arise.
amerine has quit [Quit: Computer has gone to sleep.]
<jtmitch>
drbrain, yes
<TheNotary>
badeball: what are some good ways to establish contexts? Here's a gist of a prototype configuration for patches I'm fleshing out right now. It has a very niave context chooser, it will throw an error if there are multiple occurrences of the string to patch unless it is specified to patch the exact number of occurrences within the target file.
<drbrain>
jtmitch: I don't think even curses gives you keyup/keydown events
sailias has quit [Ping timeout: 245 seconds]
<drbrain>
maybe a lower-level API than curses does it
<jtmitch>
drbrain, that's what i was afraid of
<jtmitch>
maybe another way to think of it: can I detect that no keys are being pressed?
<drbrain>
with io/console (or curses) you can use IO.select and getch in a loop and yield the appropriate event
<badeball>
TheNotary: look at wikipedia diff-entry for a couple of examples of how diff has been done: http://en.wikipedia.org/wiki/Diff
<badeball>
TheNotary: why do you want to create your own anyone?
<jtmitch>
thanks for your thoughts drbrain
<TheNotary>
badeball: thanks. I like rolling my own stuff, but I like pushing myself to learn other tools and algos even though I find it a bit tedious going through other ppls docs sometimes
<jtmitch>
I'll look into IO - couldn't find what I was looking for in curses
<TheNotary>
this wiki looks great
maxmanders has joined #ruby-lang
Austin__1 has joined #ruby-lang
srbaker has quit [Quit: Computer has gone to sleep.]
chris2_ has quit [Quit: und wech...]
Austin__1 has left #ruby-lang [#ruby-lang]
Austin__ has quit [Ping timeout: 240 seconds]
<badeball>
TheNotary: you'll be revolutionizing the world of vcs if you develop a guaranteed conflict-free and unambiguous patch-applier :)
retro|cz has joined #ruby-lang
musl_ has quit [Quit: WeeChat 0.4.0]
<ericwood>
I'd buy that
musl has joined #ruby-lang
outoftime has quit [Quit: Leaving]
<drbrain>
jtmitch: something like: loop do; IO.select [$stdin]; yield :down; loop do s, = IO.select [$stdin], nil, nil, 0.01; break if s.empty?; $stdin.getch; end; yield :up; end
<drbrain>
I think I wrote that correctly
<ericwood>
I love select!
judofyr has quit [Remote host closed the connection]
<jtmitch>
interesting!
<jtmitch>
it'll be a bit before I can try that.... but we'll see
<drbrain>
jtmitch: of course, that doesn't tell you which key was pressed, but it should be easy enough to add
workmad3 has joined #ruby-lang
<Mon_Ouie>
I think this might feel slow though, probably too slow if it's also for when the user types something.
<eam>
jtmitch: for key up/down you'll need to go to the windowing library for your platform
<eam>
that state is not available via a tty
vlad_starkov has quit [Remote host closed the connection]
<eam>
there are some decent cross-platform interfaces like SDL which might be a decent option
nofxx has joined #ruby-lang
<Mon_Ouie>
I doubt SDL gives you any information about the key events being sent to your terminal
<Mon_Ouie>
(unless you wrote your own terminal using SDL I suppose)
<eam>
you can't do it through a tty
<eam>
Mon_Ouie: a tty is the device driver backing interaction in a terminal
jperry2 has joined #ruby-lang
benlovell has joined #ruby-lang
jonahR has quit [Quit: jonahR]
odcinek has quit [Quit: odcinek]
alessio_rocco has quit [Ping timeout: 252 seconds]
mytrile_ has quit [Remote host closed the connection]
tbuehlmann has quit [Remote host closed the connection]
alessio_rocco has joined #ruby-lang
glebm has quit [Read error: Connection reset by peer]
mytrile has joined #ruby-lang
poga has quit [Ping timeout: 256 seconds]
mytrile has quit [Read error: Connection reset by peer]
mytrile_ has joined #ruby-lang
benlovell has quit [Ping timeout: 256 seconds]
MaddinXx has quit [Remote host closed the connection]
pasties has quit [Ping timeout: 240 seconds]
yknot_ has joined #ruby-lang
beiter has quit [Quit: beiter]
alessio_rocco has quit [Remote host closed the connection]
scampbell has quit [Remote host closed the connection]
swav has joined #ruby-lang
glebm has joined #ruby-lang
srbaker has joined #ruby-lang
nXqd has joined #ruby-lang
MaddinXx_ has joined #ruby-lang
workmad3 has quit [Ping timeout: 240 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
<yorickpeterse>
I mean, if I just need to write the lexer/parser in C that's fine
<whitequark>
as I understand it... the .dyp basically implements an LL(k) RDP using ocaml's pattern matching
<yorickpeterse>
as long as I can still link to it from X
<yorickpeterse>
because learning Lemon/Ragel is part of the adventure
<whitequark>
yorickpeterse: why the hell would you WANT to do that
<whitequark>
write them in something sane
<whitequark>
lemon fixes what's broken beyond any reason
<yorickpeterse>
WELL LETS SEE WHAT RAGEL CAN DO:
<yorickpeterse>
eh woops, caps
<yorickpeterse>
Features: Generate C, C++, Objective-C, D, Java or Ruby code with no dependencies.
<whitequark>
ragel is nice but from what I see here, ml's lexer from its _stdlib_ can do the same
<yorickpeterse>
For example, I can't find anything on generating Haskell (for example) from Ragel. This means you'd have to write it in C and link to it
Squarepy has joined #ruby-lang
<whitequark>
yorickpeterse: you don't need that
<yorickpeterse>
you're missing the point
<yorickpeterse>
This isn't about whether or not I need Ragel, this is about me *wanting* Ragel because I want to learn it
<whitequark>
you do not need to generate haskell or ocaml code. these tools are powerful enough so there is no need in bison, ragel, or other c-like shit
<eam>
ocaml is great, but we had problems with ocamlopt generating invalid x86_64 instructions -- couldn't use it to make shared objects
<whitequark>
I have no fucking clue how is that done internally, but this isn't worse than ragel... at least for lexing ruby
<yorickpeterse>
again read what I wrote
<yorickpeterse>
I may use Ragel and never look at it again but right now I'm looking for a decent language that I can use, that is not Ruby, and works with it without having to throw shit around
<whitequark>
yorickpeterse: do you want to learn a concept, or just a particular tool implementing that concept?
<yorickpeterse>
both
<whitequark>
"with it"
mistym has joined #ruby-lang
mistym has joined #ruby-lang
mistym has quit [Changing host]
<whitequark>
with what?
danrage77 has joined #ruby-lang
<whitequark>
and what do you mean by" throwing shit around"?
<yorickpeterse>
With Ragel and Lemon
<yorickpeterse>
and by throwing shit around I mean using language X and then having to write some retard binding for it
<yorickpeterse>
Basically my idea was this: "Hey, it would be kinda challenging to write a brogramming language. Hey, Ragel and Lemon are pretty cool, let's combine that together!"
<whitequark>
"I want to use mongodb but my current problem is best solved by an SQL RDBMS. I'll use mongodb anyway because I want to learn it, nevermind the project will be a clusterfuck".
<yorickpeterse>
And that's a perfectly valid argument
<yorickpeterse>
You're not going to experience anything by not using something
<yorickpeterse>
and stop being so darn pedantic, this isn't some multi billion Euro production app
<yorickpeterse>
this is something I'll spend maybe 1-2 days a week on
<yorickpeterse>
I permit myself to be a coding cunt for those projects
<whitequark>
"coding cunt"?
<whitequark>
that is rather ambiguous.
<yorickpeterse>
"disregard good practises" "fuck the police", etc
<yorickpeterse>
basically I allow myself to use stupid shit
<whitequark>
interesting
<whitequark>
why do you feel a need to do that?
<zenspider>
you will both stop using that term in here
<whitequark>
just curious
<yorickpeterse>
Because based on the knowledge gathered from that I can then say "Ok this is kinda neat/stupid"
krohrbaugh1 has joined #ruby-lang
<whitequark>
zenspider: not using that, kthx.
krohrbaugh has quit [Ping timeout: 252 seconds]
<whitequark>
yorickpeterse: hmm... so you've basically validating an opinion, yours or someone, that a certain practice is bad. interesting.
<yorickpeterse>
using some tool that requires more work than something already provided (e.g. in the case of your ocaml stuff) would be considered bad
<yorickpeterse>
at least from my point of view
<yorickpeterse>
Unless said provided tool is so broken you actually have to use something else
<yorickpeterse>
tbh I'll probably stick with C++ for now (unless Haskell turns out to be super awesome), I'm just so done with header files
<whitequark>
yorickpeterse: "already provided" in the sense that ocaml already has everything you need but you deliberately want to use a tool which is somewhat "worse"
<yorickpeterse>
I thought I already made it clear I don't really care for that since I *want* to use Ragel here
<whitequark>
interesting point of view
<yorickpeterse>
I want to learn it and experience it, this would be a perfect use case
KillerFox has quit [Ping timeout: 248 seconds]
<whitequark>
yorickpeterse: um... no, you said that you do indeed care whether it's a good or bad practice, and explicitly chose to use the bad one
<whitequark>
or I'm misunderstanding you
<yorickpeterse>
Under normal circumstances, e.g. at work, I'd care a lot
Criztian has quit [Remote host closed the connection]
<yorickpeterse>
or when writing actual decent FOSS projects
<yorickpeterse>
But not for some hobby hack project nobody will ever use
<whitequark>
ok
agile has quit [Remote host closed the connection]
<whitequark>
Methods are Objects, does that surprise you
<yorickpeterse>
since you can't really do much with UnboundMethod instances, a bit
workmad3 has joined #ruby-lang
<andrewvos>
Today in #ruby-lang: Some gets surprised by some Ruby behaviour!
danrage77 has quit [Remote host closed the connection]
<whitequark>
andrewvos: quick, issue a newspaper
thone has quit [Ping timeout: 258 seconds]
<yorickpeterse>
meh, there are more things in the category of "Oh..hmmm" instead of "the fuck"
io_syl has quit [Quit: Computer has gone to sleep.]
breakingthings has quit [Remote host closed the connection]
<whitequark>
scheme 48 is neat
krohrbaugh has joined #ruby-lang
erpuds has quit [Quit: erpuds]
<whitequark>
>Scheme 48 has been aggressively un-marketed. Richard and I didn't really want to support a user community or lose the freedom to experiment, and Mike's series has continued to keep a low profile.
yknot_ has quit [Ping timeout: 246 seconds]
<yorickpeterse>
it's truly underground
<yorickpeterse>
<insert hipster joke>
krohrbaugh1 has quit [Ping timeout: 272 seconds]
Kuukunen has joined #ruby-lang
krohrbaugh1 has joined #ruby-lang
krohrbaugh has quit [Read error: Connection reset by peer]
<yorickpeterse>
aaaand I'm off to bed, taters
yfeldblum has quit [Ping timeout: 258 seconds]
symm- has quit [Ping timeout: 272 seconds]
enebo has quit [Quit: enebo]
workmad3 has quit [Ping timeout: 255 seconds]
MaddinXx_ has quit [Remote host closed the connection]
erikh has joined #ruby-lang
<erikh>
zenspider: hey, you in here?
<zenspider>
erikh: yup yup
<erikh>
I was seeing something else with minitest and threads, but I was hoping to talk about it before I bother you with an issue
<erikh>
ah cool
<erikh>
so I have some multithreaded code I'm running through minitest a lot -- when I ctrl+c the suite, it kills the main thread and rake exits, but ruby 2.0 keeps going
<zenspider>
minitest 4 and threads?
<erikh>
1.9.3 does not
<erikh>
yeah.
<erikh>
not sure if this is rake or minitest though.
<zenspider>
huh. yeah. I dunno.
<erikh>
basically, I think there needs to be a rescue Interrupt; Thread.list.all?(&:value) or something.
<erikh>
somewhere that is
<erikh>
yeah, it's really weird. oh well, I'll keep poking at it when I see it.
Nuru has joined #ruby-lang
yfeldblum has joined #ruby-lang
idkazuma has joined #ruby-lang
fosky has joined #ruby-lang
Nuru is now known as jgro
__butch__ has quit [Quit: Leaving.]
<zenspider>
erikh: I would think that value would be potentially bad. You'd want them to actually stop at the point of interrupt, no?
jgro is now known as help
<erikh>
yeah, you're right
help is now known as cgor
<erikh>
value also in an all block liek that could short-circuit
<erikh>
e.g., last value is falsey
cgor is now known as help
<erikh>
probably just best to each(&:kill) or something.
help has quit [Quit: Bye bye]
<erikh>
and of course exclude the main thread :)
<erikh>
or current at least
<zenspider>
right
<zenspider>
I'm about to release 4.7.4
<zenspider>
you think this needs to go in? or you think it can wait for mt5?
<erikh>
up to you -- it's not the end of the world for me.
<erikh>
I can't usually ^C the tests in most of these suites for other reasons too
<erikh>
it's just mostly annoying, when I *do* I have to chase down the PID and nukei t.
nXqd has quit [Ping timeout: 264 seconds]
<erikh>
really really really fun when guard is running
amerine has joined #ruby-lang
amerine has quit [Max SendQ exceeded]
<erikh>
and it could be rake too, and rake_test_loader or something -- I'm not discounting that possibility
<erikh>
anyhow sorry to babble.
<erikh>
e.g., SIGINT isn't propogating because test loader's in a different process group
<erikh>
just haven't really investigated the cause yet
<erikh>
either way, if you do get something in, I'm happy to test it.
mucker has quit [Quit: leaving]
banister`sleep has joined #ruby-lang
josxn has joined #ruby-lang
athaeryn has quit [Remote host closed the connection]
<zenspider>
ok. fuck it. releasing.
<zenspider>
I hope this works...
Squarepy has quit [Quit: Leaving]
mineiro has joined #ruby-lang
mineiro has quit [Remote host closed the connection]
mineiro has joined #ruby-lang
symm- has joined #ruby-lang
londerson has joined #ruby-lang
sepp2k1 has joined #ruby-lang
<zenspider>
minitest version 4.7.4 has been released! | software releases by ryan davis - http://t.co/zdpciWripl
<zenspider>
"This is probably the last release of the 4.x series. It will be merged to ruby and will be put into maintenance mode there."
<zenspider>
"I’m not set in stone on this, but at this point further development of minitest (5+) will be gem-only."
<zenspider>
"It is just too hard to work w/in ruby-core w/ test-unit compatibility holding minitest development back."