
@paul has joined the channel

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.

@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.

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

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

@pocmatos you want -f

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

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

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

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

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


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

Greetings! I just joined the Racket development crowd and I have some questions. I’m working on the documentation.
- 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.
- 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?
- 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.

@paul those two uses of expression are the same

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

Which two pieces of documentation disagree?

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.

dynamic extent is about an expression

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

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

the section in the Inside doc mentions “immediate” integers

these are different concepts

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

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

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?

@jxxcarlson awesome!

@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)
.

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

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)?

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

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

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.

@paul what @andreiformiga says is right

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

@lexi.lambda have you seen https://www.cs.kent.ac.uk/people/staff/sao/documents/icfp06.pdf

also scott’s dissertation

@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).

“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 has joined the channel

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

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?

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

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

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

@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

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

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

@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?

I’m not really sure what that would mean

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

@raphael.villas has joined the channel