maxim_jaffe
2018-7-29 09:31:22

Hey @soegaard2, what’s the danish Racket community like? I actually have a danish friend I was trying to convince to learn Racket, we did a few tutorials together when he came over and visited me a few weeks ago! Maybe I could point him to you guys if he decides to learn more!


maxim_jaffe
2018-7-29 11:02:24

hey are there any benchmarks for TR vs Racket and possibly other languages (say Python, C and SBCL?)


maxim_jaffe
2018-7-29 11:03:25

All the https://benchmarksgame-team.pages.debian.net/benchmarksgame/faster/racket.html seem to be for regular Racket, and since I read that the math library could be as much as 50x faster


maxim_jaffe
2018-7-29 11:03:31

I was wondering how TR compared


mflatt
2018-7-29 13:24:09

Could it be that the current directory is "/" when the error is reported, so as a path is shown relative to the current directory, the "/" is just dropped?


maxim_jaffe
2018-7-29 16:29:11

Damn, I didn’t say Good Morning Racketnam that’s why no one answered :stuck_out_tongue:


zenspider
2018-7-29 16:49:09

It’s possible that on OSX the window manager launches the app in /… But the open dialog starts in home. Not sure.


soegaard2
2018-7-29 17:37:23

@maxim_jaffe Point him here and to the mailing list. I know that Scheme and Racket is used on some of the universities. I don’t know of any user groups though.


maxim_jaffe
2018-7-29 17:38:09

hum ok :wink:!


maxim_jaffe
2018-7-29 17:38:13

Will do


lexi.lambda
2018-7-29 17:42:47

@maxim_jaffe FWIW, it sounds to me like you might be misinterpreting the effect of TR on performance. The math library is not 50x faster than an equivalent library would be if written in regular (dynamically typed) Racket; rather, using the typed math library from untyped code can result in up to a 50x slowdown. This is not because typed code is especially fast or because untyped code is especially slow, but rather because, in the worst case, the interaction between typed and untyped code can lead to significant overhead.


maxim_jaffe
2018-7-29 17:43:39

ah ok! Still it is faster to some degree no?


maxim_jaffe
2018-7-29 17:44:03

yeah come to think of the benchmarks 50x doesn’t make sense..!


maxim_jaffe
2018-7-29 17:44:30

I mean it helps the compiler yes?


soegaard2
2018-7-29 17:44:38

@lexi.lambda Btw - do you have a copy of Lisp In Small Pieces? Queinnec has a nice explanation of dynamic scope.


maxim_jaffe
2018-7-29 17:44:53

actually I got a pdf but haven’t read it


maxim_jaffe
2018-7-29 17:45:08

I actually came across it while looking at Lisps before settling on Racket


lexi.lambda
2018-7-29 17:45:12

@maxim_jaffe You should take a look at the paper Is Sound Gradual Typing Dead? which includes benchmarks that explore the overhead of typed/untyped interaction. https://www2.ccs.neu.edu/racket/pubs/popl16-tfgnvf.pdf


maxim_jaffe
2018-7-29 17:45:28

ok great :slightly_smiling_face:


maxim_jaffe
2018-7-29 17:45:30

thanks


maxim_jaffe
2018-7-29 17:46:53

Does Betteridge’s law of headlines apply?


lexi.lambda
2018-7-29 17:47:09

@soegaard2 I don’t, but I believe I understand dynamic scope pretty well… but I could be wrong. Everything I’ve read about dynamic scope has been consistent with my understanding (if we ignore concurrency) about how Racket parameters work. My message on the mailing list was mostly intended to get Matthias to explain why he thinks they’re so different. Perhaps you also understand what he’s getting at, though?


lexi.lambda
2018-7-29 17:47:23

@maxim_jaffe I think the authors would like to think so. :)


maxim_jaffe
2018-7-29 17:47:49

Hehe :slightly_smiling_face:


maxim_jaffe
2018-7-29 17:48:19

thanks for the links and info


maxim_jaffe
2018-7-29 17:49:50

By the way joking aside, this slack seems to have more talk at GMT+00 afternoon and evening, is it because most of you guys are in North America?


maxim_jaffe
2018-7-29 17:50:50

(GMT+01 to be more precise actually)


soegaard2
2018-7-29 17:50:54

I think you got it. But Queinnec has a really good explanation: he compares them, puts them in a historical context, has references etc. In other words LiSP is just the sort of book, you’ll enjoy.


lexi.lambda
2018-7-29 17:51:25

Sure, I believe you! Maybe I’ll see if anyone around here has a copy.


andreiformiga
2018-7-29 17:52:33

it’s a good book


andreiformiga
2018-7-29 17:54:09

I remember liking the Lisp–1, Lisp–2, …, Lisp-ω discussion


maxim_jaffe
2018-7-29 17:55:59

I can send you the pdf copy I got if you’d like


maxim_jaffe
2018-7-29 18:08:53

Hey @lexi.lambda I saw your talk on languages (think before yesterday) and that you mention ideas for graphical DSLs


maxim_jaffe
2018-7-29 18:09:34

At my lab they use Stella a lot for building system dynamic models


maxim_jaffe
2018-7-29 18:09:47

and I’ve been thinking for ages on building an alternative


maxim_jaffe
2018-7-29 18:09:56

fits nicely into the ideas you mention


maxim_jaffe
2018-7-29 18:10:04

Racket lookings promising for that


maxim_jaffe
2018-7-29 18:11:19

I tried to do something like that in PYthon as a library and although I got a GUI with a sort of similar looks to Stella, but didn’t get the “guts” working


maxim_jaffe
2018-7-29 18:13:34

reckon it is way easier in Racket, especially considering there is a specification language for these sorts of models (XMILE https://docs.oasis-open.org/xmile/xmile/v1.0/csprd01/xmile-v1.0-csprd01.html)


ben
2018-7-29 18:40:39

@maxim_jaffe I think the most helpful part of this paper for your question is the typed/untyped ratios in figures 4 and 5


lexi.lambda
2018-7-29 19:18:29

Not a fan, @ben? I’m only ribbing, I swear!


ben
2018-7-29 19:23:10

:) I just wanted to say “I’m a coauthor and I do not support this message”


lexi.lambda
2018-7-29 19:24:31

I am genuinely curious, actually: how do you feel about the current state of sound gradual typing? It’s been a couple years now since that paper, but it doesn’t seem very optimistic.


ben
2018-7-29 19:31:54

yes, and I’m always embarrassed about how little it seems like I’ve done to help


ben
2018-7-29 19:32:56

(1) I think we need to give up on the gradual typing dream — that any combo of typed/untyped is going to run quickly


ben
2018-7-29 19:33:35

(2) I’m surprised how much better TR is. The benchmarks from that paper are still really slow, but the improvement is way bigger than I would have guessed


ben
2018-7-29 19:34:50

I’m hoping to get rid of the disclaimer on the math library before I graduate. But I’m not sure exactly how that’s going to happen


lexi.lambda
2018-7-29 19:48:37

That all makes sense and seems reasonable, and I appreciate your perspective! I’m really just an outsider into all this, so I don’t feel like I really even have an intuition for how big the improvement you mention actually is.


ben
2018-7-29 19:52:57

that’s my problem too. I set up a page that describes the benchmarks, but there’s nothing online where people can see the results for Racket v6.2 vs v7 (http://docs.racket-lang.org/gtp-benchmarks/index.html)


lexi.lambda
2018-7-29 19:59:34

That’s a pretty cool scribble document!


ben
2018-7-29 20:09:57

ben
2018-7-29 20:10:04

Thanks. Here’s a picture with 6.2 (blue) vs. 6.12 (orange) on a few benchmarks. There’s a nice orange sunrise in 3, and the worst-cases (outside the 22x range) are even better — though that’s not likely to make anyone with a 20x slowdown happy.


lexi.lambda
2018-7-29 20:12:14

It seems like a pretty fundamentally hard problem in certain edge cases, but it does seem like there are more non-fundamentally slow cases than one would hope for.


greg
2018-7-29 21:26:07

Coming to Racket from C/C++, I thought in terms of “calling a function with arguments” or “passing arguments to a function”. Arguments or args for short. Racketeers would often talk about “parameters” instead of arguments. (Also “apply” vs. “call”, but I digress.) I thought, OK, fine, different jargon. Then I learned about the other parameters (as in parameterize). I thought gee that could be confusing.


greg
2018-7-29 21:27:26

In some sense you can treat them as “implicit” “extra” parameters to a function. Things that would be too tedious to supply explicitly all the time.


greg
2018-7-29 21:29:50

I don’t have a formal CS education, so maybe I am wandering around here saying something that amounts to a simple, “Yes there’s a some Greek letter reduction for that, obvs”. :smile:


soegaard2
2018-7-29 21:32:50

Had to google, but I think “parameter” is used by C programmers too.


soegaard2
2018-7-29 21:33:42

I agree that reusing the word “parameter” for something else is confusing for new comers.


soegaard2
2018-7-29 21:35:41

What do other languages call parameters (in the Racket sense)?


greg
2018-7-29 21:42:32

Aside from Common Lisp and Emacs Lisp, I only know about “dynamic bindings” in Clojure: https://clojuredocs.org/clojure.core/binding


soegaard2
2018-7-29 21:47:28

“As of Clojure 1.3, vars need to be explicitly marked as ^:dynamic in order for them to be dynamically rebindable”


soegaard2
2018-7-29 21:47:48

I bet the first version of clojure was an interpreter.


soegaard2
2018-7-29 23:05:40

@greg I am porting the indentation functions in racket-mode. I am bit confused by this function: https://github.com/greghendershott/racket-mode/blob/master/racket-indent.el#L358


soegaard2
2018-7-29 23:06:22

(let ((sym (intern-soft head))) (or (get sym ’racket-indent-function) …)


soegaard2
2018-7-29 23:07:51

Does this mean a user can change the indentation function for a particular form, by setting the racket-indent-function property of the symbol?


greg
2018-7-29 23:10:40

Emacs Lisp isn’t just a Lisp 2, it’s a Lisp 3!




greg
2018-7-29 23:13:20

One use of this is to put a property on a symbol, like say with-input-from-port, whose “key” is mode-name-indent, and whose value is info about how to indent.


greg
2018-7-29 23:13:58

And then the function that does indentation for a mode, can use that as a kind of hash table to lookup a number or a function to do indent.


greg
2018-7-29 23:14:29

And so the user can put a value on a symbol for say their own custom macro, to set the indent.


greg
2018-7-29 23:15:15

That function is complicated b/c it’s trying to ignore certain defaults that scheme-mode may have set up, but not ignore values a user may have added.


greg
2018-7-29 23:15:49

“That function” = the one you linked


soegaard2
2018-7-29 23:16:40

Thanks for the explanation. I’ll use a hash table instead - and store it in a buffer local variable.


soegaard2
2018-7-29 23:17:17

I vaguely recall seeing something similar in Chez.


greg
2018-7-29 23:17:37

greg
2018-7-29 23:21:04

I think conceptually symbol properties are more like a global var that’s (hash/c symbol? (hash/c symbol? any/c)) — globally, each symbol has a hashtable from symbol to any/c. But, that’s Emacs. Not sure you need to do it like that.


soegaard2
2018-7-29 23:22:21

You have a point. A global will do fine.


greg
2018-7-29 23:22:26

Speaking of parameters, buffer-local vars are similar in some respects — if you replace “buffer” with “thread”.


ben
2018-7-30 02:32:54

@lexi.lambda I replied to the pango issue, happy to talk more about it here


ben
2018-7-30 02:33:25

I just want (integer-in 100 1000) to not be so mysterious in the docs, and I think that should be easy to fix in the next few days