Re: [racket-users] Re: preferences file
William, that's a neat idea, I'll try your package. Thanks! --Geoff -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] raco planet open tries to install?
If it ever helps, the ancient Quack package for Emacs has a convenient and safe mode for quickly inspecting ".plt" files (page through them, isearch): http://www.neilvandyke.org/temporary/20171102-quack-plt-screenshot.png http://www.neilvandyke.org/quack/ (So ancient, I just noticed, that I have it using non-antialiased fonts.) BTW, it should probably be noted, for the benefit of non-old-timers on the list, that PLaneT is the old package system, and is deprecated. So no need to go looking at it as something you should possibly be using. Everyone should be using the new package system whenever possible. Regarding untrusted code: that's an unsolved problem in general. I was hoping for some kind of distributed trust and auditing model for the evolution of PLaneT, addressing what I'd say was one of the two main drawbacks of PLaneT for third-party developers. And it would be really helpful for some kinds of third-party contributors if we restore, to the new package system, some support for low-friction non-backward-compatible versions. -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] raco planet open tries to install?
I think that, at some point, we changed things so that planet declines to run arbitrary code in the .plt file. I'm not sure how this works, tho, it could just check that the code is the known code and then runs it. (Or I could misremember and we merely planned to do that.) Robby On Thu, Nov 2, 2017 at 5:49 PM, 'John Clements' via Racket Userswrote: > Ooh… yikes. Looking at the code, it looks like PLT files include their own > unpackers? Is this correct? In this case, I understand that this could be a > problem. This also seems like a bad idea; I wouldn’t have expected unpacking > to run potentially untrusted code. > > Anyhow, that’s all in the past, IIUC. Probably easiest just to dig up an > older version of Racket to install this .plt file. > > John > > > >> On Nov 2, 2017, at 3:46 PM, 'John Clements' via Racket Users >> wrote: >> >> I’m surprised by this interaction with raco planet: >> >> % raco planet open ../margrave3-dev-0203.plt . >> cannot install; version (400) of collection ("mzscheme") is required, but >> version is installed >> context...: >> /Users/clements/racket/racket/collects/setup/unpack.rkt:408:31: loop >> >> /Users/clements/racket/racket/collects/setup/../racket/private/map.rkt:57:19: >> loop >> /Users/clements/racket/racket/collects/setup/unpack.rkt:274:7 >> /Users/clements/racket/racket/share/pkgs/planet-lib/planet/raco.rkt: >> [running body] >> /Users/clements/racket/racket/collects/raco/raco.rkt: [running body] >> /Users/clements/racket/racket/collects/raco/main.rkt: [running body] >> % >> >> Specifically, it appears to me that “open” shouldn’t perform checks >> associated with installation. Before diving into the code for PLaneT…is this >> a bug? Or am I misunderstanding how PLaneT is (was) supposed to work? >> >> Thanks! >> >> John >> >> >> >> -- >> 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. >> For more options, visit https://groups.google.com/d/optout. > > > > -- > 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. > For more options, visit https://groups.google.com/d/optout. -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] raco planet open tries to install?
Ooh… yikes. Looking at the code, it looks like PLT files include their own unpackers? Is this correct? In this case, I understand that this could be a problem. This also seems like a bad idea; I wouldn’t have expected unpacking to run potentially untrusted code. Anyhow, that’s all in the past, IIUC. Probably easiest just to dig up an older version of Racket to install this .plt file. John > On Nov 2, 2017, at 3:46 PM, 'John Clements' via Racket Users >wrote: > > I’m surprised by this interaction with raco planet: > > % raco planet open ../margrave3-dev-0203.plt . > cannot install; version (400) of collection ("mzscheme") is required, but > version is installed > context...: > /Users/clements/racket/racket/collects/setup/unpack.rkt:408:31: loop > > /Users/clements/racket/racket/collects/setup/../racket/private/map.rkt:57:19: > loop > /Users/clements/racket/racket/collects/setup/unpack.rkt:274:7 > /Users/clements/racket/racket/share/pkgs/planet-lib/planet/raco.rkt: > [running body] > /Users/clements/racket/racket/collects/raco/raco.rkt: [running body] > /Users/clements/racket/racket/collects/raco/main.rkt: [running body] > % > > Specifically, it appears to me that “open” shouldn’t perform checks > associated with installation. Before diving into the code for PLaneT…is this > a bug? Or am I misunderstanding how PLaneT is (was) supposed to work? > > Thanks! > > John > > > > -- > 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. > For more options, visit https://groups.google.com/d/optout. -- 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. For more options, visit https://groups.google.com/d/optout.
[racket-users] raco planet open tries to install?
I’m surprised by this interaction with raco planet: % raco planet open ../margrave3-dev-0203.plt . cannot install; version (400) of collection ("mzscheme") is required, but version is installed context...: /Users/clements/racket/racket/collects/setup/unpack.rkt:408:31: loop /Users/clements/racket/racket/collects/setup/../racket/private/map.rkt:57:19: loop /Users/clements/racket/racket/collects/setup/unpack.rkt:274:7 /Users/clements/racket/racket/share/pkgs/planet-lib/planet/raco.rkt: [running body] /Users/clements/racket/racket/collects/raco/raco.rkt: [running body] /Users/clements/racket/racket/collects/raco/main.rkt: [running body] % Specifically, it appears to me that “open” shouldn’t perform checks associated with installation. Before diving into the code for PLaneT…is this a bug? Or am I misunderstanding how PLaneT is (was) supposed to work? Thanks! John -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] Re: preferences file
Recent discussion thread: https://groups.google.com/forum/#!topic/racket-users/6hn9J-r0Nek Since we're discussing dotfiles and I missed the previous thread, I'm going to shamelessly promote my basedir package[1], which provides functions for conveniently reading/writing config files according to the XDG base directory specification (eg. in ~/.config/, or similar directory on Windows) respecting the standard environment variables. Using the standard also makes it more convenient for a user to have parts of their configuration in multiple files, eg. having both public and private components, as well as local and global components, and have the parts composed together. Let's not clutter up home directories anymore with one-off config files or directories. Let's let them live in a sane and configurable space. [1] http://docs.racket-lang.org/basedir/index.html -- 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. For more options, visit https://groups.google.com/d/optout.
[racket-users] Bluetooth LE - Typed Racket
While deep lurking I noticed a mention concerning some older Racket code of mine. Specifically porting sha-256 from typed to untyped racket. Well that led to a wiki page that listed a number of suggested starter tasks for new Racket inductees wanting to get involved. A number of those were in and around IOT and Bluetooth (Wii controller is one I recall). So while hesitant to dump yet more unfinished Racket code onto the unsuspecting, I think there maybe enough in a side project in hiatus that someone may find a modicum of utility in the dross. Thora-HCI is a (just started, unfinished) native Typed Racket implementation of Bluetooth HCI stack. This is the lowest layer in the Bluetooth stack which underlies all the other Bluetooth layers and protocols. Where it was going was to have just enough of a slice implemented to support hobbiest Home IOT stuff targeting Bluetooth LE, specifically GATT -> ATT -> HCI. By having such a slice one would be able to do some Raspberry PI, small sensors, light bulb control, robotics etc. Bluetooth is a big umbrella term for a number of disparate protocols and Bluetooth vs Bluetooth LE (low energy) vs profile type stuff (audio streaming or keyboards) are all varying protocols / layers that are build over HCI. https://en.wikipedia.org/wiki/List_of_Bluetooth_profiles Thora-HCI https://github.com/RayRacine/thora-hci-racket/tree/dev/src What can Thora-HCI do now to varying degrees: - Create a standard Racket I/O Port over an underlying RAW socket connection on Linux. - Open a Bluetooth Adapter. - Send a subset of HCI command packets to the Adapter - Receive a subset of HCI events from the Adapter. - Bluetooth and Bluetooth LE device scans (e.g. scan for Rokus, lightb ulbs, WII controllers). - Create a connection to a device. e.g. connect to a light bulb - Send raw command packets to a connected device. e.g Query a BLE sensor, flip light bulbs on/off. What Thora-HCI has some pieces of low level machinery for, but is missing major pieces to do includes things like Bluetooth audio etc. I can't emphasis enough its unfinished state as well as its scattered nature from being both in mid-flight and hiatus. Long story. It's more of a code dump that someone could cherry-pick from or start from. It is alpha code at best. FWIW if someone is interested in doing some IOT stuff via Bluetooth (on Linux) one could also leverage DBus from Racket as well. One could also do Racket FFI -> Bluez. Complicated story but I found things I didn't like when I went down those paths and I ended up doing the HCI stack layer implementation. If/when I pickup this effort I would stick with this approach (native stack impl). If anyone does attempt to mess around with what is there, I do have time to assist with questions, maybe even help a bit with something simple they are trying to do to get things jump started. Maybe even jump back into it again. If poking around in the code. See scratch.rkt showing code opening an adapter, scanning, sending commands etc. In addition focus on adapter.rkt and what modules / code it leverages. Caveat Emptor -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] Re: preferences file
Awesome, Neil, great suggestions! -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] Re: preferences file
For a "home directory dotfile" kind of preferences file that's arbitrary Racket code, I'd do `dynamic-require` instead of `require`. If you want to use `require` instead, maybe the application is a framework, and the user-specific `.rkt` file is the program that is run and is what `require`s the framework. Recent discussion thread: https://groups.google.com/forum/#!topic/racket-users/6hn9J-r0Nek If you don't want arbitrary code in your dotfile, then maybe use the Racket reader with some of the features disabled. (When I've done this, I went through the current documentation for the reader, and wrote a procedure that does the read while explicitly disabling each reader feature that was problematic.) But I prefer the programmer-centric arbitrary-code way for many purposes now, like I say in that earlier discussion thread. -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] preferences file
Thanks John! Good ideas, and no, nothing is too obvious for me! --Geoff On Thursday, November 2, 2017 at 12:56:14 PM UTC-4, johnbclements wrote: > > > One solution is to use a .gitignore. I have a convention that files ending > with ‘private.rkt’ don’t go in the repo. > > Alternatively, you could have a single directory—a private repo, or not a > repo at all—that’s linked as a package, containing a collection called > ‘private’ or whatever you like, and then require them by using paths like > (require private/dbaccess) > > Apologies if these were all too obvious for you! :) > > John > -- 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. For more options, visit https://groups.google.com/d/optout.
[racket-users] Re: preferences file
The following seems to work for me: (require (file "~/.dbaccess.rkt")) Is that normal / ok ? Just wondering what other people do. Geoff On Thursday, November 2, 2017 at 12:35:25 PM UTC-4, Geoffrey Knauth wrote: > > Let's suppose I want to have a preferences file, e.g., "~/.dbaccess.rkt". > I used to have a module I would import via > "../some-relative-path/dbaccess.rkt", but I thought I would try > "~/.dbaccess.rkt" as a module path. It turned out a module path cannot > begin with "/", which happens with the expansion of "~" (it seems). > > This leads me to the more general question, what do other people do, what > is the convention when, say, they will have a GitHub repo with generally > public code, but some private files with, say, database-access codes that > are specific to a person's use of a package? > > Geoff > -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [racket-users] preferences file
> On Nov 2, 2017, at 9:35 AM, Geoffrey Knauthwrote: > > Let's suppose I want to have a preferences file, e.g., "~/.dbaccess.rkt". I > used to have a module I would import via > "../some-relative-path/dbaccess.rkt", but I thought I would try > "~/.dbaccess.rkt" as a module path. It turned out a module path cannot begin > with "/", which happens with the expansion of "~" (it seems). > > This leads me to the more general question, what do other people do, what is > the convention when, say, they will have a GitHub repo with generally public > code, but some private files with, say, database-access codes that are > specific to a person's use of a package? One solution is to use a .gitignore. I have a convention that files ending with ‘private.rkt’ don’t go in the repo. Alternatively, you could have a single directory—a private repo, or not a repo at all—that’s linked as a package, containing a collection called ‘private’ or whatever you like, and then require them by using paths like (require private/dbaccess) Apologies if these were all too obvious for you! :) John -- 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. For more options, visit https://groups.google.com/d/optout.
[racket-users] preferences file
Let's suppose I want to have a preferences file, e.g., "~/.dbaccess.rkt". I used to have a module I would import via "../some-relative-path/dbaccess.rkt", but I thought I would try "~/.dbaccess.rkt" as a module path. It turned out a module path cannot begin with "/", which happens with the expansion of "~" (it seems). This leads me to the more general question, what do other people do, what is the convention when, say, they will have a GitHub repo with generally public code, but some private files with, say, database-access codes that are specific to a person's use of a package? Geoff -- 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. For more options, visit https://groups.google.com/d/optout.