Re: [racket-users] Wishlist for regexen: x mode, named captures, embeddable regexn

2019-02-12 Thread Thomas F. Burdick



On February 12, 2019 6:48:49 PM GMT+01:00, David Storrs 
 wrote:
>Actually, that raises a question:  Does Racket use the pcre library or
>does it reinvent the wheel?  If it uses pcre then why not make all the
>features available?

My goodness. Perl isn't the One True Way of regular expressions, nor is pcre 
even the canonical Perl-style regexp implementation.

That said, if you've invested a lot of effort in learning the corners of Perl 
re, I can understand wanting to have a compatible system available. It's 
powerful and well known. The good news is that one of if not the best 
implementation of Perl-style re exists in Lisp, in cl-ppcre. It was at one 
point the fastest by a factor of 2. These days I think Perl and pcre have 
improved their performance to basically catch up.

Porting it to Racket wouldn't be especially difficult. Anyone with an interest 
in Racket and an attachment to Perl-style regexp should just do it. And update 
its interface. Racket should have an even more convenient integration than CL 
(library but why not also a lang).

-- 
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] Python's append vs Racket's append and helping novices understand the implications

2019-02-02 Thread Thomas F. Burdick



On February 2, 2019 7:28:12 AM GMT+01:00, Alex Harsanyi 
 wrote:
>Someone asked recently for help on Reddit[1] with a Racket performance 
>issue.
>The problem was they they were constructing a large list by appending
>many
>short lists repeatedly; their code was calling `(set!  result (append
>result
>shortList))` in a loop and this was slow (unsurprisingly.)

In addition to the general list-processing advice they were likely given, I 
suspect someone coming from Python might appreciate tconc structures. SRFI 117 
is one attempt at fleshing this out into a contemporary API. But just classic 
tconc and lconc are pretty useful to know and have at your fingertips.

-Thomas

-- 
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] Collections and data structures wishlist?

2019-01-25 Thread Thomas F. Burdick



On January 25, 2019 8:33:09 PM GMT+01:00, Jack Firth  
wrote:
>
>Due to the kind of data that would go in tuples - namely, a fixed-sized
>heterogeneous collection of values - a function probably *shouldn't*
>use
>map and filter to process tuples. A program that calls filter on an
>x-y-z
>coordinate tuple is likely incorrect and not what the programmer
>intended.

Funny you should pick that as an example. I work in a CAD environment where 
points are two-item lists, and polygon outlines are lists of points. You'd be 
surprised how often it's useful to use ordinary list functions on points.

-- 
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] hackernews

2018-12-28 Thread Thomas F. Burdick



On December 27, 2018 10:47:24 PM GMT+01:00, Stephen De Gabrielle 
 wrote:
>I always wanted to ask if the prototype object model is a good idea or
>bad idea?

The most fun I ever had making GUIs was in Garnet, a library for CMU CL which 
combined prototype objects and a system where slots we're computed from 
formulas (a forerunner to FRP). The combination was just fantastic, productive, 
and made the code very easy to follow.

-- 
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's the next book, after HtDP SICP and EoPL?

2018-12-01 Thread Thomas F. Burdick
It sounds like you're drawn in the direction of type theory. Lucky for you, 
there's a new "Little" book out that sounds perfect for you, "The Little Typer" 
by Friedman and Christiansen. It won't help with the jargon at all, but it 
covers the subject really well, and after reading it you should be able to 
easily figure out the jargon. And it does so in Pie, a language hosted on 
Racket.

After The Little Typer, you'll probably still be hungry. I'd recommend 
following it with the Coq'Art. It's free in French, and available as a physical 
book in English. (If you can speak French, also check out the recordings of the 
lectures that Xavier Leroy is giving at the Collège de France. His "from System 
F to the Calculus of Constructions" lesson was amazingly clear and 
understandable)


On December 1, 2018 10:37:32 AM GMT+01:00, Chansey  wrote:
>Dear all,
>
>This question has little to do with Racket, please forgive me if it's
>not 
>suitable for posting here.
>
>After reading Paul Graham's book "Hackers & Painters", I became
>fascinated 
>with Lisp, so I chose Racket for learning Lisp.
>Now, I have finished reading the trilogy of the scheme: HtDP, SICP, and
>
>EoPL (100% SICP exercise finished, 90% EoPL exercise finished). 
>
>Then, what's the next?
>
>In fact, before learning Lisp, I have been using some programming 
>languages, such as C, Java, Javascript, Erlang, Haskell, etc.
>I also have some knowledge of computer foundation, such as computer 
>architecture, os, computation theory, compiler, network, database, web 
>etc...
>Learning Lisp taught me a lot of important concepts in programming 
>languages, such as generative recursion, y-combinator, stream, cps, 
>type-check/infer, etc...
>
>But in some programming forums (eg: Lisp/Haskell forums), there are a
>lot 
>of jargons, which still confuse me, especially about type systems, such
>as:
>What is Existential type? 
>What is Dependent type?
>What is Refinement type? (Note: I found typed-racket support this 
>experimental features)
>What is Intersection type? (Note: typed-racket support union type, but 
>what's intersection type?)
>What is Rank-N type?
>What is System F?
>What is Type reconstruction?
>What is Algebraic data type (ADT)? (What's the difference between sum
>type 
>and union type? Why the type "B -> A" is exponential type?What is the 
>relationship between ADT and cartesian closed category? What is
>cartesian 
>closed category?)
>What is Abstract interpretation?
>What is Partial Evaluation? (not partial application)
>What is Curry–Howard correspondence? (such as "propositions as types")
>What is Lambda cube?
>...
>
>As you can see, most of these jargons involve type systems.
>
>Yes, EoPL does have some basic knowledge of type systems.
>I even implemented the AlgorithmW of Hindley–Milner in Racket, but I
>still 
>don't understand these jargons above...
>
>Someone told me that if you want to learn type system, you have to
>learn 
>Haskell.
>In fact, I have read Graham Hutton's "Programming in Haskell".
>I can write Haskell, I can write parser combinator, I understand 
>functor/applicative/monad/,... But I still can't understand the
>sentence:
>"A monad is just a monoid in the category of endofunctors, what's the 
>problem?"
>What? What is endofunctors? what is category,...
>That means I don't really understand monad...
>
>Other people said: if you really want to understand type systems, you
>have 
>to understand Lambda cube?
>OK, what is Lambda cube and how to learn it?
>
>Of course, in addition to the type system, there are many other
>programming 
>concepts that I did not understand, such as communicating sequential 
>processes (CSP), actor model, π-calculus, denotational semantics,
>etc...
>
>I am deeply aware that I lack systematic programming language
>knowledge.
>So can you recommend some books about these advanced topics?
>I've searched some books on Amazon:
>Types and Programming Languages
>Type Theory and Formal Proof
>Concepts, Techniques, and Models of Computer Programming
>
>Since I am self-taught now, I don't know which book I should read
>first, or 
>there is other better one to recommended?
>Come back to the main topic: What's the next book, after HtDP SICP and
>EoPL?
>
>Thanks in advance.
>
>Regards,
>Chansey
>
>-- 
>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.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

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