samth
2019-4-18 12:56:34

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


alexknauth
2019-4-18 16:05:02

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


ben
2019-4-18 16:06:32

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


alexknauth
2019-4-18 16:23:54

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
2019-4-18 16:55:26

@brandonwillard has joined the channel


lexi.lambda
2019-4-18 17:27:10

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


mflatt
2019-4-18 17:44:21

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


lexi.lambda
2019-4-18 17:46:51

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
2019-4-18 18:26:09

@bytezen has joined the channel


bytezen
2019-4-18 18:31:54

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!


lexi.lambda
2019-4-18 18:35:43

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.


samth
2019-4-18 18:35:59

I get “ᴮ0” at the repl


lexi.lambda
2019-4-18 18:40:30

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.


lexi.lambda
2019-4-18 18:41:47

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


lexi.lambda
2019-4-18 18:41:52

@bytezen ^


greg
2019-4-18 18:46:17

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


bytezen
2019-4-18 18:57:54

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


lexi.lambda
2019-4-18 18:58:03

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


bytezen
2019-4-18 19:02:26

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)



githree
2019-4-18 19:28:52

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



githree
2019-4-18 19:29:55

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


samth
2019-4-18 20:01:11

I was just looking at it


samth
2019-4-18 20:01:32

it’s really just functional programming


githree
2019-4-18 20:05:51

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


samth
2019-4-18 20:10:41

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


samth
2019-4-18 20:11:01

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


brandonwillard
2019-4-18 20:11:21

the same thing is all over academia


githree
2019-4-18 20:12:34

you are probably right


brandonwillard
2019-4-18 20:13:54

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


githree
2019-4-18 20:16:20

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


githree
2019-4-18 20:17:36

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


brandonwillard
2019-4-18 20:23:05

it’s definitely a full-time job


bytezen
2019-4-18 21:08:32

thanks for this I will give it a try.


jjwiseman
2019-4-18 23:02:14

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


jjwiseman
2019-4-18 23:03:18

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.


jjwiseman
2019-4-18 23:03:36

(i’m using racket 7.2)


jjwiseman
2019-4-18 23:05:32

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


jjwiseman
2019-4-18 23:05:46
(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))))

jjwiseman
2019-4-18 23:06:21

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


jjwiseman
2019-4-18 23:09:56

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


sorawee
2019-4-18 23:14:34

Didn’t see this problem in 7.2.


ben
2019-4-18 23:28:43

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


ben
2019-4-18 23:29:05

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


jjwiseman
2019-4-18 23:30:27

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


ben
2019-4-18 23:30:54

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


ben
2019-4-18 23:32:49

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


ben
2019-4-18 23:33:49

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


jjwiseman
2019-4-18 23:36:07

ah, i see.


jjwiseman
2019-4-18 23:36:39

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


greg
2019-4-19 02:58:43

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


greg
2019-4-19 03:01:42

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.


greg
2019-4-19 03:04:34

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