Live data from Hacker News

Show HN: Céu, Structured Synchronous Reactive Programming

ceu-lang.org

11–20 of 48 posts

Re: Show HN: Céu, Structured Synchronous Reactive Programming

#11
post #9

What are the advantages of Céu over other synchronous programming languages such as Esterel and Lustre?

Céu looks really similar to Esterel. The thesis (http://www.ceu-lang.org/chico/ceu_phd.pdf) has a section titled "III.7 Differences to Esterel". (edit: removed explanations, the other comment is more detailed).

Re: Show HN: Céu, Structured Synchronous Reactive Programming

#12
post #11
post #9

What are the advantages of Céu over other synchronous programming languages such as Esterel and Lustre?

Céu looks really similar to Esterel. The thesis ( http://www.ceu-lang.org/chico/ceu_phd.pdf ) has a section titled "III.7 Differences to Esterel". (edit: removed explanations, the other comment is more detailed) .

Thanks, forgot to mention in the other comment that Céu is actually based on Esterel.

Re: Show HN: Céu, Structured Synchronous Reactive Programming

#13

Hi, I'm the author of the programming language Céu. Although Céu is about 5 years now, this is the first time I post to "Show HN". In this new version, we are trying to surpass the academic fences with a more polished work (docs, build, etc). All feedback is welcome. Francisco

Why did you choose Lua as the implementation language?

Re: Show HN: Céu, Structured Synchronous Reactive Programming

#14
post #13

Hi, I'm the author of the programming language Céu. Although Céu is about 5 years now, this is the first time I post to "Show HN". In this new version, we are trying to surpass the academic fences with a more polished work (docs, build, etc). All feedback is welcome. Francisco

Why did you choose Lua as the implementation language?

- Dynamic typing for fast prototyping. The compiler is full of dynamic tricks for testing, stripping parts of it, etc.

- LPeg support [1]. PEGs are great!

- The creator of Lua was my advisor since undergrad. :) (Which means that I program in Lua for a long time...)

http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html

Re: Show HN: Céu, Structured Synchronous Reactive Programming

#15
post #9

What are the advantages of Céu over other synchronous programming languages such as Esterel and Lustre?

In comparison to Esterel: 1. Dynamic abstractions with lexical scope (vs. mostly static language). You can dynamically spawn code into a lexically-scoped pool. 2. Internal/fine-grained determinism (vs. external determinism). All statements execute in a deterministic order. E.g., if you have two printf's in parallel awaking from the same event, they will execute in lexical order. 3. Safe integration with C. When calli…

The C integration aspect sounds really neat, especially for writing concurrent code on the Arduino!

Thanks for the detailed explanation.

Re: Show HN: Céu, Structured Synchronous Reactive Programming

#16
post #13

Earlier quoted context omitted.

Why did you choose Lua as the implementation language?

- Dynamic typing for fast prototyping. The compiler is full of dynamic tricks for testing, stripping parts of it, etc. - LPeg support [1]. PEGs are great! - The creator of Lua was my advisor since undergrad. :) (Which means that I program in Lua for a long time...) http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html

And this means that the performance is not the first (or second) reason to use Ceu, right? In other words, is it somewhat slow?

Re: Show HN: Céu, Structured Synchronous Reactive Programming

#17
post #16

Earlier quoted context omitted.

- Dynamic typing for fast prototyping. The compiler is full of dynamic tricks for testing, stripping parts of it, etc. - LPeg support [1]. PEGs are great! - The creator of Lua was my advisor since undergrad. :) (Which means that I program in Lua for a long time...) http://www.inf.puc-rio.br/~roberto/lpeg/lpeg.html

And this means that the performance is not the first (or second) reason to use Ceu, right? In other words, is it somewhat slow?

I wrote in Lua the source-to-source compiler that takes a ".ceu" and generates a ".c" (the code is a single-threaded state machine), which is then compiled with gcc.

The compiler is slow, but not the final binary.

We wrote a paper [1] that compares flash,RAM,CPU usage from Céu vs hand-written event-driven code in C. The differences are negligible.

[1] http://www.ceu-lang.org/chico/ceu_sensys13_pre.pdf

Re: Show HN: Céu, Structured Synchronous Reactive Programming

#18
post #15

Earlier quoted context omitted.

In comparison to Esterel: 1. Dynamic abstractions with lexical scope (vs. mostly static language). You can dynamically spawn code into a lexically-scoped pool. 2. Internal/fine-grained determinism (vs. external determinism). All statements execute in a deterministic order. E.g., if you have two printf's in parallel awaking from the same event, they will execute in lexical order. 3. Safe integration with C. When calli…

The C integration aspect sounds really neat, especially for writing concurrent code on the Arduino! Thanks for the detailed explanation.

Yes, we can take advantage of all existing libraries in C/C++ for free.

Re: Show HN: Céu, Structured Synchronous Reactive Programming

#19
Was there a particular problem you were trying to solve by creating Ceu? Or was it just to learn things about compilers?

EDIT: found the answer in the paper: "Despite the continuous research in facilitating programming WSNs, most safety analysis and mitigation efforts in concurrency are still left to developers, who must manage synchronization and shared memory explicitly. In this paper, we present a system language that ensures safe concurrency by handling threats at compile time, rather than at runtime."

Re: Show HN: Céu, Structured Synchronous Reactive Programming

#20
post #19

Was there a particular problem you were trying to solve by creating Ceu? Or was it just to learn things about compilers? EDIT: found the answer in the paper: "Despite the continuous research in facilitating programming WSNs, most safety analysis and mitigation efforts in concurrency are still left to developers, who must manage synchronization and shared memory explicitly. In this paper, we present a system language…

I'm not the language's creator, but I assume that part of the goal was to bring synchronous programming to the mainstream. Synchronous programming languages are well known in the safety-critical hard realtime world. They're based on a mathematical theory that (as opposed to pure-functional programming) embraces interaction and concurrency, which makes them very suitable for interactive applications (whereas compilers are the natural domain for pure-FP). In addition, synchronous languages are currently the most amenable languages to formal verification. These two reasons are why they're popular and successful in the domain I mentioned. Also, synchronous languages naturally support styles of programming (under research) that are intended to be more natural, and facilitate correct code (in addition to the formal-method-friendliness), such as behavioral programming[1].

BTW, Eve is another synchronous language, although a declarative rather than an imperative one like Céu. It's great to see those time-tested and well-studied ideas finally break out of the safety-critical realtime world.

[1]: http://www.wisdom.weizmann.ac.il/~bprogram/more.html

Post reply on HN