[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
Fri Jun 8 12:33:22 EDT 2012


I'll need a bit of time to figure out and do some tests on this tricks. I
still very kiddo on chuck, for instance i don't know what "<<" does.

Anyway i liked the Constructor workaround, and as soon as i get back to
chuck will see also how possible is to mess the source as well.

thanks for the energy on this subject

cya

On 24 May 2012 18:39, mike clemow <michaelclemow at gmail.com> wrote:

> Hi All,
>
> Henrique, I highly encourage you to take a deep look at Michael Heuer's
> LiCK library.  There are some great things in there that take advantage of
> a functional paradigm in a generally functional-unfriendly language.
>
> And while we're talking about functional style and other nerdery, I submit
> for your consideration my attempt to implement a Closure in Chuck to avoid
> overmuch global state.  This should appeal to you JavaScript geeks out
> there as well.  It's influenced by ideas in LiCK.  And while it's a bit
> harder to read than your traditional Chuckian style, it's the most
> bang-for-buck (in terms of lines of code) I could get out of Chuck in a
> short session.
>
> Comments most welcome.
>
> Enjoy!
>
> -Mike
>
> http://michaelclemow.com
> http://semiotech.org
>
>
>
>
>
> On Wed, May 23, 2012 at 11:51 AM, Robert Poor <rdpoor at gmail.com> wrote:
>
>> On Tue, May 22, 2012 at 3:19 PM, Michael Heuer <heuermh at gmail.com> wrote:
>> > You might be able to hack [eval] by writing to a temp file and
>> Machine.add'ing it.
>>
>> That is sooo deliciously nasty, and I don't see why it couldn't work.
>> I wish I'd thought of it.
>> _______________________________________________
>> chuck-users mailing list
>> chuck-users at lists.cs.princeton.edu
>> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
>>
>
>
> _______________________________________________
> 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/20120608/2fd3edfc/attachment.html>


More information about the chuck-users mailing list