Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

Roy

Name: Anonymous 2012-09-10 5:35

http://roy.brianmckenna.org/

Roy is an experimental programming language that targets JavaScript. It tries to meld JavaScript semantics with some features common in static functional languages:

- Damas-Hindley-Milner type inference
- Whitespace significant syntax
- Compile-time meta-programming
- Simple tagged unions
- Pattern matching
- Structural typing
- Monad syntax

Name: Anonymous 2012-09-10 5:36

type Request = {url: String, payload: String}

let ajaxRequest = {
  return: \x -> x
  bind: \(x : Request) f ->
    $.get x.url x.payload f
}

let v = (do ajaxRequest
  value <- {url: '/examples/helloworld.roy', payload: 'stuff'}
  console.log value
  return value
)

console.log v

Name: Anonymous 2012-09-10 5:37

Obligatory

let isFizzBuzz x =
  if x % 15 == 0 then
    console.log "FizzBuzz"
  else
    isBuzz x

let isBuzz x =
  if x % 5 == 0 then
    console.log "Buzz"
  else
    isFizz x

let isFizz x =
  if x % 3 == 0 then
    console.log "Fizz"
  else
    console.log x

let fizzBuzz x y =
  if x < y + 1 then
    isFizzBuzz x
    fizzBuzz (x + 1) y
  else
    console.log "end"

fizzBuzz 1 25

Name: Anonymous 2012-09-10 5:39

Where are the polyvariadic functions?

Name: Anonymous 2012-09-10 6:06

I knew a Roy. He was a faggot.

Name: Anonymous 2012-09-10 10:38

oh great a "new" programming language. Just what we need.

Name: Anonymous 2012-09-10 14:55

``If I use static types on top of dynamic typing, it'll be faster!''
Damas-Hindley-Milner type inference
LOL! Does ``dynamic typing'' mean anything to you?
Whitespace significant syntax
FIOC is shit.
Compile-time meta-programming
Compiling? This is JavaScript!
Simple tagged unions
LOL! Does ``dynamic typing'' mean anything to you?
Pattern matching
LOL! Does ``dynamic typing'' mean anything to you?
Structural typing
LOL! Does ``dynamic typing'' mean anything to you?
Monad syntax
LOL! Does ``dynamic typing'' mean anything to you?
HIBT?

Don't change these.
Name: Email:
Entire Thread Thread List