[racket-users] Re: [scribble] code:hilite for binders

2020-08-23 Thread Ryan Kramer
You might also be able to use make-element-id-transformer 

 
like this

#lang scribble/manual

@(begin
   (require scribble/racket
scribble/eval
(for-syntax racket/base))

   (define-syntax FOO (make-element-id-transformer
   (lambda arglist #'(racket (code:hilite foo)
   (interaction
(let ([FOO 41])
  (add1 FOO


On Saturday, August 22, 2020 at 5:15:17 PM UTC-5, Éric Tanter wrote:
>
> Hi, 
>
> From the doc: `(code:hilite datum)` typesets like `datum`, but with a 
> background highlight. 
> However, it does not work to highlight a binder, eg: `(letrec 
> ([(code:hilite self) …]) …)` 
> Is there another way to highlight a binder? 
>
> Thanks, 
>
> — Éric 
>
>
>
>
>

-- 
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/a4bb9d79-5f2a-4317-82f9-0d4de630af10o%40googlegroups.com.


[racket-users] Announce: Plisqin 0.4

2020-08-09 Thread Ryan Kramer
I've just finished some final cleanup and testing of Plisqin and am ready 
to call it "stable, but incomplete".

https://docs.racket-lang.org/plisqin/index.html

Plisqin's semantics are similar to SQL but there are some key differences. 
Perhaps the most significant is that joins are values, not language 
constructs.

Plisqin is incomplete in that it still lacks first-class 
Insert/Update/Delete support. However, it is easy to mix in arbitrary SQL 
pretty much anywhere you want, so this might not be a problem depending on 
your use case.

With this release I will be taking a break from any major work on Plisqin. 
Bugfixes and small enhancements should be no problem though.

If you decide to try Plisqin from source, be aware that a few tests will 
fail on Racket CS due to differences in the Printer. As long as your code 
does not depend on any printable representations it will be fine.

A big "Thank You!" to everyone who has made the Racket ecosystem so great, 
and special thanks to everyone who helped me with my questions.

- Ryan Kramer

-- 
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/24be7b61-3719-405b-9966-920fd55792aco%40googlegroups.com.


Re: [racket-users] How can I increase expansion+compilation speed?

2020-07-20 Thread Ryan Kramer
Thanks Ryan, the macro profiler is great! It quickly identified a macro 
that I was able to convert to a procedure. (I'm not sure why I made it a 
macro in the first place.) And the .zo file decreased from about 910KB to 
130KB, and the compilation speed went from 40 seconds to about 8 seconds 
(with debugging). I can probably do even better, but fixing this first big 
problem was quite a relief!

On Monday, July 20, 2020 at 8:42:57 AM UTC-5, Ryan Culpepper wrote:
>
> One thing to check is the size of the resulting bytecode file. When I 
> compiled it, I got a 911 KB .zo file. So the most likely reason is that 
> your macros are just producing a lot of code.
>
> You can run the macro profiler (eg, `raco macro-profiler aw-schema.rkt`) 
> to get a summary of what macros contribute most to the compiled code size. 
> See 
> https://docs.racket-lang.org/macro-debugger/index.html#(part._.Macro_.Profiler)
>  
> for more details. I also gave a talk about the macro profiler called "The 
> Cost of Sugar" a few years ago at RacketCon. The slides are at 
> http://www.ccs.neu.edu/home/ryanc/talks/racket18-sugar.pdf, and there 
> should be a recording online somewhere.
>
> The usual fix is to use helper functions. There are some examples in the 
> slides.
>
> Ryan
>

-- 
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/1b403370-3382-42a4-9ce1-8a168e3121cao%40googlegroups.com.


[racket-users] Re: How can I increase expansion+compilation speed?

2020-07-20 Thread Ryan Kramer
Thanks to both of you.

It does expand to a reasonably large amount of code, a small example is 
below. The processing that define-schema does shouldn't be worse than 
O(N*M) where N is the number of tables and M is the number of unique 
procedure names. Which is not linear, but also probably not large enough to 
be the main culprit. I added `(println stx-being-returned)` to 
define-schema and it gets printed relatively quickly. So probably the size 
of the generated code is the main culprit. I'll try Ryan C's tips as soon 
as I have time; they look promising.

(define-schema $$
  (table A
 #:property
 [foo (%%scalar "foo-given-A" this)])
  (table B
 #:property
 [foo (%%scalar "foo-given-B" this)]
 [bar (%%scalar "bar-given-B" this)]))

; Approximately expands to
#;(begin
(define A (make-table 'A))
(define B (make-table 'B))
(define (foo x)
  (cond
[((instanceof A) x)
 (%%scalar "foo-given-A" x)]
[((instanceof B) x)
 (%%scalar "foo-given-B" x)]
[else (error "expected instanceof A or B, got" x)]))
(define (bar x)
  (cond
[((instanceof B) x)
 (%%scalar "bar-given-B" x)]
[else (error "expected instanceof B, got" x)])))

-- 
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/9900daba-8dd8-4e46-88ef-84fdeb53f11fo%40googlegroups.com.


[racket-users] How can I increase expansion+compilation speed?

2020-07-19 Thread Ryan Kramer
Using DrRacket, the following file takes 18 seconds to compile without 
debugging, or about 40 seconds to compile with 
debugging: 
https://raw.githubusercontent.com/default-kramer/plisqin-tutorials/e844825b48137553246c64e73516d880b9068825/define-schema-answer-key/aw-schema.rkt

When I say "compile", I mean that I click "Run" in DrRacket and wait for it 
to give me REPL access. But that file just defines and provides a slew of 
functions, it doesn't really do anything at runtime.

(Using the command-line `racket that-file.rkt` takes only 7 seconds, which 
is OK. But many people, myself included, primarily use DrRacket.)

Admittedly, this is 612 dense lines of code. So it might just be a case of 
"yeah, that's about how long it takes." But it's also possible (or 
probable?) that I have some inefficient macros somewhere. Are there any 
tools/techniques I can use to help me reduce the compilation time?

-- 
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/40e40eff-a0be-4850-9360-c9648cb5b8d9o%40googlegroups.com.


[racket-users] Re: Scribble: customizing table borders

2020-07-19 Thread Ryan Kramer
This isn't the most ideal way, but it might work for you:

CSS:

.LongMult td[data-underline="yes"] { border-bottom: 1px solid red; }

Code:

#lang scribble/manual

@(require scribble/core
  scribble/html-properties)

@(tabular
  #:sep @hspace[2]
  #:style (style "LongMult" null)
  #:row-properties (list (list)
 (attributes '((data-underline . "yes")))
 (list))
  (list (list @para{a1} @para{a2})
(list @para{b1} @para{b2})
(list @para{c1} @para{c2})))



On Sunday, July 19, 2020 at 2:10:03 PM UTC-5, Shriram Krishnamurthi wrote:
>
> It *appears* that in Scribble, the color of a table's borders (e.g., 
> bottom-border) is fixed: e.g.,
>
> 5
>
> generated from a program such as
>
> @tabular[#:sep @hspace[2]
>  #:row-properties '(() () bottom-border ())
> #:style (style "LongMult" null)
>
> I haven't had any luck coming up with the right CSS incantation that would 
> let me override exactly that black and not change anything else.
>
> Yes, I can tag these with a style, as above, which translates into a class 
> name. But because the black setting is most deeply nested, I can't seem to 
> change it at all. For instance,
>
> .LongMult {
> border-bottom: 1px solid red;
> }
>
> *adds* a new red bottom border for the whole table while leaving the 
> intermediate black one intact, while 
>
> .LongMult td {
> border-bottom: 1px solid red;
> }
>
> adds a red bottom border to every row *except* the one that is black 
> (since the generated code presumably overrides the outer CSS). It feels 
> like perhaps this should have been a named and modifiable class in 
> scribble.css rather than a hard-coded constant?
>
> (My central problem is I have a site that is in "dark mode", so the black 
> essentially disappears against the background. So the need to change this 
> color is a functional one, not just aesthetic.)
>
> Any ideas? Thanks!
>
> Shriram
>

-- 
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/5277d6fe-29a2-41d2-8ead-042307c7e40eo%40googlegroups.com.


[racket-users] Re: scribble: how to put a bar above text?

2020-06-16 Thread Ryan Kramer
Oh my gosh, I almost forgot about Unicode tricks! (I wish I knew more about 
Unicode). Here is a macron: ā. And it seems there's a lot more you can do: 
https://qualityandinnovation.com/2014/11/22/typing-x-bar-y-bar-p-hat-q-hat-and-all-that/

These will work just fine inside a Racket source file.

On Tuesday, June 16, 2020 at 7:41:08 AM UTC-5, jos.koot wrote:

>  
>
> Hi,
>
> Using scribble when writing a text containing Boolean expressions it would 
> be nice to write ‘not(A+B)’ as ‘A+B’ with a bar above it. An expression 
> like not(not(A)+not(B)) would need bars above the A and the B as well above 
> the whole. Is this possible? I have found no solution in the scribble docs. 
> I have looked into some HTML tutorials too, but did not find what I want. I 
> am an ignorant with respect to HTML. And even when I would know how to do 
> it in HTML, I also would need to know how to transfer the tool to scribble.
>
> Thanks, Jos
>

-- 
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/f5b741c7-e793-47ec-be30-a16d5223f5c4o%40googlegroups.com.


[racket-users] Re: scribble: how to put a bar above text?

2020-06-16 Thread Ryan Kramer
Something things in scribble have a `#:style` argument. And most things in 
scribble can be contained inside a `nested` or `elem`, to which you could 
apply your custom #:style. You can use this as a hook to a custom CSS file, 
where you could maybe use "text-decoration: overline;" if that looks good 
to you. (Although if you anticipate needing more math typesetting 
capabilities, HTML+CSS will probably fail you. Mathjax sounds good.)

Basically, if you can hand-write HTML that looks good to you, you can 
probably get Scribble to do what you want. The relevant reading, I believe, 
is "styles" and `make-css-addition`, starting here: 
https://docs.racket-lang.org/scribble/config.html

Or, if you want to see a real example, I just did one: 
https://docs.racket-lang.org/plisqin/Refactoring_Recipes.html This uses a 
custom "PGreen" CSS class. You might be able to see how it all gets wired 
up by looking at these files: 
https://github.com/default-kramer/plisqin/search?q=PGreen_q=PGreen

Hope this helps! But there no way to explain this with a little 10-line 
example, unfortunately.


On Tuesday, June 16, 2020 at 7:41:08 AM UTC-5, jos.koot wrote:
>
>  
>
> Hi,
>
> Using scribble when writing a text containing Boolean expressions it would 
> be nice to write ‘not(A+B)’ as ‘A+B’ with a bar above it. An expression 
> like not(not(A)+not(B)) would need bars above the A and the B as well above 
> the whole. Is this possible? I have found no solution in the scribble docs. 
> I have looked into some HTML tutorials too, but did not find what I want. I 
> am an ignorant with respect to HTML. And even when I would know how to do 
> it in HTML, I also would need to know how to transfer the tool to scribble.
>
> Thanks, Jos
>

-- 
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/9fa457fc-3f5a-4277-8ca8-2841d7a7b6bdo%40googlegroups.com.


Re: [racket-users] Re: local variables are hyperlinkedinscribble/manual

2020-06-13 Thread Ryan Kramer
That was actually Ryan Culpepper. Sorry for the noise, but I can't 
implicitly take credit for something that I didn't do.

By the way, thank you Ryan C for both of those techniques. I've already 
happily used `make-element-id-transformer`

On Saturday, June 13, 2020 at 4:07:06 PM UTC-5, jos.koot wrote:
>
> defaul...@gmail.com  gave me a clear and usable answer.
>
> His email follows below.
>
> Best wishes, Jos
>
>  
>
>  
>
>  
>
> From Ryan Kramer
>
> You can also use make-element-id-transformer, like this:
>
>  
>
> (define-syntax SET
>   (make-element-id-transformer
>(lambda _ #'(racketvarfont "set"
>
>  
>
> Then Scribble will automatically replace SET within rendered code with the 
> element expression above.
>
>  
>
> Another trick is to break the for-label binding by introducing a local 
> binding that shadows it. For example, if you write
>
>
> (let ([set #f])
>   (racket set))
>
>  
>
> then the occurrence of `set` within the `racket` form isn't linked to 
> `set` from racket/set. This trick relies on being able to put a let around 
> the occurrences you don't want linked but not the ones that you do want 
> linked, so it might not work in all cases.
>
>  
>
> Ryan
>
>  
>
>  
>
>  
>

-- 
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/f7162464-1d7b-4113-8883-03f022f0cf5fo%40googlegroups.com.


[racket-users] How can source-omit-files exclude a directory?

2020-05-27 Thread Ryan Kramer
I have a multi-collection package and I wanted to exclude a certain 
directory (plisqin-test) from being a package. I found the relevant 
documentation here: https://docs.racket-lang.org/pkg/strip.html.

The first thing I tried was simply adding a `~` to the end of the 
directory. This worked. Then I kept reading and found `source-omit-files` 
which sounds like a better way, but I couldn't get it to work. I tried 
adding the following to the info.rkt of the multi-collection package (and 
maybe a few more), but none of them worked:

(define source-omit-files
  '("plisqin-test"
"plisqin-test/"
"plisqin/plisqin-test"
"plisqin/plisqin-test/"))

Is it possible to exclude an entire collection using the info.rkt of a 
multi-collection package? (For reference, this is the package in question: 
https://github.com/default-kramer/plisqin/tree/d44effd731b1c6d8c924ec311da43d8755f07049)

-- 
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/fe6eac50-19c9-4501-803b-9335e4bee682%40googlegroups.com.


[racket-users] Re: local variables are hyperlinked in scribble/manual

2020-05-25 Thread Ryan Kramer
My favorite way to avoid this problem is simply to choose another name, or 
use `except-in` to avoid importing `set` for-label. But if you must use the 
name `set` and you want it linking to racket/set most of the time (but not 
this time), here is a technique I've used in the past:

#lang scribble/manual

@(require (for-label racket) scribble/eval
  (for-syntax racket
  syntax/parse))

@(define-for-syntax (replace-helper stx orig-sym new-sym)
   (let ([content (syntax-e stx)])
 (cond
   [(list? content)
(datum->syntax stx
   (map (λ (child) (replace-helper child orig-sym 
new-sym))
content)
   stx stx)]
   [(equal? orig-sym content)
(datum->syntax #f new-sym stx #f)]
   [else
stx])))

@(define-syntax (replace stx)
   (syntax-parse stx
 [(_ [orig:id new:id] body:expr)
  (replace-helper #'body (syntax-e #'orig) (syntax-e #'new))]))

@(replace
  [SET set]
  @interaction[
 (let ((SET 1)) (add1 SET))])


On Sunday, May 24, 2020 at 11:26:54 AM UTC-5, jos.koot wrote:
>
> Hi,
>
> I have:
>
>  
>
> #lang scribble/manual
>
> @(require (for-label racket) scribble/eval)
>
> @interaction[
>
> (let ((set 1)) (add1 set))]
>
>  
>
> I prepare a HTML document with DrRacket (in Windows 10).
>
> Works, but local variable set is hyperlinked to procedure set in the 
> documents (racket/set). I would like this variable to be typeset as any 
> other local variable. How can I do that without loosing the hyperlink where 
> I do mean the procedure from racket/set ?
>
>  
>
> Thanks, Jos
>

-- 
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/ffd4f155-ee18-409d-b92f-9450d976220f%40googlegroups.com.


[racket-users] Re: New week, new Racket! What are you folks up to?

2020-04-21 Thread Ryan Kramer
I'm finally finishing up a major overhaul of Plisqin, my alternative to 
SQL. I don't think I will consider it "stable" just yet, but it is getting 
much closer. The biggest new feature is a type system that prevents the 
three-valued logic mistakes that are too easy to make in SQL. I also hope 
to write better documentation this time around thanks to a better example 
database. (I've ported the AdventureWorks schema and some of the data to 
SQLite.)

I also think I can add basic Typed Racket support pretty easily. If I know 
the names and types of each column that a query will produce, I can expose 
this to Typed Racket as, for example:

(: get-users (-> DbConnection
 (Sequenceof (Object (field [first-name String]
[last-name String]
[age Number])

Will this actually be useful? I'm not sure, but at this point it doesn't 
seem like much more work than the untyped version. I'd welcome advice here. 
Is "fields vs methods" worth thinking about? Or maybe Object isn't the best 
type to use. But Object seems like the best way to get structural-ish 
typing, which is probably better than (Sequenceof get-users-result) or 
something like that.


On Sunday, April 19, 2020 at 12:04:18 PM UTC-5, Stephen De Gabrielle wrote:
>
> New week, new Racket! What are you folks up to? 
>
> Answer here or on 
> - https://racket.slack.com/ (Sign up at 
> https://racket-slack.herokuapp.com/ ) 
> - `#racket` IRC on freenode.net https://botbot.me/freenode/racket/ 
> - Tweet @racketlang on Twitter 
> - Racket discord https://discord.gg/6Zq8sH5 
> - [r/racket](https://www.reddit.com/r/Racket) 
>
> Don’t forget to sign up for, and contribute to Racket News at 
> https://racket-news.com/ AND submit your links to Racket Stories 
> https://racket-stories.com/
>
> Kind regards, 
>
> Stephen
>
>
>
>

-- 
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/c6888141-abfd-4073-ac3c-24f20a7dcacd%40googlegroups.com.


Re: [racket-users] How can I write a macro that recognizes arbitrary other macros?

2020-04-17 Thread Ryan Kramer
Thanks! That was much easier than I was expecting.

For posterity, here is some working code but be warned that I don't know 
whether 'module is the best expansion context to use. But this is a toy 
example anyway.

#lang racket

(define-syntax (collect stx)
  (syntax-case stx (define-values)
[(_ (define-values (id ...) expr) rest ...)
 #'(let-values ([(id ...) expr])
 (collect rest ...))]
[(_ (macro arg ...) rest ...)
 (syntax-local-value #'macro (lambda () #f))
 (let ([expanded (local-expand #'(macro arg ...)
   'module
   (list #'define-values))])
   (syntax-case expanded (define-values)
 [(define-values stuff ...)
  #`(collect #,expanded rest ...)]
 [else
  #'(cons (macro arg ...) (collect rest ...))]))]
[(_ a rest ...)
 #'(cons a (collect rest ...))]
[(_)
 #'(list)]))

(define-syntax-rule (my-define stuff ...)
  (define stuff ...))

(define-syntax-rule (my-list stuff ...)
  (list stuff ...))

(collect 1 2 (my-define x 3) x (my-list 4 5))


On Thursday, April 16, 2020 at 9:50:45 PM UTC-5, Matthew Flatt wrote:
>
> The main trick in this case is to recognize `define-values` (which is 
> what `define` expands to) instead of `define`. That's because 
> `define-values` propagates syntax arming to its identifiers and 
> right-hand side, which means that your macro is allowed to pull it 
> apart. 
>
> You'll also need to use an expansion context other than 'expression, 
> though. 
>

-- 
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/8b62651d-86de-4ab8-b9b7-27c4a818dfbf%40googlegroups.com.


[racket-users] How can I write a macro that recognizes arbitrary other macros?

2020-04-16 Thread Ryan Kramer
The following code produces '(1 2 3 4)

(define-syntax (collect stx)
  (syntax-case stx (define)
[(_ (define id val) rest ...)
 #'(let ([id val])
 (collect rest ...))]
[(_ (macro arg ...) rest ...)
 (syntax-local-value #'macro (lambda () #f))
 (let ([expanded (local-expand #'(macro arg ...) 'expression (list 
#'define))])
   (println expanded)
   #`(collect #,expanded rest ...))]
[(_ a rest ...)
 #'(cons a (collect rest ...))]
[(_)
 #'(list)]))

(define-syntax-rule (my-define stuff ...)
  (define stuff ...))

(collect 1 2 (define x 3) x 4)


I would like `(collect 1 2 (my-define x 3) x 4)` to produce the same 
result. But instead I get the error message "let-values: cannot bind 
tainted identifier in: x"

"OK, maybe this is impossible" I thought, and moved on to what I should 
have been working on anyway. But now I see that `class*` does seem to 
recognize arbitrary macros. The following example shows that `class*` 
seemingly understands my arbitrary `define-foo` macro:

(define-syntax-rule (define-foo)
  (define/public (foo)
(list this 'foo)))

(define my-class%
  (class* object% ()
(super-new)
(define-foo)))

(define c (new my-class%))
(send c foo)

How does `class*` understand my `define-foo` macro? And can the same 
technique be used to fix my `collect` macro?

-- 
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/0d01f4c1-f0b4-49cb-b9c2-fca7e2ca6429%40googlegroups.com.


[racket-users] Re: `raco test` seems slower, not caching any compilation results?

2020-03-19 Thread Ryan Kramer
On Wednesday, March 18, 2020 at 7:47:22 PM UTC-5, Ryan Kramer wrote:
>
> I'm currently using Racket 7.6 (non-CS) on Windows, and it feels like 
> `raco test` is much slower these days.
>

My mistake, it seems `raco test` never created the "compiled" directories 
with the dep and zo files. I found that using `raco setup -l ` does 
create the dep and zo files, so I just need to remember to do that whenever 
I see the slowness.

-- 
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/b3db4ab9-4d74-4613-b75b-6791bbe7b8a7%40googlegroups.com.


[racket-users] `raco test` seems slower, not caching any compilation results?

2020-03-18 Thread Ryan Kramer
I'm currently using Racket 7.6 (non-CS) on Windows, and it feels like `raco 
test` is much slower these days. Specifically I am seeing

`raco test tests.rkt` takes 10 seconds. This is fine the first time, but 
repeating the test immediately also takes 10 seconds. It never creates any 
"compiled" directories.

Meanwhile, if I open tests.rkt in DrRacket, the first run takes about 10 
seconds but then subsequent runs (without changes) take about 1 second. 
This creates a "compiled" directory, which I thought raco test would be 
able to use, but no luck -- raco test still takes 10 seconds.

I think this is a regression from 7.5, or else something strange is 
happening on my machine. I will try reverting to 7.5 soon to see if I can 
definitely determine the difference.

Does anyone know why this might be occurring?

-- 
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/b7c7b864-3208-4a98-bfc2-84b9c3a1a313%40googlegroups.com.


[racket-users] Re: Help with simple macro transformation

2020-02-17 Thread Ryan Kramer
Gah, of course it's possible with patterns. For some reason I just didn't 
think of matching `(id rest ...)`

(define-syntax (rearrange stx)
  (syntax-case stx ()
[(_ [(id rest ...) body]
more ...)
 #'(cons '[id body]
 (rearrange [(rest ...) body]
more ...))]
[(_ [() body]
more ...)
 #'(rearrange more ...)]
[(_)
 #'(list)]))


-- 
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/0ee5ab41-0ddd-4722-be69-6d5001847dd5%40googlegroups.com.


[racket-users] Help with simple macro transformation

2020-02-17 Thread Ryan Kramer
I'm 95% sure I've done this before, but for some reason I am really stuck 
right now. Given

(rearrange ([(a b c) 1]
[(d e) 2]))

I would like any kind of shape containing [a 1] [b 1] [c 1] [d 2] [e 2]. 
Any kind of nesting should be fine as long as the ids are matched up 1:1 
with the numbers. I've tried variants of the following but always run in to 
"incompatible ellipsis" problems:

(define-syntax-rule (rearrange [(id ...) body] ...)
  '(([id body] ...)
...))

Can this be done with patterns, or do I need to use quasisyntax splicing 
and list manipulation?

Larger context: I am making a table of proc-ids and proc-bodies. Some procs 
share the same bodies, so I want to be able to write [(a b c) shared-body], 
but eventually I need to get to [a shared-body] ...

-- 
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/103ad2ab-432e-4e65-b3c5-1a080c310b01%40googlegroups.com.


[racket-users] Surprising behavior in The Printer

2020-01-10 Thread Ryan Kramer
I have a small program that demonstrates some surprising behavior regarding 
`prop:custom-print-quotable 'never`. Perhaps it could be considered a bug, 
although I haven't seen anything in the docs that this violates. I've found 
that

1. When I call `(println y)`, my `custom-display` is called first. And what 
I do in `custom-display` affects the result of `(println y)`
2. The printer is doing something with `eq?` rather than `equal?`. (Does 
this mean that constructing any new data structure, even a list, during 
printing is an anti-pattern?)

In the example below, if `(maybe-rebuild lst)` returns `(identity lst)` 
then `prop:custom-print-quotable 'never` works as I expected. But if 
`(maybe-rebuild lst)` returns `(apply list lst)` which is a list that is 
equal? but not eq? to the original list, then `prop:custom-print-quotable 
'never` surprises me.

#lang racket

(require racket/struct)

(struct my-struct (item) #:transparent
  #:property prop:custom-print-quotable 'never)

(define (go port mode val)
  (let ([proc (make-constructor-style-printer
   (λ (me) 'my-class%)
   (λ (me) (list val)))])
(proc (void) port mode)))

(define (maybe-rebuild lst)
  ; Works as expected if we return the same list
  #;(identity lst)
  ; But this breaks prop:custom-print-quotable 'never
  (apply list lst))

(define my-class%
  (class* object% (printable<%>)
(super-new)
(init-field content)
(define/public (custom-print port mode)
  (go port mode content))
(define/public (custom-write port)
  (go port #t content))
(define/public (custom-display port)
  (go port #f (maybe-rebuild content)

(define x (list 'CONTENT (my-struct '(1 a
(println x)
(define y (new my-class% [content x]))
(println y)


-- 
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/a8205ac0-bb35-4ffe-aa5e-56377a80cf24%40googlegroups.com.


[racket-users] Re: Can `parameterize` work with pretty printing?

2020-01-03 Thread Ryan Kramer
I found `make-tentative-pretty-print-output-port` and 
`tentative-pretty-print-port-transfer` which looks like it might be the 
right way to go. I changed `write-now` as follows:

(define (write-now proc x port mode)
  (if (pretty-printing)
  (let* ([alt-port (make-tentative-pretty-print-output-port port

(pretty-print-columns)
(λ () 
(void)))]
 [_ (proc x alt-port mode)])
(tentative-pretty-print-port-transfer alt-port port))
  (let* ([alt-port (open-output-string)]
 [_ (proc x alt-port mode)]
 [str (get-output-string alt-port)])
(write-string str port

And it looks like it mostly works, except that now it seems to ignore my 
`prop:custom-print-quotable 'never`, or else I am missing it somewhere... 
I'll investigate more.


But I don't understand how the `overflow-thunk` of 
`make-tentative-pretty-print-output-port` should be used. From the docs: 
"The overflow-thunk procedure is called if more than width items are 
printed to the port or if a newline is printed to the port via 
pretty-print-newline; it can escape from the recursive print through a 
continuation as a shortcut, but overflow-thunk can also return, in which 
case it is called every time afterward that additional output is written to 
the port."

Does that mean its return value is ignored? It seems like it. And when (if 
ever) should I call `tentative-pretty-print-port-cancel` instead of 
`tentative-pretty-print-port-transfer`?

-- 
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/8aefe2fa-49bf-4d05-84c1-612a54d99ff5%40googlegroups.com.


[racket-users] Can `parameterize` work with pretty printing?

2020-01-03 Thread Ryan Kramer
I am `gen:custom-write` and `make-constructor-style-printer` on an object 
graph that may contain cycles. Within my custom write procedure, I use 
`parameterize` to register an object into dictionary and later in the 
writing process I can check that dictionary, detect the cycle, and do more 
custom write logic.

But I have noticed that sometimes that my `parameterize` has gone out of 
scope by the time the printer gets deeper into the object graph. I was able 
to work around this issue by using another port, then copying the result to 
the real port like this:

(define-syntax-rule (write-now proc x port mode)
  (let* ([alt-port (open-output-string)]
 [_ (proc x alt-port mode)]
 [str (get-output-string alt-port)])
(write-string str port)))

This is better than just doing `(proc x port mode)` because it always 
prints the string that I expect. However, it breaks pretty printing. I've 
noticed that the built-in pretty printing logic will sometimes hit the same 
leaf object multiple times, as if it is testing to see how wide the result 
is and backing up and trying again. Perhaps it can also delay evaluation? 
That would explain why my `parameterize` has ended.

Is there a way to use `parameterize` within custom write logic and keep 
pretty printing working? Is there a better approach I should take?



Additional Information
===
https://github.com/default-kramer/morsel/blob/master/morsel-lib/private/essence/base-query-printer.rkt#L22
The `write-now` macro, as written, is "correct but unpretty". I can change 
it to "incorrect but pretty" as follows:

(define-syntax-rule (write-now proc x port mode)
  (proc x port mode))


https://github.com/default-kramer/morsel/blob/master/morsel-lib/private/essence/from.rkt#L373
This is a test that fails in "incorrect but pretty" mode. Rackunit reports:

location:   from.rkt:373:2
actual:
  "(from #0=a/0 \"A\" (attach #1=b/1 \"B\" (attach #2=c/2 \"C\") #3=(list 
#0# #1# #2#)))"
expected:
  "(from a/0 \"A\" (attach b/1 \"B\" (attach c/2 \"C\") (list a/0 b/1 
c/2)))"


Here are two screenshots, one pretty and one unpretty:

[image: pretty.png]

[image: unpretty.png]

-- 
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/6369f1c7-a8a5-470e-af9f-ce1c133469ca%40googlegroups.com.


Re: [racket-users] contract for an "overloaded function"

2019-11-29 Thread Ryan Kramer
Thanks, but I don't think `case->` works for me. It looks like it chooses a 
case purely based on the number of arguments. The following example, when 
given two arguments, will always choose the integer? case even if both 
arguments are strings.

(case-> [-> integer? integer? list?]
[-> string? string? list?])

On Friday, November 29, 2019 at 1:51:52 PM UTC-6, David Storrs wrote:
>
> I think you want `case->`: 
> https://docs.racket-lang.org/reference/function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._case-~3e%29%29
>

-- 
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/73132ad9-7722-432a-8328-0d4c38bbb5a1%40googlegroups.com.


[racket-users] contract for an "overloaded function"

2019-11-29 Thread Ryan Kramer
I'm not exactly sure what I mean by "overloaded function", but I think you 
will understand. I'm looking for something that would allow me to write a 
function contract like

(magic-> [integer? integer? -> integer?]
 [string? symbol? -> string?]
 [string? ...+ -> string?])

The above contract would mean:
  * If the function is given an argument list that satisfies (cons/c 
integer? (cons/c integer? null?)), then the return value must be an integer?
  * Else if the function is given an argument list that satisfies (cons/c 
string? (cons/c symbol? null?)), then the return value must be a string?
  * Else if the function is given an argument list that satisfies (cons/c 
string? (list/c string?)), then the return value must be a string?
  * Else the caller is blamed for not providing correct arguments.

(I don't think I need support for keyword arguments)

Does this already exist in a library somewhere? If not, it doesn't look too 
hard for me to roll my own but I am (perhaps prematurely) concerned about 
the performance. Would the following approach be reasonable?

(define-syntax-rule (magic-> [dom ... range-expr] ...)
  ; We should make sure that every dom and range is a flat-contract?
  (make-contract
   #:name '(magic-> [dom ... range-expr] ...)
   #:first-order procedure?
   #:projection
   (λ (blame)
 (λ (proc)
   (λ args
 (cond
   [((list/c dom ...) args)
(let ([range ((contract-projection range-expr) blame)])
  (range (apply proc args)))]
   ...
   [else
(raise-blame-error
 (blame-swap blame) args
 '(expected "a conforming argument list" given: "~e")
 args)]))

(define/contract (blah a b)
  (magic-> [integer? string? list?]
   [string? integer? (list/c string? integer?)]
   ; This one will throw a contract violation
   [integer? integer? integer?])
  (list a b))

-- 
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/b21a5512-521f-4c6e-8e4e-ca6d3528df8c%40googlegroups.com.


[racket-users] Re: GitHub ‘template repository’ functionality

2019-08-12 Thread Ryan Kramer
Ah, that makes sense. I guess I didn't realize (or took for granted) that 
`raco pkg new` was doing all that. With that in mind, it certainly does 
make more sense to run `raco pkg new` locally.

-- 
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/b7b626e1-b69c-41c3-9d73-92bf28672b90%40googlegroups.com.


[racket-users] Re: GitHub ‘template repository’ functionality

2019-08-09 Thread Ryan Kramer
Thanks Stephen, this looks useful.

I don't understand why you say "I think the template should only have the 
things that `raco pkg new` doesn't do." Wouldn't the intent be that I use 
the template to create my own repo, clone it onto my local machine, and 
then run `raco pkg install`? In that case, I think you would want the stuff 
from `raco pkg new`. (But my knowledge of packages and collections is 
just-enough-to-get-by.)

I recently struggled converting a repository from a single to a 
multi-collection package. (And I still have some learning and cleanup to 
do.) It might be nice to have a template for a simple multi-collection repo 
also. Maybe with lib, doc, and test collections? On the other hand, maybe 
multi-collection packages are too different for a template to make sense.

-- 
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/7827f4e3-af4b-4d0b-b12b-d97efbae07db%40googlegroups.com.


[racket-users] Re: Racket + Graphviz

2019-08-01 Thread Ryan Kramer
This looks interesting! I have thought about trying to generate Entity 
Relationship diagrams given a database schema, but assumed that laying out 
the boxes would be a hard problem. Looks like GraphViz might do a decent 
job at this. I'll try it out and let you know how it goes.

-- 
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/9566c624-74ce-4e8d-a332-00fc5b582ba4%40googlegroups.com.


[racket-users] Re: define/contract for private functions

2019-07-24 Thread Ryan Kramer
On Wednesday, July 24, 2019 at 12:55:58 AM UTC-5, Roman Klochkov wrote:
>
> I propose to use submodules like in 
> https://github.com/Kalimehtar/binary-class/blob/master/binary-class/base.rkt
>
> So you may in test module (require mod/safe) and in normal operation 
> (require mod).
>

Sorry, I wasn't clear what I meant by "private function." I am talking 
about functions that are not provided anywhere (e.g. they are only 
available in one source file). These functions often have comments like

;; integer symbol -> string

But making them contracts instead of comments can provide some benefits 
that I mentioned earlier.

-- 
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/8bf4684f-75ed-4d1f-add8-bb66bce7a0b8%40googlegroups.com.


[racket-users] define/contract for private functions

2019-07-23 Thread Ryan Kramer
I've found myself wanting to write contracts on private functions, but I 
don't want to pay the performance cost during normal operation. What I've 
been doing is making a `def/c` macro which looks exactly like 
`define/contract` but is wired up to `define` and discards the contract. 
When I want to enable these private contracts (e.g. when running tests or 
debugging a problem) I simply change the source code of `def/c` so that it 
is wired up to `define/contract` and the contract is checked. Here is an 
example: http://pasterack.org/pastes/4224

Manually changing the source code of `def/c` has worked fine so far, but I 
would love to be able to do something like "raco test 
-with-private-contracts (package1, package2) ./" instead.

I prefer this approach over putting the contracts in comments, because 
comments have less precise meaning and may become subtly inaccurate if the 
implementation of the function changes.

I wonder if other people want to write code the same way. If so, having a 
standard, shared `define/contract/private` could be useful. This would 
allow us to do things like
1) Build a contract-aware linter.
2) Build a "minimally intrusive type system." (This might also be called a 
"linter"; I'm not sure if there is a definite line separating the two.)
3) Better IDE support
4) If I suspect a package I am using has a bug, I might be able to confirm 
(but not deny) that suspicion by turning on private contracts for that 
package and seeing if a violation is reported.

So I guess if I'm the only one interested in this then just ignore me. If 
there's already work in this area, great! Please point me to it. But if 
there's interest and a need, I'd be happy to help however I can.

-- 
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/5e8ece69-bbb7-4dbf-933f-52cc097291d2%40googlegroups.com.


Re: [racket-users] datatypes

2019-07-17 Thread Ryan Kramer

>
>  Still, variant reports ‘(a . b) as a ‘pair. and that’s amazing. How is it 
> obtaining that information?
>

I just looked it up and yeah, it is pretty cool: (struct->vector '(a . b)) 
is doing most of the work. See the comments and implementation here: 
https://github.com/mbutterick/describe/blob/b468661a0e76fbe5ef46fe0e89e030f43f7b3acc/describe/main.rkt#L78

-- 
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/6cffaef7-eba2-487d-9bfc-eebb9881e647%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] can Typed Racket handle this function type safely?

2019-07-06 Thread Ryan Kramer

>
> (ann ((ann maybe-car (All (a b) (-> a a))) (list 1 2)) (Listof Integer)) 
>

Aha! That seems to answer my next question "is it truly unsafe?" with a 
Yes. Thanks Sam.

-- 
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/aa89681c-abae-463b-b1c6-421277ab2a20%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] can Typed Racket handle this function type safely?

2019-07-05 Thread Ryan Kramer
In the code below, can `maybe-car` have the given type without using 
typed/racket/unsafe?

#lang typed/racket
(require typed/racket/unsafe)

(module untyped racket
  (provide maybe-car)
  (define (maybe-car x)
(cond
  [(pair? x) (car x)]
  [else x])))

(unsafe-require/typed
 'untyped
 [maybe-car (All (a b) (case->
(-> (Pairof a b) a)
(-> a a)))])

-- 
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/c8a25880-8127-405c-b862-95c4c3694440%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Request for Feedback (SQL, Plisqin)

2019-06-21 Thread Ryan Kramer
Thanks Alex, that was very helpful.
 

> it is not clear from the document how any of it can be useful.  
>

I got this same feedback from some friends on the 0.1 release.

Also, it is not clear
> what `Department?` and `Course?` are in the first code snippet -- are they
> functions that the user has to provide or is it something that your library
> generates by looking at the database schema?
>

I was planning on building the "generate functions by looking at the 
database schema" functionality later, but now I realize it might be a 
prerequisite for good documentation.

I would suggest to provide a database schema and some sample data in a
> database, and use this in the subsequent examples.  Start with a simple but
> complete working example and construct more complex, but still complete and
> working examples from them, at each step illustrating the benefits that the
> library provides.  Maybe contrast each step with how the plain SQL would 
> look
> as well?
>

I'm glad you said this because I am planning on doing this. I wrote the 
post you read hoping I could revise those ideas into a shorter, punchier 
"opening argument" before starting the slower walkthrough. But if it wasn't 
clear to you, I don't think I can possibly make it clear to Plisqin's 
target audience (some SQL experience, no Racket experience).

Documentation is hard!

-- 
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/f6f3cf03-b9bf-4769-8d5b-1f751e039269%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: Request for Feedback (SQL, Plisqin)

2019-06-21 Thread Ryan Kramer
Oops, I got the link wrong: 
https://github.com/default-kramer/plisqin/wiki/Towards-Better-Relational-Query-Languages

On Friday, June 21, 2019 at 11:41:31 AM UTC-5, Ryan Kramer wrote:
>
> Target Audience: you have 10 minutes and you're familiar with libraries 
> that do SQL kinda like this:
>
> (from i "Item"
>   (where i".ReleaseDate > '2018-01-01'")
>   (select i".ItemName"))
>
> Article: 
> https://github.com/default-kramer/plisqin/wiki/Towards-Better-Relational-Query-Languages
>  
> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fdefault-kramer%2Fplisqin%2Fwiki%2FTowards-Better-Relational-Query-Language=D=1=AFQjCNEE95mJxUmrwClZwEk8FXnCqkmU9A>
>
> Context: Plisqin is my SQL generation library, but I think of it as an 
> "alternate query language" because theoretically it doesn't have to 
> generate SQL. (But it probably always will.)
>
> I'm gearing up to release Plisqin 0.3 and want to improve my 
> documentation. If I can't explain these concepts to fellow Racketeers, I 
> don't stand a chance of explaining them to the general public.
>
> Thanks for any feedback!
>

-- 
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/f7b58794-2716-4758-8c14-0b354030d460%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Request for Feedback (SQL, Plisqin)

2019-06-21 Thread Ryan Kramer
Target Audience: you have 10 minutes and you're familiar with libraries 
that do SQL kinda like this:

(from i "Item"
  (where i".ReleaseDate > '2018-01-01'")
  (select i".ItemName"))

Article: 
https://github.com/default-kramer/plisqin/wiki/Towards-Better-Relational-Query-Language

Context: Plisqin is my SQL generation library, but I think of it as an 
"alternate query language" because theoretically it doesn't have to 
generate SQL. (But it probably always will.)

I'm gearing up to release Plisqin 0.3 and want to improve my documentation. 
If I can't explain these concepts to fellow Racketeers, I don't stand a 
chance of explaining them to the general public.

Thanks for any feedback!

-- 
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/1ec9475b-2d0c-42f2-99eb-ede13075295c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: grammar-based fuzzing

2019-06-12 Thread Ryan Kramer
Thanks everyone for the good suggestions. Xsmith looks particularly 
appealing, looking forward to 1.0!

-- 
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/3b54c6c7-94fe-49b0-a3ba-23fc7dab2091%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] grammar-based fuzzing

2019-06-06 Thread Ryan Kramer
Does Racket have any grammar-based fuzzing utilities? I'm probably going to 
play around with this either way, but if there is an existing solution I'll 
quit after I've had my fun. If, however, people think Racket could use 
something like this I may attempt to make it into a usable package.

I'm thinking specifically about generating inputs for Quickcheck, but such 
a fuzzer might have other uses.

For example, given this grammar:

(struct tree (left right) #:transparent)

(define-grammar tree-grammar
  [Leaf (:choose-integer - )]
  [Subtree #'(tree Node Node)]
  [Node #:max-nesting 10
(:weighted-choice
 [1 Leaf]
 [5 Subtree])])

Then (tree-grammar 'Subtree) might generate #'(tree 1 (tree 2 3)) as one of 
many possibilities.

An important feature that I haven't seen yet is tracking/scoping 
identifiers. There are times when we want to generate any arbitrary 
identifier, and other times when we want to use an existing identifier that 
we know is in scope. For example, if we were fuzzing `let` we might have

(define-grammar let-grammar
  [Root #'(let ([LetId LetVal]
...)
LetBody)]
  [LetId (:choose-identifier)]
  ; TODO ...
  )

And somehow we want to say that LetBody can and should use the enclosing 
LetIds, but I don't immediately see a great way to communicate that. It 
might be possible to have something like (:choose-bound LetId) which would 
generate a LetId that is known to be in scope.

-- 
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/832ed76d-33f6-4f3f-b80f-da891613b6a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] Macro guards question

2019-05-29 Thread Ryan Kramer
#'arg is a syntax object, therefore (number? #'arg) or (string? #'arg) will 
always be false. If you are trying to dispatch based on literals, you could 
use e.g. (number? (syntax-e #'arg)) to identify a numeric literal. But it 
is not very common that a macro handles a numeric literal differently than 
an identifier that is bound to a numeric value at runtime. I'm guessing you 
can use a regular procedure and cond for most of this.

-- 
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/111c1509-d77f-48d6-8c1f-19a37748cace%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: catch and bind an unbound id in a macro

2019-04-20 Thread Ryan Kramer
Below is a short example showing that identifier-binding doesn't seem to 
work quite right with Scribble's make-base-eval. It works fine with 
make-evaluator from racket/sandbox.

I'm not sure why this is, but using syntax-local-value instead works 
everywhere. (Implementation here: 
https://github.com/default-kramer/plisqin/commit/2723d7c11be5b6938e681ea869e8b9f4957849b0#diff-1a91d998f2be05413392d588a89323d3R31)

#lang racket
(require scribble/eval
 racket/sandbox)

(define (setup eval)
  (eval
   '(define-syntax (define-if-not stx)
  (syntax-case stx ()
[(_ id val)
 (identifier-binding #'id)
 #'(void)]
[(_ id val)
 #'(define id val)]

(define scribble-eval (make-base-eval))
(scribble-eval '(require racket))
(setup scribble-eval)

(define racket-eval (make-evaluator 'racket))
(setup racket-eval)

(scribble-eval '(define-if-not foo 1))
(scribble-eval '(define-if-not foo 2))
(scribble-eval 'foo) ; want 1, get 2

(racket-eval '(define-if-not bar 3))
(racket-eval '(define-if-not bar 4))
(racket-eval 'bar) ; want 3, get 3

-- 
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: catch and bind an unbound id in a macro

2019-04-19 Thread Ryan Kramer
For what it's worth, Matthias' original answer has solved an issue I had. I 
was using identifier-binding for something very similar and it worked fine, 
except in my scribble examples. I had example 1 define foo, but then 
example 2 (with the same evaluator) would not "see" foo via 
identifier-binding, so it redefined foo instead of appending to foo. Using 
syntax-local-value instead seems to have fixed it (pending further testing).

-- 
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] bracket generator

2019-03-20 Thread Ryan Kramer
Anyone need to pseudo-randomly generate a bracket for march madness (or any 
other occasion)? Here you go: 
https://gist.github.com/default-kramer/073b68122ea047ac46b33af20cb1eba1

The data I used is too averse to upsets for my taste. If I were going to 
generate another bracket, I would add some more chaos. But that's a 
personal preference.

Enjoy!

-- 
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: Pretty display of tabular data?

2019-03-14 Thread Ryan Kramer
On Thursday, March 14, 2019 at 12:26:39 AM UTC-5, Alex Harsanyi wrote:

>
> There are now several projects announced on this list, all of them deal 
> with
> data analysis on one way or the other.  Would it be possible to join forces
> and merge these projects so that we end up with one library that servers
> multiple purposes equally well?  Something where the final product is 
> greater
> than the sum of its parts...
>
> Or perhaps these libraries have aims that are so different from each other
> that the only thing they share is a very abstract concept of "table"?
>

I think my project "plisqin" is one of those you are thinking of. Matt's 
"tbl" is also one. I'm also keeping an eye on Ryan's "sql". Are there any 
more you were thinking of?

Regarding joining forces/merging these projects, this is a good question 
that I think warrants discussion. So I'll share my thoughts.

Obviously I can't speak for all of us, but right not I only see the "very 
abstract concept of "table"" as potential shared code. (Also, learning 
about snip% earlier in this thread was awesome. I'd love to use something 
like that in my project.)

I think the differences between plisqin and tbl are fairly obvious - 
plisqin is an alternative to SQL while tbl is an alternative to 
"Python/NumPy/SciPy, or R/Tidyverse (or, horrors, plain R)"

Now comparing Ryan's sql to plisqin is a different story. These projects 
are both alternatives to SQL. But I think there is enough difference 
between our approaches and scope to warrant separate projects, at least for 
now.
1) sql seems to be mostly implemented as macros. plisqin is mostly 
implemented as procedures.
2) plisqin has some design decisions that some might consider "too much 
magic", namely inline joins and "inject-able aggregates" (need better name) 
as documented here: https://docs.racket-lang.org/plisqin/intro.html. 
Whereas sql-the-package seems to more closely mirror SQL-the-language - it 
would be difficult to surprise yourself with the SQL you generate.
3) I am trying to design #lang plisqin so that people with no Lisp 
experience can use it. (Whether I will succeed is another matter...)

I apologize to Ryan C if I have mischaracterized sql. I'd like to have a 
longer conversation about this, but maybe this list is not the right place. 
(Also, Ryan, if you think our goals are more similar than I do, I'd be 
happy to work with you. You're definitely a more experienced Racketeer and 
it would surely boost my code quality.)

- Ryan Kramer

-- 
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] lightning talk ideas?

2019-02-25 Thread Ryan Kramer
Thinking about evangelism... I go to a functional programming meetup and we 
usually do "lightning talks" which are described as:

"Sticking with our short talk/demo format, we will once again have 3 - 5 
> slots available for you to show what you're working on, share something you 
> learned, or demo some cool code.
>
> The presentation should aim to be 5 - 15 minutes, with a hard time limit 
> of 20 minutes. Please post a comment with a brief description of what you'd 
> like to present. Anything FP-related is fair game!
>
> I'd really like to encourage as many members as possible to participate. 
> Even if you're just learning something, you can still present. It will help 
> you learn it more deeply by sharing and explaining."
>

I've given two, with a 3rd one planned:
1) you can customize #%app and that's pretty cool
2) define/contract made me realize static typing isn't as important as I've 
always thought
3) scribble is awesome (seriously, does any language have a better code 
documentation tool?)

Obviously there are many great things about Racket, but it can be hard to 
think of a talk that
1) targets FPers who may not have scheme experience
2) can be explained quickly
3) leaves the audience thinking "that's cool, maybe I should take a look at 
Racket"

Any ideas?

-- 
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: Use cases for tables and records

2019-02-22 Thread Ryan Kramer
On the topic of tables, I recently thought "It would be nice if DrRacket 
had some awareness of tabular data, in the same way that picts and syntax 
objects get special treatment."

For my project, I just wrote a quick-and-dirty function to make an ASCII 
art table and moved on: 
https://github.com/default-kramer/plisqin/blob/3d48cacd3c4239aa0a3a96d712cfdef09272422c/private/rows-result-to-string.rkt#L80

But if we're all working with tables, perhaps it would be worth the time 
investment to enhance DrRacket so that tabular data is formatted better, 
copies well to a spreadsheet, and is scrollable in the case of larger data 
sets. Maybe more features I'm not thinking of.

I have no idea how much work this would be. But if this sounds like a good 
idea, and if someone could give me some guidance, I wouldn't mind making an 
attempt.

-- 
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: "raco test" causes my reader to fail on carriage return (but newline works)

2019-02-03 Thread Ryan Kramer
Progress! Either rebooting, upgrading to 7.2, or something else caused 
DrRacket to start failing in the same way that raco does*. Now it feels 
like a normal problem I can solve using my normal techniques (of scattering 
printlns everywhere).

(* I was wrong when I said that "raco setup" was working - it wasn't.)

-- 
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 test" causes my reader to fail on carriage return (but newline works)

2019-02-02 Thread Ryan Kramer
I have a scribble document with a string representation of some code. The 
string is "(+ 1 2) \r\n (* 2 3)" which eventually gets sent through my 
reader.

When I run "Scribble HTML" in DrRacket it works. When I run "raco setup" it 
works. But when I run "raco test" my reader fails with

(exn:fail:read:eof "prog:2:0: read-syntax: expected a `)` to close `(`" 
# (list (srcloc 'prog 2 0 15 1)))

If I remove the \r so that the string is "(+ 1 2) \n (* 2 3)" then 
everything works, including "raco test".

My reader depends on (current-readtable) so my best guess is that "raco 
test" is modifying it before my reader runs. (Is there a way I can access 
the default readtable used by #lang racket, instead of using 
current-readtable? That would probably be better.)

Or maybe there is some parameter that controls newline handling?

I don't know a good way to debug this. Any suggestions and wild guesses are 
appreciated.

-- 
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] Why would a value produced by eval-ing code not satisfy its type predicate? (Particularly, a SQL statement from the sql package)

2019-02-01 Thread Ryan Kramer

>
> PS There's also a racket package called plisqin which seemed closer to 
> what I was looking for. Maybe in a few months or so if it clicks I'll see 
> if I can add to that package everything I need (things like limit and 
> distinct) and it might work out.
>

Good news, limit and distinct are in scope for v0.2 - I'm working on it now 
:)

Right now, the scope for plisqin 0.2 is determined by
1) About 6k lines of SQL from my day job
2) Ecto's query API: https://hexdocs.pm/ecto/Ecto.Query.API.html#content

I figure that's a decent way to define a reasonable scope. But if you or 
anyone has a list of "must have" features, let me know and I'll certainly 
consider it.

-- 
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] Scribble examples for languages other than Racket

2019-01-25 Thread Ryan Kramer
On Thursday, January 24, 2019 at 9:45:39 PM UTC-6, Alex Knauth wrote:
>
> Would the `scribble-code-examples` package work for you? 
> https://docs.racket-lang.org/scribble-code-examples/index.html
>
> Looks like yes, it will! Thanks.

-- 
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: Scribble examples for languages other than Racket

2019-01-23 Thread Ryan Kramer
OK, I found a much better way. Rather than trying to tweak a syntax object 
to pass in to "examples", it's much easier to use the Low-Level Scribble 
API to rebuild a document fragment that looks like what the built-in 
"examples" would build. What I have now just needs a little CSS and it 
looks close enough. 
https://github.com/default-kramer/plisqin/blob/87a0cca6e2909f5d18c20235a43215f09f1db779/scribblings/TEMP-scribble-lang-idea.scrbl

-- 
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] Scribble examples for languages other than Racket

2019-01-22 Thread Ryan Kramer
I was thinking about how to document #lang plisqin, a language I am working 
on. I wanted to use the "examples" procedure from scribble/example. But it 
looks like when you use the #:lang option, it disables evaluation and 
printing of results. (The typesetting works fine though.)

I came up with a workaround, in which I programmatically construct a 
racketblock that looks like the standard examples. You can see a working, 
single-file prototype here: 
https://github.com/default-kramer/plisqin/blob/dev/scribblings/TEMP-scribble-lang-idea.scrbl

Since I control the evaluator, this should allow me to typeset a fragment 
of #lang plisqin such as

  {where x.Foo > 3}

but evaluate it as

  (where (> (Foo x) 3))

which will allow me to print the result. (I might even try to typeset both 
syntaxes side-by-side or something.)

Has anyone done something similar?

Does my approach seem reasonable?

-- 
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: Is Racket a good fit for my application?

2019-01-09 Thread Ryan Kramer
Scribble is awesome, but I don't think it's the first tool I would reach 
for in this situation. I'm assuming your reports will be mostly tabular and 
not very much prose, in which case Scribble might become an unnecessary 
layer that gets in the way of what you are really trying to do, which is 
generate HTML.

I would probably try to use X-expressions and something like xexpr->html 
[1] to generate an HTML report. Especially if you are planning on building 
a web UI in the future, HTML as X-expressions should work well. (See for 
example [2] which uses X-expressions.)

[1]: 
https://docs.racket-lang.org/txexpr/index.html#(def._((lib._txexpr%2Fmain..rkt)._xexpr-~3ehtml))
[2]: https://docs.racket-lang.org/continue/

Disclaimer: I've never done anything like this in Racket so I could be way 
off.

If you want to go from HTML to PDF automatically, it might be worth 
considering chrome from the command line:

chrome.exe --headless --disable-gpu --print-to-pdf=my-report.pdf 
my-report.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.


Re: [racket-users] How to disallow certain characters in identifiers?

2018-12-20 Thread Ryan Kramer
Interesting. I had never heard of 3d syntax before. But I'm not sure what 
advantage 3d syntax would get me here. If I have to write my own custom 
version of "define", couldn't it just as easily detect a dot in a regular 
syntax object?

On Wednesday, December 19, 2018 at 6:29:22 PM UTC-6, Milo Turner wrote:
>
> Another option, which probably has a lot of terrible consequences, is to 
> transform "a.b" into "3-d syntax" (a struct embedded in syntax) that can 
> now be interpreted differently by forms that are interested. For instance a 
> custom "define" could grab the 3d-syntax in the name and use it to make a 
> decision on what to actually define (or raise an error). In an expression 
> context, #%datum could see this syntax and transform it into some sort of 
> binding looking or other syntax (e.g. (#%dot a b)), which could then be 
> resolved in the typical way.
>
> This approach probably wouldn't work very well because a lot of syntax 
> transformers don't expect to see 3-d syntax. In fact sometimes 3-d syntax 
> is rejected before being made into a syntax object. If you can get this to 
> work I will be pretty impressed.
>

-- 
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] How to disallow certain characters in identifiers?

2018-12-11 Thread Ryan Kramer
Thanks for your response Alexis. You are right: once I figured out the 
correct way to customize the reader, the rest fell into place much more 
easily. Now, when my reader sees a dot it asks the base reader to read 
another piece of syntax, which must be an identifier.

So (define a.b 3) becomes (define a .b 3) and the default error message is 
good enough for now, especially since Racket prints out the 2nd version 
with the error message.

Also, I realized what a bad idea rewriting "a+b" to (+ a b) is. Because 
then I should do the same for subtraction. And then, for example, 
"struct-info" becomes (- struct info) which is a death sentence for a 
language based on Racket. So now infix notation requires whitespace around 
the operator.

For those curious "what are you really trying to do anyway?" I really like 
how at-exp can attach a convenient syntax onto racket without interfering 
with your ability to write standard racket. I am trying to do something 
similar. In my language, curly braces will get treated differently than the 
other paren-shapes. For example {if 10 .add1 {.equal? 11} 'yep 'nope} will 
get rewritten to (if (equal? (add1 10) 11) 'yep 'nope). My hope is that 
experienced Racketeers will find it convenient when they want to use it, 
and unintrusive when they don't. And that beginners who would be scared off 
by raw s-expressions will find it familiar enough to be pleasant.

-- 
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] How to disallow certain characters in identifiers?

2018-12-10 Thread Ryan Kramer
It turns out expanding the syntax object isn't the right approach. It seems 
easy enough for defining values and simple procedures, but as soon as you 
consider optional arguments and keyword arguments, the resulting expansion 
gets too complicated to analyze.

I don't see an easy way to do this, unless there is some hook that I am 
unaware of. For example, applications get piped through #%app and unbound 
identifiers get piped through #%top. If there is #%something that new 
identifiers get piped through, that would be what I want. But I don't think 
it exists.

So my next attempt will be to go back to the reader, and make it so that 
certain characters (like dot and +) are always treated as individual 
tokens. Meaning that (define foo+bar 42) will come out of the reader as 
(define foo + bar 42). The resulting error message should be good enough 
for my purposes, I think.

-- 
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] What is the expected PLT package catalog refresh rate? Is it not refreshing now?

2018-11-19 Thread Ryan Kramer
Thanks Jay, it looks like it worked. Or at least, "raco pkg install
plisqin" works. But I'm not sure why "This package needs documentation"
still shows up. Is something wrong with my info.rkt, or should I give PLT
some more time?

David, thanks for your interest. Did you install using "raco pkg install
plisqin"? Because then you should be able to find the documentation in your
pkgs directory. On my Windows machine, it gets installed here:
C:/Users/kramer/AppData/Roaming/Racket/7.1/pkgs/plisqin/doc/plisqin/index.html
Now, to answer your questions:
1) The DB diagram came from SQL Server Management Studio.
2) This could be a nice feature to have. Take a look at sections 3.2.1 and
3.2.2 to see how I generate the code manually for now.
3) I don't see myself getting into DDL anytime soon. I am primarily focused
on queries right now. Maybe take a look at section 6.1 to see what I'm
thinking about doing next.


On Mon, Nov 19, 2018 at 10:58 AM David Storrs 
wrote:

>
>
> On Mon, Nov 19, 2018 at 11:50 AM Jay McCarthy 
> wrote:
>
>> That error means, "The package server knows about this package but
>> never got a checksum, so I'm giving up." It would be fixed once the
>> server updates (which I just noticed it do after I kicked it for
>> Kramer)
>>
>
> Cool, thanks for letting me know.
>
>
> Kramer, this package looks very cool.  I skimmed through the examples but
> didn't dive deep, so I still have a lot of questions.  Full documentation
> would be great, but filling in the README would be more than enough.
>
> Some of the aforementioned questions:
>
> * Did the code autogenerate that UML diagram, or did you create it
> elsewhere?
>
> * Can plisqin introspect an existing database and generate code to
> describe it?  If not, is that a feature you would consider adding?  It
> would be nice to be able to start from an existing schema, then evolve it
> from the code.
>
> * If you do have/add the 'introspect an existing DB' functionality, it
> would allow you to auto-generate DDL for upgrade / rollback on the schema.
> Is that a feature you might add?
>
>
>
>> Jay
>> On Mon, Nov 19, 2018 at 11:47 AM David Storrs 
>> wrote:
>> >
>> > I tried to install it and got this:
>> >
>> > $ raco pkg install plisqin
>> > Resolving "plisqin" via
>> https://download.racket-lang.org/releases/6.11/catalog/
>> > Resolving "plisqin" via https://pkgs.racket-lang.org
>> > raco pkg install: cannot use empty checksum for Git repostory package
>> source
>> >   source: https://github.com/default-kramer/plisqin.git
>> >
>> > You can force a refresh by going to the top-right corner where your
>> name is, click that, and then choose "re-scan all my packages".
>> >
>> >
>> >
>> > On Sun, Nov 18, 2018 at 8:03 PM  wrote:
>> >>
>> >> I've just uploaded a package to the PLT catalog:
>> https://pkgd.racket-lang.org/pkgn/search?tags=author%3Adefault.kramer%40gmail.com
>> >>
>> >> But I don't think it is refreshing? It tells me "This package has been
>> modified since the package index was last rebuilt. The next index refresh
>> is scheduled for Monday, November 19th, 2018 12:58:07am (UTC)."
>> >>
>> >> It always says the next refresh is less than 5 minutes away. But the
>> message remains.after waiting 5 or more minutes.
>> >>
>> >> (Other clues that make me think it is not refreshing: PLT tells me
>> "This package needs documentation" even though it has documentation. And
>> "raco pkg install plisqin" finds nothing.)
>> >>
>> >> --
>> >> 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.
>>
>>
>>
>> --
>> -=[ Jay McCarthy   http://jeapostrophe.github.io]=-
>> -=[ Associate ProfessorPLT @ CS @ UMass Lowell ]=-
>> -=[ Moses 1:33: And worlds without number have I created; ]=-
>>
>> --
>> 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.