spdegabrielle
2019-9-23 11:39:36

spdegabrielle
2019-9-23 11:40:20

Last update was 7.0 release


samth
2019-9-23 12:11:48

Technically I run it, but I’m unsure there’s much point


spdegabrielle
2019-9-23 12:36:40

I’m looking at using social media tools to automate updates to fb,Twitter, reddit, etc. because they turn up in search results and a presence that is stale might be worse than no presence at all. The point is to minimise the effort needed to get things like new packages, racket-announce & Racket News posted on relevant platforms. I’m also interested in directing people to racket-users.


spdegabrielle
2019-9-23 13:02:54

also; who runs racket-announce ? https://lists.racket-lang.org/announce/archive/


spdegabrielle
2019-9-23 13:03:12

last update was 7.2


samth
2019-9-23 13:05:03

You should tell @jbclements about that — probably he needs to send email there


spdegabrielle
2019-9-23 13:34:48

samth
2019-9-23 14:04:47

Ok, finally did this. Here’s the most accessed parameters (with counts) for running a compiled empty module written in '#%kernel: 4 ""parameter-cell name: current-logger 4 ""parameter-cell name: current-module-declare-name 4 ""parameter-cell name: load-on-demand-enabled 4 ""parameter-cell name: read-cdot 7 ""parameter-cell name: current-environment-variables 8 ""parameter-cell name: current-readtable 14 ""parameter-cell name: current-directory 17 ""parameter-cell name: current-custodian 17 ""parameter-cell name: current-namespace 22 ""parameter-cell name: print-graph 23 ""parameter-cell name: read-case-sensitive 28 ""parameter-cell name: current-code-inspector 38 ""parameter-cell name: port-count-lines-enabled 43 ""parameter-cell name: current-security-guard 57 ""parameter-cell name: current-module-name-resolver 71 ""parameter-cell name: current-locale 278 ""parameter-cell name: current-inspector


samth
2019-9-23 14:06:33

More interesting, perhaps, this is the results for racketcs -l racket/notexist: 16 ""parameter-cell name: current-custodian 21 ""parameter-cell name: current-compiled-file-roots 21 ""parameter-cell name: use-compiled-file-paths 23 ""parameter-cell name: current-code-inspector 23 ""parameter-cell name: print-graph 23 ""parameter-cell name: read-case-sensitive 34 ""parameter-cell name: port-count-lines-enabled 54 ""parameter-cell name: current-module-name-resolver 278 ""parameter-cell name: current-inspector 316 ""parameter-cell name: current-directory 1007 ""parameter-cell name: current-security-guard 1261 ""parameter-cell name: current-locale


mflatt
2019-9-23 14:44:36

To put that in context, accessing current-locale 100,000 times in the Racket CS REPL now takes 5ms on my machine (same as traditional Racket). That’s down from 9–10ms in v7.4 CS.


samth
2019-9-23 15:05:38

Right, those parameter accesses are unlikely to directly be a big time sink, but I’m suspicious about why they’re called so often


mflatt
2019-9-23 15:20:31

Any time a string is converted to a path, then current-locale is relevant. And any time a directory is listed or the existence of a file is tested, current-security-guard will be used.


notjack
2019-9-23 16:25:14

What are the largest racket codebases? Outside of stuff like racket itself and DrRacket


soegaard2
2019-9-23 16:29:24

Interesting question.


samdphillips
2019-9-23 16:29:38

We could download the 7,230 repos on github and “measure”


samdphillips
2019-9-23 16:31:23

limiting it to >5kb repos gives me 248 repos


soegaard2
2019-9-23 16:35:09

whalesong is pretty large


soegaard2
2019-9-23 16:38:02

Does TypedRacket count?


soegaard2
2019-9-23 16:38:15

Also Pycket?


soegaard2
2019-9-23 16:38:34

notjack
2019-9-23 16:41:43

Let’s say that stuff under the racket GitHub org doesn’t count but anything else does


soegaard2
2019-9-23 17:00:07
mbp:metapict soegaard$ find . -type f -name "*.rkt" -print0 \| xargs -0 cat \| wc -l
   18650

soegaard2
2019-9-23 17:01:17
   77023

notjack
2019-9-23 17:19:05

wow Whalesong is pretty big


soegaard2
2019-9-23 17:19:59

It contains large part of racket.


samdphillips
2019-9-23 17:20:44

What if we just count left [ ( { ?


soegaard2
2019-9-23 17:21:46

what should put between xargs -0 cat and wc -l to filter anything but [({?


soegaard2
2019-9-23 17:21:52

some sort of sed rule?


popa.bogdanp
2019-9-23 17:23:04

https://github.com/AlDanial/cloc is pretty good at counting Racket code so you could use that.


popa.bogdanp
2019-9-23 17:23:23

for example:

$ cloc matchacha matchacha-tests                                                                                                                                                                                                              [0/264]
     179 text files.
     179 unique files.
      90 files ignored.

<http://github.com/AlDanial/cloc\|github.com/AlDanial/cloc> v 1.82  T=0.15 s (611.4 files/s, 88150.6 lines/s)
-------------------------------------------------------------------------------
Language                     files          blank        comment           code
-------------------------------------------------------------------------------
Racket                          89           1996            142          10694
-------------------------------------------------------------------------------
SUM:                            89           1996            142          10694
-------------------------------------------------------------------------------

soegaard2
2019-9-23 17:26:22
mbp:GitHub soegaard$ ~/tmp/cloc/cloc whalesong
    1131 text files.
    1074 unique files.
     566 files ignored.

<http://github.com/AlDanial/cloc\|github.com/AlDanial/cloc> v 1.84  T=2.29 s (247.2 files/s, 88154.2 lines/s)
--------------------------------------------------------------------------------
Language                      files          blank        comment           code
--------------------------------------------------------------------------------
JavaScript                       84          20713           7489          92356
Racket                          439          12526           5311          61127
XHTML                             1            231              0           1191
HTML                             30             97             10            752
Scheme                            1             40              7             71
CSS                               5             13              0             61
Bourne Again Shell                2              8              8             26
make                              2             18             17             22
Markdown                          1              5              0             22
Bourne Shell                      1              8              1             22
C                                 1              3              0             16
--------------------------------------------------------------------------------
SUM:                            567          33662          12843         155666
--------------------------------------------------------------------------------

notjack
2019-9-23 17:39:47

honestly it’s fine with me if we don’t even bother to omit whitespace-only lines, it’s not like more precise line counting is going to make more than a factor-of–2-or–3 difference


notjack
2019-9-23 17:42:34

average lines per file would be interesting to know too though


samdphillips
2019-9-23 17:44:46
find . -type f -name "*.rkt" -print0 \| xargs -0 cat \| racket count-parens.rkt

samdphillips
2019-9-23 17:45:25

count-parens.rkt #lang racket/base (for/sum ([line (in-lines)]) (length (regexp-match* #px"([[{(])" line)))


soegaard2
2019-9-23 17:50:27

Or | sed ‘s/1//g’ | sed ’/^$/d’


    soegaard2
    2019-9-23 17:50:50

    The last bit removes blank lines.


    samdphillips
    2019-9-23 17:52:19

    Oh I was counting all of the left brackets not just lines with code.


    matias
    2019-9-23 19:30:41

    In Redex I’m having trouble defining a match-like term in a language. I want to be able to include terms like (match l ((null) 0) ((cons a d) (+ a (sum d)))).


    matias
    2019-9-23 19:31:36

    I’ve been using the pattern (match e ((c_!_ x_!_ ...) e) ...).


    matias
    2019-9-23 19:32:55

    But I don’t know how to specify the uniqueness of constructors and variables. I want each c_!_ to be unique in the entire match term, but I only need the x_!_es to be unique inside this specific clauses/row/case.


    matias
    2019-9-23 19:37:32

    soegaard2
    2019-9-23 20:02:03

    Hmm. The package gregor-lib depends on racket-doc. On purpose?


    soegaard2
    2019-9-23 20:04:41

    The info files contains (define deps '("base" "data-lib" "memoize" "parser-tools-lib" "tzinfo" "cldr-core" "cldr-bcp47" "cldr-numbers-modern" "cldr-dates-modern" "cldr-localenames-modern")) (define build-deps '("racket-doc" "scribble-lib"))


    soegaard2
    2019-9-23 20:05:10

    is there a way to get raco pkg install gregor-lib to ignore the build-deps ?


    jaz
    2019-9-23 20:12:07

    @soegaard2 that sounds like a mistake


    jaz
    2019-9-23 20:12:21

    gregor-doc should depend on those, but not gregor-lib, I think


    soegaard2
    2019-9-23 20:12:55

    Phew.


    soegaard2
    2019-9-23 20:15:12

    I am working on getting my small web-tutorial up and running on a real server.


    soegaard2
    2019-9-23 20:20:33

    Maybe it is due to memoize.


    soegaard2
    2019-9-23 20:21:30

    It has (define deps (list "base" "rackunit-lib")) (define build-deps (list "scribble-lib" "racket-doc"))


    jaz
    2019-9-23 20:22:23

    Maybe, but that shouldn’t require gregor-lib to declare these as build deps, I don’t think. (Doesn’t change the fact that they are build deps.)


    soegaard2
    2019-9-23 20:23:55

    I might be doing this the wrong way (installing the packages on the web server). Should I build on my development machine instead?


    soegaard2
    2019-9-23 20:25:33

    I think it is because memoize is a deps for gregor-lib (and thus the build-deps for memoize become deps for gregor-lib.


    soegaard2
    2019-9-23 20:25:55

    But I am not sure I am looking at it the right way.


    jaz
    2019-9-23 20:26:10

    I don’t know — but you can install packages with raco pkg install --binary


    soegaard2
    2019-9-23 20:26:19

    Ooh!


    jaz
    2019-9-23 20:27:07

    Actually, I think you want --binary-lib to skip docs


    soegaard2
    2019-9-23 20:28:09

    It’s just that memoize isn’t split into lib and docs. So it must count as a lib. And since it depends on racket-doc and scribble, it suddenly blows up.


    soegaard2
    2019-9-23 20:29:48

    and racket-doc depends on drracket …


    jaz
    2019-9-23 20:30:13

    ouch


    soegaard2
    2019-9-23 20:31:38

    I suddenly realize I need to split MetaPict up.


    jaz
    2019-9-23 20:33:56

    I could probably pretty easily remove the dependency on memoize but other dependencies are also not split.


    jaz
    2019-9-23 20:34:37

    It seems odd that racket-doc would depend on drracket.


    soegaard2
    2019-9-23 20:35:21

    soegaard2
    2019-9-23 20:35:36

    But I guess the Right Thing is to split memoize.


    jaz
    2019-9-23 20:35:51

    Sure, but you’ll get the same problem again with, e.g., tzinfo.


    soegaard2
    2019-9-23 20:36:00

    Ah.


    jaz
    2019-9-23 20:36:07

    Unless all dependencies are split, you get the same problem.


    soegaard2
    2019-9-23 20:36:32

    So I need to look into building it on my own machine and then upload the already built code.


    jaz
    2019-9-23 20:39:20

    Does --binary-lib really not work? The docs make it sound like it should, but I’ve never actually used it before.


    soegaard2
    2019-9-23 20:40:03

    Didn’t try it. I understood to work like this: Build everything as normal, then strip the build stuff.


    jaz
    2019-9-23 20:43:41

    Oh, you’re probably right. I was thinking that stuff was stripped prior to building, but that doesn’t seem likely.


    soegaard2
    2019-9-23 20:44:03

    I bet I am missing something.


    jaz
    2019-9-23 20:44:13

    (Especially now that I’m reading https://docs.racket-lang.org/pkg/strip.html)


    soegaard2
    2019-9-23 20:50:45

    Maybe I need to make a built package.


    soegaard2
    2019-9-23 21:22:28

    @jeapostrophe Is there a way to get make-id-cookie to make a “SameSite” cookie? https://tools.ietf.org/html/draft-ietf-httpbis-rfc6265bis-03#section-5.3.7


    samdphillips
    2019-9-23 21:26:22

    Is the split between PACKAGE, PACKAGE-lib, PACKAGE-doc, and PACKAGE-test documented?



    soegaard2
    2019-9-23 21:37:24

    Which incidentally also mentions the package-build service.


    soegaard2
    2019-9-23 21:39:56

    So I think I could use --binary-lib as @jaz advocated with the --catalog option like this: raco pkg install --binary-lib --catalog <https://pkg-build.racket-lang.org/server/built/catalog/> gregor


    notjack
    2019-9-23 21:46:01

    @soegaard2 yup you can combine --binary-lib with --catalog to install packages such that you download built bytecode / compiled files only and skip everything else, which lets you skip downloading and installing the build-deps of any package


    notjack
    2019-9-23 21:46:26

    This is one of the reasons I think we should stop splitting packages. Or at least, stop splitting them by default.


    notjack
    2019-9-23 21:48:32

    There’s usability challenges though. The fact that downloading bytecode from the package catalog is a thing that doesn’t happen by default, for example. And it only works if you have the same racket version as the catalog built them with, which is whatever the latest released Racket is. And if either of those things goes wrong it’s hard to tell or it breaks completely so your CI scripts become super fragile.


    soegaard2
    2019-9-23 22:00:55

    @notjack Good points.


    alexharsanyi
    2019-9-23 22:07:53

    @notjack AcrtivityLog2 is not small either: alexh@ALEX-S2 ~/Projects/ActivityLog2 (enhanced-fields) $ perl ../cloc-1.82.pl . 363 text files. 361 unique files. 180 files ignored. <http://github.com/AlDanial/cloc\|github.com/AlDanial/cloc> v 1.82 T=1.14 s (191.5 files/s, 56073.9 lines/s) ------------------------------------------------------------------------------- Language files blank comment code ------------------------------------------------------------------------------- Racket 155 7036 8962 41600 Markdown 18 560 0 1848 SQL 33 296 813 1357 JSON 2 0 0 571 Bourne Shell 4 45 40 208 YAML 2 56 60 156 PowerShell 2 25 19 80 awk 1 10 17 39 Lisp 1 0 0 25 ------------------------------------------------------------------------------- SUM: 218 8028 9911 45884 -------------------------------------------------------------------------------


    jaz
    2019-9-23 22:25:40

    @notjack @soegaard2 ~I don’t see that combination documented in any way.~


    jaz
    2019-9-23 22:25:43
    --catalog ‹catalog› — Uses ‹catalog› instead of of the currently configured package catalogs.

    jaz
    2019-9-23 22:26:11

    ~Doesn’t even suggest that it will have different effects when combined with other options.~


    jaz
    2019-9-23 22:29:36

    Ah — ok, I see that this is actually a different package catalog than the default one, so it’s not the combination of arguments; it’s the fact that this non-default catalog provides built packages.


    samdphillips
    2019-9-23 22:41:19

    These do seem like reasons to keep splitting up packages.


    samdphillips
    2019-9-23 22:44:08

    Having any docs build-dep chain up to DrRacket seems to be some of the root badness though?


    sorawee
    2019-9-23 22:52:18

    Seems like a good RFC for Racket2.


    notjack
    2019-9-23 23:32:13

    @jaz Exactly. Personally I think the default catalog should just provide this, at the very least on a best-effort basis. And there should be some way for me to get raco pkg to operate in the mode of “use the catalog’s bytecode / prerendered docs if they’re available, otherwise build it yourself and don’t complain”. That way this would operate much more like a transparent cache rather than this weird finicky alternate config that you have to lock yourself into in various ways.


    notjack
    2019-9-23 23:33:51

    These are definitely good reasons to keep splitting them up today, if you need to fix dependency graph problems in the short term. I don’t think they’re good reasons to split them up long term, or to prematurely split them up until an actual user of your package complains.


    notjack
    2019-9-23 23:34:49

    And yeah, every scribble user getting a transitive dep on DrRacket and a bajillion other things is probably something that everyone can agree is terrible.


    jbclements
    2019-9-24 00:02:45

    @spdegabrielle Many thanks, totally mea culpa. My inclination at this point would be to pick this up again with the 7.5 release; I think that sending mail to the announce list at this point would just cause confusion.


    samdphillips
    2019-9-24 01:30:04

    Is there a email thread/issue on removing that dependency and what it would take?


    samdphillips
    2019-9-24 01:30:35

    I’ve been defensively splitting up packages that I’ve procrastinated publishing for a long time :disappointed:


    samdphillips
    2019-9-24 01:35:30

    mflatt
    2019-9-24 02:18:43

    I’m not clear on who is volunteering to change things, but in case it helps: The package system’s implementation is “racket/collects/pkg”, the pkg-build sever is implemented in the “pkg-build” package, and the distribution-build system is the “distro-build” package.


    samdphillips
    2019-9-24 03:17:12

    @notjack multisets in Rebellion don’t have a remove operation?


    notjack
    2019-9-24 03:27:25

    @mflatt nobody is yet, but it’s nice to have the option to turn my grumbling into actual action. Thanks for the info :simple_smile:


    notjack
    2019-9-24 03:28:08

    @samdphillips They don’t, but only because I haven’t needed one yet. Open an issue to remind me!


    notjack
    2019-9-24 03:30:36

    @samdphillips With for loops and reducers, usually I use collections in a way that doesn’t tend to benefit from add / remove / edit operations like that. Instead I end up building the collection with a reducer and afterwards I only query it. This is also usually a way more performant usage pattern for most data structures, including persistent ones.


    notjack
    2019-9-24 03:53:01

    That’s the only tracking issue for this kind of thing that I know of


    notjack
    2019-9-24 03:53:26

    I just decided to stop splitting them entirely


    philip.mcgrath
    2019-9-24 04:08:15

    Currently no (except a hack, below). To support it, you would first need to add them to net/cookies/server’s representation of cookies. I think I’d looked at this but wasn’t sure about moving forward while the standard is still a draft. If you need it now, you can use cookie-&gt;set-cookie-header or cookie-&gt;string and add the “SameSite” stuff to the string or bytes directly.



    samdphillips
    2019-9-24 04:30:55

    Save you some work :stuck_out_tongue:


    philip.mcgrath
    2019-9-24 04:33:17

    @samth As I look at it further, I think the only reason Syntax-E isn’t a subtype of Datum is because of mutable boxes and vectors. But I think datum-&gt;syntax given a Syntax-E will always produce Syntax, and the type of datum-&gt;syntax could be extended to reflect that.


    notjack
    2019-9-24 05:10:57

    @samdphillips Thank you so much!


    popa.bogdanp
    2019-9-24 06:56:02

    @soegaard2 You can pass in the SameSite option via the #:extension kwarg.

    An example:

    https://github.com/Bogdanp/koyo/blob/a1ce05497e72357c03b868d3aa3b9b40f462227c/koyo-lib/koyo/session.rkt#L239-L251