Thanks. Regular expressions *isn't* what I wanted. (When I've tried
them before [in Python] they made Python seem fast.)
On 03/31/2011 05:06 PM, Thomas Chust wrote:
2011/4/1 Charles Hixson:
[...]
I'm trying to determine whether the last non-whitespace character of a
string is a colon, an
; lnic -- last non-white is colon
(define (lnic? s) ; explode to list
(let loop ((cs (reverse (string->list s
(cond ((null? cs) #f)
((char-whitespace? (car cs)) (loop (cdr cs)))
(else (char=? (car cs) #\:)
(define (lnic? s) ; index into string
(let loop ((i (-
Here is what people are talking about when they say do it w/o regular
expressions:
#lang racket
(require srfi/13)
(define (ends-in-: s)
(define t (string-trim-right s))
(and (> (string-length t) 0) (char=? (string-ref t (- (string-length t) 1))
#\:)))
(ends-in-: "abc")
(ends-in-: " abc
Eli Barzilay wrote at 03/31/2011 07:46 PM:
Two minutes ago, Charles Hixson wrote:
Hi, I'm trying to determine whether the last non-whitespace character of a
string is a colon,
(define (last-non-ws str)
(cond [(regexp-match #px"(\\S)\\s*$" " \t") => cadr]
[else #f]))
then
DrRacket? The games contain some smaller examples. There is also the Guide
(in the documentation), which contains some examples (not apps per se).
Robby
On Thu, Mar 31, 2011 at 3:16 PM, Steve Graham wrote:
> Is there an example of a Windows app which uses typical GUI elements -
> window, text f
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,
On Thu, 31 Mar 2011 07:58:47 -0400, Eli Barzilay wrote:
> An hour ago, Matthew Flatt wrote:
> > No. We have permission from CUP and SIGPLAN to distribute the style
> > files, so we need to add something that indicates our license to
> > distribute them.
>
> IIUC, the problem is more than just all
Is there an example of a Windows app which uses typical GUI elements -
window, text field/area, radio button, drop down list, etc?
Thanks, Steve_
For list-related administrative tasks:
http://lists.racket-lang.org/listinfo/users
Two minutes ago, Charles Hixson wrote:
> Hi, 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, but while Rack
On Thu, Mar 31, 2011 at 7:38 PM, Charles Hixson
wrote:
> Hi,
> 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
Hi,
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, but while Racket seems to have a string-length
function,
Thanks Matthew for the prompt reply. Just noticed the dot and the part
in the docs referring to the geometry management.
On 03/31/2011 05:58 PM, Matthew Flatt wrote:
> A plain `panel%' doesn't perform any geometry management of its
> children, and so `invisible-canvas' isn't moved and resized to f
A plain `panel%' doesn't perform any geometry management of its
children, and so `invisible-canvas' isn't moved and resized to fill the
frame. On my screen, I can see a little white dot where the canvas is 1
pixel by 1 pixel.
Normally, you want either `vertical-panel%' or `horizontal-panel%', or
y
Could someone please explain why there is an invisible canvas in this
example?
Env:
Linux 2.6.31-23-generic Ubuntu i686 GNU/Linux
racket 5.1.0.4
#lang racket
(require racket/gui)
(define bitmap-canvas%
(class canvas%
(init-field [bitmap #f])
(inherit get-dc)
(define/override (on-p
About a minute ago, prad wrote:
> if i run the last line in the repl, it works.
> however, if i just try to run the program i the following error:
>
> compile: unbound identifier (and no #%app syntax transformer is bound)
> at: display in: (display phr)
>
> so it seems that it doesn't recognize t
i'm trying to get a string to execute as a function.
#!/usr/bin/env racket
#lang racket
(define phr "THIS IS A PHRASE")
(define x "(display phr)")
(eval (read (open-input-string x)))
if i run the last line in the repl, it works.
however, if i just try to run the program i the followin
Second thought - to avoid any special system definitions, you could achieve
the same results as follows...
(define meta '((tooltip "This is a tooltip"); plain text
(manual (fetch-manual-chapter 'object-x)); Rich-text format
(self-test 'object-x); associated test cases
*
LAST CALL FOR PAPERS and CALL FOR PARTICIPATION
12th International Symposium
Trends in Functional Programming 2011
Madrid, Spain
May 16-18, 2011
An hour ago, Matthew Flatt wrote:
> At Wed, 30 Mar 2011 22:41:20 -0400, Eli Barzilay wrote:
> > Going back to the copyright issues -- is this a good time to get
> > rid of the two offending latex files?
>
> No. We have permission from CUP and SIGPLAN to distribute the style
> files, so we need to
Hi,
I've been thinking of adding the following metadata 'feature' to Liitin, but
I wonder if this could be of more generic use. What do you think about the
idea?
(meta ((tooltip "This is a tooltip"); plain text
(manual (fetch-manual-chapter 'object-x)); Rich-text format
(self-test
At Wed, 30 Mar 2011 22:41:20 -0400, Eli Barzilay wrote:
> Going back to the copyright issues -- is this a good time to get rid
> of the two offending latex files?
No. We have permission from CUP and SIGPLAN to distribute the style
files, so we need to add something that indicates our license to
di
21 matches
Mail list logo