Re: [racket-users] Help: How to check a typed/racket type in an untyped Racket contract?

2017-08-08 Thread Sam Tobin-Hochstadt
One other suggestion: you can use `define-predicate` in a Typed Racket module to create a predicate for any type that can be checked immediately. So ``` (define-predicate dist? (Discrete-Dist Your-Type-Here)) ``` should define the predicate you want. Sam On Fri, Jul 28, 2017 at 10:23 AM, James

Re: [racket-users] A bug in the Typed Racket system?

2017-08-08 Thread Sam Tobin-Hochstadt
The reason that Typed Racket chooses the istantiation `Nothing` here is that because `a` is used in both a positive and negative position (both as an input and an output) in the type of the `val` field, there's no way to pick a "best" choice for `a`. `(Foo Integer)` is not a subtype of `(Foo

Re: [racket-users] Get number of CPUs / Cores

2017-08-08 Thread Zelphir Kaltstahl
Yes that seems to be it, thanks! -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit

Re: [racket-users] Re: Decision Tree in Racket - Performance

2017-08-08 Thread Robby Findler
I see that I was misled by raco demod, which suggests that this: (define (f x) (match-define (cons a b) x) (+ a b)) compiles into this: (define-values (_f) (lambda (arg0-21) '#(f # 2 0 14 54 #f) '(flags: preserves-marks single-result) '(captures:

Re: [racket-users] Re: Decision Tree in Racket - Performance

2017-08-08 Thread Sam Tobin-Hochstadt
On Thu, Jul 27, 2017 at 8:36 PM, Robby Findler wrote: > I see from raco demod that match-define does not generate very > beautiful code, which leads me to this version (which is what I think > match-define should have expanded into). It seems to be about 4x > faster

Re: [racket-users] Re: table lookup shorthands?

2017-08-08 Thread Luis Sanjuán
Hi, phillip As far as I'm concerned, professional musician too, I wrote a little app, just a prototype, using a similar representation of pitch classes and intervals for basic chord analysis. Since actual chords can be seen as sequences of intervals, its analysis can be reduced to determine

Re: [racket-users] table lookup shorthands?

2017-08-08 Thread Alex Knauth
> On Aug 8, 2017, at 8:15 AM, Luis Sanjuán wrote: > > Hi, phillip > > As far as I'm concerned, professional musician too, I wrote a little app, > just a prototype, using a similar representation of pitch classes and > intervals for basic chord analysis. Since actual

Re: [racket-users] table lookup shorthands?

2017-08-08 Thread Luis Sanjuán
On Tuesday, August 8, 2017 at 3:16:46 PM UTC+2, Alex Knauth wrote: > > On Aug 8, 2017, at 8:15 AM, Luis Sanjuán wrote: > > > > Hi, phillip > > > > As far as I'm concerned, professional musician too, I wrote a little app, > > just a prototype, using a similar

[racket-users] DSLDI 2017: Final Call for Talk Proposals (deadline extended)

2017-08-08 Thread Lindsey Kuper
* FINAL CALL FOR TALK PROPOSALS DSLDI 2017 Fifth Workshop on Domain-Specific Language Design and Implementation October 22, 2017 Vancouver, Canada Co-located with SPLASH http://2017.splashcon.org/track/dsldi-2017

[racket-users] Get number of CPUs / Cores

2017-08-08 Thread Zelphir Kaltstahl
I want to parallelize some program using places, so actually using multiple cores. To parallelize as much as possible on any given machine, I'd like to know how many cores + effect of hyperthreading there are. For example I have a CPU with 2 cores, but it supports hyperthreading, so that I

Re: [racket-users] Get number of CPUs / Cores

2017-08-08 Thread Jon Zeppieri
On Tue, Aug 8, 2017 at 4:56 PM, Zelphir Kaltstahl wrote: > I want to parallelize some program using places, so actually using multiple > cores. > > To parallelize as much as possible on any given machine, I'd like to know how > many cores + effect of hyperthreading

Re: [racket-users] table lookup shorthands?

2017-08-08 Thread Luis Sanjuán
On Tuesday, August 8, 2017 at 3:16:46 PM UTC+2, Alex Knauth wrote: > > On Aug 8, 2017, at 8:15 AM, Luis Sanjuán wrote: > > > > Hi, phillip > > > > As far as I'm concerned, professional musician too, I wrote a little app, > > just a prototype, using a similar

Re: [racket-users] table lookup shorthands?

2017-08-08 Thread Luis Sanjuán
On Tuesday, August 8, 2017 at 3:16:46 PM UTC+2, Alex Knauth wrote: > > On Aug 8, 2017, at 8:15 AM, Luis Sanjuán wrote: > > > > Hi, phillip > > > > As far as I'm concerned, professional musician too, I wrote a little app, > > just a prototype, using a similar

Re: [racket-users] Re: Does anyone have experience with GObject Introspection?

2017-08-08 Thread David Storrs
Thanks, Greg. This looks useful; we'll check through it and then probably come back with more questions. On Mon, Aug 7, 2017 at 3:58 PM, Greg Trzeciak wrote: > On Monday, August 7, 2017 at 8:07:02 PM UTC+2, David K. Storrs wrote: > > We're trying to work with the gir