bambanx has quit [Read error: Connection reset by peer]
bambanx has joined #ruby
crankharder has quit [Ping timeout: 255 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
SeepingN has quit [Quit: The system is going down for reboot NOW!]
wald0 has quit [Quit: Lost terminal]
zachk has quit [Quit: Leaving]
violentE has quit [Quit: Leaving]
mniip has quit [Ping timeout: 600 seconds]
mangold has joined #ruby
starseed0000 has quit [Ping timeout: 255 seconds]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 246 seconds]
AJA4351 is now known as AJA4350
AJA4350 has quit [Remote host closed the connection]
starseed0000 has joined #ruby
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
catbusters has quit [Quit: Connection closed for inactivity]
crankharder has joined #ruby
doodlebug has quit [Read error: Connection reset by peer]
Dirak has quit [Ping timeout: 245 seconds]
doodlebug has joined #ruby
doodleb45 has joined #ruby
crankharder has quit [Ping timeout: 246 seconds]
jmcgnh has quit [Ping timeout: 250 seconds]
doodlebug has quit [Ping timeout: 240 seconds]
jmcgnh_ has joined #ruby
jmcgnh_ is now known as jmcgnh
renich has joined #ruby
Axy has quit [Ping timeout: 245 seconds]
Axy has joined #ruby
duderonomy has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ur5us has quit [Ping timeout: 255 seconds]
ur5us has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
doodleb45 has quit [Read error: Connection reset by peer]
doodlebug has joined #ruby
duderonomy has joined #ruby
GodFather has quit [Remote host closed the connection]
GodFather has joined #ruby
duderonomy has quit [Client Quit]
KeyJoo has joined #ruby
duderonomy has joined #ruby
mistergibson has quit [Quit: Leaving]
duderonomy has quit [Client Quit]
hightower3 has quit [Ping timeout: 245 seconds]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
t0xik has joined #ruby
violentE has joined #ruby
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
<violentE>
I don't understand what I'm doing wrong, maybe I shouldn't be writing this in ruby https://bpaste.net/show/fd485244b5c7. The first bit there is a ruby script meant to ping a range of ips. which it does and I've included the output. But then if I run fping (similar to ping) it returns more hosts than the ruby script does. why? I took out wait incase that was a problem. idk just need a sanity check
pwnd_nsfw` has joined #ruby
<adam12>
violentE: Maybe the 1 count is the issue.
<adam12>
violentE: I'm not sure of your network or configuration, but a 1 count might mean a dropped packet could cause a failure. And some routers have been known to deprioritize ICMP so that could even compound it.
<adam12>
violentE: That said, I'm sure this would likely be fine in Ruby, albeit it with some tweaks. Could use something like the parallel gem to run multiple pings in parallel. You could then remove the 1 count and keep a short wait in case a few of the hosts take too long to respond.
<adam12>
violentE: Out of curiosity, wha'ts the exit status if you run the ping manually? ping -q -c 3 10.10.10.7 ; echo $?
<violentE>
1
<violentE>
that if $?.exitstatus.zero? was when I was trying to Process.wait pid but I decided against that route
<adam12>
violentE: Presuming Linux?
<violentE>
yeah
KeyJoo has quit [Quit: KeyJoo]
<adam12>
violentE: Whats the exit code for one of the other ips?
<violentE>
0
renich_ has joined #ruby
renich has quit [Ping timeout: 245 seconds]
crankharder has joined #ruby
<adam12>
violentE: I doubt this is Ruby related. My guess for this specifically is a differing of how the ICMP packet is generated by fping and ping.
pwnd_nsfw` has quit [Ping timeout: 244 seconds]
pwnd_nsfw has joined #ruby
<adam12>
violentE: Maybe fping is wrong and ping is correct? can you verify?
<violentE>
oh shit, you're right
bambanxx has joined #ruby
crankharder has quit [Ping timeout: 246 seconds]
<violentE>
yup .7 is a thing
<violentE>
did an nmap scan on .7 but I didn't have to include -Pn
<violentE>
I'm so confused right now
<adam12>
violentE: me too. what about just manually pinging .7 with no arguments. Timeouts?
<violentE>
yeah it times out
bambanx has quit [Ping timeout: 246 seconds]
<adam12>
violentE: Maybe ICMP is blocked on the machine and nmap/fping can use some sort of SYN or fragmented ICMP packet to determine response. Hard to say and likely way offtopic for this channel.
jenrzzz has joined #ruby
<violentE>
but if it doesn't respond to icmp request, I wouldn't be able to get results on a basic nmap scan
<adam12>
violentE: Instead of shelling out to ping you might be able to try using the net-ping gem. It's been a while since I used it so can't comment on it, and last I remember ICMP through it was reasonably unsafe due to packet creation. YMMV
<adam12>
violentE: But it might get you another datapoint to see if you can figure out whats wrong. But it sounds like ping is broken :)
<adam12>
violentE: I'd just shell out to fping instead, but use a single host. You could craft your own packet like havenwood is suggesting, if you feel so inclined.
<havenwood>
best tool for the job!
<violentE>
this is supposed to be a simple script, maybe I'm over thinking it
starseed0000 has quit [Ping timeout: 268 seconds]
<violentE>
but I can't go with what I have, its missing data
mangold has quit [Quit: This computer has gone to sleep]
Fenhl has quit [Ping timeout: 264 seconds]
Fenhl has joined #ruby
fredolinhares has quit [Quit: WeeChat 1.9.1]
kent\n has quit [Ping timeout: 255 seconds]
jenrzzz has joined #ruby
mangold has joined #ruby
jenrzzz has quit [Read error: Connection reset by peer]
claudiuinberlin has quit [Ping timeout: 268 seconds]
segy has joined #ruby
TomyWork has quit [Remote host closed the connection]
briarcliff has joined #ruby
TomyWork has joined #ruby
prestorium has joined #ruby
GodFather has quit [Read error: Connection reset by peer]
GodFather has joined #ruby
andikr has joined #ruby
imadper is now known as zhejiujuku
crankharder has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
crankharder has quit [Ping timeout: 245 seconds]
_joes_ has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
BH23 has joined #ruby
tdy has joined #ruby
ur5us has joined #ruby
jenrzzz has joined #ruby
andikr has quit [Ping timeout: 244 seconds]
tau has joined #ruby
marz_d`ghostman has joined #ruby
kyrylo has joined #ruby
tdy has quit [Ping timeout: 245 seconds]
crankharder has joined #ruby
marz_d`ghostman has quit [Ping timeout: 256 seconds]
crankharder has quit [Ping timeout: 245 seconds]
dellavg_ has joined #ruby
_joes_ has quit [Ping timeout: 264 seconds]
BH23 has quit [Ping timeout: 245 seconds]
DmitryBochkarev_ has quit [Quit: Leaving]
_joes_ has joined #ruby
DmitryBochkarev has joined #ruby
BH23 has joined #ruby
felipe has joined #ruby
felipe is now known as Guest52407
jottr has joined #ruby
DmitryBochkarev has quit [Max SendQ exceeded]
DmitryBochkarev has joined #ruby
DmitryBochkarev has quit [Max SendQ exceeded]
andikr has joined #ruby
dhollin3 has joined #ruby
crankharder has joined #ruby
jottr has quit [Ping timeout: 255 seconds]
dhollinger has quit [Ping timeout: 246 seconds]
_joes_ has quit [Ping timeout: 257 seconds]
BH23 has quit [Ping timeout: 250 seconds]
tau has quit [Remote host closed the connection]
crankharder has quit [Ping timeout: 245 seconds]
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
linduxed has joined #ruby
jottr has joined #ruby
briarcliff has left #ruby [#ruby]
briarcliff has joined #ruby
tdy has joined #ruby
ur5us has quit []
ellcs1 has quit [Ping timeout: 245 seconds]
briarcliff has quit [Ping timeout: 252 seconds]
dviola has joined #ruby
tdy has quit [Ping timeout: 250 seconds]
aufi has quit [Ping timeout: 246 seconds]
crankharder has joined #ruby
dar123 has joined #ruby
briarcliff has joined #ruby
phage has quit [Max SendQ exceeded]
phage has joined #ruby
phage has quit [Changing host]
phage has joined #ruby
crankharder has quit [Ping timeout: 246 seconds]
mangold has joined #ruby
Guest52407 has quit [Ping timeout: 244 seconds]
briarcliff has quit [Client Quit]
ellcs1 has joined #ruby
sidx64 has joined #ruby
phaul has quit [Quit: :wq]
phaul has joined #ruby
teclator has quit [Ping timeout: 246 seconds]
UncleCid__ has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 245 seconds]
briarcliff has joined #ruby
teclator has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mangold has quit [Quit: This computer has gone to sleep]
crankharder has joined #ruby
briarcliff has quit [Quit: briarcliff]
sagax has quit [Ping timeout: 268 seconds]
crankharder has quit [Ping timeout: 250 seconds]
sidx64 has joined #ruby
cfjk has quit [Ping timeout: 244 seconds]
doodleb77 has joined #ruby
rubydoc has quit [Read error: Connection reset by peer]
phaul has quit [Read error: Connection reset by peer]
doodlebug has quit [Read error: Connection reset by peer]
doodleb77 has quit [Read error: Connection reset by peer]
doodleb49 has joined #ruby
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aqd has joined #ruby
ferr has quit [Ping timeout: 250 seconds]
DmitryBochkarev has joined #ruby
briarcliff has joined #ruby
ferr has joined #ruby
ferr has quit [Client Quit]
ferr has joined #ruby
nowhereman has joined #ruby
cfjk has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nowhereman has quit [Ping timeout: 250 seconds]
nowhere_man has joined #ruby
mangold has joined #ruby
v01d4lph4 has quit [Remote host closed the connection]
briarcliff has quit [Quit: briarcliff]
briarcliff has joined #ruby
crankharder has joined #ruby
crankharder has quit [Ping timeout: 268 seconds]
sidx64 has joined #ruby
doodleb49 has quit [Read error: Connection reset by peer]
doodleb38 has joined #ruby
<terens>
does calling benchmark.bm etc in production has any side effects?
teclator has quit [Remote host closed the connection]
doodleb38 has quit [Read error: Connection reset by peer]
doodlebug has joined #ruby
nowhere_man has quit [Ping timeout: 245 seconds]
teclator has joined #ruby
AJA4350 has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sidx64 has joined #ruby
sidx64 has quit [Client Quit]
sidx64 has joined #ruby
v01d4lph4 has joined #ruby
kapil____ has joined #ruby
crankharder has joined #ruby
briarcliff has quit [Quit: briarcliff]
crankharder has quit [Ping timeout: 246 seconds]
hightower2 has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hightower3 has quit [Ping timeout: 246 seconds]
sidx64 has joined #ruby
sidx64 has quit [Read error: Connection reset by peer]
sidx64 has joined #ruby
AJA4350 has quit [Ping timeout: 245 seconds]
AJA4350 has joined #ruby
DmitryBochkarev has quit [Remote host closed the connection]
nowhere_man has joined #ruby
DTZUZO has joined #ruby
DmitryBochkarev has joined #ruby
ldnunes has joined #ruby
crankharder has joined #ruby
DmitryBochkarev_ has joined #ruby
DmitryBochkarev has quit [Ping timeout: 250 seconds]
nowhereman has joined #ruby
nowhere_man has quit [Ping timeout: 245 seconds]
hightower2 has quit [Changing host]
hightower2 has joined #ruby
nowhereman has quit [Ping timeout: 245 seconds]
aqd has quit [Ping timeout: 246 seconds]
aqd has joined #ruby
aqd has quit [Max SendQ exceeded]
aqd has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sidx64 has joined #ruby
ldnunes has quit [Ping timeout: 257 seconds]
doodleb52 has joined #ruby
Liothen- has joined #ruby
doodlebug has quit [Read error: Connection reset by peer]
doodleb52 has quit [Read error: Connection reset by peer]
Liothen has quit [Ping timeout: 250 seconds]
phaul has joined #ruby
doodlebug has joined #ruby
Liothen- has quit [Client Quit]
InfinityFye has joined #ruby
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
rubydoc has joined #ruby
moei has joined #ruby
ldnunes has joined #ruby
doodleb71 has joined #ruby
doodlebug has quit [Read error: Connection reset by peer]
doodleb71 has quit [Read error: Connection reset by peer]
doodlebug has joined #ruby
vondruch has quit [Ping timeout: 245 seconds]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 244 seconds]
AJA4351 is now known as AJA4350
phaul has quit [Ping timeout: 268 seconds]
conta1 has quit [Quit: conta1]
phaul has joined #ruby
esrse has quit [Ping timeout: 246 seconds]
dhollin3 is now known as dhollinger
jottr_ has joined #ruby
jottr has quit [Ping timeout: 250 seconds]
jottr has joined #ruby
TobiFrano has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
TobiFrano has quit [Client Quit]
jottr_ has quit [Ping timeout: 264 seconds]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DTZUZO has quit [Ping timeout: 244 seconds]
Swyper has joined #ruby
sidx64 has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
hightower2 has quit [Ping timeout: 246 seconds]
violentE has quit [Remote host closed the connection]
violentE has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
segy has quit [Ping timeout: 245 seconds]
AJA4351 has joined #ruby
Inline has joined #ruby
AJA4350 has quit [Ping timeout: 250 seconds]
AJA4351 is now known as AJA4350
violentE has quit [Quit: Leaving]
ellcs1 has quit [Ping timeout: 245 seconds]
segy has joined #ruby
segy has quit [Excess Flood]
dar123 has joined #ruby
doodlebug has quit [Remote host closed the connection]
larissa has quit [Ping timeout: 252 seconds]
larissa has joined #ruby
doodlebug has joined #ruby
Rapture has joined #ruby
Swyper has quit [Remote host closed the connection]
dar123 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has joined #ruby
Dbugger has joined #ruby
gigetoo has quit [Ping timeout: 250 seconds]
v01d4lph4 has quit [Remote host closed the connection]
segy has joined #ruby
v01d4lph4 has joined #ruby
tau has joined #ruby
lucasb has joined #ruby
gigetoo has joined #ruby
v01d4lph4 has quit [Ping timeout: 244 seconds]
DmitryBochkarev_ has quit [Ping timeout: 255 seconds]
AJA4350 has quit [Ping timeout: 250 seconds]
gigetoo has quit [Ping timeout: 244 seconds]
eckhardt has joined #ruby
gigetoo has joined #ruby
rbasak has joined #ruby
dar123 has joined #ruby
conta1 has joined #ruby
crankharder has quit [Ping timeout: 244 seconds]
AJA4350 has joined #ruby
<rbasak>
Hello! Where would be good to post about Ubuntu packages of gems please? I'm an Ubuntu developer and raised something on the Ubuntu developer list. I'd like to connect with the right part of the community on the Ruby side of things. https://lists.ubuntu.com/archives/ubuntu-devel/2019-April/040622.html for details.
n13z has quit [Quit: bleh]
<rbasak>
For Rails I posted to rubyonrails-talk (awaiting moderation), but the topic also applies to Ruby generally.
cisco has joined #ruby
mangold has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
BrianWGray has joined #ruby
tdy has joined #ruby
DmitryBochkarev_ has joined #ruby
polishdub has joined #ruby
n13z has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
hightower2 has joined #ruby
mangold has joined #ruby
tau is now known as wolf-patacho
houhoulis has joined #ruby
ua has quit [Excess Flood]
aqd has quit [Ping timeout: 255 seconds]
rippa has joined #ruby
dviola has quit [Quit: WeeChat 2.4]
aupadhye has quit [Ping timeout: 246 seconds]
gigetoo has quit [Ping timeout: 245 seconds]
<towo>
Noobish question here. If I have a class and inherit like `class foo < bar`, is bar's initialize() called?
orbyt_ has joined #ruby
<phaul>
if you don't override it with foo'sinitialize. Otherwise you can call super
AJA4350 has quit [Ping timeout: 245 seconds]
<phaul>
initialize is not a special method, works exactly like any other. The new method on the class first allocates an object then calls initialize on it, with normal method lookup
<towo>
i.e. class SomethingTask < TaskHelper begin (something) foo = bar.baz(quux) end; and in class SomeSubTask < SomethingTask I can use foo.
<towo>
(Yes, I'm learning Ruby with the "welp, learn to swim already, you're in the ocean" approach...)
<phaul>
oh. You are trying to define local var in the class definition? Local vars are local. They are lexically bound to the scope they are defined in
ua has joined #ruby
<phaul>
Other class definitions won't see it, even methods in that class won't see it
<phaul>
they slip though block definitions but that's all
gigetoo has joined #ruby
<towo>
Ah.
<towo>
I figured I was trying to be too fancy.
andikr has quit [Remote host closed the connection]
<towo>
Any common practices on getting some objects (assigned to variables) to be there when making a new class? Or is that just not a thing?
Emmanuel_Chanel has quit [Read error: Connection reset by peer]
<phaul>
it is a thing, but I am sure if I tell you how I will send you down the wrong path
<towo>
:D
<phaul>
it's almost certeanly not what you want, only useful in meta programming triicks
crankharder has joined #ruby
<towo>
Fair enough. What should I look up instead? Don't need you to fully lay this out for me, just give me some hints for ze googles. :)
<phaul>
do you want the value stored in the variable to be part of an instance of the class? do you want the value to belong to the class itself?
<towo>
Hm; in the end, as far as I understand the constructs used, there'll only be my one object anyway; I don't need to reuse the values between instances as there is only one; main point is saving on code, as there will be multiple different sub-classes (which only ever get instantiated once)
<towo>
At the front end, there's this tool just calling a ruby file and passing structured json on stdin, so no special magic sauce at any point needed, AFAIK
crankharder has quit [Ping timeout: 244 seconds]
<phaul>
can you use a module instead of the class? and in the module you can get into the singleton class of it and just use instance variables. Let me demonstrate...
<towo>
Well, I can do pretty much anything I want, really, since the front end AFAIK just does 'RUBYLIB=some:special:dirs echo $json | ruby $file.rb'
<towo>
Maybe with more fancy stuff surrounding it, but that seems to be the gist of it
lxsameer has quit [Quit: out]
<towo>
The task_helper I linked above is just some fancy aid to help with the meta issues
<phaul>
so here X has a value foo, you can only have 1 X, so it's already a singleton, and bar on X can access it
<phaul>
( you can also refer to foo as @foo inside the class<<self block
<phaul>
)
reber has joined #ruby
<phaul>
an other way would be with Singleton
<towo>
Still parsing that mentally, stand by. :)
<phaul>
I phrased this really confusingly: "here X has a value foo" .. read it as here X.foo is defined
<towo>
Hmm, still trying to see how I'd implement that... I'd write a module and use the accessors in my common code to set up the object instances I need, so i.e. MyModule.foo = bar.baz(quux); and then I can use another function like MyModule.bar that can use the things defined for foo?
<bougyman>
Ugh.
<bougyman>
google is failing me on how to convert the string "1.345e8" to a number
<bougyman>
I swore I used something called BigNumber for this before. But I can't find that, either.
<phaul>
Integer "1.345e8"
<bougyman>
I just tried that
<bougyman>
[6] pry(main)> Integer '1.345e8'
<bougyman>
ArgumentError: invalid value for Integer(): "1.345e8"
<phaul>
towo: if you would like to have a class rather than a module
gix has joined #ruby
<towo>
phaul: that would make still using the TaskHelper easier. Thanks a bunch!
TomyWork has quit [Ping timeout: 246 seconds]
terens has quit [Ping timeout: 250 seconds]
crankharder has joined #ruby
clemens3 has quit [Ping timeout: 246 seconds]
<phaul>
the difference is that in the former foo lives in the module, which cannot be instantiated, in the latter foo lives in the single instance of the class
<towo>
Yeah, I think I *roughly* understand the pros/cons.
Emmanuel_Chanel has joined #ruby
zachk has joined #ruby
eckhardt has joined #ruby
zachk has quit [Changing host]
zachk has joined #ruby
eckhardt has quit [Client Quit]
terens has joined #ruby
hoffentl1chja has left #ruby [#ruby]
cschneid has joined #ruby
plantroon has joined #ruby
orbyt_ has joined #ruby
DmitryBochkarev_ has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
orbyt_ has quit [Ping timeout: 245 seconds]
plantroon has left #ruby ["WeeChat 2.3"]
DmitryBochkarev_ has joined #ruby
DmitryBochkarev_ has quit [Max SendQ exceeded]
cisco has quit [Ping timeout: 255 seconds]
ivanskie has joined #ruby
bambanx has joined #ruby
InfinityFye has quit [Quit: Leaving]
hightower2 has quit [Ping timeout: 246 seconds]
ferr has quit [Quit: WeeChat 2.4]
prestorium has quit [Ping timeout: 245 seconds]
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]