asikts
2018-8-23 11:54:28

@asikts has joined the channel


samth
2018-8-23 15:04:37

@ryanc I’m trying to understand how to use pslide with #:alt and it’s not making sense


samth
2018-8-23 15:05:05

In particular I want to first show pict a and then show pict b at the same location


samth
2018-8-23 15:05:19

this is pretty easy with 'alts in regular slides


samth
2018-8-23 15:05:45

but the obvious ways to do with #:alts produce too many extra slides


ryanc
2018-8-23 15:44:03

@samth here’s one example: #lang racket (require slideshow ppict/2) (pslide #:go (coord 1/2 1/3 'ct) (t "Let's talk about ") #:go (coord 1/2 1/2 'ct) #:alt ((bt "types") #:next (para "Types are cool.")) (bt "macros") #:next (para "Macros are nice."))


samth
2018-8-23 15:45:22

ah, the trick is to put the last alternate outside of #:alt


samth
2018-8-23 15:45:36

thanks!


lexi.lambda
2018-8-23 16:33:52

Is there a way to get the next-largest or next-smallest flonum in Racket, a la the nextafter function in C’s math.h?


samth
2018-8-23 16:49:32

@lexi.lambda i thought there was something like that in one of @ntoronto’s libraries


lexi.lambda
2018-8-23 16:51:28

Ah, it looks like flstep from math/flonum will do it. Thanks!


samth
2018-8-23 20:12:07

@mflatt is there a way to run a module written in #lang slideshow as if it was run under slideshow --widescreen (ie in DrRacket)?


mflatt
2018-8-23 20:13:35

You can run slideshow --widescreen --save-aspect once to configure the default.


samth
2018-8-23 20:15:45

ok, that helps, thanks


mflatt
2018-8-23 20:17:07

You could also set the command line in DrRacket to --widescreen, but that’s probably less convenient


blerner
2018-8-23 20:43:42

@mflatt found a problem with the search-context.html page (https://github.com/racket/racket/blob/master/pkgs/racket-index/scribblings/main/private/search-context.html#L18-L21), on current Edge in Win10. I don’t have a Windows laptop with me at the moment (am relaying what others have told me), but it seems that this particular use of URL, searchParams and/or keys isn’t working quite right in Edge. If you have a windows box to take a look, please do; otherwise I’ll try to diagnose it further myself tonight


plotnus
2018-8-23 22:12:22

When reading the racket documentation and I find a procedure I want to use, how do i know what module I need to require?


shu--hung
2018-8-23 22:17:42

usually the beginning of the section containing that function will document which modules to require


shu--hung
2018-8-23 22:17:48

*subsection


shu--hung
2018-8-23 22:19:04

e.g. split-at is in doc 4.9.7, and the beginning of 4.9.7 says: (require racket/list) package: base The bindings documented in this section are provided by the racket/list and racket libraries, but not racket/base.


shu--hung
2018-8-23 22:22:26

In REPL, ,doc IDENTIFIER sometimes helps


plotnus
2018-8-23 22:24:42

@shu—hung What does it mean if no “require” is listed?


shu--hung
2018-8-23 22:26:50

I don’t know where that could be documented then :disappointed: how about trying ,doc and ,desc? $ racket Welcome to Racket v7.0.0.12. > ,doc parse-markdown Loading help index... No current binding, but provided by: markdown/parse > ,doc split-at Sending to web browser... file: <RACKET>/doc/reference/pairs.html anchor: (def._((lib._racket/list..rkt)._split-at)) > ,desc split-at ; `split-at' is a bound identifier, ; defined in <collects>/racket/list.rkt ; required through "<collects>/racket/init.rkt"


shu--hung
2018-8-23 22:27:03

what function are you looking for?


plotnus
2018-8-23 22:27:52

4.3.2 String Comparisons, string=?


shu--hung
2018-8-23 22:28:17

it’s provide by racket/base


plotnus
2018-8-23 22:28:20

,desc looks useful. I’ll give that a go.


shu--hung
2018-8-23 22:28:20

and racket


shu--hung
2018-8-23 22:29:55

well, string=? is provide by racket/base and racket; since these 2 packages are sort of standard, it’s only mentioned at the front page of Racket Reference


plotnus
2018-8-23 22:30:18

@shu—hung I see thank you for helping me understand how to better navigate the documentation. Much appreciated.


plotnus
2018-8-24 00:28:48

Is there a way forward a syntax object in a macro? A simplified example of what I want to do: (define-syntax (foo stx) (match-define (list _ expr-stx) (syntax->list stx)) (syntax-parse expr-stx [(_ bar) ;; I want to provide the syntax expr-stx as an argument (some-proc bar expr-stx)])) What happens when I do the above is the error unbound identifier in module in: expr-stx


samth
2018-8-24 00:30:18

you want (some-proc bar (quote-syntax #,expr-stx))


samth
2018-8-24 00:30:46

the #, is because expr-stx is a regular variable, not a pattern variable


samth
2018-8-24 00:31:02

and the quote-syntax is to quote it so that it’s data


plotnus
2018-8-24 00:43:58

@samth Thanks for the help. The code I’m working with is slightly different then what I pasted. It has a syntax/loc It looks like this. (define-syntax (foo stx) (match-define (list _ expr-stx) (syntax->list stx)) (syntax-parse expr-stx [(_ bar) (syntax/loc expr-stx (some-proc bar expr-stx))])) Adjusted for quote-syntax as follows I still get the same error (define-syntax (foo stx) (match-define (list _ expr-stx) (syntax->list stx)) (syntax-parse expr-stx [(_ bar) #`(syntax-loc expr-stx (some-proc bar #,expr-stx))])) Do you know how I could forward it with the added syntax-loc?


samth
2018-8-24 00:58:11

you want the last line to be: (quasisyntax/loc expr-stx (some-proc bar (quote-syntax #,expr-stx)))


plotnus
2018-8-24 01:01:29

@samth awesome and thank you. I’ll give that a whirl :slightly_smiling_face: