[chuck-users] is there a way of doing "callbacks" ( i.e. passing function as argument to be called later ) ?

henrique matias hems.inlet at gmail.com
Tue May 22 18:28:40 EDT 2012


Fucking good answer in no-time ! I fucking love this list !

Actually i would love to know more about chuck source code so i could
somehow help to improve.

I swear chuck is in my priority list, was love at first sight.

lets keep this list hot ( :

On 22 May 2012 23:19, Michael Heuer <heuermh at gmail.com> wrote:

> henrique matias wrote:
>
> > This is a question Chris did to me and it reminded me some related
> questions
> > i forgot to ask:
> >
> > Is there a type "function" or type "Class" ?
>
> Class yes, function no unfortunately.  The workaround I use is small
> "functor" classes, similar in style to inner classes in java.  E.g.
>
>
> https://github.com/heuermh/lick/blob/c3ad1e94a226001b4c6229fb0c741cef046f743c/Arpeggiators.ck
>
> https://github.com/heuermh/lick/blob/c3ad1e94a226001b4c6229fb0c741cef046f743c/Loops.ck
>
> Some doc here (that needs a lot of updating)
>
> https://github.com/heuermh/lick/wiki
>
>
> > Is there anyway for "evaluating" a string to chuck code in order to do
> > dynamic calls ( like javascript "eval" function for instance ) ?
>
> You might be able to hack this by writing to a temp file and
> Machine.add'ing it.
>
>   michael
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20120522/d4835e85/attachment.htm>


More information about the chuck-users mailing list