Re: [racket-users] Adding keybindings to debug

2021-10-30 Thread Mike Engelhart
On Mac OS I tried adding keyboard shortcuts using the linked Apple support
document to allow for comment/uncomment bindings in DrRacket and it doesn't
work (at least on Mac OS Monterey).  One thing I noticed is that if you go
back to System Preferences->Keyboard->Shortcuts->App Shortcuts and look at
DrRacket under App Shortcuts, unlike other Mac OS apps in the list, it only
shows the name DrRacket but doesn't show any of the shortcuts you've added.


On Sat, Oct 30, 2021 at 6:37 AM Laurent  wrote:

> On Fri, Oct 29, 2021 at 10:47 PM James Zollinger  wrote:
>
>> Thank you both for the thoughtful answers. I will take a look at the
>> quickscript you sent, Laurent. The mac keyboard shortcut is a great
>> feature. Makes me wonder about buying a mac again after quite a few years.
>> (I use debian as my daily driver, at least for development.)
>
>
> Apparently it should be possible to do the same thing for Debian,
> depending on your window manager, with some caveats:
>
> https://askubuntu.com/questions/107849/can-i-assign-custom-keyboard-shortcuts-for-menu-items-in-applications
>
>
>> If anyone out there knows how to deal with context menus
>> programmatically, please share.
>>
>
> The code of the debug-tool should be changed to make these reachable from
> the outside with a define/public. Somewhere around here:
>
> https://github.com/racket/drracket/blob/b74dc3bc65b4843db0c2b381161fa9e8d85d230d/drracket/gui-debugger/debug-tool.rkt#L375
> but it's a little intricate because a set of specialized menu items are
> created after right-clicking when in debug mode.
>
> Another possibility would be to simulate the mouse clicks, but that seems
> rather hacky and error-prone.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CABNTSaGiZ%2BbZirkyrtTScbVg5EK4reJw-JtoK3%2BTh5%3DCW7SiDQ%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAGE%3DCnJ7FfvOOkk0_Q2Ch4kinJx%2BM5MEBwPYDcqNSFqLWQxOSQ%40mail.gmail.com.


Re: [racket-users] M1 Mac exe SSL error

2021-10-22 Thread Mike Engelhart
Hi Matthew

Thanks for the fast reply!   Well I have to apologize - I had skipped the
"dist" step.  For some reason I assumed incorrectly the dist was if you
were building for another OS vs hardware architecture.  I ran your test as
well and it worked perfectly.  Thanks again!

Mike




On Fri, Oct 22, 2021 at 6:02 PM Matthew Flatt  wrote:

> At Fri, 22 Oct 2021 17:24:30 -0400, Mike Engelhart wrote:
> > I wanted to build a binary to send to a colleague to test it (who
> > isn't a programmer and doesn't have Racket installed) but when I
> > build it on my intel Macbook Pro and then send it to my M1 iMac
>
> That should work.
>
> I tried this small experiment:
>
>  ;; ssl.rkt
>   #lang racket/base
>   (require openssl)
>
>   (define-values (i o) (ssl-connect "www.cs.utah.edu" 443))
>   'done
>
> With that "ssl.rkt":
>
>  $ raco exe ssl.rkt
>  $ raco dist ssl-dist ssl
>  $ tar zcf ssl-dist.tgz ssl-dist
>
>  ... copy ssl-dist.tgz to an M1,
>  then on that machine ...
>
>  $ tar zxf ssl-dist.tgz
>  $ ./ssl-dist/bin/ssl
>
> and that much seemed to work.
>
> Does the little "ssl.rkt" program above work for you? If not, which
> version of Racket are you using? Also, just to make sure, are you
> creating a distribution to move to the other machine, as opposed to
> just an executable file?
>
>
> Matthew
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAGE%3DCnJMpuOcRpvqFhUC969HPXZ86vW8j3z3fg63DqwOnCGW7g%40mail.gmail.com.


[racket-users] M1 Mac exe SSL error

2021-10-22 Thread Mike Engelhart
Hi all

I'm new to Racket so this may be explained somewhere although searching the
web I couldn't find anything related to this.

I'm working on my first real project in Racket and it leverages http-easy
to do some simple API calls and processes the responses.   I wanted to
build a binary to send to a colleague to test it (who isn't a programmer
and doesn't have Racket installed) but when I build it on my intel Macbook
Pro and then send it to my M1 iMac and try and run it I get this error:

ssl-make-client-context: requested protocol not supported;

 SSL not available; check `ssl-load-fail-reason'

  requested: 'auto

  context...:

   .../openssl/mzssl.rkt:672:0: encrypt->method

   .../openssl/mzssl.rkt:747:0: make-raw-context

   .../openssl/mzssl.rkt:736:0: make-context

   .../openssl/mzssl.rkt:764:0: ssl-make-client-context

   .../openssl/mzssl.rkt:1061:0: ssl-secure-client-context

   .../private/arrow-val-first.rkt:486:18

   .../private/session.rkt:40:0: make-session

   body of '#%embedded:net/http-easy:

My thought on building it with my Intel mac is that by doing that it would
ensure that the M1 macs that my colleague also has it would use Rosetta 2
to run the code.

So my question is, is there a way to build a universal binary for Mac OS or
should I just build one on each platform and have separate binaries.

Thanks for any help.

Mike

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAGE%3DCnL3CvcTtiCdKaYUetVMGCcDJS6V435CSKiruJWOM8%3DHxA%40mail.gmail.com.