Re: [racket-users] racket/draw unable to load some font-weights on macOS?
I appreciate it. I had already tried bold and italic, but your note did give me the idea to try specifying the weights directly, e.g. "IBM Plex Sans, weight=700" —which, sadly, didn't solve my problem, but may have made the problem itself a bit more clear. Going off of the list of weights in Pango’s documentation [1] I cooked up this test: #lang racket (require pict) (define weights '("100" ; thin (since Pango 1.24) "200" ; ultralight "300" ; light "350" ; semilight (since Pango 1.36.7) "380" ; book (since Pango 1.24) "400" ; default "500" ; normal (since Pango 1.24) "600" ; semibold "700" ; bold "800" ; ultrabold "900" ; heavy "1000")); ultraheavy (since Pango 1.24) (define (compare-weights font-name) (apply vl-append (map (lambda (f) (text font-name (string-append font-name ", weight=" f) 34)) weights))) When I do (compare-weights "IBM Plex Sans") it becomes obvious that Racket is actually only able to use four of Plex Sans’s seven weights (on macOS). Input Serif [2] is another good example. It has six weights but this test shows only three of them being used. [1]: https://developer.gnome.org/pango/stable/pango-Fonts.html#PangoWeight [2]: http://input.fontbureau.com On Friday, February 16, 2018 at 3:48:51 PM UTC-6, Robby Findler wrote: > > I'm not sure what the right answer is here, but in some specific cases > that have happened to me along these lines, I've found that specifying > 'italic or 'bold works out. > > Sorry that's not much to go on. > > Robby > > > On Thu, Feb 15, 2018 at 2:44 PM, Joel Dueck> wrote: > > Greetings, long time lurker/first time posting here. I have been working > on > > this one for a couple of days and can't seem to figure it out. > > > > I'm having an issue where on macOS, there are some fonts/variants > returned > > by get-face-list that I can't actually use with a drawing function like > > text. > > > > #lang racket > > (require pict racket/draw) > > > > (define (list-fonts str) > > (filter (lambda(s) (string=? str (substring s 0 (min (string-length > str) > > (string-length s) > > (get-face-list #:all-variants? #t))) > > > > (define (demo-font str) > > (apply vl-append (map (lambda (f) (text f f 30)) (list-fonts str > > > > Attached is a screenshot comparison of the results of this code on > Windows > > and macOS, both using Racket 6.12. > > > > To sum up the problem “narratively”, as it were: on Windows, among the > > strings returned by get-face-list is "IBM Plex Sans Text, Medium" and I > can > > do (text "Hello" "IBM Plex Sans Text, Medium" 30), and pict will draw > using > > that font. > > > > But on macOS, where get-face-list will include the string "IBM Plex > Sans, > > Text" (note comma), if I do (text "Hello" "IBM Plex Sans, Text"), I > instead > > get the result in the default sans serif font. > > > > Furthermore, all of IBM Plex Sans’s 16 weights work properly on > > macOS/Racket—except the "Text" weight! > > > > A similar problem happens with some other fonts on macOS, e.g. Halyard > Micro > > Regular and Halyard Micro Book — the Regular weight works but the Book > > weight displays using the Regular weight, despite using the exact string > > found in get-face-list as the font/variant name in the call to text. > > > > I did my main example using IBM Plex Sans since it's a free font [1] > should > > anyone wish to replicate my results for themselves. > > > > How would I best go about finding out what is happening here? Are > certain > > words like “book” or “text” just not recognized/useable as a font weight > on > > macOS? Apologies if I’m missing something obvious! > > > > [1]: https://ibm.github.io/type/ > > > > -- > > 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...@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] A modest Racket success story...
Still red box. One day .. > On Feb 16, 2018, at 4:21 PM, stewart mackenziewrote: > > Hi Seamus, > > Thanks for this, I'm setting out to build a rather large project using > Racket and its GUI. > I thought about using Idris compiling to the electron platform but > chose against it because of electron's memory usage. > > So far my dive into Racket has positive, it's magical how I can switch > from untyped Racket to typed Racket simply by changing #lang. > Banging out my thoughts in a beautiful lisp 1, wave a finger, then > finger crack to type check. Just sublime. > > In theme with this thread I'd also like to express my thanks to this > community, I certainly hope projects like Hackett come to maturity! > > Might be a good time to ask on VeriRacket? Is this a thing, or is it > still in a red box? [1] > > kr/sjm > > [1] pg 25 https://con.racket-lang.org/2015/felleisen.pdf -- 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] racket/draw unable to load some font-weights on macOS?
I'm not sure what the right answer is here, but in some specific cases that have happened to me along these lines, I've found that specifying 'italic or 'bold works out. Sorry that's not much to go on. Robby On Thu, Feb 15, 2018 at 2:44 PM, Joel Dueckwrote: > Greetings, long time lurker/first time posting here. I have been working on > this one for a couple of days and can't seem to figure it out. > > I'm having an issue where on macOS, there are some fonts/variants returned > by get-face-list that I can't actually use with a drawing function like > text. > > #lang racket > (require pict racket/draw) > > (define (list-fonts str) > (filter (lambda(s) (string=? str (substring s 0 (min (string-length str) > (string-length s) > (get-face-list #:all-variants? #t))) > > (define (demo-font str) > (apply vl-append (map (lambda (f) (text f f 30)) (list-fonts str > > Attached is a screenshot comparison of the results of this code on Windows > and macOS, both using Racket 6.12. > > To sum up the problem “narratively”, as it were: on Windows, among the > strings returned by get-face-list is "IBM Plex Sans Text, Medium" and I can > do (text "Hello" "IBM Plex Sans Text, Medium" 30), and pict will draw using > that font. > > But on macOS, where get-face-list will include the string "IBM Plex Sans, > Text" (note comma), if I do (text "Hello" "IBM Plex Sans, Text"), I instead > get the result in the default sans serif font. > > Furthermore, all of IBM Plex Sans’s 16 weights work properly on > macOS/Racket—except the "Text" weight! > > A similar problem happens with some other fonts on macOS, e.g. Halyard Micro > Regular and Halyard Micro Book — the Regular weight works but the Book > weight displays using the Regular weight, despite using the exact string > found in get-face-list as the font/variant name in the call to text. > > I did my main example using IBM Plex Sans since it's a free font [1] should > anyone wish to replicate my results for themselves. > > How would I best go about finding out what is happening here? Are certain > words like “book” or “text” just not recognized/useable as a font weight on > macOS? Apologies if I’m missing something obvious! > > [1]: https://ibm.github.io/type/ > > -- > 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] A modest Racket success story...
Hi Seamus, Thanks for this, I'm setting out to build a rather large project using Racket and its GUI. I thought about using Idris compiling to the electron platform but chose against it because of electron's memory usage. So far my dive into Racket has positive, it's magical how I can switch from untyped Racket to typed Racket simply by changing #lang. Banging out my thoughts in a beautiful lisp 1, wave a finger, then finger crack to type check. Just sublime. In theme with this thread I'd also like to express my thanks to this community, I certainly hope projects like Hackett come to maturity! Might be a good time to ask on VeriRacket? Is this a thing, or is it still in a red box? [1] kr/sjm [1] pg 25 https://con.racket-lang.org/2015/felleisen.pdf -- 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] Realm of Racket chapter 8: questions on game trees / game states
Realm of Racket chapter 8: question on game trees / game states Hello, I am learning Racket by working through Realm of Racket. I am a bit confused on game trees / game states. I have 2 questions: 1- On the diagram page 173, at the board state b1, it is written: gt1 is (game b0 0 '(mv1)). Shouldn't it be: gt1 is (game b1 0 '(mv1)) ? b0 and b1 are different states. [Typo: at board state b2, "gt2 is (game b2 '()" should be "gt2 is (game b2 1 '()"] 2- On page 174 line 4, it is written: (define gt1 (game b2 0 (list mv1))). As I understand, it could also be (define gt1 (game b1 0 (list mv1))). My reasoning: the only difference between b2 and b1 is the ordering of the territories; as the player passed his turn, the ordering has no effect. Therefore in this case, both (define gt1 (game b2 0 (list mv1))) and (define gt1 (game b1 0 (list mv1))) are equivalent. Is my understanding correct ? Thank you ! Said -- 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] big-bang + right click?
Okay, cool. Thanks! On Thursday, February 15, 2018 at 4:28:44 PM UTC-8, Matthias Felleisen wrote: > > > No. > > I checked the code and providing the extra information easily would be > backwards incompatible. > I may introduce another mouse handler that also delivers the mouse event > as an fourth argument. > > If you need this today, you will need to use Racket’s GUI toolbox > directly. > > > > On Feb 15, 2018, at 6:54 PM, Stephen Foster> wrote: > > Is there a way to differentiate between left and right click with a > big-bang on-mouse handler? Or if not, is there some workaround I can use > to detect right clicks? > > -- > 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...@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] Re: Concise way to get completions for Racket code?
As far as I can tell, certain features will work better -- or work at all -- if you arrange to have some of your tool's code running "in" or "alongside" the user's live program. Otherwise, you can still do some useful things, but they may be limited and/or surprising to the user. For example, for completion: - The candidates could be "a static list of whatever namespace-mapped-symbols returns for #lang racket" -- but (a) that's just one #lang, plus (b) it omits the user module's own defined symbols. - Or you could say, "well, I'll separately require the user's .rkt file and get the symbols", but (a) it will get stale as they edit and worse (b) what if the user's file has a top-level side-effecting expression like `(delete-things-on-disk)`, which you've now run unexpectedly. Instead, you'll probably want to do namespace-mapped-symbols on the namespace corresponding to the program the user is actually running with your tool. That's why I asked if your tool is running the user's program and creating a REPL. You don't necessarily need to start with that approach. But I think someday you'll probably end up there? -- 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] A modest Racket success story...
This is cool and thanks for sharing. When you have made the first $1B from your freeware, please keep us in mind :) > On Feb 16, 2018, at 7:49 AM, Seamus Bradywrote: > > Hi all > > At the risk of self promotion I have decided to share my modest Racket > success story with the list and say thanks :) > Hopefully it might provide a small bit of inspiration. > I have a small open source WordPress development environment tool called > InstantWP (a quick search will find it). > It is used by beginners to learn WordPress - it is a wrapper around QEMU with > a small Alpine Linux installation. > The backend is written in Perl but the GUI is written in Racket. > I searched for nearly a year for a suitable graphics toolkit and settled on > Racket above multiple commercial and open source alternatives. > The GUI library is rock solid and has given me no trouble. > This version of the software has been downloaded nearly 40,000 times across > the world from Japan to France. > I have had zero issues with the GUI across all those Windows and macOS > machines. None. > > I am not the world's greatest Racket programmer and the GUI on InstantWP is > quite simple, but even so, I can highly recommend using Racket for a > commercial product. > The tooling is great, the libraries are rock solid and the community and > language are fun and helpful. > > So thanks to everyone behind Racket! And if anyone is thinking of using > Racket for desktop software - go for it. > In my opinion, Racket probably has one of the best GUI toolkits out there at > the moment. > > Regards > > Seamus > > > > > -- > 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] First Call for Papers: 11th ACM SIGPLAN International Conference on Software Language Engineering (SLE 2018)
Call for Papers: 11th ACM SIGPLAN International Conference on Software Language Engineering (SLE 2018) co-located with SPLASH 2018 November 5-6, 2018 Boston, Massachusetts, United States https://conf.researchr.org/track/sle-2018/papers We are pleased to invite you to submit papers to the 11th ACM SIGPLAN International Conference on Software Language Engineering (SLE 2018), held in conjunction with SPLASH 2018 at Boston, Massachusetts on November 5-6, 2018. --- Scope --- With the ubiquity of computers, software has become the dominating intellectual asset of our time. In turn, this software depends on software languages, namely the languages it is written in, the languages used to describe its environment, and the languages driving its development process. Given that everything depends on software and that software depends on software languages, it seems fair to say that for many years to come, everything will depend on software languages. Software language engineering (SLE) is the discipline of engineering languages and their tools required for the creation of software. It abstracts from the differences between programming languages, modelling languages, and other software languages, and emphasizes the engineering facet of the creation of such languages, that is, the establishment of the scientific methods and practices that enable the best results. While SLE is certainly driven by its metacircular character (software languages are engineered using software languages), SLE is not self-satisfying: its scope extends to the engineering of languages for all and everything. Like its predecessors, the 11th edition of the SLE conference, SLE 2018, will bring together researchers from different areas united by their common interest in the creation, capture, and tooling of software languages. It overlaps with traditional conferences on the design and implementation of programming languages, model-driven engineering, and compiler construction, and emphasizes the fusion of their communities. To foster the latter, SLE traditionally fills a two-day program with a single track, with the only temporal overlap occurring between co-located events. --- Topics of Interest --- SLE 2018 solicits high-quality contributions in areas ranging from theoretical and conceptual contributions, to tools, techniques, and frameworks in the domain of software language engineering. Topics relevant to SLE cover generic aspects of software languages development rather than aspects of engineering a specific language. In particular, SLE is interested in contributions from the following areas: * Software Language Design and Implementation - Approaches to and methods for language design - Static semantics (e.g., design rules, well-formedness constraints) - Techniques for specifying behavioral / executable semantics - Generative approaches (incl. code synthesis, compilation) - Meta-languages, meta-tools, language workbenches * Software Language Validation - Verification and formal methods for languages - Testing techniques for languages - Simulation techniques for languages * Software Language Integration and Composition - Coordination of heterogeneous languages and tools - Mappings between languages (incl. transformation languages) - Traceability between languages - Deployment of languages to different platforms * Software Language Maintenance - Software language reuse - Language evolution - Language families and variability * Domain-specific approaches for any aspects of SLE (design, implementation, validation, maintenance) * Empirical evaluation and experience reports of language engineering tools - User studies evaluating usability - Performance benchmarks - Industrial applications --- Important Dates --- All dates are Anywhere on Earth. * Fri 29 June 2018 - Abstract Submission * Fri 6 July 2018 - Paper Submission * Fri 24 August 2018 - Author Notification * Fri 31 August 2018 - Artifact Submission * Fri 5 October 2018 - Camera Ready Deadline * Wed 10 October 2018 - Artifact Notification * Fri 12 October 2018 - Deadline for Artifact-Related Paper Updates * Sun 4 Nov 2018 - SLE Workshops * Mon 5 Nov - Tue 6 Nov 2018 - SLE Conference --- Types of Submissions --- * Research papers These should report a substantial research contribution to SLE or successful application of SLE techniques or both. Full paper submissions must not exceed 12 pages excluding bibliography. * Tool papers Because of SLE’s interest in tools, we seek papers that present software tools
[racket-users] A modest Racket success story...
Hi all At the risk of self promotion I have decided to share my modest Racket success story with the list and say thanks :) Hopefully it might provide a small bit of inspiration. I have a small open source WordPress development environment tool called InstantWP (a quick search will find it). It is used by beginners to learn WordPress - it is a wrapper around QEMU with a small Alpine Linux installation. The backend is written in Perl but the GUI is written in Racket. I searched for nearly a year for a suitable graphics toolkit and settled on Racket above multiple commercial and open source alternatives. The GUI library is rock solid and has given me no trouble. This version of the software has been downloaded nearly 40,000 times across the world from Japan to France. I have had zero issues with the GUI across all those Windows and macOS machines. None. I am not the world's greatest Racket programmer and the GUI on InstantWP is quite simple, but even so, I can highly recommend using Racket for a commercial product. The tooling is great, the libraries are rock solid and the community and language are fun and helpful. So thanks to everyone behind Racket! And if anyone is thinking of using Racket for desktop software - go for it. In my opinion, Racket probably has one of the best GUI toolkits out there at the moment. Regards Seamus -- 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: Concise way to get completions for Racket code?
Thank you for the offer, but I am currently tied up myself a lot. I was just looking into this because the topic had popped up here. I should have provided some context as to how the Neovim Racket client works. When I'm experimenting I use the regular REPL from my terminal, not the client, that's why I mentioned the REPL. In a real remote plugin it works like this: when Neovim calls a function that's defined by a remote plugin an API client process is started, which can then receive responses, notifications and send back responses (using the MessagePack RPC protocol). Let's say I have a remote plugin like this: #lang racket (require nvim) (nvim-function "GetTwo" (λ (args) 2)) This defines a function called `GetTwo` that can be called from Neovim. Neovim then sends a request to the Racket client, the client executes the function `(λ (args) 2)` and sends the result (the integer `2` in this case) back to Neovim. For a completion plugin Neovim would send the current portion of the word to complete (and if necessary other information like the current file name) and Racket would return a list of matching symbol names. The function defined on the Neovim side is really just an interface wrapper for sending a message to the client, all the heavy lifting can be done in Racket. On Thursday, February 15, 2018 at 7:52:24 PM UTC+1, Greg Hendershott wrote: > > I guess I'm not clear who does what, e.g. do you start a REPL for the > user? > > If so, the `current-namespace` that's in effect when you call > `read-eval-print-loop` should probably come from doing > `(dynamic-require mp #f)` then the result of `(module->namespace mp)` > (where `mp` is a module path). That same namespace is the one you'd > want to give to `namespace-mapped-symbols` for a list of completion > candidates. > > p.s. Feel free to look at racket-mode code for ideas. However that's > accumulated a lot of moving parts; so I'm not sure if it's a great > example as a starting point. > > p.p.s. Also see xrepl. > > p.p.p.s. Although I'm tied up now through next week, I'd be happy to > hop on IRC or Slack or 1:1 email sometime after Feb 25, and talk > through ideas if that would help? > -- 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: racket2nix
Re opengl: I recall running into a similar problem, I eventually scrapped the opengl dependency but it might be possible to wrap the whole thing up in a makeWrapper then pass in the opengl executable path for non-nixos systems into it. The reason, I believe, is that opengl is packaged as a static library and not a dynamic lib. On 14 Feb 2018 21:01, "Anthony Carrico"wrote: Any opengl program was going to have similar trouble since the libs are a function of the drivers which can't really be provided by Nix on non NixOS platforms. This situation was more of a reflection on the state of OpenGL than Nix in my opinion, but we ended up developing in a NixOs vm for this reason only. I don't remember what other changes I made, this was the biggest pain point. I did integrate with other foreign functions. -- 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.