Comments (4)
i have heard about chronos some times and once again, finally i tried out it just now; it's amazing! all my doubts that occured during using std/asyncdispatch have been solved: cancellation, checkpoint/switch-task without fd required.
it is unbelievable that a third-party module is more mature and good shaped than a std module.
from nimprogrammingbook.
I think we can let this issue open, I definitely will check your remarks. Note that there is also an alternative async implementation available from Status, called chronos, see https://github.com/status-im/nim-chronos
from nimprogrammingbook.
Thank you very much for reading my book!
Your remarks seems to be true. Actually the server code was based on the example in the Nim API docs, and the client was inspired by code of the book of Mr. Picheta that I read in late 2016 as pre-print. The async/await frame work has evolved since then. Actually I have never used the async/await pattern in my own code before, as I do no web stuff myself. That is the reason why this section came so late to the book, I generally prefer explaining things that I use a lot myself. But of course async/await is important for some people, and not all people may also have the book of Mr. Picheta, so I added the async/await section finally.
from nimprogrammingbook.
thanks for the reply, i did not notice that.
i looked it further, IMHO, the example in nim api doc is hard to understand, the lifetime of each task is not clear.
so i spent some times to write up another impl which is based on my past expirements using python's trio.
from nimprogrammingbook.
Related Issues (17)
- Typo HOT 1
- Permission to translate the book HOT 3
- Expand section on templates HOT 2
- License? HOT 13
- executable examples HOT 5
- Some thoughts about async HOT 3
- Broken URL HOT 2
- Wrong word HOT 5
- [FR] Dark theme option HOT 4
- The tail insert of linked object HOT 1
- Debug code left in regex example HOT 2
- Needs introduction to analysis of algorithms HOT 1
- Minor update to the book for nims 2.0 release as of today (01.08.2023) HOT 8
- Re: Permission to use the book in YouTube video series. HOT 3
- Result of some code is not expected as point in the book HOT 5
- Use of word "concept" in place of "defer" HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nimprogrammingbook.