[racket-users] #:kind (list ... ) in defthing and defproc

2020-09-26 Thread Jos Koot
The following works well in DrRacket, version 7.8 [3m] #lang scribble/manual @deftogether[ (@defthing[#:kind "constant false/on/high" F trit? #:value '0] @defthing[#:kind (list "constant true/off/low" (hspace 1)) T trit? #:value '1] @defthing[#:kind "constant indeterminate" ? trit? #:value '?]

[racket-users] strange error message with debugging enabled

2020-09-25 Thread Jos Koot
file b.rkt #lang racket (require "a.rkt") (err 5) file a.rkt #lang racket (require "a.rkt") (err 5) Run file b.rkt from DrRacket. Normal error message when debugging on file b.rkt is not enabled. With debugging enabled: -- #(struct:exn:fail:contract "vector-ref: contract violation\n expected:

[racket-users] racket-dev problem?

2020-06-26 Thread Jos Koot
Sending mail to racket -dev seems not to arrive correctly.Sending to other addresses does work.Therefore I try to report via racket-users.Jos  -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving

[racket-users] make-set!-transformer

2020-06-24 Thread Jos Koot
The docs on make-set!-transformer do not mention that it also applies to set!-values. That is does apply to both is a good case, I think. I have tried to find the documentation on the GitHub of racket but could not find it. Please give me a hint where to look, so I can do a pull request for

[racket-users] RE: [racket-money] Fwd: [racket-dev] Racket Survey 2020

2020-06-24 Thread Jos Koot
Hi, Your email is not an assault I think, but nevertheless I would like to add some positive remarks on the community. It is true that us...@racket-lang.org has changed in the last year or two years, I think. There are much less posts of users nowadays. It is obvious that what you call the

RE: [racket-users] Re: trying to use futures for some calculations

2020-06-17 Thread Jos Koot
In addition, some time ago I did use futures which did parallelization very well when using distinct parts of the same vector. I did not need unsafe for that. Jos -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group

RE: [racket-users] Re: trying to use futures for some calculations

2020-06-17 Thread Jos Koot
It’s long ago, but I worked nicely with parallelization on a CDC 205 both in assembler and Fortran (CDC has expired shortly after). IIRC it did not protect against simultaneous updating the same memory location. But what I do recall is that it is very important that parallel processes use

[racket-users] scribble: how to put a bar above text?

2020-06-17 Thread Jos Koot
Thanks to all of you for your help. I have tried some of your suggestions. They are promising. Meanwhile I have found out that I can do the following: - Create an equation in Word - Save it as a picture - Convert it to gif - Insert it with @image Nevertheless I’ll look further into your

RE: [racket-users] scribble: how to put a bar above text?

2020-06-16 Thread Jos Koot
.) Thanks again, Jos From: Stephen De Gabrielle Sent: 16 June 2020 19:02 To: Jos Koot Cc: us...@racket-lang.org Subject: Re: [racket-users] scribble: how to put a bar above text? Hi Jos MathML support via the tag is not good.  I suspect the best option is to use Mathjax https

[racket-users] scribble: how to put a bar above text?

2020-06-16 Thread Jos Koot
Hi, Using scribble when writing a text containing Boolean expressions it would be nice to write ‘not(A+B)’ as ‘A+B’ with a bar above it. An expression like not(not(A)+not(B)) would need bars above the A and the B as well above the whole. Is this possible? I have found no solution in the

RE: [racket-users] Re: local variables arehyperlinkedinscribble/manual

2020-06-14 Thread Jos Koot
Well, thanks to both Ryan C and Ryan K. Sorry for my confusion. Best wishes, Jos Koot From: Ryan Kramer Sent: 14 June 2020 02:20 To: Racket Users Subject: Re: [racket-users] Re: local variables arehyperlinkedinscribble/manual That was actually Ryan Culpepper. Sorry for the noise, but I can't

RE: [racket-users] Re: local variables are hyperlinkedinscribble/manual

2020-06-13 Thread Jos Koot
default.kra...@gmail.com gave me a clear and usable answer. His email follows below. Best wishes, Jos >From Ryan Kramer You can also use make-element-id-transformer, like this:     (define-syntax SET       (make-element-id-transformer        (lambda _ #'(racketvarfont "set" Then Scribble

RE: [racket-users] Re: local variables are hyperlinked inscribble/manual

2020-05-25 Thread Jos Koot
Thank you Ryan and Ryan. I think make-element-id-transformer is the easiest solution. (let ([set #f])   (racket set)) is nice too because it can be used just where needed. I’ll try if that works around an interaction too. An expression containing ‘set’ both as local and as imported variable

[racket-users] local variables are hyperlinked in scribble/manual

2020-05-24 Thread Jos Koot
Hi, I have: #lang scribble/manual @(require (for-label racket) scribble/eval) @interaction[ (let ((set 1)) (add1 set))] I prepare a HTML document with DrRacket (in Windows 10). Works, but local variable set is hyperlinked to procedure set in the documents (racket/set). I would like this

[racket-users] Circuits

2020-05-19 Thread Jos Koot
in Racket or in a Scheme like or Lisp like language). Best wishes for all, Jos Koot -- 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, send an email to racket-user

RE: [racket-users] multiple-value version of in-value

2020-05-04 Thread Jos Koot
) (((id ...) (_ expr)) #'((id ...) (:do-in (((id ...) expr)) #t () #t () #t #f ())) For example: (for/first (((a b c) (in-values (values 2 + 3 (b a c)) ; -> 5 Thanks again, Jos From: Philip McGrath Sent: 04 May 2020 17:21 To: Jos Koot Cc: us...@racket-lang.org Subject: Re:

RE: [racket-users] multiple-value version of in-value

2020-05-04 Thread Jos Koot
Very nice. I have installed the package. Thanks very much, Jos From: Philip McGrath Sent: 04 May 2020 17:21 To: Jos Koot Cc: us...@racket-lang.org Subject: Re: [racket-users] multiple-value version of in-value My package `adjutor` has a few variants of this, like `in-value*`: https

[racket-users] multiple-value version of in-value

2020-05-04 Thread Jos Koot
Recently I needed a multiple value version of in-value. Does something like that exist already? I could not find it, so I made one: (define-syntax (in-values stx) (syntax-case stx () ((_ expr) #'(make-do-sequence (λ () (values (λ (p) expr) (λ (p) #f) #t (λ

[racket-users] scribble defproc looses parenthesis

2019-09-14 Thread Jos Koot
Hi File bug.rkt #lang racket (define (make-proc) (λ (x (y #f)) (void))) (provide make-proc) File bug.scrbl #lang scribble/manual @(require scribble/core scribble/eval racket "bug.rkt" (for-label racket "bug.rkt") (for-syntax racket)) @(defmodule "bug.rkt"

RE: [racket-users] problem with current-error-port in scribbleinteraction

2019-06-27 Thread Jos Koot
Perfect. (with-handlers ((exn:fail? exception-handler)) ...) works nice. Thanks very much for your rapid response, Jos From: Ryan Culpepper Sent: 27 June 2019 13:36 To: Jos Koot; Racket Users Subject: Re: [racket-users] problem with current-error-port in scribbleinteraction The `uncaught

[racket-users] problem with current-error-port in scribble interaction

2019-06-27 Thread Jos Koot
Hi, The attachments are assumed to reside in the same directory and are reduced forms of more elaborated code. In module try-rkt I have code that captures errors such as to avoid an error-message being written on the current-error-port, to retrieve the error-message and to return normally. This

[racket-users] RE: ojo

2019-06-20 Thread Jos Koot
, denk ik. Ik test liever mijn computerprogrammas. Ook de programmas die de testen uitvoeren moeten worden getest. Daar krijg ik niet gauw genoeg van. Veel liefs, Jos From: meer.ba...@kpnmail.nl Sent: 20 June 2019 20:43 To: Jos Koot Subject: ojo Dag Jos, Zoals beloofd laat ik weten hoe het met mijn

RE: [racket-users] exact rationals in interactions window

2019-06-14 Thread Jos Koot
Yes, the intermediate output-string does the job. Thanks. Stupid me, not thinking of that by myself. Jos From: Robby Findler Sent: 13 June 2019 21:32 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] exact rationals in interactions window Does this help? (let ([cp (current-print

[racket-users] exact rationals in interactions window

2019-06-13 Thread Jos Koot
Hi Is it possible to instruct DrRacket to display non-integer exact rationals with a slash in stead of a horizontal line? If so, how? I tried current-print and the like, but without success. Jos -- You received this message because you are subscribed to the Google Groups "Racket Users"

[racket-users] nj-symbols

2019-06-13 Thread Jos Koot
To whom may be interested, Repository https://github.com/joskoot/nj-symbols Provides procedures for the exact computation of the squares of 3j-, 6j- and 9j-symbols. For documentation a scribble module is included. Jos -- You received this message because you are subscribed to the Google Groups

[racket-users] exact 3j-symbols

2019-05-18 Thread Jos Koot
To whom is interested, I have initiated a new repository: https://github.com/joskoot/3j-symbol. It contains a procedure for the exact computation of the signs and the squares of 3j-symbols using the Racah formula. Documentation is included as a scribble/manual module. To do: add more tests.

Re: [racket-users] Struct properties and recursion

2019-02-23 Thread Jos Koot
I think the definition of write-point must come before the definition of the struct type. Jos On Fri, 22 Feb 2019 at 23:35, Jack Firth wrote: > Does it seem weird to anybody else that there's no way to set struct > properties without mutual recursion? > > Say I'm defining a 2d point struct and

Re: [racket-users] Guide and reference

2019-02-08 Thread Jos Koot
+1 On Thu, 7 Feb 2019 at 18:48, David Storrs wrote: > For what it's worth, I like having the Guide and the Reference be > separate things. They have different purposes and trying to mash them > together is likely to make them worse at both. > > The Guide is designed to introduce new concepts,

Re: [racket-users] Racket v7.2

2019-01-30 Thread Jos Koot
Very nice. Runs fast for my programs. Thanks, to all who contributed, Jos On Wed, 30 Jan 2019 at 19:59, Vincent St-Amour < stamo...@eecs.northwestern.edu> wrote: > Racket version 7.2 is now available from > > http://racket-lang.org/ > > Racket-on-Chez is done in a useful sense, but we'll

Re: [racket-users] Are the terms "function" and "procedure" synonymous in Racket?

2019-01-22 Thread Jos Koot
You write: > "It is often the case that > arbitrary procedures don't compose meaningfully, whereas procedures that > represent functions always compose meaningfully. " > > functions f and g can be composed meaningfully only if the domain of f is > compatible with the co-domain of g. Jos --

FW: [racket-users] colon keywords

2018-09-23 Thread Jos Koot
Forgot to include the users group. -Original Message- From: Jos Koot [mailto:jos.k...@gmail.com] Sent: 23 September 2018 21:37 To: 'Tomasz Rola' Subject: RE: [racket-users] colon keywords MHO, adhere to #:foo, because :foo is a permitted identifier. I prefer a clear distinction between

FW: [racket-users] Semaphore-count

2018-09-06 Thread Jos Koot
Ignore my email on this subject, please. It is wrong. Jos -- 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, send an email to racket-users+unsubscr...@googlegroups.com. For more

RE: [racket-users] Semaphore-count

2018-09-05 Thread Jos Koot
Hi Craig Allen Would something like the following work? Jos (define (make-sema n) (define-syntax-rule (with-counter-sema expr ...) (begin (semaphore-wait counter-sema) (define result (begin expr ...)) (semaphore-post counter-sema) result)) (define counter-sema (make-semaphore 1))

RE: [racket-users] How is define-values defined?

2018-08-01 Thread Jos Koot
Matthias, Thanks, for the pointer. I am studying the article, which at first look seems very well readable. I did not mean to 'propose' my odd idea. Jos -Original Message- From: Matthias Felleisen [mailto:matth...@felleisen.org] Sent: 01 August 2018 16:26 To: Jos Koot Cc: Racket Users

RE: [racket-users] sharing an awesome plot - warms the cockles of my heart

2018-03-24 Thread Jos Koot
Very nice, Jos Koot _ From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com] On Behalf Of Sanjeev Sharma Sent: 23 March 2018 22:17 To: Racket Users Subject: [racket-users] sharing an awesome plot - warms the cockles of my heart I've done no math in 20 years - used

RE: [racket-users] Using match to decompose a nested hash

2018-03-19 Thread Jos Koot
You forgot some parentheses: (match user [(hash-table ('name name) ('job (hash-table ('type type) ('id id ; <--- (displayln name) (displayln type) (displayln id)]) Jos _ From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com] On Behalf Of David

RE: [racket-users] Understanding 'curry'

2018-02-28 Thread Jos Koot
You are right, I think. Thanks. _ From: David Storrs [mailto:david.sto...@gmail.com] Sent: martes, 27 de febrero de 2018 22:29 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] Understanding 'curry' On Tue, Feb 27, 2018 at 2:46 PM, Jos Koot <jos.k...@gmail.com>

RE: [racket-users] Understanding 'curry'

2018-02-27 Thread Jos Koot
rom: David Storrs [mailto:david.sto...@gmail.com] Sent: martes, 27 de febrero de 2018 20:13 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] Understanding 'curry' On Tue, Feb 27, 2018 at 12:12 PM, Jos Koot <jos.k...@gmail.com> wrote: curry itself is curried (which sometimes is

RE: [racket-users] Understanding 'curry'

2018-02-27 Thread Jos Koot
curry itself is curried (which sometimes is puzzling) (define (foo a #:bar x) x) ((curry foo #:bar 9) 8) ; -> # ((curry curry foo #:bar 9) 8) ; -> 9 I hope others can explain this in detail. I can't. Jos -Original Message- From: racket-users@googlegroups.com

[racket-users] make-custom-set-types and make-custom-hash-types

2018-02-27 Thread Jos Koot
Hi The order in which procedure make-custom-set-types returns its values differs from the order given in the docs. The same holds for procedure make-custom-hash-types. Can this be synchronized? (preferably in the docs for backward compatibilty, I assume) DrRacket, version 6.12 [3m]. Jos Koot

RE: [racket-users] (number->string -nan.0) == "+nan.0" ?

2018-02-06 Thread Jos Koot
(eq? +nan.0 -nan.0) -> #t This is documented: The datum -nan.0 refers to the same constant as +nan.0, and -nan.f is the same as +nan.f. Jos _ From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com] On Behalf Of David Storrs Sent: martes, 06 de febrero de 2018 00:42

[racket-users] some issues about in-permutations

2018-01-19 Thread Jos Koot
Hi, 1: In module racket/collects/list.rkt the definition of procedure in-permutations contains the line: (define cur (reverse l)) Why the reversal? Why not: (define cur l)? With (define cur l) in-permutations returns the permutations in the same order as procedure permutations, starting with

RE: [racket-users] Re: Alternatives to DrRacket

2018-01-12 Thread Jos Koot
+1 On windows it is the same. It would be nice to have the option to revert defaults for the current tab only. Jos _ From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com] On Behalf Of JCG Sent: viernes, 12 de enero de 2018 01:38 To: Racket Users Subject:

RE: [racket-users] misterious empty line

2017-11-27 Thread Jos Koot
comment #,my-comment) (in-permutations '(1 2 3))) (a)] Thanks, Jos _ From: Ben Greenman [mailto:benjaminlgreen...@gmail.com] Sent: lunes, 27 de noviembre de 2017 6:44 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] misterious empty line My guess is that "(define" does so

[racket-users] misterious empty line

2017-11-23 Thread Jos Koot
My code: #lang scribble/manual @(require scribble/core scribble/eval racket (for-label racket) (for-syntax racket)) @elemtag["rearrangement" "Not important."] @interaction[ (require racket) (code:comment #,(list "Procedure " (racket in-permutations) " produces a sequence of "

RE: [racket-users] strange behaviour of procedure partitions

2017-11-12 Thread Jos Koot
I have downloaded and installed "Welcome to DrRacket, version 6.11.0.2--2017-11-12(b54ea8c5b1/a) [3m].", but the problem still remains. I have Windows 7 premium home. Thanks, Jos _ From: Jens Axel Søgaard [mailto:jensa...@soegaard.net] Sent: zondag 12 november 2017 21:21 To

[racket-users] strange behaviour of procedure partitions

2017-11-12 Thread Jos Koot
Hi In the definitions window of DrRacket: #lang racket (require (only-in math/number-theory partitions)) (partitions 0) (partitions 0) Runs ok, but after running, typing (partitions 0) in the interactions window gives the following error: define-values: assignment disallowed; cannot re-define

RE: [racket-users] numerical partitions

2017-11-09 Thread Jos Koot
I have put my code at: https://github.com/joskoot/partitions Best wishes, Jos -Original Message- From: Iain Gray [mailto:iaing...@ednet.co.uk] Sent: jueves, 09 de noviembre de 2017 17:30 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] numerical partitions my use

RE: [racket-users] numerical partitions

2017-11-09 Thread Jos Koot
How did you implement procedure part many years ago? Things may depend on what you want to do with the partitions. Do you want the whole list at once, or would a stream or generator be more appropriate? If you want I can send you a stream-version, but it is in a bad style. It has docs made with

RE: [racket-users] repeated code in interactions of scribble

2017-10-03 Thread Jos Koot
)) (plus4 0) ] Conclusion. Thanks again for your help. Jos Koot _ From: Jos Koot [mailto:jos.k...@gmail.com] Sent: domingo, 24 de septiembre de 2017 13:01 To: 'Ben Greenman' Cc: 'Racket Users'; 'Jos Koot' Subject: RE: [racket-users] repeated code in interactions of scribble Th

RE: [racket-users] repeated code in interactions of scribble

2017-09-24 Thread Jos Koot
] Sent: domingo, 24 de septiembre de 2017 6:45 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] repeated code in interactions of scribble You can re-use helper functions by running the different example blocks with the same evaluator (example below). I don't know how to hyperlink one

[racket-users] repeated code in interactions of scribble

2017-09-22 Thread Jos Koot
Hi, What would be the easiest way to avoid duplication of code in interactions within a scribble/manual document? I often place examples in such a document. In some of them I need the same auxiliary procedures. How to avoid duplicating them? The most nice solution would be the appearance of a

RE: [racket-users] Mapping over pattern variables

2017-09-01 Thread Jos Koot
How about: (define-syntax (macro stx) (syntax-case stx () [(_ (var1 ...) (var2 ...)) #`(begin #,@(for*/list ((v1 (in-list (syntax->list #'(var1 ... (v2 (in-list (syntax->list #'(var2 ...) #`(do-something #,v1 #,v2)))])) Jos

RE: FW: [racket-users] Can't seem to find the blue box(es) in DrRacket anymore

2017-08-28 Thread Jos Koot
Thanks! Jos -Original Message- From: Robby Findler [mailto:ro...@eecs.northwestern.edu] Sent: lunes, 28 de agosto de 2017 1:21 To: Jos Koot Cc: hashim muqtadir; Racket Users Subject: Re: FW: [racket-users] Can't seem to find the blue box(es) in DrRacket anymore I've pushed a fix

FW: [racket-users] Can't seem to find the blue box(es) in DrRacket anymore

2017-08-27 Thread Jos Koot
Sorry, ignore my post. Jos Koot -Original Message- From: Jos Koot [mailto:jos.k...@gmail.com] Sent: domingo, 27 de agosto de 2017 19:00 To: 'hashim muqtadir'; 'Racket Users' Subject: RE: [racket-users] Can't seem to find the blue box(es) in DrRacket anymore I think you can toggle

RE: [racket-users] Can't seem to find the blue box(es) in DrRacket anymore

2017-08-27 Thread Jos Koot
I think you can toggle a switch in tab 'background expansion' of the preferences menu. Jos -Original Message- From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com] On Behalf Of hashim muqtadir Sent: domingo, 27 de agosto de 2017 8:12 To: Racket Users Subject:

RE: [racket-users] Re: European Racketeers and conferences

2017-08-24 Thread Jos Koot
remember or/and want to start again. I think I can contribute with short talks and conversations. Jos Koot -Original Message- From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com] On Behalf Of luis.osa.gdc Sent: jueves, 24 de agosto de 2017 14:19 To: Racket Users Cc

RE: [racket-users] I can translate a word but how can I translate a setence with drrakket

2017-06-25 Thread Jos Koot
Surely this is homework. I am not giving you all detauils, just some hints. First of all: Look in HtDP. Your translator works for single words. Let translate-sentence be the procedure for translating a list of words. Following HtDP it can look like: (define (translate-sentence sentence lexicon

RE: [racket-users] Turing machines

2017-06-12 Thread Jos Koot
Hi Damien Right, interesting only for the theory. But also a lot of fun to play with. Did you see my example of a TM for binary addition of two arbitrary large numbers? It has 13 states (of which only 9 are essential) and 51 rules (of which only 27 are essential) The test includes 50 tests with

[racket-users] Turing machines

2017-06-10 Thread Jos Koot
To whom is interested. Jay McCarthy has a nice page about how to program Turing machines: http://jeapostrophe.github.io/2013-10-29-tmadd-post.html. Because I did not immediately see his implementation of producing a Turing machine as a Racket procedure, I made one myself :

RE: [racket-users] RE: student project idea: semi-WYSIWYG Scribble editor (Was: Racket 6.9)

2017-04-29 Thread Jos Koot
as a thanks to PLT to be so useful for me for many years. This is a promise to try, not one to succeed. Jos -Original Message- From: Matthias Felleisen [mailto:matth...@ccs.neu.edu] Sent: domingo, 30 de abril de 2017 0:39 To: Jos Koot Cc: Neil Van Dyke; Racket Users Subject: Re: [racket-users

[racket-users] RE: student project idea: semi-WYSIWYG Scribble editor (Was: Racket 6.9)

2017-04-29 Thread Jos Koot
Message- From: Neil Van Dyke [mailto:n...@neilvandyke.org] Sent: sábado, 29 de abril de 2017 23:25 To: Jos Koot; 'Racket Users' Subject: student project idea: semi-WYSIWYG Scribble editor (Was: Racket 6.9) If some undergrad wanted a summer programming project... make a semi-WYSIWYG editor

RE: [racket-users] Re: Racket 6.9

2017-04-29 Thread Jos Koot
: [racket-users] Re: Racket 6.9 On Sat, 29 Apr 2017 21:05:10 +0200, "Jos Koot" <jos.k...@gmail.com> wrote: >I have downloaded 6.9, but was warned that the file does not end >in correct way. Running the exe anyway gave a DrRacket that aborts >after opening it. I have

RE: [racket-users] Racket 6.9

2017-04-29 Thread Jos Koot
[mailto:n...@neilvandyke.org] Sent: sábado, 29 de abril de 2017 22:29 To: Jos Koot; Racket Users Subject: Re: [racket-users] Racket 6.9 Stephen De Gabrielle wrote on 04/29/2017 03:18 PM: > Ubuntu Linux is cheap, includes an alternative to ms word, gets > regular updates and (most impor

RE: [racket-users] scale of image of scribble with .jpg

2017-04-29 Thread Jos Koot
Thanks for clarifying. Jos _ From: Stephen De Gabrielle [mailto:spdegabrie...@gmail.com] Sent: sábado, 29 de abril de 2017 21:57 To: Jos Koot; Racket Users Subject: Re: [racket-users] scale of image of scribble with .jpg Scaling will always make the image less sharp, but you are right

RE: [racket-users] Racket 6.9

2017-04-29 Thread Jos Koot
...@gmail.com] Sent: sábado, 29 de abril de 2017 21:33 To: Jos Koot; Racket Users Subject: Re: [racket-users] Racket 6.9 I just realised I have a Windows 7 (32bit) toshiba nb 200. DrRacket (32bit) launched with no problems. Check the operating system type(32-bit/x86 or 64-bit x64) is the same

[racket-users] scale of image of scribble with .jpg

2017-04-29 Thread Jos Koot
Hi, I have the following: #lang scribble/manual ... @(image #:scale 2 "Turing-machine.jpg") ... Works well, except that the image is not enlarged. What should I do to force the scale? Scaling does work with .gif, but .gif gives less sharp images. Thanks, Jos -- You received this message

[racket-users] #:grammar and #:contracts of scribble

2017-04-14 Thread Jos Koot
similar to the grammar can improve the layout of the rendering of a defform. Just a thought, Jos Koot -- 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, send an email

[racket-users] RE: empty lines in a grammer of defform of scribble

2017-03-28 Thread Jos Koot
Option 3 works very fine. I have incorporated it in https://github.com/joskoot/turing. Looks very good. Thanks again, Jos -Original Message- From: Dupéron Georges [mailto:jahvascriptman...@gmail.com] Sent: martes, 28 de marzo de 2017 15:13 To: Racket Users Cc: jos.k...@gmail.com Subject:

[racket-users] RE: empty lines in a grammer of defform of scribble

2017-03-28 Thread Jos Koot
Thanks very much indeed for your comprehensive answer. I tried your code given for option 3. Works well, but your warning makes me hesitate. Well, I'll see. I already have a lot of old code no longer accepted by Racket. Not a big problem, but requires work to adapt. Thanks a lot again, Jos Koot

[racket-users] empty lines in a grammer of defform of scribble

2017-03-27 Thread Jos Koot
When I use #:grammar in a defform, the rules of the grammer are separated by empty lines. I would like to avoid these empty lines. Is it possible? The contracts of #:contracts do not have empty lines between them. I ask this question because I have a rather long grammar that would fit in one page

[racket-users] question about unexpected newlines in code:line

2017-01-25 Thread Jos Koot
Hi, First: thanks for version 6.8. I have the following: #lang scribble/manual @(require scribble/core scribble/eval racket scribble/html-properties (for-label racket) (for-syntax racket)) @interaction[ (let () (code:comment #,(list "a" "b")) (code:comment #,(list "a" "b"))

[racket-users] newlines in scribble interaction output

2017-01-12 Thread Jos Koot
Hi, Consider: #lang scribble/manual @(require scribble/core scribble/eval) @interaction[ (printf "a~n~nb")] Shows one newline only. It produces: | > (printf "a~n~nb") | a | b It is not a big problem. I can write: @interaction[ (printf "a~n ~nb")] which produces: | > (printf

RE: [racket-users] Racket-ese for Scheme `define-record-type' protocol?

2016-12-29 Thread Jos Koot
Doesn't (struct ... #:guard guard-proc ...) not do what you want? See the doc on struct. Jos -Original Message- From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com] On Behalf Of Eric Eide Sent: jueves, 29 de diciembre de 2016 2:55 To: Racket Users Subject:

RE: [racket-users] Narrow radix of string->number.

2016-12-22 Thread Jos Koot
->number. On 12/21/2016 11:33 PM, Jos Koot wrote: > > Or up to 60, 60 even nowadays being a commonly used radix in time notation. FWIW, the radix of the time notation does not seem that simple to me. I would rather say it is a combined notation. base-10 (days), base-60 (up to 24 hour

RE: [racket-users] Narrow radix of string->number.

2016-12-21 Thread Jos Koot
Or up to 60, 60 even nowadays being a commonly used radix in time notation. Why restricting it to 36? Jos -Original Message- From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com] On Behalf Of Dmitry Igrishin Sent: miércoles, 21 de diciembre de 2016 20:41 To: Racket

RE: [racket-users] Newbie seeking advice

2016-12-20 Thread Jos Koot
Koot Cc: steve.lett777; Racket Users Subject: Re: [racket-users] Newbie seeking advice > On Dec 20, 2016, at 1:53 PM, Jos Koot <jos.k...@gmail.com> wrote: > > Hi, > > You already had some very good replies. > If you are very new to programming, I second the advic

RE: [racket-users] Newbie seeking advice

2016-12-20 Thread Jos Koot
Hi, You already had some very good replies. If you are very new to programming, I second the advice to start with Racket and to look into The Little Schemer (in older days The Little Lisper) In addition, this mailing list is very friendly and can help you with problems you will encounter on your

[racket-users] logo of DrRacket

2016-12-11 Thread Jos Koot
Hi After downloading DrRacket, version 6.7.0.3--2016-12-11(db8d8f8/a) [3m] starting DrRacket shows a rotating lambda. IMHO the previous logo has more style and better shows the remaining time needed to load DrRacket. Not an important issue, of course. A matter of taste probably. Please let's not

RE: [racket-users] hyperlink in code:comment

2016-12-01 Thread Jos Koot
Thank you very much. I don't understand why I missed that part of the docs. Jos -Original Message- From: stchang...@gmail.com [mailto:stchang...@gmail.com] On Behalf Of Stephen Chang Sent: miércoles, 30 de noviembre de 2016 19:56 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users

RE: [racket-users] hyperlink in code:comment

2016-11-29 Thread Jos Koot
To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] hyperlink in code:comment You can use the escape identifier: #lang scribble/manual @(require scribble/eval (for-label racket)) @interaction[ (define a (list 1)) (define b (list 1)) (code:comment @#,para{a and b are not @racket

RE: [racket-users] Re: Best alternate editor/IDE for someone who gets overwhelmed by complexity

2016-11-26 Thread Jos Koot
Go to menu item: edit, preferences, background-expansion and enable it. Sometimes it is necessary to close and reopen DrRacket to get the choices active. Jos -Original Message- From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com] On Behalf Of SR Sent: sábado, 26

RE: [racket-users] css and js files when using scribble

2016-11-26 Thread Jos Koot
Thanks for the clear answer. I'll try raco pkg install ..., but command line stuff is troublesome on windows. But I'll try. Jos _ From: Matthew Butterick [mailto:m...@mbtype.com] Sent: viernes, 25 de noviembre de 2016 23:03 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] css

[racket-users] css and js files when using scribble

2016-11-25 Thread Jos Koot
Hi, Every time I click Scribble HTML in DrRacket for a scribble/manual module in a separate directory I find that a number of css files and two js files are produced in the same directory (Windows 7) Are these files always the same? If so can't we put them in Appdata.Roaming, in order to avoid

RE: [racket-users] If a thunk is a proc of zero arguments, what is a proc of one argument?

2016-11-12 Thread Jos Koot
Your quastion is not clear to me but may be you want --thunk*--? Jos _ From: racket-users@googlegroups.com [mailto:racket-users@googlegroups.com] On Behalf Of David Storrs Sent: sábado, 12 de noviembre de 2016 22:23 To: Racket Users Subject: [racket-users] If a thunk is a proc of zero

RE: [racket-users] Structs vs Lists

2016-10-27 Thread Jos Koot
Hi Lisp (and Racket) programmers know the value, Fortran (and assembler) programmers the cost. Nowadays the PLTeam is working on effeciency too, I think. But: the most important factor for efficient programming is to select efficient algorithms. Two very simple, but notorious examples where you

RE: [racket-users] scribble/eval interaction hyperlinks locally bound variables

2016-10-27 Thread Jos Koot
] Sent: jueves, 27 de octubre de 2016 16:46 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] scribble/eval interaction hyperlinks locally bound variables > On Oct 27, 2016, at 5:34 AM, Jos Koot <jos.k...@gmail.com> wrote: > > Consider: > #lang scribble/manual >

[racket-users] scribble/eval interaction hyperlinks locally bound variables

2016-10-27 Thread Jos Koot
Consider: #lang scribble/manual @(require (for-label racket) scribble/eval)) @interaction[(let ((add1 sub1)) (add1 1))] In the produced HTML file the locally bound variable 'add1' is linked (in blue) to the docs of Racket's procedure 'add1'. The same problem with @racket[...] I can avoid this

RE: [racket-users] optional hyphen in scibble

2016-10-02 Thread Jos Koot
[mailto:benjaminlgreen...@gmail.com] Sent: domingo, 02 de octubre de 2016 21:34 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] optional hyphen in scibble Maybe: https://pkgn.racket-lang.org/package/hyphenate On Sun, Oct 2, 2016 at 3:30 PM, Jos Koot <jos.k...@gmail.com> wrote: Hi

[racket-users] optional hyphen in scibble

2016-10-02 Thread Jos Koot
Hi to all of this nice list, IIRC I have seen a tool to put optional hyphens in running text in order to allow scribble to break words at the end of a line. However, I no longer can't find it (I know, I am a bad browser) A pointer to the related docs will be appreciated very much. Thanks, Jos

RE: [racket-users] Trouble with recursive lambda macros, using Y combinator

2016-09-11 Thread Jos Koot
_ From: Jos Koot [mailto:jos.k...@gmail.com] Sent: lunes, 12 de septiembre de 2016 4:07 To: 'Vasily Rybakov'; 'Racket Users' Cc: 'Jos Koot' Subject: RE: [racket-users] Trouble with recursive lambda macros, using Y combinator When using a macro, always think: "can I do the same wi

RE: [racket-users] Trouble with recursive lambda macros, using Y combinator

2016-09-11 Thread Jos Koot
When using a macro, always think: "can I do the same without a macro?" You use the simple auto-applicator (lambda (x) (x x)). I suggest to use an applicative-order Y-combinator, such as: (define Y (λ (m) ((λ (f) (f f)) (λ (g) (m (λ (n) ((g g) n))) Now: ((Y (lambda (!) (lambda (n) (if (zero? n)

RE: [racket-users] typed racket confusion

2016-09-09 Thread Jos Koot
] Sent: viernes, 09 de septiembre de 2016 22:21 To: Jos Koot Cc: Racket Users Subject: Re: [racket-users] typed racket confusion Because in function `b`, the type of the `lambda` that `n` actually be passed to is the union of `add1` and `sub1` in the context, hence, the info on parity of `n

[racket-users] typed racket confusion

2016-09-09 Thread Jos Koot
#lang typed/racket (define (a (n : Exact-Nonnegative-Integer)) : Exact-Nonnegative-Integer (if (even? n) (add1 n) (sub1 n))) (define (b (n : Exact-Nonnegative-Integer)) : Exact-Nonnegative-Integer ((if (even? n) add1 sub1) n)) Function a goes well, but function b gives an error during

RE: [racket-users] Scribble: unnumbered and unindexed sections

2016-09-04 Thread Jos Koot
Would this do what you want? #lang scribble/base @section{a} @subsubsub*section{a} @subsubsub*section{a} @subsubsub*section{a} @section{b} @seclink["a" "section a"] @subsubsub*section{b} @subsubsub*section{b} @subsubsub*section{b} @section{b} @subsubsub*section{b} @subsubsub*section{b}

RE: [racket-users] Re: HtDP 2e

2016-08-28 Thread Jos Koot
I love it too, but I think he author(s) want much more than teach a language. They want to teach designing programs (in arbitrary language I think). They have chosen student languages (subsets of racket) to talk about design. To Matthias: I love the book very much as said above. Nevertheless

[racket-users] RE: linespacing in scribble with superscripts

2016-08-23 Thread Jos Koot
Thanks very much. Very clear answer. I am talking about HTML, indeed. I certainly will try your code. Thanks again, Jos -Original Message- From: Dupéron Georges [mailto:jahvascriptman...@gmail.com] Sent: martes, 23 de agosto de 2016 12:56 To: Racket Users Cc: jos.k...@gmail.com Subject:

[racket-users] linespacing in scribble with superscripts

2016-08-18 Thread Jos Koot
Consider: #lang scribble/manual bla blah blah@(linebreak) blah blah bla @superscript{blah blah bah}@(linebreak) bla blah blah Works very well, but the linespacing between the first 2 lines is larger than between the last 2 lines. Can I force scribble to maintain the standard linespacing when a

[racket-users] tail-position in for/list form?

2016-08-17 Thread Jos Koot
Question: In the definitions window of DrRacket: #lang racket (for/list ((x (in-list '(a b c))) (k (in-naturals))) (cons k x)) When I place the cursor on the leftmost parenthesis of the for/list form, I see a pink arrow to the subexpr (cons k x). How can (cons k x) possibly be in tail position

[racket-users] Playing with finite groups.

2016-08-04 Thread Jos Koot
To whom is interested https://github.com/joskoot/restricted-permutations A module that represents permutations by bijections, id est, by functions. Documentation (scribble) is included. Care has been taken such that two permutations representing the same mathemathical permutation are the same in

  1   2   >