anyone happen to know who the other racketeer in Mountain View is? https://www.google.com/maps/d/u/0/edit?mid=1i3zN11e_6te5ytduAiv1cidrIi4&ll=37.31311276802874%2C-121.76553941601566&z=11
Eric Dobson, maybe?
oh right!
woah! what is this?
and, how do I get my name on the list?
brought to you by @ben towards the bottom of that thread
- Look for “racketeers.csv” in the menu
- Click the “vertical dots” to the right of “racketeers.csv”. (If you hover the mouse over these dots, it should say “Layer Options”)
- Click “Open Data Table”
- Right-click any row, choose “Add Row”
- Add yourself, hit enter
(those are @ben’s instructions)
@notjack @samth great! I haven’t seen the thread yet apparently.
:slightly_smiling_face:
It might be fun to have a slack app that shows racketeers nearby. e.g. /geo nearby
and, allow for something like /geo set 90210 and /geo whereis @apg
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
yeah. that’s a good point
works better as a company tool
definitely
(but yeah, it’d be opt-in)
The other thing that might be fun: https://racket.slack.com/apps/A11MJ51SR-donut
annoyingly we’re at our limit for apps on free slack
that’s both creepy and fascinating
ah! there you go.
@notjack works great for large companies… of course.
it’s almost like slack only accidentally took over foss communities :P
not a huge fan of this trend…
but, if that’s what people want, then…
¯_(ツ)_/¯
@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.)
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).
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. :)
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.
With that fix + the extra splicing-syntax-parameterize changes, namespacing finally seems to work properly inside (module* m #f ....) submodules.
Now I just need to figure out how on earth to handle the REPL/top-level. :/
Hopelessly? ;)
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.
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:
@mflatt I just pushed a commit without the unnecessary with-syntax, feel free to merge (or I can).
Go ahead and merge - thanks!
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. :)
IANAL, but :wave: seems fine. :stuck_out_tongue:
@lexi.lambda IANAL, either, but it sounds right to me
@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
it doesn’t, which is the problem.
welp, i tried
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. :)
oracle didn’t care :slightly_smiling_face:
I would be much more careful if Oracle were the copyright holder. ;)
@pnwamk what do you recommend instead of arr for “arrow”?
@dustin has joined the channel
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
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
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)
I’ve thought about that a lot, too. scribble/manual would be a good start. Unsure if you want full literate programming or not.
I’ve never tried LP but I’m very skeptical
because I think there’d be lots of things like: because of this 1 idea/goal, we change the code in N different places
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.
@mflatt When a TCP output port is closed only via a custodian shutdown (no calls to close-<i/o>-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.
(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)
if only we had (module+ scribble/manual ....) ?
yes please to scribble docs that cooperate well with module+
it’s frustrating that docs are included via a single doc export so it’s hard to define documentation in a piecemeal way…
I think the mcfly package has a solution
but I’ve never looked into it
or, would it be possible to do #lang doc+ racket that looks for (begin-doc ....) syntax and lifts those into a “big” module* ?
in theory, yes, but meta-languages that introduce new forms are currently held together with spit and baling wire
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
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 :)
heh I feel that way about a lot of things
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)?
raco pkg install --link -u ./slideshow-lib is what I thought might work… but that doesn’t seem to do what i want.
raco pkg update --link slideshow-lib should do the trick if you already have slideshow-lib installed
or raco pkg update --clone slideshow if you want a copy of the slideshow repo
hmm. so update instead! perfect!
thanks
hmm. doing that rebuilds the world?
that’s unexpected.
yes, it runs raco setup for you
i’d expect that, but i guess i wouldn’t expect that it’d also re-setup all packages
(there’s a --no-setup option)
IIUC it’s because they might depend on slideshow.
since most don’t, the setup should go fast
it’s tolerable, sure. it rebuilt everything — the srfi-lib’s and things I wouldn’t expect.
but… ¯_(ツ)_/¯
is there a good alternative? I guess racket would have to know all things that depend on slideshow
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?
I think right now, raco setup rebuilds every collection. If a collection’s dependencies haven’t changed, then the rebuild doesn’t happen.
@notjack I don’t think there’s a way to close a TCP connection within Racket without sending FIN.
is that something that would be very difficult to change?
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
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?
¯_(ツ)_/¯
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.
My quick searches don’t turn up an easy way to control this
It’s not an obstacle for me at the moment so don’t sweat it
@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.
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
Hmmm.
Thanks for all the interesting context!
So is the Racket distribution a single collection?
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.
But this is all the way it is for legacy reasons.
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.
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.
Ok.
(At least that is my understanding. I actually haven’t been using Racket long enough to have experienced it pre-package system.)
plus it’s technically the second package system
I’ve no idea what using PLaneT (the first system) was like
is there a way to peek channels or async buffered channels like one can peek a port?