Re: [racket-users] fluent: unix style pipes and lambda shorthand to make your code more readable

2021-03-12 Thread Sorawee Porncharoenwase
> > There is probably a solution to this problem. I'm just not seeing it yet. > Yeah, syntax parameters are not really relevant here. A way to make rename-in work is to define-syntax the “token” to a dummy syntax transformer, and change your macro to recognize the token using ~literal. Here’s an

Re: [racket-users] fluent: unix style pipes and lambda shorthand to make your code more readable

2021-03-12 Thread Roger Keays
On Fri, Mar 12, 2021 at 04:31:07AM -0800, schle...@gmail.com wrote: > I am not sure about the technical details, but would it be possible to rename > those identifiers with?: (require (rename-in fluent [→ ~>] [→→ ~~>])) > I think if you define those arrows as syntax parameters they could be

Re: [racket-users] fluent: unix style pipes and lambda shorthand to make your code more readable

2021-03-12 Thread schle...@gmail.com
I am not sure about the technical details, but would it be possible to rename those identifiers with?: (require (rename-in fluent [→ ~>] [→→ ~~>])) I think if you define those arrows as syntax parameters they could be renamed, but I don't know whether that is the "right" way to do it in

Re: [racket-users] fluent: unix style pipes and lambda shorthand to make your code more readable

2021-03-11 Thread Roger Keays
> > > It might be nice to use ~> and ~>> (or |> and |>> or choose your own) as > > > infix > > > to avoid clashing with >. I'm thinking about changing the default operators to ~> and ~~> and making the unicode versions available using (require fluent/unicode). I actually prefer the long arrow

Re: [racket-users] fluent: unix style pipes and lambda shorthand to make your code more readable

2021-03-11 Thread Roger Keays
On Wed, Mar 10, 2021 at 09:44:15AM -0500, Matthias Felleisen wrote: > > Hi, are you aware of rash? Different goals but perhaps a merger of your > package with rash would give us a heck of a new shell :-) Hey, I took a look at rash, but racket (with fluent) turned out to be better suited to

Re: [racket-users] fluent: unix style pipes and lambda shorthand to make your code more readable

2021-03-10 Thread Hendrik Boom
On Wed, Mar 10, 2021 at 08:23:46PM +0700, Roger Keays wrote: > > I've been using the Clojure-like threading package for a while now and this > > has > > some nice advantages that are mentioned in the docs, like blending the first > > arg > and last arg >> variants easily in a sequence. > > > >

Re: [racket-users] fluent: unix style pipes and lambda shorthand to make your code more readable

2021-03-10 Thread Roger Keays
there is a proposal to add it to javascript too: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Pipeline_operator On Wed, Mar 10, 2021 at 03:28:12AM +0800, Tim Lee wrote: > > Using *fluent*, the same racket code can be written according to the UNIX > > philosophy: >

Re: [racket-users] fluent: unix style pipes and lambda shorthand to make your code more readable

2021-03-10 Thread Roger Keays
> This is very cool.  You might take a look at the `threading` module for > additional ideas: https://docs.racket-lang.org/threading/index.html Yeh, the threading macro is what took me down this rabbit-hole. But I wanted an infix operator, mostly because of my pernicious unix habit. I found

Re: [racket-users] fluent: unix style pipes and lambda shorthand to make your code more readable

2021-03-10 Thread Roger Keays
> I've been using the Clojure-like threading package for a while now and this > has > some nice advantages that are mentioned in the docs, like blending the first > arg > and last arg >> variants easily in a sequence. > > How does fluent manage this infixing from a (require ...) rather than a

Re: [racket-users] fluent: unix style pipes and lambda shorthand to make your code more readable

2021-03-09 Thread Daniel Prager
Impressive! How does fluent manage this infixing from a (require ...) rather than a #lang? I've been using the Clojure-like threading package for a while now and this has some nice advantages that are mentioned in the docs, like blending the first arg > and last arg >> variants easily in a

Re: [racket-users] fluent: unix style pipes and lambda shorthand to make your code more readable

2021-03-09 Thread Tim Lee
> Using *fluent*, the same racket code can be written according to the UNIX > philosophy: > > ("data.txt" > file->lines >> filter (line : line > string-contains? > "active") >> map (line : line > string-split > list-ref 4) > > remove-duplicates > sort) This reminds me of Clojure's

Re: [racket-users] fluent: unix style pipes and lambda shorthand to make your code more readable

2021-03-09 Thread David Storrs
This is very cool. You might take a look at the `threading` module for additional ideas: https://docs.racket-lang.org/threading/index.html On Tue, Mar 9, 2021 at 10:20 AM Roger Keays wrote: > Hi all, > > I recently publish a new package called *fluent* which adds some syntax > enhancements to

Re: [racket-users] fluent: unix style pipes and lambda shorthand to make your code more readable

2021-03-09 Thread Jay McCarthy
I like this a lot! Great job! -- Jay McCarthy Associate Professor @ CS @ UMass Lowell http://jeapostrophe.github.io Vincit qui se vincit. On Tue, Mar 9, 2021 at 10:20 AM Roger Keays wrote: > > Hi all, > > I recently publish a new package called *fluent* which adds some syntax > enhancements to

[racket-users] fluent: unix style pipes and lambda shorthand to make your code more readable

2021-03-09 Thread Roger Keays
Hi all, I recently publish a new package called *fluent* which adds some syntax enhancements to Racket. Links and README below. Let me know what you think... Roger https://pkgs.racket-lang.org/package/fluent https://github.com/rogerkeays/racket-fluent/ # fluent UNIX style pipes and a lambda