
If it changed then, it was most likely a result of the new expander implementation

That interaction evaluates to 5
in the 7.2 DrRacket repl, the 6.1.1 DrRacket repl, and the 6.0 DrRacket repl

Can someone with a clone of typed racket: 1. make a new file typed-racket/typed-racket-lib/typed-racket/a.rkt
with the contents below 2. run raco make a.rkt
#lang racket/base
(require (rename-in "utils/utils.rkt")
(utils utils tc-utils arm))
?
Today I’m seeing module: identifier already required
. The error goes away if “utils/utils.rkt” is changed to typed-racket/utils/utils

By the way @fkingtop, if you’re looking at #%top
because you want to refer to a top-level variable for some reason, you can use a macro for that: > (declare-scope top)
> (define x 12)
> (let ([x 5]) (in-scope top x))
12
If declare-scope
and in-scope
are defined like this:

@brandonwillard has joined the channel

@mflatt Is there any way to create a “weak” log receiver, i.e. a receiver that does not contribute towards whether or not log-level?
returns #t
? My first thought was to use log-level-evt
to listen for when a receiver was destroyed and remove my receiver, but then I realized that isn’t guaranteed to work, since log-level-evt
might not become ready for synchronization if the receiver is destroyed while I’m also listening to the logger.

I don’t think it’s possible to achieve that goal. The last time I wanted something similar, I was trying to set up forwarding, and that’s where log-all-levels
and log-level-evt
came from (although I don’t remember whether log-level-evt
worked out).

That’s okay… I think I can emulate it for my particular use case by adding some indirection: I think I can create two loggers instead of one, and I can send messages into the child and listen to the parent. That way, if I add my “weak” listeners to the child, then they won’t contribute to the return value of log-level?
for the parent. Still, I thought I’d ask in case there was a much easier way I was overlooking.

@bytezen has joined the channel

Hello. I am relatively new to Racket and still learning my way through the different libraries. I am having trouble printing Mayan numerals in the IDE. According to Wikipedia https://en.wikipedia.org/wiki/Maya_numerals#Unicode mayan numerals were added to Unicode 12 in 2018. When I use the code "\u1D2E0" (mayan numeral for 0) I do not get the correct symbol in REPL. Can anyone direct me on where I should read or how to investigate this? Thanks in advance!

I think that might just be an issue with the REPL. If I remember correctly, the default line editing library that Racket uses (which isn’t readline, to avoid the GPL) doesn’t handle Unicode very well.

I get “ᴮ0” at the repl

I guess I do, too, which is also what I get not in the REPL. Looking more carefully, I think the issue is that \u1D2E0
doesn’t do what you want—if you look at https://docs.racket-lang.org/reference/reader.html#%28part._parse-string%29, \u
escapes only work with up to four digits. So I think you need \U
, instead.

If I evaluate (displayln "\U1D2E0")
, I get 𝋠 both in the REPL and outside of it (though my computer does not have a font that can actually render that glyph).

@bytezen ^

It’s interesting that (display "\U1D2E0")
is 𝋠
but (print "\U1D2E0")
is "\U0001D2E0"
. That’s not the case for say "\u1234"
or "\U1234"
.

@greg @lexi.lambda Those are the results that I get too. I did not know about \U so thanks for that lead. I have generally remained comfortably ignorant of unicode/programming magical implementations (it is on my to learn bucket list). I suspect that there is some place to read what version of Unicode Racket has implemented and how one might go about manually updating it? I am willing to do the “grunt” work and contribute it to the community if that would helpful to folks.

@greg I believe that is because Racket’s unicode database has not been updated in a little while, and it doesn’t know that \U1D2E0
is a graphic character.

In the interim I still marvel that image is a primitive. That is bananas and I am scratching the surface on how useful that is going to be in teaching and developing. For what I am playing around with now it will be supercool to use to display my Mayan calculator. (Unicode would be cool too)

see https://github.com/racket/racket/blob/master/racket/src/racket/src/mk-uchar.rkt among other places

Has anyone heard of newly announced Bosque language from Microsoft: https://github.com/Microsoft/BosqueLanguage


Can anyone versed in Programming Language Theory explain how is it different from… functional programming?

I was just looking at it

it’s really just functional programming

thanks, that was my initial impression, but I guess everything coming from tech giants must be hyped because… reasons :slightly_smiling_face:

I think “coming from tech giants” is the wrong way to think about that

“dude at MSR created a language with his ideas about programming”

the same thing is all over academia

you are probably right

sadly, that’s just how you rally interest and money

I used to work with 2 nobel prize laureates (not in the reasearch capacity) and it frustrated me to no end when I realised how much time they had to spend fighting for grants and “selling” themselves and their team’s reasearch

if they had to do it, what about the rest of academia…

it’s definitely a full-time job

thanks for this I will give it a try.

while doing a dynamic-require
, i get a very long error (hundreds of lines?) that starts with this: racket/contract: no late-neg-projection passed to build-chaperone-contract-property

the only reference to that error is https://github.com/racket/drracket/issues/214 but it doesn’t really have any info that helps me figure out what’s happening.

(i’m using racket 7.2)

my code is relatively short, and maybe there’s a better way to do what i’m trying to do:

(define (set-domain domain-str)
(let* ([temp-file (make-temporary-file)]
[module temp-file])
(log-info "Writing domain to ~A" temp-file)
(display-to-file domain-str temp-file #:exists 'truncate)
(let ([initial-state (dynamic-require module 'initial-state)])
(log-info "initial-state: ~S" initial-state))))

domain-str
contains the code i want to require. the contents look like this: #lang racket
(provide initial-state)
(define initial-state '(it-worked))

my goal is to be able to load code over the network that contains definitions my code will use.

Didn’t see this problem in 7.2.

can you set PLTSTDERR="error info@xxx"
for some xxx
?

(and make a new logger with define-logger
instead of using log-info
)

is there some additional specific info you’re looking for? i didn’t include the approx. 500 other lines that were output.

it sounds like you’re seeing the normal output that gets printed at the info level

if I make an empty file (#lang racket/base
) and compile it with PLTSTDERR="info" raco make file.rkt
then it prints ~180 lines of output

so, I’m suggesting to not listen at the info level in general if you can avoid it

ah, i see.

right, now i see buried in the output… i actually got the results i expected, it wasn’t an error at all.

These defaults are used by racket-logger-mode
, you could do something in DrRacket or the PLTSTDERR
env var: https://github.com/greghendershott/racket-mode/blob/master/racket-custom.el#L293-L299

Some lines down, in the doc str, is the rationale: > The default value sets some known “noisy” topics to be one > level quieter. That way you can set the ’* topic to a level like > ’debug and not get overhwelmed by these noisy topics.

To be clear, what @ben suggested is simpler. What I’m describing is only in case you wanted to see exceptional logger output from these other topics, just not “noise”.