
@abhirag has joined the channel

Am I right in thinking there is no tree widget in the racket gui library?

There is a “tree” widget, but I can’t remember whether it is a package or a part of the gui library.


Ah, I couldn’t find it in the docs.

Thanks

It’s in the “MrLib: Extra GUI Libraries.” https://docs.racket-lang.org/mrlib/index.html

Cool. Didn’t think of looking for Hierarchical List Control :grin:

I cheated - I googled it - and found a reddit answer pointing to the answer.

Haha.. Thanks again

I see this question (tree widget) so often that I wonder: maybe it is time to move it to base gui lib?


Nice

TIL that you can apparently successfully stick procedures that aren’t structs and don’t close over anything in compiled code.

@lexi.lambda….what

Please don’t do that. :slightly_smiling_face:

:no_mouth:

Not sure I understand the ramifications. Could you subvert a compiled procedure or exported name?

I was not intending to. :)

I may have done this in the debug
package for (debug-repl)
. Is there a “good” way, an alternative?

I’m assuming that @lexi.lambda means something like (let-values ([(i o) (make-pipe)])
(write (compile (lambda (x) x)) o) ; `lambda` term is not quoted
(eval
(parameterize ([read-accept-compiled #t])
(read i))))
although that example will only work if the JIT is disabled. It works accidentally due to the way the bytecode compiler represents closed lambda
forms in compiled code. It doesn’t work with Racket CS. It also doesn’t create any particular security holes, since you could always have constructed the bytecode stream manually. But it’s unspecified and unintended behavior that’s a little tedious to prevent, so I’d prefer to keep ignoring the issue.
Injecting procedures into syntax where you’re not going to marshal is a somewhat different issue, and debugging is one of the cases where that seems useful (enough that we haven’t changed datum->syntax
to disallow it).

In typed racket, I’m not really clear on the difference between (All (a ...) (a ... -> Symbol))
and (All (a ...) (a ... a -> Symbol))
.

@matias The first type accepts any number of arguments, but the second type accepts at least one argument. I think.

I don’t use TR much so I’m guessing

I didn’t know that the first one was legal.

The second one, I think of like the ... a
means ...ₐ
, with a subscript a.

The ellipsis repeats the thing before it with the same number of times as the type variable a
is repeated.

The first one, I don’t know what it does.

@alexknauth after some further investigation, I think they do the same thing?

if I define something as type (All (a ...) (a ... -> Symbol))

and ask the repl what it is

it spits back (All (a ...) (a ... a -> Symbol))

Oh, so tvar … is shorthand for tvar … tvar, I guess.

The type variable usage is repeated the same number of times as the type variable in the input.

I didn’t know that.

So I’ve been talking to my LaTeX gnome, who objects to the presence of the line
\usepackage[utf8]{inputenc}
in the XeLaTeX output, as it manages to break some things.

> The LaTeX source includes stuff that transforms UTF–8 byte sequences into LaTeX commands. However, XeTeX doesn’t serve bytes, but whole characters, causing the stuff to break.
> The source file contains some engine-specific code, notably, the code that tries to transform UTF–8 text into commands. > Otherwise, the document appears to be XeLaTeX compatible. > The line > \usepackage[utf8]{inputenc}
> is what tries to transform UTF–8 text into commands, thus breaking some text. Removing it will fix the botched text.