spdegabrielle
2019-8-8 09:10:18

@metadave if you are after something that is part of the official racket project try https://github.com/racket/typed-racket/issues?q=is%3Aopen+is%3Aissue+label%3Agood-first-bug


metadave
2019-8-8 14:23:33

@spdegabrielle thank you! I’ll take a look some time today. I’d most likely need something small to start on.


spdegabrielle
2019-8-8 14:25:48

@metadave any particular interests? I can try suggest some things (deleted not relevant)


spdegabrielle
2019-8-8 14:27:48

Oops I forgot you original question. Did you take a look at the ‘good first bug’ link I gave above?


spdegabrielle
2019-8-8 14:51:41

@metadave https://github.com/topics/racket shows issues that are labelled good first issue or good first bug in repositories that have the racket topic


soegaard2
2019-8-8 15:55:14

MetaPict picure of the day:



samth
2019-8-8 16:00:31

@soegaard2 I would think that the dimensions were computed from something else by @mbutterick originally


soegaard2
2019-8-8 16:01:26

@samth Do you know where to look for the original source?


laurent.orseau
2019-8-8 16:01:56

You seem to have put quite some effort to obtain these values!


soegaard2
2019-8-8 16:02:30

It’s no too bad. WebPlotDigitizer is quite handy.


soegaard2
2019-8-8 16:03:06

And despite the name it is a native program - not a web-app.


laurent.orseau
2019-8-8 16:04:34

I get the following error when drawing the second picture: length: contract violation expected: list? given: (raw-gradient (raw-color-stops (list (object:color% ...) (object:color% ...) (object:color% ...) (object:color% ...) (object:color% ...)) '(0 0.18 0.36 0.5 1.0)))


samth
2019-8-8 16:05:45

@soegaard2 I looked back in my email archives, and @mbutterick says he did it “by hand” and only SVG sources were provided. I don’t know if there was a font used to construct it originally.


soegaard2
2019-8-8 16:06:36

@laurent.orseau You need to update. I made a change to gradient.rkt (now linear-gradient accepts a gradient as the color argument)


soegaard2
2019-8-8 16:07:51

Okay. Thanks for checking.


laurent.orseau
2019-8-8 16:08:47

I just installed metapict. I guess pgk hasn’t caught up yet.


samth
2019-8-8 16:10:52

I do notice that the WebPlotDigitizer output has many more numbers than the original SVG, which seems odd


soegaard2
2019-8-8 16:13:36

I should have looked in the svg instead !


soegaard2
2019-8-8 16:15:50

WebPlotDigitizer works by showing the image / diagram on screen. In the case of plots you when place a coordinate system on screen. Then you add points on top of the image along the curve you are interested. In the end, you get a txt file with numbers. The main use case is for reading x and y values on plots were the author hasn’t included the original numbers.


soegaard2
2019-8-8 16:17:12

Just checked github - and this time I didn’t forget any files :slightly_smiling_face:


soegaard2
2019-8-8 16:18:11

Yes. I think I could have read fewer numbers without any problems.


samth
2019-8-8 16:18:46

potentially it’s just matching discretization results very precisely which isn’t really what you want when there’s a smooth curve generating things but is unsurprising for such a tool


laurent.orseau
2019-8-8 16:18:56

You can trigger pkg to refresh your package if you log in and click something there


soegaard2
2019-8-8 16:19:42

It doesn’t matter too much - MetaPict doesn’t connect the points with straight lines - it finds a smooth curve through the points.


soegaard2
2019-8-8 16:20:44

Done (didn’t think about that). > The results will be available after the next index refresh, which is scheduled for Thursday, August 8th, 2019 4:24:26pm (UTC)


samth
2019-8-8 16:21:43

right and presumably that curve will be very close to but not quite a circle


laurent.orseau
2019-8-8 16:33:13

it works now, very nice!


laurent.orseau
2019-8-8 16:34:22

Except that the gradient doesn’t do what it’s supposed to do apparently:


laurent.orseau
2019-8-8 16:34:36

soegaard2
2019-8-8 16:34:53

Fun fact: Circles drawn with Bezier curves aren’t circles.


soegaard2
2019-8-8 16:35:38

Damn. Let me guess. You are using DrRacket and have the repl at the right?


laurent.orseau
2019-8-8 16:35:50

yes


soegaard2
2019-8-8 16:36:06

Try using the horizontal repl instead.


soegaard2
2019-8-8 16:36:22

crosses fingers


laurent.orseau
2019-8-8 16:36:40

haha, almost :smile:


laurent.orseau
2019-8-8 16:36:45

let me shoot it


laurent.orseau
2019-8-8 16:37:08

it also changes if I switch back and forth to another window


laurent.orseau
2019-8-8 16:38:00

soegaard2
2019-8-8 16:38:50

And here I though I had finally cracked gradients. The problem is that dc% has one coordinate system for drawing (user space) and another for gradients (pattern space). And figuring out the exact relationship is tricky.


soegaard2
2019-8-8 16:39:07

Huh? That looks odd.


j.tecca
2019-8-8 16:39:10

@j.tecca has joined the channel


laurent.orseau
2019-8-8 16:39:36

ah sounds tricky indeed


soegaard2
2019-8-8 16:39:37

I guessed that the center of the radial gradient was wrong - but this?


laurent.orseau
2019-8-8 16:39:57

it’s actually worse: If I switch to another window, it becomes all red again


soegaard2
2019-8-8 16:40:05

Is it because the repl scrolls while drawing?


laurent.orseau
2019-8-8 16:40:26

ohh, it also depends how much I scroll


laurent.orseau
2019-8-8 16:40:30

in some places it looks nice


laurent.orseau
2019-8-8 16:40:35

(for the top right)


laurent.orseau
2019-8-8 16:40:51

I can see the gradient change as I scroll


soegaard2
2019-8-8 16:41:01

My guess is that if you use pict->png and displays the png everything will be ok.


soegaard2
2019-8-8 16:42:06

Maybe it is named pict->bitmap


laurent.orseau
2019-8-8 16:42:26

you can also use freeze


soegaard2
2019-8-8 16:42:35

Okay.


laurent.orseau
2019-8-8 16:42:36

(yes, pict->bitmap indeed)


laurent.orseau
2019-8-8 16:43:11

freeze should freeze the dc boundaries, and the gradient’s coord. references should stick


laurent.orseau
2019-8-8 16:43:21

I suppose…


soegaard2
2019-8-8 16:43:23

I guess Emacs just renders all picts to pngs where as DrRacket renders picts to the canvas-dc% directly.


laurent.orseau
2019-8-8 16:43:49

soegaard2
2019-8-8 16:44:28

Cool. Makes it less urgent to fix the problem :wink:


laurent.orseau
2019-8-8 16:45:23

Maybe write a note about this somewhere?


soegaard2
2019-8-8 16:45:47

yes.


soegaard2
2019-8-8 16:46:09

And add freeze to all examples with gradients.


spdegabrielle
2019-8-8 22:59:43

@samth can this be the banner for reddit/r/racket ? @soegaard2


samth
2019-8-9 01:27:41

I did that, but a version of the image that’s 128px high and has a dark background would be better


soegaard2
2019-8-9 06:35:26

@spdegabrielle put the second logo in a freeze. The gradient is wrong.