jgeddes
2020-10-14 18:59:26

Okay, thanks; that makes sense.


badkins
2020-10-14 19:09:09

What is an efficient way to find the definition of a built-in function? In this case, I’m looking for append, so I first went to https://github.com/racket/racket/blob/master/racket/collects/racket/list.rkt\|racket/collects/racket/list.rkt , next I tried https://github.com/racket/racket/blob/master/racket/collects/racket/private/list.rkt\|racket/collects/racket/private/list.rkt I thought I’ve noticed a “jump to definition” in DrRacket before, but that’s not an option for append


badkins
2020-10-14 19:09:54

I suppose we’re just using the Chez implementation of append, so I’ll dig around there next …


soegaard2
2020-10-14 19:10:30

In BC append is a C function. My guess is that in CS it is a Chez Scheme primitive.


badkins
2020-10-14 19:10:33

It would be awesome to have a link from the docs.


soegaard2
2020-10-14 19:10:53

I.e. there is no Racket definition of append.


badkins
2020-10-14 19:11:31

That’s fine, I still need to check on performance, so I’ll need to track down the C function since I’m on BC at the moment.


soegaard2
2020-10-14 19:12:02

I think, I know where it is.


samth
2020-10-14 19:12:25

if you look at the URL for the docs, you can see that it’s provided by '#%kernel which means it’s not defined in Racket


badkins
2020-10-14 19:13:29

Cool - thanks @samth - checking on a few others, the URL provides some nice hints for locations



samth
2020-10-14 19:13:36

badkins
2020-10-14 19:18:23

Thanks. I think parsing the docs URL will help for future searches.


badkins
2020-10-14 19:19:05

If the URLs are regular enough, having a direct link to github seems like a possibility.



samth
2020-10-15 01:47:13

Yes, that’s something I’ve wanted to do. There’s already infrastructure that handles package information, to make the link to the github source of the document itself appear.