I spent the last year building Charl - a programming language designed specifically for machine learning. Not a library on top of Python, but a language where tensors and autograd are native features.

Why?

PyTorch and TensorFlow are excellent, but they’re libraries bolted onto general-purpose languages. I wanted to explore: what’s possible when ML is built into the language itself?

What Works Today

  • Native tensor operations
  • Automatic differentiation (dynamic graphs)
  • Neural network training (validated on MNIST)
  • 22x faster than PyTorch CPU
  • GPU support via wgpu
  • Type-safe (static typing with inference)

Example: Training a Neural Network

// Network: 2 -> 4 -> 1
let w1 = tensor_randn([2, 4])
let w2 = tensor_randn([4, 1])

while epoch < 1000 {
// Forward
le...

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help