4 ms·
I'd really like to see an snippet in the front page. There are some samples in the tutorial, but I like to see an example to get some feeling of the language. F
by gus_massa 11y ago
I'd really like to see an snippet in the front page. There are some samples in the tutorial, but I like to see an example to get some feeling of the language. For example, a mix of
(define (factorial n)
(if (< n 2)
1
(* n (factorial (- n 1)))))
and
;; here the type of y is inferred
(fn ([x : int] y) (+ x y))
- owickstrom 11y agoGood idea, thanks! I'll try to come up with something representative.
- cjslep 11y agoDo you know how much effort/time it would take to spin up a "play.kashmir", similar to "play.golang"? If it is minimal, it could be one of those items that really lowers the barrier to entry into the language.
- nothrabannosir 11y agoEspecially if you just do the compilation to Go and redirect the user to a prefilled play.golang.org page with the resulting code. And a comment withe original code and a link back to your site :)
- smt88 11y agoPre-filling a page on another domain isn't possible unless the creator of that page explicitly creates a way to do it. That's an important security feature of web browsers.
- nothrabannosir 11y agoYou can create and run the entire snippet and redirect the user to the resulting page. "Prefilled" was a poor choice of words :(
- deleted 11y ago[deleted]
- deleted 11y ago[deleted]
- owickstrom 11y agoGot something up there now.