ChanServ changed the topic of #crystal-lang to: The Crystal programming language | https://crystal-lang.org | Fund Crystal's development: https://crystal-lang.org/sponsors | GH: https://github.com/crystal-lang/crystal | Docs: https://crystal-lang.org/docs | Gitter: https://gitter.im/crystal-lang/crystal
<SamantazFox> riza: yep, I was thinking about that. Though it's gonna be hard to mitm the connection to the upstream server (google)
<SamantazFox> Blacksmoke16: we have the same logic (minus the header filtering) for images and that workd fine....
ua_ has joined #crystal-lang
<FromGitter> <Blacksmoke16> Id go the bisect route then
notzmv has quit [Ping timeout: 240 seconds]
ua_ has quit [Ping timeout: 272 seconds]
ejjfunky0 has joined #crystal-lang
ua_ has joined #crystal-lang
<FromGitter> <mattrberry> Is there an easy way to capture the stdout of a method call?
<FromGitter> <mattrberry> I'm messing around with duping file descriptors and not having the best time haha
<FromGitter> <Blacksmoke16> Sounds like a good time to think about planb
<FromGitter> <Blacksmoke16> Like have an io arg defaulted to stdout
<FromGitter> <mattrberry> Yeah that's the obvious solution. The only use for capturing stdout is for testing, though, and I don't want to refactor the project for the sake of a test
ua_ has quit [Ping timeout: 256 seconds]
<FromGitter> <mattrberry> Yeet, got it ⏎ ⏎ ```➜ ~ crystal d.cr ⏎ after capture ⏎ Captured stdout``` [https://gitter.im/crystal-lang/crystal?at=621073bf8db2b95f0a2c7f98]
<FromGitter> <mattrberry> I think I have dangling file pointers, but that's okay..
<FromGitter> <Blacksmoke16> Could you use the log module instead of stdout
<FromGitter> <Blacksmoke16> That has some built in testing stuff
waleee has quit [Ping timeout: 256 seconds]
notzmv has joined #crystal-lang
notzmv has quit [Ping timeout: 240 seconds]
waleee has joined #crystal-lang
<FromGitter> <oprypin:matrix.org> my last foray into replacing stdout: https://gist.github.com/cec2361269f965985fda49a78a3c80f2 (successful, but at what cost)
notzmv has joined #crystal-lang
hightower2 has quit [Ping timeout: 272 seconds]
taupiqueur has joined #crystal-lang
waleee has quit [Ping timeout: 256 seconds]
ua_ has joined #crystal-lang
<FromGitter> <moe:busyloop.net> i think https://github.com/mosop/stdio worked for me a long while ago
<FromGitter> <moe:busyloop.net> doesn't look like it has gotten much love lately tho
<FromGitter> <oprypin:matrix.org> moe (https://matrix.to/#/@moe:busyloop.net): yea but it doesn't work on Windows and maybe more
ua_ has quit [Ping timeout: 240 seconds]
ua_ has joined #crystal-lang
taupiqueur has quit [Ping timeout: 272 seconds]
ejjfunky0 has quit [Remote host closed the connection]
ejjfunky has quit [Ping timeout: 240 seconds]
mookie has joined #crystal-lang
<FromGitter> <moe:busyloop.net> yeh, it's pretty hacky
taupiqueur has joined #crystal-lang
taupiqueur has quit [Ping timeout: 256 seconds]
notzmv has quit [Ping timeout: 240 seconds]
<SamantazFox> Blacksmoke16: I went and tcpdump'd the response
<FromGitter> <Blacksmoke16> anything useful?
taupiqueur has joined #crystal-lang
<SamantazFox> yep: 1) not enough bytes are written 2) FIN is sent twice (ending the TCP stream twice?)
<FromGitter> <Blacksmoke16> bisect time?
<SamantazFox> bisect?
<FromGitter> <Blacksmoke16> https://git-scm.com/docs/git-bisect
<SamantazFox> My idea was to first try to use the 1.2.2 stdlib with crystal 1.3.0, in order to rule the compiler out (or vice-versa)
<FromGitter> <Blacksmoke16> could use that to figure out which commit things started breaking
<SamantazFox> yeah. Though, if the bug comes from the compiler, bisect is going to take a huuuuge amount of time (as I'd need to compile the compiler to try said commit)
<FromGitter> <Blacksmoke16> pretty sure its automatable
<FromGitter> <Blacksmoke16> i never actually used it, but my understanding is you can give it start/end points, and have it run a script to determine if its good/bad
<FromGitter> <Blacksmoke16> which would be like `make clean && make && ./bin/crystal test.cr`
<FromGitter> <Blacksmoke16> where `test.cr` is something that returns exit code 1 if bad or 0 if good
<SamantazFox> ./bin/crystal only uses the local stdlib, no?
<FromGitter> <Blacksmoke16> right, but since its checking out diff commits it would use the stdlib at the time of that commit
<FromGitter> <Blacksmoke16> it also uses bsearch, so its not like going 1 commit in order, but jumping around to more quickly figure it out
<FromGitter> <Blacksmoke16> still will take a while, but at this point its your best bet
<FromGitter> <Blacksmoke16> as if you could say "if i revert commit xyz, it works"
<SamantazFox> And what does `make clean && make`?
<SamantazFox> does it compiles the compiler?
<FromGitter> <Blacksmoke16> compiles crystal at the given commit
<FromGitter> <Blacksmoke16> yea
<SamantazFox> ok
<SamantazFox> so if crystal is compiled, `./bin/crystal` uses both the freshly compiled compiler, and the stdlib
<SamantazFox> right?
<FromGitter> <Blacksmoke16> yea
<SamantazFox> ok, thanks :)
waleee has joined #crystal-lang
sorcus has quit [Quit: WeeChat 3.4]
sorcus has joined #crystal-lang
notzmv has joined #crystal-lang
<SamantazFox> `Using /usr/bin/llvm-config-11 [version=11.0.1]`
<SamantazFox> uh, do I need anuthing else than `make`? (I've installed the dependencies already)
<SamantazFox> The line above is the only output I'm getting...
<FromGitter> <Blacksmoke16> try `make all` instead of `make`
<SamantazFox> Ah, much better ^^
<FromGitter> <Blacksmoke16> think there was an issue at some point with just `make`
<SamantazFox> just `make` is the same as the first target in the file
<FromGitter> <moe:busyloop.net> hmm too bad crystal still doesn't have a test coverage reporter :/
taupiqueur has quit [Ping timeout: 256 seconds]
<FromGitter> <moe:busyloop.net> shouldn't that actually be relatively straightforward to implement with some help from the compiler? (basically insert a call to `CovReport.incr(filename, line)` after every statement when cov-mode is enabled?)
jmiven has joined #crystal-lang
rymiel has quit [Quit: quit]
rymiel has joined #crystal-lang