> started as a quick experiment with scsh a number of years ago,
I’m surprised no one has mentioned Rash so I will ... perhaps Rash will be a
useful tool for you ...
https://docs.racket-lang.org/rash/
“2 Rash Guide ... Rash is a shell language embedded in Racket. “
https://rash-lang.org/
Che
Hi all,
How do I change the background color (and/or style of border etc.) of a GUI
button? Given the code below, what should I put in the set-state-x methods
to indicate a difference between a normal and selected button?
Also any comments on program style and/or substance are appreciated (I
apol
n image, in which case you have complete control
> over how the button looks and reacts, but there isn't much of an
> in-between level of customization in the current toolkit.
>
> At Tue, 21 Feb 2012 00:25:52 -0700, Kieron Hardy wrote:
> > Hi all,
> >
> > How do I chan
und (because button colors
> > are normally determined by a theme). You can create a `canvas%' that
> > draws a custom button image, in which case you have complete control
> > over how the button looks and reacts, but there isn't much of an
> > in-between level of
Look like this will work very nicely indeed ... Thanks.
Am I correct in thinking that 'button-colors' models a 3-element ring
buffer where 'cdr' advances the access window one element?
On Thu, Feb 23, 2012 at 10:59 AM, Matthias Felleisen
wrote:
>
> Would this work for you:
>
> #lang racket/gui
>
I'm using a recent (nightly build) DrRacket (5.3.0.1--2012-04-12) on Vista
and observe that 'roman works, but 'script and 'symbol fail with the
message at the top left corner of the frame in a normal sized windows
system font.
- Kieron.
On Fri, Apr 20, 2012 at 7:33 AM, Harry Spier wrote:
> Dea
Hi all,
I need to distribute an application (for Windows only at first, without source)
along with a font or two that the application uses.
What is/are the Racket way/s to accomplish this?
Thanks in advance,
Kieron
Racket Users list:
http://lists.racket-lang.org/users
That will include the fonts also?
On Apr 26, 2012, at 11:23, Matthias Felleisen wrote:
>
> Open DrRacket, choose Racket | Create Executable -- Matthias
>
>
>
> On Apr 26, 2012, at 1:17 PM, Kieron Hardy wrote:
>
>> Hi all,
>>
>> I need to distrib
Thanks for the info Robby and Matthias.
Since my needs right now are simple, I'll look at the API and maybe I can
cobble together enough of an installation script of sorts using Racket, rather
than go the usual route of building an installer using VS or whatever. BTW,
this SO thread
(http://st
Hi all,
I would like to show in a canvas% (or perhaps as some type of snip%) in one
window, a thumbnail snapshot image of the current display (i.e. the
contents) of some other frame%.
My understanding of how the GUI all hangs together isn't clear, and so I am
unsure of the best way to attack. Any
Hi all,
I'm having problems getting the contents in a text% to scroll within an
editor-snip%.
The attached code displays part of a long string within a text% object in a
smaller editor-snip% object. The print statements successfully show a few
of the edit locations at some selected (x, y) points
Thanks for the info Matthew.
My misunderstanding of how the editor-snip% and text% classes work led me
to believe that it should be possible to scroll a message string displayed
within an editor-snip% and text% combination.
Eventually I gave up trying to make those work the way I wanted. After
re
Hi all,
On one of my client's laptops (Windows 7), the attached code detects the
second display monitor (get-display-count returns 2), but prints exactly
the same values for the location and size of the two displays. i.e. The
top-left coordinate and size values returned ((0,0) and 1024 x 768) ar
The display-origin function
> (it is called from mred/private/wxtop.rkt).
>
> hth,
> Robby
>
> On Thu, May 24, 2012 at 7:08 PM, Kieron Hardy
> wrote:
> > Hi all,
> >
> > On one of my client's laptops (Windows 7), the attached code detects the
> > sec
Hi all,
In debugging my second display monitor issue I'm trying to make a little
test utility from the Racket source.
I've copied a snippet (pasted below) from
\collects\mred\private\wx\win32\frame.rkt into a new file in the
same directory as frame.rkt.
Although it will compile (with raco make)
So it seems that for some reason (Older Dell laptop, ATI video, Windows 7
using generic drivers) the Windows system call to return the list of
monitors is returning them to Racket in a different order (primary display
monitor last) than expected (primary display monitor first).
The code for get-al
solve the problem; let me know
> if it still doesn't work.
>
> At Sat, 26 May 2012 05:45:52 -0600, Kieron Hardy wrote:
> > So it seems that for some reason (Older Dell laptop, ATI video, Windows 7
> > using generic drivers) the Windows system call to return the list of
&
rRacket tries to run them afresh when your program uses the modules.
> The modules refuse to run again, however, since they have to set
> process-level state, and a previous instance of the set of modules is
> detected.
>
> At Sat, 26 May 2012 01:17:44 -0600, Kieron Hardy wrote:
>
Monitors() is the way I see to get an HMONITOR, which is
> needed for GetMonitorInfo. Is there another way?
>
> At Sat, 26 May 2012 15:03:50 -0600, Kieron Hardy wrote:
>> Thanks Matthew for the fix - it seems to work fine - and wow done so
>> quickly too!
>>
>> Is
Hi all,
On Windows Vista (64-bit on quad-core CPU), MrEd-Designer randomly crashes
when working on a large and somewhat complex UI. At the command prompt I
get a trace, and the last one included:
ptr-ref: contract violation
expected: (and/c cpointer? (not/c (lambda (p) (pointer-equal? p #f
rs? Does simply loading the project make the bug appear?
>
> Cheers,
> Laurent
>
> On Mon, Jun 18, 2012 at 8:24 AM, Kieron Hardy wrote:
>
>> Hi all,
>>
>> On Windows Vista (64-bit on quad-core CPU), MrEd-Designer randomly
>> crashes when working on a large and
Hi all,
I have a GUI with a couple of frame% windows, and I cannot minimize them.
Overriding on-activate and printing a message, shows that frame% attempts
to minimize at first (i.e. on-activate is called with activate? value #f) -
but then immediately gets re-activated (i.e. on-activate is recal
iconize' method of `frame%' seems to
> work for me on Windows, and I'm not sure what else to try.
>
> At Mon, 18 Jun 2012 17:39:24 -0600, Kieron Hardy wrote:
> > Hi all,
> >
> > I have a GUI with a couple of frame% windows, and I cannot minimize them.
> >
&
On Sat, Jun 23, 2012 at 12:45 PM, Roelof Wobben wrote:
> I have another "problem" I try to solve in my head.
>
> Suppose I want to change one word in a sentence depening if a comparision
> is true or false.
>
> I could do this in pseudo code.
>
> if comparision is true then print "it's true" els
Hi all,
I'd like to refactor and extend the code below, such that r is either
defined to be an instance of an item-representer% or a
multi-item-representer%, depending on whether param-a is a single item or a
list.
The solution that springs to mind is to choose which class to instantiate
with (if
Thanks Danny, that's a step in the direction I wanted to go.
But on further reflection, I think what I was looking for (i.e. have some class
that stops it's own instantiation and defers to another class depending on some
parameter value(s)) doesn't really make sense. Instead I need some sort of
Matthias' comments led me to a couple of articles at Matt Might's site that
have helped me greatly in understanding continuations and escape
continuations. (I also experienced several functional programming "aha
moments" and improved my understanding of exceptions to boot.)
http://matt.might.net/a
Hi all,
I need to get the list of all the keys, of a small collection of key/value
pairs, in creation/insertion order.
I first thought of a hash, but hash-keys returns a list in (presumably) hash
(i.e. no) order.
In the Reference for Dictionaries I see the Association List and the dict-keys
f
> Anyway, if you're dealing only with alists, you don't need to know about
> "dict-keys" (whatever that is), just like you don't need to know about Justin
> Bieber (whatever that is).
I was stuck in the abstraction "Dictionary", thinking I might need more of the
API than just dict-keys. As it t
Hi all,
How do I get a run-time path in the executable created by 'raco distrib',
that is the same, relative to the directory containing the source racket
code and the executable created by 'raco exe'?
When I execute the following code (modified from the documentation), I
observe that the directo
))
(define (read-data)
(let ([data-file (get-data-file-name)])
(printf "read-data: data-file:\"~a\"~n" data-file)
(with-input-from-file data-file
(lambda ()
(read-bytes (file-size data-file))
(read-data)
On Tue, Jul 17, 2012 at 6:39 AM,
Hi all,
I have some sort of blocking issue in the code below (from Ryan Culpepper's
helpful answer on SO at
http://stackoverflow.com/questions/7294117/racket-using-events-in-a-frame-window
).
When the frame has keyboard focus, the arrow keys cause the direction to be
printed in the canvas. When t
On Jul 19, 2012, at 16:12, Matthew Flatt wrote:
> At Thu, 19 Jul 2012 12:34:59 -0600, Kieron Hardy wrote:
>> However, on Windows, moving the frame around causes the key-stroke
>> processing to block until the move is completed. i.e. The 'update display
>> and wait&
Hi all,
For me on Windows Vista, in DrRacket, the tool-tip pop-up text disappears,
and the pop-up's background is incorrectly cleared, when the mouse cursor
enters the tool-tip text area.
I have the toolbar on the left ('view' -> 'toolbar' -> 'toolbar on left').
I hover the mouse over one of the
Hi all,
Does anyone know how to easily go from a *.ico file (maybe Windows only) to
a bitmap% or something else I can use in program?
I see the function read-icos in file/ico, and also the function ico->argb
which gives a bytes? that represents an argb image, but I can't figure out
how to get fro
Thanks Danny, that does the trick nicely.
Cheers,
Kieron.
On Mon, Sep 10, 2012 at 2:00 PM, Danny Yoo wrote:
> > I see the function read-icos in file/ico, and also the function ico->argb
> > which gives a bytes? that represents an argb image, but I can't figure
> out
> > how to get from a bytes
Hi all,
Does anyone know what the equivalent of find-snip in pasteboard% would be
for containees within containers?
I'll looking to be able to get the GUI component at a particular (x,y)
within a container. I thought I'd seen a function that would do what I
need, but in looking through the docume
In case it is useful to others, here is what I came up with, based on (and
thanks for) the info from Matthew. By the way, I probably would not be
able to make a mouse-event% work for what I need, but thanks for the idea
Laurent.
In the code below, get-containee is passed a container to search, an
The documentation for 'if' is here
http://docs.racket-lang.org/reference/if.html?q=if
Here's a slightly modified example from the doc using 'if':
(if (positive? -5)
(error "shouldn't get here")
(display "hi"))
You might want to consider the 'when', documented here
http://docs.racket-lang.org
Hi all,
In the following fragment, I'm trying to create a new event, queue a
callback to some handler to process that event, and then clear the event.
(define/private (create-message)
...
(set! the-event (new some-event%))
...
)
(define/private (queue-message rece
> Is there actually a reason to use 'set!'?
There is a period of time between creating the message and actually
processing the message. Other events may cause the message to be abandoned.
Therefore I think the set! is required, but maybe there's a better solution.
Also, it's suspicious that your
Hi all,
Can anyone explain why the first function below selects 'x1-case as
expected but the second fails to select 'x2-case? Am I expecting something
to happen that shouldn't?
Thanks,
Kieron.
#lang racket
(case 'a
['a 'x1-case]
['b 'x1-case]
[(15 2 3) 'y1-case]
[(10 11 12) '
Thanks for the info guys, now I understand what's going on.
Cheers,
Kieron
Racket Users list:
http://lists.racket-lang.org/users
I'm not seeing this at all on Windows - how do I enable?
Kieron.
On Mon, Sep 17, 2012 at 1:44 PM, Robby Findler
wrote:
> It will appear when the online check syntax finds some documentation
> for the identifier at the insertion point. If you edit the identifier,
> it will disappear (but it may r
re using 5.3?
>
> Robby
>
> On Tue, Sep 18, 2012 at 11:08 AM, Kieron Hardy
> wrote:
> > I'm not seeing this at all on Windows - how do I enable?
> >
> > Kieron.
> >
> >
> > On Mon, Sep 17, 2012 at 1:44 PM, Robby Findler <
> ro...@eecs.nor
Hi all,
Considering the program below, does anyone know:
- Why do I get 3 enter messages when moving the mouse cursor into the
frame, and 2 enter messages when moving the mouse cursor into the list-box%?
- If (as I suspect) there is a call to on-subwindow-event for every
sub-component of a widge
On Sep 24, 2012, at 17:57, Robby Findler wrote:
> When I run this on the mac, I don't see any enter events, which seems
> strange.
Strange - I am on Windows but thought the code would work on all platforms.
> But my initial reaction to your question was that you need to
> use the 'r' argument.
bug, or it is going to fall
> under "you sometimes get strange events, thanks to details of how the
> platform interacts with its apps". I'm not sure which in this case,
> but can you tell that you've gotten two enters without getting a leave
> inbetween?
>
>> But I might be able to work-around by storing the mouse-event% when first
>> processing, and then treat as duplicate all calls to on-subwindow-event that
>> pass that same event.
I'm having trouble with this: Trying to store the mouse-event% with set! into a
field at the first invocation an
Thanks for the info, Matthew.
In looking at the docs again, I see now something that I should have
noticed earlier, that the arguments to set-argb-pixels include a bytes?,
and that should have been sufficient for me to answer my own question.
Sorry for the noise.
On Thu, Sep 13, 2012 at 9:07 AM,
Hello,
Most of the GUI is defined in the directories starting at /collects/mred.
I'm not sure what kind of extensions you're looking at doing, but the
frame% class is defined in collects/mred/private/mrtop.rkt.
And you would extend (sub-class) this and the other GUI classes in the
normal way, e.
Awesome!
Thanks, Matthew and Robby, for looking at this.
(* Cheers +inf.0),
Kieron.
On Tue, Oct 2, 2012 at 7:36 AM, Matthew Flatt wrote:
> At Mon, 24 Sep 2012 23:47:17 -0600, Kieron Hardy wrote:
> > I used 'enter to make the problem easy to demonstrate, but what I'm
>
Hi all,
I only did a quick search, but couldn't find an example of how to use a
combo-field%, in particular how to change the values it displays in its
drop-down list. I worked one up and post it here in case it is useful to
others.
The combo-field% is extended (sub-classed) with the method updat
As the error message states, you have a problem with the cond, in particular
with the parens.
I like to use brackets to denote the cond and actions like this:
(cond
[(condition1) value1]
[(condition2) (action2)]
[else (else-action)]
)
Hope this helps,
Kieron
On Oct 8, 2012, at 8:11, A
Hi all,
In the GUI, if the call-chain of on-subwindow-event method calls does not
complete without requiring another thread to run, the mouse-event% will not
get delivered to the target. And then the target widget of the mouse-event%
will not operate the way it should, e.g. a slider% will not slid
Hi all,
Does anyone know how to setup so that racket/DrRacket will use a different
collects directory than the default, i.e. override the collects directory
released with that version of racket/DrRacket?
Specifically, I'm trying to debug an issue with the GUI, and want to
switch/checkout from git
PLTCOLLECTS is it exactly - thanks, Matthew, for the reminder.
On Tue, Oct 9, 2012 at 7:54 PM, Matthew Flatt wrote:
> I think you want to set the `PLTCOLLECTS' environment variable.
>
> At Tue, 9 Oct 2012 18:15:20 -0600, Kieron Hardy wrote:
> > Hi all,
> >
> >
Hi all,
I'm having trouble loading a 16x16 monochrome image such that it can be
used as a cursor%.
The documentation states that using load-file with a kind of 'bmp always
loads as colour, but it would be nice to have a new kind (perhaps
'monochrome-bmp) that loads monochrome images to monochrome
I believe there is a Unix system call (available through the C interface, but
not through a shell command) that can modify the environment of the parent of a
process. I think it's used in the implementation of the commands that
manipulate the shell's own environment. But IIRC, by design, a proce
Hello all,
On Windows, I noticed that Racket's initialization file is incorrectly set
to %HOMEDIRVE%\%HOMEPATH%\.racketrc.rktl
$ grep 'WINDOWS_INIT_FILENAME' -r .
./racket-master/racket/src/gracket/grmain.c:#define WINDOWS_INIT_FILENAME
"%%HOMEDIRVE%%\\%%HOMEPATH%%\\gracketrc.rktl"
./racket-maste
On Wed, Mar 21, 2018 at 6:52 AM, Matthew Flatt wrote:
>
> Use `(find-system-path 'init-file)` to get the actual path, and see the
> docs for `path-system-path` for how it's computed.
A search in the docs for `path-system-path` did not return anything;
however, there does seem to be the relevant
Hi all,
I have noticed that some recent PRs have failed the Travis CI build step
seemingly due to unrelated, perhaps infrastructure-y, problems. e.g. The PR
I submitted, via a Github edit that fixes a typo in a comment, failed the
tests on one target with a tcp-connect timeout error (errno=60).
O
> An error report on the `enter!` problem would be welcome.
>
> >
> > D:\>racket
> > Welcome to Racket v6.12.
> > > (enter! "foo.rkt")
> > ; error during prompt calculation: path->string: contract violation
> > expected: path?
> > given: "d:\\foo.rkt"
> > [internal-error]>
>
>
Done: https://git
check-expect: undefined;
> cannot reference an identifier before its definition
>
> Any idea ?
>
> Thanks,
> Or
>
>
>
>
>
>> On Wednesday, January 23, 2019 at 10:49:01 PM UTC+2, Kieron Hardy wrote:
>> It seems the metadata lines added by DrRacket (ment
+1
Yes, specifying the language to use when interpreting some source, is best in
the input source itself than in the reference to that source.
But why must it be one or the other, and not some sensible combination of both.
e.g. If the #lang is absent from the source, look for and/or override th
I've been experimenting with 'shell/pipeline' on windows and post some
tests and example results here in case they are of use to others:
- basic examples demonstrating windows external commands,
- basic examples demonstrating windows internal commands with standard
cmd.shell,
- basic examples demon
The code for 'signal handling' with racket at Rosetta Code:
#lang racket
(define now current-milliseconds)
(define start (now))
(with-handlers ([exn:break?
(λ(x)
(define elapsed (/ (- (now) start) 1000.))
(displayln (~a "Total time: " elapse
I'm going through The Little Schemer (Fourth Edition). On page 23 the first
question posed asks:
What is the meaning of the line
((null? lat) #f)
where
lat is (mashed potatoes and meat gravy)
The printed explanation seems to be a misprint as it appears to be the answer
to a different question
the meaning of the application
> (null? lat)
>
> Hope this helps
>
>
>> On Sat, Feb 25, 2017 at 11:17 AM, Kieron Hardy
>> wrote:
>> I'm going through The Little Schemer (Fourth Edition). On page 23 the first
>> question posed asks:
>> What i
I can replicate the original problem (Racket 5.3.6 32-bit on Win7 64-bit).
The new plot has problems also - see attached.
Kieron.
On Fri, Apr 25, 2014 at 4:39 PM, Neil Toronto wrote:
> I can't replicate this problem on my machine, so I'll need more
> information. Can you run the following prog
Hi all,
Running raco setup, I'm getting many duplicate tag reports. Such as:
raco setup: WARNING: duplicate tag: (part ("(planet doc.scrbl (khardy
gui-container-utils.plt 1 0))" "zz"))
raco setup: in: c:\home\racketutils\gui-container-utils\doc.scrbl
raco setup: and: C:\home\RacketUtils\gui-conta
Harry,
You could run the executable (created with DrRacket from the first code
snippet) directly from a Windows Shell command line, and the error will be
shown in-line in the command window as expected.
But, as you state, clicking on the new executable's icon in an Explorer
window does show a com
I don't know if it's a particularly good example, but here's a basic usage
of for-each:
#lang racket
(define lst '(apple banana cherry))
(for-each
(lambda (x)
; x is bound to each item of lst in turn
(printf "item:~a~n" x)
; do something more with x
)
lst)
Hope this helps,
This doesn't fail for me with DrRacket 5.3.1.9--2012-12-07(92c5025/a) on
Vista using #lang racket, #lang racket/base or #lang racket/gui
Kieron.
On Mon, Dec 17, 2012 at 4:07 PM, Adam Golding
wrote:
> (require picturing-programs)
>
> (big-bang (overlay pic:calendar (rectangle 100 100 "solid" "whi
ent; memory limit: 256 MB.
> >
>
> On 17 December 2012 19:04, Kieron Hardy wrote:
>
>> This doesn't fail for me with DrRacket 5.3.1.9--2012-12-07(92c5025/a) on
>> Vista using #lang racket, #lang racket/base or #lang racket/gui
>>
>> Kieron.
&g
On Mar 21, 2013, at 9:55, Greg Hendershott wrote:
> FWIW I recall getting confused by this too. (But unlike you, I haven't
> detoured at the time to figure out exactly what's going on; instead
> I've resorted to `rm -rf compiled/` and resumed whatever I was trying
> to get done).
FWIW-2 .. I hav
I was using the code from this old post to test FTP within racket, and
noticed that (what I assume was) the link to Moore's original paper is
broken.
After a few minutes of poking around I see that Intel has reorganized their
FTP site and the paper is now found at:
ftp://download.intel.com/museum
Hi all,
I'd like to add a menu item (Workspace) to the DrRacket file menu that
brings up a menu (Open, Save, Save As, Close, 1-n 'recent workspaces).
'Save/Save As' would take all the files open in the DrRacket window (and
perhaps the location of the insertion point cursor and any text selection)
In trying to use the ffi example interface to the xosd program
(xosd.rkt/use-xosd.rkt at ), I notice that
(define-syntax defxosd
(syntax-rules (:)
[(_ name : type ...)
(define name
(get-ffi-obj (regexp-replaces 'name '((#rx"-" "_") (#rx"[*?]$" "")))
libxosd (_
In the plot collection, it currently seems possible to plot only in the
z-dimension, i.e. plot functions where the z value is derived from some
f(x,y)
I needed the ability to plot functions where: x is derived from some
f(y,z); and y is derived from some f(x,z). In case it is useful to others,
my
I'm experiencing this issue also, although only occasionally, on a laptop
with a trackpad and Gentoo. Since a trackpad allows one to press the
buttons without any movement of the mouse cursor, I have experimented a
little:
When the context menu (opened with a right-click) is immediately closed
aft
Perhaps you're thinking of the Racket Developers mail-list:
http://lists.racket-lang.org/dev/
Cheers,
Kieron
On Oct 23, 2013, at 13:59, Don Green wrote:
> Is there a list-serve dedicated to Racket or Scheme principles and ideas...
> or future development.
> I remember reading about Racket des
Hi Mark,
How are you starting your program?
Are you launching Racket from a command line or launching by e.g.
double-clicking an icon in the Windows window manager?
What version of Windows?
Cheers,
Kieron
> On Aug 28, 2019, at 5:44 AM, Mark Bestley wrote:
>
> I am just learning racket us
>
>> What version of Windows?
>>
>
> MacOS 10.14.6 :)
Mac, huh? I didn’t know Gracket was needed there. Sorry, I’m no help.
--
You received this message because you are subscribed to the Google Groups
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, s
FYI: As of Windows 10, you can install a full Linux distro in/on Windows. Here
are the instructions:
https://docs.microsoft.com/en-us/windows/wsl/install-win10
> On Jun 16, 2020, at 11:39 AM, Jos Koot wrote:
>
> Hi,
> Thanks for your prompt reply.
> I’ll first look into Mathjax. It’s on github
> On Nov 8, 2020, at 2:58 PM, Hendrik Boom wrote:
>
>> On Sun, Nov 08, 2020 at 12:47:11PM -0800, unlimitedscolobb wrote:
>> The idea of having structs whose fields contain functions has never occurred
>> to me ...
>
> Historical note:
>
> I first encountered structures containing function i
86 matches
Mail list logo