Re: [racket-users] udelim package -- more parens than you can shake a stick at

2016-09-24 Thread Eli Barzilay
On Sat, Sep 24, 2016 at 12:46 PM, William G Hatch  wrote:
>
> First, nestable strings are nice for other things as well.  For
> instance, since they don't escape backslashes, they are nice for
> constructing regexps, which famously explode into mountains of
> backslashes due to being inside "" strings.  They are a great
> alternative to #< complicated for any purpose.

You could just as well replace that with "Eli bait"...  Yes, the
@-syntax is addressing exactly these kind of things.


> Second, while I love the at-reader for Scribble, I think it has
> several drawbacks for nesting different syntax.
>
> • It splits up the string at newlines.  Not a huge deal -- you can
>   reassemble them, but it's a bit of a hassle.

There are two reasons is splits strings:

1. Doing that adds information about newlines (hence you know more about
   how the expression was written), and about parts that are indentation.

2. More importantly, since you can nest @-expressions, they must
   translate to separate things -- for example, in @foo{...@bar{...}...}
   you can't combine the result of (bar "...") with its surrounding,
   *unless*
   a. You assume that all values are strings
   b. You're willing to have a planeted `string-append` in the result of
  reading an @-form (and this is a big problem: both confusing, and
  depending on having a `string-append` in your language)
   c. You're willing to take the big GC hit of representing values using
  strings only (which is almost always there, except maybe when you
  use an all-literal string)


> • It expands inner @-exps unless you use |{}|.  Again, not a huge deal
>   as long as you sprinkle in some pipes.

Yes it does!  And that's a *very* important feature.

I'm guessing that if you read "|{...}|" as some "⟦...⟧" then you get the
same thing.  Only instead of choosing from a bunch of parens I wanted to
make it possible (and easy) to always find a new delimiter.


> • It removes leading white space on every line.  This is a bad thing if
>   your nested language is whitespace sensitive, like a python or
>   haskell-style syntax would be.  By reading the location data on the
>   strings you get back, you can probably still reconstruct the
>   original string, but it's still a hassle.

Again, this is a very intentional design that should work well in almost
all cases, including (and especially!) producing code for some
indentation sensitive language like python.

The thing is that without this feature, you cannot create code easily
unless you're creating the whole global code, maybe analogous to how
macros are much more convenient since they're local, and not global
source transformers.  For example, say that you want to write this
helper in your python-generating code:

(define (generate-foo^2 expr)
  @list{foo = @expr
return foo*foo})

If @-forms wouldn't have ignored indentation, you'd need a whole bunch
of complications around this:

- Can't just use @expr without adjusting it in case it has newlines

- Can't use the resulting string without adjusting its newlines to
  whatever indentation is the context in which you put it in.

- And of course you need some way to deal with your own source code mess
  resulting from indentation no longer being an indication of your
  source structure.

(Note, BTW, that @-forms do have at least two ways to "force" including
any whitespace if that's what you *really* want.)


> • After all the at-exp's work splitting and trimming the string, every
>   macro that uses at-exp output as if it were just a string has to do
>   all the work of putting it all back together into a string to use as
>   a port.  If you just get a string in the first place, none of that
>   is necessary, and the macro's interface is simpler.

I'm not sure I see what this is saying.  You can't always have a string
at the macro level because there are nested *expressions*.  At best,
you'll need to have a stream of characters with specials planted in it
which would provide the string representation of their values -- at
runtime.  If you want to use it at the macro level, without any
expressions -- ie, just handle literal strings -- then things are very
simple: the 'scribble syntax property on newlines will have a string
holding both the newline and the indentation that follows the newline.


> So I love the at-reader, I just like nestable strings better for this
> purpose, and I want nestable strings even without syntax nesting.  No
> hard feelings.  If you still think these nestable strings are a bad
> idea, I'd like to hear your reasoning.

It's your use of "nestable" here that seems to me like it's making
things bogus.  If you really want it to be nested, then this is exactly
what the scribble syntax is doing -- to an extreme.  But if all you want
is to be able to nest the string *delimiters*, than any string delimiter
pair that is not using the same character will do... but more
importantly I don't see any 

Re: [racket-users] udelim package -- more parens than you can shake a stick at

2016-09-24 Thread Alex Knauth

> On Sep 24, 2016, at 12:46 PM, William G Hatch  wrote:

> Additionally, I've long wanted more types of parens in Racket.  I
> haven't really known what I would do with them -- I use Racket's
> conventions for () and [], and have my own loose convention for {}.  But
> after seeing Jay McCarthy's wonderful talk on Remix, I am now blatantly
> stealing his idea of wrapping different paren types with a
> macro-dispatchable symbol.
> 
> So udelim has functions for extending readtables to have more parens and
> balanced string delimiters, optionally wrapped up a-la Remix.  It also
> has a stx-string->port function for convenience in making macros that
> read an alternate syntax with those nestable strings.  It has a
> metalanguage with some delimiters auto-enabled:  «» (guillemets, used as
> quotes in many European languages) as nestable, non-escaping quotes, 「」
> likewise but wrapped so 「foo bar」 reads as (#%cjk-corner-quotes "foo
> bar"), and several unicode paren types (﴾﴿, ⦓⦔, ⦕⦖, , ...) wrapped
> with a starter symbol as well.

While I like the idea of more types of parens for meaning different things, I'm 
not sure whether having a #%cjk-corner-quotes -ish macro *expected to be 
defined* for every one of them is the best way to do it, or whether we should 
be trying to think of a better way to introduce the distinction.

The way racket already does this is with a 'paren-shape syntax property, which 
you can ignore if you want to use 「」 as a normal visually distinctive paren 
type *without* needing a special macro with a weird name. 

Now the problem with 'paren-shape is that everything ignores it. But that could 
easily change if you had a syntax-parse pattern to check the property for you.

But a different problem occurs with the remix #%brackets convention. A form 
like [a b c] would match the pattern (a ...), which doesn't seem like an ideal 
default. With a 'paren-shape syntax property and a syntax-parse pattern 
expander, the pattern (a ...) could mean only match syntax lists with a 
'paren-shape property of #\( . 

Are there any alternative ways to solve these problems?

Alex Knauth

-- 
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: Taking hash of really big files

2016-09-24 Thread George Neuner
On Sat, 24 Sep 2016 07:22:55 -0700, David Storrs
 wrote:

>Aaaand, no sooner do I send this than I discover openssl/sha1.  Sorry to
>have wasted your time.
>
>On a separate topic, is it reasonable to assume that openssl/sha1 will work
>on any platform that Racket will run on?  I'm specifically thinking of
>Windows here.

openssl/sha1 falls back on file/sha1 if the openssl libraries aren't
available.
https://docs.racket-lang.org/openssl/index.html?q=sha1#%28mod-path._openssl%2Fsha1%29

The crypto/digest functions in OS libraries work incrementally, so I
would *hope* that Racket just reuses a small(ish) buffer to read the
file ... but you'd have to check the source to be sure.



>On Sat, Sep 24, 2016 at 7:10 AM, David Storrs 
>wrote:
>
>> Is there a hashing function in Racket that will operate on a file without
>> reading the entire thing into memory first?
>>
>> I need to verify that a file is unchanged after I break it into chunks and
>> then put the chunks back together again.  My plan is to take a (sha, md5,
>> ...) hash of the file before and after.  The problem is that these are gene
>> expression BAM files and they could be extremely large -- 200GB or possibly
>> even more.  Reading in the whole file won't work, and I'm not sure where to
>> go next.  I could shell out to shasum or something like that, but I wanted
>> to check if there was a Racket method first.
>>


George

-- 
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: udelim package -- more parens than you can shake a stick at

2016-09-24 Thread Dupéron Georges
Le samedi 24 septembre 2016 18:46:07 UTC+2, William G Hatch a écrit :
> Udelim is a library for adding extra parens and string delimiters to
> your language.

I can't tell how ecstatic I am about this :) . I have been wanting to add new 
parenthesis shapes for a while, but never found the time to look seriously into 
it, so thank you a lot for writing this! I was thinking about using the white 
brackets ⟦⟧, braces ⦃⦄ and parentheses ⦅⦆ are commonly used for describing 
semantics, for example.

I also like the idea of nestable string delimiters, although I rarely have use 
for it.

One note about the docs: when you write:

(open-input-string
  "«this is a string with nested «string delimiters.»  No \n escape 
interpreting.»")

the "\n" is already escaped by the "…" fed into open-input-string I think, so 
what udelim parses in that example is a raw newline, not the \ character 
followed by the n character.

Scribble supports "element transformers" which allow to change how an 
identifier is printed. Unfortunately, when the identifier appears in the first 
position of a form (like the #% wrappers), only the identifier itself can get 
styled, not the whole form. I added a few days ago a quick hack to my unstable 
scribble-enhanced library to add catch-alls which can re-style any identifier 
matching a given pattern. The hack [1] should also work for whole forms 
(untested, though), so that in scribble or scribble/lp2, @racketblock[(a ⟦b⟧ 
c)] would be properly typeset.

Georges

[1] The hack in scribble-enhanced 
https://github.com/jsmaniac/scribble-enhanced/blob/master/racket.rkt#L1012
[2] Example using the hack to nicely typeset identifiers with numeric 
superscripts like String³, which means "three strings in a row" for the xlist 
type expander 
https://github.com/jsmaniac/xlist/blob/master/scribble-enhanced.rkt

-- 
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: Taking hash of really big files

2016-09-24 Thread Matthew Flatt
Yes, the Racket distributions for Windows and Mac OS X include openssl,
so `openssl/sha1` will generally work.

At Sat, 24 Sep 2016 07:22:55 -0700, David Storrs wrote:
> Aaaand, no sooner do I send this than I discover openssl/sha1.  Sorry to
> have wasted your time.
> 
> On a separate topic, is it reasonable to assume that openssl/sha1 will work
> on any platform that Racket will run on?  I'm specifically thinking of
> Windows here.
> 
> On Sat, Sep 24, 2016 at 7:10 AM, David Storrs 
> wrote:
> 
> > Is there a hashing function in Racket that will operate on a file without
> > reading the entire thing into memory first?
> >
> > I need to verify that a file is unchanged after I break it into chunks and
> > then put the chunks back together again.  My plan is to take a (sha, md5,
> > ...) hash of the file before and after.  The problem is that these are gene
> > expression BAM files and they could be extremely large -- 200GB or possibly
> > even more.  Reading in the whole file won't work, and I'm not sure where to
> > go next.  I could shell out to shasum or something like that, but I wanted
> > to check if there was a Racket method first.
> >
> 
> -- 
> 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] Racket GUI system and multi-touch events

2016-09-24 Thread Matthew Flatt
The Racket binding for Gtk (or Cocoa or Windows) in `racket/gui`
currently does not report multi-touch events. I agree that multi-touch
events could be supported without too much difficulty, probably, and a
pull request would be welcome --- but there's nothing in place right
now.

At Sat, 24 Sep 2016 10:09:28 -0700 (PDT), Johan Liseborn wrote:
> Hi all,
> 
> Is it possible to detect and handle multi-touch events somehow in the Racket 
> GUI system? I have tried to look through the documentation, but can only find 
> mouse- and key events.
> 
> As far as I understand, the Racket GUI stuff is based on GTK+, which I 
> believe 
> is able to handle multi-touch, so in principle, I assume it should be 
> possible 
> to have touch events exposed on the Racket level...
> 
> I am currently working on a product where we are using Qt/C++, but the pain 
> of 
> C++ in this particular case is becoming unbearable to me, so I am looking for 
> alternatives, and the available Qt language bindings seem pretty limited, so 
> I 
> started looking at GTK+. I am playing with SBCL and cl-cffi-gtk, which looks 
> promising. But being a fan of Racket, I also wanted to explore that 
> possibility!
> 
> I asked this question on #racket some time ago, and got a pointer to Jays 
> work 
> with Racket on Android. I haven't been able to check that out yet, but I 
> would 
> really like something that is "mainstream Racket".
> 
> 
> Cheers,
> 
> /johan
> 
> -- 
> Johan Liseborn
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] Re: difference between function returning a string and function returning a symbol

2016-09-24 Thread George Neuner
On Sat, 24 Sep 2016 08:45:28 -0700 (PDT), Angus
 wrote:

>I am reading through Realm of Racket and saw this function in the conditions 
>chapter:
>
>(if (= (+ 1 2) 3)
>  'yup
>  'nope)
>
>So this function returns a symbol.  Will be 'yup in above case.  But 'yup
>confuses me.  I don't really understand why you would want to return 'yup.
>
>For example, I could re-write the function like this:
>
>(if (= (+ 1 2) 3)
>  "yup"
>  "nope")
>
>which now returns a string.  This is more understandable, it is simpler.
>
>Why would you want to write a function like the first one which returns 'yup?

As Matthias mentioned already, (if ...) is an expression.
https://en.wikipedia.org/wiki/Expression_(computer_science)


As to why you'd use symbols rather than strings - it typically is much
faster to compare symbols than to compare strings.  The difference
doesn't matter for a small program, but if you are storing and
comparing millions of them ...

Symbols are interned values that can be compared directly by looking
at their addresses in memory.  Every instance of a given symbol is a
pointer to the same memory location.
[This is also true for gensyms: the difference with gensyms is that a
new symbol is created each time (gensym) is called rather than
referencing an existing one.]

Static strings also are interned: when identical strings appear in the
source code, only one copy will be stored and it will be referenced in
the code in every place the string is used.

But dynamically constructed strings are not interned: every dynamic
string is a separate entity even if other identical copies exist.  So
to compare strings, in general, you need to examine their individual
characters until a difference is found.

Symbols can be compared with eq?.  Strings require using equal?  
[or string=?, or string-ci=?, etc.] which will look at the contents of
the string.

George

-- 
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: Racket GUI system and multi-touch events

2016-09-24 Thread Johan Liseborn
On Saturday, September 24, 2016 at 7:09:28 PM UTC+2, Johan Liseborn wrote:
> 
> I am currently working on a product where we are using Qt/C++, but the pain 
> of C++ in this particular case is becoming unbearable to me, so I am looking 
> for alternatives, and the available Qt language bindings seem pretty limited, 
> so I started looking at GTK+. I am playing with SBCL and cl-cffi-gtk, which 
> looks promising. But being a fan of Racket, I also wanted to explore that 
> possibility!
> 

I should also add that we are primarily targeting Linux and X for deployment.


Cheers,

/johan

-- 
Johan Liseborn

-- 
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] Racket GUI system and multi-touch events

2016-09-24 Thread Johan Liseborn
Hi all,

Is it possible to detect and handle multi-touch events somehow in the Racket 
GUI system? I have tried to look through the documentation, but can only find 
mouse- and key events.

As far as I understand, the Racket GUI stuff is based on GTK+, which I believe 
is able to handle multi-touch, so in principle, I assume it should be possible 
to have touch events exposed on the Racket level...

I am currently working on a product where we are using Qt/C++, but the pain of 
C++ in this particular case is becoming unbearable to me, so I am looking for 
alternatives, and the available Qt language bindings seem pretty limited, so I 
started looking at GTK+. I am playing with SBCL and cl-cffi-gtk, which looks 
promising. But being a fan of Racket, I also wanted to explore that possibility!

I asked this question on #racket some time ago, and got a pointer to Jays work 
with Racket on Android. I haven't been able to check that out yet, but I would 
really like something that is "mainstream Racket".


Cheers,

/johan

-- 
Johan Liseborn

-- 
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] udelim package -- more parens than you can shake a stick at

2016-09-24 Thread William G Hatch

Hello everybody,

I'm announcing another little package I've written to get comments on
it:  udelim.

Udelim is a library for adding extra parens and string delimiters to
your language.

For many years, before ever coming to racket, I've wanted nestable
string delimiters.  Especially when working with web stuff.  Now that I
have a programmable programming language, I have them.  The big push to
making them now is that lately with rash I've been working on nesting
different syntax with macros and alternative readers.  Some weeks ago I
found myself dissatisfied with the method I was using (at-expressions),
and wrote the code for balanced strings instead, and have loved it.

Additionally, I've long wanted more types of parens in Racket.  I
haven't really known what I would do with them -- I use Racket's
conventions for () and [], and have my own loose convention for {}.  But
after seeing Jay McCarthy's wonderful talk on Remix, I am now blatantly
stealing his idea of wrapping different paren types with a
macro-dispatchable symbol.

So udelim has functions for extending readtables to have more parens and
balanced string delimiters, optionally wrapped up a-la Remix.  It also
has a stx-string->port function for convenience in making macros that
read an alternate syntax with those nestable strings.  It has a
metalanguage with some delimiters auto-enabled:  «» (guillemets, used as
quotes in many European languages) as nestable, non-escaping quotes, 「」
likewise but wrapped so 「foo bar」 reads as (#%cjk-corner-quotes "foo
bar"), and several unicode paren types (﴾﴿, ⦓⦔, ⦕⦖, , ...) wrapped
with a starter symbol as well.

Some people I've talked to about this package have seemed unhappy with
my introduction of nestable strings, and my recommendation of using them
over the at-expressions for nesting different syntax, so I feel I ought
to explain that a little.  First, nestable strings are nice for other
things as well.  For instance, since they don't escape backslashes, they
are nice for constructing regexps, which famously explode into mountains
of backslashes due to being inside "" strings.  They are a great
alternative to #

Re: [racket-users] difference between function returning a string and function returning a symbol

2016-09-24 Thread Matthias Felleisen

It’s mathematics and programming terminology: 

(+ 1 1) is an expression, it computes something 

When you write 

   (define (f x) (+ x 1))

then f is a function. 




> On Sep 24, 2016, at 12:22 PM, Angus  wrote:
> 
> When you say it is an expression not a function, what do you mean?  Are you 
> saying that if the symbols represented something then it would make sense?  I 
> am a bit lost on your reply?
> 
> 
> 
> On Saturday, September 24, 2016 at 5:10:31 PM UTC+1, Matthias Felleisen wrote:
>> For the sheer pleasure of playing with symbols. (It is an expression not a 
>> function.) 
>> 
>> 
>>> On Sep 24, 2016, at 11:45 AM, Angus wrote:
>>> 
>>> I am reading through Realm of Racket and saw this function in the 
>>> conditions chapter:
>>> 
>>> (if (= (+ 1 2) 3)
>>> 'yup
>>> 'nope)
>>> 
>>> So this function returns a symbol.  Will be 'yup in above case.  But 'yup 
>>> confuses me.  I don't really understand why you would want to return 'yup.
>>> 
>>> For example, I could re-write the function like this:
>>> 
>>> (if (= (+ 1 2) 3)
>>> "yup"
>>> "nope")
>>> 
>>> which now returns a string.  This is more understandable, it is simpler.
>>> 
>>> Why would you want to write a function like the first one which returns 
>>> 'yup?
>>> 
> 
> 

-- 
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] difference between function returning a string and function returning a symbol

2016-09-24 Thread Angus
When you say it is an expression not a function, what do you mean?  Are you 
saying that if the symbols represented something then it would make sense?  I 
am a bit lost on your reply?



On Saturday, September 24, 2016 at 5:10:31 PM UTC+1, Matthias Felleisen wrote:
> For the sheer pleasure of playing with symbols. (It is an expression not a 
> function.) 
> 
> 
> > On Sep 24, 2016, at 11:45 AM, Angus wrote:
> > 
> > I am reading through Realm of Racket and saw this function in the 
> > conditions chapter:
> > 
> > (if (= (+ 1 2) 3)
> >  'yup
> >  'nope)
> > 
> > So this function returns a symbol.  Will be 'yup in above case.  But 'yup 
> > confuses me.  I don't really understand why you would want to return 'yup.
> > 
> > For example, I could re-write the function like this:
> > 
> > (if (= (+ 1 2) 3)
> >  "yup"
> >  "nope")
> > 
> > which now returns a string.  This is more understandable, it is simpler.
> > 
> > Why would you want to write a function like the first one which returns 
> > 'yup?
> > 


-- 
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] difference between function returning a string and function returning a symbol

2016-09-24 Thread Matthias Felleisen

For the sheer pleasure of playing with symbols. (It is an expression not a 
function.) 


> On Sep 24, 2016, at 11:45 AM, Angus  wrote:
> 
> I am reading through Realm of Racket and saw this function in the conditions 
> chapter:
> 
> (if (= (+ 1 2) 3)
>  'yup
>  'nope)
> 
> So this function returns a symbol.  Will be 'yup in above case.  But 'yup 
> confuses me.  I don't really understand why you would want to return 'yup.
> 
> For example, I could re-write the function like this:
> 
> (if (= (+ 1 2) 3)
>  "yup"
>  "nope")
> 
> which now returns a string.  This is more understandable, it is simpler.
> 
> Why would you want to write a function like the first one which returns 'yup?
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[racket-users] difference between function returning a string and function returning a symbol

2016-09-24 Thread Angus
I am reading through Realm of Racket and saw this function in the conditions 
chapter:

(if (= (+ 1 2) 3)
  'yup
  'nope)

So this function returns a symbol.  Will be 'yup in above case.  But 'yup 
confuses me.  I don't really understand why you would want to return 'yup.

For example, I could re-write the function like this:

(if (= (+ 1 2) 3)
  "yup"
  "nope")

which now returns a string.  This is more understandable, it is simpler.

Why would you want to write a function like the first one which returns 'yup?

-- 
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: Taking hash of really big files

2016-09-24 Thread David Storrs
Aaaand, no sooner do I send this than I discover openssl/sha1.  Sorry to
have wasted your time.

On a separate topic, is it reasonable to assume that openssl/sha1 will work
on any platform that Racket will run on?  I'm specifically thinking of
Windows here.

On Sat, Sep 24, 2016 at 7:10 AM, David Storrs 
wrote:

> Is there a hashing function in Racket that will operate on a file without
> reading the entire thing into memory first?
>
> I need to verify that a file is unchanged after I break it into chunks and
> then put the chunks back together again.  My plan is to take a (sha, md5,
> ...) hash of the file before and after.  The problem is that these are gene
> expression BAM files and they could be extremely large -- 200GB or possibly
> even more.  Reading in the whole file won't work, and I'm not sure where to
> go next.  I could shell out to shasum or something like that, but I wanted
> to check if there was a Racket method first.
>

-- 
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] Taking hash of really big files

2016-09-24 Thread David Storrs
Is there a hashing function in Racket that will operate on a file without
reading the entire thing into memory first?

I need to verify that a file is unchanged after I break it into chunks and
then put the chunks back together again.  My plan is to take a (sha, md5,
...) hash of the file before and after.  The problem is that these are gene
expression BAM files and they could be extremely large -- 200GB or possibly
even more.  Reading in the whole file won't work, and I'm not sure where to
go next.  I could shell out to shasum or something like that, but I wanted
to check if there was a Racket method first.

-- 
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] pkg collections: packages installed, although setup reported errors

2016-09-24 Thread Daniel Bastos
​%raco pkg install collections
Resolving "collections" via
https://download.racket-lang.org/releases/6.6/catalog/
Resolving "collections" via https://pkgs.racket-lang.org
Downloading repository git://github.com/lexi-lambda/racket-collections
The following uninstalled packages are listed as dependencies of
collections:
   curly-fn
   functional-lib
   match-plus
   static-rename
   unstable-list-lib
   functional-doc
Would you like to install these dependencies? [Y/n/a/c/?] Y
00: Resolving "curly-fn" via
https://download.racket-lang.org/releases/6.6/catalog/
01: Resolving "functional-lib" via
https://download.racket-lang.org/releases/6.6/catalog/
02: Resolving "match-plus" via
https://download.racket-lang.org/releases/6.6/catalog/
03: Resolving "static-rename" via
https://download.racket-lang.org/releases/6.6/catalog/
04: Resolving "unstable-list-lib" via
https://download.racket-lang.org/releases/6.6/catalog/
00: Resolving "curly-fn" via https://pkgs.racket-lang.org
02: Resolving "match-plus" via https://pkgs.racket-lang.org
03: Resolving "static-rename" via https://pkgs.racket-lang.org
01: Resolving "functional-lib" via https://pkgs.racket-lang.org
04: Resolving "unstable-list-lib" via https://pkgs.racket-lang.org
Resolving "functional-doc" via
https://download.racket-lang.org/releases/6.6/catalog/
Resolving "functional-doc" via https://pkgs.racket-lang.org
Downloading repository git://
github.com/lexi-lambda/racket-curly-fn?path=curly-fn
Downloading repository git://
github.com/lexi-lambda/functional?path=functional-lib
Downloading repository git://github.com/lexi-lambda/racket-match-plus.git
Downloading repository git://github.com/lexi-lambda/racket-static-rename.git
Downloading repository git://github.com/racket/unstable-list-lib
Using cached14747234901474723490540 for git://
github.com/lexi-lambda/functional?path=functional-doc
The following uninstalled packages are listed as dependencies of curly-fn:
   curly-fn-doc
   curly-fn-lib
Would you like to install these dependencies? [Y/n/a/c/?] a
01: Resolving "curly-fn-doc" via
https://download.racket-lang.org/releases/6.6/catalog/
01: Resolving "curly-fn-doc" via https://pkgs.racket-lang.org
Resolving "curly-fn-lib" via
https://download.racket-lang.org/releases/6.6/catalog/
Resolving "curly-fn-lib" via https://pkgs.racket-lang.org
Using cached14747234881474723488620 for git://
github.com/lexi-lambda/racket-curly-fn?path=curly-fn-doc
Using cached14747234881474723488620 for git://
github.com/lexi-lambda/racket-curly-fn?path=curly-fn-lib
The following uninstalled packages are listed as dependencies of
curly-fn-doc
and they will be installed:
   namespaced-transformer-doc
   namespaced-transformer-lib
   scribble-code-examples
01: Resolving "namespaced-transformer-doc" via
https://download.racket-lang.org/releases/6.6/catalog/
04: Resolving "namespaced-transformer-lib" via
https://download.racket-lang.org/releases/6.6/catalog/
01: Resolving "namespaced-transformer-doc" via https://pkgs.racket-lang.org
04: Resolving "namespaced-transformer-lib" via https://pkgs.racket-lang.org
Resolving "scribble-code-examples" via
https://download.racket-lang.org/releases/6.6/catalog/
Resolving "scribble-code-examples" via https://pkgs.racket-lang.org
Downloading repository git://
github.com/lexi-lambda/namespaced-transformer?path=namespaced-transformer-doc
Using cached14747235081474723508723 for git://
github.com/lexi-lambda/namespaced-transformer?path=namespaced-transformer-lib
Downloading repository git://github.com/AlexKnauth/scribble-code-examples
The following uninstalled packages were listed as dependencies
and they were installed:
 dependencies of collections:
   curly-fn
   functional-lib
   match-plus
   static-rename
   unstable-list-lib
   functional-doc
 dependencies of curly-fn:
   curly-fn-doc
   curly-fn-lib
 dependencies of curly-fn-doc:
   namespaced-transformer-doc
   namespaced-transformer-lib
   scribble-code-examples
raco setup: version: 6.6
raco setup: platform: win32\x86_64 [3m]
raco setup: installation name: 6.6
raco setup: variants: 3m
raco setup: main collects: c:\users\daniel\emacs\Racket\collects
raco setup: collects paths:
raco setup:   C:\Users\Daniel\AppData\Roaming\Racket\6.6\collects
raco setup:   c:\users\daniel\emacs\Racket\collects
raco setup: main pkgs: c:\users\daniel\emacs\Racket\share\pkgs
raco setup: pkgs paths:
raco setup:   c:\users\daniel\emacs\Racket\share\pkgs
raco setup:   C:\Users\Daniel\AppData\Roaming\Racket\6.6\pkgs
raco setup: links files:
raco setup:   c:\users\daniel\emacs\Racket\share\links.rktd
raco setup:   C:\Users\Daniel\AppData\Roaming\Racket\6.6\links.rktd
raco setup: main docs: c:\users\daniel\emacs\Racket\doc
raco setup: --- updating info-domain tables ---
raco setup: updating: c:\users\daniel\emacs\Racket\share\info-cache.rktd
raco setup: updating:
C:\Users\Daniel\AppData\Roaming\Racket\6.6\share\info-cache.rktd
raco setup: --- pre-installing collections ---
raco setup: --- installing foreign libraries ---
raco