HN user

paf31

357 karma
Posts25
Comments75
View on HN
leanpub.com 11y ago

Show HN: PureScript Book

paf31
6pts0
github.com 12y ago

PureScript 0.5 "Polymorph" Released

paf31
27pts2
github.com 12y ago

Web app for interviewing technical candidates in the browser

paf31
119pts28
tryps.functorial.com 12y ago

Try PureScript

paf31
2pts2
github.com 12y ago

PureScript

paf31
61pts17
functorial.com 12y ago

Show HN: PureScript - a functional language which compiles to Javascript

paf31
2pts0
blog.functorial.com 12y ago

The Visitor Pattern and Pattern Matching

paf31
3pts0
initialround.com 12y ago

Show HN: Conduct technical interviews asynchronously online

paf31
4pts0
challenge.initialround.com 13y ago

Show HN: I made a coding challenge website to promote my startup

paf31
3pts0
blog.functorial.com 13y ago

A Typed Markup Language Insired By Haskell

paf31
2pts0
blog.initialround.com 13y ago

Call for Help: I'm looking for recruiters

paf31
1pts0
www.initialround.com 13y ago

Show HN: My side project - Testing tools for technical recruiters

paf31
4pts5
initialround.com 13y ago

Show HN: Test interview candidates in the browser in any programming language

paf31
2pts0
initialround.com 13y ago

Our Javascript Coding Challenge Starts Tomorrow 10AM PST

paf31
2pts0
news.ycombinator.com 13y ago

Ask HN: Which pricing model do you prefer?

paf31
1pts0
blog.initialround.com 13y ago

Dogfooding Our App: Announcing the Initial Round Programming Challenge

paf31
2pts0
blog.initialround.com 13y ago

Register for the Initial Round Challenge

paf31
1pts0
www.initialround.com 13y ago

Show HN: I was frustrated with programming interviews, so I made this.

paf31
6pts3
blog.initialround.com 13y ago

Improving FizzBuzz

paf31
1pts0
initialround.com 13y ago

Show HN: Initial Round - Smarter Interviews for JS/Python/Ruby Devs

paf31
2pts0
blog.initialround.com 13y ago

In Praise of Unit Test Driven Interviews

paf31
2pts0
www.typesandotherdistractions.com 15y ago

Typechecking Purity programs using a modified Algorithm W

paf31
4pts0
www.typesandotherdistractions.com 15y ago

Abstraction Elimination in the Purity language

paf31
2pts0
news.ycombinator.com 15y ago

Please rate my lang

paf31
2pts6
gist.github.com 15y ago

A proof that the quicksort algorithm terminates on all inputs

paf31
15pts5

I fail yet to see what advantages PureScript brings compared to Elm.

I think they fit different use cases. Elm is excellent at interactive web apps using FRP. PureScript is a little more general purpose and has a few type system features which Elm currently does not (type classes and rank N polymorphism). Also, PureScript's generated code is a bit simpler and doesn't need a runtime library.

Consider a recursive function like factorial:

  fact :: Number -> Number
  fact 0 = 1
  fact n = n * fact (n - 1)
This will build stack frames and fail with a stack overflow for large inputs. We can fix this by using tail recursion and an accumulator:
  fact :: Number -> Number
  fact = go 1
    where
    go acc 0 = acc
    go acc n = go (acc * n) (n - 1)
The PureScript compiler will recognize that every recursive call is in tail position, and will convert the function to a while loop.

If we want to perform side-effects during the recursion, we typically use a monad to track the type of side effect in use. For example, we can use PureScript's Eff monad to trace information to the console:

  fact :: Number -> Eff (trace :: Trace) Number
  fact = go 1
    where
    go acc 0 = do
      trace "Done!"
      return acc
    go acc n = do
      trace "Keep going ..."
      go (acc * n) (n - 1)
In the case of the Eff monad, the PureScript compiler employs some special tricks in the optimizer to enable the tail call optimization, so we're still OK. But this is only possible because Eff is defined in the standard library (at least until we implement custom rewrite rules).

In the general case, the compiler only sees applications to the monadic bind function of the underlying monad. For example, if we use the Writer monad instead:

  fact :: Number -> Writer String Number
  fact = go 1
    where
    go acc 0 = do
      tell "Done!"
      return acc
    go acc n = do
      tell "Keep going ..."
      go (acc * n) (n - 1)
  
which is equivalent after desugaring to the following code:
  fact :: Number -> Writer String Number
  fact = go 1
    where
    go acc 0 = tell "Done!" >>= \_ -> return acc
    go acc n = tell "Keep going ..." >>= \_ -> go (acc * n) (n - 1)
This is an example of "monadic recursion" - a recursive function whose return type uses some monad. In this case, the recursive calls are no longer in tail position, so the compiler cannot apply the tail call optimization. The result is that the compiled JavaScript might blow the stack for large inputs.

The point is that idiomatic Haskell code is often not appropriate in JavaScript because of the different semantics, so it might not be appropriate in PureScript either. The good news is that many Haskell idioms have corresponding PureScript idioms (often using the Eff monad).

I think it's definitely possible to put knowledge of Haskell to use in PureScript, but it's not like Fay, Haste, GHCJS etc. where you can copy code verbatim. I think of PureScript as "an environment in which to write principled JavaScript". That requires that, to a certain extent, you should have JavaScript's semantics in the back of your mind while developing. For that price, you get ease of debugging and some tools which you don't have in many other compile-to-JS languages (an expressive type system, type classes, ability to refactor with confidence etc.)

Of course, one of the best things about AltJS is the interoperability with other languages. PureScript won't be the best tool for every case, but it has a simple FFI. It's possible to write complete front-ends in PureScript, but I'd love to see more examples where PureScript is used alongside something else (I've used TypeScript with PureScript successfully, for example).

"Simple readable JavaScript" as opposed to the sort of output you might expect from compilers for other Haskell-like languages which attempt to preserve Haskell's semantics. Certainly there are cases where using techniques from pure functional programming can lead to poor performance (monadic recursion jumps to mind), but it is perfectly possible to write fast code using PureScript. And if you really need to squeeze out every last bit of performance, you can always write code in JavaScript and use the FFI.

You couldn't pay me enough to work on some stacks.

Also, certain technologies do a good job of convincing potential employees that you know what you're doing and committed to using the best tools available IMO.

λ Lessons 12 years ago

Very nice. It took me a while to realize that array literals aren't supported, but once I did that I was able to write concatMap and watch it being evaluated.

A couple of points:

- If there is a syntax error, the box just turns red. It would be nice to see what the issue is.

- You could probably make it clearer that it's possible to execute arbitrary expressions, by editing the map term, for example.

DICOM Grid http://dicomgrid.com/ - Phoenix, AZ or REMOTE

DICOM Grid, a SaaS start-up in the healthcare technology field, is looking for a JavaScript/TypeScript developer to maintain and enhance DICOM Grid’s front-end medical image sharing and reading web application. You will report to the Director of Dev Ops.

Familiarity with modern front-end web development is essential.

The ideal candidate would be able to work independently with minimal supervision, and be enthusiastic about keeping up-to-date with the latest web technologies.

The team is distributed with team members working remotely in Phoenix, Los Angeles, Boston, and New York.

Required:

* HTML5, CSS, JavaScript

* JQuery, Underscore

* Working knowledge of Linux

Familiarity with any of the following would be a big plus:

* TypeScript

* Handlebars, Backbone

* Scala, Java

* Functional programming techniques

* Linear algebra

* DICOM, HL7

Position Responsibilities

* Plan, evaluate, implement, test and document new features and bug fixes for the DICOM Grid web application.

* Work with other development team members to integrate with backend services.

* Work with DevOps to deploy code into our production and UAT environments.

* Work with customers and professional services to gather requirements.

* Conform to company standard operating procedures.

What qualifies you to join?

* A combination of a college degree in CS, Math, Physics, or related, relevant work experience, and/or a strong open source portfolio

* General interest in the healthcare field

* Strong communication and interpersonal skills

* Meticulous attention to detail with strong organization skills

* Base salary and stock options depend on experience; health insurance, paid holidays and vacation are part of the package.

Send your resume, cover letter and/or links to your StackOverflow, GitHub profiles, etc. to pfreeman+hn@dicomgrid.com.

For bonus points, include a solution to the following short task, including code in JavaScript or the frontend language of your choice: write a function which identities the largest common set (not list) of words appearing as prefixes of two input strings. For example, the largest common prefix set of the strings "His dog and the cat" and "The dog and his ball" is { "the", "dog", "and", "his" }

No recruiters please.

With minor advertising and effort, I have more inbound work requests than I can personally take on.

I'm very much interested in moving more towards contract-based employment, so I would love to hear more about the mechanics of getting off the ground, and any recommendations for advertising my services etc.

Los Angeles, Remote or local, Contract

Stack: Haskell, C#, F#, Java, Scala, Javascript, TypeScript

GitHub: http://github.com/paf31, http://github.com/purescript

Specialties: Domain specific languages (DSLs), Compiler implementation, Framework implementation, Statistics, Geometry

Resume/Blog: http://functorial.com

Contact: my username at cantab dot net

Experienced developer with a strong background in Mathematics looking for small to medium projects (approx. 20 hrs/week). I enjoy writing reliable code in strongly typed functional languages, or using the techniques of strongly-typed functional programming in other languages. Contact me if you're interested in using those techniques to write verifiably correct code.

SEEKING WORK - Los Angeles (remote or local)

Experienced developer with a strong background in Mathematics looking for small to medium projects (approx. 20 hrs/week). Keywords: C#, F#, Java, Scala, Haskell, Javascript, TypeScript

Specialties: Domain specific languages (DSLs), Compiler implementation, Framework implementation, Statistics, Geometry

I enjoy writing reliable code in strongly typed functional languages, or using the techniques of strongly-typed functional programming in other languages.

GitHub: http://github.com/paf31, http://github.com/purescript

Website/Resume/Blog: http://functorial.com

Contact: my username at cantab dot net

Los Angeles, remote preferred, Contract | Part Time

Stack: Haskell, C#, F#, Scala, Java, TypeScript, Javascript

Resume: http://functorial.com

Contact: my username at cantab dot net

I am looking for something challenging which would allow me to use my skills in functional programming (with a strong preference for Haskell). Short to medium term contract/part time projects are preferred. I am most interested in language/compiler design, but given the freedom to use the right tools, I would be happy working on a wide variety of projects.

SEEKING WORK - Los Angeles (remote or local)

Experienced developer looking for small to medium projects. I have strong experience with the following: C#, F#, Java, Scala, Haskell, Javascript, TypeScript. My main speciality at the moment is the development of reliable Javascript applications using strongly-typed source languages. I can work across the full stack if necessary.

I also have extensive experience with: domain specific language design, compiler implementation, framework implementation.

GitHub: http://github.com/paf31, http://github.com/purescript (I am the original author of this project)

Website/Resume/Blog: http://functorial.com

Contact: my username at cantab dot net

There are a few interesting projects in the contrib organization on GitHub:

https://github.com/purescript-contrib

I also like inquire.js:

https://github.com/concordusapps/inquire.js

Also, some slides and examples from a talk I recently gave, with a few (what I think are cool) examples of functional approaches to common JS problems:

https://github.com/paf31/lambdaconf

And a little game (needs some more work):

https://github.com/paf31/purescript-croco http://functorial.com/purescript-croco/html/