Re: [racket] Probability macro/HOF (for use in Typed Racket)

2014-03-21 Thread Ben Dean
f the terms and concepts being thrown around. On Fri, Mar 21, 2014 at 6:12 PM, Asumu Takikawa wrote: > On 2014-03-21 18:00:46 -0700, Ben Dean wrote: > >Frequently throughout a program I am working on, I would like to > specify a > >probabalistic choice between two (for

[racket] Probability macro/HOF (for use in Typed Racket)

2014-03-21 Thread Ben Dean
Frequently throughout a program I am working on, I would like to specify a probabalistic choice between two (for the sake of simplicity) procedures that might be applied at runtime. at present, I have defined a function like so : (: odds-on ((Any * -> Any) (Any * -> Any) Real -> (Any * -> Any

[racket] side-effect-free DFS of k-ary tree?

2013-12-29 Thread Ben Dean
I'm trying to do a simple depth-first search of a tree in Racket, ultimately returning a list of nodes up to the node I'm searching for. I want to do this side-effect-free, if possible, and I'm running into a wall with the approach I started on... This is my current implementation: ---

Re: [racket] Local form in typed racket

2013-02-09 Thread Ben Dean
[else (bld-lst (- remaining 1) (cons (new-emetype) lst))]))]) (bld-lst how-many '( Thanks! On Sat, Feb 9, 2013 at 6:56 PM, Ben Dean wrote: > It would be very helpful to me to have an example of the "local" form for > defining an internal function in typed rac

[racket] Local form in typed racket

2013-02-09 Thread Ben Dean
It would be very helpful to me to have an example of the "local" form for defining an internal function in typed racket. I've read and re-read the docs and can't seem to figure it out from the syntax definition. Here's what i've been trying: (: make-random-emetype-list (Range -> (Listof EmeType))

Re: [racket] problem with 5.1 dmg for mac?

2011-02-15 Thread Ben Dean
ket-5.1-bin-i386-osx-mac.dmg > [robby@gaoping] ~/.Trash$ shasum racket-5.1-bin-i386-osx-mac.dmg > 9c7a130af2a4a139731a2733698fe45746d744c3 racket-5.1-bin-i386-osx-mac.dmg > [robby@gaoping] ~/.Trash$ > > I'm using 10.6.6, but I have no idea if that matters. > > Robby &

Re: [racket] problem with 5.1 dmg for mac?

2011-02-15 Thread Ben Dean
download and install it just now on a mac. Is it > possible your download got corrupted? > > Robby > > On Tue, Feb 15, 2011 at 10:59 AM, Ben Dean > wrote: > > Is any one else having trouble opening the .dmg file that was just > released? > > I open the file (eit

[racket] problem with 5.1 dmg for mac?

2011-02-15 Thread Ben Dean
Is any one else having trouble opening the .dmg file that was just released? I open the file (either for the binary, or the source) and get the error message ""no mountable file system". Just want to make sure something is screwy on my machine, not with the distribution. I'm on OSX 10.6.5, Intel

Re: [racket] ffi/unsafe examples

2011-02-07 Thread Ben Dean
there are many on PLaneT > > Jay > > 2011/2/7 Ben Dean : > > I'm looking to put some Racket wrappers around bits of the OpenCV C api, > but > > I'm having a hard getting started. I've looked through the ffi/unsafe > > documentation several times, but

[racket] ffi/unsafe examples

2011-02-07 Thread Ben Dean
I'm looking to put some Racket wrappers around bits of the OpenCV C api, but I'm having a hard getting started. I've looked through the ffi/unsafe documentation several times, but something isn't clicking-- I think I need to peer at some examples. If anyone has a good example or two of calling C co

Re: [racket] webcam hooks in racket?

2011-01-11 Thread Ben Dean
inute... On Tue, Jan 11, 2011 at 12:46 PM, Anthony Cowley wrote: > On Tue, Jan 11, 2011 at 9:58 AM, Ben Dean > wrote: > > Hmm, thanks, I really appreciate the help. Obviously an oversight on my > > part, but I'm targeting OSX and the built-in apple "iSight" or

Re: [racket] webcam hooks in racket?

2011-01-11 Thread Ben Dean
Hmm, thanks, I really appreciate the help. Obviously an oversight on my part, but I'm targeting OSX and the built-in apple "iSight" or whatever they iCall it. It looks like it's on the list for UVC. I'm pretty new to this game, and have very little experience with language interop and device drive

[racket] webcam hooks in racket?

2011-01-10 Thread Ben Dean
I'm wondering how much it would take to get frame-by-frame output from a webcam using Racket. My desultory searching hasn't turned anything up, so I'm hoping someone has a hint or two. This wouldn't involve any networking or remote access, but I would like to be able to acquire a stream of frames (