ted.neward@newardassociates.com | Blog: http://blogs.newardassociates.com | Github: tedneward | LinkedIn: tedneward
"a pythonic language for blazing-fast CPU+GPU execution on the MAX Platform"
"Mojo is an innovative, high-performance programming language designed for writing systems-level code for AI workloads."
https://www.modular.com/mojo
"a programming language in the Python family that is currently under development. It is available both in browsers via Jupyter notebooks, and locally on Linux and macOS. Mojo aims to combine the usability of a high-level programming language, specifically Python, with the performance of a system programming language such as C++, Rust, and Zig."
https://en.wikipedia.org/wiki/Mojo_(programming_language)
"Pythonic" syntax, semantics
Python ecosystem integration/FFI
ownership memory model
compiled (either AOT or JIT)
compile-time parameterization (traits, type parameterization, etc)
GPU integration
Who: Chris Lattner; Modular (company)
What: "a pythonic language for blazing-fast CPU+GPU execution on the MAX Platform"
Where: https://www.modular.com/mojo
When: May 2023; first available Sep 2023
Why: Because AI, duh
How: Initially closed-source; OSS to come; uses MLIR in LLVM
Status: Buy your enterprise license today!
Memory/Lifetime Mgmt: Ref counting and destructors
Auto Bounds Checking: Yes
Safe Arithmetic: Yes
Pointers and References: Explicit standard library types
Forced initialization: No (but will error out on use of uninitialized variables)
Sync primitives: (Atomics, Locks, Memory Barriers, etc)
Reentrance-safety
Thread-Local Storage
Immutable Objects
Immutable-by-default
Communication Primitives (None, message-passing, ...)
Translation: Compiled
Deterministic @ Runtime: Same as any compiled language
Bare-Metal Programming: Both C and Python FFI, so yes
explicit access to MLIR primitives (__mlir
-prefixed builtins)
Other features: LLVM optimizations
Available Toolchains
Library Support
Package Managers
IDE/Editor support
Langserver availability
Community (small, medium, large)
Easy/hard to learn?
Easy/hard to find developers?
Suitable for use in regulated environments?
Suitable for use in embedded environments?
Job availability (by career level)
Special features, etc?
compiles to CIL bytecode
not intended to compile to native
object-oriented
strongly-typed (similar in "strength" to C++ or Java)
operator overloading
implementation and interface inheritance
parameterized types
accepts "assemblies" with code in CIL
multithreaded
JIT compiled
automatic memory management
underlying platform access (P/Invoke)
C# using "raw" threads
public class RawThreads { public static void Go(Counter c) { const int THREADS = 100; const int INCS_PER_THREAD = 1000; List<Thread> threads = new List<Thread>(); for (int i=0; i<THREADS; i++) { Thread t = new Thread(() => { for (int j=0; j<INCS_PER_THREAD; j++) { c.Increment(); } }); threads.Add(t); } foreach (var thread in threads) { thread.Start(); } foreach (var thread in threads) { thread.Join(); } } }
C# using implicit TAP
public class ImplicitTasks { public static void Go(Counter c) { const int THREADS = 100; const int INCS_PER_THREAD = 1000; Parallel.For(0, THREADS, i => { for (int j=0; j<INCS_PER_THREAD; j++) { c.Increment(); } }); } }
Who: Microsoft; Anders Hejlsberg
What: Object-oriented, strongly- and statically-typed, bytecode-compiled
Where: Microsoft
When: First public work announced in October, 2000
Why: Because Sun sued so they couldn't use Java
How: Initially closed-source; ECMA standardized, then open-sourced
Status: Growing in complexity every day
Memory/Lifetime Mgmt: Garbage collected
Auto Bounds Checking: Yes
Safe Arithmetic: Depends on what you call "safe"
Pointers and References: Managed references, managed pointers, unmanaged pointers
Forced initialization: Everything always initializes to "0"/null
Sync primitives: Object monitors; Windows primitives
Reentrance-safety: None (programmer-controlled/-dictated)
Thread-Local Storage: Yes
Immutable Objects: Sort of (references can be frozen, but not objects)
Immutable-by-default: Not in C# (other CLR languages might)
Communication Primitives: None
Translation: Compiled to bytecode; JIT to native on first invocation
Deterministic @ Runtime: Somewhat
Bare-Metal Programming: Through PInvoke, possibly
Other features: Too many to list in one bullet
Available Toolchains: Visual Studio, VS Code, "dotnet" CLI
Library Support: Extensive
Package Managers: Nuget
IDE/Editor support: Visual Studio, VS Code
Langserver availability: Yes
Community: Huge
Easy/hard to learn? Equivalent to Java or C++
Easy/hard to find developers? Easy
Suitable for use in regulated environments? Typically yes
Suitable for use in embedded environments? Typically not
Job availability (by career level): Extensive at all levels
Special features, etc? Piss off OG Linux developers
Architect, Engineering Manager/Leader, "force multiplier"
http://www.newardassociates.com
http://blogs.newardassociates.com
Sr Distinguished Engineer, Capital One
Educative (http://educative.io) Author
Performance Management for Engineering Managers
Books
Developer Relations Activity Patterns (w/Woodruff, et al; APress, forthcoming)
Professional F# 2.0 (w/Erickson, et al; Wrox, 2010)
Effective Enterprise Java (Addison-Wesley, 2004)
SSCLI Essentials (w/Stutz, et al; OReilly, 2003)
Server-Based Java Programming (Manning, 2000)