Better HN
topnewbestaskshowjobs
Log inSign up

vlastachu

4 karma · joined Jan 30, 2015 (11y ago) · 6 submissions

Submissions

comment 10y ago · link · parent

> no basic knowledge how JavaScript is interpreted at runtime

Could you show where author wrong about this?

comment 10y ago · link · parent

http://lambdacube3d.com/editor.html why type inference (for hints in editor) is so cool? Can I do something similar for haskell (without pain if possible)?

comment 11y ago · link · parent

Is it only proof of concept? If no: How they develop compiler to language with incomplete spec?

comment 11y ago · link · parent

tell me about message passing without concurrency. is it message passing in ruby? and why.

comment 11y ago · link · parent

> prefixes, default instances

Also bad setters ("record {field = val}" looks nice but useless, as not a function).

I hope the developers of GHC also clearly see the problem and someday will be engaged in it. Then the language becomes much more expressive.

Is that task exists somewhere in roadmap?

comment 11y ago · link · parent

I'm not good enough haskell programmer, but there is possible solution (records as you mentioned).

    import Prelude hiding ((-))

    data Grep = Grep {isRecursive :: Bool, maxCount :: Maybe Int} --etc
        deriving (Show)
    grep = Grep False Nothing
    --short pseudonim
    r :: Grep -> Grep
    r command = command{isRecursive = True}
    m :: Int -> Grep -> Grep
    m num command = command{maxCount = Just num}
    
    (-) :: a -> (a -> a) -> a
    (-) command flag = flag command
    ourGrep = grep -m 50 -r 
    
    main = print ourGrep -- > Grep {isRecursive = True, maxCount = Just 50}
    
    --then we should write monad which execute that data