Re: [racket-users] typing variable length argument lists

2020-04-10 Thread Jon Zeppieri
(define (unique [list : (Listof Any)] [message : String] . [messageargs : Any *]) ; return the only element of the list, or '() if there is none. ; Produce message if not just one. (if (equal? 1 (length list)) (car list) (begin (apply fprintf anomaly message messageargs) (i

[racket-users] typing variable length argument lists

2020-04-10 Thread Hendrik Boom
Trying to convert the following to typed Racket: (define (unique list message . messageargs) ; return the only element of the list, or '() if there is none. ; Produce message if not just one. (if (equal? 1 (length list)) (car list) (begin (apply fprintf (cons anomaly (cons messa

Re: [racket-users] Starting a language after Beautiful Racket

2020-04-10 Thread Matthew Butterick
Three options: 1) Implement your language in `#lang br` now (and optionally convert to `racket/base` later) [1] 2) Import the `br/datum` module into a `#lang racket/base` program to get `format-datum` [2] 3) Reimplement `format-datum` your own way. You can see the underlying code by right-cli

[racket-users] Re: Organizing tests in project

2020-04-10 Thread Siddhartha Kasivajhula
Hi, I'm still seeing an error on the Racket package server, but the build output is from March 31, 2019 and doesn't seem to be showing updated output. I gather that the server bui

[racket-users] Re: Are there interfaces for IP ports at least raw sockets?

2020-04-10 Thread Ray Racine
On Thursday, April 9, 2020 at 4:52:31 PM UTC-4, Tony Garnock-Jones wrote: > > If you've not already seen and considered it, > https://github.com/tonyg/racket-packet-socket might be worth a look. > > Regards, > Tony > Appropriate moment to give Syndicate some of the attention level it deserves

[racket-users] ports->ssl-ports issues, plus DTLS question

2020-04-10 Thread David Storrs
We are trying to use TLS (or, more specifically, DTLS) over UDP. In order to do this we create an input-port?/output-port? pair via make-pipe and then run the pair through ports->ssl-ports. The handshake this causes is failing and therefore the whole process hangs and the ports don't get converte

Re: [racket-users] Starting a language after Beautiful Racket

2020-04-10 Thread Pratyush Das
A followup question - But this assumes that the br lang is being used(I think because of the > format-datum syntax). How do I implement this without using the br lang? ... (define src-lines (p

Re: [racket-users] [re: opengl] Is this known Racket syntax?

2020-04-10 Thread Hendrik Boom
On Fri, Apr 10, 2020 at 10:17:12AM -0400, Hendrik Boom wrote: > On Fri, Apr 10, 2020 at 10:05:34AM -0400, Jay McCarthy wrote: > > This comes from _fun, which define-gl expands to, > > > > https://docs.racket-lang.org/foreign/foreign_procedures.html#%28form._%28%28lib._ffi%2Funsafe..rkt%29.__fun%29

Re: [racket-users] [re: opengl] Is this known Racket syntax?

2020-04-10 Thread Hendrik Boom
On Fri, Apr 10, 2020 at 10:05:34AM -0400, Jay McCarthy wrote: > This comes from _fun, which define-gl expands to, > > https://docs.racket-lang.org/foreign/foreign_procedures.html#%28form._%28%28lib._ffi%2Funsafe..rkt%29.__fun%29%29 > > The first -> is a type spec for the C function's return type

Re: [racket-users] [re: opengl] Is this known Racket syntax?

2020-04-10 Thread Jay McCarthy
This comes from _fun, which define-gl expands to, https://docs.racket-lang.org/foreign/foreign_procedures.html#%28form._%28%28lib._ffi%2Funsafe..rkt%29.__fun%29%29 The first -> is a type spec for the C function's return type and the second -> is the output expression that is what the Racket wrapp

[racket-users] [re: opengl] Is this known Racket syntax?

2020-04-10 Thread Hendrik Boom
I'm building the new opengl binding for Racket, and keep running into surprises. Most of them are straightforward, but tedious, but I run into something strange. It's a piece of syntax in the original (presumably) corrent, but obsolete, binding -- specifically, a strange type. I thought I shoul

[racket-users] Starting a language after Beautiful Racket

2020-04-10 Thread Pratyush Das
I am absolutely new to both Racket and language implementation. I read through some portions of Beautiful Racket and the racket guide before trying to implement a language on my own and this