abhirag
2019-3-22 10:25:33

@abhirag has joined the channel


mark.warren
2019-3-22 13:58:35

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


soegaard2
2019-3-22 13:59:44

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



mark.warren
2019-3-22 14:00:49

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


mark.warren
2019-3-22 14:00:52

Thanks


soegaard2
2019-3-22 14:01:18

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


mark.warren
2019-3-22 14:02:02

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


soegaard2
2019-3-22 14:02:32

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


mark.warren
2019-3-22 14:02:46

Haha.. Thanks again


githree
2019-3-22 14:02:46

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


soegaard2
2019-3-22 14:03:00

mark.warren
2019-3-22 14:03:37

Nice


lexi.lambda
2019-3-22 17:48:06

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


notjack
2019-3-22 18:23:28

@lexi.lambda….what


mflatt
2019-3-22 19:56:56

Please don’t do that. :slightly_smiling_face:


alexknauth
2019-3-22 20:03:09

:no_mouth:


samdphillips
2019-3-22 20:03:11

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


lexi.lambda
2019-3-22 20:03:50

I was not intending to. :)


alexknauth
2019-3-22 20:05:51

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


mflatt
2019-3-22 21:01:18

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


matias
2019-3-22 22:55:12

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


notjack
2019-3-23 00:25:54

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


notjack
2019-3-23 00:26:27

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


alexknauth
2019-3-23 00:36:51

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


alexknauth
2019-3-23 00:37:36

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


alexknauth
2019-3-23 00:38:10

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


alexknauth
2019-3-23 00:38:18

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


matias
2019-3-23 00:42:43

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


matias
2019-3-23 00:43:05

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


matias
2019-3-23 00:43:18

and ask the repl what it is


matias
2019-3-23 00:43:23

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


alexknauth
2019-3-23 00:45:39

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


alexknauth
2019-3-23 00:46:18

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


alexknauth
2019-3-23 00:46:28

I didn’t know that.


matias
2019-3-23 03:19:07

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.


matias
2019-3-23 03:24:34

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