<FromGitter>
<dscottboggs_gitlab> I.E cat swagger.yaml | oq -i yaml -c . > data
<FromGitter>
<Blacksmoke16> is all there too
<FromGitter>
<dscottboggs_gitlab> hm
<FromGitter>
<Blacksmoke16> so deff seems to indicate its just the terminal also cutting it off
<FromGitter>
<dscottboggs_gitlab> hm
<FromGitter>
<dscottboggs_gitlab> that's weird
<FromGitter>
<Blacksmoke16> :shrug:
<FromGitter>
<dscottboggs_gitlab> you could pipe the output to a pager if STDOUT is a tty by default
<FromGitter>
<Blacksmoke16> pager?
<FromGitter>
<dscottboggs_gitlab> like `more` or `less`
<FromGitter>
<Blacksmoke16> like `git diff` does?
<FromGitter>
<dscottboggs_gitlab> I've definitely seen other apps open a pager with content instead of just dumping to stdout
<FromGitter>
<dscottboggs_gitlab> exactly
<FromGitter>
<Blacksmoke16> is that something i should do or just leave it up to the user to pipe or something
<FromGitter>
<dscottboggs_gitlab> so in your code, instead of writing to `STDOUT` directly (or more likely just using `puts` or what have you), You'd launch a `Process` to run `more`, set that to have its output redirected, and output to that process instead of to `STDOUT`.
<FromGitter>
<Blacksmoke16> yea piping the output to less shows it all
<FromGitter>
<dscottboggs_gitlab> idk, depends on how big of an issue this is.
<FromGitter>
<Blacksmoke16> prob not very esp if the user can just do `| less` on their own if thats what they want
<FromGitter>
<dscottboggs_gitlab> Usually you're using a tool like that to cut down on the data you get to something readable, or pipe it into another command.
<FromGitter>
<dscottboggs_gitlab> so this issue seems like it wouldn't show up too much for a user who isn't just trying to make it break
<FromGitter>
<Blacksmoke16> yea prob not, when dealing with large output most would be outputting to a file or something id imagine
<FromGitter>
<dscottboggs_gitlab> I love leaving snarky error messages for future me :D
<FromGitter>
<tenebrousedge> piping to `$PAGER` would be preferable, or even `${PAGER:-/user/bin/less}`
asterite has quit [Remote host closed the connection]
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
_whitelogger has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter>
<galvertez> @kingsleyh oh that's you! i've seen that shard before :D
<FromGitter>
<galvertez> but i don't think raft is really designed for that sort of thing. raft tends to do best (at least according to the authors of the paper) with clusters of 5-7 servers; that is, it was not designed to scale infinitely like blockchain. it is mostly for offering fault tolerance and automating strict consensus between clusters of a few nodes at a time
<FromGitter>
<galvertez> also i think the concept of a "leader" (as raft specifies) is antithetical if not heresy for blockchain where the big idea is distributed consensus... i think the hangup is on that word "consensus"
<FromGitter>
<galvertez> i think raft and blockchain use the same vocabulary to describe similar, but incompatible concepts. w/ blockchain it is consensus because everyone agrees. in raft, everyone agrees because they are told to by the ranking authority
<FromGitter>
<galvertez> (i did wonder the same thing when i was first learning about raft though :D )
<FromGitter>
<galvertez> that being said, in an application like bitcoin (or sushichain etc.) raft might be useful for non-full nodes. like when transactions get bundled up in the hub and spoke model
_whitelogger has joined #crystal-lang
<FromGitter>
<galvertez> also, is it a known thing that int32 doesn't parse cleanly from io? (maybe it's not supposed to?) at least, it's not working on my machine and i'm running 0.28.0
<FromGitter>
<galvertez> rather, when i write a *negative* int32 to an io, and then try to read an int32 from the same io, i get IO end of file errors
<FromGitter>
<galvertez> unsigned works just fine though and for my purposes that works the way i want it to
<FromGitter>
<galvertez> just curious :)
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
ht_ has joined #crystal-lang
laaron has quit [Remote host closed the connection]
<FromGitter>
<kniknoo> Ok, I'm figuring out sprintf in addition to what you just showed me. The only thing I'm missing is a 2's complement built-in for negatives. Padding with "%016b" on -5 will give me "0000000000000-101". Will I just need to interpret that and "not" if it's negative?
<FromGitter>
<Blacksmoke16> What's the ultimate goal you're trying to achieve?
<FromGitter>
<kniknoo> I'm working on a project for a class to make an assembler for a fantasy chipset. Currently I'm interpreting an address command "@-5" and assigning a 16 bit binary number that uses 2's complement for negatives.
laaron has quit [Remote host closed the connection]
<FromGitter>
<kniknoo> Alright, I have "~" in the mix, closer...
laaron has joined #crystal-lang
<FromGitter>
<kniknoo> Well lucky me, I can assume a non-negative number in this case. I'll still need to figure this out though, as I will want to be able to use negative binary. I may need to work out a module.
diverger has left #crystal-lang [#crystal-lang]
devil_tux has quit [Ping timeout: 246 seconds]
<FromGitter>
<Blacksmoke16> sorcus: if you look the only thing that is getting logged is the Error one
<FromGitter>
<Blacksmoke16> since info is less than error, it just gets swallowed
<sorcus>
Blacksmoke16: I've been think that `LOG.info` will not be included into binary if level is `Logger::ERROR`, and `sleep 20` will not be called.
<FromGitter>
<Blacksmoke16> Nope, it just doesn't actually get logged
devil_tux has joined #crystal-lang
devil_tux has quit [Ping timeout: 244 seconds]
devil_tux has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
devil_tux has quit [Ping timeout: 246 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]