- What do you like about eta and why? Basically I approach eta because it joins one of my favorite languages with one of the platforms that I usually work with and I'm more comfortable, the jvm. I especially like that it starts out from the nuclear ecosystem of haskell: ghc, cabal, hackage ...
- Why would you choose eta rather than java, clojure or scala? I am convinced that pure functional programming can be a decisive breakthrough for many types of software devlopment. The support for it is very limited in java and is not enough complete in clojure or scala to be really effective in my opinion.
- If Eta could be used in production, the tools were ripe and there were good materials To learn, would you try to adopt it in your company (or recommend it to your friends). If so,
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE BangPatterns #-} | |
module Main where | |
import System.Random (randomRIO) | |
import Data.Monoid (Sum(..),(<>)) | |
import Data.Tree | |
main :: IO () | |
main = main' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class UIState { | |
def context | |
// From params | |
Boolean filtrar=false | |
Boolean disabled=false | |
Boolean withNew=true | |
Boolean withDelete=true | |
Boolean embedded=false | |
Boolean returnEmbedded=false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
namespace PureIO { | |
/* | |
C# does not have proper sum types. They must be emulated. | |
This data type is one of 4 possible values: | |
- WriteOut, being a pair of a string and A | |
- WriteErr, being a pair of a string and A | |
- readLine, being a function from string to A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.List; | |
import java.util.stream.Stream; | |
import static java.util.stream.Collectors.*; | |
public class Prueba { | |
public static void main(String[] args) { | |
Integer i=getInt(new Integer(2)); | |
int j=getInteger(3); | |
System.out.println(idsToStringList(new Person(i),new Person(j))); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package lan.dk.podcastserver.utils.multipart; | |
import lan.dk.podcastserver.utils.MimeTypeUtils; | |
import org.apache.commons.lang3.StringUtils; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import javax.servlet.ServletOutputStream; | |
import javax.servlet.http.HttpServletRequest; | |
import javax.servlet.http.HttpServletResponse; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.codehaus.groovy.grails.commons.GrailsClassUtils | |
import org.codehaus.groovy.grails.commons.GrailsDomainClass | |
import org.codehaus.groovy.grails.commons.GrailsDomainClassProperty | |
import org.codehaus.groovy.grails.orm.hibernate.cfg.DefaultGrailsDomainConfiguration | |
import org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsAnnotationConfiguration; | |
import org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder | |
import org.codehaus.groovy.grails.orm.hibernate.cfg.HibernateMappingBuilder | |
import org.codehaus.groovy.grails.orm.hibernate.cfg.Mapping | |
import org.codehaus.groovy.grails.plugins.support.aware.GrailsApplicationAware | |
import org.hibernate.MappingException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// simular las typeclasses Enum y Bounded de haskell | |
interface Bounded<T> { | |
minBound: T | |
maxBound: T | |
} | |
interface Enum<T> { | |
fromEnum(number): T | |
toEnum(T): number | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module All where | |
import Life | |
import Grass | |
import Sheep | |
import Wolf | |
main = do | |
putStrLn "Grass:" | |
print $ eat Grass [Grass] | |
print $ eat Grass [Sheep] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@prefix : <http://base/#> . | |
@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> . | |
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> . | |
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
@prefix fuseki: <http://jena.apache.org/fuseki#> . | |
:service1 a fuseki:Service ; | |
fuseki:dataset <#dataset> ; | |
fuseki:name "Quijote" ; |