Re: [racket-users] How 'Pythonic' Can Racket Be Made?

2023-10-12 Thread Jens Axel Søgaard
There a #lang python implementation here: https://github.com/pedropramos/PyonR/tree/master A paper on it: https://www.inesc-id.pt/ficheiros/publicacoes/10173.pdf /Jens Axel -- This group is deprecated and retained as an archive. Racket discussions have moved to the Racket Discourse at https://

Re: [racket-users] Macro generating macro question

2023-05-24 Thread Jens Axel Søgaard
stx) (syntax-parse stx [(_ parms ooo) #'(list parms ooo)])))])) (make-id-macro foo) (do-foo 1 2) See you on Racket Discourse. /Jens Axel Den ons. 24. maj 2023 kl. 06.27 skrev Kevin Forchione : > Hi guys, > I’m stumped. In a nutshell I want to

Re: [racket-users] Some DrRacket preferences unreadable

2022-12-29 Thread Jens Axel Søgaard
om this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/racket-users/4ba70e7b-e7ac-4720-898a-d9548dbc8426n%40googlegroups.com > <https://groups.google.com

Re: [racket-users] can't open DrRacket 8.5 on M1 macOS

2022-07-04 Thread Jens Axel Søgaard
Also - was Racket moved to the Applications ? It looks like your colleague is opening from the downloaded archive [but I could be wrong]. Den man. 4. jul. 2022 kl. 13.18 skrev Jens Axel Søgaard < jensa...@soegaard.net>: > Can you open it from the terminal: > > open /Applicatio

Re: [racket-users] can't open DrRacket 8.5 on M1 macOS

2022-07-04 Thread Jens Axel Søgaard
Can you open it from the terminal: open /Applications/Racket\ v8.5/DrRacket.app This way any errors will be visible. /Jens Axel Den man. 4. jul. 2022 kl. 12.49 skrev Kuang-Chen Lu : > Hi, > > My colleague can’t open a fresh installation of DrRacket. She installed > the DrRack

[racket-users] map in typed/racket

2022-06-10 Thread Axel Schnell
I have a little bit of a problem in understanding the function map with typed/racket. My problem starts with an application of map which in normal racket is very straight forward: > (map car '(("Eins" "One" "Un") ("Zwei" "Dos" "Two" "Deux") ("Drei" "Tres" "Trois"))) '("Eins" "Zwei" "Drei") If ma

Re: [racket-users] Beginner's question

2021-12-14 Thread Jens Axel Søgaard
Try reversing the order for arguments for both fp and f. /Jens Axel Den tir. 14. dec. 2021 kl. 19.48 skrev Cyrille DEUSS < cyrille.de...@gmail.com>: > #lang racket > (require racket/format) > > (define pp_number > (lambda (n) > (~a n #:width 6 #:align 

Re: the end of the [racket-users] mailing list and the migration to Discourse as a forum for Racket

2021-11-22 Thread Jens Axel Søgaard
site to receiving as Internet mail the contributions to the > Discursive forum for Racket <https://racket.discourse.group/>. The > stewards of Racket <https://racket-lang.org/> have published a facility > for enlisting as a participant in the Discursive forum for Racket > <http

Re: [racket-users] How to discover a struct's interface without Dr Racket?

2021-10-31 Thread Jens Axel Søgaard
info (force (struct-ref beauty))) (map struct-field-name (struct-info-fields info)) The result is: '(breed color legs) Den søn. 31. okt. 2021 kl. 13.06 skrev David Storrs : > > > On Sun, Oct 31, 2021, 7:49 AM Jens Axel Søgaard > wrote: > >> Hi Brian, >> >> A

Re: [racket-users] How to discover a struct's interface without Dr Racket?

2021-10-31 Thread Jens Axel Søgaard
g code. /Jens Axel Den søn. 31. okt. 2021 kl. 11.42 skrev Matt Jadud : > Hi Brian, > > Does this help move you forward? > > It has been a while since I've stared at macros in Racket, so this might > be easier... > > Also, make sure you're executing this code in a

Re: [racket-users] Doc pages search engine difficulties

2021-08-17 Thread Jens Axel Søgaard
ites. It worked "okay", but not great. The current system works much better. That said, I understand that the amount of documentation has grown to such a size, that it can be difficult for newcomers to navigate. Maybe "cheat sheets" such as https://docs.racket-lang.org

Re: [racket-users] problem of gui layout using side-by-side frames

2021-08-12 Thread Jens Axel Søgaard
://developer.apple.com/design/human-interface-guidelines/macos/menus/menu-anatomy/ /Jens Axel -- 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-us

Re: [racket-users] frame width and (get-display-size) ...

2021-08-05 Thread Jens Axel Søgaard
n on the web visit > https://groups.google.com/d/msgid/racket-users/1e605128-50b3-4578-bf60-2aaa68016006n%40googlegroups.com > <https://groups.google.com/d/msgid/racket-users/1e605128-50b3-4578-bf60-2aaa68016006n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > --

Re: [racket-users] Speeding up the conversion of flvectors to string

2021-06-27 Thread Jens Axel Søgaard
is, proportional to 1). Note: This phenomenon that using string-append in a loop is not a Racket only problem. It is a common pitfall in many languages. [1] Remember the famous story of Gauss as a child that calculated 1+2+...1000 ? https://www.youtube.com/watch?v=Dd81F6-Ar_0

Re: [racket-users] Speeding up the conversion of flvectors to string

2021-06-27 Thread Jens Axel Søgaard
essandro > > -- > 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. > To view this discu

Re: [racket-users] Is it possible to effectively display a window with a bitmap background?

2021-06-25 Thread Jens Axel Søgaard
glegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/racket-users/565f3573-8759-4d72-8277-35bf3297befdn%40googlegroups.com > <https://groups.google.com/d/msgid/racket-users/565f3573-8759-4d72-8277-35bf3297befdn%40googlegroups.com?utm_medium=e

Re: [racket-users] Can we provide a list of functions?

2021-06-17 Thread Jens Axel Søgaard
miliar with macros, I hope the overview will give you a good start. If not, the overview skipped a lot of details, so you will need to look at an introduction to macros first. If you are interested, I'll be happy to send you a work-in-progress macro tutorial I am working. I am always looking

Re: [racket-users] canvas% mouse event handling difference in Racket CS?

2021-05-22 Thread Jens Axel Søgaard
ks have to be ;; atomic. At the same time, we need some atomic callbacks to be able ;; to escape with an exception. It matches your observations. https://github.com/racket/draw/blob/master/draw-lib/racket/draw/unsafe/callback.rkt /Jens Axel -- You received this message because you are

Re: [racket-users] Is there a good Racket DSL alternative to Image Magick?

2021-05-11 Thread Jens Axel Søgaard
Hi Robert, There are some bindings for Magick in the example folder for the FFI library. https://github.com/racket/racket/tree/master/pkgs/racket-doc/ffi/examples The bindings are in magic.rkt and examples of use are in use-magick.rkt (see the bottom). /Jens Axel Den tir. 11. maj 2021 kl

Re: [racket-users] macros in Racket repository

2021-05-09 Thread Jens Axel Søgaard
(such as syntax-case and syntax-parse) are available, so it is written using only primitive constructs. That is, that particular file does not represent the usual style of macro writing. /Jens Axel Den søn. 9. maj 2021 kl. 16.13 skrev Ryan Culpepper : > Here are the three most convenient

Re: [racket-users] SRFI 216 "SICP Prerequisites" vs #lang sicp

2021-03-09 Thread Jens Axel Søgaard
CP_Language.html The code is here: https://github.com/sicp-lang/sicp/blob/master/sicp/main.rkt Note that `sicp-pict` provides a modern implementation of the Henderson picture language. With colors and high resolution as well as support for pens and brushes. https://github.com/sicp-lang/sicp/blob/maste

Re: [racket-users] Bit Scan Reverse in Racket

2021-02-25 Thread Jens Axel Søgaard
Try integer-length. https://docs.racket-lang.org/reference/generic-numbers.html?q=integer-length#%28def._%28%28quote._~23~25kernel%29._integer-length%29%29 I don't know how it is implemented. /Jens Axel Den tor. 25. feb. 2021 kl. 09.52 skrev Dominik Pantůček < dominik.pantu...@tru

Re: [racket-users] flomat -- possible typo in documentation

2021-02-23 Thread Jens Axel Søgaard
ared. > > Presumably it should say "are not copied". > Thanks! The docs are now fixed. /Jens Axel -- 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,

Re: [racket-users] New to Racket

2021-02-18 Thread Jens Axel Søgaard
s over real floating points, take a look at: https://docs.racket-lang.org/manual-flomat/index.html /Jens Axel -- 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 emai

Re: [racket-users] Moving a Rust/Haskell abstract algebra library to Racket?

2021-01-30 Thread Jens Axel Søgaard
Den tor. 21. jan. 2021 kl. 05.06 skrev Stuart Hungerford < stuart.hungerf...@gmail.com>: > My project is really aimed at supporting self-directed learning of > concepts from abstract algebra. > I was taught many years ago that to really understand something to try > implementing it in a high level

Re: [racket-users] Moving a Rust/Haskell abstract algebra library to Racket?

2021-01-24 Thread Jens Axel Søgaard
Den tor. 21. jan. 2021 kl. 05.06 skrev Stuart Hungerford < stuart.hungerf...@gmail.com>: > On Thursday, 21 January 2021 at 10:22:45 UTC+11 Jens Axel Søgaard wrote: > > > Back to your project - what is the goal of the project? > > Making something like GAP perhaps? >

Re: [racket-users] Moving a Rust/Haskell abstract algebra library to Racket?

2021-01-20 Thread Jens Axel Søgaard
ions. Thanks to the custom matcher, it ought to be possible to change the underlying representation and still reuse most parts of the code. That's a future project. Back to your project - what is the goal of the project? Making something like GAP perhaps? Do you want your users to supply ty

Re: [racket-users] Linear algebra performance (was: calculations with arrays)

2020-11-24 Thread Jens Axel Søgaard
mproved for smaller matrices by calling specialized routines written in Racket. If you (or anyone else) are interested in improving `flomat` for multiplying smaller matrices, I would be glad to receive patches. Btw - you have some fancy tricks in `flalgebra.rkt` ! /Jens Axel -- You received thi

Re: [racket-users] calculations with arrays

2020-11-18 Thread Jens Axel Søgaard
erlying C/Fortran library that NumPy uses. https://docs.racket-lang.org/manual-flomat/index.html If you need rrays with more dimensions than 2 use `math/array`. If you need simple computation of 1-dimensional data, you can use standard Racket vectors (or flomats or arrays). /Jens Axel -- You rece

Re: [racket-users] Package Server Update Status

2020-08-18 Thread Jens Axel Søgaard
hasn't been reflected in the build. > > Is there a problem with the server at the moment or am I simply being > impatient? > Been there. Is it possible to send a "your package has now been built" email, to those authors that recently clicked the "scan my packages&

Re: [racket-users] [racket users] %app question

2020-08-13 Thread Jens Axel Søgaard
ot; (postpones) the evaluation of its arguments. This can simply we be removed, if you don't need it. More details here: https://github.com/soegaard/bracket/blob/master/bracket/bracket.rkt#L80 /Jens Axel https://racket-stories.com -- You received this message because you are subscribed to

Re: [racket-users] macro hiding in raco expand

2020-08-10 Thread Jens Axel Søgaard
Hi Éric, This is a nice idea - I pondered the concept before, but today I got a little further. I am unsure whether the approach scales. You could look at nanopass too. Anyways, here is a little experiment. /Jens Axel https://racket-stories.com #lang racket (require (for-syntax syntax/parse

Re: [racket-users] namespaces + eval + reader

2020-07-31 Thread Jens Axel Søgaard
d in lines 46-48: [read-case-sensitive (lookup 'read-case-sensitive table)] [read-decimal-as-inexact #f] [read-accept-dot #f] /Jens Axel -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop rece

Re: [racket-users] combining require, build-path, and namespaces

2020-07-21 Thread Jens Axel Søgaard
> >> ; #> >> >> (The file in question begins with #lang racket.) >> >> #lang racket (define ns (make-base-namespace)) (define p (build-path "/Users/soegaard/tmp" "w1.rkt")) (parameterize ([current-namespace ns]) (namespace-require p))

Re: [racket-users] combining require, build-path, and namespaces

2020-07-21 Thread Jens Axel Søgaard
n entirely satisfactory > solution because I may not always know what names f is providing.) > Sounds like a job for `namespace-require` with a require spec of the form `(file ,(path->string (build-path f)))`. /Jens Axel -- You received this message because you are subscribed to the Google

Re: [racket-users] Font bearing - lining up texts and outlines

2020-07-21 Thread Jens Axel Søgaard
Den man. 20. jul. 2020 kl. 19.14 skrev Jens Axel Søgaard < jensa...@soegaard.net>: > Thanks for the response. > > I have attempted to go in your foot steps and have made a single file > example, so it is easy to try out. > Just to recap, the goal is to get the vertical bearin

Re: [racket-users] Layout + styling in racket/gui

2020-07-07 Thread Jens Axel Søgaard
x Harsányi has written many blog posts on how to use the Racket gui. https://racket-stories.com/from/327 Other gui related blog posts: https://racket-stories.com/from/248 Video in Racket guis: https://www.youtube.com/watch?v=yo6wVXS6dkU /Jens Axel -- You received this message because you are s

Re: [racket-users] Layout + styling in racket/gui

2020-07-06 Thread Jens Axel Søgaard
If you are looking for examples of how to use the Racket GUI toolkit, I can recommend: https://github.com/mfelleisen/7GUI It contains Racket implementations of the 7 gui tasks mentioned here: https://eugenkiss.github.io/7guis/tasks /Jens Axel Den man. 6. jul. 2020 kl. 23.54 skrev Travis

Re: [racket-users] Is it possible to simulate FEXPRs in Racket?

2020-06-07 Thread Jens Axel Søgaard
interpreter page LiSP (Lisp in Small Pieces) where an interpreter for fexprs is discussed with full working code. /Jens Axel https://racket-stories.com -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe f

Re: [racket-users] Some stuff about "case".

2020-06-01 Thread Jens Axel Søgaard
code (which would either use an > alist or an immutable hashtable). I think `case` were more important before `match` arrived. If you want to see how `case` can be implemented without hash-tables, look at William D Clinger's paper: http://scheme2006.cs.uchicago.edu/07-clinger.pdf /J

Re: [racket-users] Re: How to make DrRacket interactions window use the same reader as the definitions window?

2020-05-29 Thread Jens Axel Søgaard
There may be other solutions, but one way to control the evaluation of expressions entered in the REPL is to provide an #%top-interaction, which sets the appropriate parameters. /Jens Axel -- You received this message because you are subscribed to the Google Groups "Racket Users"

Re: [racket-users] Re: Typing lag with DrRacket on Linux

2020-05-28 Thread Jens Axel Søgaard
Slack users confirm the problem when the backing scale is 1.5. Should DrRacket give a warning dialog on Linux, when started with a non-integer backing scale? /Jens Axel Den ons. 13. maj 2020 kl. 05.48 skrev evdubs : > I did some more digging and found locations in racket/draw that cont

Re: [racket-users] coding style query

2020-05-27 Thread Jens Axel Søgaard
d the symbol with two spaces to each side instead of just one. Can't remember where I picked that habit up. /Jens Axel https://racket-stories.com -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group a

Re: [racket-users] Function that potentially can return more than one value

2020-05-27 Thread Jens Axel Søgaard
Den ons. 27. maj 2020 kl. 19.27 skrev George Neuner : > > On 5/27/2020 6:34 AM, Jens Axel Søgaard wrote: > > > > In standard Racket an application doesn't communicate how many values > > a function is expected to produce. > > You can ask: see procedure-resu

Re: [racket-users] Migrating from a "model-driven" language framework to Racket

2020-05-25 Thread Jens Axel Søgaard
ood idea. It is much easier to provide feedback based on a concrete example. /Jens Axel Den tor. 21. maj 2020 kl. 18.36 skrev Guillaume Savaton < guillaume.sava...@gmail.com>: > I am a Racket beginner trying to create my own DSL. > As a long-time user of Xtext and other similar too

Re: [racket-users] Re: Practical HTTP requests?

2020-05-17 Thread Jens Axel Søgaard
Take a look at the `http` package. https://docs.racket-lang.org/http/index.html I believe it can be used to receive and send cookies (and other headers), but I don't know how much is automatic. /Jens Axel Racket Stories https://racket-stories.com Den søn. 17. maj 2020 kl. 17.51

Re: [racket-users] Re: Strange behaviour of ptr-ref + ptr-add(?)

2020-05-10 Thread Jens Axel Søgaard
-set.rkt#L46 /Jens Axel Den søn. 10. maj 2020 kl. 10.51 skrev Laurent : > Correction: > It's not Mac vs Linux, it's Racket BC (works) vs CS (doesn't work) > > On Sun, May 10, 2020 at 9:49 AM Laurent wrote: > >> Hi all, >> >> We're trying

Re: [racket-users] A convenient assertion macro - with one caveat

2020-05-07 Thread Jens Axel Søgaard
(check-equal? ?a ?b #'?a] [(_assert ?a) (quasisyntax/loc stx (module+ test (require rackunit) #,(syntax/loc stx (check-true ?a #'?a])) /Jens Axel Racket Stories https://racket-stories.com Den tor. 7. maj 2020 kl. 11.22 skrev Dexter Lagan : > Hi,

Re: [racket-users] a minor regexp question (and a how-could-I-answer-it-myself? question)

2020-05-01 Thread Jens Axel Søgaard
coped_q=regexp+type%3Aissue > > is better, but either way I'm quickly pretty lost in terms of deciding > whether this relates to a known issue. > You need to look at docs.racket-lang.org instead. Then search for "regexp" or "regular expression". You will th

Re: [racket-users] Question on test failures sorting a BTS

2020-04-27 Thread Jens Axel Søgaard
ode-left nod) (list (node-value nod)) (bst-sort (node-right nod is the problem. It can be reformatted to make it clearer: (bst-sort (node-left nod) (list (node-value nod)) (bst-sort (node-right nod)))) You are providing 3 arguments to bst-sort, bu

Re: [racket-users] rename-in issue

2020-04-09 Thread Jens Axel Søgaard
spatchers/dispatch-sequencer (make dispatch-sequencer)) interface-version)) /Jens Axel https://racket-stories.com -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from t

Re: [racket-users] BLAS and LAPACK bindings for operations over math/matrix

2020-03-28 Thread Jens Axel Søgaard
you will need write conversion functions. /Jens Axel -- 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. To view

Re: [racket-users] Help with vector-sort

2020-02-15 Thread Jens Axel Søgaard
fine (compare x y) (if (and (real? x) (real? y)) (< x y) (error 'compare "expected two real numbers, got: ~a ~a" x y))) (vector-sort (vector 3 1 5 2) compare) /Jens Axel -- You received this message because you are subscribed to the Google Groups "Rac

Re: [racket-users] resources for learning JS / React?

2020-01-26 Thread Jens Axel Søgaard
If he is using React for a new project, I suggest using React Hooks. React Hooks were introduced in 2018 and "feels more functional" than their previous approach. https://reactjs.org/docs/hooks-intro.html /Jens Axel Den søn. 26. jan. 2020 kl. 18.12 skrev 'John Clements&#x

Re: [racket-users] Web server + authentication

2020-01-23 Thread Jens Axel Søgaard
yet - it'll happen sometime tomorrow. Philip: I'll keep your solution in mind, if I for some reason need to change it. /Jens Axel -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving ema

Re: [racket-users] Web server + authentication

2020-01-21 Thread Jens Axel Søgaard
need to figure out how best to handle sending mails from a server. My concern is being flagged for spamming - so I don't dare use my normal mail. /Jens Axel Den tir. 21. jan. 2020 kl. 22.43 skrev Stephen Foster < step...@thoughtstem.com>: > Ruby on Rails has a nice package called

Re: [racket-users] GUI (get-directory)

2019-12-05 Thread Jens Axel Søgaard
groups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/racket-users/67dff8ff-cbd2-4d26-8901-34fc2be43928%40googlegroups.com > <https://groups.google.com/d/msgid/racket-users/67dff8ff-cbd2-4d26-8901-34fc2be43928%40googlegroups.com?utm_medium=email&utm

Re: [racket-users] Question regarding use of Scribble PDF button (and scribble-math) under Windows

2019-11-25 Thread Jens Axel Søgaard
Den tir. 26. nov. 2019 kl. 01.18 skrev E Comer : > Hi Racket friends: > > The running of the following code produce an error under Windows, when I > try to generate a PDF with the Scribble PDF button under DrRacket 7.5. > > Which error? /Jens Axel -- You received this messa

[racket-users] Parameters and dynamic-require

2019-11-10 Thread Jens Axel Søgaard
value)) (provide out)) (module a racket/base (require 'p) (displayln (list 'a (out))) (define a 43) (provide a)) (require 'p) (displayln (out)) (out "foo") (dynamic-require ''a 'a) The output is: (a original-value) original-value

Re: [racket-users] eq? of quoted expressions

2019-10-25 Thread Jens Axel Søgaard
this explains why Schemers write (define magic (list 'magic)) and not (define magic '(magic)) in order to obtain a unique value, not eq? to any other value. In order to allowing implementations to share values in literals in R5RS it is unspecified what happens when you mutate a

Re: [racket-users] Some guidance in setting up Racket as a game scripting language.

2019-10-07 Thread Jens Axel Søgaard
e solution and upload it somewhere for you to have a > look, but you'll need Visual Studio on Windows for that to work. > I don't have a windows machine - but your test example only have two files. Is there a way to see what options are applied (in a log perhaps)? /Jens Axel -- Y

Re: [racket-users] Some guidance in setting up Racket as a game scripting language.

2019-10-05 Thread Jens Axel Søgaard
> How do I compile the two test files? In the reddit thread you said, I should start with: raco ctool --c-mods base.c ++lib racket/base But what are the options for gcc and the linker? /Jens Axel -- You received this message because you are subscribed to the Google Groups "Racket Users&qu

[racket-users] Racket Stories

2019-10-02 Thread Jens Axel Søgaard
Hi All, As the Slack users already know, I have created a little web-site to share interesting stories/links/blogs/packages/papers on everything Racket-related. https://racket-stories.com Click "submit" to submit your own stories. /Jens Axel -- You received this message becau

Re: [racket-users] General ways and concrete examples of approaching web dev

2019-09-30 Thread Jens Axel Søgaard
comments than I usually write: https://github.com/soegaard/web-tutorial The listit1-listit3 are the initial versions, which might become parts in a tutorial at some point. The almost-ready-to-release version is in version4. The choices I made: - the model uses structs to represent data (and

Re: [racket-users] syntax-parse ellipsis question

2019-09-21 Thread Jens Axel Søgaard
(syntax-parse #'(1 2 2 a 2 2 b 2 c) [(1 (~seq n:nat ...+) x ...) #'(n ... x ...)]) (syntax-parse #'(1 2 2 a 2 2 b 2 c) [(1 n:nat ...+ x ...) #'(n ... x ...)]) /Jens Axel -- You received this message because you are subscribed to the Google Groups "Ra

Re: [racket-users] How to disable back button in web application

2019-09-21 Thread Jens Axel Søgaard
a database, you could use a hash table to store the keys. /Jens Axel -- 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...@googlegr

Re: [racket-users] How to disable back button in web application

2019-09-20 Thread Jens Axel Søgaard
e md5 of a counter) and keep track in a database of which keys have already been used. To prevent the key table from getting too large, you can flip it around: keep the non-used keys in the database, then on submission remove the key. If you also store the age of the key, you can from time to

Re: [racket-users] How to disable back button in web application

2019-09-20 Thread Jens Axel Søgaard
ket-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/racket-users/7e356eb4-e886-4f9c-90cd-0db658d14a91%40googlegroups.com > <https://groups.google.com/d/msgid/racket-users/7e356eb4-e886-4f9c-90cd-0db658d14a91%40googlegr

Re: [racket-users] FFI and immovable pointers for input/output (featuring automatic cropping for picts)

2019-09-19 Thread Jens Axel Søgaard
the foreign call. That means `_ptr` is fine. > Great. Thanks, Jens Axel -- 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...@google

[racket-users] FFI and immovable pointers for input/output (featuring automatic cropping for picts)

2019-09-19 Thread Jens Axel Søgaard
ave used (_ptr io _double) but maybe I need to use a version of _ptr/immobile that also handles io arguments? If so how can I change the definition of _ptr/immobile. See attached file for `crop/inked`. /Jens Axel -- You received this message because you are subscribed to the Google Groups "

Re: [racket-users] Running Big Bang applications in the browser

2019-09-16 Thread Jens Axel Søgaard
Check WeScheme. https://www.wescheme.org/ (forgot to send to the list first time around) /Jens Axel Den man. 16. sep. 2019 kl. 12.26 skrev Maciek Godek : > Hi, > is there any way to deploy Racket's big-bang applications to run in a > browser (or any plans to enable that feature)

Re: [racket-users] transparency in Pict

2019-09-10 Thread Jens Axel Søgaard
Den tir. 10. sep. 2019 kl. 17.04 skrev Hendrik Boom : > On Tue, Sep 10, 2019 at 03:23:43PM +0200, Jens Axel Søgaard wrote: > > > I have extended "clipped" to handle regions defined by more than one > path. > > Now (clipped c ... p) will make a region from the curv

Re: [racket-users] transparency in Pict

2019-09-10 Thread Jens Axel Søgaard
)) (cutout p 200 200 50) Before only one curve was supported and the result of clipped was the interior, so the old clipped couldn't cut holes. /Jens Axel -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from t

Re: [racket-users] transparency in Pict

2019-09-09 Thread Jens Axel Søgaard
w h)) (circle x y r) (set-curve-pict-size 400 400) (def p (brushcolor "red" (fill (regular-polygon 5 (cutout p 200 200 50) /Jens Axel The result (the yellowish color is the background color in my editor): [image: image.png] Den man. 9. sep. 2019 kl

Re: [racket-users] Downloadable tutorials (e.g. on github)? Tutorial example source codes samples attached to DrRacket instalation?

2019-09-09 Thread Jens Axel Søgaard
FWIW there a lot of (small) examples at https://rosettacode.org/wiki/Category:Racket /Jens Axel Den man. 9. sep. 2019 kl. 16.09 skrev Prokop Hapala : > Hi, > > I recently found Racket when I was searching some tutorials about Lisp and > Metaprogramming. I really like that the comm

Re: [racket-users] Listing All Programs

2019-09-05 Thread Jens Axel Søgaard
raint-solving > language named miniKanren. > > Apropos, Friedman and Byrd shows how one can use an interpreter written in Kanren to generate Scheme programs. https://www.youtube.com/watch?v=5vtC7WEN76w /Jens Axel -- You received this message because you are subscribed to the Google Group

Re: [racket-users] I'd like clarification about scribble and pollen.

2019-08-28 Thread Jens Axel Søgaard
Is there a way to see that? Or have I got the wrong > idea entirely? > Open your file in DrRacket. Click run. Now in the repl, evaluate doc. /Jens Axel -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this

Re: [racket-users] running the wrong sqlite3

2019-08-20 Thread Jens Axel Søgaard
And if you are on macOS: mbp:metapict soegaard$ export DYLD_PRINT_LIBRARIES=1 mbp:metapict soegaard$ export DYLD_PRINT_LIBRARIES_POST_LAUNCH=1 mbp:metapict soegaard$ export DYLD_PRINT_RPATHS=1 /Jens Axel Den tir. 20. aug. 2019 kl. 18.49 skrev 'John Clements' via Racket Users <

Re: [racket-users] Unwelcome surprises using Scribble on a 90,000-word novel

2019-08-02 Thread Jens Axel Søgaard
does nothing but requiring the scribble file (which is a module exporting doc-from-mod). It's renamed on import (because we might need to include several documents). Then it is simply inserted into the document at the place include-section is used. /Jens Axel -- You received this message b

Re: [racket-users] Calling function with Scribble text as argument(s)

2019-07-30 Thread Jens Axel Søgaard
Den tir. 30. jul. 2019 kl. 19.02 skrev Hendrik Boom : > I've found this as an example for getting coloured text: > > #lang scribble/base > > @(require scribble/core) > > @(define (colorize #:color c . content) > (elem #:style (style #f (list (color-property c))) >

Re: [racket-users] Re: (ninth RacketCon) videos

2019-07-22 Thread Jens Axel Søgaard
ul. 2019 kl. 23.36 skrev Kees-Jochem Wehrmeijer < henc...@gmail.com>: > Thanks very much! Will your talk also be available Matthew? After all the > racket2 talks it sparked here, I'm kind of curious. > It's available here: https://www.youtube.com/watch?v=dnz6y5U0tFs /Je

Re: [racket-users] Re: Thinking in scheme / racket

2019-07-11 Thread Jens Axel Søgaard
and 50 are reasonable. (define (is-prime? n) (case (mpz_probab_prime_p (mpz n) repetitions) [(2) #t] [(1) 'probably] [(0) #f])) (for/list ([n (in-range 2 100)] #:when (is-prime? n)) n) See https://docs.racket-lang.org/gmp/index.html?q=gmp and https://gmplib.or

[racket-users] Specializing functions accepting keywords

2019-07-10 Thread Jens Axel Søgaard
rity (make-keyword-procedure make-disney-fish) fish-arity (remove '#:studio fish-required) (remove '#:studio fish-allowed Now we can write: (disney-fish #:name "Nemo" #:color "orange") The new disney-fish accepts only keywords accep

Re: [racket-users] HTML rendering

2019-06-21 Thread Jens Axel Søgaard
thin DrRacket would indeed be interesting. Dobson made bindings for webkit at some point - but time flies by. https://github.com/endobson/racket-webkit I know of no newer packages. /Jens Axel -- You received this message because you are subscribed to the Google Groups "Racket User

Re: [racket-users] for loop: any way to access the whole list?

2019-06-14 Thread Jens Axel Søgaard
the current (which are in d and a). /Jens Axel Den fre. 14. jun. 2019 kl. 16.45 skrev Sanjeev Sharma : > within this for loop is there any way to access different pieces of the > description and amt? car-ing and cdr-ing for example? > > Or move the identifier definitions into

Re: [racket-users] Re: How would you implement autoquoted atoms?

2019-04-23 Thread Jens Axel Søgaard
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 options, visit https://groups.google.com/d/optout. > -- --

Re: [racket-users] question about matching with "(? ...)"

2019-04-21 Thread Jens Axel Søgaard
;(1 2 3 4 5) > > > -- > 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 options, v

Re: [racket-users] make extensions or replacements

2019-04-16 Thread Jens Axel Søgaard
rocess somewhat obscure. > > > > Sure, I could invent something. But chances are, someone else already > > has invented something better than I'd improvise. > > > > -- hendrik > > -- > You received this message because you are subscribed to the Google Groups

Re: [racket-users] Pattern: reusing the same name in macro-generated definitions

2019-04-05 Thread Jens Axel Søgaard
Yes! fre. 5. apr. 2019 kl. 13.52 skrev Hendrik Boom : > On Fri, Apr 05, 2019 at 01:35:37PM +0200, Jens Axel Søgaard wrote: > > Den tor. 4. apr. 2019 kl. 21.58 skrev zeRusski >: > > > > (define-simple-macro (define-foo (name:id formal:id ...) body:expr ...) > >

Re: [racket-users] Pattern: reusing the same name in macro-generated definitions

2019-04-05 Thread Jens Axel Søgaard
bar op a b) (op a b)) will define foo_imp_1 and (define-foo (bar op a b) (op a b)) will define foo_imp_2 respectively. Simple models do not explain all situations, but it does handle simple situations. /Jens Axel -- You received this message because you are subscribed to the Google

Re: [racket-users] color-maps for the plot package

2019-03-22 Thread Jens Axel Søgaard
ns: >> >> (plot (list (function sin -5 5) (function cos -5 5))) >> >> If others think that (1) and (2) are worthwhile doing, I will submit a >> PR, so >> we can discuss the API an implementation over something more concrete. I >> am >> open d

Re: [racket-users] color-maps for the plot package

2019-03-20 Thread Jens Axel Søgaard
Den tir. 19. mar. 2019 kl. 23.03 skrev Alex Harsanyi : > On Tuesday, March 19, 2019 at 9:53:23 PM UTC+8, Jens Axel Søgaard wrote: >> >> This is a great idea. >> >> It would be really nice to be able to use the colors also from non-plot >> programs. >> >

Re: [racket-users] color-maps for the plot package

2019-03-19 Thread Jens Axel Søgaard
FWIW see also the Mathematica documentation on ColorSchemes and related functions for inspiration. https://reference.wolfram.com/language/guide/ColorSchemes.html /Jens Axel -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubs

Re: [racket-users] color-maps for the plot package

2019-03-19 Thread Jens Axel Søgaard
This is a great idea. It would be really nice to be able to use the colors also from non-plot programs. /Jens Axel Den tir. 19. mar. 2019 kl. 08.09 skrev Alex Harsanyi : > > The Python matplotlib package supports the concept of a colormap for > selecting > colors for each data

Re: [racket-users] Cannot use case+else inside match+else

2019-02-27 Thread Jens Axel Søgaard
acket Users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to racket-users+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- -- Jens Axel Søgaard -- You received this message because you are subscr

Re: [racket-users] Help with generators from python land!

2019-02-20 Thread Jens Axel Søgaard
ir per score. > > It was easy enough to solve with `for-each` using side-effects to update a > mutable hash, however I think using a generator is a cleaner approach and > doesn't require mutability. > FWIW here is a solution using immutable hashes. I see `for` and friends as Rack

Re: [racket-users] Wishlist for regexen: x mode, named captures, embeddable regexn

2019-02-14 Thread Jens Axel Søgaard
er-tools%2Flex..rkt%29._lexer%29%29 It's not at easy to use as standard #rx and #px expressions though. /Jens Axel -- 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,

Re: [racket-users] Loading foreign libraries on Windows

2019-02-12 Thread Jens Axel Søgaard
ct somewhere, you can just point me to > the file(s).] > > George > > -- > 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-u

Re: [racket-users] Re: nested for loops and suggested alternatives

2019-02-10 Thread Jens Axel Søgaard
rove that (the timings are old - perhaps it has become better already). /Jens Axel -- -- Jens Axel Søgaard -- 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,

Re: [racket-users] Guide and reference

2019-02-08 Thread Jens Axel Søgaard
ver), but more is better. Given the recent discussion on the strengths of Racket, a tutorial on GUIs would be nice. Alex Harsanyi - are you persuadable? Your blog is great: https://alex-hhh.github.io/tags/racket.html /Jens Axel -- You received this message because you are subscribed to the Go

  1   2   3   4   5   6   7   8   >