soegaard2
2020-8-25 09:11:41

Hi All. I just discovered the tab “Projects” on Github. It can be used to create smart “To Do”-lists and more with notes and issues. I think it could be useful for #triage ? https://www.youtube.com/watch?v=ff5cBkPg-bQ


cris2000.espinoza677
2020-8-25 12:45:32

pardon the ignorance, but what is this triage thing? seems kinda exclusive


samth
2020-8-25 12:50:08

@cris2000.espinoza677 It’s a channel; feel free to join


cris2000.espinoza677
2020-8-25 13:16:43

is there a list of “quite-known” (js, rust, java, python, nim, etc) programming languages implemented on or racket implemented on other languages/frameworks? (rpython, llvm, etc)


samth
2020-8-25 13:35:31

I don’t think there’s a list; mostly what gets implemented in Racket is domain-specific languages. There are small implementations of parts of languages such as JavaScript, Python, OCaml, and even Algol 60, but none of them are enough to run normal programs written in those languages.


samth
2020-8-25 13:36:27

The two complete implementations of Racket are implemented on top of a home-grown VM and implemented on top of Chez Scheme. There are also less mature implementations on top of JavaScript (RacketScript and WhaleSong) and using RPython (Pycket).


cris2000.espinoza677
2020-8-25 13:56:02

thank you for responding


pavpanchekha
2020-8-25 16:36:36

Is there a concise summary of why Racket gives these instantiate-linklet: mismatch; errors any time I accidentally compile some code and then later edit it? What makes it hard to eliminate that error?



soegaard2
2020-8-25 16:43:06

mflatt
2020-8-25 16:43:08

It’s “just” a matter of running raco make more automatically, and Ryan’s custom-load package sets hooks to do that.

There are all sorts of reason


mflatt
2020-8-25 16:44:26

… reasons that raco make might not work in an arbitrary context. Maybe code is loaded in a sandbox with restructed write access. Maybe the current user doesn’t have the needed filesystem access. Maybe multiple rackets are running, and raco make can’t deal with concurrency at that level (i.e., it assumes that it’s the only one modifying “.dep” and “.zo” files).


cris2000.espinoza677
2020-8-25 16:44:31

ooh thank you soeegard!


mflatt
2020-8-25 16:45:14

I expect that the various problems can be dealt with, but it will take some effort. Ryan’s package is as much as I know anyone has worked on the problem.


pavpanchekha
2020-8-25 16:50:12

I suppose I meant—why, upon hitting that error, does Racket not print a warning and fall back to the source file?


pavpanchekha
2020-8-25 16:50:46

Unrelatedly, why does hash-update only work on immutable hash tables? I’ve got a mutable hash table I’d like to make a non-destructive edit to…


mflatt
2020-8-25 16:52:08

The stack of configurable handlers (the kind of hooks that make custom-load work) doesn’t really support that. Maybe it would be possible to tweak and/or add something to make that possible, but I’m not sure.


pavpanchekha
2020-8-25 16:53:03

Got it. I’m working with undergrads who aren’t used to Racket so I’m seeing all these issues trip people up and that got me wondering


mflatt
2020-8-25 16:54:32

The implementation of mutable hash tables does not support constant-time non-destructive update. You can use hash-copy, but that’s expensive enough that it probably shouldn’t be hidden in an operation like hash-update that is otherwise constant-time.


pavpanchekha
2020-8-25 17:28:34

Got it. So I should use hash-copy and a destructive update on the copy?


jaz
2020-8-25 17:39:24

If you want a destructive update, use hash-update! (note the exclamation point).


jaz
2020-8-25 17:39:42

Oh — sorry, you explicitly said you want to make a non-destructive edit.


jaz
2020-8-25 17:39:49

I should learn to read…


samth
2020-8-25 17:55:59

Does anyone have a Catalina Mac that they could use to help me debug something?


cris2000.espinoza677
2020-8-25 17:57:40

edit: it’s a racket/base thing. ~hi, i have this~ ...


cris2000.espinoza677
2020-8-25 17:58:35

@samth sorry for the big chunk of text after you asking for help, i was writing this for some time already…


sorawee
2020-8-25 17:59:49

I have Catalina. Feel free to post stuff here. I might not be able to get back immediately, but will do as instruct when I’m available.


samth
2020-8-25 18:00:38

Try running that file (it should open in beginning student) and then try changing something small and re-running it. The student reports DrR freezing.


samth
2020-8-25 18:00:51

(preferably in 7.8 but anything is good)


sorawee
2020-8-25 18:00:58

CS or BC?


samth
2020-8-25 18:01:06

BC


cris2000.espinoza677
2020-8-25 18:06:00

hi, i have this (define-simple-macro (define/get id:id (~optional def:expr)) #:with hash (format-id #'id "hash") (define id (if (dict-has-key? hash 'id) (vector-ref row (dict-ref hash 'id)) (~? (~@ . def) (~@ . #f))))) i get an error that says function application is not allowed; no #%app syntax transformer is bound in the transformer phase which is weird because i’m pretty sure syntax-parse does let you do this. anyways i opted out of a unhygienic macro for this (define-simple-macro (define/get id:id hash:id (~optional def:expr)) (define id (if (dict-has-key? hash 'id) (vector-ref row (dict-ref hash 'id)) (~? (~@ . def) (~@ . #f))))) i thought the ~?  template tried to see if the first element existed otherwise it outputted the second… (i tried (~? def (~@ #f))  and other variations too…) def: attribute contains non-syntax value value: #f in: def ok, i get it, i know this error… but the template doesnt work…

i’ve reread stuff in syntax/parse  especially examples… but i dont get it :(


sorawee
2020-8-25 18:07:58

Can reproduce freezing in BC, but not CS


sorawee
2020-8-25 18:09:06

But also, my CS is the development version, so it is newer than BC.


samth
2020-8-25 18:10:27

woohoo!


samth
2020-8-25 18:10:28

thanks


samth
2020-8-25 18:10:49

I will report a bug, and suggest to the student that they try CS


sorawee
2020-8-25 18:12:47

Interestingly, 7.7 BC doesn’t have this problem


samth
2020-8-25 18:13:11

Awesome


sorawee
2020-8-25 18:14:10

But now I cannot produce the problem in 7.8 BC anymore too…


sorawee
2020-8-25 18:14:44

Oh, nvm, it just happened again


sorawee
2020-8-25 18:16:37

When I force quit, here’s the stack trace:

$ /Applications/Racket\ v7.8/bin/drracket lab1.rkt terminate break context...: /Applications/Racket v7.8/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization /Applications/Racket v7.8/share/pkgs/gui-lib/mred/private/lock.rkt:43:38 /Applications/Racket v7.8/collects/racket/private/more-scheme.rkt:266:2: call-with-exception-handler /Applications/Racket v7.8/share/pkgs/gui-lib/mred/private/wxwindow.rkt:219:21: on-set-focus method in make-window-glue% /Applications/Racket v7.8/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:435:6 /Applications/Racket v7.8/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:486:32 /Applications/Racket v7.8/share/pkgs/gui-lib/mred/private/wx/common/dialog.rkt:58:4: show method in dialog-mixin /Applications/Racket v7.8/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization /Applications/Racket v7.8/collects/racket/private/more-scheme.rkt:266:2: call-with-exception-handler /Applications/Racket v7.8/share/pkgs/gui-lib/mred/private/messagebox.rkt:69:2: create-message-box/custom /Applications/Racket v7.8/share/pkgs/drracket/drracket/private/rep.rkt:1544:6: can-close? method in text-mixin /Applications/Racket v7.8/share/pkgs/drracket/drracket/private/unit.rkt:2853:6: can-close? method in frame-mixin /Applications/Racket v7.8/share/pkgs/gui-lib/framework/private/frame.rkt:501:4: can-close? method in register-group-mixin /Applications/Racket v7.8/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization /Applications/Racket v7.8/share/pkgs/gui-lib/mred/private/lock.rkt:43:38 /Applications/Racket v7.8/collects/racket/private/more-scheme.rkt:266:2: call-with-exception-handler


samth
2020-8-25 18:17:02

Looks like an error creating an error message box


samth
2020-8-25 18:17:06

Thanks so much


sorawee
2020-8-25 18:17:43

And I just got it to freeze in 7.7


sorawee
2020-8-25 18:17:50

So what I said was not true


samth
2020-8-25 18:17:58

BC or CS?


sorawee
2020-8-25 18:18:01

BC


sorawee
2020-8-25 18:25:24

I think I have more information, but let me play around a little bit more


sorawee
2020-8-25 18:28:32

When I force quit, this also appears:

UpdateRecents: about to call HIS_XPC_GetApplicationPolicyForURLs with seed 4172491891 UpdateRecents: received results from HIS_XPC_GetApplicationPolicyForURLs UpdateRecents: about to parse results from HIS UpdateRecents: about to update menu item state UpdateRecents: disabling ScreenTime for item 2 UpdateRecents: disabling ScreenTime for item 3 UpdateRecents: disabling ScreenTime for item 4 UpdateRecents: disabling ScreenTime for item 5 UpdateRecents: disabling ScreenTime for item 6 UpdateRecents: disabling ScreenTime for item 7 UpdateRecents: disabling ScreenTime for item 8 UpdateRecents: disabling ScreenTime for item 9 UpdateRecents: disabling ScreenTime for item 10 UpdateRecents: disabling ScreenTime for item 11 UpdateRecents: disabling ScreenTime for item 12 UpdateRecents: disabling ScreenTime for item 13 UpdateRecents: disabling ScreenTime for item 14 UpdateRecents: disabling ScreenTime for item 15 UpdateRecents: disabling ScreenTime for item 16 UpdateRecents: disabling ScreenTime for item 17 UpdateRecents: disabling ScreenTime for item 18 UpdateRecents: disabling ScreenTime for item 19 UpdateRecents: disabling ScreenTime for item 20 UpdateRecents: disabling ScreenTime for item 21


sorawee
2020-8-25 18:28:54

And here’s another stack trace:

terminate break context...: /Applications/Racket v7.7/collects/ffi/unsafe/objc.rkt:293:0: lookup-send /Applications/Racket v7.7/share/pkgs/gui-lib/mred/private/wx/cocoa/window.rkt:695:4: is-shown? method in window% /Applications/Racket v7.7/share/pkgs/gui-lib/mred/private/wx/cocoa/window.rkt:698:4: is-shown-to-root? method in window% /Applications/Racket v7.7/share/pkgs/gui-lib/mred/private/wxme/editor-canvas.rkt:1307:2: do-needs-update method in canvas-editor-admin% /Applications/Racket v7.7/share/pkgs/gui-lib/mred/private/wxme/text.rkt:686:2: own-caret method in text% /Applications/Racket v7.7/share/pkgs/gui-lib/mred/private/wxme/editor-canvas.rkt:366:2: on-focus method in editor-canvas% /Applications/Racket v7.7/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization /Applications/Racket v7.7/collects/racket/private/more-scheme.rkt:265:2: call-with-exception-handler /Applications/Racket v7.7/collects/racket/private/more-scheme.rkt:148:2: call-with-break-parameterization /Applications/Racket v7.7/share/pkgs/gui-lib/mred/private/lock.rkt:43:38 /Applications/Racket v7.7/collects/racket/private/more-scheme.rkt:265:2: call-with-exception-handler /Applications/Racket v7.7/share/pkgs/gui-lib/mred/private/wxwindow.rkt:219:21: on-set-focus method in make-window-glue% /Applications/Racket v7.7/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:435:6 /Applications/Racket v7.7/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:486:32 /Applications/Racket v7.7/share/pkgs/gui-lib/mred/private/wx/common/queue.rkt:634:3


samth
2020-8-25 18:29:23

Can you post those on the issue?


sorawee
2020-8-25 18:36:44

Done


samth
2020-8-25 18:39:33

Thanks again


mflatt
2020-8-25 19:00:23

@sorawee When it’s frozen, do you sometimes see ghosts of windows — the drop shadow of the big-bang window without the actual window? Maybe even the ghost of a “really quit?” dialog when you click to bring the DrRacket window to the front and hit Cmd-Q?


sorawee
2020-8-25 19:01:05

I saw a ghost of “really quit”, but I didn’t see a ghost of big-bang


sorawee
2020-8-25 19:02:31

Here’s the “really quit” ghost.


mflatt
2020-8-25 19:16:15

Ok, good (in the sense that it’s consistent with a bug that has been fixed).


samth
2020-8-25 19:16:53

Ok, great. I suggested downloading the CS version to my student, I may also suggest downloading a snapshot.


spdegabrielle
2020-8-25 19:31:12

@sorawee how did you record your video for https://github.com/sorawee/fishy-completion ?


spdegabrielle
2020-8-25 19:32:03

It looks good and I was hoping to use for https://github.com/racket/racket-lang-org/issues/137


sorawee
2020-8-25 19:32:03

sorawee
2020-8-25 19:32:34

brew cask install licecap if you use brew


sandel.konjevic.teodo
2020-8-25 19:46:29

Hi all, I’m trying to get ssl self-signed certification to work on my webapp. I followed Racket https://docs.racket-lang.org/continue/#%28part._.Using_.H.T.T.P.S%29\|documentation to generate the private key and certification. The server starts successfully, but when attempting to access the webapp the following error is raised: port->ssl-ports: accept failed (error:1408F09C:SSL routines:ssl3_get_record:http request) My webapp.rkt file runs the following: (serve/servlet start #:quit? #f #:listen-ip #f #:port port #:server-root-path files-path #:ssl? #t #:ssl-key (build-path files-path "private-key.pem") #:ssl-cert (build-path files-path "server-cert.pem") #:extra-files-paths (list files-path) #:servlet-path "/webapp.rkt") Any advice/pointers are much appreciated!


sorawee
2020-8-26 00:40:30

This is now how it’s rendered in the snapshot


sorawee
2020-8-26 00:40:43

Hopefully it will help a little bit


cris2000.espinoza677
2020-8-26 00:56:18

i know there are many veterans in this channel, but i think i hit a milestone with racket and that is finding a use for continuations for myself for the first time… soooo… i wanted to share it! (define andcompose (case-lambda [() values] [(f0) f0] [frest (make-keyword-procedure (lambda (kw kwargs . args) (let/cc k (define (wrap f) (make-keyword-procedure (lambda (fkw fkwars . fargs) (or (keyword-apply f fkw fkwars fargs) (k #f))))) (let ([new-f (apply compose (map wrap frest))]) (keyword-apply new-f kw kwargs args)))))])) am i convinced that it works as intended? i dont know. and it also might be bloated, maybe i can get rid of the case-lambda oh well…


cris2000.espinoza677
2020-8-26 01:08:13

welp i just realized if there’s a function that returns multiple values, it just explodes huh edit: fixed(? in reply


cris2000.espinoza677
2020-8-26 01:20:49

fixed(???? (define andcompose (case-lambda [() values] [(f0) f0] [frest (make-keyword-procedure (lambda (kw kwargs . args) (let/cc k (define (wrap f) (make-keyword-procedure (lambda (fkw fkwars . fargs) (define result (call-with-values (lambda () (keyword-apply f fkw fkwars fargs)) list)) (define all-true? (for/and ([e (in-list result)]) e)) (if all-true? (apply values result) (k #f))))) (let ([new-f (apply compose (map wrap frest))]) (keyword-apply new-f kw kwargs args)))))]))


alexharsanyi
2020-8-26 01:50:13

I am trying to use Typed Racket in a program, but I get an error on for/first loop, where TR complains with the ambiguous message: “insufficient type information to typecheck. please add more type annotations”. I have annotated everything I could in the loop, and I am not sure what exactly the problem is. This is the minimal example (the error is in the for/first loop. Can anyone provide some advice on how to get the TR properly annotated?

#lang typed/racket (struct level-info ([mask : Integer] [sentinel : Integer]) #:transparent) (define max-level 30) (: level-information (Vectorof level-info)) (define level-information (for/vector : (Vectorof level-info) #:length max-level ([id : Integer (in-range max-level)]) (define flag-bit (* 2 id)) (define sentinel (arithmetic-shift 1 flag-bit)) (define mask (cast (sub1 (arithmetic-shift sentinel 1)) Integer)) (level-info sentinel mask))) (: d Integer) (define d 1) ; encoded value to check (: info (U #f level-info)) (define info (for/first : (U #f level-info) ([info : level-info (in-vector level-information)] #:when (let ([mask : Integer (level-info-mask info)] [sentinel : Integer (level-info-sentinel info)]) (= (bitwise-and d mask) sentinel))) info))


alexharsanyi
2020-8-26 02:00:05

Actually it looks like for/first is not supported by the type checker (according to the documentation). I replaced the code with for/or for now.


alexharsanyi
2020-8-26 02:00:32

It would be nice if TR would print out a “not supported” message in this case…


notjack
2020-8-26 02:14:27

that’s awesome! congrats!