ChanServ changed the topic of #crystal-lang to: The Crystal programming language | http://crystal-lang.org | Crystal 0.30.0 | Fund Crystal's development: http://is.gd/X7PRtI | GH: https://github.com/crystal-lang/crystal | Docs: http://crystal-lang.org/docs/ | API: http://crystal-lang.org/api/ | Gitter: https://gitter.im/crystal-lang/crystal
<FromGitter> <Blacksmoke16> @absolutejam_gitlab im also able to reproduce that
<FromGitter> <Blacksmoke16> however i think its deff just the terminal cutting it off
<FromGitter> <Blacksmoke16> i did `cat swagger.yaml | oq -i yaml -c . | pbcopy` then pasted the output into sublime and it seemed to be allthre
<FromGitter> <dscottboggs_gitlab> not sure what you're referring to but what happens if you redirect to a file?
<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]
<sorcus> https://gist.github.com/MrSorcus/cc7ca1ace3bd93469cfacd4546791b3d - why with Logger::ERROR it's waiting 20 seconds for `LOG.info`?
_whitelogger has joined #crystal-lang
laaron has joined #crystal-lang
<FromGitter> <absolutejam_gitlab> ??
<FromGitter> <absolutejam_gitlab> You have sleep w
<FromGitter> <absolutejam_gitlab> 20
<sorcus> I know. I mean why LOG.info called if LOG.level is Logger::ERROR?
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
laaron has quit [Remote host closed the connection]
_whitelogger has joined #crystal-lang
laaron has joined #crystal-lang
laaron has quit [Client Quit]
laaron has joined #crystal-lang
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: 276 seconds]
laaron has quit [Remote host closed the connection]
devil_tux has joined #crystal-lang
laaron has joined #crystal-lang
devil_tux has quit [Ping timeout: 245 seconds]
laaron has quit [Remote host closed the connection]
laaron has joined #crystal-lang
<FromGitter> <kniknoo> How can I view integers by their binary equivalent?
<FromGitter> <Blacksmoke16> https://play.crystal-lang.org/#/r/7dv2
<FromGitter> <kniknoo> I appreciate it!
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
lucasb has joined #crystal-lang
devil_tux has joined #crystal-lang
laaron has quit [Quit: ZNC 1.7.1 - https://znc.in]
laaron has joined #crystal-lang
<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 [Quit: ZNC 1.7.1 - https://znc.in]
<FromGitter> <Blacksmoke16> ah gotcha
laaron has joined #crystal-lang
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]
<FromGitter> <Blacksmoke16> hmm, shouldnt https://play.crystal-lang.org/#/r/7dvx include the strategy in the prod hash?
<FromGitter> <Blacksmoke16> since im merging the test env and only overriding the enabled key
laaron has joined #crystal-lang
<FromGitter> <Blacksmoke16> mm probably is overriding the whole key
<FromGitter> <Blacksmoke16> that makes sense i guess
DTZUZU has quit [Quit: WeeChat 2.2]
<FromGitter> <Blacksmoke16> yea, the merge doesnt work recursively
<FromGitter> <j8r> @Blacksmoke16 to continue what @dscottboggs_gitlab said, run `echo $PAGER`
<FromGitter> <j8r> for me it's `less`. It could be a good idea, don't know if `jq` use it but some programs use it
<FromGitter> <j8r> there is also `$EDITOR`
ua has quit [Excess Flood]
<FromGitter> <tenebrousedge> `${PAGER:-more}` is probably the most standards-compliant (http://manpages.ubuntu.com/manpages/disco/en/man1/man.1posix.html) formulation.
ua has joined #crystal-lang
ua has quit [Excess Flood]
<FromGitter> <Blacksmoke16> yea i dont think jq does
<FromGitter> <Blacksmoke16> people just do `jq ... | less`
DTZUZU has joined #crystal-lang
ua has joined #crystal-lang
rohitpaulk has joined #crystal-lang
DTZUZU has quit [Quit: WeeChat 2.2]
DTZUZU has joined #crystal-lang
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
rohitpaulk has quit [Ping timeout: 272 seconds]
ht_ has quit [Quit: ht_]
lucasb has quit [Quit: Connection closed for inactivity]
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d508b212612bb718c4e7a98]
<FromGitter> <Blacksmoke16> made it so you can inject parameters from the config file into services
<FromGitter> <Blacksmoke16> er prob should have also mentioned parameters come from the config file
<FromGitter> <Blacksmoke16> ```code paste, see link``` [https://gitter.im/crystal-lang/crystal?at=5d5097125178a724766edfaa]
<FromGitter> <Blacksmoke16> where they can be loaded from env vars
Liothen has quit [Changing host]
Liothen has joined #crystal-lang
sagax has quit [Ping timeout: 244 seconds]
sagax has joined #crystal-lang