Saltar a contenido

Specialized Languages - Guía de Entorno

Guía completa para lenguajes especializados y nichos con Claude Code.

Capacidades de Claude Code

Lenguaje Dominio
Elixir Sistemas concurrentes, web real-time
Scala Big Data, JVM funcional
R Estadística, visualización
Julia Cómputo científico, ML
Haskell Funcional puro, verificación
Clojure Lisp en JVM, datos
F# .NET funcional
OCaml Compiladores, sistemas
Erlang Telecomunicaciones, distribuido
Zig Systems programming
Nim Eficiente, meta-programación
Crystal Ruby syntax, C performance

Elixir

Instalación

# Windows
winget install ElixirLang.Elixir

# macOS
brew install elixir

# Linux (Ubuntu)
sudo apt install elixir

# Verificar
elixir --version
iex  # Interactive shell

Mix (Build tool)

# Crear proyecto
mix new my_app
mix new my_app --sup  # Con supervision tree

# Estructura
my_app/
├── lib/
   └── my_app.ex
├── test/
├── mix.exs
└── README.md

# Comandos
mix deps.get      # Instalar dependencias
mix compile       # Compilar
mix test          # Tests
mix format        # Formatear
iex -S mix        # Shell con proyecto cargado

Phoenix Framework

# Instalar
mix archive.install hex phx_new

# Crear proyecto
mix phx.new my_app

# Con LiveView
mix phx.new my_app --live

# Ejecutar
mix phx.server
# o
iex -S mix phx.server

Scala

Instalación

# Coursier (recomendado)
# macOS
brew install coursier/formulas/coursier
cs setup

# Windows
# https://get-coursier.io/docs/cli-installation

# Verificar
scala --version
sbt --version

sbt

# Crear proyecto
sbt new scala/scala3.g8

# Estructura
my-project/
├── src/
   ├── main/scala/
   └── test/scala/
├── build.sbt
└── project/

# Comandos
sbt compile
sbt test
sbt run
sbt console  # REPL
sbt assembly  # Fat JAR

Spark

# Instalar Spark
brew install apache-spark

# spark-shell
spark-shell

# spark-submit
spark-submit --class MyApp target/scala-2.13/my-app.jar

R

Instalación

# Windows
winget install RProject.R

# macOS
brew install r

# Linux
sudo apt install r-base

# Verificar
R --version

RStudio

# Windows
winget install Posit.RStudio

# macOS
brew install --cask rstudio

Packages & CLI

# En R/RStudio
install.packages("tidyverse")
install.packages("ggplot2")
install.packages("shiny")
install.packages("rmarkdown")

# Desde CLI
Rscript script.R
R CMD BATCH script.R

VS Code

code --install-extension REditorSupport.r
code --install-extension RDebugger.r-debugger

Julia

Instalación

# Windows
winget install Julialang.Julia

# macOS
brew install julia

# Linux
curl -fsSL https://install.julialang.org | sh

# Verificar
julia --version

Package Manager

# En Julia REPL
using Pkg
Pkg.add("DataFrames")
Pkg.add("Plots")
Pkg.add("Flux")  # ML

# Desde CLI
julia -e 'using Pkg; Pkg.add("DataFrames")'

Pluto Notebooks

using Pkg
Pkg.add("Pluto")
using Pluto
Pluto.run()

VS Code

code --install-extension julialang.language-julia

Haskell

Instalación (GHCup)

# Todas las plataformas
curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh

# Instalar GHC, cabal, stack
ghcup install ghc
ghcup install cabal
ghcup install stack

# Verificar
ghc --version
cabal --version
stack --version

Stack

# Crear proyecto
stack new my-project

# Estructura
my-project/
├── app/
   └── Main.hs
├── src/
   └── Lib.hs
├── test/
├── package.yaml
└── stack.yaml

# Comandos
stack build
stack test
stack run
stack ghci  # REPL

VS Code

code --install-extension haskell.haskell

Clojure

Instalación

# macOS
brew install clojure/tools/clojure

# Linux
curl -L -O https://github.com/clojure/brew-install/releases/latest/download/linux-install.sh
chmod +x linux-install.sh
sudo ./linux-install.sh

# Windows
winget install Clojure.Clojure

# Verificar
clj --version

Leiningen

# Instalar
# https://leiningen.org/

# Crear proyecto
lein new app my-app

# Comandos
lein run
lein test
lein repl
lein uberjar

VS Code

code --install-extension betterthantomorrow.calva

F

Instalación

# Incluido con .NET SDK
dotnet --version

# Crear proyecto
dotnet new console -lang F# -n MyApp

# Comandos
dotnet build
dotnet run
dotnet test
dotnet fsi  # REPL

VS Code

code --install-extension Ionide.Ionide-fsharp

OCaml

Instalación (opam)

# macOS
brew install opam
opam init

# Linux
sudo apt install opam
opam init

# Windows
# https://fdopen.github.io/opam-repository-mingw/

# Instalar OCaml
opam switch create 5.1.0
eval $(opam env)

# Verificar
ocaml --version

Dune (Build system)

opam install dune

# Crear proyecto
dune init project my_project

# Comandos
dune build
dune test
dune exec my_project
dune utop  # REPL mejorado

Zig

Instalación

# Windows
winget install zig.zig

# macOS
brew install zig

# Linux
# https://ziglang.org/download/

# Verificar
zig version

Comandos

# Crear ejecutable
zig init-exe

# Build
zig build
zig build-exe src/main.zig

# Test
zig test src/test.zig

# Run
zig run src/main.zig

Nim

Instalación

# Choosenim (recomendado)
curl https://nim-lang.org/choosenim/init.sh -sSf | sh

# macOS
brew install nim

# Verificar
nim --version
nimble --version

Comandos

# Compilar
nim c program.nim
nim c -r program.nim  # Compilar y ejecutar

# Release build
nim c -d:release program.nim

# Nimble (package manager)
nimble init
nimble install
nimble build
nimble test

Crystal

Instalación

# macOS
brew install crystal

# Linux (Ubuntu)
curl -fsSL https://crystal-lang.org/install.sh | sudo bash

# Verificar
crystal --version
shards --version

Comandos

# Crear proyecto
crystal init app my_app

# Build
crystal build src/my_app.cr
crystal build --release src/my_app.cr

# Run
crystal run src/my_app.cr

# Tests
crystal spec

# Shards (dependencies)
shards install
shards update

Comandos que Claude Code Ejecutará

# Elixir
mix deps.get && mix compile
mix test
iex -S mix

# Scala
sbt compile
sbt test
sbt run

# R
Rscript script.R
R CMD BATCH script.R

# Julia
julia script.jl
julia -e 'using Pkg; Pkg.add("Package")'

# Haskell
stack build
stack test
stack run

# Clojure
lein run
lein test
clj -M:run

# F#
dotnet run
dotnet fsi script.fsx

# OCaml
dune build
dune exec program

# Zig/Nim/Crystal
zig build
nim c -r program.nim
crystal build src/app.cr

Verificación del Entorno

#!/bin/bash
echo "=== Verificación Lenguajes Especializados ==="

echo -e "\n--- Elixir ---"
elixir --version 2>/dev/null || echo "Elixir no instalado"

echo -e "\n--- Scala ---"
scala --version 2>/dev/null || echo "Scala no instalado"

echo -e "\n--- R ---"
R --version 2>/dev/null | head -1 || echo "R no instalado"

echo -e "\n--- Julia ---"
julia --version 2>/dev/null || echo "Julia no instalada"

echo -e "\n--- Haskell ---"
ghc --version 2>/dev/null || echo "GHC no instalado"

echo -e "\n--- Clojure ---"
clj --version 2>/dev/null || echo "Clojure no instalado"

echo -e "\n--- OCaml ---"
ocaml --version 2>/dev/null || echo "OCaml no instalado"

echo -e "\n=== Verificación Completa ==="

Recursos