<hightower3>
Hm, when I do 'string'.sub /x/, 'y', this of course works. But when I call this from a method_missing() handler, sub() doesn't seem to work and instead prints: can't convert String to Hash (String#to_hash gives String) (TypeError).
<hightower3>
Any ideas?
alicef has quit [Ping timeout: 246 seconds]
<SeepingN_>
open ended ranges.. interesting
alicef has joined #ruby
jcarl43 has quit [Quit: WeeChat 2.3]
argoneus has quit [Remote host closed the connection]
Dimik has quit [Ping timeout: 272 seconds]
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ruby[bot]>
hightower3: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
kurko_ has quit [Read error: Connection reset by peer]
<hightower3>
not sure why gsub inside method_missing doesn't work...
<SeepingN_>
what happens if something is nil
darkhanb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kurko_ has joined #ruby
<SeepingN_>
not that this is complete
<hightower3>
It's not... I just made a quick example that would work if it wasn't executing in method_missing handler
<hightower3>
but since it is executing there, it throws an error instead of working
<hightower3>
and I don't understand why
Wojnar has joined #ruby
roshanavand has quit [Quit: Gone planting!]
roshanavand has joined #ruby
<SeepingN_>
don't you need a name before a and b in your call
mangold has joined #ruby
bambanx has joined #ruby
<hightower3>
name gets filled in with the name of method that is missing
ua has quit [Excess Flood]
roshanavand has quit [Ping timeout: 252 seconds]
bambanx has quit [Client Quit]
bambanx has joined #ruby
SeepingN_ has quit [Quit: The system is going down for reboot NOW!]
RougeR has quit [Ping timeout: 268 seconds]
<havenwood>
hightower3: A nit, I'd suggest #tr over #gsub for this case.
funnel has quit [Ping timeout: 252 seconds]
kurko_ has quit [Ping timeout: 268 seconds]
Nicmavr has quit [Read error: Connection reset by peer]
sagax has joined #ruby
<sagax>
hi all!
<havenwood>
sagax: o/
<sagax>
in Gemfile i have gem 'pg'
<hightower3>
yes but we are beating around the bush... the example fails even if no sub() is used. I can just reference the contents of the hash (the args) and it'll fail
<havenwood>
hightower3: What args are you calling that method with when it fails?
<sagax>
but when install i got -- `Your PostgreSQL is too old. Either install an older version of this gem or upgrade your database to at least PostgreSQL-9.2`
<sagax>
but when i check version pg_ctl --version this show `pg_ctl (PostgreSQL) 9.6.10`
<havenwood>
sagax: psql -V
Nicmavr has joined #ruby
<sagax>
hm, strange
<hightower3>
havenwood, my pastebin link above contains an example of what doesn't work
<sagax>
psql -V write `psql (PostgreSQL) 8.4.20`
<havenwood>
sagax: That's ^ the prob
sgen has joined #ruby
<sagax>
thanks, will be see more about postgresql
<havenwood>
hightower3: Are you doing it at top level? That should work in a class.
<havenwood>
hightower3: So when there's an implicit coercion, and #to_hash is tried, it instead is calling your method_missing. Does that make sense?
minimal_life has joined #ruby
alicef has joined #ruby
<hightower3>
havenwood, I've got another issue... if I do: puts "#{'TEST'.to_s.gsub /(T)/, 'x\1'}" , that of course works, and prints xTESxT. But if I want to print "\" instead of "x" and do puts "#{'TEST'.to_s.gsub /(T)/, '\\\1'}", the \1 somehow gets escaped unintentionally
<hightower3>
yeah, thanks
ansraliant has joined #ruby
za1b1tsu has quit [Ping timeout: 268 seconds]
<havenwood>
hightower3: Another way you could write that: 'TEST'.to_s.gsub(/T/) { |capture| "\\#{capture}" }
<havenwood>
hightower3: #=> "\TES\T"
<havenwood>
capture is a bad variable name there though >.>
<hightower3>
ah nice one, thanks!
<havenwood>
hightower3: np
minimal_life has quit [Quit: I am functioning within established parameters.]
NpcOrangeManBad has joined #ruby
<sagax>
i fixed psql and now all `bundle` ok
<sagax>
thanks to all
sgen has joined #ruby
NpcOrangeManBad is now known as OrangeManBad
sgen has quit [Remote host closed the connection]
ta_ has joined #ruby
sgen has joined #ruby
gix has joined #ruby
sgen has quit [Remote host closed the connection]
jdawgaz has joined #ruby
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
sagax: woot
Wojnar has quit [Remote host closed the connection]
<baweaver>
Definitely a bit advanced, but should be a fun time.
bambanx has joined #ruby
za1b1tsu has joined #ruby
dellavg_ has joined #ruby
kurko_ has quit [Ping timeout: 268 seconds]
za1b1tsu has quit [Ping timeout: 240 seconds]
RougeR has joined #ruby
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdawgaz has joined #ruby
jdawgaz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MoritaShinobu has joined #ruby
bambanx has quit [Quit: Leaving]
RougeR has quit [Ping timeout: 250 seconds]
arescorpio has quit [Remote host closed the connection]
bambanx has joined #ruby
ellcs has joined #ruby
conta has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
ellcs has quit [Ping timeout: 264 seconds]
lone_ranger has joined #ruby
dellavg_ has quit [Ping timeout: 244 seconds]
za1b1tsu has joined #ruby
vondruch has quit [Ping timeout: 244 seconds]
voolik has joined #ruby
lone_ranger has quit [Quit: lone_ranger]
s3nd1v0g1us has quit [Quit: WeeChat 2.1]
Inline has quit [Quit: Leaving]
za1b1tsu has quit [Ping timeout: 252 seconds]
za1b1tsu has joined #ruby
voolik has quit [Quit: Taking a nap...]
kurko_ has joined #ruby
Cthulu201 has quit [Read error: Connection reset by peer]
kurko_ has quit [Ping timeout: 245 seconds]
Cthulu201 has joined #ruby
doubledup has joined #ruby
reber has joined #ruby
ta_ has quit [Remote host closed the connection]
aupadhye has joined #ruby
conta has quit [Ping timeout: 268 seconds]
bambanx has quit [Quit: Leaving]
Dbugger has joined #ruby
mangold has joined #ruby
voolik has joined #ruby
mangold has quit [Client Quit]
voolik has quit [Ping timeout: 272 seconds]
mangold has joined #ruby
ua has joined #ruby
impermanence has quit [Remote host closed the connection]
conta has joined #ruby
whysthatso has joined #ruby
gix has joined #ruby
mniip has quit [Ping timeout: 600 seconds]
warrshrike has joined #ruby
<warrshrike>
hey
<warrshrike>
is there chaining in ruby hashes
<warrshrike>
i want to detect duplicates in a ruby array by putting them in a hash
<elomatreb>
Chaining? Hashes are ordered, if that's what you mean
<warrshrike>
i.e. in O(N)
<warrshrike>
so if the value is duplicate, it will hash to same key and i will know
whysthatso has quit [Quit: whysthatso]
<warrshrike>
does that make sense?
<warrshrike>
whats an appropriate data structure for that
<elomatreb>
You can use #uniq to get O(n) deduplication, FWIW
<warrshrike>
elomatreb: doesnt that do the same thing?
<elomatreb>
Yes, but you don't have to implement it yourself
<warrshrike>
i also want to implement it for learning purposes lol
<elomatreb>
Ruby hashes are not as straightforward as the classical hash table you might find in a textbook (i.e. they also contain a linked list to satisfy the order property), but for the most part they work like you'd expect
Freshnuts has joined #ruby
Freshnuts has quit [Max SendQ exceeded]
Freshnuts has joined #ruby
<warrshrike>
elomatreb: got it to work with str.hash and a ruby hash
postmodern has quit [Quit: Leaving]
clemens3 has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
Burgestrand has joined #ruby
za1b1tsu has quit [Ping timeout: 250 seconds]
kapil____ has quit [Quit: Connection closed for inactivity]
<marz_d`ghostman>
I'm stubbing exit on my code by allow(object).to receive(:exit).and_throw :exit, then I have expect(object.run).to_throw :exit, but I'm getting uncaught throw :exit. Doesn't the expect automatically catch it though?
<marz_d`ghostman>
my rescue code has a log function and exit, how do I expect two function calls? it seems calling expect (object.run).to receive(:log) and expect(object.run)to raise_error(SystemExit) differently will not stub the exit on first call
<phaul>
if you pass object.run to expect Ruby there and then evaluates object.run, rspec doesn't have a chance to do anything about that. if you pass a block then rspec has control. That's why on raise_error always expect a block.
Burgestrand has quit [Quit: Closing time!]
bastilian has quit [Read error: Connection reset by peer]
Turnikov[m] has quit [Remote host closed the connection]
jonjitsu has quit [Read error: Connection reset by peer]
Demos[m] has quit [Remote host closed the connection]
turt2live has quit [Write error: Broken pipe]
<phaul>
otherwise please paste the example on pastebin, and I can take a look.
<phaul>
or gist or whatever
thinkpad has quit [Ping timeout: 252 seconds]
thinkpad has joined #ruby
GDPR has quit [Remote host closed the connection]
Azure has quit [Ping timeout: 244 seconds]
GDPR has joined #ruby
fluxAeon has quit [Read error: Connection reset by peer]
<phaul>
no probs. Can you please also paste the rspec examples you are writing?
<phaul>
im blind
<phaul>
sorry Its right there :)
<marz_d`ghostman>
I'm trying to expect that invokes the log_error and then exit. But having two expects doesn't work as the first one would exit the rspec when getting to the line in the code where it really exits
roshanavand has joined #ruby
<phaul>
I can't run this but how does this behave atm? To my understanding in this form this doesn't really checks the example, but kills the test ?
<phaul>
even with just one expect
<phaul>
so first thing to fix would be expect { @sync.run }.to raise_error(SystemExit)
venmx has joined #ruby
<phaul>
notice I changed the argument of expect to be a block
<marz_d`ghostman>
phaul: that succeeds, expect { @sync.run }.to raise_error(SystemExit). What I'm trying to do is also expect :log_error to get invoked before SystemExit
roshanavand has quit [Ping timeout: 252 seconds]
Freshnuts has quit [Quit: Leaving]
<phaul>
right but that's not what you had on the gist
doubledup has quit [Quit: Leaving]
<phaul>
you had expect(@sync.run).to raise_error(SystemExit). that is different
SuperL4g_ has joined #ruby
Azure has joined #ruby
wildermind has joined #ruby
Sup3rLurk has joined #ruby
SuperLag has quit [Ping timeout: 244 seconds]
SuperL4g has quit [Ping timeout: 268 seconds]
<phaul>
I would make two examples anyways. You can share the setup in a context with before hooks. One would expect the raise_error, the other would have to stub out the raise error, and expect the call. I can do the rewrite, but I would do it "blind" as I can't run it
rkoller has joined #ruby
<phaul>
also there is a problem of leaving files behind, during the test. that makes the test dependent on order and state
rkoller has quit [Client Quit]
<phaul>
lemme try too give you a rewrite, but I can't guarantee I get it right first time :)
roshanavand has joined #ruby
kurko_ has joined #ruby
nowhere_man has quit [Remote host closed the connection]
bastilian has joined #ruby
turt2live has joined #ruby
jonjitsu has joined #ruby
nowhere_man has joined #ruby
Miron has quit [Ping timeout: 245 seconds]
livcd has quit [Ping timeout: 244 seconds]
Miron has joined #ruby
warrshrike has quit [Ping timeout: 256 seconds]
kurko_ has quit [Ping timeout: 268 seconds]
gregf_ has joined #ruby
<phaul>
marz_d`ghostman: @sync is the object that establish_lock / acquire_lock are methods of?
<marz_d`ghostman>
phaul: Cause rubocop seems to be giving me warning about my Rspec.describe Class having too many lines currently [52/25]
venmx has quit [Ping timeout: 264 seconds]
AJA4350 has joined #ruby
<phaul>
yeah, you can tune rubocop to be more acceptive for RSpec. I myself tend to care less about nesting levels for specs, as long as the error report reads nicely. ie contexts, describes, it { pasted in sentences make sense
<phaul>
or number of statements for rspec blocks
reber has quit [Remote host closed the connection]
livcd has joined #ruby
pskosinski has quit [Ping timeout: 252 seconds]
<marz_d`ghostman>
Ah, okay. Thought I'm doing something wrong cause I'm not yet done with the tests and I'm currently way beyond the 25 line rubocop is complaining about, hehe :)
<phaul>
I do have a Matrics/BlockLength exclude for spec/**/* in my .ruboconf
<marz_d`ghostman>
I'll do just that. By the way, you keen on blockchains?
<marz_d`ghostman>
If so, you think ruby has a place on that field?
<phaul>
hm. I don't really know much about blockchains, sorry
<jhass>
who does, they all pretend :P
<marz_d`ghostman>
haha, you have a point though
<jhass>
a blockchain, technically not the buzzword, is just a data structure
<jhass>
would you ask "has ruby a place on the field of binary trees"?
<marz_d`ghostman>
just curious cause all I see being used are java and c++
<marz_d`ghostman>
I'm not really that familiar with binary trees and the likes since I don't have a good computer science background. Just jumped into programming head first. Any books or resources you can recommend to reinforce a layman's computer science fundamentals? :D
mikecmpbll has quit [Ping timeout: 245 seconds]
clemens3 has quit [Ping timeout: 240 seconds]
im0nde has quit [Ping timeout: 250 seconds]
cabotto has quit [Remote host closed the connection]
Burgestrand has quit [Quit: Closing time!]
im0nde has joined #ruby
kapil____ has quit [Quit: Connection closed for inactivity]
conta has quit [Ping timeout: 252 seconds]
venmx has joined #ruby
Burgestrand has joined #ruby
kurko_ has joined #ruby
GodFather has joined #ruby
aufi has joined #ruby
kurko_ has quit [Ping timeout: 252 seconds]
kurko_ has joined #ruby
cabotto has joined #ruby
kurko_ has quit [Ping timeout: 240 seconds]
xfbs has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
cabotto has quit [Remote host closed the connection]
Nicmavr has joined #ruby
asphyxia has quit [Read error: Connection reset by peer]
cabotto has joined #ruby
Tuor has joined #ruby
kurko_ has joined #ruby
cabotto has quit [Remote host closed the connection]
xfbs has quit [Quit: afk]
xfbs has joined #ruby
justicefries has joined #ruby
cow[moo] has joined #ruby
nexraf1 has joined #ruby
cabotto has joined #ruby
nexraf1 has quit [Quit: WeeChat 2.2]
roshanavand has quit [Remote host closed the connection]
roshanavand has joined #ruby
conta has joined #ruby
venmx has quit [Ping timeout: 268 seconds]
venmx has joined #ruby
cabotto has quit [Remote host closed the connection]
ua has quit [Ping timeout: 250 seconds]
cabotto has joined #ruby
ua has joined #ruby
cabotto has quit [Remote host closed the connection]
Tuor has quit [Quit: Konversation terminated!]
roshanavand has quit [Quit: Gone planting!]
Fusl has quit [Excess Flood]
Fusl has joined #ruby
ua has quit [Ping timeout: 268 seconds]
Burgestrand has quit [Quit: Good bye and have a nice day!]
ua has joined #ruby
cabotto has joined #ruby
cabotto has quit [Client Quit]
bak1an has joined #ruby
clemens3 has joined #ruby
mniip has joined #ruby
discopatrick has joined #ruby
Fusl has quit [Remote host closed the connection]
dmitch has joined #ruby
blandflakes has joined #ruby
noark9 has joined #ruby
ellcs has joined #ruby
aufi has quit [Ping timeout: 240 seconds]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justicefries has joined #ruby
mangold has quit [Quit: This computer has gone to sleep]
wildermind has quit [Quit: Connection closed for inactivity]
Iambchop has joined #ruby
Rapture has joined #ruby
xfbs has quit [Quit: afk]
mangold has joined #ruby
vondruch_ has joined #ruby
kaleido has quit [Quit: true story]
vondruch has quit [Ping timeout: 268 seconds]
vondruch_ is now known as vondruch
mangold has quit [Quit: This computer has gone to sleep]
xfbs has joined #ruby
orbyt_ has joined #ruby
cxl has quit [Ping timeout: 264 seconds]
cxl has joined #ruby
whysthatso has joined #ruby
kaleido has joined #ruby
whysthatso has quit [Client Quit]
AJA4350 has quit [Remote host closed the connection]
AJA4350 has joined #ruby
ellcs has quit [Ping timeout: 264 seconds]
aupadhye has quit [Remote host closed the connection]
aupadhye has joined #ruby
voolik has joined #ruby
SeepingN has joined #ruby
noark9 has quit [Quit: noark9]
aufi has joined #ruby
fluxAeon has quit [Ping timeout: 240 seconds]
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
noark9 has joined #ruby
mangold has joined #ruby
GodFather has quit [Ping timeout: 245 seconds]
gix has quit [Disconnected by services]
justicefries has joined #ruby
noark9 has quit [Client Quit]
noark9 has joined #ruby
vondruch has quit [Quit: vondruch]
aupadhye has quit [Remote host closed the connection]
<baweaver>
Yeah, it's too deep down the flags rabbit hole for me to really have any guesses.
<ivanskie>
i might have to use what I have to just establish a port forwarding, then call a system ssh command to launch into the remote shell that way. so sad :(
apeiros_ has quit [Read error: Connection reset by peer]
dachi has joined #ruby
<ivanskie>
I'm basically replicating parts of Heroku toolbelt cli
<ivanskie>
for our aws setup. eb ssh will not work, because everything is behind a firewall basically.
apeiros_ has joined #ruby
<ivanskie>
its frustrating to get to launching into rails console through a jump box, etc etc.. just to get to the irb>. and be able to type and erase.. but when you press Enter it's like you are in text editor lol.
* ivanskie
goes weeping
DTZUZU has joined #ruby
justicefries has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justicefries has joined #ruby
conta has joined #ruby
<eam>
ivanskie: the thing intercepting and changing characters is your terminal
<eam>
you can configure its behavior with `stty`
conta has quit [Ping timeout: 260 seconds]
<ivanskie>
i was thinking that the ICRNL setting was doing it.
<ivanskie>
eam: so once I make the connection, i'd just execute an stty command to change the behavior?
za1b1tsu has joined #ruby
<eam>
possibly, yeah, or run the related tty ioctl from ruby
<eam>
the specifics ... I really haven't had enough coffee to debug terminal problems this early in the morning :)
<ivanskie>
haha
<ivanskie>
its a good lead tho
aufi has quit [Ping timeout: 252 seconds]
za1b1tsu has quit [Ping timeout: 268 seconds]
<ivanskie>
hmm interesting
<ivanskie>
ch.exec('stty icrnl') before requesting pty, says 'stty: standard input: Inappropriate ioctl for device' but exec that after request pty.. and it closes the channel.
<t0th_->
i run bundle install but when try use require i have this error: `require': cannot load such file -- mqtt . Why?
mangold has quit [Quit: This computer has gone to sleep]
<z64>
t0th_-: wild guess, but maybe you aren't using bundler to run your project? you either have to `require "bundler/setup"`, or `$ bundle exec ruby main.rb` (or whatever your main file is named)
apeiros has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
mistergibson has joined #ruby
roshanavand has joined #ruby
thebetrayer has quit [Ping timeout: 260 seconds]
<t0th_->
bundler: command not found: start.rb
Fusl has joined #ruby
za1b1tsu has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
venmx has quit [Ping timeout: 252 seconds]
apeiros has joined #ruby
za1b1tsu has quit [Ping timeout: 268 seconds]
kapil____ has joined #ruby
eddof13 has quit [Quit: eddof13]
lytol has joined #ruby
oft_gegong has quit [Quit: Page closed]
nfk has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
t0th_- has quit [Quit: Leaving]
za1b1tsu has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
apeiros__ has joined #ruby
roshanavand has quit [Quit: Gone planting!]
troulouliou_div2 has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
za1b1tsu has quit [Ping timeout: 272 seconds]
zapata_ has joined #ruby
akaiiro has joined #ruby
zapata has quit [Ping timeout: 252 seconds]
Sina has quit [Quit: Connection closed for inactivity]
nexraf1 has joined #ruby
nexraf1 has quit [Client Quit]
roshanavand has joined #ruby
nexraf1 has joined #ruby
eddof13 has joined #ruby
bak1an has joined #ruby
eddof13 has quit [Client Quit]
kurko_ has quit [Ping timeout: 246 seconds]
impermanence has joined #ruby
kurko_ has joined #ruby
dachi_ has joined #ruby
dachi has quit [Quit: Page closed]
dachi_ is now known as dachi
apeiros__ has quit [Read error: Connection reset by peer]
TheBloke has quit [Read error: Connection reset by peer]
<zenspider>
rawr
dachi has joined #ruby
fluxAeon has joined #ruby
<ivanskie>
any IO/console experts here?
<havenwood>
ivanskie: have an io-console question?
<ivanskie>
i think so?
<ivanskie>
background: writing a pseudo copy of heroku cli. specifically command to launch into rails console on remote machine.
<ivanskie>
eam has pointed me in the right direction with changing stty or something similar modes.. im not having amazing luck there. anything i try changing results in it complaining about incompatible mode for ssh.
<havenwood>
ivanskie: show the error?
<ivanskie>
and now i've sumbled upon io/console and now when im in irb> on remote machine (using net::ssh) i press enter, and it acts as if I open a "
<ivanskie>
irb(main):001:0>
<ivanskie>
irb(main):002:0*
ams__ has quit [Quit: Connection closed for inactivity]
<ivanskie>
my super ugly code (cause i've been at it for like 10+ hours now) https://dpaste.de/jP77
RougeR_ has joined #ruby
<ivanskie>
lines of interest here i think are 69-76
<ivanskie>
supposedly.. I wait for stdin activity and then send raw characters through. This snippet of code now causes two problems. 1. this is a heavy loop, not really letting much else happen on screen. 2. i have no idea what im doing so i'm not exactly getting the result i want.
bak1an has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<eam>
ivanskie: I'm also interested in the exact error re: "incompatible mode for ssh"
whysthatso has quit [Quit: whysthatso]
whysthatso has joined #ruby
dachi has quit [Ping timeout: 260 seconds]
<ivanskie>
i can't remember how to reproduce that now
eddof13 has quit [Quit: eddof13]
reber__ has joined #ruby
<ivanskie>
i know im so helpful right now. i think i need a break from this lol. i've spent a bunch of time to get to this point. its just annoying
TheBloke has joined #ruby
reber has quit [Ping timeout: 268 seconds]
fluxAeon has quit [Ping timeout: 240 seconds]
eddof13 has joined #ruby
eddof13 has quit [Client Quit]
fluxAeon has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ua_ has joined #ruby
eddof13 has joined #ruby
reber has joined #ruby
ua has quit [Ping timeout: 244 seconds]
reber__ has quit [Ping timeout: 268 seconds]
spiette has joined #ruby
roshanavand has joined #ruby
orbyt_ has joined #ruby
nexraf1 has quit [Quit: WeeChat 2.2]
roshanavand has quit [Remote host closed the connection]
<ivanskie>
ok im onto something
fluxAeon has quit [Ping timeout: 272 seconds]
<ivanskie>
i think its something with the io buffer