Re: [racket-users] why do these port ops behave differently?

2018-08-26 Thread Matthew Butterick
> On Aug 26, 2018, at 6:48 PM, Philip McGrath wrote: > > `read-syntax` has two optional arguments: `(test read-syntax)` is effectively > calling `(read-syntax (open-input-string "str"))`, which is equivalent to > `(read-syntax (open-input-string "str") (current-input-port))`. Yes of course.

Re: [racket-users] Racket koans module language bug

2018-08-26 Thread Matthew Butterick
> On Aug 26, 2018, at 5:15 PM, Sage Gerard wrote: > > The intent is to reject code with blanks, and to treat code without blanks as > Racket code that still might not compile There's more than one way to go about it, of course. It could be simpler to make a wrapper around the usual `read-syn

Re: [racket-users] why do these port ops behave differently?

2018-08-26 Thread Philip McGrath
`read-syntax` has two optional arguments: `(test read-syntax)` is effectively calling `(read-syntax (open-input-string "str"))`, which is equivalent to `(read-syntax (open-input-string "str") (current-input-port))`. -Philip On Sun, Aug 26, 2018 at 8:43 PM Matthew Butterick wrote: > With `read`,

Re: [racket-users] Racket koans module language bug

2018-08-26 Thread Philip McGrath
Thanks for the link to the GitHub repo; that makes it more clear what you want to do. I think, with your proposed `koan` form, you don't necessarily even need a custom #lang, let along a custom reader: `koan` and `_` can be macros that work together, provided by a normal library. Here's a litt

[racket-users] why do these port ops behave differently?

2018-08-26 Thread Matthew Butterick
With `read`, both `for/list` expressions evaluate the same way. With `read-syntax`, the first `for/list` works as expected, but the second doesn't: it ignores the port argument and waits for something to happen on standard input. ;;; #lang racket (require rackunit) (de

Re: [racket-users] Memory usage on Linux

2018-08-26 Thread Jonathan Simpson
Yes, it is running on a linode and the OOM eventually kills the process. There is some swap space available, but I probably should increase it. I started with trying to understand my racket program because it is a lot more fun for me than sysadmin type stuff :) -- Jonathan On Sunday, August 26

Re: [racket-users] Memory usage on Linux

2018-08-26 Thread George Neuner
On 8/26/2018 6:43 PM, Jonathan Simpson wrote: The fact that Racket isn't releasing the memory back to the OS appears to be causing the system to eventually run out of physical pages. Is this a cloud server?  Is the problem that the "out-of-memory" (OOM) handler is killing processes?  That w

Re: [racket-users] Memory usage on Linux

2018-08-26 Thread Jonathan Simpson
On Sunday, August 26, 2018 at 7:43:20 PM UTC-4, Matthew Flatt wrote: > > > Racket's memory manager does not immediately release pages back to the > OS (i.e., unmap them) after a GC. In its current configuration, the GC > releases a page at the beginning of a major GC only if the page was > unu

Re: [racket-users] Memory usage on Linux

2018-08-26 Thread George Neuner
On 8/26/2018 7:43 PM, Matthew Flatt wrote Racket's memory manager does not immediately release pages back to the OS (i.e., unmap them) after a GC. In its current configuration, the GC releases a page at the beginning of a major GC only if the page was unused at the *start* of the previous GC. S

Re: [racket-users] Racket koans module language bug

2018-08-26 Thread Sage Gerard
Hi Phillip, thanks for the quick and detailed reply. Context @ zyrolasting/racket-koans#24 , except WIP implementation does not provide (koan) form. Re: convert-compile-time-error, that traces back to 2.ii. in that issue and You's suggestion i

Re: [racket-users] Memory usage on Linux

2018-08-26 Thread Matthew Flatt
At Sun, 26 Aug 2018 09:55:25 -0700 (PDT), Jonathan Simpson wrote: > Then if I run (collect-garbage 'major), > current-memory-use reports only about 300MB in use, but the VIRT/RES values > reported by top do not change. The VIRT/RES values don't actually decrease > until I unlink the variable poi

Re: [racket-users] Racket koans module language bug

2018-08-26 Thread Philip McGrath
In Racket 7, at least, the first error I get is: has-blanks: arity mismatch; the expected number of arguments does not match the given number expected: 0 given: 1 After fixing that, it looks like, in your `read-syntax`, the `with-handlers` form catching `has-blanks?` emits a `module` form wit

Re: [racket-users] Memory usage on Linux

2018-08-26 Thread Jonathan Simpson
Thanks for the response as it confirms my suspicions. For my purposes the resident memory reported by top should be accurate enough. I'm talking about 100s of MB that I'd like to free immediately, so I'm not too concerned about CODE pages or the GC taking a few MBs. All that is dwarfed by the a

[racket-users] Racket koans module language bug

2018-08-26 Thread Sage Gerard
Hello all, First crack at a module language and stuck on a "expected only a `module' declaration; found an extra form" error. This is not a duplicate of this question since the error is slightly different and the error reproduces in the REPL. Here's m

Re: [racket-users] Memory usage on Linux

2018-08-26 Thread George Neuner
On 8/26/2018 12:55 PM, Jonathan Simpson wrote: I have a Racket application that I need to run in a fairly memory constrained environment(1 GB ram) and I've ran into something I don't quite understand. The application is deserializing a fairly large data structure from disk on startup. After l

Re: [racket-users] Legal/Business Case Management DSLs

2018-08-26 Thread Norman Gray
Hendrik and all, hello. On 26 Aug 2018, at 17:47, Hendrik Boom wrote: SGML had a hierarchy of tags -- which ones would automatically close off others, so that it wasn't necessary to slavishly balance all the tag-bracketting. But the exact hierarchy would depend on the publisher's style de

Re: [racket-users] Legal/Business Case Management DSLs

2018-08-26 Thread Matthias Felleisen
> On Aug 26, 2018, at 7:28 AM, Richard Parsons wrote: > > Well that sounds interesting. If there is anything that I can do to help > motivate the project members then don't hesitate to let me know. I searched > "define-editor racket" online, but I can't find anything so I'm guessing it > isn'

[racket-users] Memory usage on Linux

2018-08-26 Thread Jonathan Simpson
HI, I have a Racket application that I need to run in a fairly memory constrained environment(1 GB ram) and I've ran into something I don't quite understand. The application is deserializing a fairly large data structure from disk on startup. After loading, current-memory-use

Re: [racket-users] Legal/Business Case Management DSLs

2018-08-26 Thread Hendrik Boom
On Sun, Aug 26, 2018 at 03:38:32PM +0100, Norman Gray wrote: > > Richard, hello. > > On 26 Aug 2018, at 13:01, Richard Parsons wrote: > > > SGML is sounding more and more like something I > > should know about given my project. A quick google has turned up the > > hashtag #makesgmlgreatagain ?!

Re: [racket-users] Legal/Business Case Management DSLs

2018-08-26 Thread Neil Van Dyke
Richard Parsons wrote on 08/26/2018 07:44 AM: I don't know anything about SGML, although I have a general understanding of HTML and XML. Are there Racket tools for SGML (a google search doesn't immediately turn anything up)? As Norman said, SGML was great,[1] but probably not something one w

Re: [racket-users] Legal/Business Case Management DSLs

2018-08-26 Thread Norman Gray
Richard, hello. On 26 Aug 2018, at 13:01, Richard Parsons wrote: SGML is sounding more and more like something I should know about given my project. A quick google has turned up the hashtag #makesgmlgreatagain ?! If anyone has any suggestions where to start my research, then that would be w

Re: [racket-users] Legal/Business Case Management DSLs

2018-08-26 Thread Richard Parsons
Hi Norman Thanks for your comments. SGML is sounding more and more like something I should know about given my project. A quick google has turned up the hashtag #makesgmlgreatagain ?! If anyone has any suggestions where to start my research, then that would be welcome - although I realise that it

Re: [racket-users] Legal/Business Case Management DSLs

2018-08-26 Thread Richard Parsons
Thanks Daniel. I'm aware of Pollen and also thought that it might be a good starting point. I've also seen Beautiful Racket, which seems very good. Of course, it is designed for creating ebooks rather than my use case, but I agree there is probably a strong crossover. For example, the pollen cach

Re: [racket-users] Legal/Business Case Management DSLs

2018-08-26 Thread Richard Parsons
Neil, again thank you for your time and suggestions. On Sun, Aug 26, 2018 at 9:48 AM, Neil Van Dyke wrote: > > Richard Parsons wrote on 08/26/2018 02:36 AM: > >> I actually think that free form text where the meaning was parsed through >> its order might be quite nice. Something like: title, dou

Re: [racket-users] Legal/Business Case Management DSLs

2018-08-26 Thread Richard Parsons
Hi Greg Thanks for your suggestions. I haven't found anything yet which would be extensible and I have looked on and off over a number of years. I would be delighted to be proved wrong, however. I think however that it would make sense for me to create a careful roadmap in order to limit initial

Re: [racket-users] Legal/Business Case Management DSLs

2018-08-26 Thread Richard Parsons
Hi Matthias Thanks for your additional comments. On Sat, 25 Aug 2018, 22:19 Matthias Felleisen, wrote: > > 1. Some of what you’re asking for seems to exist. I am not an expert on > office software, and the little I see gets the work done for staff but > looks awful to me as a quasi-sw-dev. So,

Re: [racket-users] Legal/Business Case Management DSLs

2018-08-26 Thread Norman Gray
Neil and Richard, hello. On 26 Aug 2018, at 9:48, Neil Van Dyke wrote: You could do all structural markup this way, or combine markup with inferred bits. Incidentally, your example is a good fit for how SGML (and then HTML) was intended to be used, for text markup using elements and attr

Re: [racket-users] Legal/Business Case Management DSLs

2018-08-26 Thread Daniel Brunner
Hello Richard, I am not a lawyer but maybe need to send some documents to courts in the near future. I thought about some support for creating and sending documents as well. My initial idea was to extend Pollen (http://docs.racket-lang.org/pollen/index.html). Maybe that could be a starting point f

Re: [racket-users] Legal/Business Case Management DSLs

2018-08-26 Thread Neil Van Dyke
Richard Parsons wrote on 08/26/2018 02:36 AM: I actually think that free form text where the meaning was parsed through its order might be quite nice. Something like: title, double new line, date, new line, matter reference, new line, initials of author, double new line, body of text, eof. It