News for hackers. Stuff that matters.
Re:Pollen: the book is a program by whalesalad on Monday September 25, 2017 @10:23PM (#15335691)
Is the ‘lozenge’ a Racket-ism or is it unique to this project? I understand the logic around using a character that’s hardly used in regular writing – to avoid escaping – but it seems as though it would be hard to use in practice.
Re:Pollen: the book is a program by blevs on Monday September 25, 2017 @10:33PM (#15335723)
It's unique to Pollen. In my experience I just remapped a key to insert it and forgot about it.
Re:Pollen: the book is a program by gyrgtyn on Tuesday September 26, 2017 @01:14AM (#15336375)
I might be remembering wrong since it's been a while since I went through the tutorial, but I think you can use any character you want for the delimiter because lisp. He just likes the lozenge.
Re:Pollen: the book is a program by zeamaize on Monday September 25, 2017 @10:31PM (#15335714)
Yeah, even just <> would be better.
Re:Pollen: the book is a program by kuschku on Tuesday September 26, 2017 @04:22AM (#15337047)
It’s a racket-ism to use unicode characters wherever possible, yes.

Racket by default also doesn’t use the keyword "lambda", but instead uses "λ".

You can obviously use something different, if you want to, but the default, and recommended solution, is using unicode characters.

As Racket is frequently written in the DrRacket IDE, this also makes sense.

Re:Pollen: the book is a program by Xophmeister on Tuesday September 26, 2017 @05:31AM (#15337300)
> Racket by default also doesn’t use the keyword "lambda", but instead uses "λ".

I'm not sure that's true:

    Welcome to Racket v6.10.1.
    > (define foo (lambda (x) (+ x 1)))
    > (foo 1)
    2
Re:Pollen: the book is a program by kuschku on Tuesday September 26, 2017 @06:06AM (#15337429)
As I mentioned, both are possible, but (λ ...) is strictly preferred.
Re:Pollen: the book is a program by tonyg on Tuesday September 26, 2017 @10:38AM (#15339031)
This is certainly not the case. Some, but by no means all, of the core maintainers prefer the unicode glyph, but the vast majority of the code uses a spelled-out lambda.

In my current checkout of the codebase, I see the following:

    ~/src/racket/racket/share/pkgs$ ag lambda **/*.rkt | wc -l
    1041

    ~/src/racket/racket/share/pkgs$ ag λ **/*.rkt | wc -l
    163
Note also consistent usage of spelled-out lambda in the Racket style guide, https://docs.racket-lang.org/style/.
Re:Pollen: the book is a program by tonyg on Friday September 29, 2017 @12:30PM (#15366723)
I made a mistake, believing that `ag` could handle extended glob syntax. The real numbers are:

    ~/src/racket/racket/share/pkgs$ find . -iname '*.rkt' | xargs ag lambda | wc -l
    33589

    ~/src/racket/racket/share/pkgs$ find . -iname '*.rkt' | xargs ag λ | wc -l
    16722
Glyph λ is more common than I thought, but still heavily outnumbered by spelled-out lambda.
Re:Pollen: the book is a program by sigzero on Tuesday September 26, 2017 @12:31PM (#15340199)
I am using lambda as I hate small symbols. I have to stop and process what λ is.