Better HN
topnewbestaskshowjobs
Log inSign up

disruptek

24 karma · joined Jun 28, 2019 (7y ago) · 12 submissions

Submissions

comment 2y ago · link · parent

Resubmit because I typo'd the link. XD

2.

Nim CPS: compile-time continuations(github.com ↗)

7 points · by disruptek · 2y ago · 3 comments

comment 2y ago · link · parent

This'll get you closer: https://github.com/nim-works/cps

Sorry, I was in a hurry.

comment 2y ago · link · parent

Another in the continuing discussion... CPS as a library using nothing more than Nim's meta-programming.

5.

Nim CPS: compile-time continuations(github.com ↗)

3 points · by disruptek · 2y ago · 3 comments

comment 5y ago · link · parent

You can read about the reasoning behind subgraph ownership here: https://github.com/nim-lang/RFCs/issues/244

comment 5y ago · link · parent

Also, we don't scan "live" memory, which matches your intuition -- why would we?

comment 6y ago · link · parent

Nim doesn't require that you use a gc; one of its many gc options is `none`, which is, as it sounds, no garbage collector at all.

comment 6y ago · link · parent

I want to remove a couple misunderstandings that I see in the comments.

Nim is "not done" and I hope it never will be. Watch Guy Steele's "Growing a Language" talk for my rationale. We want a language that can continue to evolve and introduce or research new programming language technology.

ARC is scope-based memory management computed at compile-time. It is deterministic and not stop-the-world. If you want to influence the memory management for performance reasons, it's quite trivial to do so by manipulating scopes. There are also knobs and levers if you need direct control of individual allocations.

ORC is ARC but with the tiny addition of a cycle-breaker.

ORC will be the default because it's more convenient than ARC while capturing all of the benefit. It simply adds calls to the cycle-breaker that you may be uninterested in typing in yourself.

comment 6y ago · link · parent

Please open an issue if you want to change the semantics; it's trivial to use the hash instead.

comment 6y ago · link · parent

Nimph has had lockfiles for months.

https://github.com/disruptek/nimph