<Guest33271>
i am getting the form['attribute'] value set to default only
<Guest33271>
whereas the 'p form' shows my set value
<Guest33271>
but 'p pp = form.submit' show to default value
carnegie has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
Guest33271 has quit [Quit: Page closed]
canteen4 has joined #ruby
djbkd has quit [Remote host closed the connection]
MyMind has joined #ruby
Sembei has quit [Ping timeout: 240 seconds]
djbkd has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
TinkerTyper has joined #ruby
canteen4 has quit [Ping timeout: 246 seconds]
<kke>
what would be the most sane way these days to have something like def parser { @parser ||= Parser.for(input) }, currently i'm using inheritance with automatic registration upon require by using Parser.self.inherited(where) { parsers << where } .. but i have a hunch that something like this is not 2017 ruby.
djbkd has quit [Ping timeout: 248 seconds]
lel has quit [Ping timeout: 240 seconds]
postmodern_ has joined #ruby
canteen4 has joined #ruby
postmodern has quit [Ping timeout: 246 seconds]
Silthias1 has joined #ruby
TinkerTyper has quit [Ping timeout: 246 seconds]
aduabu has quit [Ping timeout: 252 seconds]
aduabu has joined #ruby
paranoicsan is now known as paranoicsan[Away
Silthias has quit [Ping timeout: 246 seconds]
mark_66 has joined #ruby
vondruch has joined #ruby
gh has joined #ruby
canteen4 has quit [Ping timeout: 246 seconds]
Silthias has joined #ruby
<kke>
of course i could convert them to modules and have some kind of Parser.register(FooParser) in the end
enterprisey has quit [Remote host closed the connection]
<kke>
or scan constants under some namespace
Silthias1 has quit [Ping timeout: 252 seconds]
TinkerTyper has joined #ruby
bronson has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
bronson has quit [Read error: Connection reset by peer]
bronson has joined #ruby
TomyWork has joined #ruby
paranoicsan[Away is now known as paranoicsan
ta_ has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
nowhereman has joined #ruby
vondruch has quit [Quit: vondruch]
bronson has quit [Ping timeout: 240 seconds]
vondruch has joined #ruby
canteen4 has joined #ruby
ryandevilla has joined #ruby
alex`` has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
TinkerTyper has joined #ruby
nowhereman has quit [Remote host closed the connection]
nowhereman has joined #ruby
ryandevilla has quit [Ping timeout: 240 seconds]
mim1k has joined #ruby
lel has joined #ruby
aduabu has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
Puffball has quit [Read error: Connection reset by peer]
canteen4 has quit [Ping timeout: 240 seconds]
carnegie has quit [Quit: Leaving...]
emilford has joined #ruby
nowhereman has quit [Ping timeout: 248 seconds]
vondruch has quit [Client Quit]
vondruch has joined #ruby
apparition has quit [Quit: Bye]
canteen4 has joined #ruby
marr has joined #ruby
alfiemax has joined #ruby
mim1k has quit [Ping timeout: 248 seconds]
TinkerTyper has quit [Ping timeout: 248 seconds]
quiqua has joined #ruby
emilford has quit [Ping timeout: 240 seconds]
zenit_ has quit [Remote host closed the connection]
zenit has joined #ruby
aduabu has quit [Ping timeout: 252 seconds]
Burgestrand has joined #ruby
aduabu has joined #ruby
gh has quit [Quit: Leaving]
TinkerTyper has joined #ruby
antgel has quit [Ping timeout: 252 seconds]
tomphp has joined #ruby
canteen4 has quit [Ping timeout: 252 seconds]
canteen4 has joined #ruby
apparition has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
aduabu has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
aduabu has joined #ruby
vondruch has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
guille-moe has joined #ruby
chouhoulis has joined #ruby
canteen4 has joined #ruby
TinkerTyper has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
sysvalve has joined #ruby
aduabu has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 248 seconds]
ta__ has joined #ruby
Dimik has quit [Ping timeout: 248 seconds]
ams__ has joined #ruby
masterasia has quit [Ping timeout: 255 seconds]
masterasia has joined #ruby
gr33n7007h has joined #ruby
gr33n7007h is now known as al2o3-cr
ta_ has quit [Ping timeout: 260 seconds]
Ishido has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
aduabu has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
Stickwalker has quit [Ping timeout: 240 seconds]
bweston92 has joined #ruby
TinkerTyper has quit [Ping timeout: 255 seconds]
canteen4 has joined #ruby
vondruch has quit [Quit: vondruch]
aduabu has quit [Ping timeout: 252 seconds]
vondruch has joined #ruby
aduabu has joined #ruby
mikecmpbll has joined #ruby
canteen4 has quit [Ping timeout: 240 seconds]
vondruch has quit [Client Quit]
TinkerTyper has joined #ruby
vondruch has joined #ruby
vondruch has quit [Remote host closed the connection]
canteen4 has joined #ruby
RedNifre has joined #ruby
RedNifre is now known as Guest77527
aduabu has quit [Ping timeout: 240 seconds]
Ishido has joined #ruby
vondruch has joined #ruby
jinie has joined #ruby
aduabu has joined #ruby
TinkerTyper has quit [Ping timeout: 264 seconds]
vondruch has quit [Client Quit]
vondruch has joined #ruby
canteen4 has quit [Ping timeout: 246 seconds]
roshanavand has quit [Ping timeout: 246 seconds]
canteen4 has joined #ruby
runescape07rsps has joined #ruby
paranoicsan is now known as paranoicsan[Away
TinkerTyper has joined #ruby
paranoicsan[Away has quit [Quit: paranoicsan[Away]
aduabu has quit [Ping timeout: 240 seconds]
aduabu has joined #ruby
TinkerTyper has quit [Ping timeout: 264 seconds]
sylario has joined #ruby
charliesome has joined #ruby
canteen4 has quit [Ping timeout: 248 seconds]
mim1k has joined #ruby
Ishido has quit [Remote host closed the connection]
emilford has joined #ruby
TinkerTyper has joined #ruby
canteen4 has joined #ruby
sepp2k has joined #ruby
lxsameer has joined #ruby
mniip has joined #ruby
emilford has quit [Ping timeout: 248 seconds]
aduabu has quit [Ping timeout: 276 seconds]
mim1k has quit [Ping timeout: 248 seconds]
milardovich has joined #ruby
TinkerTyper has quit [Ping timeout: 255 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mim1k has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
aduabu has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
TinkerTyper has joined #ruby
canteen4 has quit [Ping timeout: 276 seconds]
canteen4 has joined #ruby
TinkerTyper has quit [Ping timeout: 260 seconds]
Ishido has joined #ruby
sspreitz has quit [Ping timeout: 248 seconds]
aduabu has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
<dminuoso>
Trick question (this took me 10 minutes to realize). Given this braindead code
<dminuoso>
you get the error `invalid value for Integer(): "08"`
<dminuoso>
Is the error obvious enough that I should feel bad?
TinkerTyper has joined #ruby
<ljarvis>
yes
jaruga_________ has joined #ruby
<ljarvis>
where's the trick question?
<ljarvis>
also why aren't you sending 2 arguments, there's so many questions
<dminuoso>
ljarvis: I am, I just fail at copy pasting
<ljarvis>
why the rjust
<ljarvis>
why am i here
<ljarvis>
why everything
<dminuoso>
ljarvis: Yeah I know. I keep staring at this
<dminuoso>
and ask myself the same thing
<dminuoso>
I want to git blame this
<dminuoso>
but
<dminuoso>
I know that I was the author
<ljarvis>
:D
<ljarvis>
sometimes i git blame just to make myself feel bad
<ljarvis>
why i type ,gb in vim it pops up with the name and i hang my head in shame
<ljarvis>
when*
<dminuoso>
ljarvis: the great thing is, I tested this througoughly, and it worked. I mean, this was shipped in marhc.
<dminuoso>
haha
<ljarvis>
well, it works for some months (if there's a second arg only surely)
TinkerTyper has quit [Ping timeout: 246 seconds]
aduabu has joined #ruby
<dminuoso>
ljarvis: Well I still hate rails.
<dminuoso>
In fact I blame this error on rails.
nofxxx has joined #ruby
canteen4 has quit [Ping timeout: 246 seconds]
paranoicsan has joined #ruby
paranoicsan is now known as paranoicsan[Away
TinkerTyper has joined #ruby
aduabu has quit [Client Quit]
Guest77527 has quit [Ping timeout: 264 seconds]
nofxx has quit [Ping timeout: 248 seconds]
Guest77527 has joined #ruby
jokke has quit [Quit: WeeChat 1.7.1]
<ljarvis>
hmm
<ljarvis>
Why do you hate rails, dminuoso?
TinkerTyper has quit [Ping timeout: 248 seconds]
vondruch has quit [Quit: vondruch]
harfangk has quit [Ping timeout: 240 seconds]
vondruch has joined #ruby
AndBobsYourUncle has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
Serpent7776 has joined #ruby
bronson has joined #ruby
nofxxx has quit [Ping timeout: 240 seconds]
AndBobsYourUncle has quit [Ping timeout: 240 seconds]
jokke has joined #ruby
cagomez has joined #ruby
sspreitz has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
bronson has quit [Ping timeout: 252 seconds]
MyMind has quit [Ping timeout: 240 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
cagomez has quit [Ping timeout: 240 seconds]
MyMind has joined #ruby
paranoicsan[Away has quit [Quit: paranoicsan[Away]
vondruch has quit [Client Quit]
vondruch has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<ljarvis>
too many reasons eh
emilford has joined #ruby
<dminuoso>
ljarvis: I think one of the main issues I have is those magical interfaces between parts.
<dminuoso>
ljarvis: Let's say you are inside controller code. How and why can you use `request`? You dont know, but in some guide you read you can access with it. It's nothing you can figure out by just looking at a well organized documentation.
pb122 has quit [Ping timeout: 248 seconds]
TinkerTyper has quit [Ping timeout: 248 seconds]
<ljarvis>
isn't that problem just inherent with inheritance? (heh)
emilford has quit [Ping timeout: 248 seconds]
<ljarvis>
and mixins, there's loads of additional context that you can access that might not be obvious
<ljarvis>
but, there's some explitness in that your class inherits from another class so probably it inherits some behaviour and additional functionality
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<dminuoso>
ljarvis: Well that's the thing. In Ruby its extremely hard to reason interface, because of the highly dynamic duck typing. I found Haskell typeclasses to be exactly what I miss in Ruby.
<dminuoso>
*to reason about interface
<ljarvis>
or, surely, most statically typed and/or compiled language where the type information is really helpful for documenting things like that
ts_ has joined #ruby
TinkerTyper has joined #ruby
<dminuoso>
ljarvis: When I started with Ruby I felt that the lack of static typing meant less overhead and faster development speed.
<dminuoso>
But that quickly proved to be wrong when you end up writing defensive type checks (which will blow up when the user uses the software), or testing for types explicitly in unit tests (now you invest many times the effort you originally saved)
pugc has quit [Remote host closed the connection]
TinkerTyper has quit [Ping timeout: 240 seconds]
mikeric has quit []
cdg has joined #ruby
quiqua has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
quiqua has joined #ruby
vondruch has quit [Quit: vondruch]
TinkerTyper has joined #ruby
vondruch has joined #ruby
gixxer1k has joined #ruby
cdg has quit [Ping timeout: 246 seconds]
cdg has joined #ruby
<ljarvis>
yeah, sure. But the Ruby way is: don't do either :D
cdg_ has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
cdg has quit [Ping timeout: 246 seconds]
cdg_ has quit [Ping timeout: 246 seconds]
cabotto has joined #ruby
vondruch has quit [Quit: vondruch]
TinkerTyper has joined #ruby
<darix>
dminuoso: *quaak*
vondruch has joined #ruby
conta has quit [Ping timeout: 248 seconds]
shiranuidong has quit [Remote host closed the connection]
shiranuidong has joined #ruby
selim has quit [Ping timeout: 240 seconds]
TinkerTyper has quit [Ping timeout: 246 seconds]
selim has joined #ruby
frozengeek has quit [Ping timeout: 252 seconds]
alfiemax has quit [Remote host closed the connection]
<dminuoso>
ljarvis: And Elixir (like Haskell, Rust or ML), or even just flowtype in JS, do it right by doing type inference.
<dminuoso>
Even C++ has it now.
TinkerTyper has joined #ruby
roshanavand has joined #ruby
<darix>
with the funny "auto" type?
<dminuoso>
darix: Yes.
bkxd has joined #ruby
cdg has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
cdg has quit [Ping timeout: 246 seconds]
cschneid_ has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
beilabs_ has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
cadillac_ has quit [Ping timeout: 252 seconds]
milardovich has joined #ruby
beilabs has joined #ruby
cschneid_ has quit [Ping timeout: 260 seconds]
cadillac_ has joined #ruby
logicscience has quit [Quit: Leaving]
TinkerTyper has quit [Ping timeout: 252 seconds]
milardovich has quit [Ping timeout: 252 seconds]
roshanavand has quit [Quit: roshanavand]
_ixti_ has joined #ruby
emilford has joined #ruby
vondruch has quit [Quit: vondruch]
ShekharReddy has joined #ruby
vondruch has joined #ruby
TinkerTyper has joined #ruby
ts_ has quit [Ping timeout: 248 seconds]
ixti has quit [Ping timeout: 248 seconds]
tacoboy has joined #ruby
runescape07rsps has quit [Ping timeout: 240 seconds]
jamesaxl has joined #ruby
emilford has quit [Ping timeout: 276 seconds]
TinkerTyper has quit [Ping timeout: 276 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
jamesaxl has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
TinkerTyper has joined #ruby
jamesaxl has joined #ruby
Burgestrand has quit [Quit: Closing time!]
Burgestrand has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
apparition47 has joined #ruby
cabotto has quit [Remote host closed the connection]
zacts has quit [Ping timeout: 252 seconds]
Guest54652 has quit [Remote host closed the connection]
tpendragon has quit [Remote host closed the connection]
<dminuoso>
dachi: Oh and also note that its not the class that receives the method call, but the classes singleton class.
bruno- has joined #ruby
<dminuoso>
Errr. Nevermind that last bit.
<dachi>
yes I wrote it incoreectly. thanks
<dachi>
incorrectly*
adlerdias has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
emilford has quit [Ping timeout: 255 seconds]
ldnunes has joined #ruby
f48ds2_ has quit [Ping timeout: 264 seconds]
runescape07rsps has joined #ruby
TinkerTyper has quit [Ping timeout: 276 seconds]
dachi has quit [Quit: Page closed]
beilabs has quit [Remote host closed the connection]
bkxd has quit [Read error: Connection reset by peer]
TinkerTyper has joined #ruby
jaruga_________ has quit [Quit: jaruga_________]
bmurt has joined #ruby
AnotherNick has quit [Quit: Leaving]
pugc has quit [Quit: pugc]
tacoboy has quit [Remote host closed the connection]
ldnunes has quit [Ping timeout: 240 seconds]
ldnunes has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roshanavand has joined #ruby
BSaboia has quit [Quit: Leaving]
frozengeek has joined #ruby
psychicist__ has quit [Ping timeout: 240 seconds]
giraffe has joined #ruby
giraffe is now known as Guest36961
tpendragon has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
TinkerTyper has quit [Ping timeout: 248 seconds]
bkxd has joined #ruby
bmurt has joined #ruby
TinkerTyper has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zenit has quit [Remote host closed the connection]
vondruch has quit [Quit: vondruch]
_sfiguser has joined #ruby
vondruch has joined #ruby
Guest77527 has quit [Ping timeout: 255 seconds]
zenit has joined #ruby
TinkerTyper has quit [Ping timeout: 255 seconds]
zenit_ has joined #ruby
mjanssen has joined #ruby
eroux has joined #ruby
sepp2k has quit [Ping timeout: 240 seconds]
zenit has quit [Ping timeout: 276 seconds]
TinkerTyper has joined #ruby
frozengeek has quit [Quit: frozengeek]
frozengeek has joined #ruby
zenit_ is now known as zenit
Wair1978 has joined #ruby
bkxd has quit [Ping timeout: 246 seconds]
bmurt has joined #ruby
balazs has joined #ruby
sepp2k has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eroux has quit [Remote host closed the connection]
dionysus70 has joined #ruby
vondruch has quit [Quit: vondruch]
<fredflinstone>
don't need static typing
vondruch has joined #ruby
<fredflinstone>
& flowtype is crap
dionysus69 has quit [Ping timeout: 240 seconds]
psychicist__ has joined #ruby
_sfiguser has quit [*.net *.split]
adlerdias has quit [*.net *.split]
_ixti_ has quit [*.net *.split]
quiqua has quit [*.net *.split]
Serpent7776 has quit [*.net *.split]
ana_ has quit [*.net *.split]
gusrub has quit [*.net *.split]
Bock has quit [*.net *.split]
herbmillerjr has quit [*.net *.split]
chrisarcand has quit [*.net *.split]
GorillaApe has quit [*.net *.split]
daemonwrangler has quit [*.net *.split]
AKPWD has quit [*.net *.split]
knight_ has quit [*.net *.split]
jhass has quit [*.net *.split]
thejoecarroll has quit [*.net *.split]
coffeejunk has quit [*.net *.split]
ineb has quit [*.net *.split]
wnd has quit [*.net *.split]
d0nn1e has quit [*.net *.split]
rgs has quit [*.net *.split]
__main__ has quit [*.net *.split]
j0bk has quit [*.net *.split]
lupine has quit [*.net *.split]
matti has quit [*.net *.split]
nicoulaj has quit [*.net *.split]
genpaku has quit [*.net *.split]
spider-mario has quit [*.net *.split]
admwrd has quit [*.net *.split]
sonne has quit [*.net *.split]
connor_goodwolf has quit [*.net *.split]
pabs has quit [*.net *.split]
z3uS has quit [*.net *.split]
Phanes has quit [*.net *.split]
foxxx0 has quit [*.net *.split]
Fraeon has quit [*.net *.split]
saltsa has quit [*.net *.split]
chrisarc1nd has joined #ruby
j0bk has joined #ruby
connor_goodwolf has joined #ruby
admwrd has joined #ruby
APK has joined #ruby
daemonwrangler has joined #ruby
wnd has joined #ruby
z3uS has joined #ruby
jhass has joined #ruby
saltsa has joined #ruby
rgs has joined #ruby
_sfiguser has joined #ruby
coffeejunk has joined #ruby
Serpent7776 has joined #ruby
Bock has joined #ruby
TinkerTyper has quit [Ping timeout: 276 seconds]
herbmillerjr has joined #ruby
thejoecarroll has joined #ruby
ana_ has joined #ruby
_ixti_ has joined #ruby
matti has joined #ruby
matti has quit [Changing host]
matti has joined #ruby
lupine has joined #ruby
ineb has joined #ruby
genpaku_ has joined #ruby
Fraeon has joined #ruby
pabs has joined #ruby
Phanes has joined #ruby
Phanes has joined #ruby
Phanes has quit [Changing host]
_main_ has joined #ruby
d0nn1e has joined #ruby
nicoulaj has joined #ruby
quiqua has joined #ruby
genpaku_ is now known as genpaku
foxxx0 has joined #ruby
gusrub has joined #ruby
knight_ has joined #ruby
spider-mario has joined #ruby
sonne has joined #ruby
dionysus70 has quit [Ping timeout: 240 seconds]
__Yiota has joined #ruby
vondruch has quit [Client Quit]
agrecascino has quit [Ping timeout: 260 seconds]
gnarf has quit [Ping timeout: 260 seconds]
tekk has quit [Ping timeout: 240 seconds]
pragmatism has quit [Ping timeout: 240 seconds]
vondruch has joined #ruby
Wair1978 has quit [Remote host closed the connection]
rwb has quit [Ping timeout: 248 seconds]
sspreitz has quit [Ping timeout: 240 seconds]
emilford has joined #ruby
_main_ is now known as __main__
agrecascino has joined #ruby
pragmatism has joined #ruby
sspreitz has joined #ruby
TinkerTyper has joined #ruby
pyemkey has joined #ruby
Doshi has joined #ruby
runescape07rsps has quit [Ping timeout: 248 seconds]
oleo has joined #ruby
eelster has joined #ruby
eroux has joined #ruby
eelster has quit [Client Quit]
tekk has joined #ruby
emilford has quit [Ping timeout: 248 seconds]
kreantos has joined #ruby
gnarf has joined #ruby
InfinityFye has joined #ruby
<dminuoso>
fredflinstone: Name an example how static typing ever hinders you.
Prutheus has joined #ruby
<fredflinstone>
it's unnecessary and unnatural in a dynamically typed language.
<dminuoso>
That argument makes no sense, but okay.
mtkd has quit [Ping timeout: 252 seconds]
Prutheus has quit [Client Quit]
<fredflinstone>
makes sense to me.
<dminuoso>
"static typing sucks because its unnratural in a dynamically typed language"
<dminuoso>
I need to photograph this.
<fredflinstone>
i didn't say static typing sucks
mtkd has joined #ruby
<fredflinstone>
i said flow/flowtype sucks
<fredflinstone>
go ahead.. photograph it.. you're misquoting me to start with.. but w/e, i really don't care & most discussions with you are nonsense anyway
t-recx has joined #ruby
Puffball has joined #ruby
kreantos has quit [Remote host closed the connection]
kreantos has joined #ruby
TinkerTyper has quit [Ping timeout: 260 seconds]
Wair1978 has joined #ruby
kreantos has quit [Read error: No route to host]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TinkerTyper has joined #ruby
cabotto has quit [Remote host closed the connection]
<fredflinstone>
answer on SO seems good too....... what's the issue?
vondruch has joined #ruby
<ule>
al2o3-cr: thanks
<ule>
I didn't know about that foo.push(*obj), worked like a charm
<fredflinstone>
ah i see. you don't want to test that. it's impossible. That method is called while the class is loaded, long before the test runs.
<dminuoso>
dachi: does has_one_time_password any side effects?
<dminuoso>
If so you could test for behavior, rather than white box testing.
<dachi>
ok thanks
Lyubo1 has joined #ruby
<fredflinstone>
yes, test the behaviour and not that the class method has been called. and test via a use-case that exhibits user behaviour.
<dachi>
thanks
TinkerTyper has quit [Ping timeout: 255 seconds]
andikr has quit [Remote host closed the connection]
chouhoul_ has joined #ruby
chouhoulis has quit [Ping timeout: 246 seconds]
TinkerTyper has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
ferr has quit [Quit: WeeChat 1.9]
mson has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
vondruch has quit [Client Quit]
vondruch has joined #ruby
Puffball has quit [Remote host closed the connection]
im314ous has joined #ruby
phinxy has joined #ruby
TinkerTyper has joined #ruby
phinxy has quit [Read error: Connection reset by peer]
davic has quit [Quit: Connection closed for inactivity]
mula has joined #ruby
weez17_ has joined #ruby
TomyLobo has joined #ruby
anisha has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<al2o3-cr>
ule: you're welcome.
danbishop has left #ruby [#ruby]
cloutz has quit [Quit: Leaving]
cloutz has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
anisha_ has joined #ruby
anisha has quit [Ping timeout: 240 seconds]
TinkerTyper has quit [Ping timeout: 260 seconds]
vondruch has quit [Quit: vondruch]
lxsameer has quit [Quit: WeeChat 1.7]
vondruch has joined #ruby
ROCARTER_ has joined #ruby
emilford has joined #ruby
milardovich has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
runescape07rsps has joined #ruby
chouhoulis has joined #ruby
TinkerTyper has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
laphoraig92 has quit [Ping timeout: 248 seconds]
GreatPotato has joined #ruby
alfiemax has joined #ruby
<GreatPotato>
Hello “ruby -v” says “ruby 2.4.0p0” - but when i do, “bundle env” it says v1.9.3...
<GreatPotato>
How can i modify this to use the new version updated with rvm?
ana_ has quit [Ping timeout: 240 seconds]
<bougyman>
which bundle
<bougyman>
and which ruby
<bougyman>
i mean: type those
bruno- has joined #ruby
<bougyman>
`whicn bundle`
<bougyman>
and `which ruby`
chouhoul_ has quit [Ping timeout: 240 seconds]
<GreatPotato>
I get: /usr/share/rvm/rubies/ruby-2.4.0/bin/ruby
<GreatPotato>
And
<GreatPotato>
Then: /usr/bin/bundle
milardovich has quit [Ping timeout: 240 seconds]
emilford has quit [Ping timeout: 248 seconds]
<GreatPotato>
Is it because i install bundle before updating ruby?
chouhoulis has quit [Remote host closed the connection]
<bougyman>
GreatPotato: it is.
<bougyman>
gem i bundler
kapil___ has joined #ruby
<bougyman>
it will put a bundler in your rvm path which supercedes /usr/bin/bundle
chouhoulis has joined #ruby
TinkerTyper has quit [Ping timeout: 260 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
<GreatPotato>
If you were in this room i would probably have just kissed you
carnegie has joined #ruby
<GreatPotato>
Passionately
vondruch has joined #ruby
truenito has joined #ruby
truenito has quit [Remote host closed the connection]
truenito has joined #ruby
vondruch has quit [Client Quit]
TinkerTyper has joined #ruby
vondruch has joined #ruby
tacoboy has joined #ruby
InfinityFye has quit [Quit: Leaving]
Ishido has quit [Read error: Connection reset by peer]
TinkerTyper has quit [Ping timeout: 246 seconds]
vondruch has quit [Quit: vondruch]
cdg has joined #ruby
pyemkey has quit [Ping timeout: 246 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg__ has joined #ruby
vondruch has joined #ruby
cdg_ has quit [Ping timeout: 240 seconds]
mula has quit [Remote host closed the connection]
vondruch has quit [Client Quit]
cdg has quit [Ping timeout: 248 seconds]
cdg_ has joined #ruby
TinkerTyper has joined #ruby
cdg__ has quit [Ping timeout: 252 seconds]
mula has joined #ruby
mula has quit [Client Quit]
vondruch has joined #ruby
mark_66 has quit [Quit: Leaving.]
TinkerTyper has quit [Ping timeout: 240 seconds]
mikecmpbll has quit [Ping timeout: 248 seconds]
<dminuoso>
You better wear lipstick.
<GreatPotato>
Of course, im not a savage
kreantos has joined #ruby
<matthewd>
dminuoso: There's no need to compound an inappropriate comment
dviola has joined #ruby
goyox86 has joined #ruby
<dminuoso>
Apologies.
goyox86 has quit [Client Quit]
TinkerTyper has joined #ruby
goyox86_ has joined #ruby
dachi has quit [Quit: Page closed]
cschneid_ has joined #ruby
Prutheus has joined #ruby
<Prutheus>
Hello! I am dividing 238161.914 / 238161.914 and getting 1.0, but it isn't 1.0 ... it has some decimal palces, where are they gone?
<im314ous>
uh
nobitanobi has joined #ruby
<matthewd>
IME, most numbers divided by themselves = 1.0
<im314ous>
Yeh
kreantos has quit [Remote host closed the connection]
<Papierkorb>
pry shows 1.0 for that
kreantos has joined #ruby
<im314ous>
And because you're dividing a number with decimal points it's going to be returned as 1 in decimal form, thus 1.0
<Prutheus>
upps wait copied wrong
<Prutheus>
no right
<Prutheus>
xD
<Prutheus>
my fault xD
<im314ous>
do you even math bruh
bronson has joined #ruby
sepp2k has quit [Quit: Leaving.]
kreantos has quit [Ping timeout: 248 seconds]
TinkerTyper has quit [Ping timeout: 260 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
polishdub has joined #ruby
Prutheus has quit [Quit: leaving]
cagomez has joined #ruby
bronson has quit [Ping timeout: 248 seconds]
sspreitz has quit [Ping timeout: 246 seconds]
splitshot has joined #ruby
__Yiota has joined #ruby
sspreitz has joined #ruby
TinkerTyper has joined #ruby
alibby has joined #ruby
sspreitz has quit [Ping timeout: 248 seconds]
skweek has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
[Butch] has joined #ruby
brent___ has joined #ruby
tomphp has joined #ruby
cdg has joined #ruby
emilford has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
TinkerTyper has joined #ruby
cdg has quit [Read error: Connection reset by peer]
gothicsouth has joined #ruby
cdg has joined #ruby
cdg has quit [Remote host closed the connection]
conta has quit [Quit: conta]
cdg_ has quit [Ping timeout: 252 seconds]
cdg has joined #ruby
aufi has quit [Remote host closed the connection]
emilford has quit [Ping timeout: 248 seconds]
Guest77527 is now known as RedNifre
sspreitz has joined #ruby
TinkerTyper has quit [Ping timeout: 248 seconds]
sepp2k has joined #ruby
sspreitz has quit [Ping timeout: 246 seconds]
j0bk has quit [Changing host]
j0bk has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
TinkerTyper has joined #ruby
roshanavand has quit [Quit: roshanavand]
TinkerTyper has quit [Ping timeout: 246 seconds]
_sfiguser has quit [Ping timeout: 252 seconds]
Lyubo1 has quit [Ping timeout: 246 seconds]
__Yiota has joined #ruby
sspreitz has joined #ruby
vondruch has quit [Quit: vondruch]
zacts has quit [Ping timeout: 246 seconds]
vondruch has joined #ruby
truenito has quit [Ping timeout: 246 seconds]
roshanavand has joined #ruby
TinkerTyper has joined #ruby
sysvalve has quit [Quit: Leaving]
sspreitz has quit [Ping timeout: 240 seconds]
_ixti_ is now known as ixti
__Yiota has quit [Ping timeout: 246 seconds]
roshanavand has quit [Client Quit]
banisterfiend has joined #ruby
roshanavand has joined #ruby
SeepingN has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
FrostCandy has joined #ruby
<FrostCandy>
Can someone break down this line? do_something :only => [:one, :two, :three] - Is do_something a function call? one two and three variables? and :only a class?
_sfiguser has joined #ruby
<matthewd>
FrostCandy: :foo is a symbol literal
<Yxhuvud>
do_something is a method call. :only => [:one, :two, :three] is an argument to said method that is a hash. :only is a symbol (which is something similar to an immutable string. [:one, :two, :three] is an array that contain 3 symbols.
vondruch has quit [Quit: vondruch]
<ljarvis>
it might be easier with the additional superfluous syntax: do_something({ :only => [:one, :two, :three] })
<FrostCandy>
Oh ok so we are passing :only to the method, but setting :only = an array of symbolx
vondruch has joined #ruby
<ljarvis>
no
<ljarvis>
you're passing a hash to the method
<RedNifre>
Hi there. How do I programmatically put some getters and setters in some blank slate object?
jackjackdripper has joined #ruby
<ljarvis>
RedNifre: attr_accessor
<konsolebox>
is there a way to customize gemspec so the gem would only generate documentation for specific files? specifying files to spec.rdoc_options doesn't help.
TinkerTyper has joined #ruby
frozengeek has quit [Quit: frozengeek]
<konsolebox>
i don't like the idea of using --exclude
<RedNifre>
E.g. I have a hash { bla: 1, foo: 2 } and I want to create an object out of it that has a def bla(x); do_something_with(x); end
<RedNifre>
ljarvis okay, but how do I create the empty object and then put some methods in it?
<RedNifre>
Hm, maybe I can do it with the OpenStruct thing...
MyMind has quit [Ping timeout: 248 seconds]
<ljarvis>
RedNifre: yes, OpenStruct or just Struct would be the best idea
zacts has joined #ruby
<matthewd>
RedNifre: Yes that is approximately OpenStruct's purpose, but be wary of treating Hash as a base object type
vondruch has quit [Client Quit]
Serpent7776 has quit [Quit: Leaving]
vondruch has joined #ruby
MyMind has joined #ruby
<matthewd>
konsolebox: What do you want to achieve?
sepp2k has quit [Quit: Leaving.]
TinkerTyper has quit [Ping timeout: 246 seconds]
sspreitz has joined #ruby
<konsolebox>
matthewd: i don't want my gem generating unnecessary ri documentation for some files
<konsolebox>
everytime it gets installed
<konsolebox>
i get documentation generated from Makefile, *.inc, etc.
<RedNifre>
Can I bind a block to an object so that bla in the block will call the bla method of the object?
<konsolebox>
it's even worse if i install with rdoc
<konsolebox>
because it documents almost everything
<FrostCandy>
ljarvis: thanks, so if i understand :only is the key and [:one, :two, :three] is the value of the :only symbol yes?
<ljarvis>
FrostCandy: yep
ryandevilla has quit [Ping timeout: 248 seconds]
<matthewd>
konsolebox: That sounds unexpected :/
<FrostCandy>
ljarvis: but the key value is an array right? thats why they used []
im314ous has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RedNifre>
My plan is to create a dead simple gem for controlling raspberry pi gpio pins. I hope to make it look somewhat like this: https://pastebin.com/1DjsM7Wh
<konsolebox>
matthewd: i'm pretty it happens in almost any gem, because the targetted files generated for ri or rdoc (html) are automatically generated/selected by rdoc
ryandevilla has joined #ruby
<konsolebox>
and i'm surprised why there hasn't been a mechanism for this. rdoc has been around for a long time.
<matthewd>
konsolebox: Admittedly, like [IMO] most people, I have doc generation turned off... but that doesn't sound familiar
TinkerTyper has joined #ruby
<konsolebox>
matthewd: ri documentation is automatically generated with gem install, no?
<RedNifre>
splitshot I know that there are already libraries for that, but I want to learn ruby and I want to control the pins in a dead simple way.
roshanavand has quit [Quit: roshanavand]
<matthewd>
konsolebox: What's it even documenting from those files? Most C docs rely on explicit comments, and a few very specific function calls, don't they?
<matthewd>
konsolebox: Unless it's disabled, which [I believe] most people do
<matthewd>
It's slow, and the Internet is a thing
<konsolebox>
matthewd: i have my important methods documented in the main c file
charliesome has joined #ruby
<RedNifre>
My idea is that you call the gpio method with a hash that defines the pins, e.g. +8 would mean pin 8 configured as output, -7 would mean pin 7 configured as input. Then an object gets generated that has the pins as methods so you can read or write them. Then the block gets called inside the object and has access to the methods. Is this possible?
<ljarvis>
RedNifre: yes it's possible
ryandevilla has quit [Ping timeout: 246 seconds]
roshanavand has joined #ruby
<RedNifre>
How do I yield the block inside of a particular object?
<konsolebox>
matthewd: i just want to get this done consistently. i don't care if people disable generation of documentation or not. and as i observed, generation of ri is a default.
emilford has joined #ruby
carnegie has quit [Remote host closed the connection]
<ljarvis>
replace yield with instance_eval if you don't want the block param (imo you should keep it for simplicity)
<ljarvis>
well not replace 1:1, but add instance_eval to the end of the new struct chain
TinkerTyper has joined #ruby
<Sharcho>
matthewd: I/O doesn't lock the GIL, I have mostly an I/O bound workload, but I need to identify if there's something that's causing it to lock
GreatPotato has quit [Quit: GreatPotato]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sspreitz has quit [Ping timeout: 240 seconds]
sspreitz has joined #ruby
dionysus69 has joined #ruby
TinkerTyper has quit [Ping timeout: 276 seconds]
<matthewd>
Sharcho: There once was a GVL_DEBUG, but I don't know of anything that can directly answer that question today
mtkd has quit [Ping timeout: 240 seconds]
<havenwood>
Sharcho: Can you show us the code?
<matthewd>
Sharcho: Profile the C code, then manually verify the [presumably few] places that pause for a while are dropping the lock?
<Sharcho>
I have a couple of Sidekiq jobs, and I think one of them is causing the GIL to lock, but I don't know which. I can't share the code, unfortunately
<matthewd>
Split them into separate queues/worker processes?
Pisuke has joined #ruby
<Sharcho>
matthewd: yes, that's a good idea
mtkd has joined #ruby
<matthewd>
Doesn't solve the problem, obviously, but it might help you narrow down your suspect
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
bruno-_ has joined #ruby
sspreitz has quit [Ping timeout: 246 seconds]
<havenwood>
Or switch to Resque ;-)
orbyt_ has joined #ruby
mim1k has quit [Ping timeout: 276 seconds]
<havenwood>
forking is sometimes nice
MyMind has quit [Ping timeout: 260 seconds]
tomphp has joined #ruby
alfiemax has joined #ruby
cdg_ has joined #ruby
harfangk has joined #ruby
jackjackdripper has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
bruno- has quit [Ping timeout: 260 seconds]
jackjackdripper has joined #ruby
sspreitz has joined #ruby
vondruch has quit [Client Quit]
vondruch has joined #ruby
michael1 has joined #ruby
cdg has quit [Ping timeout: 260 seconds]
alfiemax has quit [Ping timeout: 240 seconds]
roshanavand has quit [Quit: roshanavand]
sspreitz has quit [Ping timeout: 240 seconds]
RedNifre has quit [Ping timeout: 260 seconds]
quattro_ has quit [Quit: quattro_]
splitshot has quit [Quit: Leaving]
roshanavand has joined #ruby
sspreitz has joined #ruby
mtkd has quit [Ping timeout: 252 seconds]
eckhardt has joined #ruby
bigkevmcd has quit [Quit: Outta here...]
goyox86_ has quit [Quit: goyox86_]
TinkerTyper has quit [Ping timeout: 248 seconds]
mtkd has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sspreitz has quit [Ping timeout: 252 seconds]
cagomez has quit [Remote host closed the connection]
milardovich has joined #ruby
cagomez has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
jackjackdripper has quit [Ping timeout: 240 seconds]
milardovich has quit [Remote host closed the connection]
belmoussaoui__ has joined #ruby
sspreitz has joined #ruby
milardovich has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
jackjackdripper has joined #ruby
gusrub_ has joined #ruby
belmoussaoui_ has quit [Ping timeout: 264 seconds]
gusrub has quit [Ping timeout: 248 seconds]
<FrostCandy>
I just spent an hour trying to find skip_authorization_check in the code base. Turns out the original author used the gem CanCan, and skip_authorization_check isn't searchable in the project. Is there an idiomatic way of determining if a method is part of a gem and not part of the project code?
quattro_ has joined #ruby
TinkerTyper has joined #ruby
<apeiros>
you can always get the origin of a method using Method#source_location
<apeiros>
or by using tools which mangle the backtrace and corrupt it in turn (yes, has happened to me, made me pretty angry)
sspreitz has joined #ruby
<apeiros>
also, 1 for 0 means you *did* pass it an argument
<username1>
havenwood: the owner is the class
bmurt has joined #ruby
vondruch has quit [Quit: vondruch]
<apeiros>
not that the method expects one
<apeiros>
>> def foo; end; foo(1)
<ruby[bot]>
apeiros: # => wrong number of arguments (given 1, expected 0) (ArgumentError) ...check link for more (https://eval.in/850380)
vondruch has joined #ruby
<apeiros>
2.1>> def foo; end; foo(1)
<username1>
apeiros: thats what im confused by
<username1>
im calling it explicitly via command line
<apeiros>
21>> def foo; end; foo(1)
<ruby[bot]>
apeiros: # => wrong number of arguments (1 for 0) (ArgumentError) ...check link for more (https://eval.in/850381)
<username1>
MyClass.new.perform
<username1>
or, the interpreter i should say
<apeiros>
username1: gist us all information
<apeiros>
code used to cause the error, code of the suspected method, full exception & backtrace
kies has joined #ruby
<apeiros>
tele-diagnoses don't become easier through lack of info :-p
TinkerTyper has joined #ruby
sspreitz has quit [Ping timeout: 252 seconds]
ROCARTER_ has quit [Ping timeout: 246 seconds]
hahuang65 has quit [Read error: Connection reset by peer]
balazs has quit [Ping timeout: 252 seconds]
mim1k has joined #ruby
laphoraig92 has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TinkerTyper has quit [Ping timeout: 252 seconds]
drcode has quit [Read error: Connection reset by peer]
sspreitz has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
chouhoul_ has joined #ruby
drcode has joined #ruby
sspreitz has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 246 seconds]
ltem has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Eiam has joined #ruby
TinkerTyper has quit [Ping timeout: 260 seconds]
jackjackdripper has quit [Quit: Leaving.]
sspreitz has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
roshanavand has quit [Ping timeout: 255 seconds]
michael2 is now known as RedNifre
<RedNifre>
Is there a simpler way to do a.map {
<RedNifre>
Is there a simpler way to do a.map { |x, y| bla(x,y) } ?
workmad3 has quit [Ping timeout: 252 seconds]
<RedNifre>
like, mapping with a method reference of bla or something?
cagomez has quit [Remote host closed the connection]
TinkerTyper has joined #ruby
cagomez has joined #ruby
<Papierkorb>
RedNifre: try `a.map(&method(:bla))`
<Papierkorb>
RedNifre: as in, Object#method
sspreitz has quit [Ping timeout: 240 seconds]
apparition47 has quit [Quit: Bye]
roshanavand has joined #ruby
laphoraig92 has quit [Ping timeout: 240 seconds]
<RedNifre>
Hm, what's the & doing in there exactly? I only know it from block parameters.
cagomez has quit [Ping timeout: 246 seconds]
<Papierkorb>
RedNifre: The ampersand takes whatever follows, calls #to_proc on it, and then passes that Proc through as block
<Papierkorb>
RedNifre: You probably know it from foo(&:bar)
TinkerTyper has quit [Ping timeout: 240 seconds]
orbyt_ has joined #ruby
<Papierkorb>
Which isn't actual special syntax, the & will call to_proc on :bar (=> Symbol#to_proc) and then pass that in
<RedNifre>
Nah, I only know it from def foo(&block)
tomphp has quit [Ping timeout: 255 seconds]
roshanavand has quit [Ping timeout: 246 seconds]
<Papierkorb>
RedNifre: Try doing this: `%w[ foo bar baz ].map(&:upcase)`
emilford has joined #ruby
<RedNifre>
But I get the feeling that I should read the entire "Programming Ruby" book before asking any more questions, everything seems to be a rabbit hole :)
sspreitz has joined #ruby
laphoraig92 has joined #ruby
<RedNifre>
Is %w( foo bar ) the same as %w[ foo bar ] always?
<Papierkorb>
Yep, you can choose which brace style you prefer
<matthewd>
RedNifre: It's exactly the same thing, from the other side. In a parameter list, it's pulling the block parameter out into a named variable; in a method call, it's setting the block parameter using the supplied expression
cagomez has joined #ruby
<RedNifre>
...ooooh!
<RedNifre>
that makes sense.
orbyt_ has quit [Read error: Connection reset by peer]
orbyt_ has joined #ruby
sniffer has joined #ruby
TinkerTyper has joined #ruby
bmurt has joined #ruby
sspreitz has quit [Ping timeout: 240 seconds]
balazs has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
frozengeek has joined #ruby
anisha_ has quit [Quit: This computer has gone to sleep]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eckhardt has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
eckhardt has quit [Client Quit]
<apeiros>
RedNifre: you can always do `module Enumerable; def mapf(method_name); map { |*args| __send__(method_name, *args) }; end; end`
<apeiros>
and then `a.mapf(:bla)`
tomphp has joined #ruby
TinkerTyper has joined #ruby
sspreitz has joined #ruby
belmoussaoui has joined #ruby
goyox86_ has joined #ruby
weez17_ has quit [Quit: Connection closed for inactivity]
drcode has quit [Read error: Connection reset by peer]
eckhardt has joined #ruby
sspreitz has quit [Ping timeout: 260 seconds]
Dimik has joined #ruby
dcluna has quit [Read error: Connection reset by peer]
ryandevilla has joined #ruby
beilabs has joined #ruby
__Yiota has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
<apeiros>
wow, wth? IO::readlines' chomp arg is not documented?!?
tacoboy has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
gothicsouth has joined #ruby
TinkerTyper has joined #ruby
RedNifre has quit [Ping timeout: 248 seconds]
SeepingN has quit [Ping timeout: 248 seconds]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta_ has joined #ruby
TinkerTyper has quit [Ping timeout: 260 seconds]
RedNifre has joined #ruby
<RedNifre>
hm...
RedNifre is now known as Guest87430
<Guest87430>
Well, I couldn't replace my map { |x, y| bla(x,y) } for some reason. How would I simplify that? Or is it not worth it?
<apeiros>
IMO not worth it
* Guest87430
is RedNifre but didn't notice the disconnect and now his nickname is not available for some time
<Guest87430>
Alright, guess I'll keep it simple for now.
<apeiros>
(and you've been shown how to replace it)
<apeiros>
(and we can't help with "for some reason")
<apeiros>
also see /ns help ghost
dionysus69 has quit [Ping timeout: 246 seconds]
cdg has joined #ruby
sspreitz has joined #ruby
TinkerTyper has joined #ruby
<Guest87430>
Well, map(&:bla) says that the number of arguments is wrong, but I'll try the mapf approach.
<apeiros>
&:bla is for a different use case
<Guest87430>
bla is for zero argument method calls only?
<apeiros>
and it wasn't presented as a solution but as an explanation for the &
KaitoDaumoto has joined #ruby
<apeiros>
no. &:bla is for method calls on the first yielded value
Bock has quit [Ping timeout: 255 seconds]
<apeiros>
i.e. a.bla(b) in your example.
cdg_ has quit [Ping timeout: 252 seconds]
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
sspreitz has quit [Ping timeout: 246 seconds]
kreantos has joined #ruby
nobitanobi has quit [Remote host closed the connection]
Puffball has joined #ruby
sspreitz has joined #ruby
nobitanobi has joined #ruby
ledestin has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
nadir has quit [Quit: Connection closed for inactivity]
nobitanobi has quit [Ping timeout: 240 seconds]
sspreitz has quit [Ping timeout: 240 seconds]
ledestin has quit [Ping timeout: 240 seconds]
TinkerTyper has joined #ruby
opekktar has quit [Quit: WeeChat 1.9]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
sspreitz has joined #ruby
Puffball has quit [Remote host closed the connection]
TinkerTyper has quit [Ping timeout: 252 seconds]
harfangk has quit [Ping timeout: 240 seconds]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sspreitz has quit [Ping timeout: 252 seconds]
dionysus69 has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
TinkerTyper has joined #ruby
roshanavand has joined #ruby
goyox86_ has quit [Ping timeout: 246 seconds]
mikeric has joined #ruby
sspreitz has joined #ruby
username1 has quit [Ping timeout: 240 seconds]
kreantos has quit [Ping timeout: 240 seconds]
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
kreantos has joined #ruby
cagomez has quit [Remote host closed the connection]
cagomez has joined #ruby
sspreitz has quit [Ping timeout: 252 seconds]
sspreitz has joined #ruby
carnegie has joined #ruby
ams__ has quit [Quit: Connection closed for inactivity]
vondruch has quit [Ping timeout: 276 seconds]
tomphp has joined #ruby
workmad3 has joined #ruby
<apeiros>
oh wow, only 40 directores in RbConfig::CONFIG
SeepingN has joined #ruby
Dry_Lips has quit [Ping timeout: 240 seconds]
tomphp has quit [Client Quit]
TinkerTyper has quit [Ping timeout: 246 seconds]
tomphp_ has quit [Ping timeout: 246 seconds]
sspreitz has quit [Ping timeout: 248 seconds]
tomphp has joined #ruby
__Yiota has joined #ruby
cagomez has quit [Ping timeout: 248 seconds]
Dry_Lips has joined #ruby
Dry_Lips has joined #ruby
Dry_Lips has quit [Changing host]
milardovich has quit [Remote host closed the connection]
enterprisey has joined #ruby
milardovich has joined #ruby
Guest87430 is now known as RedNifre
enterprisey has quit [Client Quit]
sspreitz has joined #ruby
milardovich has quit [Remote host closed the connection]
milardovich has joined #ruby
tomphp has quit [Ping timeout: 246 seconds]
TinkerTyper has joined #ruby
Mia has joined #ruby
tomphp has joined #ruby
<RedNifre>
So I'm vaguely aware that gems exists and that there are gem files and rake which is sort of like make. If I want to put a bit of code in a local gem and use that in a tiny script, how difficult would that be?
<RedNifre>
Also, can I make a symbol falsey, e.g. :off ?
<apeiros>
no, you can't make a symbol falsey
sspreitz has quit [Ping timeout: 252 seconds]
<apeiros>
nothing but nil and false can be falsey in ruby
goyox86_ has joined #ruby
drcode has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<RedNifre>
Okay, guess I'll make the method accept true/false/:on/:off as the single parameter then and simply case it.
sspreitz has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
<matthewd>
Bonus, if you know the gem name, gem version, and relative path, you can probably make a decent run at linking straight to the line on GitHub
<apeiros>
I assume you mean REST/JSON or SOAP API?
<im314ous>
Eh
<im314ous>
REST/JSON, yes
<apeiros>
im314ous: it's generally a better idea to ask the actual question instead of meta questions
guille-moe has quit [Ping timeout: 248 seconds]
<apeiros>
matthewd: nice idea. alternatively to rdoc.info
eckhardt has joined #ruby
<im314ous>
I answered "REST/JSON"... instead of responding like that you could have just said "yes" or "no", if it applied to you.
TinkerTyper has quit [Ping timeout: 248 seconds]
gusrub_ has quit []
sspreitz has quit [Ping timeout: 252 seconds]
<apeiros>
ok
sspreitz has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TinkerTyper has joined #ruby
<apeiros>
im314ous: and, do you actually have a question now or have you just been curious whether there's people in here with experience in building APIs? :)
carnegie has joined #ruby
sspreitz has quit [Ping timeout: 240 seconds]
cdg has joined #ruby
<im314ous>
yes
<im314ous>
;)
<apeiros>
matthewd: hrmpf, I guess it's time to do a feature request to ljarvis… access rubydoc.info by file+line instead of class+method
<apeiros>
ljarvis: ping… ^ :D
nofxx has joined #ruby
TinkerTyper has quit [Ping timeout: 248 seconds]
sspreitz has joined #ruby
carnegie has quit [Ping timeout: 276 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Tharbakim has quit [Ping timeout: 252 seconds]
username_ has joined #ruby
TinkerTyper has joined #ruby
sspreitz has quit [Ping timeout: 248 seconds]
nofxx has quit [Ping timeout: 248 seconds]
__Yiota has joined #ruby
TinkerTyper has quit [Ping timeout: 255 seconds]
sspreitz has joined #ruby
nofxx has joined #ruby
TinkerTyper has joined #ruby
balazs has quit [Ping timeout: 240 seconds]
sspreitz has quit [Ping timeout: 248 seconds]
<ljarvis>
apeiros: I think you're looking for loren, not me :)
spheric_ has joined #ruby
spheric has quit [Ping timeout: 276 seconds]
<apeiros>
damn, why do I keep confusing the two of you?
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
lsegal, right?
<ljarvis>
yep
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<apeiros>
not online, it seems :(
cdg has quit [Remote host closed the connection]
<ljarvis>
you can submit requests right from rubydoc.info fwiw, they use Tender
emilford has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
TinkerTyper has quit [Ping timeout: 252 seconds]
gusrub has joined #ruby
__Yiota has joined #ruby
Silthias has quit [Read error: Connection reset by peer]
emilford has joined #ruby
Sambsquanch has joined #ruby
ahrs has quit [Read error: Connection reset by peer]
<fredflinstone>
i don't think that feature will be easy
TinkerTyper has joined #ruby
<fredflinstone>
probably a yard feature
milardovich has quit []
ahrs has joined #ruby
<apeiros>
I don't think it should be too hard
<apeiros>
I mean it already knows which method starts where
<apeiros>
all you have to do is store the reverse lookup information somewhere
rwb has quit [Ping timeout: 276 seconds]
* matthewd
would still prefer a GitHub link
<apeiros>
that's quite a lot harder, though
<apeiros>
any number of users can have the same named repository f.ex.
sspreitz has quit [Ping timeout: 252 seconds]
<apeiros>
ok, could look it up in the gemspec
<matthewd>
Use the gem's metadata
<matthewd>
Yeah
TinkerTyper has quit [Ping timeout: 240 seconds]
<matthewd>
If it's not in there, then ¯\_(ツ)_/¯.. but for most gems it should be fine
Bhootrk_ has joined #ruby
Bhootrk_ has quit [Max SendQ exceeded]
sniffer has quit [Ping timeout: 276 seconds]
<matthewd>
Trickier part is guessing a tag to get the right version
<matthewd>
Seems feasible enough to get right a fair amount of the time, but also probably separate-gem-worthy
sniffer has joined #ruby
gothicsouth has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
TinkerTyper has joined #ruby
<apeiros>
scan through all tags for the version number, get longest common pre- and -suffix, remove, find precise match.
sspreitz has joined #ruby
<apeiros>
that'd be my naive approach
<apeiros>
if there's still multiple cases, check whether any of the prefixes is "version" or "v" (optionally with a dash)
balazs has joined #ruby
<apeiros>
alternatively - might be overkill though - install all images on the tracker-app host and read from that source :)
<apeiros>
all *gems*, not images, oc
<apeiros>
it'd probably be a lot easier, though :D
orbyt_ has joined #ruby
<apeiros>
and by install, I actually mean "just download and unpack"
ur5us has joined #ruby
<matthewd>
Yeah, that's definitely an option too
moei has joined #ruby
<apeiros>
it'd probably make most sense combined with extending the API endpoint for deployments -> submit the Gemfile + bundler options
<matthewd>
I like a link to GitHub because it's easier for me to go exploring for additional context or whatever, but there's appeal in something that'll always work, too
sspreitz has quit [Ping timeout: 248 seconds]
TinkerTyper has quit [Ping timeout: 248 seconds]
<apeiros>
can always combine it with a gitlab installation…
<apeiros>
or a disk browser. are there any rack compatible apps to do that? o0
sspreitz has joined #ruby
<apeiros>
ah lol, wth. I'm pondering features for an app which I mainly built to try out angular :D
<apeiros>
but I have to admit, it's fun. And I'm not too fond of errbit (the app we currently use)
TheDracle has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has quit [Remote host closed the connection]
TinkerTyper has joined #ruby
TheDracle has joined #ruby
neekoso has joined #ruby
<matthewd>
Yeah, I used to use Errbit, and while I like the fact it exists, it was definitely on my "I wish I had time to rewrite this" list
carnegie has joined #ruby
<apeiros>
eh, the basics are easy
ur5us has joined #ruby
<apeiros>
I'm about 10h in and the biggest missing thing is sending emails + pluggable auth (which I could probably do via devise)
<fredflinstone>
easy_auth looks better
<apeiros>
but client + app are there. and the client can do more than just report issues. it can also access parts of the api. though atm only listing and creating apps is done.