[racket-users] Racket News - Issue 48

2021-03-22 Thread Paulo Matos
Hi all,

Issue 48 of RN has landed... 
https://racket-news.com/2021/03/racket-news-issue-48.html

Enjoy it, if possible with a strong espresso!

Keep Racketing,

Paulo Matos

-- 
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/0390a370-b045-419f-9fa8-eb9c27c628f7n%40googlegroups.com.


[racket-users] Language oriented racket

2021-03-22 Thread Jos Koot
Racket has nice features to implement languages.
This is very useful, for a programmer should allow his/her users to speak
or write in their own languages. I was aware of this already some 50 years
ago when writing systems for quantum mechanical calculations (NB using
fortran, not an easy tool to implement a new language).

However, I see packages that implement languages for Racket programmers.
For example  fluent: ~> syntax and infix notation
(I must admit that I did the same some times, what in my humble opinion is
a mistake).

I think Racket programmers should talk or write Racket.
I think for a student learning Racket or any language alike,
it takes little effort to get acquainted with prefix notation and
parentheses.
For myself this notation is very helpful for it avoids mistakes with regard
to precedence rules.
Furthermore, the DrRacket GUI provides very nice tools to check parentheses.
(and much more)

JMHO, 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/CAL6KNi1s0oataXQkq4LVx1dWXdBaDJdWfg_wLNxnE-Q3%2BLTPog%40mail.gmail.com.


[racket-users] fluent: ~> syntax and (rename-in) support

2021-03-22 Thread Roger Keays
Based on feedback from this community, I've updated the default syntax for the 
fluent package to use ~> and ~~> for function composition. This way, there is 
no conflict with the > operator. Here is some example code:

(require fluent)
("hello world" ~> string-split ~~> map string-upcase) ;; '("HELLO" "WORLD")

You can now use (rename-in) to change the syntax if you don't like the defaults:

(require (rename-in fluent (~> >) (~~> >>)))
("hello world" > string-split >> map string-upcase) ;; '("HELLO" "WORLD")

There are also two built-in alternative syntaxes, fluent/short (which uses > 
and >>) and fluent/unicode (which uses → and ⇒):

(require fluent/short)
("hello world" > string-split >> map string-upcase) ;; '("HELLO" "WORLD")

(require fluent/unicode)
("hello world" → string-split ⇒ map string-upcase) ;; '("HELLO" "WORLD")

See the README for help entering unicode characters.

Thanks for the feedback and helping me improve this package. I'm not planning 
to make any further changes at this stage, so it should be safe to start using 
this package if you like.

github: https://github.com/rogerkeays/racket-fluent
package page: https://pkgs.racket-lang.org/package/fluent

-- 
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/sigid.2715e859bd.20210322130142.GA3098%40papaya.papaya.