Re: [racket] how to display formlets inside templates

2012-01-07 Thread keyd...@gmx.de
gt; you'll need to render it as a string. In the case of the result of > formlet display, that means something like > > @in[xe (formlet-display f)]{ @(xexpr->string xe) } > > or just > > @(map xexpr->string (formlet-display f)) > > Jay > > On Fri, Jan

[racket] how to display formlets inside templates

2012-01-06 Thread keyd...@gmx.de
Hi, sorry for coming with a web server-related question again already, but I have problems figuring out how to display formlets inside templates. I've tried several ways, the latest being: ... (send/suspend/dispatch (lambda (make-url) (get-main-template #:title "start"

Re: [racket] formlets with radio button & checkbox example?

2011-12-29 Thread keyd...@gmx.de
tton-formlet > (formlet > (div >,{(default #"default" (radio-group (list #"Chocolate" #"Vanilla" > #"Strawberry") "flavor")) . => . ci} ) > (list ci))) > > Hope this helps, > > Shad > > On 12/27/2011 3:20

Re: [racket] formlets with radio button & checkbox example?

2011-12-29 Thread keyd...@gmx.de
Jay, > > Such radio groups have not yet been implemented, it should be > straight-forward to do so though. You could look at the code in > > https://github.com/plt/racket/blob/master/collects/web-server/formlets/input.rkt > > around multiselect-input for a way to do it. thanks for the pointer

Re: [racket] formlets with radio button & checkbox example?

2011-12-27 Thread keyd...@gmx.de
gt;(binding:form #"input_1" #"false"))) > (show-example (list (binding:form #"input_0" #"true") >(binding:form #"input_1" #"false") >(binding:form #&quo

Re: [racket] formlets with radio button & checkbox example?

2011-12-26 Thread keyd...@gmx.de
Hi, it's me again, and whereas I don't know how dumb I am I sure might have been a bit lazy :-; Unfortunately, even after taking a bit more time, I don't know how it works. Lastly, I've been trying this, which displayed fine: (define f-choose-db (let ((o (radio #"orcl" #t)) (r (radio

[racket] formlets with radio button & checkbox example?

2011-12-25 Thread keyd...@gmx.de
Hi all, could someone perhaps point me to a simple formlet example including not just text inputs, but also radio buttons and check boxes? >From the formlet syntax shown in Continue and the Formlets chapter, >unfortunately I have problems understanding how the syntax for radio buttons >and chec

Re: [racket] Poll: Does anybody besides Doug use 'plot'?

2011-09-30 Thread keyd...@gmx.de
Hi Neil, may I ask when you plan to officially release it? (Looking forward to "having all in one place" instead of updating from github :-;) Thanks, Sigrid _ For list-related administrative tasks: http://lists.racket-lang.org/listinfo/users

Re: [racket] db independence [was: something else]

2011-08-22 Thread keyd...@gmx.de
Hi Matthias & Ryan & all, > > > Sigrid, this sounds like a context-dependency. That is, you use the same > language (in the sense of API) but depending on the DB to which you bind the > meaning is subtly different with implications for correctness and > performance. > > I am wondering whet

Re: [racket] Racket in the large

2011-08-21 Thread keyd...@gmx.de
Hi Neil, hi all, >> > > Regarding Oracle and DB2, I suspect that anyone invested in one of those > could use some of the open source Racket interfaces for other RDBMSs as > examples for supporting another RDBMS. The cost might be relatively > minor (considering the large existing investment

Re: [racket] PLoT - is there a way to have a non-numeric, categorical x-axis (and possibly display histograms)?

2011-07-27 Thread keyd...@gmx.de
1 um 02:59 schrieb Doug Williams: > Let me know if there is anything I can help you with. > > > On Friday, July 22, 2011, keyd...@gmx.de wrote: > > Hi Doug, > > > > thanks for the pointer! I didn't know the science collection before, but > > now I see the

Re: [racket] PLoT - is there a way to have a non-numeric, categorical x-axis (and possibly display histograms)?

2011-07-22 Thread keyd...@gmx.de
1 um 19:05 schrieb Doug Williams: > The science collection has histograms and extensions to the PLoT > package for them. The x-axis is numeric. But, you can look at the code > and see how to extend the PLoT package plots. > > Doug > > On Friday, July 22, 2011, keyd...@gmx.de w

[racket] PLoT - is there a way to have a non-numeric, categorical x-axis (and possibly display histograms)?

2011-07-22 Thread keyd...@gmx.de
Hi, I'd like to know if using PLoT, there is any way to have the x-axis values being categories (like e.g., weekdays...), and having the x-axis labeled accordingly? Ideally, it's histograms I'd like to show, but I assume this is not possible, or is it somehow? Many thanks for your help, Sigri

Re: [racket] FFI question: problem passing a cstruct to a function for output

2011-07-22 Thread keyd...@gmx.de
Hi Thomas, many thanks for your reply! > > > the declaration of the wrapper function looks correct. For the ind_ptr > argument you could actually pass an array of booleans instead of some > structure, I might try this instead, and see if I get the same error ... But I find your arguments aga

[racket] FFI question: problem passing a cstruct to a function for output

2011-07-20 Thread keyd...@gmx.de
Hi all, sorry I'm coming with an FFI question again ... I am stuck with an error passing a cstruct to a function for output, but unfortunately I'm not sure the problem is in my Racket code (I'd hope so, because in that case, I might hope for some help :-;) I need to define a function boolean

Re: [racket] FFI question: 0 microseconds returned from gettimeofday call

2011-07-17 Thread keyd...@gmx.de
Hi Thomas, thanks again for your "lecture in c thinking", this is very helpful for someone who made her way into programming, and IT in general, starting with Java 5 and Racket (pardon me, it used to be called scheme then :-; ) :-) >> > > Correct, the caller has to provide a storage location

Re: [racket] FFI question: 0 microseconds returned from gettimeofday call

2011-07-17 Thread keyd...@gmx.de
Just out of curiosity, I also ran my original code on a manually compiled 32-bit version of DrRacket I have, and there it indeed worked fine :-;) So, thanks again! Sigrid Am 16.07.2011 um 02:40 schrieb Jon Zeppieri: > On Fri, Jul 15, 2011 at 4:28 PM, keyd...@gmx.de wrote: > > [sn

Re: [racket] FFI question: 0 microseconds returned from gettimeofday call

2011-07-15 Thread keyd...@gmx.de
Hi Thomas, thanks a lot for your quick answer! > :-/ Perhaps _long or _intptr would be a better choice than _int, since > they would adapt to the system's word size, which is more likely to be > right everywhere than _int that is always 32 bits wide, according to the > Racket documentation, but

[racket] FFI question: 0 microseconds returned from gettimeofday call

2011-07-14 Thread keyd...@gmx.de
Hi, I am kind of stuck trying to get the current microsecond from gettimeofday... and I wonder how best to systematically approach the question of what racket datatype to choose when defining a FFI function. From the man page I see that timeval is defined as struct timeval { time_

Re: [racket] FFI question again - how to get a string back from C

2011-06-12 Thread keyd...@gmx.de
Hi Thomas, thanks a lot for your char * vs char** explanation! > > But if there is no sure way to guess the correct buffer size before > the function call, your only failsafe option is to invoke the function > repeatedly with increasing buffer sizes as long as it reports > failure. I see... but

Re: [racket] FFI question again - how to get a string back from C

2011-06-11 Thread keyd...@gmx.de
Hi Thomas, thank you, too, very much for your solution! I had already successfully tried Ryan's way, but it's always good and instructive to learn several ways - now I know 2 ways to allocate a byte buffer and to cast it to a string afterwards :-) I've tried your solution, and it worked perfect

Re: [racket] FFI question again - how to get a string back from C

2011-06-11 Thread keyd...@gmx.de
he database talked to by the c library... :-) ). But this is something I have to investigate. Many thanks again for your help! Sigrid Am 11.06.2011 um 12:16 schrieb Ryan Culpepper: > On 06/11/2011 12:54 AM, keyd...@gmx.de wrote: >> Hi again, >> >> sorry for again asking such a b

[racket] FFI question again - how to get a string back from C

2011-06-10 Thread keyd...@gmx.de
Hi again, sorry for again asking such a basic FFI question, but I have a problem getting an output string from the C side... E.g. in one case, in my first attempt (def-ocilib datetotext OCI_DateToText : (date_ptr : _pointer) (fmt : _string) (size : _int) (strval : (_ptr o _string)) -> (result

Re: [racket] FFI: problems using (_list i _string)

2011-06-07 Thread keyd...@gmx.de
Hi Thomas again, for time reasons, I'm answering the second (or rather, first) part of your mail separately :-; Just wanted to say that your code suggestion > > > (define (string-list->fixed-width-array width items) >(string-join (map (cut string-pad-right <> width #\null) items))) was

Re: [racket] FFI: problems using (_list i _string)

2011-06-05 Thread keyd...@gmx.de
Hi Thomas, thanks a lot for your answer! > > if dtext is actually an alias for char, as you write, then the > signature of the C function implies that it expects a string, not a > list of strings, as its third argument. Oh, you are right, of course! I was mislead by the integer case, where ind

[racket] FFI: problems using (_list i _string)

2011-06-04 Thread keyd...@gmx.de
Hi all, I have a problem with FFI which is certainly due to my lack of experience with c, and would very much appreciate any help. I am using (_list i _string) to pass an array of strings to a c function, but all that ends up on the other side seems to be "nonsense" / random characters. The c f

Re: [racket] Racket on Centos 5

2011-04-03 Thread keyd...@gmx.de
> >>> The cairo_clip_extents() function is used to implement the `is-empty? >>> method of region%, for which I can find no uses anywhere in the Racket >>> source tree. >>> >>> So, if you change "collects/draw/unsafe/cairo.rkt" around line 124 to >>>

Re: [racket] Racket on Centos 5

2011-03-30 Thread keyd...@gmx.de
Hi Erich, thanks for the hint - this is a VERY cool tool indeed! Good to know even in case it won't work in my current circumstances...! Unfortunately I don't have much time to invest today - I just made a short test and discovered that while my Linux "source" is 64bit, my VirtualBox RedHat ap

Re: [racket] Racket on Centos 5

2011-03-30 Thread keyd...@gmx.de
, it'd be good to know what to do! Ciao, Sigrid Am 29.03.2011 um 11:27 schrieb Noel Welsh: > On Tue, Mar 29, 2011 at 10:22 AM, keyd...@gmx.de wrote: >> The one executable I got to start without errors (that is to say, I tried >> mred too, it started but with errors) was mre

Re: [racket] Racket on Centos 5

2011-03-29 Thread keyd...@gmx.de
(_ptr o _double)) >-> _void >-> (values x1 y1 x2 y2)) >;; Adding this part: >#:make-fail make-not-available) > > does that fix the problem, or are there other missing functions? > > > At Mo

Re: [racket] Racket on Centos 5

2011-03-28 Thread keyd...@gmx.de
Hi, I've encountered the exactly same problem today, running on Oracle Linux (= Red Hat 5.5, approximately)... Would anyone know a workaround for this, or if any not-too-outdated racket version would run with the old libcairo version? Unfortunately I have no alternative to installing racket on

[racket] handling "private" objects in FFI

2011-03-20 Thread keyd...@gmx.de
Hi all, I've just started trying to use the FFI, and although I'm much afraid that being a person without any C programming experience and never having used a FFI either, I might not get too far with it, I don't want to give up early :-; The first "bigger" problem that comes up is,- I wonder h

[racket] typed/rackunit

2010-12-03 Thread keyd...@gmx.de
Hi, just a short question regarding testing in typed racket - might it be that I can use #lang typed/racket (require typed/rackunit) to write "simple checks" with check-equal? etc., but that test-case. test-suite etc. are not intended for general usage yet (although they seem to be provided i

Re: [racket] what initial velocity to use when calculating velocity from acceleration (peripherally moby-related...)

2010-12-01 Thread keyd...@gmx.de
Thanks a lot to all of you for your hints and pointers to such interesting information! In fact for practical purposes, I will experiment with GPS first and see how this works (from a first impression, the acceleration data from the phone seem extremely "hyper-sensitive", so it might anyway tur

Re: [racket] recommendations how to use Typed Racket with rackunit?

2010-11-30 Thread keyd...@gmx.de
.. Could you perhaps point me to another way of running tests with typed racket, so I wouldn't need the no-check? (I mean writing, not running, I don't need any fancy GUI :-;) Many thanks, Sigrid Am 30.11.2010 um 02:47 schrieb Sam Tobin-Hochstadt: > On Mon, Nov 29, 2010 at 3:2

[racket] what initial velocity to use when calculating velocity from acceleration (peripherally moby-related...)

2010-11-29 Thread keyd...@gmx.de
Hi, this is rather off topic, but as I can't find any useful information googling and know the nice and helpful people on this list, I try asking :-) (Also, it's peripherally related as it's about calculating velocity from a smartphone's acceleration data using moby :-;) To calculate velocity

Re: [racket] recommendations how to use Typed Racket with rackunit?

2010-11-29 Thread keyd...@gmx.de
> > I would keep using `define-struct:' for the time being; I'll > investigate why this isn't working. It isn't obvious at first glance, > but the `struct:' code is doing some complicated tricks. I was already suspecting that struct: must somehow be different from define-struct: in TR, because

[racket] recommendations how to use Typed Racket with rackunit?

2010-11-28 Thread keyd...@gmx.de
Hi, changing some typed racket code from using define-struct: to struct:, I have problems getting my test code to run. While still using define-struct:, I had a language specification of #lang typed/racket/no-check, because omitting the "no-check" I was getting the Type Checker: Error in macro

Re: [racket] moby: problem running on-tick and on-acceleration simultaneously on android

2010-11-23 Thread keyd...@gmx.de
> It might be that the velocity calculations really need to be done from > the Java side of things to get the right performance. If that's the > case, I can sketch out the extensions to Phonegap. Perhaps my question was a bit too rash, I should perform some more tests before (at least before ca

[racket] moby: problem running on-tick and on-acceleration simultaneously on android

2010-11-22 Thread keyd...@gmx.de
Hi, on my phone, when I use on-acceleration (updating every 0.1 seconds, as is the default in moby's phonegap fork) and on-tick (delay = 1sec) together, on-tick gets extremely slowed down, that is, completely unusable... Does anyone have a similar experience, and perhaps an idea what to do here?

Re: [racket] howto-like text about writing DSLs?

2010-11-11 Thread keyd...@gmx.de
Hi Eli, thanks a lot for the hint! This looks exactly like the kind of introduction I was looking for :-) ciao Sigrid Am 11.11.2010 um 19:52 schrieb Eli Barzilay: > You can also try this http://tmp.barzilay.org/tutorial.txt for a more > gentel introduction to making up languages -- though it

Re: [racket] howto-like text about writing DSLs?

2010-11-11 Thread keyd...@gmx.de
Hi Matthias, hi all, > We are concerned with the production of complex DSLs and haven't made the > production of easy DSLs -- like the one you see on Linkedin -- easy. > Yes, I understand that. It makes me think of my general experience with the Racket documentation - even with the Guide, wh

Re: [racket] howto-like text about writing DSLs?

2010-11-10 Thread keyd...@gmx.de
b Grant Rettke: > On Wed, Nov 10, 2010 at 2:50 PM, keyd...@gmx.de wrote: >> does anyone know of a tutorial / howto - like text regarding writing DSLs? >> I've read the "creating languages" chapter in the racket guide, but while I >> find it "technically und

[racket] howto-like text about writing DSLs?

2010-11-10 Thread keyd...@gmx.de
Hi, does anyone know of a tutorial / howto - like text regarding writing DSLs? I've read the "creating languages" chapter in the racket guide, but while I find it "technically understandable" I'm a bit at a loss as to "what to do in order to reach which goal" - the chapter explains the technical

Re: [racket] moby/phonegap/android: use acceleration or geolocation to derive velocity?

2010-11-03 Thread keyd...@gmx.de
That sounds good! Then I should definitely try and compare both measures! Thanks, Sigrid > > GPS is very precise for differential measurements. It's the absolute > accuracy that lets you down. > > Anthony _ For list-related administrative task

Re: [racket] moby/phonegap/android: use acceleration or geolocation to derive velocity?

2010-11-03 Thread keyd...@gmx.de
n't /really/ know, but isn't one reading from the accelerometer > > and the other from GPS? The answer depends, I think, on the distance > > over which you want to operate. If you want velocity from, e.g., hand > > movements, the accelerometer is the way to go. If you wa

Re: [racket] moby/phonegap/android: use acceleration or geolocation to derive velocity?

2010-11-02 Thread keyd...@gmx.de
nds, I think, on the distance > over which you want to operate. If you want velocity from, e.g., hand > movements, the accelerometer is the way to go. If you want velocity > over large scale (metres, kms) use GPS. > > HTH, > N. > > On Tue, Nov 2, 2010 at 5:52 PM, keyd...@gmx.d

[racket] moby/phonegap/android: use acceleration or geolocation to derive velocity?

2010-11-02 Thread keyd...@gmx.de
Hi, I am wondering how best to calculate velocity in a moby/phonegap/android application. In general, would anyone have experience (or intuition) whether velocity might better be calculated from the acceleration values delivered by phonegap's Acceleration object, or directly be extracted from t

Re: [racket] problems running moby from source

2010-10-31 Thread keyd...@gmx.de
Hi Danny, thanks for the information, I will definitely check it out! Speaking of "checking out", should I check out the 'mzc' branch to be able to more conveniently inspect the code from under the 'phone' directory, or will this be merged into the 'master' branch? (I've only worked with cvs and

Re: [racket] problems running moby from source

2010-10-29 Thread keyd...@gmx.de
imagine helping develop the Android interface code further (like e.g. for the "location" stuff I mentioned) if that was welcome :-) Ciao, Sigrid > > -- > > Message: 2 > Date: Tue, 26 Oct 2010 22:54:17 +0200 > From: "keyd...@gmx.de"

Re: [racket] problems running moby from source

2010-10-26 Thread keyd...@gmx.de
Hi Danny, thanks a lot for the explanation,- it worked fine, and this is very cool! But you know, the reason I wanted to look into the source was that as a new and proud I-never-thought-I'd-buy-something-like-that-in-my-life owner of an Android smartphone, I wanted to look into how Moby interfa

[racket] problems running moby from source

2010-10-25 Thread keyd...@gmx.de
Hi, I've installed moby from git and am following steps 5.3 and 5.4 from the documentation. However, I get the following errors: $ ./bootstrap-js-compiler.ss ./bootstrap-js-compiler.ss: line 3: syntax error near unexpected token `only-in' ./bootstrap-js-compiler.ss: line 3: `(require (only-in

Re: [racket] [plt-scheme] Re: Typed scheme: Cannot apply expression of type Procedure, since it is not a function type

2010-06-12 Thread keyd...@gmx.de
> > Have you read the Guide? Caught again :-; Well I guess that when I first got acquainted with PLT scheme (in 2008 I think), having read (or reading in parallel) SICP, the former edition of Dybvig's book on scheme (or rather, the first parts of it) and perhaps some other stuff I don't reme