jcoo092
2020-5-20 07:00:00

For what it’s worth, I personally think in-range-inclusive is by far the most ‘sensible’ and ‘clear’ naming for such a thing. I don’t have much of a LISP background at all though, so having some parameters that start with # is something that’s still fairly foreign to me.


notjack
2020-5-20 07:01:54

plus you won’t have to shadow the existing in-range function


notjack
2020-5-20 07:03:10

took a stab at implementing this https://github.com/racket/scribble/pull/232


laurent.orseau
2020-5-20 07:24:43

CS is getting there though, and is also quite faster in some aspects


soegaard2
2020-5-20 07:34:12

I wish range returned a (range from to) struct instead of a list of actual values. In a for-loop (in-range (range 0 4)) could still be detected.


sorawee
2020-5-20 07:46:40

What’s the point of (in-range (range 0 4))?


sorawee
2020-5-20 07:47:13

Also, I just knew that range that appears directly in a for clause is as efficient as in-range.


soegaard2
2020-5-20 09:36:19

I meant [x (range 0 4)] :slightly_smiling_face:


sorawee
2020-5-20 09:59:51

Oh, in that case, it does that already!


spdegabrielle
2020-5-20 10:20:05

is there a way to do alt text on an image in scribble? #lang scribble/base @(require 2htdp/image) @(add-line (rectangle 100 100 "solid" "darkolivegreen") 25 25 75 75 (make-pen "goldenrod" 30 "solid" "round" "round")) @title{On the Cookie-Eating Habits of Mice} @larger{If you give a @larger{mouse} a cookie, he's going to ask for a glass of milk.}


samth
2020-5-20 11:15:37

@wanpeebaw both of those are indeed better on Racket BC, but on most other measures CS performs better: throughput, GC latency, and it’s faster for more high level programs


soegaard2
2020-5-20 11:47:26

@spdegabrielle Try adding an alt-tag to the style (haven’t tested).


badkins
2020-5-20 12:54:33

I agree with notjack that it seems odd to have a keyword argument used positionally. I would prefer either #:inclusive #t or in-range-inclusive


gfb
2020-5-20 16:46:16

in-clusive-range ?


dest
2020-5-20 17:31:21

@dest has joined the channel


dest
2020-5-20 17:46:45

Hi! I’m here because I want to ask — how could I implement a function which takes some name and then import name.ptree file which is #lang pollen (and actually I want to get the doc from there). The straight way doesn’t work: (local-require (prefix-in ptree: (string-append name ".ptree"))) so I get not a require sub-form . What’s the right way to do this?


samth
2020-5-20 17:48:25

probably you want (dynamic-require (string-append name ".ptree") 'doc)


dest
2020-5-20 18:01:26

okay, it seems to work, but how I can access doc variable when? I get unbound identifier in this code: (dynamic-require (string-append name ".ptree") 'doc) `(div ((class "flow-content")) ,doc))


samth
2020-5-20 18:01:47

The dynamic-require returns the value


dest
2020-5-20 18:02:13

amazing! thnx


sorawee
2020-5-21 00:23:35

If I use a #lang that doesn’t provide sophisticated control operation except exception, is there a difference between using call-with-exception-handler to “set and restore” a variable and using parameterize/with-continuation-mark?

I guess one difference is that the former will not preserve tail call positions, whereas the latter will…. Is there any other difference?

I’m kinda torn because call-with-exception-handler seems to be much more efficient in practice…


notjack
2020-5-21 01:11:27

Looking for a review of this change to Scribble, which allows me to put animations in my package’s documentation: https://github.com/racket/scribble/pull/232