[racket] typed racked questions
See below.
On Mon, Apr 30, 2012 at 10:57 AM, Bikal Gurung <gbikal at gmail.com> wrote:
> Hi Ray,
>
> Are you using this in your day to day programming?
>
Most of my home programming is in Racket.
Work is split 75%-10%-15% Scala, R and Racket respectively.
> What sort of projects do you use this for ?
>
At work I use Racket for large scripts and data massaging and
manipulations. Most of to get things collected and shaped up in a form to
load it into R. :)
At home, I tend to average one multi-million dollar idea a quarter, which
are explored and abandoned on a regular basis without making a dime. I
find this exercise in futility endlessly fun and Racket is great for this
sort hamster wheel spinning. The quicker you can explore, the sooner the
realization of just how brain dead that brilliant idea really was is
achieved.
Do you use untyped racket in the beginning, i.e when you are experimenting
> with ideas/algorithms and then migrate to typed racket ?
>
When I sit to do something there are only two possibilities Scala or
(typed) Racket. For any sort of quick exploration I use TRacket. Typed
Racket is so light weight to use, what code I write is typed. #lang
typed/racket/base first thing, every time, in every new module without
hesitation. In other words I do not code in Racket and then later go back
on type the code. Too easy to just use TR from keystroke one.
Awhile back I wrote some code to generate a Formal Concept Analysis lattice
for around 100K Amazon genre ebooks with various attribution. This was the
only time I've written a modest, yet nontrivial program twice, once in TR
and once in Scala.
The first effort was from the algo's paper/publication to TR. The second
effort was in Scala. I distinctly remember expecting the Scala effort to
go pretty fast, as after all I'd already written it once.
Unexpectedly, the Scala effort took more time than I thought it should. It
was not a Scala issue per se, but an OO-centric language with support for
functional idioms versus a Functional-centric languge with support for OO
idioms. I much prefer the later.
Data in structures. Apply functions, transform data, repeat until expected
output is reached. Sometimes its just hard to keep mapping and jamming
things relentlessly into classes and it is entirely too easy to paint
yourself into a corner with your OO structure.
Also with TypedRacket I find I get more meta-level in my programming in a
Haskell kind of way than when I did regular Racket programming, i.e., pass
more functions, compose more functions etc. Typed Racket allows one to
just keep layering the abstractions without losing the plot.
Things like ...
(: map/try-or-else (All (T U) (Try T) (T -> U) (exn -> U) -> (Try U)))
Now Scala is hands down a BRILLIANT work in language design. My admiration
is unbounded. And I use it willing and often, especially at work, on all
kinds of stuff.
Have you used typed racket when developing web applications with the racket
> web libs?
>
Never really had a need to. But when I need it, it is good to know that
Jay, as posted in this thread, is migrating the web code to TR.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20120430/e8c6d195/attachment-0001.html>