havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.5, 2.5.7, 2.7.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
d^sh has quit [Ping timeout: 240 seconds]
renich has quit [Ping timeout: 265 seconds]
d^sh has joined #ruby
<al2o3-cr> oh, part of core. hmm... idk
lucasb has quit [Quit: Connection closed for inactivity]
Intelo has quit [Ping timeout: 240 seconds]
sameerynho has joined #ruby
imtravis has quit [Ping timeout: 276 seconds]
AJA4351 has joined #ruby
Swyper has quit [Remote host closed the connection]
_phaul has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
phaul has quit [Ping timeout: 240 seconds]
Esa_ has quit []
imtravis has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
Swyper has joined #ruby
Thyla has joined #ruby
bitwinery has quit [Quit: Leaving]
queip has quit [Ping timeout: 276 seconds]
queip has joined #ruby
drincruz has joined #ruby
bambanx has joined #ruby
J-Lawson has joined #ruby
queip_ has joined #ruby
queip has quit [Ping timeout: 250 seconds]
queip_ is now known as queip
Thyla has quit [Quit: Leaving]
sameerynho has quit [Ping timeout: 240 seconds]
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
drincruz has quit [Ping timeout: 265 seconds]
AJA4351 has joined #ruby
J-Lawson27 has joined #ruby
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
ogres has joined #ruby
mniip has quit [Ping timeout: 615 seconds]
Nicmavr has quit [Read error: Connection reset by peer]
Nicmavr has joined #ruby
davor has quit [Ping timeout: 240 seconds]
davor has joined #ruby
causasui has quit [Ping timeout: 250 seconds]
stooj has quit [Quit: ZNC 1.7.3 - https://znc.in]
stooj has joined #ruby
poontangmessiah has joined #ruby
orbyt_ has joined #ruby
causasui has joined #ruby
gix has quit [Ping timeout: 276 seconds]
_whitelogger has joined #ruby
AJA4351 has joined #ruby
drincruz has joined #ruby
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
wildtrees has quit [Quit: Leaving]
leitz has quit [Quit: Leaving]
J-Lawson has quit [Remote host closed the connection]
J-Lawson27 has quit [Remote host closed the connection]
_whitelogger has joined #ruby
rrichardsr3 has joined #ruby
sphex has joined #ruby
queip has quit [Ping timeout: 276 seconds]
rusbu has quit [Ping timeout: 265 seconds]
queip has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
drincruz has quit [Ping timeout: 276 seconds]
poontangmessiah has quit [Read error: Connection reset by peer]
rusbu has joined #ruby
drincruz has joined #ruby
queip has quit [Ping timeout: 240 seconds]
chalkmonster has joined #ruby
queip has joined #ruby
bambanx has quit [Quit: Leaving]
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4350 has joined #ruby
tpanarch1st_ has joined #ruby
beanie__ has quit [Ping timeout: 240 seconds]
baojg has quit [Remote host closed the connection]
queip has quit [Ping timeout: 240 seconds]
baojg has joined #ruby
queip has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
sh7d has quit [Ping timeout: 252 seconds]
MrCrackPot has quit [Remote host closed the connection]
MrCrackPot has joined #ruby
kobain has quit [Ping timeout: 240 seconds]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
rwb has quit [Ping timeout: 245 seconds]
unreal_ has quit [Ping timeout: 240 seconds]
unreal has joined #ruby
AJA4350 has quit [Quit: AJA4350]
gavlee has quit [Excess Flood]
gavlee has joined #ruby
alfiemax has joined #ruby
cthulchu has quit [Ping timeout: 240 seconds]
rrichardsr3 has joined #ruby
queip has quit [Ping timeout: 276 seconds]
queip has joined #ruby
drincruz has quit [Ping timeout: 240 seconds]
drincruz has joined #ruby
rrichardsr3 has quit [Quit: He who dares .... wins.]
code_zombie has quit [Quit: Leaving]
drincruz has quit [Ping timeout: 240 seconds]
queip has quit [Ping timeout: 240 seconds]
laudecay has joined #ruby
queip has joined #ruby
imtravis has quit [Ping timeout: 276 seconds]
dellavg has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.6]
imtravis has joined #ruby
drincruz has joined #ruby
queip has quit [Ping timeout: 240 seconds]
queip has joined #ruby
Swyper has quit [Remote host closed the connection]
imtravis has quit [Ping timeout: 252 seconds]
drincruz has quit [Ping timeout: 252 seconds]
tpanarch1st_ has quit [Ping timeout: 240 seconds]
tpanarch1st_ has joined #ruby
queip has quit [Ping timeout: 245 seconds]
queip has joined #ruby
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
jacksoow has quit [Ping timeout: 252 seconds]
Swyper has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Swyper has quit [Ping timeout: 252 seconds]
drincruz has joined #ruby
cxl has quit [Quit: bye]
Technodrome has quit [Read error: Connection reset by peer]
drincruz has quit [Ping timeout: 250 seconds]
cxl has joined #ruby
dionysus69 has joined #ruby
SeepingN has quit [Ping timeout: 240 seconds]
queip_ has joined #ruby
queip has quit [Ping timeout: 240 seconds]
queip_ is now known as queip
conta has joined #ruby
cxl has quit [Quit: bye]
cxl has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
conta has quit [Remote host closed the connection]
lineus has quit [Ping timeout: 260 seconds]
sandstrom has joined #ruby
znz_jp has quit [Remote host closed the connection]
znz_jp has joined #ruby
conta has joined #ruby
Intelo has joined #ruby
shaman42 has quit [Remote host closed the connection]
sandstrom has quit [Quit: My computer has gone to sleep.]
Mia has quit [Read error: Connection reset by peer]
sauvin has joined #ruby
ravenousmoose has joined #ruby
chalkmonster has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
laudecay has quit [Read error: Connection reset by peer]
mniip has joined #ruby
queip_ has joined #ruby
queip has quit [Ping timeout: 276 seconds]
queip_ is now known as queip
queip has quit [Ping timeout: 276 seconds]
causasui has quit [Ping timeout: 246 seconds]
queip has joined #ruby
laudecay has joined #ruby
sandstrom has joined #ruby
queip has quit [Ping timeout: 245 seconds]
queip has joined #ruby
causasui has joined #ruby
laudecay has quit [Read error: Connection reset by peer]
sandstrom has quit [Quit: My computer has gone to sleep.]
TomyWork has joined #ruby
sandstrom has joined #ruby
drincruz has joined #ruby
queip has quit [Ping timeout: 246 seconds]
drincruz has quit [Ping timeout: 240 seconds]
queip has joined #ruby
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
queip has quit [Ping timeout: 265 seconds]
tpanarch1st_ has quit [Ping timeout: 240 seconds]
laudecay has joined #ruby
Intelo has quit [Ping timeout: 265 seconds]
_Joes_ has joined #ruby
BH23 has joined #ruby
ellcs has joined #ruby
laudecay has quit [Read error: Connection reset by peer]
Intelo has joined #ruby
laudecay has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
lineus has joined #ruby
FlorianFa has joined #ruby
mikecmpbll has joined #ruby
<dionysus69> Hello everyone, I am looking for a rails developer who is looking for remote work, the pay isn't high though, let me know in PM if interested
baojg has quit [Remote host closed the connection]
baojg has joined #ruby
schne1der has joined #ruby
sandstrom has joined #ruby
causasui has quit [Ping timeout: 252 seconds]
Jonopoly has joined #ruby
Intelo has quit [Ping timeout: 240 seconds]
Intelo has joined #ruby
cd has quit [Quit: cd]
lxsameer has joined #ruby
Intelo has quit [Ping timeout: 250 seconds]
phaul_ has joined #ruby
drincruz has joined #ruby
strika has joined #ruby
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drincruz has quit [Ping timeout: 252 seconds]
Intelo has joined #ruby
wnd-trans has joined #ruby
wnd has quit [Read error: No route to host]
phaul_ has quit [Ping timeout: 276 seconds]
phaul_ has joined #ruby
wnd-trans is now known as wnd
lalitmee has joined #ruby
ua has quit [Ping timeout: 240 seconds]
alfiemax has quit [Remote host closed the connection]
phaul_ has quit [Quit: WeeChat 2.6]
BH23 has quit [Read error: Connection reset by peer]
_Joes_ has quit [Write error: Connection reset by peer]
suukim has joined #ruby
lalitmee has quit [Quit: Leaving]
laudecay has quit [Ping timeout: 250 seconds]
conta has quit [Quit: conta]
conta has joined #ruby
salerace has joined #ruby
beefjoe has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
infinityfye has joined #ruby
Nicmavr has joined #ruby
alfiemax has joined #ruby
drincruz has joined #ruby
akemhp_ has joined #ruby
drincruz has quit [Ping timeout: 265 seconds]
akem has quit [Ping timeout: 240 seconds]
rwb has joined #ruby
akem__ has joined #ruby
stryek has joined #ruby
akemhp_ has quit [Ping timeout: 240 seconds]
drincruz has joined #ruby
salerace has quit [Quit: salerace]
drincruz has quit [Ping timeout: 265 seconds]
akemhp has joined #ruby
akem__ has quit [Ping timeout: 265 seconds]
akemhp has quit [Ping timeout: 265 seconds]
ua has joined #ruby
Swyper has quit [Remote host closed the connection]
infinityfye has quit [Ping timeout: 245 seconds]
Swyper has joined #ruby
rwb has quit [Ping timeout: 276 seconds]
sagax has quit [Quit: Konversation terminated!]
AJA4350 has joined #ruby
sagax has joined #ruby
infinityfye has joined #ruby
infinityfye has quit [Client Quit]
strika has quit [Ping timeout: 260 seconds]
alfiemax has quit [Remote host closed the connection]
Macrobiotic has joined #ruby
ravenousmoose has joined #ruby
ravenousmoose has quit [Ping timeout: 276 seconds]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 276 seconds]
AJA4351 is now known as AJA4350
strika has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
clemens3 has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
DaniG2k has joined #ruby
beefjoe has quit [Ping timeout: 245 seconds]
strika has left #ruby [#ruby]
bsdbandit-01 has joined #ruby
AJA4351 has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
Swyper has quit [Remote host closed the connection]
DaniG2k has quit [Quit: leaving]
beefjoe has joined #ruby
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
<Bish> what's a good way to get only selected things from a hash
<Bish> {a:3,b:2,c:1}
<Bish> and i only want [:a,:b]
<Bish> sure i could .select { |k| [:a,:b].include?(k) }
<Bish> but is there a better way?
<Bish> "better"
linuxdaemon has quit [Quit: Updating details, brb..]
<adam12> Bish: Hash.slice if you're version of Ruby supports it.
drincruz has joined #ruby
<Bish> im not a ruby version :(
<adam12> Bish: Hah.
lucasb has joined #ruby
Swyper has joined #ruby
linuxdaemon has joined #ruby
vondruch has quit [Ping timeout: 240 seconds]
vondruch_ has joined #ruby
vondruch_ is now known as vondruch
drincruz has quit [Ping timeout: 246 seconds]
Mia has quit [Ping timeout: 265 seconds]
drincruz has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
Axy has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
dviola has joined #ruby
DTZUZO has quit [Ping timeout: 250 seconds]
conta has quit [Ping timeout: 250 seconds]
krawchyk has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
Axy has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
yann-kaelig has joined #ruby
skryking has joined #ruby
suukim has quit [Quit: Konversation terminated!]
Rapture has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
ogres has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
dviola has quit [Quit: WeeChat 2.6]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
akemhp has joined #ruby
clemens3 has quit [Quit: WeeChat 1.6]
Intelo has quit [Ping timeout: 265 seconds]
Intelo has joined #ruby
al2o3-cr has quit [Remote host closed the connection]
Intelo has quit [Ping timeout: 276 seconds]
al2o3-cr has joined #ruby
krawchyk has quit [Quit: krawchyk]
krawchyk has joined #ruby
grilix has joined #ruby
alfiemax has joined #ruby
al2o3-cr has quit [Ping timeout: 260 seconds]
Intelo has joined #ruby
krawchyk has quit [Quit: krawchyk]
Swyper has quit [Remote host closed the connection]
snickers has joined #ruby
Macrobiotic has quit [Quit: Connection closed for inactivity]
akemhp_ has joined #ruby
akem__ has joined #ruby
AJA4351 has joined #ruby
akem__ has quit [Remote host closed the connection]
krawchyk has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
akemhp has quit [Ping timeout: 265 seconds]
akem__ has joined #ruby
akemhp_ has quit [Ping timeout: 240 seconds]
krawchyk has quit [Client Quit]
Intelo has quit [Ping timeout: 240 seconds]
akemhp_ has joined #ruby
akem__ has quit [Ping timeout: 265 seconds]
akemhp has joined #ruby
akemhp_ has quit [Ping timeout: 240 seconds]
akemhp_ has joined #ruby
ellcs has quit [Ping timeout: 245 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
akemhp has quit [Ping timeout: 250 seconds]
alfiemax has quit [Remote host closed the connection]
beefjoe has quit [Remote host closed the connection]
DTZUZO has joined #ruby
al2o3-cr has joined #ruby
Intelo has joined #ruby
ellcs has joined #ruby
rippa has joined #ruby
DTZUZO has quit [Quit: WeeChat 2.0]
Jonopoly has quit [Quit: WeeChat 2.5]
AJA4351 has joined #ruby
AJA4351 has quit [Read error: Connection reset by peer]
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4350 has joined #ruby
imtravis has joined #ruby
bsdband22 has joined #ruby
krawchyk has joined #ruby
TomyWork has quit [Ping timeout: 246 seconds]
bsdbandit-01 has quit [Ping timeout: 276 seconds]
causasui has joined #ruby
imtravis has quit [Ping timeout: 276 seconds]
akem__ has joined #ruby
bitwinery has joined #ruby
akemhp_ has quit [Ping timeout: 240 seconds]
wildtrees has joined #ruby
GodFather has quit [Remote host closed the connection]
GodFather has joined #ruby
sandstrom has joined #ruby
AJA4351 has joined #ruby
poontangmessiah has joined #ruby
AJA4350 has quit [Ping timeout: 276 seconds]
AJA4351 is now known as AJA4350
bsdbandit-01 has joined #ruby
cesario_ has joined #ruby
cesario has joined #ruby
cthulchu has joined #ruby
bsdband22 has quit [Ping timeout: 276 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
Intelo has quit [Ping timeout: 245 seconds]
akem__ has quit [Ping timeout: 246 seconds]
RougeRR has joined #ruby
<RougeRR> hi
<RougeRR> anyone got experience with fluentd gem/log driver?
<RougeRR> im struggling with buffer overflow handling. seems to only raise an exception every other time
sh7d has joined #ruby
Swyper has joined #ruby
Swyper has quit [Remote host closed the connection]
buckworst has joined #ruby
buckworst is now known as Guest82201
Guest82201 has quit [Client Quit]
buckwors1 has joined #ruby
buckwors1 has quit [Client Quit]
buckwors1 has joined #ruby
Swyper has joined #ruby
buckwors1 has quit [Client Quit]
buckworst has joined #ruby
bsdband38 has joined #ruby
sandstrom has quit [Ping timeout: 276 seconds]
AJA4351 has joined #ruby
bsdband10 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
bsdbandit-01 has quit [Ping timeout: 246 seconds]
bvdw has quit [Quit: bvdw]
bsdband38 has quit [Ping timeout: 240 seconds]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
bvdw has joined #ruby
Intelo has joined #ruby
Swyper has quit [Remote host closed the connection]
bvdw has quit [Quit: bvdw]
bvdw has joined #ruby
mn3m has joined #ruby
cesario has quit [Read error: Connection reset by peer]
cesario_ has quit [Read error: Connection reset by peer]
dr_mdma_md has joined #ruby
ravenousmoose has joined #ruby
Swyper has joined #ruby
ravenousmoose has quit [Ping timeout: 246 seconds]
Swyper has quit [Remote host closed the connection]
dellavg has quit [Ping timeout: 250 seconds]
<al2o3-cr> Minitest::Test.i_suck_and_my_tests_are_order_dependent! *BEST* method name ever! haha :P
cesario_ has joined #ruby
JohanP has joined #ruby
Eiam_ is now known as Eiam
cesario has joined #ruby
cesario has quit [Quit: Textual IRC Client: www.textualapp.com]
Rapture has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 250 seconds]
AJA4351 is now known as AJA4350
<teardown> how can i read from a socket until there is nothing coming through? this while loop hangs termbin.com/9db1
<adam12> al2o3-cr: Controversy over that method name, there was.
<al2o3-cr> adam12: i bet.
Eiam has quit [Quit: Textual IRC Client: www.textualapp.com]
<teardown> isnt the correct way to this to use IO.select ?
<adam12> teardown: A few different ways. IO.select being one of them.
<teardown> adam12: ok thanks, i'll read about IO.select then
<adam12> teardown: Do you get any output from the loop? My guess it's blocked by the server.
<teardown> adam12: yes, i get all the output the server generates, but then once there is nothing else coming from the server the loop hangs
<adam12> teardown: Presumably the socket is still open then, so the client doesn't know to end. gets blocks forever.
<teardown> yeah. i tried to break if r.nil? but couldnt get it to work
<adam12> teardown: You'd want a more non-naieve solution.
<adam12> teardown: gets is just sitting there. If the server doesn't send anything else, or close the socket, it won't exit. Does the server send some sort of EOM flag?
cesario_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ravenousmoose has joined #ruby
<teardown> adam12: no, it doesnt send an EOM flag
<sh7d> teardown, usually i do something like that: https://pastebin.com/raw/JT9X9nXi
<ruby[bot]> sh7d: as I told you already, please use https://gist.github.com
<sh7d> teardown, then, when connection is closed, and if i remeber correctly, when you will call to read method, you will get exception that you have to handle
<teardown> adam12: yes i know gets is causing it to hang, i just havent been able to figure out how to test and break or timeout when it happens
<sh7d> or readline, or gets, etc
<teardown> sh7d: thanks, i'll try that
<teardown> setting a timeout like that should work here. thank you
<sh7d> anyway, read about socket options, SO_KEEPALIVE can be sufficient for your case
<sh7d> but experiment with that as you want :)
cgibsonmm has joined #ruby
cgibsonmm has quit [Remote host closed the connection]
sagax has quit [Quit: Konversation terminated!]
buckworst has quit [Quit: WeeChat 2.6]
<al2o3-cr> teardown: while data = s.gets; p data; break if s.nread.zero?; end
AJA4351 has joined #ruby
_mak has left #ruby [".."]
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
<teardown> al2o3-cr: perfect, thank you! looks like i need to read all the socket documentaiton
<sh7d> al2o3-cr, it will work ?
<al2o3-cr> sh7d: yes.
akemhp has joined #ruby
<sh7d> >Returns number of bytes that can be read without blocking.
<sh7d> i think this depends of the case then :)
<teardown> hm. where does that #nread method come from? is it in core
<teardown> err kernel
<teardown> oh. IO.nread
<al2o3-cr> &ri IO#nread
DTZUZO has joined #ruby
<sh7d> al2o3-cr, tell me if i'm wrong, but if for example there is implemented chat protocol, and the client may have to wait to write message, nread returns zero and break the loop
vrih has quit [Ping timeout: 240 seconds]
vrih has joined #ruby
sameerynho has joined #ruby
<al2o3-cr> sh7d: nread check whether there is anything in the buffer, if there is, returns number of bytes that can be read without blocking, otherwize return 0 (buffer empty)
<sh7d> and the buffer may be empty after you read line
<sh7d> but the connection is not closed
<al2o3-cr> sh7d: then close the connection
zenspider has quit [Ping timeout: 265 seconds]
<sh7d> but you dont want to, you want to wait for another party to send data to you
<al2o3-cr> sh7d: what are you even asking?
gix has joined #ruby
<sh7d> i just dont think that is good solution, but i'm to lazy to test that so i'm just theorize :)
sauvin has quit [Read error: Connection reset by peer]
zenspider has joined #ruby
ellcs1 has joined #ruby
<teardown> hm, break if s.nread.zero? didnt work in my case
<sh7d> it's not working properly
<sh7d> teardown, and it wont work :)
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
<al2o3-cr> well, well, well... that obviously won't work.
<al2o3-cr> teardown: you didn't put a sleep in the paste.
AJA4350 has quit [Ping timeout: 252 seconds]
<sh7d> but sleep is not a right solution :)
<sh7d> IMO
<al2o3-cr> in actual fact, you only pasted the client part.
<_phaul> select is for optimizing the active polling on your socket. Instead of periodically checking if something is available you want to be woken only when something comes in. That's what select is for.
AJA4350 has joined #ruby
<_phaul> but periodic checking can also work, but if you say sleep 5 seconds and something comes in after 2 secs you would still sleepanother 3 seconds
<al2o3-cr> teardown: what happened?
Technodrome has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
imtravis has joined #ruby
poontangmessiah has quit [Ping timeout: 246 seconds]
<al2o3-cr> teardown: if that didn't work you're lines are not ending in a separator.
<al2o3-cr> *your
<al2o3-cr> until you show us a definitive example, this is the blind leading the blind :P
_phaul is now known as phaul
<teardown> sorry, experimenting with setsockopts
<teardown> yeah, it's a primitive, custom service running on top of tcp for a boot2root
<teardown> i can show you the output if you want, one secr
dionysus70 has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
dionysus70 is now known as dionysus69
<sh7d> al2o3-cr, yea, and i thought about case of breaking suddendly connection without FIN packet, and you thougt it about simple timeout in case of no data
<al2o3-cr> sh7d: where did i say that?
<sh7d> your solution work like that
<al2o3-cr> sh7d: there is no timeout in why example.
<al2o3-cr> *my
<al2o3-cr> its hard to type with a snapped extensor tendon :(
<sh7d> al2o3-cr, mental shortcut: zero data in buffer -> server is not sending data in x second so, break the loop
<sh7d> i know there was no infamous Timeout.timeout in your code :)
ogres has joined #ruby
<teardown> the output of the service => termbin.com/k9f4, and a hexdump of the same output termbin.com/9kmn
<sh7d> wooo, some telnet-bbs like shit
<dr_mdma_md> <3 telnet
<teardown> lol yep
<teardown> obviously im adding the 'r: ' in my code
MrCrackPot has quit [Remote host closed the connection]
<dr_mdma_md> remember back in the highschool days
MrCrackPot has joined #ruby
<dr_mdma_md> when making out with girls gave that extra purple/red feeling
<dr_mdma_md> and scamming shell providers for telnet accounts was a way of making time go by
<dr_mdma_md> when girls wern't around
<sh7d> dr_mdma_md, and there is no usable telnet nvt server implementation in ruby
<dr_mdma_md> sh7d: true true
<dr_mdma_md> the progression of mankind is also visible in his or her ability to connect to a server =)
<dr_mdma_md> consolally speaking
<dr_mdma_md> is that a word?
<dr_mdma_md> :D
<sh7d> wanted to wrote some creepy-halloween telnet server in ruby using ncurses
<dr_mdma_md> sorry i thought i was in another channel
<dr_mdma_md> we dont have halloween in norway
<sh7d> and that was fucking harder than i thought
<dr_mdma_md> or wait
<dr_mdma_md> i think we do because of you americans
<teardown> phaul: thanks, i think i will try IO.select
<dr_mdma_md> fucking americans
<sh7d> i'm from poland
<sh7d> land of the onion
<dr_mdma_md> there are more norwegian-americans in the US than there are norwegians in norway
<sh7d> and hallowen is unofficaly there too
<dr_mdma_md> sh7d: much love to poland tho :D
<dr_mdma_md> lots of them over here in norway
<dr_mdma_md> my neighbors are polish
<dr_mdma_md> and their daughter is
<dr_mdma_md> well
<dr_mdma_md> mmm
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 246 seconds]
AJA4351 is now known as AJA4350
<sh7d> teardown, anyway, you want read that splash, put it on the screen, and disconnect, yep ?
Ai9zO5AP has joined #ruby
<teardown> sh7d: yeah that's right. i want to break after reading the full response
<sh7d> so, al2o3-cr was right
<teardown> i just want to write a function that reads from the socket until timeout
<dr_mdma_md> btw took a lotta functions to make this sound: https://soundcloud.com/soulseek-rappers
<dr_mdma_md> if any ruby music producers are around lemme know!
<dr_mdma_md> 1 <3
<dr_mdma_md> <all made in ruby>
i9zO5AP has quit [Ping timeout: 240 seconds]
<dr_mdma_md> can't wait for the interview sessions, "so what was your main inspiration for this album?"
<sh7d> dr_mdma_md, i use only hardware in music :P
<dr_mdma_md> sh7d: much respect!
<sh7d> avalon bassline <3
<dr_mdma_md> sh7d: all i can do is try to emulate that
<sh7d> best 303 clone imo
<dr_mdma_md> :D
<dr_mdma_md> sweet
<sh7d> replicate 303 in ruby :D
<dr_mdma_md> wow
<dr_mdma_md> lmao
<dr_mdma_md> hahahaha
<dr_mdma_md> jesus christ man you got that shit locked down to the atom
<sh7d> its not mine
<dr_mdma_md> looks cool tho
<dr_mdma_md> but im only familiar with https://en.wikipedia.org/wiki/ReBirth_RB-338
<sh7d> its sound like shit imo
<dr_mdma_md> it all does
<dr_mdma_md> until you run it through your effects chain
<dr_mdma_md> or it all does, unless you have a real melody
<dr_mdma_md> cool
<sh7d> if we have to speak about authenticity
<sh7d> this is the best software clone so far
<dr_mdma_md> fuck authenticity
<dr_mdma_md> embrace nordic city
<dr_mdma_md> ok wait bad wordplay sorry
<dr_mdma_md> that was really bad, nvm
<phaul> dr_mdma_md: the only ruby thingI know is sonic pi, but we also had baweaver doing some demo on railsconf https://www.youtube.com/watch?v=tmJlos2CST4
<dr_mdma_md> ok never seen that before. thanks for the tip!
<dr_mdma_md> i know sweden is a leader in digital sound reproduction.
<dr_mdma_md> like www.softube.se
<dr_mdma_md> much respect!
<dr_mdma_md> phaul: nice
dionysus69 has quit [Quit: dionysus69]
<sh7d> teardown, i have example for ya
<sh7d> crappiest and ugly as fuck
RiPuk_ has quit [Ping timeout: 240 seconds]
akemhp_ has joined #ruby
rrichardsr3 has joined #ruby
<sh7d> but also i dont think it will work in the way to represent exactly of your bbs-like service, cause of nvt and telnet shit negotiation
dionysus69 has joined #ruby
<sh7d> anyway, enjoy
<sh7d> xD
akemhp has quit [Ping timeout: 240 seconds]
rwb has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<sh7d> dr_mdma_md, i have synth, drummachine and sampler made in sweden
<dr_mdma_md> aint that typical :D
<sh7d> guess producent name :D
<dr_mdma_md> roland?
<sh7d> nope
<dr_mdma_md> even norway, or according to many, the world's best electronic band råoyksopp
<dr_mdma_md> chose ö instead of their native ø just to illutrate that fact
AJA4351 has joined #ruby
<dr_mdma_md> elton john, coldplay etc. all said råoyksopp - melody a.m. is the greatest allbum ever produced
<dr_mdma_md> thanks to swedish tech
<dr_mdma_md> * album
<dr_mdma_md> terminal character issues
<dr_mdma_md> testing
<dr_mdma_md> æ
<dr_mdma_md> ø
<dr_mdma_md> å
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
<dr_mdma_md> still a mystery why they used the swedish ö instead of their native ø -- maybe due to respect for their hardware? be your own judge -- https://www.youtube.com/watch?v=bmatItacEvM&list=PLG5oQ5ad8TJlY0uIyjEsYN6IhNJ1eJYuG
<dr_mdma_md> talking to myself once again, been waiting for a chance to listen to this one more time :D
<dr_mdma_md> unlike my music which is made in ruby (https://soundcloud.com/hemmeligkonto) this is
<dr_mdma_md> sh7d: korg sorry :D
<sh7d> elektron
<sh7d> :D
<dr_mdma_md> huh?
SeepingN has joined #ruby
<dr_mdma_md> sh7d: pretty cool thanks for the heads up!
<dr_mdma_md> norway's never produced anything comparable in terms of hardware
<dr_mdma_md> nor has the rest of the world
luminousnine has quit [Read error: Connection reset by peer]
luminousnine has joined #ruby
luminousnine has joined #ruby
luminousnine has quit [Changing host]
<sh7d> and poland produced nothing
<sh7d> :D
<ytti_> dr_mdma_md, why did motörhead use umlauts? I guess it looked more conspicious which is good marketing, i suppose
<sh7d> as usually
<dr_mdma_md> there we go Elektron MachineDrum or... a VST? -- https://www.kvraudio.com/forum/viewtopic.php?t=172324
<dr_mdma_md> ytti_: sorry who is motorhead?
<SeepingN> Just like K's in KVR and EleKtron and anyhthing industrial. It's kewl maaan
luminousnine has quit [Read error: Connection reset by peer]
<SeepingN> noobalert
luminousnine has joined #ruby
luminousnine has quit [Changing host]
luminousnine has joined #ruby
<dr_mdma_md> usually umlauts are looked down upon in scandinavia
<ytti_> i would imagine they look more conspicious in denmark and norway
<ytti_> which is something band would want
<dr_mdma_md> nah
<dr_mdma_md> or whatever, idk
RiPuk has joined #ruby
<dr_mdma_md> in terms of graphic design and branding i see a lot more ø's than ö's when brands try to look cool
JohanP has quit [Ping timeout: 246 seconds]
<dr_mdma_md> like ø representing vikings and their conquest of britain and consequently the rest of the world
<dr_mdma_md> while ö represents, idk, stockholm?
cliluw has quit [Ping timeout: 276 seconds]
cliluw has joined #ruby
<ytti_> perhaps they were just thinking how it is perceived in native norway
<ytti_> and how there it is more striking, gets more mindshare
<dr_mdma_md> i think so
<ytti_> and international success wasnt even on the playbook
<dr_mdma_md> you're probably right about that
<dr_mdma_md> i honestly dont know
<dr_mdma_md> BUT
<dr_mdma_md> i used to sell weed to one of their best friend, bjørn torske
<dr_mdma_md> next time i meet him i'll ask and report back!
<dr_mdma_md> for sure
<ytti_> i used to be on irc with dude who used to sell weed to one of the best friends of röyksopp
<dr_mdma_md> bjørn torske is a cool dude tho. he used to let me dj at his club lol
<dr_mdma_md> i hardly remember anything i was so high
<dr_mdma_md> but
ravenousmoose has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dr_mdma_md> there we go https://www.northerndiscolights.com/
<dr_mdma_md> ytti_: thing is röyksopp is getting old and the only one to replace them is me
<dr_mdma_md> i got a pretty good grasp of who's who in norway
<dr_mdma_md> and nobody has that sound
AJA4351 has joined #ruby
dionysus69 has quit [Ping timeout: 276 seconds]
<dr_mdma_md> we got a lotta copycats tho, like this dude https://www.youtube.com/watch?v=kxsqO0ryNm8 stealing both texts and melodies from us
<dr_mdma_md> why am i even telling you this
<dr_mdma_md> sorry brb
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
<dr_mdma_md> regret giving this dude my weed
<dr_mdma_md> he liked it for sure tho
<dr_mdma_md> lmao
<teardown> thanks for your help, everyone. termbin.com/hke7
<teardown> sh7d: just saw your gist, nice
<teardown> thanks
snickers has quit [Quit: Textual IRC Client: www.textualapp.com]
<dr_mdma_md> ytti_: where you at?
<dr_mdma_md> second class ö
yokel has quit [Ping timeout: 250 seconds]
yokel has joined #ruby
<teardown> looks like your 'break if s.nread.zero?' works even without IO.select, you just cant use it inside 'while r = s.gets', but it works with recv() instead of gets()
rrichardsr3 has quit [Quit: Apparantly my attempt to stay awake has failed...]
mn3m has quit [Ping timeout: 245 seconds]
JohanP has joined #ruby
skryking has quit [Quit: WeeChat 1.9.1]
<al2o3-cr> teardown: because all lines must end with "\r\n" or "\n"
sammi` has quit [Read error: Connection reset by peer]
sammi` has joined #ruby
<teardown> al2o3-cr: yeah because that's what gets tests for, right?
<al2o3-cr> teardown: yes. if not, it tries to read the whole stream.
JohanP has quit [Ping timeout: 265 seconds]
<teardown> ok
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
hiroaki has joined #ruby
grilix has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
akemhp_ has quit [Ping timeout: 240 seconds]
akemhp has joined #ruby
kobain has joined #ruby
akemhp_ has joined #ruby
akem__ has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JohanP has joined #ruby
<ta> can anyone explain the rationale behind Syslog::Logger#error maps log level to Syslog::LOG_WARNING?
akemhp has quit [Ping timeout: 276 seconds]
<ta> "Messages from Ruby applications are not considered as critical as messages from other system daemons using syslog(3), so most messages are reduced by one level."
<leftylink> amazing
vondruch has quit [Remote host closed the connection]
akemhp_ has quit [Ping timeout: 265 seconds]
vondruch has joined #ruby
<ta> why are a ruby application not consideren as critical as other system daemons, I'd like to ask :)
<ta> also, when making that decision and when having a LEVEL_MAP, why not make that map configurable (besides monkey patching)
ogres has quit [Quit: Connection closed for inactivity]
akem__ has quit [Ping timeout: 265 seconds]
Azure|dc has joined #ruby
Azure has quit [Ping timeout: 240 seconds]
Nicmavr has quit [Read error: Connection reset by peer]
laudecay has joined #ruby
Nicmavr has joined #ruby
krawchyk has quit [Quit: krawchyk]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
jenrzzz has quit [Ping timeout: 240 seconds]
laudecay has quit [Quit: WeeChat 1.6]
Swyper has joined #ruby
jenrzzz has joined #ruby
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
brool has joined #ruby
ellcs1 has quit [Ping timeout: 240 seconds]
Swyper has quit [Remote host closed the connection]
<RougeRR> anyone used fluentd
<RougeRR> because im about to start submitting lots of shitty documentation update requests to them
<RougeRR> its so useless....
<RougeRR> its like the entirely of their docs are written short hand with zero explanation
<RougeRR> ive had to pour over their source code to begin to get to grips with it
RougeRR has quit [Quit: Leaving]
<havenwood> ta: You could: Syslog::Logger::LEVEL_MAP = 8.times.to_h { |n| [n, n] }
<havenwood> ta: Or: Hash.new { |h, k| h[k] = k }
<havenwood> ta: You'd have to ask drbrain on why he downleveled: https://github.com/ruby/ruby/commit/8f231e1eeff8afc71193a5dccdb2916cbc9eab2f
<ta> havenwood: yes, but I just don't like having to replace constants in dependency code :)
poontangmessiah has joined #ruby
hiroaki has quit [Ping timeout: 246 seconds]
JohanP has quit [Ping timeout: 276 seconds]
<havenwood> ta: It'd be easy to add an keyword argument option for not reducing levels, which would probably be accepted if it doesn't change default behavior and others want the feature.
Swyper has joined #ruby
davidw has joined #ruby
AJA4351 has joined #ruby
<havenwood> ta: Yeah, if it's a thing folk want to adjust, nice to not be constant without an easy override.
<havenwood> To not warn, you can first remove the const, fwiw. Syslog::Logger.send(:remove_const, :LEVEL_MAP)
yann-kaelig has quit [Quit: yann-kaelig]
AJA4350 has quit [Ping timeout: 276 seconds]
Swyper has quit [Ping timeout: 250 seconds]
AJA4351 is now known as AJA4350
cd has joined #ruby
lxsameer has quit [Ping timeout: 276 seconds]
gigetoo has quit [Ping timeout: 268 seconds]
crella133 has joined #ruby
<ta> havenwood: aha, nifty!
JohanP has joined #ruby
poontangmessiah_ has joined #ruby
Technodrome has joined #ruby
<Technodrome> Good day
poontangmessiah has quit [Ping timeout: 276 seconds]
<crella133> How can the code 'puts obj; puts obj.class' generate => #<struct type="seq", seq_name="j", seq_exp="4.0,7.0,11.0,8.141592653589793"> ;; #<Class:0x0000000004eb9ef8>
<crella133> ??? I wrote the code in another subroutine to define the struct.
JohanP has quit [Ping timeout: 265 seconds]
<SeepingN> ap obj
<SeepingN> or just p obj or pp obj
akemhp has joined #ruby
<crella133> &>> ap '2'
<rubydoc> stderr: -e:4:in `<main>': undefined method `ap' for main:Object (NoMethodError)... check link for more (https://carc.in/#/r/81r5)
schne1der has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
<crella133> Oh no ,because I have to check the input param 'obj' and make sure the class is '$Sseqq' . I tested the same code on irb and got the wanted result. But in the project, the struct was stored in yaml file and loaded afterwards, and was processed in different subroutines. So I wondererd whether the struct had lost its class name '$Sseqq'. By the way , I am a really newbie...
lucasb has quit [Quit: Connection closed for inactivity]
rusbu has quit [Ping timeout: 265 seconds]
<crella133> Code here: https://dpaste.de/XXxt.
<crella133> Or https://dpaste.de/0tr8