Re: [racket-users] [ANN] MessagePack implementation for Racke

2017-07-26 Thread Alejandro Sanchez
On Tuesday, July 25, 2017 at 11:37:48 PM UTC+2, Lehi Toskin wrote: > One thing I'm curious about is what things can you and can you not pack? In > the README it shows bytes being packed, which seems a little obvious, but > what about (transparent) structs? Hashes? Lists? I'm very interested in

Re: [racket-users] [ANN] MessagePack implementation for Racke

2017-07-26 Thread Alejandro Sanchez
Here is what I get from profiling the different dispatch methods in 'unpack'. First I pack a positive fixnum which is among the first few conditions. Cond: cpu time: 810 real time: 3367 gc time: 0 cpu time: 815 real time: 3428 gc time: 0 cpu time: 815 real time: 3197 gc time: 0

Re: [racket-users] [ANN] MessagePack implementation for Racke

2017-07-25 Thread Alejandro Sanchez
Thank you all for your help. I have moved to project to a flat file structure now and reorganised everything hopefully to Racket standards (thank you, Philip), and I have changed the complicated contracts to use 'integer-in'. I think the API can stay as it is now, there is one struct and two

Re: [racket-users] [ANN] MessagePack implementation for Racke

2017-07-24 Thread Jon Zeppieri
On Mon, Jul 24, 2017 at 4:40 PM, Jay McCarthy wrote: > On Mon, Jul 24, 2017 at 3:18 PM, Alejandro Sanchez > wrote: >>> - I'm curious of the performance. In particular, I would expect that a >>> computed jump in unpack could do you good. Did you

Re: [racket-users] [ANN] MessagePack implementation for Racke

2017-07-24 Thread Philip McGrath
You probably want `integer-in` for the contract on `ext`. Have you read about the special treatment of test submodules? https://docs.racket-lang.org/guide/Module_Syntax.html#%28part._main-and-test%29 That is the idiomatic Racket way to write tests that run automatically when you want them and

Re: [racket-users] [ANN] MessagePack implementation for Racke

2017-07-24 Thread Alejandro Sanchez
> On 24 Jul 2017, at 22:40, Jay McCarthy wrote: > > On Mon, Jul 24, 2017 at 3:18 PM, Alejandro Sanchez > wrote: >>> - I'm curious of the performance. In particular, I would expect that a >>> computed jump in unpack could do you good. Did you try

Re: [racket-users] [ANN] MessagePack implementation for Racke

2017-07-24 Thread Alejandro Sanchez
I will look into that later, one thing at a time :) > On 24 Jul 2017, at 21:45, Vincent St-Amour > wrote: > > Hi Alejandro, > > This looks cool! > > I don't see it listed at pkgs.racket-lang.org. It would be easier for > users to discover it if you posted it

Re: [racket-users] [ANN] MessagePack implementation for Racke

2017-07-24 Thread Jay McCarthy
On Mon, Jul 24, 2017 at 3:18 PM, Alejandro Sanchez wrote: >> - I'm curious of the performance. In particular, I would expect that a >> computed jump in unpack could do you good. Did you try that? > I haven’t investigated performance yet. As I said, I am new to Racket,

Re: [racket-users] [ANN] MessagePack implementation for Racke

2017-07-24 Thread Jack Firth
> Just to make sure I understood correctly: ‘msgpack’ is the umbrella module > that users import, ‘msgpack/test/pack’ (and ‘unpack’) are the test modules > that will be run for testing only. How about the directory structure? I like > to keep all source files in a source directory (my original

Re: [racket-users] [ANN] MessagePack implementation for Racke

2017-07-24 Thread Vincent St-Amour
Hi Alejandro, This looks cool! I don't see it listed at pkgs.racket-lang.org. It would be easier for users to discover it if you posted it there. Vincent On Mon, 24 Jul 2017 08:17:30 -0500, Alejandro Sanchez wrote: > > Hello dear Racketeers, > > I have been writing an implementation of the

Re: [racket-users] [ANN] MessagePack implementation for Racke

2017-07-24 Thread Alejandro Sanchez
> - I think you should have one module, `msgpack` that exports everything OK. I my defense, I was originally planning to have a number of ‘pack-*’ methods like ‘pack-uin8’, ‘pack-uint16’ and so on, but there was nothing to be gained but a bloated interface. > - You should rewrite your modules

Re: [racket-users] [ANN] MessagePack implementation for Racke

2017-07-24 Thread Jay McCarthy
This is awesome, thank you! Some advice: - I think you should have one module, `msgpack` that exports everything - You should rewrite your modules to use the `#lang racket/base` language so they don't force users to import so much stuff - On integer->integer-bytes, I think that we should support

[racket-users] [ANN] MessagePack implementation for Racke

2017-07-24 Thread Alejandro Sanchez
Hello dear Racketeers, I have been writing an implementation of the MessagePack protocol for Racket and I think the library is ready to be showcased now: https://gitlab.com/HiPhish/MsgPack.rkt ### What is MessagePack? ### MessagePack is a binary data