\void has quit [Quit: So long, and thanks for all the fish.]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
mikecmpbll has quit [Quit: inabit. zz.]
blackswan has joined #ruby
al2o3-cr has joined #ruby
<blackswan>
i am trying to use perl's Inline::Ruby and it seems to be dying from a NoMethodError because the Ruby module IO::generic_writable doesn't have instance_methods defined
jokester has joined #ruby
<blackswan>
this makes me sad.
JoL1hAHN has joined #ruby
_ikke_ has joined #ruby
dviola has joined #ruby
onawebuc has joined #ruby
markoong has quit [Quit: Konversation terminated!]
<kevinsjoberg>
elcontrastador: Pretty good docs I must say.
<elcontrastador>
the signaling to the phones for them to accept/unacccept a stream...the subsequent stream, I believe, could be streamed by ffmpeg to the configured mcast addr
<elcontrastador>
y
wilbert has quit [Ping timeout: 245 seconds]
<elcontrastador>
I have Cisco phones working tits...but they use an xml rpc for setup and tear down of their listening...much more open (go figure)
clemens3_ has quit [Ping timeout: 272 seconds]
cruzo66342 has quit [Remote host closed the connection]
ogres has quit [Quit: Connection closed for inactivity]
sauvin has joined #ruby
paranoicsan has quit [Quit: paranoicsan]
paranoicsan has joined #ruby
DTZUZO has quit [Ping timeout: 268 seconds]
clemens3_ has joined #ruby
lightstalker has quit [Ping timeout: 250 seconds]
BH23 has joined #ruby
nowhere_man has joined #ruby
lightstalker has joined #ruby
ellcs has joined #ruby
powerbit has joined #ruby
helpa has quit [Remote host closed the connection]
helpa-bot has joined #ruby
ellcs has quit [Ping timeout: 250 seconds]
helpa-bot has quit [Remote host closed the connection]
helpa has joined #ruby
<dionysus69>
how do I write this consicely destination_address = operation["to"] || operation["account"], if one is nil the other value should be used and vice-versa
<lupine>
class-level attributes invariably do, no matter how you implement them
<al2o3-cr>
paul__: don't get into bad habits :)
<lupine>
`extend self` is particularly bad because you'll invariably find that someone eventually includes the module elsewhere, and then you'll have two conflicting contexts for the same methods
<paul__>
both does the same ? i mean 'extend self' and 'class << self'
<lupine>
no, they're quite different
<paul__>
what' s about the class<<self usage ? is it better in my case ?
<al2o3-cr>
depends on you use case.
<lupine>
class << self is better, in that it's more focused and the created methods won't be shared with anything you later include the module into, but I'd still generally avoid it
<al2o3-cr>
*your
<paul__>
ok
clemens3_ has quit [Ping timeout: 250 seconds]
conta has joined #ruby
<al2o3-cr>
paul__: consider using a struct if attributes only e.g
<blackswan>
what it's doing is it's trying to figure out what ruby objects were created after running a chunk of ruby code so that those objects can be made visible to Perl.
<phaul>
paste the code that fills in the variable k
<blackswan>
maybe i didn't see what i thought i saw. it's possible it was always failing on calling methods. i'm not sure any more.
BH23 has joined #ruby
wildermind has joined #ruby
<phaul>
insert a bit of guard code in: if k == 'StringIO::generic_writable; then k = StringIO.included_modules[0]; ns[k]['methods'] = k.methods; else ... normal path...
ongo has quit [Ping timeout: 272 seconds]
<blackswan>
that's so ugly.
<blackswan>
that's giving up and not understanding the problem.
<blackswan>
which i might do, but not yet.
<phaul>
oh I thought we just wanted to make it run.
<blackswan>
well, yes.
<blackswan>
but not *just* that.
<blackswan>
ok. i've come to the tentative conclusion that the NoMethodError is misleading. it's a NoMethodError because there's no method, but there's no method because it can't access IO::generic_readable or IO::generic_writable by their names for some reason, and it's throwing NoMethodError instead of NameError because reasons.
AJA4350 has quit [Ping timeout: 272 seconds]
<blackswan>
possible because rb_eval is not in ruby but is in the xs for Inline::Ruby
<phaul>
it's just the ruby parser parsing lowecase name as method name
bmurt has joined #ruby
<phaul>
as was demonstrated by the channel bot, which does the exact same behaviour
<blackswan>
oh. it should be called IO::Generic_readable and IO::Generic_writable?
<blackswan>
ok.
<blackswan>
that makes sense.
<phaul>
lower case module name is an internal hack. they shouldn't do it, and given they did it they shouldn't leak it out. There was an attempt by nobu to remove it from the list of constants, but seems it still leaks https://bugs.ruby-lang.org/issues/12389
<blackswan>
thank you.
<phaul>
yw
conta1 has joined #ruby
DTZUZO has joined #ruby
paranoicsan has joined #ruby
AJA4350 has joined #ruby
eminencehc has joined #ruby
aupadhye has quit [Ping timeout: 246 seconds]
catbusters has joined #ruby
<phaul>
&fake Hacker.say_something_smart
<rubydoc>
I'll generate the digital PNG capacitor, that should transmitter the FTP card!
eblip has quit [Read error: Connection reset by peer]
v01d4lph4 has quit [Remote host closed the connection]
snk has quit [Quit: ZNC 1.6.6+deb1ubuntu0.1 - http://znc.in]
cruzo66342 has joined #ruby
snk has joined #ruby
snk has quit [Client Quit]
snk has joined #ruby
cruzo66342 has quit [Ping timeout: 240 seconds]
zapata has joined #ruby
cruzo66342 has joined #ruby
elcontrastador has joined #ruby
VladGh has quit [Quit: Lost terminal]
VladGh has joined #ruby
jcarl43 has joined #ruby
agent_white has joined #ruby
eminencehc has quit [Remote host closed the connection]
cthulchu has joined #ruby
eminencehc has joined #ruby
catbusters has quit [Quit: Connection closed for inactivity]
gregf_ has quit [Ping timeout: 256 seconds]
\void has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
conta1 has joined #ruby
awkwords has quit [Quit: sleepy time]
elcontrastador has quit [Ping timeout: 272 seconds]
nowhere_man has joined #ruby
sgen has joined #ruby
uplime is now known as nchambers
nowhere_man has quit [Read error: Connection reset by peer]
nowhere_man has joined #ruby
paul__ has joined #ruby
<paul__>
Hi
<paul__>
i have a main class named Car (1 file) with an other class named Colors, if i use class Car < Colors ; inheritance works
<paul__>
but what happen i have a third file with a new class Model
roshanavand__ has quit [Ping timeout: 250 seconds]
<paul__>
can i use class < Car < Model ?
eminencehc has quit [Remote host closed the connection]
polishdub has joined #ruby
tdy has joined #ruby
gregf_ has joined #ruby
<havenwood>
paul__: No, there's no multiple inheritance. You can only inherit from one Class. On the other hand, you can mixin many Modules.
<paul__>
what s about class A , B and C
octos has quit [Remote host closed the connection]
octos has joined #ruby
<paul__>
can i do this => class C ; end ; class B < C ; end ; class A < B ; end
<havenwood>
Try to not lean on inheritance unless it's dead obvious that's the way to go. You'll probably find that often mixins work very well.
<havenwood>
paul__: Make B and C modules, and: class A; include B; include C; end
<havenwood>
paul__: You can include as many modules as you want in a class.
<paul__>
just tried, works like a charm ! thank's havenwood
<havenwood>
paul__: no prob!
<paul__>
i have second question for you, of course i can submit it to you :)
<paul__>
i have a cmd line that report exit code always zero ; that said, when the cmd line is OK, we have a stdout, and when the cmd is wrong we get a stderr
<paul__>
how can i run this cmd line in Ruby showing stdout, stderr and return true or false ?
<RougeR>
"Ubuntu. I don't care how you use ubuntu. You can install it to free room on your hdd, install it to a second hdd, or you can overwrite your windows install. But, Ubuntu is what you want. Bash shell, and relative ease installing rails. Idk how you personally install rails on a mac, but I use RVM, and it's not bad. Whatever method you use to get it up and running, will probably be done identically on Ubuntu. Or any linux distro. But Ubuntu is a nice
<RougeR>
starter distro.
<RougeR>
You can also use elementaryOS, which is built of ubuntu, but borrows heavily from macOS UI design. Or Linux Mint, also built of Ubuntu, but UI looks a bit more like windows (windows 7 era)"
<TomyWork>
can you request a 2nd comp?
<RougeR>
nahh no chance
<TomyWork>
maybe they just want you to have one with windows
<RougeR>
i honestly dont know. im going to dig deeper
<RougeR>
any time i put up any kind of questioning or resistance
AJA4350 has quit [Ping timeout: 250 seconds]
AJA4351 is now known as AJA4350
<RougeR>
i get treated like an ignorant 5 year old....because im the only guy who runs nix
<RougeR>
lot of .net guys in the company
<TomyWork>
return the favor then?
<RougeR>
TomyWork, yeah i dont wana get sacked
<TomyWork>
and your team is the only one working on ruby stuff?
<RougeR>
yep
<RougeR>
and they all use macbooks
<TomyWork>
what does your team lead say?
<TomyWork>
macbooks with windows?
<RougeR>
hes the one forcing it on me
<RougeR>
macbooks with osx
<RougeR>
and i think occasional use of parralels
<TomyWork>
and you can't get the same deal because?
<RougeR>
well originally i didnt want a mac. and they let me use linux on some crappy windows pc
<RougeR>
which i was okay with
<RougeR>
i really dont like osx, but id rather run it than windows i think.
<RougeR>
with a bit of work, would be fine
<TomyWork>
brew sounds better than windows :)
<TomyWork>
and a lot of ruby devs use macs
<RougeR>
indeed
<TomyWork>
so you get good support
<RougeR>
ive never google a ruby question and been given a windows based answer
<RougeR>
ever
prestorium has joined #ruby
Eiam has joined #ruby
prestorium has quit [Client Quit]
<miah>
windows has chocolatey, which is like brew
<TomyWork>
except it's still not a unix
<TomyWork>
not posix compliant, backslash paths and all that stupidity
<miah>
eh, i'd rather not get into OS Holy War in this channel, take it to #ruby-offtopic please
<RougeR>
i agree miah. and i have no issue with windows or osx being used to their strengths
<RougeR>
if im developing .net ill use windows
<RougeR>
if im developing ruby...linux or osx
<miah>
ive done ruby dev on windows even, it works
<RougeR>
what tools did you use
<RougeR>
works? or works without lots of annoying bugs?
<phaul>
paul__: try redirecting the command output into a file from the shell and check the output. Some programs check if their output is tty and if not then they behave differently
<RougeR>
interesting miah
<RougeR>
yeah ive been thinking of using something like vagrant
<miah>
ya vagrant is solid
<phaul>
paul__: ls is an example. If outputting to tty it prints a comapct list if output is not tty it outputs an entry per line
<miah>
i use that a lot for integration testing
<RougeR>
nice. yeah all of our stuff runs dockerized. its just building it from local and running tests
<leftylink>
remember that sudoku bug... there was a small subproblem of "make a public statement that makes it likely I know the answer, but doesn't give too much away"
<phaul>
it's a problem of making puzzles, not an easy one
<phaul>
I was thinking about it a bit after the fact myself too. The thing was it would have been largely unfair to give any less information, as then I would have just pointed to a code of ~300 dense lines of code.Without familiarity to the code I would say it becomes impossible
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cow[moo] has quit [Ping timeout: 250 seconds]
conta1 has joined #ruby
<leftylink>
o. yeah if it had just been a "find the unspecified bug in these 300 lines" I probably wouldn't have bothered
conta1 has quit [Ping timeout: 259 seconds]
<phaul>
I played a bit more with that code base, and managed to gain 3x speedup with two optimizations steps. I was thinking about doing a write up, kinda like a blog post. atm I don't have a ruby blog
<SeepingN>
but you do have a blog?
<SeepingN>
add tag: ruby and viola! you have started a ruby blog