> Hi everyone, I'm looking to get some opinions on code style.
>
> Specifically, I like to write my code in a top-down.
>
> What I mean by that is that within a file the highest-level functions sit
> at the top, and are implemented in terms of lower-level functions further
> down.
You could write
>Specifically, I like to write my code in a top-down.
>
>What I mean by that is that within a file the highest-level functions sit
>at the top, and are implemented in terms of lower-level functions further
>down.
>
>The idea is that through sensible naming, a reader should be able to stop
>readi
Gregg and Gary,
I understand where you are coming from. Indeed, Maturana [0] is on your
side of the debate. Since even the philosophers can't agree, I doubt we
will find a common ground.
Unfortunately, I've decided to take on the task of documenting the
Clojure internals because, yaknow, *I* don
>Judge Alsup did not conflate patent and copyright law. With regards to
> asserting copyright in the Java API he concludes: ...[snip]...
Good point. I was wrong.
The higher court ruled that Oracle DID have a copyright claim.
I'm not a lawyer but I've read 3 books on intellectual property law.
Forgy's RETE is a self-modifying data structure.
How is this handled in Clojure?
Tim Daly
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - p
Andy,
Yes, I'm aware of those other efforts.
ClojureScript is attacking a different platform so it is clear that
some things aren't going to work.
Specifically for Clojure, is there a clear line between the non-Java
language and the "compatiblity at the Java API level"? A lot of
Clojure functio
> I think we all know this, but just to make sure the point is clear (in some
> of the dicussion here, it doesn't seem that it is), the alternatives are
> not only:
>
> (a) Source code with docstrings (or fancy formatted docstrings with links,
> etc.) and sparse comments, but no other explanato
With respect to "documentation" of open source software...
"You keep using that word. I don't think it means what you think it
means." -- "The Princess Bride"
The notion that "reading the code" is the ultimate truth for
"documentation" is based on a misunderstanding at so many levels it is
hard t
> For example, did you know that
> the book/literate program "Physically Based Rendering" recently won a
> Scientific and Technical Academy Award? (Yes, that's right, a literate
> program won an Academy Award -- the "Hollywood movie" kind.)
An awesome book, b
> PS. Just to be clear, my purpose is neither to attack nor to defend LP,
> just to get clear about exactly what it is, what its presuppositions are,
> what its implications are, etc.
I also do not want to get into defending LP yet again. But I do think
you might have missed the key point by focus
Gregg,
I realize that literate programming isn't going to catch on in the
Clojure community any time soon. LP shared the "epiphany" feature
of Lisp. That is, you don't "get it" until the "AH HA!" moment,
and then you wonder why anyone programs any other way. You can't get
the Lisp AH HA! without w
> Here's a concrete best-practices suggestion: follow the lead of Haskell and
> other functional languages in using x, y, z as generic type names, and x:xs
> (where 'xs' is plural of x) to indicate a list of xs; for seqs, maybe
> x::xs. So I would rewrite your example to something like: "[x y::ys
James,
> 3. I want to know how the library works internally.
>
> The third use-case is the only time literate programming makes sense, but
> it's also the least used of the three. I'm also not hugely convinced it's
> actually much use - whenever I read literate programs in Clojure I find
> mysel
Implement the nand function, simulate registers using nand,
and you can do anything since nand is universal. Or, if you
really want to get primitive write a turing tape processor.
Pain all the way down :-)
Tim Daly
--
--
You received this message because you are subscribed to the Google
Groups
In my opinion it is probably a mistake to focus on the language
features in the beginning. They will be meaningless.
My approach would be to ask them to write a simple chess program.
They have to learn to do conditional statements, iteration, work
with data structures, and do I/O. They have to par
Or you could use (*cough*) a literate (*cough*) programming (*cough*)
style :-)
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please
It might be useful to set up a website similar to quicklisp for clojure.
I've found quicklisp to be very effective as it not only delivers code
but resolves dependencies to other packages automatically.
Tim Daly
--
--
You received this message because you are subscribed to the Google
Groups "Cl
> As far as I can tell, neither your script nor org-babel mode address the
> third prong of literate programming as defined by Knuth, specifically, the
> extensive cross-indexing, letting you know not only where functions are
> defined, but also where defined functions are used. Why do you not
> c
> Again. I'm with you on this one, Tim. Fear not. You aren't the only crazy
> Clojure programmer putting the LP bug in people's ears. I must say, your
> work on creating a literate version of the Clojure source was really
> amazing. Any plans for maintaining it in the future as new Clojure relea
Look for Charles Forgy and the RETE algorithm.
It is the basis for most expert systems.
Tim Daly
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are mo
One technique I've used in the past for debugging is to open a UDP
port as a log stream and print messages to that stream. These messages
can be read at any time by a telnet connection to that port.
Since UDP packets that are not read just get dropped this is equivalent
to writing to /dev/null exc
>Stuart Halloway said in his video Clojure in the Field (
>http://www.infoq.com/presentations/Clojure-tips) from March 1, 2013 (I
>think): "I don't feel the absence of a debugger because I've learnt enough
>that I don't ever need a debugger." I am very intrigued by that statement.
>What does he
>Hi. I've been meaning to ask (all of)you, how do you get moral support? How
>do you put yourself into that mood so that you're happy/willing to program?
>What motivates you to do it? Is it the people you surround yourself with or
>the financial support? Are they enough to subconsciously motivate y
I believe that cash payments are forbidden by law in the listed
countries. The contest will make cash payments. I know that
Lisp In Summer Projects has no problem with people from Italy,
Brazil, or other listed countries.
Tim Daly
--
--
You received this message because you are subscribed to th
...0? :-)
Tim Daly
--
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this gr
>> > but, in a nutshell, is literate programming:
>>
>> >
>> > 1. put possibly-out-of-order specially-marked (with an id) code snippets
>> >throughout your doc,
>> > 2. also put an *ordered* listing of all the id's somewhere in your doc,
>> > 3. use tools to find that ordered list of ids, then
>> The word "explain" is semantically the same as "document" to most
>> people but not to the programmer community.
>>
>
>FWIW, I think the situation is closer to precisely the opposite. If I ask
>you to document what you do today, what will you do? Hold on to your
>receipts? Log mileage in your ca
>Hm. Maybe I should ask this off-list, but, in a nutshell, is literate
>programming:
I feel this is an "on-list" topic (although it is obvious that I'm an
edge-case fanatic). Clojure is trying to introduce a lot of new ideas
that change how programming is done. It is an edge-case community.
I'm
>> TL:DR
>>
>> Write ideas for humans around your code or it will die.
>> Explain, don't document.
>>
>>
>Excellent post, Tim. Thanks for writing it all up.
>
>Though, I tend to think that "documenting" is the same as "explaining"
>(what good is documentation if it doesn't exp
TL:DR
Write ideas for humans around your code or it will die.
Explain, don't document.
Excellent blog post. However, you write
Passing It Over
At some point you may become disinterested in maintaining your
project. Maybe you've moved on to a new job or no longer use
> Now it's been a long while since I wrote code to put food on the table -
> but back then if I saw C or C++ code written like this I would describe it
> as obfuscated - the sort of thing I would expect to see in the (now
> defunct?) annual obfuscated C competition. It's concise and rather cleve
>> The average career length of a programmer is 8 years in the US (2003 survey)
>> and
>> the main reason invoked by those that left is their perceived lack of
>> productivity.
>
>TL;DR: Opinions about unproductive older programmers is ahead of the science.
I've been programming every day for
>Getting back to the immediate question, determining "who calls whom"
>can be a problem in dynamic languages such as Clojure and Ruby. So,
>the programmer may need to provide hints. Alternatively, it may be
>possible to get this information by monitoring program operation in
>a testing or limited
One thing that is very useful is an answer to the question "Who calls
function X?".
A literate program using Latex can generate this. By adding
\calls{me}{somebody}
at the head of each function it adds two entries in the index,
one of the form
me
calls somebody
and one of the form
s
Try literate programming. If you are going to write a program it will
be read many times. Try to write as though you were writing a book.
Make the code be just a "reduction to practice" of the words in the
book. The idea of literate programming is that you write for other
people and, incidentally,
The clojure.pamphlet file is latex source code which is plain text.
Tim Daly
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be pati
36 matches
Mail list logo