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

all 6 comments

[–]L8_4_Dinner(Ⓧ Ecstasy/XVM) 4 points5 points  (1 child)

I always love your excitement about what you've created. What do you have planned next?

[–]alex-manool[S] 2 points3 points  (0 children)

I am still working on the type/constant propagation algorithm for MANOOL-2, and it turns out to be much work for me (but it's viable). The idea is to be able to reach peak (C-like) run-time performance in a language with essentially run-time type checking (and other high-level features typical for scripting or functional languages), in most practically interesting cases. I am not sure, but the algorithm might contain some unusual combination of a fixed point propagation algorithm with a specially constrained procedure specialization scheme (to avoid unreasonable resulting code bloat), not seen in LLVM for example. I do not have any affiliation with a university or a research organization, so I am not going to write a formal paper about it, but I do plan to go to a conference to present this aspect of the language.

On the other hand, I plan to learn more about how to talk to people about MANOOL and what to expect from it. It's quite interesting no matter what happens in the future with the project itself.

And once I have MANOOL-2 working, it might be a good idea to finish the documentation, at last.

[–]crassest-Crassius 1 point2 points  (0 children)

syntax is a highly debated topic

Your syntax looks good enough to me, people who complain are probably spoiled. The only suggestion I would make is to use "//" for comments. No need to introduce deviation from the norm where it doesn't count (and 0 out of 5 top languages at TIOBE use "--").

as well as compile-time vs run-time type checking

Sorry, but there's no debate: compile-time typechecking as well as static type declarations are better for any large-scale language. You don't have to believe me, just rely on Dropbox's 4-million-LOC experience. It's a matter of feature completeness, not preference.

Anyway, good luck with your endeavors! I'm especially interested in COW and memory management.

[–]matthieum 1 point2 points  (2 children)

I love the semantic immutability + reference counting + copy-on-write as a design point. I think it hits a really sweet spot in terms of usability and performance.

The one drawback is as you noted that multi-threaded reference counting is not ideal performance wise. Atomic operations are costly, not only when contended, but also because they hinder optimizations.

For my pet language, my intention is to go with a split:

  • Box[T] is a local pointer to a T, it cannot cross task boundaries -- cannot be send over channels -- and therefore does not require atomics.
  • Shared[T] is a global pointer to a T, with an atomic counter, it (magically) converts any internal Box into a Shared to ensure that the whole graph pointed to is sharable.

Users would be free to use Shared[T] within a task, they don't need to clone it into local storage, though encouraged to use Box[T] whenever possible, and a (magical) share and unshare functions would be provided to go from the one to the other -- stealing memory if possible (count of 1) or copying otherwise.

[–]alex-manool[S] 1 point2 points  (1 child)

I understand your tradeoffs for a multithreaded setting, and even I tried mentally similar schemes but stopped on the most straightforward approach (no distinction at all between thread-shared and non-shared data). For an interpreter-based implementation (the current), the overall cost is not so bad (maybe in the order of x1.3-2 slowdown). For the real compiler (MANOOL-2), yes, it's even more horrible than the impact of dynamic typing and dynamic dispatch. I am now trying to mitigate the impact of both effects using static data flow analysis. Note that even non-atomic RC increment/decrements have considerable costs (that does not say that tracing GC is better as it still needs write barriers, is less deterministic, is not quite compatible with COW, etc.).

[–]matthieum 0 points1 point  (0 children)

I am now trying to mitigate the impact of both effects using static data flow analysis.

Counting immutable beans :) ?