paul
2018-10-17 07:52:00

@paul has joined the channel


pocmatos
2018-10-17 08:18:53

What’s the best way to run a single racket test library directly through racket? I tried for example: racket -l ./pkgs/racket-test-core/tests/racket/read.rktl but this is not it.


jxxcarlson
2018-10-17 11:45:37

@pocmatos, No, not using racket-mode in emacs. I use vscode as an editor for writing racket code. My little project is note-taking app: note -a blah blah adds a line to a file data.txt, note foo displays all lines containing foo, and note foo bar displays all lines containing both foo and bar. Etc. I would like to be able to say note -e to bring up data.txt in an editor, e.g., emacs, if I want to correct entries.


abmclin
2018-10-17 11:55:46

@pocmatos racket -l takes a module path so in your case you’d do racket -l tests/racket/read


samth
2018-10-17 12:05:11

@abmclin you can’t do that because read.rktl isn’t a module


samth
2018-10-17 12:05:31

@pocmatos you want -f


pocmatos
2018-10-17 12:12:01

@samth thanks! that’s what I needed. Does that simply evaluate the file without assuming a module?


samth
2018-10-17 12:12:46

I recommend looking at the racket command line help for the precise answer, but it uses load


abmclin
2018-10-17 12:19:05

Ahh didn’t realize read.rkt isn’t a module, never mind then.


pocmatos
2018-10-17 12:36:23

@jxxcarlson ah, now I understand you. Have you tried subprocess?


pocmatos
2018-10-17 12:37:14

Or in your case system might be easier to work with as it waits for the subproc to complete.



samth
2018-10-17 13:06:47

@abmclin it’s actually read.rktl, which indicates that with the extension


paul
2018-10-17 13:09:08

Greetings! I just joined the Racket development crowd and I have some questions. I’m working on the documentation.

  1. In Racket documentation, should @tech{foo} be used on every occurrence of “foo” once it is defined, or just on “important” occurrences?

I am working on the “Evaluation Model” documentation.

  1. Section 1 includes the sentence

“The dynamic extent of an expression is the sequence of evaluation steps during which the expression contains the redex.”

Could someone explain this? Which redex? Do the two instances of “expression” refer to the same expression?

  1. Section 5 lists the direct values of Racket. That list disagrees with the technical documentation, in which only fixnums are direct. I would like to define the term “immediate object,” but I need to know which types are immediate.

samth
2018-10-17 13:11:18

@paul those two uses of expression are the same


samth
2018-10-17 13:12:54

The redex referred to is whatever the redex in the reduction step is


samth
2018-10-17 13:14:19

Which two pieces of documentation disagree?


paul
2018-10-17 13:27:20

Sorry, I still don’t understand. First, are we defining the dynamic extent of an expression or the dynamic extent of the value of a particular redex? After all, a particular redex only exists for one evaluation step. Then it’s the redex’s value that persists for awhile. All the definitions of dynamic extent I’ve encountered talk about the extent of a value.

The two files are reference/eval-model.scrbl and inside/values.scrbl. The latter specifies that there is a 1-bit tag that distinguishes immediate fixnums from referenced objects.


samth
2018-10-17 13:28:35

dynamic extent is about an expression


samth
2018-10-17 13:29:26

the statement means that the dynamic extent of an expression e is the sequence of evaluate steps E[r] -> E[r'] where r (the redex) is contained in e


samth
2018-10-17 13:31:55

the section in the Reference says that some things can be used “directly” as values


samth
2018-10-17 13:32:08

the section in the Inside doc mentions “immediate” integers


samth
2018-10-17 13:32:13

these are different concepts


samth
2018-10-17 13:32:59

although the immediate integers are a subset of the things that can be used directly as values


jxxcarlson
2018-10-17 13:40:46

@pocmatos — thankyou! system was the way to go.


paul
2018-10-17 13:46:43

I’ll ask one more question and then drop it if this is bothersome. Can you give me an actual example of an evaluation with at least two steps and show me the redex? The description of redex is very careful to explain that a redex exists for one step and is then replaced by its value. In particular, I don’t understand what “the redex” means, when a sequence of evaluation steps involves multiple redexes.

The text says “A few kinds of objects can serve directly as values, including booleans, (void), and small exact integers. More generally, however, a value is a reference to an object.” I can’t tell from this what the difference between a direct value and an immediate value is. I think we agree that “immediate object/value” is something like a fixnum, stored directly in the reference word. What is a direct object/value?


pocmatos
2018-10-17 13:47:29

@jxxcarlson awesome!


samth
2018-10-17 13:49:46

@paul Consider the expression (+ 1 (+ 2 3)). It takes two reduction steps: (+ 1 (+ 2 3)) -> (+ 1 5) -> 6. In the first step, the redex is (+ 2 3). In the second step, the redex is (+ 1 5).


samth
2018-10-17 13:50:29

In that example, the dynamic extent of the original expression is those two reduction steps.


paul
2018-10-17 13:55:10

Oh, that’s not what I thought was going on at all. Everything you wrote here makes sense. But then what does “the redex” have to do with it, given that there are two redexes? Does “the redex” refer to the original expression (when it is selected as a redex for the reduction of the enclosing expression)?


andreiformiga
2018-10-17 13:55:51

in the first expression (+ 1 (+ 2 3)) there is only one redex


andreiformiga
2018-10-17 13:56:51

I think “the redex” in the documentation probably means the next redex that will be evaluated


paul
2018-10-17 14:01:13

Yes, there is an original redex. But the dynamic extent covers multiple reductions with multiples redexes. So perhaps “the redex” refers to the first redex, the one you highlighted.


samth
2018-10-17 14:01:50

@paul what @andreiformiga says is right


samth
2018-10-17 14:02:30

“contains the redex” could be expanded to “contains the redex of the evaluation step”


samth
2018-10-17 15:31:27

samth
2018-10-17 15:33:59

also scott’s dissertation


lexi.lambda
2018-10-17 15:34:17

@samth I don’t think so, but I’m not sure if it’s relevant… it doesn’t seem to touch this particular problem (and it avoids discussing signatures altogether).


lexi.lambda
2018-10-17 15:37:56

“Syntactic Abstraction in Component Interfaces” looks interesting and relevant to some other interest of mine, though, and probably also the relevant section of Scott’s dissertation.


jvl.mclellan
2018-10-17 18:53:05

@jvl.mclellan has joined the channel


pocmatos
2018-10-17 19:02:05

@leif i heard you a few days ago saying the racketcon videos will be online soon. How’s it going?


paul
2018-10-18 00:56:56

Thanks, folks, I think I’m clear on the dynamic extent of an expression. Could someone help me with direct values versus immediate values?

The text says “A few kinds of objects can serve directly as values, including booleans, (void), and small exact integers. More generally, however, a value is a reference to an object.” I can’t tell from this what the difference between a direct value and an immediate value is. I think we agree that “immediate object/value” is something like a fixnum, stored directly in the value word. What is a direct object/value?


lexi.lambda
2018-10-18 00:59:28

I don’t think “immediate value” means anything in the context of Racket specifically, but I could be wrong.


andreiformiga
2018-10-18 01:03:59

@paul is the document in question “Inside: Racket C API” ?


andreiformiga
2018-10-18 01:06:56

I don’t know if I understand the issue but maybe you’re confusing two concepts, one is a high-level semantic one of which values can be “directly” represented in racket without evaluation, and the other is a lower-level implementation detail about which objects are directly represented in a memory word (unboxed), without references


samth
2018-10-18 01:12:41

@paul what it means to use an object directly as a value (the document does not use the term “direct value”) is that the object is not located in the heap and referred to by a pointer, but located directly inside whatever data structure is containing it


samth
2018-10-18 01:14:04

An immediate integer (again, the term “immediate value” is not there) is one that is represented inside the value instead of pointed to by a pointer


samth
2018-10-18 01:14:36

Immediate integers are one of the kinds of objects that can be used directly as values


notjack
2018-10-18 01:37:25

@samth Must immediate integers be used directly as values? More generally, do there exist objects such that the same object is used “directly as a value” in some places and not others?


notjack
2018-10-18 01:37:57

I’m not really sure what that would mean


samth
2018-10-18 01:43:40

You can’t represent a pointer to a fixnum in racket’s VM, I think


raphael.villas
2018-10-18 02:35:58

@raphael.villas has joined the channel