[racket-users] DrRacket Font Selection

2017-06-24 Thread Lehi Toskin
At some point DrRacket decided it didn't want to use any font other than 
Monospace. In fact, Monospace is the only font that is available in the menu. 
`(get-font-from-user)` will correctly display all my fonts, but for whatever 
reason DrRacket doesn't want to cooperate. I've even tried using a fresh 
.racket directory, but the result is the same.

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


Fwd: [racket-users] Racket APIs doesn't strip Byte Order Mark (BOM) when reading strings from UTF-8 files

2017-06-24 Thread Philip McGrath
I'm grateful to have seen this post so that I had some idea what was going
on when read-xml just gave me the exception:
>
> read-xml: parse-error: expected root element - received "\uFEFF"

on a file that had been validated by libxml.

I confess that this is a bit low-level for my expertise, but I wonder if
perhaps higher-level reading functions like read-xml should take care of
this detail automatically.

-Philip

On Thu, Jun 22, 2017 at 5:33 PM, Matthew Flatt  wrote:

> At Thu, 22 Jun 2017 14:59:35 -0700 (PDT), kay wrote:
> > There're files that starts with BOM. When reading from those files, it
> seems
> > all of Racket's I/O API don't know to strip the BOM, making them
> extremely
> > difficult to work with.
>
> I think that's the normal choice for UTF-8 readers. (Just to make sure
> I typed "UTF-8 BOM " for a few s and got the same
> answer each time.) Apparently, there's some question of what the
> standard recommends for readers, although it clearly recommends against
> a useless BOM for UTF-8 writers.
>
> Some languages/libraries provide an encoding to strip a BOM from UTF-8,
> and selecting that encoding is analogous to using `reencode-input-port`
> in Racket. There's not a convenient encoding for that purpose in
> `iconv`, though, which is what `reencode-input-port` uses.
>
> So, instead of changing the port's encoding, I recommend just
> discarding a BOM match at the start of the port:
>
>  (define (discard-bom p)
>(void (regexp-try-match #rx"^\uFEFF" p)))
>
> Used like this:
>
>   (define port (open-input-file #:mode 'text "test.txt"))
>   (discard-bom p)
>   (define line (read-line port))
>
> --
> 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] RacketCon Code of Conduct

2017-06-24 Thread Vincent St-Amour
All,

Thank you all for your comments, and thank you Claire and Leif for
bringing this to our attention.

We (the RacketCon organizers) have decided to adopt the SNAPL code of
conduct (based on the ACM's) for RacketCon. You can find it on the
RacketCon web page[1].

Hope to see you all in Seattle!

Vincent


[1] con.racket-lang.org


On Fri, 16 Jun 2017 13:44:39 -0500,
Leif Andersen wrote:
> 
> RacketCon 2017 should have a code of conduct, as pointed out by Claire on 
> twitter [1], and I absolutely agree. It doesn't have to be anything fancy, 
> and can be a fairly standard one.
> 
> Although we are not co-located with Strange Loop this year, they have a 
> fairly sensible one that we could use [2], which is adapted from the one from 
> the geek feminism wiki [3].
> 
> Does anyone have any opinions on what we use? I would also be happy to add it 
> to the RacketCon web page.
> 
> [1]: https://twitter.com/chckadee/status/874345544977707008
> [2]: https://www.thestrangeloop.com/policies.html
> [3]: https://geekfeminism.org/about/code-of-conduct/
> 
> ~Leif Andersen
> 
> -- 
> 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] Simple define-require-syntax question

2017-06-24 Thread Matthias Felleisen

> On Jun 18, 2017, at 8:09 AM, Matthew Flatt  wrote:
> 
> At Sun, 18 Jun 2017 06:47:24 -0400, Tony Garnock-Jones wrote:
>> First, it seems like since the whole point of require is to pollute the
>> surrounding namespace, an "unhygienic" require would be better.
> 
> Generally, I don't see the difference between `require` and `define` in
> terms of the intent to bind identifiers. Many parts of Racket rely on
> `require` binding being hygienic in the same way as definitions.
> 
> But...
> 
>> My past experiences of this kind of problem have all been related to
>> #lang and module and require-level binding, come to think of it. It
>> seems a murky area. Perhaps other kinds of hygiene-preserving techniques
>> than those that work well for expressions are needed for these areas?
> 
> ... I agree that hygiene is not always a convenient default for module
> languages, which frequently want to introduce non-hygienic bindings. I
> don't know how to make this better, but it's something to think about.


Perhaps the default setting needs a switch so it can be flipped for
some contexts. The module language seems to be the first serious 
feature that could benefit from such a thing but I could imagine 
that classes (or extensions of class.rkt) may benefit from it too. 

— Matthias

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