radevich.alex
2020-5-3 11:21:17

@radevich.alex has joined the channel


sorawee
2020-5-3 13:35:03

Oh, I misread your question. Thought that you just wanted a syntax highlight in terminal. Didn’t see the keyword REPL


haakonhr
2020-5-3 14:29:01

Does anyone know of any good (inspirational?) screencasts or talks showing work flows with for example racket-mode/geiser and emacs and with DrRacket?


soegaard2
2020-5-3 14:29:31

Greg presented racket-mode at racketcon.



haakonhr
2020-5-3 14:30:18

Thanks, that one is good! It is the only one I saw so far together with a geiser talk


soegaard2
2020-5-3 14:30:33

The one from RacketCon 4 is the first. At RacketCon 9 new features were presented.


soegaard2
2020-5-3 14:33:14

John Clements has some videos using DrRacket: https://www.youtube.com/channel/UCxmd9H0WC2vieAsgJVJ_pNA


haakonhr
2020-5-3 14:35:07

Cool, I’ll take a look! :thumbsup:


greg
2020-5-3 14:35:43

@haakonhr Although it might be obvious stuff (and it’s not a video) awhile ago I wrote https://www.greghendershott.com/2014/11/racket-workflow.html


haakonhr
2020-5-3 14:40:19

Definitely some nice tips there. I have looked around your blog before, but I have a tendency to not go too far back in the past (although maybe I should re-consider this habit in the racket world?)


soegaard2
2020-5-3 14:44:40

That’s part of the reason I like old articles on Racket Stories.


soegaard2
2020-5-3 14:44:58

“Know the classics” :slightly_smiling_face:


greg
2020-5-3 14:56:31

only had that one song on American Bandstand in the 70s; just been playing State Fairs and dive bars ever since


soegaard2
2020-5-3 14:58:16

American Bandstand - now that’s an old reference.


popa.bogdanp
2020-5-3 18:22:32

Was raco exe changed in 7.6 on macOS to embed Racket inside the generated executables?


popa.bogdanp
2020-5-3 18:23:24

I can see a __PLTSCHEME segment in the exe so I’m guessing so.



popa.bogdanp
2020-5-3 18:24:14

Sweet!


spdegabrielle
2020-5-3 20:16:44

read-compiled-linklet: version mismatch expected: "7.7.0.4" found: "7.6" in: /Users/spdegabrielle/Dev/drracket/drracket/drracket/drracket/private/compiled/insulated-read-language_rkt.zo Why do I get this error when I edit a different version of DrRacket (I’m using a nightly 7.7nnn to edit unit.rkt in DrRacket 7.6)


soegaard2
2020-5-3 20:21:23

The folder compiled where DrRacket stores zo-files has no versioning. You can turn off the use of compiled files in the languages dialog under advanced.


spdegabrielle
2020-5-3 20:23:27

Which option does turns it off?


soegaard2
2020-5-3 20:28:55

The “populate’ one. But that’s turned off already I see.


soegaard2
2020-5-3 20:33:46

Try deleting every file in compiled/


mflatt
2020-5-3 20:37:17

Is the goal to edit and run a part of the DrRacket 7.6 implementation using version 7.7.0.4? I expect there are multiple obstacles to that, besides starting with mismatched “.zo” files.


spdegabrielle
2020-5-3 20:37:50

no I’m


spdegabrielle
2020-5-3 20:37:54

im


spdegabrielle
2020-5-3 20:38:19

I am nbot up to editing yet


spdegabrielle
2020-5-3 20:38:35

I’m looking at unit.rkt to try identify the colorer


spdegabrielle
2020-5-3 20:39:11

if I can get to a point where I make an edit I expect to run it under 7.6


mflatt
2020-5-3 20:40:32

Do you mean that “unit.rkt” as part of 7.6 doesn’t even open for editing in v7.7.x? I’d expect an error at the bottom of the window from background expansion, and so you won’t get various tools, but I’d expect you to be able to edit the text of the module.


spdegabrielle
2020-5-3 20:40:35

(Until I get round to setting up a dev environment where I have two instance of the whole thing)


spdegabrielle
2020-5-3 20:41:51

It opens fine. I was wondering if I could turn the zo check off. The error isn’t terribly unexpected


mflatt
2020-5-3 20:42:35

Maybe you want to disable background expansion by clicking on the dot in the lower-right corner.


spdegabrielle
2020-5-3 20:42:46

I did try opening unit.rkt 7.6 from DrRacket 7.6 - probable a bad idea


spdegabrielle
2020-5-3 20:43:30

I’ll do that. In the meantime - can you point me to the colorer?


mflatt
2020-5-3 20:43:43

I think that’s in the framework…



spdegabrielle
2020-5-3 20:44:56

Ok


spdegabrielle
2020-5-3 20:45:37

I’m trying to identify urls in comments (only text after ; nothing fancy)


spdegabrielle
2020-5-3 20:46:30

to make them clickable. robby suggested using the same mechanism that aspell uses at the level of the colorer.


spdegabrielle
2020-5-3 20:47:22

I expect the color canvas to be in the gui framework, but I was thinking behaviour would be in unit.rkt


robby
2020-5-3 20:48:46

the behavior is in the colorer


spdegabrielle
2020-5-3 20:49:07

in gui-lib/framework/private/color.rkt


robby
2020-5-3 20:49:26

I think a good start is to use techniques similar to how aspell works and just start by making the urls a different color.


robby
2020-5-3 20:50:04

Maybe even just pretend that urls are “missepelled” in the sense that you’d use all the coloring set up for misspelled words but just turn it on for urls that you find.


robby
2020-5-3 20:50:12

then after that figure out how to plumb a new color thought.


robby
2020-5-3 20:50:17

through


robby
2020-5-3 20:50:26

and then figure out how to add a callback that handles clicking on them.


robby
2020-5-3 20:50:32

That’s how I’d try breaking down the task, anyway.


robby
2020-5-3 20:50:48

It will probably help to understand the basic idea of how the colorer works.


robby
2020-5-3 20:51:01

and how the spelling works


spdegabrielle
2020-5-3 20:51:28

I’m reading it now :slightly_smiling_face: gui-lib/framework/private/color.rkt


robby
2020-5-3 20:52:10

yeah, the do-colorings method


robby
2020-5-3 20:53:11

You’ll want something that is used the way do-spelling-color is used, but instead of looking misspelled words, looks for urls.


robby
2020-5-3 20:53:51

Oh, but you want to look in comments, not in strings.


robby
2020-5-3 20:53:55

So that’ll be different too.


spdegabrielle
2020-5-3 20:53:58

thank you. Yes


spdegabrielle
2020-5-3 20:54:07

in comments


robby
2020-5-3 20:54:24

anyway, good luck!


spdegabrielle
2020-5-3 20:54:37

why not anywhere in the source come to think of it?


spdegabrielle
2020-5-3 20:55:10

Thank you @robby !(& @mflatt)


robby
2020-5-3 20:55:52

I would probably stick with urls that are inside just one kind of thing (where by “kind of thing” I mean “thing the colorer is already treating as a single unit” like a string or a comment)


robby
2020-5-3 20:56:21

If you wanted to do something that spanned categories somehow, you’d need to do a lot more work, I guess.


robby
2020-5-3 20:56:47

I’m not sure, tho. Maybe there’s some nice way to use some lower layer to avoid the trouble of dealing with the colorer.


spdegabrielle
2020-5-3 20:56:49

I see. I was hoping to avoid work.


robby
2020-5-3 20:57:10

cooperating with the color is what I see as avoiding work :slightly_smiling_face:


spdegabrielle
2020-5-3 20:57:25

advice taken.


spdegabrielle
2020-5-3 20:58:44

I think I found it do-spelling-color ! a beginnign anyway…


gfb
2020-5-3 21:05:22

I’m interested in sub-colorings as well. I have a habit of refactoring code when reading it, and for add-coloring in particular it’s in case I need duplicate parts of color.rkt to get at that private behaviour. So I’ve made a pull request with some of that : https://github.com/racket/gui/pull/181 , which at least might be informative even if it’s not accepted.


spdegabrielle
2020-5-3 21:16:57

@gfb we are both looking at the <https://github.com/racket/drracket/issues/367|same thing>, but I think you are further along than me.


gfb
2020-5-3 21:21:36

@robby if clickable hyperlinks become an official part of drracket, do you have a preference for whether add-coloring should change versus making add-coloring public?


robby
2020-5-3 21:22:18

I don’t think it makes sense to make add-coloring public


robby
2020-5-3 21:22:22

but I don’t know what you have in midn


robby
2020-5-3 21:22:23

mind


gfb
2020-5-3 21:22:40

For overriding to extend its behavior.


gfb
2020-5-3 21:24:11

Oops, I meant add-colorings.


robby
2020-5-3 21:24:37

I think it makes sense to change the colorer to support urls by changing its implementation


robby
2020-5-3 21:24:52

if you have in midn something extensible that could also make sense and might involve new, overridable methods.


gfb
2020-5-3 21:29:29

I would very much like something extensible, and the existing add-colorings seems to be an ideal interposition point. It’s called only once and the arguments are publicly meaningful.


robby
2020-5-3 21:30:44

do you promise to maintain it for all eternity? :wink:


robby
2020-5-3 21:30:58

in all seriousness, if you want to add extensibility that’s fine.


robby
2020-5-3 21:32:15

I think taking the existing set of functions that making them public may not be the best way to design for extensibility, however.


robby
2020-5-3 21:32:40

Surely it makes sense to implement urls first and then step back and see where the common parts are and think about what others might want, etc.


robby
2020-5-3 21:32:57

I mean, that may be the right move in the end, but is it the first step in this process?


gfb
2020-5-3 21:36:46

Ok, I’ll just note that a better abstraction boundary is a few lines into add-colorings, just after (define style-name (token-sym-&gt;style type)). After that point the implementation doesn’t use anything private.


deactivateduser60718
2020-5-4 00:04:30

Where does raco pkg config --set store its information?


sorawee
2020-5-4 00:05:55

~/Library/Racket/7.6/pkgs/config.rktd on Mac OS


deactivateduser60718
2020-5-4 00:06:01

Thanks.


sorawee
2020-5-4 01:29:46

I’m using serve/servlet to serve static files . It looks like the result got cached, so after I updated my static files, it still serves the old content. How do I invalidate the cache?


sorawee
2020-5-4 01:40:03

Ah, nvm, refresh works. I killed the web server right away after it opens up my browser. If I don’t kill it and refresh, I get the desired content


gfb
2020-5-4 02:31:11

@spdegabrielle you should follow https://github.com/gfbee/gui/tree/clickable-urls , although I might not have time to continue with it for a while (I just happened to be looking at the relevant part of color.rkt recently). Right now it colors the text “http” within comments with the error color, finding those with a helper similar to do-spelling-color (modernzed and commented), which might give you or someone else an encouraging base to continue with.