soegaard2
2021-5-4 13:07:41

I am using (send dc draw-point x y) to draw points. Here is an image where the size varies from 1 to 20.


soegaard2
2021-5-4 13:08:19

If I zoom in on the points I see:


soegaard2
2021-5-4 13:08:56

and further:


soegaard2
2021-5-4 13:09:35

It seems as though none of them are symmetrical. The left colum and top row are “missing” everytime.


soegaard2
2021-5-4 13:10:39

Is there anything I can do to make the points symmetrical (at least for some sizes)?


soegaard2
2021-5-4 13:23:44

Okay - for some reason the smoothing wasn’t set to ’aligned (thus disabling antialising). But … even without antialias … shouldn’t points be symmetrical at least for some sizes?


soegaard2
2021-5-4 13:42:35

Using (line x y (+ x <tel:00000000001\|0.0000000001>) y) I can trick racket/draw to draw a very short line. The points do become symmetrical. I notice that (line x y x y) is caught in (send dc draw-line ...) and calls draw-point.


soegaard2
2021-5-4 13:45:59

jestarray
2021-5-4 15:53:22

8.1 out yet :0 ?


samth
2021-5-4 15:53:41

not yet, should be out soon


jagen315
2021-5-4 22:15:35

What’s the best way to yacc into syntax objects?


kellysmith12.21
2021-5-4 22:59:31

@jagen315 if you want to take a BNF grammar and get a parser that makes syntax objects, I’d suggest https://docs.racket-lang.org/brag/index.html?q=brag


capfredf
2021-5-5 01:16:35

@mflatt when supplying a function as the read-in argument to make-input-port, if the function returns an input-port rather than a pipe-input-port, the program will get stuck


capfredf
2021-5-5 01:16:55

(define-values (in out) (make-pipe #f 'hello 'world)) ;; (write "hello" out) (define (foo s) (open-input-file "./README.md")) (read (make-input-port 'test foo #f void))


capfredf
2021-5-5 01:17:47

should we report an error here? like one when applying pipe-content-length to such a port


mflatt
2021-5-5 01:53:39

Since the result is not a pipe input port, it’s treated as a generic evt. As an evt that’s ready, a port returns itself… so that’s considered another evt to try, and so on. That’s definitely confusing, but it’s not an error.


jagen315
2021-5-5 02:28:40

this was surprisingly easy. I suppose I was avoiding it because I viewed it as a teaching language


capfredf
2021-5-5 02:35:45

Ah, thank you. For Typed Racket, it would make more sense to add a type to describe pipe-port so we can avoid the confusion


capfredf
2021-5-5 02:48:01

but looks like we need export pipe-input-port? and pipe-out-port? in Racket first …


kellysmith12.21
2021-5-5 03:00:54

Brag is very powerful, being able to handle any context-free grammar. Although, if I understand correctly, it has similar performance to other parser generator frameworks, assuming that your language grammar is restricted to a particular class, like LL(k).


jmd1011
2021-5-5 06:17:24

@jmd1011 has joined the channel