
I think you’ll have to try; I don’t remember a particular decision to stop supporting windows 2000

It would probably have to do with what version of the Microsoft C/C++ compiler stopped supporting their runtime libraries for win 2000 then.

@mflatt, I have a question about adding new built-in function to racket-on-chez:

Here is the changeset: https://github.com/capfredf/racket/commit/222bc83babde7c023ec79181fd0ad807b38d1067
What I have trying to do is to add the function struct-type-property-predicate-procedure?

make run
is successful, but I still can’t use the function in Racket-on-Chez. I am guessing I need to export the identifier elsewhere other than racket/src/cs/primitive/kernel.ss

The issue is that the expander has to know about the list of built-in names

and I think that’s computed when the expander is extracted

see expander/boot/kernel.rkt among others

I forget what the new steps to add a primitive function are, but I think you may have to add a stub version to the traditional backend as well

My guess though is the last runtimes which came with Visual Studio 2005 as that’s the last supported VS for Win 2000.

Are you thinking about compiling it yourself? or using the pre-built binaries.

But again, I would just try them out.

Pre-built

@samth, thank you. I am thinking about adding a stub to cvm as well.

For building, I’m curious how far I can get to porting the non-gui parts of Racket to Haiku.

Matt’s ’99 paper about MrEd kinda surprised me when he mentioned non-gui parts of PLT running on BeOS.

I expect the GUI portions should be more likely to work post 5.1, at least if Gtk works

@capfredf You’ve done what is minimally needed for Racket CS. Probably the racket/base
module hasn’t been rebuilt, so it still has the old list of primitives from its (provide (all-from-out '#%kernel))
. Also, the mismatch between Racket CS and traditional Racket is likely to cause trouble, as Sam suggests. Generally, it’s best to add a primitive in both places and increment the version number, and then things will build consistently.

@mflatt Thank you. I made it work by adding a stub and changing other things accordingly. But when I ran make in-place
in the root directory of my racket repo, I got: inspector-superior?: arity mismatch;
the expected number of arguments does not match the given number
expected: 2
given: 0
So I pulled down a clean repo, rebuild the development mode. I wonder why there isn’t a clean
rule in the makefile in the root directory. Or did I miss anything?

Instead of having a clean
that is always half-broken because it’s difficult to get clean
right, I use git clean -d -x -f
. But if you changed the version number, you shouldn’t need to clean.

Thanks, that was indeed the issue there.

Thank you. I misread your message. I thought the increment to the version number only mattered when racket was built for a release.

Does anyone have an example of using quasiquotes with racket macros? I’m trying to make something work but it just prepares the syntax and returns it quoted, I need its return value to be considered as the macro expansion

(define-syntax (maybe-do stx) (syntax-case stx () [(_ e) #`(begin #,(if (even? (random 100)) #'e #'(void)))]))

What’s the #
doing? I’ve only seen backtick (quasiquote) and ’ (quote) before this. Also, what kind of functions can I use at compile time? Looks like I won’t be able to use racket/list
functions, it complains.

You need to do (require (for-syntax racket/list))

only racket/base
is available by default at compile time

#'
is like '
but for syntax objects

Interesting. I also found https://docs.racket-lang.org/guide/stx-obj.html for "#`" just now. Looks like I have some more reading to do.

Thanks!


This turned out to be quite useful. Thanks!

Can I provide type annotations to match-lambda?

This seems to suggest that there isn’t built-in support in match’s syntax for it: https://docs.racket-lang.org/ts-guide/more.html?q=Annotating%20Single%20Variables#%28part._.Annotating_.Single_.Variables%29.

You can do this:
#lang typed/racket
(: f ((Listof Number) -> Number))
(define f (match-lambda
[(list x 1 2) x]))

For the Windows build, has anyone ever mentioned that, in the file msvcprep.bat, that if you have Visual Studio 2019 Community Preview installed instead of Community, then the VCVARBAT env var path is …\2019\Preview\VC…instead of …\2019\Community\VC…

Just a one-line add to the list of “if not exist” possible paths

Should be easy to add. Do you want to make a pull request?

Splitting a string into lines using a batching transducer:
(require rebellion/collection/list
rebellion/streaming/reducer
rebellion/streaming/transducer)
(define str
"Haikus are easy
But sometimes they don't make sense
Refrigerator")
(transduce str
(batching into-line)
#:into into-list)
Output:
'("Haikus are easy" "But sometimes they don't make sense" "Refrigerator")