You might find the 'box-cas!' procedure useful for this -- it performs an
atomic update on a single box.
Sam
On Jun 15, 2013 9:16 PM, "Daniel Prager" wrote:
> I've added my Racket solution to the Atomic Updates task. See
>
> http://rosettacode.org/wiki/Atomic_updates
>
> I'd be interested i
I've added my Racket solution to the Atomic Updates task. See
http://rosettacode.org/wiki/Atomic_updates
I'd be interested in suggestions on how to improve this solution,
especially by drawing on existing facilities in Racket to construct a more
elegant approach (or approaches) than the hand
With
(fun _string -> _void)
keep in mind that `_string' means that a Racket-level Unicode string is
converted (by UTF-8 encoding) to a newly allocated array of bytes.
Nothing that you do to with Racket string affects the memory management
of the allocated bytes.
The byte string is allocated as
On Jun 15, 2013 4:45 AM, "Neil Van Dyke" wrote:
>
> Anyone know whether Naughty Dog used Racket or other Lisp-descended
language in development of their new game, "The Last of Us"?
Yes, they're still using Racket. A few of the Naughty Dog developers hang
out in the #racket IRC channel and have me
On Sat, Jun 15, 2013 at 02:15:04PM +0200, Laurent wrote:
> On Sat, Jun 15, 2013 at 1:55 PM, Roman Klochkov wrote:
>
> > What about
> >
> > (define-lib foo (fun _string -> _void))
> >
> > (foo "Test")
> >
> > ?
> >
> > Will be the pointer from string "Test" freed?
> >
>
> I *think* Racket will ga
inner is for Beta-style inheritance, which is the dual of the typical way to do
inheritance. Instead of having overriding methods that take precedence and can
use super to call the base method, the base method has precedence and can call
subclass methods using inner.
The best is to look at this
On Sat, Jun 15, 2013 at 1:55 PM, Roman Klochkov wrote:
> What about
>
> (define-lib foo (fun _string -> _void))
>
> (foo "Test")
>
> ?
>
> Will be the pointer from string "Test" freed?
>
I *think* Racket will garbage collect the "Test" value when it is not used
anymore on the Racket side, but it
What about
(define-lib foo (fun _string -> _void))
(foo "Test")
?
Will be the pointer from string "Test" freed? And how to make it retain, if I
need to save it on the foreign side?
Суббота, 15 июня 2013, 13:29 +02:00 от Laurent :
>You probably want `register-finalizer':
>http://docs.racket
You probably want `register-finalizer':
http://docs.racket-lang.org/foreign/foreign_pointer-funcs.html#%28def._%28%28lib._ffi/unsafe..rkt%29._register-finalizer%29%29
See also:
http://docs.racket-lang.org/foreign/Allocation_and_Finalization.html
Regarding the default behavior, I think Racket does
When I describe type
(_fun _string -> _string)
where can I put, whether these string c-pointers should be freed after function
call? Also, what is default behavior?
--
Роман Клочков
Racket Users list:
http://lists.racket-lang.org/users
Anyone know whether Naughty Dog used Racket or other Lisp-descended
language in development of their new game, "The Last of Us"?
(For anyone not exposed to video game industry news, this game is highly
acclaimed, and has lots of buzz right now:
"http://en.wikipedia.org/wiki/The_Last_of_Us#Rece
11 matches
Mail list logo