notjack
2017-10-17 17:47:15

stamourv
2017-10-17 17:52:27

Eric Dobson, maybe?


notjack
2017-10-17 17:52:56

oh right!


apg
2017-10-17 18:05:58

woah! what is this?


apg
2017-10-17 18:06:16

and, how do I get my name on the list?



notjack
2017-10-17 18:06:36

brought to you by @ben towards the bottom of that thread


samth
2017-10-17 18:07:02
  1. Look for “racketeers.csv” in the menu
  2. Click the “vertical dots” to the right of “racketeers.csv”. (If you hover the mouse over these dots, it should say “Layer Options”)
  3. Click “Open Data Table”
  4. Right-click any row, choose “Add Row”
  5. Add yourself, hit enter

samth
2017-10-17 18:07:12

(those are @ben’s instructions)


apg
2017-10-17 18:07:46

@notjack @samth great! I haven’t seen the thread yet apparently.


apg
2017-10-17 18:07:46

:slightly_smiling_face:


apg
2017-10-17 18:26:15

It might be fun to have a slack app that shows racketeers nearby. e.g. /geo nearby


apg
2017-10-17 18:27:16

and, allow for something like /geo set 90210 and /geo whereis @apg


notjack
2017-10-17 18:28:24

presumably opt-in with a way to have fine-grained access control - I don’t want to be responsible for giving people the ability to stalk racketeers


apg
2017-10-17 18:29:59

yeah. that’s a good point


apg
2017-10-17 18:30:05

works better as a company tool


notjack
2017-10-17 18:30:17

definitely


apg
2017-10-17 18:30:19

(but yeah, it’d be opt-in)


apg
2017-10-17 18:30:50

The other thing that might be fun: https://racket.slack.com/apps/A11MJ51SR-donut


samth
2017-10-17 18:31:35

annoyingly we’re at our limit for apps on free slack


notjack
2017-10-17 18:31:39

that’s both creepy and fascinating


apg
2017-10-17 18:32:06

ah! there you go.


apg
2017-10-17 18:32:20

@notjack works great for large companies… of course.


notjack
2017-10-17 18:33:19

it’s almost like slack only accidentally took over foss communities :P


apg
2017-10-17 18:41:12

not a huge fan of this trend…


apg
2017-10-17 18:41:25

but, if that’s what people want, then…


notjack
2017-10-17 18:41:52

¯_(ツ)_/¯


lexi.lambda
2017-10-17 20:21:35

@mflatt I have Yet Another Question to throw your way… could you explain to me why this program produces an unbound identifier error? #lang racket (require syntax/parse/define) (begin-for-syntax (define introducer (make-syntax-introducer #t))) (define-simple-macro (begin/introduce form ...) #:with [form* ...] (map introducer (attribute form)) (begin form* ...)) (begin/introduce (define x 42)) (module* name #f (begin/introduce x)) ; unbound identifier in module I tried using the macro stepper to debug this example, but the macro stepper seems to actually error out on this code. I tried using @georges-duperon’s debug-scopes, and at first glance, it seemed like the inner x has all the right scopes, so I don’t understand why it isn’t bound. (And for what it’s worth, it also happens on racket7.)


mflatt
2017-10-17 20:25:03

At first glance, when the name submodule is compiled, there will be a fresh compile-time instantiation of the enclosing module, and it makes a fresh introducer. If that’s on the right track, the way to preserve a scope across module instantiations is to embed it in a syntax object (really, a pair: one with and one without) and extract it out later with make-syntax-delta-introducer (using the pair).


lexi.lambda
2017-10-17 20:30:06

Oh, I see, that makes sense. I think using make-syntax-delta-introducer actually crossed my mind at one point over the past few days, but I forgot about it while I was dealing with a bunch of other things. :)


lexi.lambda
2017-10-17 20:40:16

Yes, replacing the begin-for-syntax with this seems to solve the problem: (define-simple-macro (define-introducer-pair x:id y:id) #:with a (datum->syntax #f 'a) #:with b ((make-syntax-introducer #t) #'a) (begin (define-syntaxes [a b] (values #f #f)) (begin-for-syntax (define-values [x y] (values (quote-syntax a) (quote-syntax b)))))) (define-introducer-pair unintro intro) (begin-for-syntax (define introducer (make-syntax-delta-introducer intro unintro))) …which seems a little roundabout, but I guess it makes sense.


lexi.lambda
2017-10-17 20:49:21

With that fix + the extra splicing-syntax-parameterize changes, namespacing finally seems to work properly inside (module* m #f ....) submodules.


lexi.lambda
2017-10-17 20:55:17

Now I just need to figure out how on earth to handle the REPL/top-level. :/


notjack
2017-10-17 20:55:36

Hopelessly? ;)


lexi.lambda
2017-10-17 20:59:18

It does seem tricky. In modules, I surround the module body with a splicing-syntax-parameterize I introduce in #%module-begin. At the top-level, that’s obviously not an option. I’m not sure if it’s safe to use the same introducers for all forms at the top level, then just make #%top-interaction use them.


lexi.lambda
2017-10-17 21:14:19

Okay, I got the top level working, which means my scribble docs render… but getting scribble to understand code with multiple namespaces is not going to be easy. :sob:


lexi.lambda
2017-10-17 21:42:55

@mflatt I just pushed a commit without the unnecessary with-syntax, feel free to merge (or I can).


mflatt
2017-10-17 21:54:51

Go ahead and merge - thanks!


lexi.lambda
2017-10-17 22:03:52

I am planning on inlining the updated definition of splicing-syntax-parameterize into Hackett to support older Racket versions, but I am trying to make sure that I can legally do so, since Hackett is licensed under a BSD-like license and Racket is LGPL, which are incompatible. However, looking at the relicensing effort, it looks like all the authors of that code have granted permission to relicense under MIT, which I think means I can safely reuse the code as long as I include the MIT license text. I’d imagine nobody in here is a lawyer, though. :)


apg
2017-10-17 22:06:21

IANAL, but :wave: seems fine. :stuck_out_tongue:


mflatt
2017-10-17 22:19:06

@lexi.lambda IANAL, either, but it sounds right to me


notjack
2017-10-17 23:06:03

@lexi.lambda (warning: bad and vague legal advice) If inlining the updated definition involves copying only code that you wrote, then I think licensing doesn’t really apply since you own the copyright


lexi.lambda
2017-10-17 23:06:24

it doesn’t, which is the problem.


notjack
2017-10-17 23:06:53

welp, i tried


lexi.lambda
2017-10-17 23:08:15

I’m not going to worry about it too much. I put the MIT license at the top of the module with a copyright notice for PLT Design, and all the copyright holders for that piece of code are core Racket folks, so I doubt anyone is going to take legal action against me for copying a couple dozen lines of code. :)


apg
2017-10-17 23:09:49

oracle didn’t care :slightly_smiling_face:


lexi.lambda
2017-10-17 23:10:24

I would be much more careful if Oracle were the copyright holder. ;)


ben
2017-10-18 02:36:32

@pnwamk what do you recommend instead of arr for “arrow”?


dustin
2017-10-18 02:46:36

@dustin has joined the channel


ben
2017-10-18 02:58:38

after reading the discussion in <https://github.com/racket/typed-racket/pull/633>, I’m thinking Racket could use a language like scribble/manual, but for internal documentation


ben
2017-10-18 03:00:48

not sure what ought to be in the language … just feeling that scribble/manual makes writing documentation convenient, and I’d want similar-but-not-exactly-the-same tools for internal docs


ben
2017-10-18 03:04:05

on that note, reminds me that when I search the docs for hc-append, I should see there’s a Typed Racket version of it (also if I’m just browsing the pict docs)


lexi.lambda
2017-10-18 03:04:10

I’ve thought about that a lot, too. scribble/manual would be a good start. Unsure if you want full literate programming or not.


ben
2017-10-18 03:05:28

I’ve never tried LP but I’m very skeptical


ben
2017-10-18 03:06:04

because I think there’d be lots of things like: because of this 1 idea/goal, we change the code in N different places


lexi.lambda
2017-10-18 03:06:28

I find scribble/lp is too “heavyweight”. But on the other hand, I have a lot of comments in Hackett. It would be nice for them to render somewhere and let me link between them.


notjack
2017-10-18 03:07:02

@mflatt When a TCP output port is closed only via a custodian shutdown (no calls to close-&lt;i/o&gt;-port or to tcp-abandon-port) is a TCP FIN packet sent? If so, is there any way for a Racket program to forcefully close a TCP connection without sending a FIN packet? Use case is testing that servers / clients handle unexpectedly terminated TCP connections correctly.


notjack
2017-10-18 03:09:13

(reading more, I think what I’m looking for is a way to control whether FIN, RST, or nothing at all is sent from one end to the other when ports are closed)


ben
2017-10-18 03:11:20

if only we had (module+ scribble/manual ....) ?


notjack
2017-10-18 03:12:14

yes please to scribble docs that cooperate well with module+


notjack
2017-10-18 03:12:54

it’s frustrating that docs are included via a single doc export so it’s hard to define documentation in a piecemeal way…


ben
2017-10-18 03:14:15

I think the mcfly package has a solution


ben
2017-10-18 03:14:19

but I’ve never looked into it


ben
2017-10-18 03:15:42

or, would it be possible to do #lang doc+ racket that looks for (begin-doc ....) syntax and lifts those into a “big” module* ?


lexi.lambda
2017-10-18 03:18:03

in theory, yes, but meta-languages that introduce new forms are currently held together with spit and baling wire


notjack
2017-10-18 03:18:26

if the docs are implicitly stitched together then the scribble prose section order is dependent on the order of how things are implemented in the module which sounds Not Fun


lexi.lambda
2017-10-18 03:20:11

this problem is hard, and I would like someone to solve it, but I have no interest in trying to solve it myself in the near future :)


notjack
2017-10-18 03:20:24

heh I feel that way about a lot of things


apg
2017-10-18 03:36:33

random question: how can I shadow a package with raco such that I can work on a smaller piece of the distribution (e.g. slideshow)?


apg
2017-10-18 03:36:53

raco pkg install --link -u ./slideshow-lib is what I thought might work… but that doesn’t seem to do what i want.


lexi.lambda
2017-10-18 03:38:37

raco pkg update --link slideshow-lib should do the trick if you already have slideshow-lib installed


ben
2017-10-18 03:41:16

or raco pkg update --clone slideshow if you want a copy of the slideshow repo


apg
2017-10-18 03:42:18

hmm. so update instead! perfect!


apg
2017-10-18 03:43:05

thanks


apg
2017-10-18 03:46:35

hmm. doing that rebuilds the world?


apg
2017-10-18 03:46:46

that’s unexpected.


ben
2017-10-18 03:46:54

yes, it runs raco setup for you


apg
2017-10-18 03:47:18

i’d expect that, but i guess i wouldn’t expect that it’d also re-setup all packages


ben
2017-10-18 03:47:20

(there’s a --no-setup option)


ben
2017-10-18 03:48:21

IIUC it’s because they might depend on slideshow.


ben
2017-10-18 03:48:32

since most don’t, the setup should go fast


apg
2017-10-18 03:49:26

it’s tolerable, sure. it rebuilt everything — the srfi-lib’s and things I wouldn’t expect.


apg
2017-10-18 03:49:31

but… ¯_(ツ)_/¯


ben
2017-10-18 03:55:28

is there a good alternative? I guess racket would have to know all things that depend on slideshow


notjack
2017-10-18 03:56:46

how exactly is this happening? raco setup looks for packages that depend on slideshow’s package, then raco setup checks each module in each of those packages and skips it (but still prints a raco setup: /path/to/mod line) if the module doesn’t depend on slideshow?


ben
2017-10-18 04:00:28

I think right now, raco setup rebuilds every collection. If a collection’s dependencies haven’t changed, then the rebuild doesn’t happen.


mflatt
2017-10-18 04:01:43

@notjack I don’t think there’s a way to close a TCP connection within Racket without sending FIN.


notjack
2017-10-18 04:02:18

is that something that would be very difficult to change?


mflatt
2017-10-18 04:04:05

When raco pkg runs raco setup, it rebuilds any collection that is included in any package that declares a dependency on the changed package, if I remember correctly


mflatt
2017-10-18 04:06:15

Offhand, I don’t even know how to do it in C. As for avoiding both FIN and RST, is that possible without unplugging the machine or otherwise disabling the OS?


notjack
2017-10-18 04:06:56

¯_(ツ)_/¯


notjack
2017-10-18 04:07:58

I don’t know enough about how kernels expose the tcp/ip stack to user programs. I’m only barely sure that it lives in the kernel and not userland.


mflatt
2017-10-18 04:12:31

My quick searches don’t turn up an easy way to control this


notjack
2017-10-18 04:13:44

It’s not an obstacle for me at the moment so don’t sweat it


lexi.lambda
2017-10-18 04:41:24

@apg To add to Matthew’s comment, raco setup doesn’t really know about packages, only collections. When raco pkg installs or updates a package, it sets up the relevant links so that raco setup sees the package’s contents as “just another collection” (or set of collections, in the case of multi-collection packages). When raco pkg runs setup, it provides the collections of the package being updated. As Matthew notes, this can end up being a lot of extraneous things if other packages provide modules in the same collection as the package being updated, or if they provide modules in the same collections as a package’s dependents.


lexi.lambda
2017-10-18 04:42:32

The underlying API in setup/setup hints at some of this: note that setup takes a #:collections argument, but it doesn’t let you specify anything about packages. http://docs.racket-lang.org/raco/setup-plt-plt.html#%28def._%28%28lib._setup%2Fsetup..rkt%29._setup%29%29


apg
2017-10-18 04:43:08

Hmmm.


apg
2017-10-18 04:43:22

Thanks for all the interesting context!


apg
2017-10-18 04:45:41

So is the Racket distribution a single collection?


lexi.lambda
2017-10-18 04:46:44

No, a “collection” is just a top-level namespace, like racket/ or syntax/, and the core provides modules in many collections. I think the terminology is a little odd.


lexi.lambda
2017-10-18 04:46:57

But this is all the way it is for legacy reasons.


apg
2017-10-18 04:47:54

Thats what I thought a collection was. OK. I guess I still don’t quite understand the world rebuild…but it’s not necessary to at the moment.


lexi.lambda
2017-10-18 04:48:56

Yes, it’s strange. It would be better if raco setup were smarter and knew about packages, but collections long predate the current package system, so packages were sort of bolted on top.


apg
2017-10-18 04:49:11

Ok.


lexi.lambda
2017-10-18 04:49:22

(At least that is my understanding. I actually haven’t been using Racket long enough to have experienced it pre-package system.)


notjack
2017-10-18 04:51:03

plus it’s technically the second package system


notjack
2017-10-18 04:51:31

I’ve no idea what using PLaneT (the first system) was like


notjack
2017-10-18 04:57:12

is there a way to peek channels or async buffered channels like one can peek a port?