ryanc
2019-7-15 07:36:12

@alexknauth no, ~delay sounds like it would involve 3D syntax, which I don’t want to depend on either. Instead, maybe we should extend quasisyntax and unsyntax so they cooperate with ellipses. Or build a similar escape directly into syntax and make quasisyntax obsolete.


ryanc
2019-7-15 07:47:42

@notjack If it splits to #f and #f, then it’s a self module path that represents the module currently being expanded—or rather, the module that was being expanded when the module-path index was created. When the expander is done with a module, it shifts all of the self module indexes (for the current expansion) to something else, but IIRC it only shifts those it sees directly in the module’s expanded syntax, so self MPIs in identifiers in syntax properties (for example) don’t get replaced. So there can actually be multiple “self” MPIs floating around at the same time. My guess is that the extra printed stuff is to help disambiguate them when debugging.


notjack
2019-7-15 07:49:53

hmm


notjack
2019-7-15 07:51:07

any chance the module-path / module-path-index / resolved-module-path systems can get simplified somehow for racket2? I find them very difficult to use


ryanc
2019-7-15 08:39:54

@notjack I’m not sure there’s much room for simplification from the Racket compiler/linker/loader point of view, given the goal of being able to move compiled code from one path to another (or one machine to another!). I think module-path indexes (or something like them) are a necessary indirection for making that work. But it may be that your particular application doesn’t care about potential rearrangements of the filesystem; you might only care about modules in terms of where they live right now. In that case, you might be able to get away with always immediately translating a MPI down to a resolved module path (or possibly back up to a module path), and you could build wrappers around the MPI-returning functions. I think I did something like that in the implementation of raco check-requires or raco show-dependencies or both, but I don’t remember the details right now.


sorawee
2019-7-15 11:10:09

Can anyone help me with racket/class? What I’m trying to do is roughly:

(new
 (class* object% [printable<%>]
   (super-new)

   (define (my-printer out . _)
     (fprintf out "hello"))

   (public [my-printer custom-print])
   (public [my-printer custom-write])
   (public [my-printer custom-display])))

I feel this should be easy. Somehow it’s not.


sorawee
2019-7-15 11:13:02

I understand that I probably have a lot of misconceptions right now, but what’s the way to do what I’m trying to do? Surely I don’t need to duplicate the definition thrice.


sorawee
2019-7-15 11:30:51

Okay, so the problem is that method != lambda, which totally makes sense. Is there a way to convert a lambda to method? Ideally I shouldn’t need to define three methods, with two redirecting to the other one.


greg
2019-7-15 14:59:11

My delayed reaction, waking up this morning, is feeling sad. In my experience, proposals like this are usually foregone conclusions — the only question is “when” and “how, just around the edges”. So my gut is telling me it’s probably that, ergo sad. But. Maybe this isn’t the typical situation, and my gut is misleading me.


greg
2019-7-15 15:00:45

(I’m not talking about RFC-like technical details here, as opposed to the desired place to discuss them. Instead, talking about feelings.)


jerome.martin.dev
2019-7-15 15:17:54

@greg On one hand, I’m happy to see the spirit of “discovering the future of programming by breaking the rules” as Racket always had is still the main motivation here, on the other hand, I oh so love s-expressions, the clarity and expressivity they bring that I have a hard time thinking about using something else for the main Racket experience. I don’t mind about #lang having any syntax they want, as long as it expands to the wonderful common ground that s-expression give. The thing is, the name of the project “Racket2”, feels like the ambition is to have an alternative to s-expression as the main syntax for Racket. The “2” in there feels like s-expressions are not good enough, and should be replaced by something better. I know it’s not the intention, and I know #lang racket is still going to work as always, but that “2” in the name makes me feel insecure, as @gregsaid, that it’s already to some extent fixed in stone.


notjack
2019-7-15 15:37:30

I think we shouldn’t think about it in terms of whether or not s-expressions are “better”. Instead, we should acknowledge that the rest of the world has some standard notation and that asking them to abandon it is a barrier to entry. So if we can make this language-oriented programming thing work with non-s-expression syntax, then I think we have a responsibility to do so.


greg
2019-7-15 15:51:29

In my own experience, with trying to make software products more popular, adopting features of the competition does not necessarily help. Sometimes it even hurts.


greg
2019-7-15 15:52:01

It might be useful to look at efforts like New Coke, or Python 3, and so on.


greg
2019-7-15 15:52:14

Might be some lessons.


greg
2019-7-15 15:53:04

The lessons might be N/A here, but, still useful to know.


notjack
2019-7-15 15:53:32

To be fair, Python 3 is now more widely used than python 2 and a significant number of packages formally don’t support python 2 anymore


greg
2019-7-15 15:54:14

I actually don’t know very much about that, except it seemed to be a pretty prolonged and difficult process for the community.


notjack
2019-7-15 15:54:14

not saying it wasn’t a mountain of effort to get to that point, but that did happen


notjack
2019-7-15 15:54:36

yeah I don’t think there’s going to be anything easy about racket2


greg
2019-7-15 15:55:07

I’d prefer long, difficult efforts to get the expected benefit, after all the work.


notjack
2019-7-15 15:56:47

I think there won’t be much direct benefit for the people who already know racket, but there will be benefit for everyone else


ryanc
2019-7-15 16:10:35

I’m also feeling ambivalent, but I have to keep in mind that I’m about 0.5 for 4 in predicting how well I’ll like major changed in Racket based on very early descriptions. So to argue the other side (to myself especially), consider this: Long ago, Lisp decided that syntactic structure was made up of pairs. That’s it. Everything else—like symbols and numbers and so on—only gets to hang out at the leaves of the syntax trees (with rare exceptions). Same with Scheme. Same with Racket. Clojure, as I understand it, decided that syntactic structure would be made up of lists and vectors. And apparently that was palatable, and Clojure is still a Lisp in good standing. So maybe there’s room to explore richer concrete-syntactic structures.


mflatt
2019-7-15 16:27:54

My understanding of the Python 2 vs. 3 problem is that you have to pick one VM or the other. Whatever Racket2 turns out to be, we will certainly insist that Racket and Racket2 modules coexist and interoperate in one VM.


greg
2019-7-15 16:29:44

That’s a great point. Even so, it reminds me of two other things. 1. Clojure is AFAICT significantly more popular than Racket, currently. Multiple companies use it, there are jobs, etc. (Admittedly, Clojure folks probably feel it is not popular compared to Java. Maybe they have a case for “sexprs are holding us back”, valid or not.) If Racket had Clojure’s popularity, would this proposal be on the table? It sounded like, probably not.


greg
2019-7-15 16:30:49
  1. I understood the proposal to be not just “there should be a different default language”. The phrase “change the culture” came up. Meaning, change this syntax for documentation, books, tutorial, blog posts. That sounds exhausting. In my remaining years, do I want to spend time on that for my subset of it? Not really.

(Oh, you say it can be automated? I don’t know, but if that’s really true, then why not have a “show-as” toggle on for the syntax on web pages and maybe tools.)


greg
2019-7-15 16:32:33

So, emotionally, I think 2 is the source of a lot of my sadness. I don’t want to rearrange deck chairs but the ship isn’t really changing course.


greg
2019-7-15 16:33:40

OK I’ve shared enough feelings and I will shut up for awhile. :slightly_smiling_face:


philip.mcgrath
2019-7-15 17:08:29

@sorawee A key point is that define creates a field (per instance) rather that a method. You probably want define/private to create a private method. The second issue is that the shape of methods is constrained so that class can re-write them to handle this. So, you need to explicitly write something like (define/public (custom-write x) (my-printer x)).


sorawee
2019-7-15 17:11:35

Thanks! I thought that there will be a better a solution, but that doesn’t seem to be the case.


sorawee
2019-7-15 17:12:08

Thanks for telling me about define/private btw. This is really helpful.


philip.mcgrath
2019-7-15 17:12:27

Well, you could write a little macro …


ryanc
2019-7-15 17:13:49

That’s true, but public (or private) is the thing that tells the class to treat a name as a method instead of a field. define/public and define/private just expand into define and public or private.


ryanc
2019-7-15 17:14:41

I think the problem is that class expects each definition marked as a method to have exactly one “external name”.


notjack
2019-7-15 17:29:21

@greg That’s a great point, and I think 2 will definitely be the most work and the most reward.

I really hope we come up with a way for all my existing scribble defprocs and (examples ...) to render in the new syntax without me having to change the source code.


greg
2019-7-15 17:30:21

And now Mattias is being a twit on the mailing list for someone using the phrase “diversity” instead of his preferred phrase “welcoming everyone”. I’d better log off for today. ¯_(ツ)_/¯


greg
2019-7-15 17:30:36

Cheers.


plragde
2019-7-15 19:49:00

I’m seeing fallout from this on Twitter, in case anyone cares.


notjack
2019-7-15 19:53:36

oh boy


steveh2009
2019-7-15 23:48:21

Clojure is thriving. It would be kinda exciting to have a full-on #lang Clojure (no, way beyond Rackjure) on top of Racket instead of going to an infix notation. The parens are a little less and each kind mean something, easy to know the data structures involved by the syntax. In this way, developers who have years of experience in Clojure would find new use cases on top of Racket vs the JVM without disrupting Racket’s 24 and beyond legacy.


notjack
2019-7-15 23:53:11

I’d love to see some standard, well-supported implementations of other programming languages like #lang clojure, #lang java, #lang python. That would help people learn Racket and either interop with or migrate from existing code.


notjack
2019-7-16 00:34:56

ever the typographist, eh @mbutterick? (in response to that edit history)


tgbugs
2019-7-16 00:56:22

wearing my neuroscientist hat for a moment, I would love to know if there is some bimodal distribution in the programming population between those who prefer highly regular syntax (e.g. Racket) to those who prefer more irregular syntax, and whether it correlates with anything else


tgbugs
2019-7-16 01:28:08

slightly in that context, a successful execution of rhombus for me would mean that there would be a button in the docs that I could click to toggle between s-exp syntax and whatever comes next


tgbugs
2019-7-16 01:28:42

if we really do it right we shouldn’t have to choose one or the other


tgbugs
2019-7-16 01:30:52

though I’m sure there is some impedance mismatch out there not to mention the practical issue of referencing source lines and having to enforce deterministic conversion and formatting to achieve it


steveh2009
2019-7-16 02:26:31

You know, if I were Matt, after having over 20 years of working on an s-exp language project and then waking up one day with an epiphany to go infix to gain greater use/popularity, I would reach out to Guy Steele. I think his opinion would be very sobering.


tgbugs
2019-7-16 02:35:29

I seem to recall one of the arguments for the Chez Scheme switch was that the language would be implemented in itself with all the accompanying benifits (which have turned out to be true), a syntax change to the core language for … popularity reasons seems to run counter to that, especially since I find it hard to imagine that those 1.2 million lines for s-exp racket code would ever be converted to whatever comes next (barring the mega success scenario)


notjack
2019-7-16 02:56:30

existing code doesn’t have to be converted, though it would be good to have an automated way of doing so


tgbugs
2019-7-16 02:58:49

yes, but then we are back where we started, with an impedance mismatch between surface syntax an core implementation, not as bad as the staggering semantic mismatch between C and Racket, but a mismatch nonetheless


tgbugs
2019-7-16 02:59:23

it might be worth it to get people into the mindset


tgbugs
2019-7-16 02:59:38

at which point they start making languages, and realize that parens are beautiful


tgbugs
2019-7-16 02:59:46

^_^


notjack
2019-7-16 02:59:57

I don’t think there is a mismatch, and I don’t think the major benefit of using chezscheme as a backend is that the implementation code is in a language similar to racket. The new macro expander implementation is an improvement mostly from a design perspective, not from a surface language perspective.


tgbugs
2019-7-16 03:05:20

“Hopefully, this internal restructuring will allow more people to contribute to Racket’s implementation, leading to a range of improvements for end users in the long run.”



tgbugs
2019-7-16 03:05:44

evokes the general sentiment I recall


notjack
2019-7-16 03:11:42

I think the reason it was hard to contribute was because the old C expander and runtime are very complicated with lots of legacy warts and leftover design mistakes, not just because it’s C code


notjack
2019-7-16 03:12:46

after all, porting to chez involved writing the new rktio C library which is much more maintainable and easier to understand than the old C code implementing the IO system


tgbugs
2019-7-16 03:19:17

agreed


notjack
2019-7-16 05:00:53

Fun fact I discovered with some code analysis tools I’ve been working on: there are 354,707 exported bindings across all successfully compiling modules in the user scope packages currently installed on my laptop


drdeeglaze
2019-7-16 05:36:51

I fixed some issues with standard-cat. Ear tips are now calculated along the vector from ellipse origin to the ellipse point given the width, height, and angle. https://twitter.com/DrDeeGlaze/status/1150993827127107584