<FromGitter>
<naqvis> they only have `Socket` as implementation, but if you are looking for different IO then you will need to roll-up your own sleeves
<watzon>
Well I'm dealing with STDOUT which is an `IO::FileDescriptor` which, lucky me, includes `IO::Evented`
<watzon>
So I'm trying to figure out how to mock STDOUT for tests. In Ruby you'd use StringIO, which Crystal use to have then it got renamed to MemoryIO and then IO::Memory, but it seems like it no longer "quacks like a file".
<FromGitter>
<Blacksmoke16> example?
<FromGitter>
<stronny> STDOUT isn't exactly a file
<watzon>
STDOUT is a FileDescriptor
<FromGitter>
<stronny> is IO not enough?
<watzon>
IO::Memory doesn't have methods like `noecho` and stuff
<watzon>
I'm dealing with a terminal environment, so I need everything that STDOUT offers. It would just be nice to have an easy way to mock it.
<watzon>
Seems like I'm going to have to write my own mock class though
<FromGitter>
<stronny> does noecho work on pipes? `yourprogram | cat` would echo everything
<FromGitter>
<stronny> at least check `.tty?`
<FromGitter>
<stronny> fundamentally I don't think unit tests cover program boundaries, integration tests do
<FromGitter>
<manveru> just lost 2 hours because doing output in systemd services doesn't flush stdout anymore :P
<FromGitter>
<manveru> is there some way to get `IO#flush_on_newline` back?
<FromGitter>
<stronny> @oprypin do you still support dbus bindings?
<FromGitter>
<7sedam7> hi, how can i compile crystal code and call it from swift for the osx and ios apps?
postmodern has joined #crystal-lang
<FromGitter>
<asterite> @manveru Yeah. I want to bring back `flush_on_newline` and make it true by default for TTY and non-TTY.
<FromGitter>
<kingsleyh> Error: Process fork is unsupported with multithread mode
<FromGitter>
<stronny> right
<FromGitter>
<stronny> Please report an issue
<FromGitter>
<kingsleyh> so I guess it's a bug - since I can't actually catch it anywhere
<FromGitter>
<stronny> I've told you, an exception occurs in Crystal's internals
<watzon>
I don't think tokoroten uses Crystals built in multithreading, so doubtful he'd be using it
<watzon>
Otherwise he wouldn't need tokoroten
<FromGitter>
<stronny> guys, it's written in plain English
<FromGitter>
<stronny> `Unhandled exception in spawn(name: Signal Loop):`
<FromGitter>
<kingsleyh> yeah multithreading is too new - I was considering moving to it instead of tokoroten - but it's not ready yet for the kind of pressure I need
<FromGitter>
<stronny> Signal Loop is the Crystal's internal fiber
<FromGitter>
<stronny> (unless I miss something)
<FromGitter>
<kingsleyh> Gitter is very flaky for me lately - messages come all out of order
<FromGitter>
<stronny> yeah, it has problems
ur5us has joined #crystal-lang
<FromGitter>
<stronny> I wouldn't fork in crystal even without mt
<FromGitter>
<stronny> it's too complicated to do right
DTZUZU2 has quit [Ping timeout: 256 seconds]
<FromGitter>
<straight-shoota> @asterite In the example in #8935 shouldn't it be `STDOUT.flush_on_newline = false`?
<livcd>
I have just a few questions. What is the best supported DB driver and what is the best way to check your code without recompiling ?
<FromGitter>
<Blacksmoke16> check your code in what way?
<livcd>
smh like cargo check
<watzon>
@jwoertink yes! I watched his screencasts where he was live coding it. I think we may even be able to use `zig cc` to cross compile Crystal without using a VM, but I'll have to play around with it.