On Wednesday, October 14, 2015 at 12:30:54 AM UTC, Daniel Feltey wrote:
> Some of the verbosity of units can be reduced using the "inference" features
> that Racket's unit system provides.
Hmm, I gave it a shot, and this seems to work. Not sure if it'd be especially
useful. But fwiw
--
You rec
> I just never found any good docs on how to do that. Near as I can tell,
runtime linking of a unit is even MORE verbose and persnickety than just
> manually typing in all the procedures you want to pass to a callback
Some of the verbosity of units can be reduced using the "inference"
features t
On Tuesday, October 13, 2015 at 11:40:12 PM UTC, Alexis King wrote:
> units
Oh uh, conceivably you could have "code" that provided a live session object on
linking, and handled session refreshing internally, then just link that with
units that have session dependant code. I just never found any
I usually prefer to do something like for the `roomba` object in
"http://www.neilvandyke.org/racket-roomba/";.
See how there's a `current-roomba` Racket parameter, which provides a
default value for the `#:roomba` optional argument for each procedure.
So, users of the code can pass around the
On Tuesday, October 13, 2015 at 11:40:12 PM UTC, Alexis King wrote:
> Have you taken a look at parameters?
Short answer: yes. Long answer: they're convenient thread-local globals, but
still feel like globals to me.
(define a (make-parameter 0))
(define (called-at-hopefully-regular-intervals)
(
Have you taken a look at parameters?
http://docs.racket-lang.org/guide/parameterize.html
http://docs.racket-lang.org/reference/parameters.html
There is also a way to “link units at runtime”, conveniently called “units”.
http://docs.racket-lang.org/guide/units.html?q=unites#%28tech._unit%29
http:
How do you deal with long-term state that your programming logic depends on,
but is only available at run-time? A persistent connection to a database, or an
RPC server for instance, or a logged in user account. Do you use parameters?
Session objects? Just raw globals? Or something stranger?
Thi
7 matches
Mail list logo