Skip to content

Conversation

JulianGCalderon
Copy link
Contributor

@JulianGCalderon JulianGCalderon commented Apr 7, 2025

Adds some code examples to the Concrete book, regarding basic language features.

I've not added documentation on these topics:

  • Traits (not in main yet).
  • Modules (or standard library).
  • Attributes:
    • intrinsic.
    • lang_item.
  • Borrowing rules for references.
  • Union (low-level, is it worth to document?).

Also, our for implementation is pretty flexible (Go-like), allowing something like this:

for (; x <= 10; x = x + 1) {
    ...
}

I've not documented as I didn't know if we would keep it.

NOTE: Is there a way to preview the book before merging?

Copy link

github-actions bot commented Apr 7, 2025

Benchmarking (Linux) factorial

Compiling factorial (factorial.con)
Finished release in 32.804469ms
Running 5000000 iterations
Using input value: 20
Concrete Result = 2432902008176640000 Time taken : 96.73 ms
Rust Result = 2432902008176640000 Time taken : 60.47 ms

Benchmarking (Linux) fib

Compiling fib (fib.con)
Finished release in 26.302977ms
Running 5000 iterations
Using input value: 20
Concrete Result = 6765 Time taken : 136.76 ms
Rust Result = 6765 Time taken : 85.65 ms

@JulianGCalderon JulianGCalderon marked this pull request as ready for review April 7, 2025 21:02
@codecov-commenter
Copy link

codecov-commenter commented Apr 7, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.29%. Comparing base (4802a28) to head (af0e219).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #226   +/-   ##
=======================================
  Coverage   56.29%   56.29%           
=======================================
  Files          25       25           
  Lines        5516     5516           
=======================================
  Hits         3105     3105           
  Misses       2411     2411           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link

github-actions bot commented Apr 7, 2025

Benchmarking (macOS) factorial

Compiling factorial (factorial.con)
Finished release in 595.531209ms
Running 5000000 iterations
Using input value: 20
Concrete Result = 2432902008176640000 Time taken : 29.88 ms
Rust Result = 2432902008176640000 Time taken : 23.50 ms

Benchmarking (macOS) fib

Compiling fib (fib.con)
Finished release in 112.456458ms
Running 5000 iterations
Using input value: 20
Concrete Result = 6765 Time taken : 92.74 ms
Rust Result = 6765 Time taken : 101.80 ms

@edg-l
Copy link
Collaborator

edg-l commented Apr 8, 2025

You cab preview the book locally with make book

@JulianGCalderon
Copy link
Contributor Author

You cab preview the book locally with make book

Thanks @edg-l! I previewed the book locally and looks fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants