Hi Diego,
I had a quick look at your code and liked the approach you took. I didn't
know about biassocs, so I used '[ reverse ] map >hashtable' on my code table
to get the reverse mapping. I've just noticed that my code actually does
this for every morse character it translates, which is very inefficent. Your
code caches the table in a variable, but you haven't set a scope on the
variable (using with-scope or with-variable etc.). Maybe it should be a
global since it's constant, or better yet, if you can enter a literal
biassoc instead of using >biassoc then it will be constructed at parse time.
Yet another way of caching it would be using MEMO:.
I also liked your simple approach of using 'split' to break morse messages
into individual codes to be translated. My version used a grammar defined
using parser combinators to do the translation, which seems more complex.
I'll merge our two versions when I get the chance. The next step is to turn
the sound of morse code into a string of dots, dashes, spaces and slashes.
Does that sound hard to you? It does to me :)
Alex
2009/4/16 Diego Martinelli <martinelli.di...@gmail.com>
> Alex: I'm going to send you my own version of the morse code vocab (I
> didn't know there was another version in the unmaintained folder). It
> contains some enhancements and a [MORSE parsing word for literals, but
> no words such your play-as-morse, so consider if you wanna merge the
> two versions (I'd be glad to contribute for what I can).
>
> Diego
>
>
> On Thu, Apr 16, 2009 at 6:05 AM, Alex Chapman <chapman.a...@gmail.com>
> wrote:
> > Hi,
> > In getting jamshred runnable again I had to fix openal, so I thought I'd
> do
> > synth and morse while I was at it. All four are working again and the
> > changes can be pulled from factorcode.org/git/wrunt.git.
> > At first I couldn't find jamshred -- the directory unmaintained/jamshred
> was
> > empty. I was able to retrieve the data using git diff, but I wonder how
> it
> > was removed in the first place, and whether anything else was
> accidentally
> > removed at the same time? I think the commit which removed it
> > was e0af88bd974313735938870c3bdf1b61b2a262ec, with the log message "Move
> a
> > bunch of vocabularies to unmaintained, hopefully temporarily".
> >
> > If you try jamshred, beware as it currently has a bug which causes it to
> > lock up factor, I think in an endless recursion in the collision
> detection
> > code. Really need to fix that :/
> > Alex
> > 2009/4/15 Slava Pestov <sl...@factorcode.org>
> >>
> >> Hi,
> >>
> >> openal and synth are the 'official' vocabs but they need some cleanup
> >> and fixes first to get them back into shape for going into extra/. Do
> >> you want to give that a shot? I'm sure many other people would also
> >> find it useful.
> >>
> >> Slava
> >>
> >> On Tue, Apr 14, 2009 at 7:20 AM, diego martinelli
> >> <martinelli.di...@gmail.com> wrote:
> >> > Hi all,
> >> >
> >> > I'd like to play some procedurally-generated sounds for a vocab I'm
> >> > working on (it's an enhanced morse code encoder/decoder similar to the
> >> > unmaintained one), but the only vocabularies I see for doing such a
> >> > thing are the 'openal' binding and 'synth', which are both in the
> >> > unmaintained directory.
> >> >
> >> > Is there an 'official' vocab to use? Am I missing something?
> >> >
> >> > Thanks,
> >> > Diego
> >> >
> >> >
> >> >
> ------------------------------------------------------------------------------
> >> > This SF.net email is sponsored by:
> >> > High Quality Requirements in a Collaborative Environment.
> >> > Download a free trial of Rational Requirements Composer Now!
> >> > http://p.sf.net/sfu/www-ibm-com
> >> > _______________________________________________
> >> > Factor-talk mailing list
> >> > Factor-talk@lists.sourceforge.net
> >> > https://lists.sourceforge.net/lists/listinfo/factor-talk
> >> >
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> This SF.net email is sponsored by:
> >> High Quality Requirements in a Collaborative Environment.
> >> Download a free trial of Rational Requirements Composer Now!
> >> http://p.sf.net/sfu/www-ibm-com
> >> _______________________________________________
> >> Factor-talk mailing list
> >> Factor-talk@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/factor-talk
> >
> >
> >
> ------------------------------------------------------------------------------
> > Stay on top of everything new and different, both inside and
> > around Java (TM) technology - register by April 22, and save
> > $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> > 300 plus technical and hands-on sessions. Register today.
> > Use priority code J9JMT32. http://p.sf.net/sfu/p
> > _______________________________________________
> > Factor-talk mailing list
> > Factor-talk@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/factor-talk
> >
> >
>
>
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> Factor-talk mailing list
> Factor-talk@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
Factor-talk mailing list
Factor-talk@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/factor-talk