Open Side Menu Go to the Top

09-06-2012 , 06:27 PM
Quote:
But then I have to maintain that curated product. And the process of doing that is not at all elegant.
How is the process of keeping them updated not elegant? With pathogen you can keep everything organized and with git you can have sub-modules setup to get the latest versions of your plugins very easily. This could probably be applied to emacs too (I never used it).

It takes about 5 seconds to sync everything to their latest versions.

There's 2 types of people. Build uppers and build downers. I like to build up. Give me some base functionality that's not very opinionated and works 95% of the time, then I'll build upon it when I need something extra.

Everyone on this sub-forum knows my stance on jquery I think haha. It's why I'm so heavily against it. I would rather have a bunch of tiny libs that are easy to understand and then use them together to form an elegant solution.

It's part of why I skipped rails completely too. Giant super opinionated monolithic apps scare the crap out of me.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
09-06-2012 , 06:42 PM
Quote:
Originally Posted by candybar
https://dl.dropbox.com/u/35498822/fr...-weakness.html

What keeps coming up is tooling, ide, documentation.

...
Clojure is NOT a beginner's language. If your a self-taught person who copy/pasted PHP from w3schools or hacked via plug-ins and frameworks, you'll most certainly be lost with any lisp. Many concepts are hard as hell to wrap your brain around as it is: let, lists, the reasoning and logic behind s-expressions, etc, much less putting all of that together.

The complaint against v1.0 stuff is mostly incorrect. v1.0 means nothing at all in the add-ons becuase version numbers are usually not maintained or recognized in the Clojure community. The second reason is that Clojure is an incredibly young language, so of course the libraries aren't going to be perfect or old. With that said, I agree that much work needs to be done in improving the libraries and plug-ins, but I think that the "market" will eventually figure this out.

Many libraries must be completed for Clojure, but the first steps have been taken.

Clojure has an excellent record of maintaining backwards compatibility from v1.4 to 1.3 etc, especially compared to PHP5 and Python3.

I generally blame myself when stuff goes wrong, and as far as my experience goes, when something went wrong in the install, or something was going wrong, I always found it was something that was my fault due to ignorance or other general stupidity, like mispelling, forgetting to name a file correctly, etc.

The too many choices argument is empty in my opinion. Do people call Ruby bad because it has too many gems? Is PHP terrible because there are 25+ frameworks and 10+ CMS platforms?

I agree that the documentation at clojure.org sucks and could use some examples. There is a lack of tutorials and learning resources as well. This is something that I am sure will be fixed as time goes on. Most everything you need can be learned from a $20 t $30 book. I'm not sure why this is too expensive for people to pay. However, with that said, the resources out there are really good. It's not the general mess you'd find if you tried to learn other more popular languages with a questionable coder base. In other words, the chances you learning how to program it well is greatly increased. Can't say the same about PHP, javaScript, and a few other languages.

There are other options besides emacs. There are excellent plug-ins for Eclipse, jEdit, etc.

Slow startup is a legitimate complaint. This prevents Clojure from being a scripting language. I'll let you decide how you feel about this.

The error messages are, yes, something to get used to. Seeing 500 lines of errors is quite shocking at first, until you know where to look. Yes, a good debugger is sorely needed.

I would never defend the language to the death, that's just silly. There are a few good things going for it though: it's widely considered to be a beginner-friendly community. In the last survey, only 2% said it was unfriendly.

Yes, no way (easy) to program and Android either. This is a ******ed argument because Android uses Java but does not use the JVM. However, this is being worked on.

Clojure also compiles to things beside the JVM, including CLR and Scheme-to-C-to-the-metal.

Quote:
You also didn't address the documentation issue. Microsoft shows sample code for F# in its .NET API documentation. F# works out of the box in Visual Studio. Microsoft even added serious functional features inspired by F# to C# and .NET API, making interoperability substantially easier than say, between Java and Clojure.
I'm not familiar with F#:

Code:
let asynctask = async
 {
     let req = WebRequest.Create(url)
     let! response = req.GetResponseAsync()
     use stream = response.GetResponseStream()
     use streamreader = new System.IO.StreamReader(stream)
     return streamreader.ReadToEnd()
 }
Code:
let rec factorial n =
    match n with
    | 0 -> 1
    | _ -> n * factorial (n - 1)
Code:
let rec printList lst =
    match lst with 
    | [] -> ()
    | h :: t -> 
        printf "%d\n" h
        printList t
Not sure if want to use it, to be honest.

The interop between Java and Clojure is an empty argument. The interop is between the JVM world and Clojure, which means you can use anything from the JVM ecosystem in Clojure, which isn't limited to Java.

And from what I've seen, it's as simple as

(:use 'java.blah.blah)

Not sure why that's hard.
Quote:
Clojure works fine in Windows as well, btw.
Yes, it does. After you set up all pathways....

Quote:
Do you use Clojure in production?
I'm currently building a website, for myself, in Clojure, and I don't think it is too difficult to use. Maybe you'll be able to see it and you can make your own determination on whether it works well or not.

I'm not a professional programmer. I started self-learning CS a little over a year ago. It just so happened that my learning path traveled through Scheme. I'm doing the website to measure how much I learned over the past year. Seems like I learned more than I realized.

Last edited by daveT; 09-06-2012 at 06:51 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-06-2012 , 06:43 PM
Quote:
You hate PHP because it's a bazaar compared to those other cathedral languages.
I hate PHP because it's crap.

Quote:
The same can be said about development tools available in Linux. I don't see any consistency here.
I hate Windows because it's crap. There we have consistency.

Quote:
The process of getting VIM to work correctly with all the plugins, debuggers, compilers for different languages, build systems, etc, is not at all elegant. Having to edit configuration files to add code completion support for your language or change other settings is not elegant. Having to memorize a long list of commands just to do anything is not elegant. There being multiple plugins that do the same thing and having no idea which one should be used is not elegant. Having to understand, by and large, how VIM interacts with plugins and external programs, to do much of anything, is not elegant.
You are correct.
Spoiler:
for a sufficiently inelegant definition of elegant

Last edited by clowntable; 09-06-2012 at 06:50 PM.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-06-2012 , 06:45 PM
I hate PHP because it's the trendy thing to do.

I don't hate PHP. There's things that put me off, but until I write something useful in it, I can't have an opinion.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-06-2012 , 07:18 PM
davet,
Is this the $20 book? "Clojure Programming". SICP also seems to be popular for general functional programming knowledge. At least according to Google.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-06-2012 , 07:26 PM
Shoe Lace,

SICP is awesome, and will be 100% in line with your philsophy. I think you'll love it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-06-2012 , 07:33 PM
Now I know what it felt like for other people to have to watch that stupid debate I dragged everyone into.

My bad.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-06-2012 , 07:44 PM
Quote:
Originally Posted by Shoe Lace
davet,
Is this the $20 book? "Clojure Programming".

Yes, I have that book. Definitely useful.

Quote:
SICP also seems to be popular for general functional programming knowledge. At least according to Google.
The first 2 1/2 chapters are, but there is considerable talk on OO as well. They weight the pros and cons of functional vs OO and fail to come to a satsifying conclusion.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-06-2012 , 07:45 PM
Quote:
Originally Posted by sdturner02
Now I know what it felt like for other people to have to watch that stupid debate I dragged everyone into.

My bad.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-06-2012 , 07:47 PM
Quote:
Originally Posted by gaming_mouse
Shoe Lace,

SICP is awesome, and will be 100% in line with your philsophy. I think you'll love it.
Big +1 !!!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-06-2012 , 08:00 PM
Cool, I'll check it out. It's a nice bonus when books are free too (SICP).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-06-2012 , 08:14 PM
Make sure you watch the 1985 lectures too. The teachers are really good.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-06-2012 , 08:38 PM
Quote:
Originally Posted by candybar
Hey Greg,

Efficiency is even harder to compare than elegance. I'm sure a lot of people were more efficient on Wang than they are on iPads. Most PHP developers are probably more efficient in PHP than in any other language. This doesn't mean much.

I'm saying that the developer experience is inconsistent and often unnecessarily made difficult due to a plethora of tools with no defaults, no centralized design and little coordination. And that this is what people mean by inelegant. You can achieve some central coordination by assembling a set of tools, editing configuration files for all those tools to set reasonable defaults, etc to get to a reasonable state. But it's still not as simple or consistent and takes a lot of work. That I can get around lack of centralized design in PHP doesn't mean PHP is elegant.

There's some confusion here - arguably, Linux's design is elegant and the Unix way is elegant. Even VI can be said to be elegant as a single entity. But the totality of the product actually offered to me as a developer: Linux + VI + Emacs + a whole bunch of plugins/scripts/libraries/extensions + a whole bunch of external tools, that I need to choose from and basically assemble myself is not elegant. It will become more elegant once I'm done with curating. But then I have to maintain that curated product. And the process of doing that is not at all elegant. And the result works decently well, but it's not that elegant. Not compared to VS anyway.
i guess you want to ignore my entire point that you're comparing apples to oranges

one is a full featured IDE specific for 3 languages and another is a general purpose text editor

wow one is gonna be more elegant and easier to start coding right away, big news there!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-06-2012 , 08:53 PM
gaming_mouse, I looked more into your TDD + Clojure question. It appears that there are those that do TDD and those that do not. There is one framework called Midje that does TDD-style testing. I guess the idea is that TDD is normally done top-down whereas in Clojure, its done bottom up.

I guess the risk is that you need to take it project-by-project. Here is one direct response to the comment he is making: http://www.fragmental.com.br/2011/10...re_debate.html

I wish I knew the entire answer to your question, but it doesn't appear that TDD is abandoned fully. Here is a link w/ Hickey on that controversial comment:

http://www.codequarterly.com/2011/rich-hickey/

Fogus: You have been known to speak out against test-driven development. Do you mind elaborating on your position?
Hickey: I never spoke out ‘against’ TDD. What I have said is, life is short and there are only a finite number of hours in a day. So, we have to make choices about how we spend our time. If we spend it writing tests, that is time we are not spending doing something else. Each of us needs to assess how best to spend our time in order to maximize our results, both in quantity and quality. If people think that spending fifty percent of their time writing tests maximizes their results—okay for them. I’m sure that’s not true for me—I’d rather spend that time thinking about my problem. I’m certain that, for me, this produces better solutions, with fewer defects, than any other use of my time. A bad design with a complete test suite is still a bad design.
Fogus: Clojure provides function constraints via pre- and post-condition checks that provide a subset of Eiffel’s contracts programming. Do constraints eliminate the need for, or complement unit testing?
Hickey: They complement unit tests. They have a number of nice properties—they document the intent of the code at the point it is written, and can optionally run in the context of the program.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-06-2012 , 09:20 PM
Quote:
Originally Posted by Shoe Lace
How is the process of keeping them updated not elegant? With pathogen you can keep everything organized and with git you can have sub-modules setup to get the latest versions of your plugins very easily. This could probably be applied to emacs too (I never used it).
Compared to requiring no work, it's not at all elegant. Just learn how to use Git and Pathogen isn't at all elegant. If I'm using Mercurial, I have to learn how to use Git just to update plugins for one out of many tools I use?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-06-2012 , 09:35 PM
Quote:
Originally Posted by daveT
gaming_mouse, I looked more into your TDD + Clojure question. It appears that there are those that do TDD and those that do not. There is one framework called Midje that does TDD-style testing. I guess the idea is that TDD is normally done top-down whereas in Clojure, its done bottom up.

I guess the risk is that you need to take it project-by-project. Here is one direct response to the comment he is making: http://www.fragmental.com.br/2011/10...re_debate.html

I wish I knew the entire answer to your question, but it doesn't appear that TDD is abandoned fully. Here is a link w/ Hickey on that controversial comment:

http://www.codequarterly.com/2011/rich-hickey/

Fogus: You have been known to speak out against test-driven development. Do you mind elaborating on your position?
Hickey: I never spoke out ‘against’ TDD. What I have said is, life is short and there are only a finite number of hours in a day. So, we have to make choices about how we spend our time. If we spend it writing tests, that is time we are not spending doing something else. Each of us needs to assess how best to spend our time in order to maximize our results, both in quantity and quality. If people think that spending fifty percent of their time writing tests maximizes their results—okay for them. I’m sure that’s not true for me—I’d rather spend that time thinking about my problem. I’m certain that, for me, this produces better solutions, with fewer defects, than any other use of my time. A bad design with a complete test suite is still a bad design.
Fogus: Clojure provides function constraints via pre- and post-condition checks that provide a subset of Eiffel’s contracts programming. Do constraints eliminate the need for, or complement unit testing?
Hickey: They complement unit tests. They have a number of nice properties—they document the intent of the code at the point it is written, and can optionally run in the context of the program.
dave,

you are awesome. thanks.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-06-2012 , 09:51 PM
Quote:
Originally Posted by daveT
Clojure is NOT a beginner's language. If your a self-taught person who copy/pasted PHP from w3schools or hacked via plug-ins and frameworks, you'll most certainly be lost with any lisp. Many concepts are hard as hell to wrap your brain around as it is: let, lists, the reasoning and logic behind s-expressions, etc, much less putting all of that together.
This is a reasonable response to many other criticisms of Clojure, but I think you're getting carried away. Clojure is a fine language. I don't think people responding to those surveys and talking about inadequate tooling are by and large the type to be troubled by basic functional programming concepts or S-expression. They would've been scared away much earlier and not looked much further. And tooling, documentation and the ecosystem around it aren't ideal and do not inspire confidence.


Quote:
I'm not familiar with F#:

Code:
let asynctask = async
 {
     let req = WebRequest.Create(url)
     let! response = req.GetResponseAsync()
     use stream = response.GetResponseStream()
     use streamreader = new System.IO.StreamReader(stream)
     return streamreader.ReadToEnd()
 }
Code:
let rec factorial n =
    match n with
    | 0 -> 1
    | _ -> n * factorial (n - 1)
Code:
let rec printList lst =
    match lst with 
    | [] -> ()
    | h :: t -> 
        printf "%d\n" h
        printList t
Not sure if want to use it, to be honest.
Honestly, I think you're making the same mistake that people make when they first encounter Lisp. If you come from a Lisp background (dynamic functional languages), but haven't yet had exposure to ML (language family to which F# belongs), Haskell, Miranda, etc, you will find that your world does open up quite a bit when you learn the latter. Hindley-Milner type inference is fantastic and advanced type systems add mathematical clarity to some functional features you may use in Clojure or Scheme without fully understanding explicitly. Are you familiar with monads?


Quote:
The interop between Java and Clojure is an empty argument. The interop is between the JVM world and Clojure, which means you can use anything from the JVM ecosystem in Clojure, which isn't limited to Java.
This is true in theory. In practice, Scala people don't use Clojure libraries or vice versa. Both Scala people and Clojure people generally try to avoid raw Java class libraries where they can. For the most part, Clojure and Scala people don't feel existing Java frameworks are adequate for what they do.

Why? Because they feel awkward and foreign. Why do they feel awkward and foreign? Because of the semantic gap. Interfaces are suboptimal and the library consumer ends up feeling, well if this library was built in Closure/Scala, it would be so much better. This is much less true of F# and .NET libraries, because the latter incorporates advanced functional concepts into the library. Because Microsoft cares about functional programming, monads, proper type systems, etc, and put necessary features into C# so that .NET libraries can use advanced functional concepts.

Imagine if Oracle took cues from Clojure and Scala so that Java would have many features that are semantically equivalent to features found in those languages and rewrote the standard libraries to offer interfaces that feel more or less natural for Clojure and Scala programmers. So that Clojure/Scala programmers wouldn't feel they need their own web framework. That's where Microsoft is with C#/F#.


Quote:
I'm currently building a website, for myself, in Clojure, and I don't think it is too difficult to use. Maybe you'll be able to see it and you can make your own determination on whether it works well or not.
I love programming in Scheme, but learning Clojure just doesn't make a lot of sense for me. If I need to use JVM, Scala is as good as it gets. If I'm free to use whatever and I have no reason not to use Scheme. And Clojure doesn't have any new semantic concepts I can learn and is gratuitously different from Scheme (gratuitous from my personal learning standpoint).
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-06-2012 , 09:58 PM
Quote:
Originally Posted by greg nice
i guess you want to ignore my entire point that you're comparing apples to oranges

one is a full featured IDE specific for 3 languages and another is a general purpose text editor

wow one is gonna be more elegant and easier to start coding right away, big news there!
VS supports a lot more than 3 languages but you've arrived at the point. Now how do you go from there to Windows offers an inferior development environment and that's why good programmers shy away from Windows?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-06-2012 , 10:19 PM
Quote:
Originally Posted by candybar
VS supports a lot more than 3 languages but you've arrived at the point. Now how do you go from there to Windows offers an inferior development environment and that's why good programmers shy away from Windows?
i'm not contending or debating that point, as i have no opinion nor am i qualified. i was curious to see your discussion about it and the responses

but i just felt compelled to point out that you're not really making fair comparisons
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-06-2012 , 10:30 PM
candybar. That was an excellent post. I have nothing to add to it.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-07-2012 , 05:21 AM
Something I forgot that i wanted to mention about the Hickey talk. While it was only in passing I kind of liked how one guy asked about aspects. I think AOP has the potential to simplify code quite a bit (aspect focuses on a single but cross cutting task=simple).

There seriously needs to be a "Pragmatic Simplification" type of book that collects all this stuff into one handy place with examples of complected vs simple code.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-07-2012 , 09:20 AM
Quote:
Originally Posted by candybar
Compared to requiring no work, it's not at all elegant. Just learn how to use Git and Pathogen isn't at all elegant. If I'm using Mercurial, I have to learn how to use Git just to update plugins for one out of many tools I use?
You wouldn't have to do much. Pathogen isn't really something you need to learn how to use. I mean, you do but it's such a basic thing that you learn how to use it in literally 10 seconds and then you're done forever.

It would be equivalent to learning how to install an addon through VS.

Git thing is fair enough, but it's also something that you don't have to learn. All you have to do is setup a repo with sub modules once. You can completely forget about it now and only clone it when you want updates.

It's maybe a 10 minute time investment once if you never touched git before in your life and then updating becomes a fully automated 100% brainless operation which only takes seconds.

It would be like saying VS sucks because it took 15 minutes for it to install on my computer. In those 15 minutes I could have ate 5 twinkies and patched the Linux kernel with vim!11!
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-07-2012 , 09:22 AM
By the way - I don't see how learning to use git is really a prerequisite. It's like saying I have to learn how to install a program in Windows or use a mouse. You should probably already know (or be happy to finally learn).

Just curious - of the developers here, who doesn't know Git?
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
09-07-2012 , 09:25 AM
It's not really a pre-req but most of the popular vim plugins are setup on github. If you have 8 or 9 plugins it's annoying to manually keep them all up to date.

It's just easier to make a repo yourself and include those plugins as sub modules so you can clone your own personal repo and get them all at once in 2 seconds.
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD ** Quote
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **
$25m Guaranteed WPM on CoinPoker
Join the action now
Daily Rewards • Splash Pots • CoinRaces
** UnhandledExceptionEventHandler :: OFFICIAL LC / CHATTER THREAD **

      
m