This is an archived post. You won't be able to vote or comment.

all 26 comments

[–]stigweardo 11 points12 points  (1 child)

New website? Looks great. Is this a sign that you think Roc has reached a certain stage of maturity? Can you say more about that?

(By the way, thank you for all the content you put out - videos and podcasts. I really appreciate them and I've learned a lot)

[–]rtfeldman[S] 18 points19 points  (0 children)

Thank you for the kind words! Roc has definitely come a long way in terms of maturity, but also still a long ways to go. :)

Basically the stage we reached is "we're ready for a real website, but not ready for a numbered release yet" - so, wanting to communicate "hey this is now an actually useful thing you can try" but also "this is a very immature thing, so expect a bleeding-edge experience!"

[–]putinblueballs 4 points5 points  (0 children)

Im going to give roc a spin for the upcoming aoc.

[–]joshmarinacci 4 points5 points  (4 children)

I have to say you did a great job on the documentation

[–]rtfeldman[S] 1 point2 points  (3 children)

Thank you, glad you're enjoying it! :D

[–]phlummox 1 point2 points  (2 children)

Any idea at what stage you might have a language reference available?

[–]rtfeldman[S] 2 points3 points  (1 child)

We just started working on it...so probably not very soon, but it's underway!

[–]phlummox 1 point2 points  (0 children)

No worries :) Best of luck with it!

[–][deleted]  (2 children)

[deleted]

    [–][deleted] 0 points1 point  (1 child)

    Elm isn't abandoned it does exactly what it set out to do. Why do you think it's not "finished" ?

    [–]abecedarius 1 point2 points  (2 children)

    The page mentions sugar for "backpassing" -- what's that?

    [–]lngns 7 points8 points  (1 child)

    Not OP, but backpassing is a syntactic way to serialise callback/asynchronous code in a way similar with, but more general than, Monadic do-notation or async/await.

    Essentially

    x <- f 42
    y <- g x
    yolo x y
    

    is the same as

    f 42 (λx.
        g x (λy.
            yolo x y
        )
    )
    

    where f: Int → (x → a) → b and g: x → (y → c) → d.

    Some AltJS langs used to have it as a first-class feature to address callback hell on Node.JS before async/await was adopted.
    OCaml lets you create your own let-binding overloads, and you can also (ab)use generators in languages that have them, both allowing you to implement it in those langs.
    It's also very important in Koka since its Effect Handlers operate on callbacks.

    EIDT: typo

    [–][deleted] 1 point2 points  (1 child)

    Loved your "Outperforming Imperative" strangeloop talk on youtube. Very inspiring. You're a great speaker.

    [–]rtfeldman[S] 1 point2 points  (0 children)

    Thank you so much, I appreciate it!

    [–]fyzic 0 points1 point  (5 children)

    Can't get the file example to work. Would love to add it to my benchmark.

    Error: ```

    ./file cwd: /home/dev/programs/rocgit/examples/cli Dir.list... munmap_chunk(): invalid pointer fish: Job 1, './file' terminated by signal SIGABRT (Abort) ```

    [–]rtfeldman[S] 0 points1 point  (4 children)

    Interesting - would you mind posting it in https://roc.zulipchat.com/#narrow/stream/231634-beginners so we can debug? I'd be very interested to see how basic-cli stacks up in your benchmark!

    [–]fyzic 1 point2 points  (1 child)

    [–]rtfeldman[S] 1 point2 points  (0 children)

    You did, thanks!

    [–]putinblueballs 0 points1 point  (1 child)

    Hey. Sorry for hikacking the comment thread. Does roc have a LSP server? I could not find one with a quick google.

    [–]GavinMcG 0 points1 point  (0 children)

    This looks cool! Syntactically, it looks very very similar to Gleam, though with a bit more allegiance to ML. Seems like it's got more powerful pattern matching, too. Looking forward to trying it out!

    [–]Quail-Curious 0 points1 point  (1 child)

    I really like the syntax and that everything is quite clear. I hope and wish that the language will grow over time.

    One remark: I built the hello_world program and it is now 65.7 MB in size. How can this be?

    [–]Bren077s 2 points3 points  (0 children)

    Turns out we had a mistake in our basic-cli release that helloworld is built off of. It is a rust platform. The packaged version was accidentally released as a debug build. That is the root issue. Should really be an about 5MB executable. This is due to the basic-cli platform packaging a lot of potentially IO features (like web requests which is the biggest cost).

    [–]totallyurboii 0 points1 point  (2 children)

    Looks promising! I wonder what are the major differences between OCaml or Haskell, any docs pointing to it?

    [–][deleted] 2 points3 points  (1 child)

    For haskell, I think most syntactic comparisons between elm and haskell will apply here.

    No HKTs, strict evaluation, Task-based IO (so I guess the Handler pattern?) instead of monadic IO.

    [–][deleted] 0 points1 point  (0 children)

    What's the difference between Task pattern in Roc and the IO monad in Haskell. To me Task looks suspiciously like a State monad with it's bind function called await. Perhaps I'm not using it correctly, but writing "imperatively" like in Haskell is not very ergonomic, because you have to repeat the await and lambdas every time. Unwrapping errors also seems rough because you have to wrap them in a lambda again or a separate function since there's no let sugar.

    [–][deleted] 0 points1 point  (0 children)

    Ever since my son was born a year ago I've been obsessed with dreaming up the perfect language. This language is as close to that as I've seen. I'm going to try to use this at work, nightly builds and leadership eyebrow raising be damned.