On 2015-01-21 07:55, rvdalen . wrote:
> [...]
> When reading the Racket documentation, I could not find 'define/protected'.
> What is the idiomatic way in racket to share a method between
> sub-classes without making the shared method public?
> [...]
Hello,
there is a syntactic form called define
On 2013-12-12 17:53, Jan Wedekind wrote:
> [...]
> However when doing embedding there is no single 'run' method to
> pass to 'scheme_main_setup'. Is there another simple way to do that?
> [...]
Hello,
it is probably a bad idea to use any setup that doesn't have a single
"run" method! If you reent
On 2013-10-25 14:29, Konrad Hinsen wrote:
> [...]
> A quick Google search led me to
>
> http://en.wikibooks.org/wiki/F_Sharp_Programming/Units_of_Measure
>
> which says
>
>"Important: Units of measure look like a data type, but they
> aren't. .NET's type system does not support the be
On 2013-10-25 12:14, Konrad Hinsen wrote:
> [...]
> In fact, the only approaches
> I know of that use static type checking are Boost.Units for C++
> (http://www.boost.org/doc/libs/1_54_0/doc/html/boost_units.html),
> and the units package for Haskell (http://hackage.haskell.org/package/units).
> [.
Hello,
during the development of the PLaneT package for protocol buffers [1] a
likely bug in Racket's standard library function path-replace-suffix has
shown up [2].
When you apply path-replace-suffix to a path that is not native to the
platform on which Racket is running, the procedure strips al
On 2013-07-11 00:03, Sean McBeth wrote:
> [...]
> The opposite side of this coin: a game I started writing in Microsoft
> XNA, that I am still terribly keen to complete, but now XNA is a dead
> platform. So *technological progress made the underlying API obsolete,
> /but not the project itself/* (i
On Fri, 15 Feb 2013, Norman Gray wrote:
On 2013 Feb 15, at 00:30, Matthew Flatt wrote:
At Thu, 14 Feb 2013 13:42:38 +, Norman Gray wrote:
[...]
What I _want_ to do here is basically execv(3) vi from a Racket program.
[...]
The `system' function uses threads as needed to pump from
non-f
Hello,
your code looks fine to me.
On my virtualized installation of Windows XP it runs flawlessly and the
call to SendMessageTimeoutW returns with (= r4 1), which is a successful
result according to the Win32 API documentation [1]. The result of
GetLastError is meaningless in that context, s
On Fri, 18 Jan 2013, herak...@gmx.de wrote:
[...]
(define ENV (cast "Environment" _string/utf-16 _intptr))
[...]
But in Racket when I call the function:
(define-values ( r4 res4) (SendMessageTimeoutW HWND_BROADCAST
WM_SETTINGCHANGE
On Mon, 1 Oct 2012, Mikko Tiihonen wrote:
[...]
(define make-pair
(lambda (first)
(lambda (second)
(lambda (func)
(func first) second
[...]
So, select-first returns the correct result when applied directly but
returns the second argument when applied via make-pair. Also, I h
On Sun, 23 Sep 2012, Jordan Schatz wrote:
[...]
For awhile now the webserver spits out abunch of these messages:
peek-byte: input port is closed
context...:
/home/jordan/bin/lib/racket/collects/web-server/private/dispatch-server-unit.rkt:74:2:
connection-loop
I think it only happens when
On Thu, 20 Sep 2012, Asumu Takikawa wrote:
On 2012-09-21 00:54:10 +0200, Thomas Chust wrote:
the documentation for the racket/stream module states that lists can
be used as streams transparently and stream? returns #t when applied
to a list. However, some of the functions operating on streams
On Thu, 20 Sep 2012, Danny Yoo wrote:
[...]
Other functions that don't work with lists are stream-length, stream-ref,
stream-tail, stream-append, stream-filter? and stream-add-between.
[...]
Yeah, this appears to be a bug in 5.3. But it does appear to be
corrected in the development version o
Hello,
the documentation for the racket/stream module states that lists can be
used as streams transparently and stream? returns #t when applied to a
list. However, some of the functions operating on streams fail when
applied to lists. For example:
$ racket
Welcome to Racket v5.3.
-> (
Hello,
as usual, a "portable" variant of the 32bit Windows binaries of the shiny
new Racket version can be found at
https://bitbucket.org/chust/racket-portable/
Ciao,
Thomas
--
When C++ is your hammer, every problem looks like your thumb.
smime.p7s
Description: S/MIME Cryptographic Signa
Harry Spier wrote:> Intel has an "integrated Performance Primitives" library
> see: http://software.intel.com/en-us/articles/intel-ipp/
> which is optimized for intel processors and has a C interface.
>
> Can the FFI interface to this?
> [...]
Hello,
from a quick look at the API documentation I
Freezerburn wrote:
> [...]
> I know I can define a _my_c_struct-pointer, but
> how do I make a pointer to that pointer to pass to the C function?
> [...]
Hello,
you probably want an output parameter created using a
(_ptr o _my_c_struct-pointer)
argument type specification in the binding of th
On Sun, 2012-04-15 at 17:13 +0200, Rüdiger Asche wrote:
> [...]
> in my Racket code, I need to crypt/decrypt chunks of data using the
> AES algorithm. I couldn't find anything in the docs about encryption
> support; did I miss something or hasn't this been done yet? If it has,
> does anyone have a
On Sun, 2012-03-18 at 14:38 -0400, jkaczo...@aol.pl wrote:
> Could anyone explain me how to create objects and their instances?
> [...]
Hello,
first you have to create a class. An empty class definition might look
like this:
(define foo%
(class object%
(super-new)))
Note that a clas
On Sun, 2012-03-11 at 22:00 +0100, Rüdiger Asche wrote:
> [...]
> So what made you think that defines within modules are inlined? Is it a doc
> bug, or were you looking at something else than liberal expansion that needs
> additional work? What does it take for define to translate into
> define-
On Fri, 2012-03-09 at 06:06 -0500, Neil Van Dyke wrote:
> [...]
> I meant that all-caps was appropriate for CPP macros because of the
> grievous syntactic breakage, such as unbalancing grouping token pairs,
> and worse.
> [...]
Hello,
yes, that's certainly less of an issue in a world of hygieni
On Fri, 2012-03-09 at 05:48 -0500, Neil Van Dyke wrote:
> First of all, sounds like you have a substandard C compiler, and that
> you must be targeting a 4-bit microcontroller. :)
> [...]
Hello,
unfortunately, crazy proprietary microcontrollers do tend to have
sub-standard compiler support ;-)
On Fri, 2012-03-09 at 05:16 -0500, Neil Van Dyke wrote:
> [...]
> CPP macros can cause many kinds of grievous syntactic breakage and
> surprising bugs, and so all-caps as a warning is a great idea; Java
> constants, on the other hand, are one of the safest constructs.
> [...]
Hello,
although slig
On Fri, 2012-03-09 at 10:39 +0100, Rüdiger Asche wrote:
> [...]
> I need a counterpart for the C #define statement, meaning a way to
> textually replace every instance of id at preprocessor time with its
> defined value, as in
> [...]
Hello,
in most cases you should probably simply use a regu
2012/1/19 Jonathan Schuster :
> [...]
> Does anyone know if there's some sort of browser module in Racket that would
> fulfill my needs? Specifically, it should send some sort of signal/event to
> my program every time it navigates to a new page, and should provide the URL
> on each navigation.
> [
2011/11/17 José Lopes :
> [...]
> Is there a units/measures library with metres (m), kilometres (km)
> and so on?
> [...]
Hello,
while I don't know of such a project implemented in Racket, I use this
C library sometimes, which does a decent job for unit parsing and
conversions:
http://www.unid
2011/10/29 Norman Gray :
> [...]
> Is there a recommended way to detect whether racket is a 32- or
> 64-bit executable?
> [...]
Hello Norman,
while I don't know whether this strategy is particularly
recommendable, I would suggest to use utilities from the FFI module:
(require (only-in ffi/unsa
2011/10/14 Ankur Sethi :
> [...]
> I've been wondering what the postfix hash syntax does. This is what
> happens when I append a # to an integer:
>
> > 9#
> 90.0
> > 9##
> 900.0
> > 9#
> 90.0
> [...]
Hello,
if I'm not mistaken, this syntax was introduced by R5RS to indic
2011/10/14 Rodolfo Carvalho :
> On Thu, Oct 13, 2011 at 22:28, Neil Van Dyke wrote:
>>
>> I'm wondering, if the students need to use lab computers rather than their
>> own computers, whether there's a real need for a bootable version of
>> DrRacket on little USB flash drives. So, if the lab PCs p
2011/9/25 Nadeem Abdul Hamid :
> [...]
> This hangs even with the printf("Hello World\n") outputting a newline.
> But if I add fflush(stdout); in the C program after the printf it
> works.
> [...]
Hello,
the default buffering behaviour of the C stdio functions usually
depends on whether output go
Eli Barzilay wrote:
> Racket version 5.1.2 is now available from
>
> http://racket-lang.org/
> [...]
Hello,
the Racket Portable package, for those who want to carry a Win32 Racket
installation on removable media, has been updated to the new version:
https://bitbucket.org/chust/racket-portab
keyd...@gmx.de wrote:
> [...]
> I need to define a function
>
> boolean OCI_GetStruct (OCI_Resultset * rs, void * row_struct, void *
> row_struct_ind)
>
> that takes 2 structs for output, and these have to be generic structs, not
> some define-cstruct defined concrete type; so I've tried passi
keyd...@gmx.de wrote:
> [...]
> Well in this case in fact, I was happy with the result, the 1 looked fine
> given we're having daylight saving time :-;
> [...]
Hello Sigrid,
sure the one is fine, but I think this field really never contains
anything else than 1 when DST is in effect or 0 when it
Eli Barzilay wrote:
> Three hours ago, Mark Engelberg wrote:
>> On Thu, Jul 14, 2011 at 4:35 AM, Thomas Chust wrote:
>>> While Clojure *mitigates* the problems of non-hygienic macros
>>> using namespaces and a shorthand syntax for freshly generated
>>> identifi
keyd...@gmx.de wrote:
> [...]
> In fact I'd assume that using _int for suseconds_t should work fine, too,
> given that man even tells us that
>
> "The values in timeval are opaque types whose length may vary on different
> machines; depending on
> them to have any given length may lead to e
Markku Rontu wrote:
> [...]
> I'm sure the section 11 does go through the relevant issues, but doesn't
> feel like a good introduction to the matter. I can theorise that I can
> manipulate these syntax objects with plain old functions but nowhere
> does it seem to show a complete useful case. What
Markku Rontu wrote:
> [...]
> On the topic of macros, I find it a bit confusing that to metaprogram in
> Racket, I must use such a different language of macros (with
> syntax-rules et al.), instead of being able to manipulate common data
> structures with plain old Racket functions.
> [...]
Hello,
2011/6/22 José Lopes :
> [...]
> Is there a way of interfacing with Racket from a .NET language? I
> would like to write a program in F# to use the libraries I have in
> Racket.
> [...]
Hello José,
there is no direct link between the CLR and the Racket
runtime. Therefore you have two options:
2011/6/13 Stephan Houben :
> [...]
> I have code like this which dispatches on
> the type of a homogenous vector:
> [...]
> I was wondering if there is a more efficient way to
> do this, one which doesn't involve a linear scan
> over all possible types. I presume that at the C level
> there is a "t
2011/6/12 keyd...@gmx.de :
> [...]
> In fact to be honest, I do not really understand the reason why I
> have to allocate a byte buffer here - what difference does it make
> to a char **, shouldn't both just be consecutive places in memory
> filled with ascii characters
> [...]
Hello Sigrid,
a by
2011/6/11 keyd...@gmx.de :
> [...]
> I have a problem getting an output string from the C side...
Hello Sigrid,
it would be helpful if you mentioned the signature of the original C
function, otherwise it is hard to decide whether your binding's
signature is correct.
I will assume that the functi
2011/6/5 keyd...@gmx.de :
> [...]
> In some example c code available, the argument actually is a
> two-dimensional array of chars, which then of course is passed as a
> pointer to char, and I guess the separation of strings is achieved
> by the null-termination of c strings then...
Hello Sigrid,
2011/6/5 keyd...@gmx.de :
> [...]
> The c function is described as
> boolean OCI_BindArrayOfStrings(OCI_Statement * stmt, const mtext * name,
> dtext * data, unsigned int len, unsigned int nbelem)
> where mtext and dtext are aliases for char, the way the library was
> compiled, the second-but-last
Hello,
recently I had to work from different Windows machines carrying my
data and programs around on a USB drive. Of course I couldn't live
without a decent programming language available, so I put together a
"portable" package of Racket, where "portable" means that the whole
installation folder
2011/4/1 Charles Hixson :
> [...]
> I'm trying to determine whether the last non-whitespace character of a
> string is a colon, and I haven't been able to figure out the best way of
> doing this. In python I'd just trim the string and look at the character
> before the end,
> [...]
Hello,
well,
2011/2/16 Noel Welsh :
> This could be very useful for testing web applications. How tied to
> GTK is it? (I.e. what would it take to run on other platforms?)
> [...]
Hello Noel,
the JavaScriptCore bridge is completely independent of any Gtk+ or
GObject code. The GUI code, however, relies heavily
Hello,
over the past few days I have hacked together a small Racket binding
for the Gtk+ WebKit port. It allows you to use a "browser" as a widget
in a Racket GUI, to embed Racket GUI elements as "plugins" in a web
page and to interact with JavaScript objects on a web page as if they
were Racket v
2011/2/6 Jukka Tuominen :
> [...]
> I slightly modified the Manfred's code to capture the output
> [...]
Hello,
the code seems somewhat more complicated than necessary to me and it
lacks some cleanup and error handling. I would suggest to use the
available utilities from racket/port to simplify t
2011/2/6 Manfred Lotz :
> [...]
> I don't know how to merge stdout and stderr in proper sequence.
> [...]
There is no such thing as proper sequencing of data flowing through
different streams.
Due to buffering in system libraries and the operating system kernel
it is also entirely impossible to r
2011/2/6 Jukka Tuominen :
> [...]
> One more requirement that I forget to mention is that it should also
> be possible to handle "expect" type of "automated conversations".
> [...]
Hello,
if you want I/O redirection, you should, for example, use the
procedure process [1] instead of system.
> [..
2011/2/6 Jukka Tuominen :
> [...]
> I'm trying to embed multiline shell scripts within a scheme function, but
> I'm not quite sure how to do it.
> [...]
I just tried it and the procedure system [1] seems to have no problems
executing multiline scripts passed to it.
Ciao,
Thomas
[1]
http://docs
2011/1/17 Milan Markovic :
> [...]
> I was wondering if I could save a plot directly to an image file without
> having to "fish" it out of the REPL and right click.
> [...]
Hello Milan,
plot views support the convertible protocol. Try something like this:
#lang racket/base
(require file/conv
2011/1/5 Thomas Chust :
> 2011/1/5 Matthew Flatt :
>> [...]
>> I've added `get-client-handle' to `window<%>', which you should use
>> in this case instead of `get-handle'.
>> [...]
> [...]
> I'll wait for the next nightly build and t
2011/1/5 Matthew Flatt :
> I see... You need `get-client-handle', which returns the inner widget
> of a window rather than the outer one. (There are two layers to a
> `panel%' for event-handling reasons.)
>
> I've added `get-client-handle' to `window<%>', which you should use
> in this case instead
2011/1/5 Matthew Flatt :
> At Wed, 5 Jan 2011 18:04:26 +0100, Thomas Chust wrote:
> [...]
>> And even if I manually resize, show and redraw the widget using calls
>> of wrapped GTK+ functions at the REPL, it still doesn't show up in the
>> GUI.
>
> Can you send
2011/1/5 Matthew Flatt :
> The `window<%>' method `get-handle' returns the native widget for a
> window. The docs for `get-handle' are out of date, and I pull push a
> correction later today: the result for `get-handle' is now an FFI
> pointer instead of an integer, and it represents GtkWidget unde
Hello,
is it possible or even straightforward to implement the control<%>
interface of the Racket GUI libraries using a native widget? I'm
particularly interested in doing so for the GTK+ based Racket GUI
libraries.
More specifically, I'm trying to find out whether it's feasible to
create a bindi
2010/12/26 Sayth Renshaw :
> [...]
> However I don't think any value could test true therefore my function would
> always be false. I do need to double check though as my math is rusty. But
> you cannot square a number and have it retun negative can you?
> [...]
Hello Sayth,
whether that is possi
2010/11/13 김태윤 :
> [...]
> I was told by mailing list that read the racket guide unit section
> but sorry I still don't understand.
> [...]
Hello,
you have to use units here because modules do not allow mutually recursive
dependencies. An example for your situation may look like this:
--
2010/10/9 김태윤 :
> hello I am finding gaussian function in scheme but I still have no solution
> gaussian function is evaluate such as 1.123 to 1 and 312.1312 to 312 etc.
> [...]
Hello,
the term "Gaussian function" usually indicates a certain kind of distribution
used frequently in statistics and
2010/9/30 Martin DeMello :
> On Thu, Sep 30, 2010 at 3:02 AM, Thomas Chust wrote:
>> in case anybody else finds this useful: I have created fairly full-featured
>> bindings for the IUP graphical user interface library [1] that work
>> identically
>> (to the maximum
2010/9/30 Jon Rafkind :
> Does IUP use MVC (model-view-control) ? It didn't look like it from their
> API overview.
> [...]
Hello,
it doesn't, which may be somewhat less clean but makes the API a lot
easier to bind and somewhat easier to use for simple cases ;-)
I just don't know that many cross
Hello,
in case anybody else finds this useful: I have created fairly full-featured
bindings for the IUP graphical user interface library [1] that work identically
(to the maximum possible extent) under the Racket [2] and CHICKEN [3]
Scheme systems.
You can find the documentation and the version c
2010/9/23 vannadis :
> [...]
> (define (delete-entry! a-notepad id)
> (sqlite:exec/ignore (notepad-db a-notepad)
> (format "DELETE FROM notes WHERE id = '~a'" id)))
>
> but this doesn't remove anythng.
> Where i'm wrong?
> [...]
Hello,
there are two problems wi
2010/9/22 Michael Smith :
> [...]
> I am a Mac user and have just started to learn Scheme. Many apps on the Mac
> are scriptable via Applescript. Is there any Scheme way to leverage this
> capability, like an Applescript bridge?
> [...]
Hello Micheal,
it should be possible to control other Mac ap
2010/9/19 Eli Barzilay :
> [...]
> It's still not clear to me why you want a cygwin build instead of a
> plain windows build. The only thing I can think of is being able to
> handle cygwin symlinks
> [...]
I want a Cygwin build because I want FFI access to some C libraries that
are intended for a
2010/9/19 Eli Barzilay :
> On Sep 19, Thomas Chust wrote:
>> I'm interested in building Racket for Cygwin but with
>> Win32-GDI-based GUI libraries instead of X11-based GUI
>> libraries.
>> [...]
> That's likely to be very difficult, since the Windows
Hello,
I'm interested in building Racket for Cygwin but with Win32-GDI-based GUI
libraries instead of X11-based GUI libraries. The configure script doesn't
seem to allow for this setup, but since Racket already has support for Win32
GUIs and since nothing prevents a Cygwin program from calling dir
2010/9/14 Stefan Busch :
> [...]
> The teaching material I got from university gives the following exanple for
> the usage
> of amb-collect:
>
> ***
>
> ;;get all pairs of values von a and b,
> ;;which have sum 7
>
2010/9/14 Stefan Busch :
> [...]
> Your solution looked convincing to me,
> but when I try e.g.
>
> (amb list (list 1 2 3 4))
>
> it's not evaluated to the desired
>
> 1 2 3 4,
>
> but to
>
> 1.
> [...]
Hello,
I assume you meant to say (amb-list ...) instead of (amb list ...). Of course
this expr
2010/9/12 Will M. Farr :
> [...]
> amb is a macro that chooses among the results of evaluating the expressions
> it is provided, so
>
> (amb *someList*)
>
> evaluates *someList*, resulting in a list, and chooses that. You could
> define a function
>
> (define (amb-list list)
> (if (null? list)
>
2010/8/15 Richard Mittel :
> I'm trying to get read-char to read a character as soon as it is typed, but
> read-char insists on buffering the input until a carriage return is
> entered. The Racket reference says that the buffer mode is controlled by
> file-stream-buffer-mode, but it seems to have
2010/8/13 Sam Tobin-Hochstadt :
> On Fri, Aug 13, 2010 at 11:09 AM, Thomas Chust wrote:
>>
>> Which brings me to the related question whether it is actually
>> possible to define syntax-transformer-of in Racket?
>> [...]
>
> Look up `syntax-local-value', whic
2010/8/13 Matthias Felleisen :
> [...]
> 4. When you think about macros as syntax and when you realize that syntax no
> longer exists at run-time, it makes no sense whatsoever to formulate the
> question. It doesn't denote. {Conduct the following thought experiment: (map
> if '(a b) '(1 2) '(% $
2010/8/13 The Configurator :
> There must be great reasons why this would be horribly wrong, but why
> shouldn't macros and syntaxes be passed as first class objects, method
> parameters, return values etc.?
> [...]
Hello,
somehow I must be misunderstanding this question — in my eyes macros
and s
2010/7/17 gabor papp :
> [...]
> What I'm trying to do is passing a boxed variable to the FFI module, and
> when the C library changes the variable it calls the set callback, in which
> I set the content of the box.
>
> I would like to pass the box through the client-data pointer, so the
> callback
76 matches
Mail list logo