ChanServ changed the topic of #crystal-lang to: The Crystal programming language | | Fund Crystal's development: | GH: | Docs: | Gitter:
<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 ⏎ after capture ⏎ Captured stdout``` []
<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> <> my last foray into replacing stdout: (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> <> i think worked for me a long while ago
<FromGitter> <> doesn't look like it has gotten much love lately tho
<FromGitter> <> moe ( 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> <> 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>
<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`
<FromGitter> <Blacksmoke16> where `` 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> <> hmm too bad crystal still doesn't have a test coverage reporter :/
taupiqueur has quit [Ping timeout: 256 seconds]
<FromGitter> <> 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