VectorLinux
August 22, 2014, 03:14:53 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: 1 2 [3]
  Print  
Author Topic: Command Line Cachet?  (Read 6474 times)
Triarius Fidelis
Vecteloper
Vectorian
****
Posts: 2399


Domine, exaudi vocem meam


WWW
« Reply #30 on: January 25, 2009, 12:02:38 pm »

Quote from: Epic Fail Guy link
C# and Powershell definitely stand out.

Indeed, although C# and .net were a real *cluster* if you had to do any serious lifting with it. One of the middle-ware guys in our MS-only shop liked to say, "C# plays like an E flat."



My point is that it was indeed Microsoft who brought FP to the profane masses. They deserve credit for that much.
Logged

"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months
Windozer
Vectorite
***
Posts: 386


Have Vector Linux, Will Travel.


« Reply #31 on: January 25, 2009, 02:01:52 pm »

Quote from: The Headacher
Quote
C# plays like an E flat.

He wasn't much of a musician then was he?

LOL - yeah, I guess we'd have to say he was a whole step out of step  Tongue Cheesy


Quote from: EFG
... Microsoft who brought FP to the profane...
Hadn't thought about that aspect - so you think C# really conforms to a FP lang.?  (BTW, Haskell is way cool, but not for the syntactically faint of heart!)

- H
Logged

483,617th Registered Linux Snoozer
Triarius Fidelis
Vecteloper
Vectorian
****
Posts: 2399


Domine, exaudi vocem meam


WWW
« Reply #32 on: January 25, 2009, 04:20:48 pm »

In many respects, it does.

Haskell's syntax is not much harder than that of, say, Python. Indeed they both give whitespace significance.

The major challenge in Haskell is really in understanding how to do anything non-trivial, and indeed many trivial things. The closest thing is Lisp/Scheme, and even they don't share a lot many idioms in common with Haskell.

I want to get good at Haskell some day, but to what end? I probably won't develop or maintain anything faster than I would with Python. Python is, like, my opium ... except it's a productive habit.
Logged

"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months
Windozer
Vectorite
***
Posts: 386


Have Vector Linux, Will Travel.


« Reply #33 on: January 25, 2009, 04:59:53 pm »

Quote from: Epic Fail
I want to get good at Haskell some day, but to what end?

Yes - and although we might be drifting off topic, this stuff is so arcane, that we probably wouldn't be able to hijack this thread with it!
Talk about a "secret language"  Cool

Quote
Haskell's syntax is not much harder than that of, say, Python.
Yes, I stand corrected, I should have said "lexically" difficult (see sample code below).

If you're mathematically inclined, Haskell has great symbolic abilities, as you probably well know. Often, when I have to do a matlab, R, or Mathematica formula,  I try to figure out how to do it in Haskell too. Differential equations, for example, just fly off the keyboard, but then a week later look like an alien visitation. Huh  It's a subtle, tough language - but probably one of the best, most wide open I've ever studied (been coding since 1974, so I've seen a few Smiley. There's two things about Haskell, well probably any FP,  that take getting used to: that variables really aren't variable and that consistently aiming towards the "pointfree" coding style is actually healthier than using syntactically  embedded data. The former can mortally wound a procedural coder, while the latter may make your eyes cross, if you weren't weaned on LISP.  (Curses to the Oppressive Parenthesis, Praise Be the White Space Significance!)

I think I'm gonna dink around with Xmonad just to support it's Haskell roots...

cheers
- H
___________________________________________________
here's two of my favorites:
Code:
-- fibonacci sequence
  unfoldr (\(f1,f2) -> Just (f1,(f2,f1+f2))) (0,1)
 
  fibs = 0:1:zipWith (+) fibs (tail fibs)
 
  fib = 0:scanl (+) 1 fib
 
  -- pascal triangle
  pascal = iterate (\row -> zipWith (+) ([0] ++ row) (row ++ [0])) [1]
 
Clipped directly from http://www.haskell.org/haskellwiki/Blow_your_mind#Monad_magic
« Last Edit: January 25, 2009, 05:06:29 pm by WinDoze » Logged

483,617th Registered Linux Snoozer
Windozer
Vectorite
***
Posts: 386


Have Vector Linux, Will Travel.


« Reply #34 on: January 26, 2009, 11:47:22 am »

forgot to post this link, which is a good, Haskell resource:

http://www.nabble.com/Haskell-f13122.html

@EFG - since you're at a university, it occured to me that you might want to look into Glasgow distributed Haskell (GdH) - c.f. links above. You mentioned hopfield/n.nets elsewhere and that you're looking (maybe) for a good excuse to learn Haskell ... How about hopfield ala GdH?  IMO, Hopfeld Haskell (HoHa!)  Tongue would make a cool special-studies class (as if any student needs more of those kinds of credits Smiley.  FFT stuff is interesting too when you get the computing power of many machines.

just my 2C
- H

PS This book on Haskell is recent and has received only 5 star reviews so far... I've just glanced at it, myself, but it looks good:
http://www.amazon.com/Real-World-Haskell-Bryan-OSullivan/dp/0596514980/ref=sr_1_1?ie=UTF8&s=books&qid=1232997660
« Last Edit: January 26, 2009, 11:51:48 am by WinDoze » Logged

483,617th Registered Linux Snoozer
Triarius Fidelis
Vecteloper
Vectorian
****
Posts: 2399


Domine, exaudi vocem meam


WWW
« Reply #35 on: January 26, 2009, 12:07:40 pm »

There's two things about Haskell, well probably any FP,  that take getting used to: that variables really aren't variable and that consistently aiming towards the "pointfree" coding style is actually healthier than using syntactically  embedded data.

The benefit of point-free coding is frequently dubious.

http://www.haskell.org/haskellwiki/Pointfree#Problems_with_pointfree

Doing obvious things like leaving out 'l' is OK, but beyond that, point-free turns into mental masturbation very quickly. It's often not even useful in principle ... point-free code quickly becomes both cryptic and brittle.

@EFG - since you're at a university, it occured to me that you might want to look into Glasgow distributed Haskell (GdH) - c.f. links above. You mentioned hopfield/n.nets elsewhere and that you're looking (maybe) for a good excuse to learn Haskell ... How about hopfield ala GdH?  IMO, Hopfeld Haskell (HoHa!)  Tongue would make a cool special-studies class (as if any student needs more of those kinds of credits Smiley.  FFT stuff is interesting too when you get the computing power of many machines.

I am indeed at a university, namely UB, but I am not in the computer science department or, for that matter, the School of Engineering and Applied Sciences, so I can't use any of the computing resources in Boner Hall.

Anyway, I switched to MIS and so the more practical thing for me now is to learn about common software engineering principles and (OO) design patterns. Compare:

http://snurl.com/arp00

http://snurl.com/aroz0

OK, that's kind of a glib assessment, but, as far as I can tell, where I'm going, FP is barely on the radar. It's not even that popular here in the Anglosphere and Europe, because, at least in the case of 'pure' FP such as Haskell, it tends to be a bar to efficiency more than anything else. I heard about use of ptk (which is based on SML) in India and China to great success, but that's an isolated case.

PS This book on Haskell is recent and has received only 5 star reviews so far... I've just glanced at it, myself, but it looks good:
http://www.amazon.com/Real-World-Haskell-Bryan-OSullivan/dp/0596514980/ref=sr_1_1?ie=UTF8&s=books&qid=1232997660

It's all of it on-line by the way: http://realworldhaskell.org/
« Last Edit: January 26, 2009, 05:22:18 pm by Epic Fail Guy » Logged

"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months
Windozer
Vectorite
***
Posts: 386


Have Vector Linux, Will Travel.


« Reply #36 on: January 27, 2009, 06:12:21 pm »

thanks for posting the book link ... been reading it here a bit. It IS good.

RE your "glib links" above: seeing Haskell in Chinese reminds me of studying maths in German. Math in German makes more sense to me than it does in English (my native). Maybe Haskell makes more sense in Chinese, so that's why it's not caught on here? <G>

Apologies to Tom and All --- we hijacked your thread a while ---  Grin Grin
Logged

483,617th Registered Linux Snoozer
Triarius Fidelis
Vecteloper
Vectorian
****
Posts: 2399


Domine, exaudi vocem meam


WWW
« Reply #37 on: January 27, 2009, 08:34:30 pm »

RE your "glib links" above: seeing Haskell in Chinese reminds me of studying maths in German. Math in German makes more sense to me than it does in English (my native).

I had a calculus text that was translated (almost directly) from German and I had to put it down because it read like crap.

German is good for some things, but expressing yourself clearly is not one of them.

Maybe Haskell makes more sense in Chinese, so that's why it's not caught on here? <G>

You don't understand ... the first Google search was for 'functional programming language'. It turned up eight pissy pages of results. The second was for 'object-oriented programming' and it runs on and on for a while.

It makes sense that someone in a country like China would usually not be inclined towards obvious academic masochism like Haskell. It's not especially useful for production. I think this mailing list item sums it up well:

http://mail.python.org/pipermail/python-list/2003-August/217877.html

Quote
Functional Programming is a very neat mental toy [but isn't very practical at all]. My opinion that Python is the best currently available language for most tasks isn't based on some kind of preconceived evaluation: it's based on real-world experience over a huge variety of programming tasks, which I have, over the decades, tackled using a similarly huge variety of languages, in some cases by myself, in most cases as a part of a team of programmers.  I've seen excellent programmers just fail to GET such (intrinsically excellent) languages as Lisp and Scheme variants of all sorts, Prolog and its ilk, functional programming languages -- try and fail to get any real productivity with them.  I've seen excellent programmers dive head-first into complex higher-level languages such as Perl, and come up with huge masses of unmaintainable code. SOME people can no doubt make very effective use of each and every one of these tools, but experience has shown me that they just don't generalize well.  For other higher level languages, such as Rexx, Icon, Python, and Ruby, my experience suggests instead that programmers (including both experienced ones and ones with less experience) tend to become very productive with them, very fast, and write good code, suitable for team-work and maintenance.  Out of these, Python is currently my choice ...
« Last Edit: January 27, 2009, 08:46:06 pm by Epic Fail Guy » Logged

"Leatherface, you BITCH! Ho Chi Minh, hah hah hah!"

Formerly known as "Epic Fail Guy" and "Döden" in recent months
Pages: 1 2 [3]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!