함수형 언어 haskell 

지난주에 세미나에 참석했다가 haskell 언어에 대해서 듣게 되었습니다.
물론 들어본 적이 있음직한 언어지만 함수형 언어? 라는 것 외에 무엇인지는 몰랐죠.

이 함수형 언어가 유용하게 쓰일수 있다는 것을 알게 되었습니다.

먼저... 소개를 하자면 제가 참석한 자리는 매니코어를 소개하는 자리였습니다.
멀티코어를 넘어서 100코어 1000코어를 넘게 되는 환경에서 과연 프로그래밍은
어떻게 될 것인가 하는 얘기를 듣게 되었습니다.

한개의 칩에 수많은 코어가 존재한다고 할때 코어의 확장이 이루어질때 성능향상에
가능 큰 걸림돌이 되는 것은 바로 데이타의 공유로 인한 접근에 따른 lock 입니다.
천개의 코어에서 한개의 자료에 접근하려고 경쟁을 한다면 생각하기도 싫은 일이 벌어질게 뻔합니다.

haskell 의 특징중에 하나인 변수의 수정이 거의 이루어지지 않는다는 특징을 생각한다면
쉽게 이해가 갈 수 있는 항목이다.
물론 그것을 완전히 배재하기란 불가능하다고 한다.
하지만 기본적으로 프로그램밍의 구조 자체가 그러하고 예외적으로만 허용한다고 하니
흥미로운 대목인것 같습니다.

런타임 실행이고 플랫폼을 설치하여야 실행할수 있다고 합니다.
뭐... 다행인것은 우분투에서도 실행이 가능하다고 합니다.

sudo apt-get install haskell-platform
참 쉽죠?
하지만 인스톨을 실행하면 상당히 많은 패키지가 깔리게 됩니다.
천리길도 한걸음부터라고 일단 한번 깔아는 보았네요.
ghc 패키지가 필수적으로 필요하고 그 크기 역시 상당히 크다고 하네요...
뭐 일단 깔았으니 help 라도 한번 봐야 겠네요

boggle70@boggle70-P55-US3L:~$ haskell-compiler --help
Usage:

   ghc [command-line-options-and-input-files]

To compile and link a complete Haskell program, run the compiler like
so:

   ghc --make Main

where the module Main is in a file named Main.hs (or Main.lhs) in the
current directory.  The other modules in the program will be located
and compiled automatically, and the linked program will be placed in
the file `a.out' (or `Main.exe' on Windows).

Alternatively, ghc can be used to compile files individually.  Each
input file is guided through (some of the) possible phases of a
compilation:

   - unlit: extract code from a "literate program"
   - hscpp: run code through the C pre-processor (if -cpp flag given)
   - hsc: run the Haskell compiler proper
   - gcc: run the C compiler (if compiling via C)
   - as: run the assembler
   - ld: run the linker

For each input file, the phase to START with is determined by the
file's suffix:

   - .lhs literate Haskell unlit
   - .hs plain Haskell ghc
   - .hc C from the Haskell compiler gcc
   - .c C not from the Haskell compiler  gcc
   - .s assembly language as
   - other passed directly to the linker ld

The phase at which to STOP processing is determined by a command-line
option:

   -E stop after generating preprocessed, de-litted Haskell
    (used in conjunction with -cpp)
   -C stop after generating C (.hc output)
   -S stop after generating assembler (.s output)
   -c stop after generating object files (.o output)

Other commonly-used options are:

   -v[n]    Control verbosity (n is 0--5, normal verbosity level is 1,
     -v alone is equivalent to -v3)

   -fglasgow-exts  Allow Glasgow extensions (unboxed types, etc.)

   -O    An `optimising' package of compiler flags, for faster code

   -prof    Compile for cost-centre profiling
    (add -auto-all for automagic cost-centres on all
     top-level functions)

   -H14m    Increase compiler's heap size (might make compilation
   faster, especially on large source files).

   -M              Output Makefile rules recording the
   dependencies of a list of Haskell files.

Given the above, here are some TYPICAL invocations of ghc:

   # compile a Haskell module to a .o file, optimising:
   % ghc -c -O Foo.hs
   # link three .o files into an executable called "test":
   % ghc -o test Foo.o Bar.o Baz.o
   # compile a Haskell module to C (a .hc file), using a bigger heap:
   % ghc -C -H16m Foo.hs
   # compile Haskell-produced C (.hc) to assembly language:
   % ghc -S Foo.hc

The User's Guide has more information about GHC's *many* options.  An
online copy can be found here:

  http://haskell.org/haskellwiki/GHC

------------------------------------------------------------------------
오늘은 저도 그냥 이게 뭔가하고 해보았습니다.
한번 hello 소스라도 있으면 구해서 돌려보기라도 해봐야겠습니다.