Mirek Rusin

Results 40 comments of Mirek Rusin

Ok, let me think a bit. This is not final version, just first PR of something like this: - [x] remove manual swaps in favor of IO provided functions (also...

...and I thought to do each step as PR to stay in comprehensible size for each PR, otherwise it's going to be a bit big (but I can do it...

Just a quick two thoughts: 1. this introduction of `MemoryIO` doesn't overwrite anything, it's just a fallback. For example `String` is decoded using `Slice(UInt8)`. Default implementation in `Decoder` just falls...

@asterite btw. this code is using `Slice(UInt8)`-constructor-variant of `MemoryIO`, which doesn't do malloc so it shouldn't be slower, there are no extra allocations.

@asterite ok, you're right, it is slower. ``` # ./bench/decoding.cr # crystal run --release bench/decoding.cr require "benchmark" require "../src/pg" DB_URL = ENV["DATABASE_URL"]? || "postgres:///" db = PG.connect(DB_URL) Benchmark.ips do |x|...

In C they give warnings for assignments in conditional expressions, unless it's wrapped with `((...))`. This gives an easy way of expressing explicitly this intention: ``` doSomething() if a =...

Do you want to make pull request for it?

Are you sure you're not using an old web browser? Older versions are using previous web socket spec drafts, not the final specification. "Browser support" section under http://en.wikipedia.org/wiki/WebSocket has more...

Wouldn't signing npms on publish with 2FA protected allowed public keys solve this class of problems?