Qinsi (James) ZHU

Results 6 comments of Qinsi (James) ZHU

to reproduce: ```crystal require "onyx/http" require "halite" Onyx::HTTP.get "/" do |env| env.response ( 5. 6. __arg0 : typeof(_io), 7. 8. 9. ) { 10. spawn(name: nil) do > 11. handle_client(...

Changing require order doesn't work. Monkey-patching works, but have to define it as nil-able: ```crystal module Halite module Exception class APIError < ResponseError getter status_message : String | Nil end...

I think a scoped (within Onyx's namespace) exception class is better, so that it doesn't interfere with other classes with a same name.

On my machine (MacOS 15.4, Intel), run with `-d:nimDebugDlOpen`, it fails to locate a modern OpenSSL library: ```bash dlopen(libcrypto.3.dylib, 0x0002): tried: 'libcrypto.3.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OSlibcrypto.3.dylib' (no such file), '/usr/lib/libcrypto.3.dylib'...

I noticed the following [code](https://github.com/nim-lang/Nim/blob/79afee868d784eb90972deb3ea89c96702585968/lib/wrappers/openssl.nim#L80-L81), which was introduced in this [commit](https://github.com/nim-lang/Nim/commit/79afee868d784eb90972deb3ea89c96702585968): ```nim when defined(osx): const versions = "(.3|.1.1|.38|.39|.41|.43|.44|.45|.46|.47|.48|.10|.1.0.2|.1.0.1|.1.0.0|.0.9.9|.0.9.8|)" ``` On my machine, it finds `libcrypto.41.dylib` and `libssl.43.dylib`. (Interestingly, despite the...

On my machine, removing `when defined(osx)` and using `const versions = "(.3|.1.1|.1.0.2|.1.0.1|.1.0.0|.0.9.9|.0.9.8|.48|.47|.46|.45|.44|.43|.41|.39|.38|.10|)"` matches version `.0.9.8`, which gives an error `could not import: X509_check_host`. This makes sense since `X509_check_host` is only...