laurent.orseau
2020-12-18 08:57:19

We all live in a hollow world anyway, and variables are just the projection of internal mechanics. Deal with it, people! :wink:


samth
2020-12-18 14:43:29

I’m a little confused about what you’re trying to do, but maybe using prop:match-expander as well would help.


badkins
2020-12-18 16:55:36

A comp sci prof friend of mine is learning Racket and using #lang eopl and was surprised he had to require stuff from Racket such as add1, foldl, andmap, etc. - does that sound right that those are not available by default?


badkins
2020-12-18 16:56:31

The docs do state, “The Essentials of Programming Languages language in DrRacket provides a subset of functions and syntactic forms of racket” - I wonder why that is.


spdegabrielle
2020-12-18 16:56:35

Seems weird - the teaching languages normally have what you need for the particular text


spdegabrielle
2020-12-18 16:57:19

Maybe he is going beyond the exercises in the text?


spdegabrielle
2020-12-18 16:59:12

(To my shame I have a copy that I have never opened)


soegaard2
2020-12-18 17:06:02

I think EOPL is R5RS with a few extra forms for defining ~structs~ ~records~ data types. https://docs.racket-lang.org/eopl/index.html And neither add, foldl nor andmap are in R5RS.


soegaard2
2020-12-18 17:07:36

The authors provide files to run EOPL programs in standard Scheme too: http://www.eopl3.com/


ben.knoble
2020-12-18 18:40:21

You’re not talking about Jeff T at a uni in NC, are you?


yilin.wei10
2020-12-18 19:47:40

I’m attempting to get an identifier to behave like the identifiers created by define struct (e.g. it acts like a function when in an apply position, expands to a correct match expression). I was hoping that a mixture of the prop:rename, prop:struct-info and prop:match-expander would let me emulate the behaviour.


badkins
2020-12-18 19:55:06

I am :)


ben.knoble
2020-12-18 19:55:31

I’m TA’ing for that class with him, good to know :slightly_smiling_face:


badkins
2020-12-18 19:55:53

Small world :) I’m in the Triangle also. Are you in the Triangle Devs Slack?


ben.knoble
2020-12-18 19:56:35

Small indeed! No, didn’t know that existed.


badkins
2020-12-18 19:56:53

I’ll get you a link to the inviter…


ryanc
2020-12-18 20:38:13

I believe it should also work to start with #lang racket/base or #lang racket and then (require eopl). The require will shadow a few Racket names, but you’ll keep foldl, andmap, etc. (But not add. Did you mean add1?)


badkins
2020-12-18 20:39:30

@ryanc yes, I meant add - I’ll edit the above …


amal
2020-12-18 21:35:48

@amal has joined the channel


kellysmith12.21
2020-12-19 02:28:24

Are there use cases for mutable strings that can’t be better solved by other approaches?


samth
2020-12-19 03:51:37

I think Racket’s fixed length mutable strings have few uses


samth
2020-12-19 03:52:42

Mostly because it’s not even possible to replace one logical character by another, because some Unicode glyphs are described by two racket characters


kellysmith12.21
2020-12-19 03:59:33

I’m guessing that mutable byte strings have some uses?


samth
2020-12-19 04:18:18

yes, the usual advantages of mutable data for efficiency