<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Michael</title>
    <description>The latest articles on DEV Community by Michael (@michael_b581c5c68faa9de1d).</description>
    <link>https://dev.to/michael_b581c5c68faa9de1d</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4101296%2Ff7bb8c28-58c0-47cd-adab-67a79e9b840d.png</url>
      <title>DEV Community: Michael</title>
      <link>https://dev.to/michael_b581c5c68faa9de1d</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/michael_b581c5c68faa9de1d"/>
    <language>en</language>
    <item>
      <title>I built a C-capable, DOM-native JavaScript Runtime in Pure Python</title>
      <dc:creator>Michael</dc:creator>
      <pubDate>Fri, 04 Sep 2026 01:03:36 +0000</pubDate>
      <link>https://dev.to/michael_b581c5c68faa9de1d/i-built-a-c-capable-dom-native-javascript-runtime-in-pure-python-b9c</link>
      <guid>https://dev.to/michael_b581c5c68faa9de1d/i-built-a-c-capable-dom-native-javascript-runtime-in-pure-python-b9c</guid>
      <description>&lt;p&gt;I just released myjs on PyPI (pip install myjs or pipx install myjs).&lt;/p&gt;

&lt;p&gt;It’s a Python-native JavaScript runtime that bridges Python’s AST capabilities, native DOM primitives (domonic), and direct C-level Foreign Function Interface (FFI) bindings into a unified JavaScript execution scope.&lt;/p&gt;

&lt;p&gt;🌐 The Pitch&lt;br&gt;
Why build another JS interpreter?&lt;/p&gt;

&lt;p&gt;In traditional stacks, if you want JavaScript to talk to native C libraries or manipulate server-side DOM structures, you end up juggling node-gyp, C++ addon build chains, or heavy IPC bridges like gRPC/REST between Node.js and Python.&lt;/p&gt;

&lt;p&gt;myjs collapses all of that into a single, pure-Python process.&lt;/p&gt;

&lt;p&gt;Because myjs parses JS (via an Acorn AST engine ported to Python) and executes it directly inside Python’s host scope, JavaScript code gains direct access to:&lt;/p&gt;

&lt;p&gt;Python’s DOM Tree: Real-time DOM manipulation via domonic.&lt;/p&gt;

&lt;p&gt;C Libraries &amp;amp; Shared Memory: Direct low-level access to system .so, .dylib, and .dll binaries via Python’s ctypes/cffi.&lt;/p&gt;

&lt;p&gt;Python Standard Library: Clean mapping between JS scopes and host OS capabilities.&lt;/p&gt;

&lt;p&gt;🚀 Quick Demo: C Memory, FFI, &amp;amp; DOM in JS&lt;br&gt;
Here is what running a script in myjs looks like:&lt;/p&gt;

&lt;p&gt;JavaScript&lt;br&gt;
// myjs_demo.js&lt;/p&gt;

&lt;p&gt;// 1. Call system C functions directly from JS without compilation!&lt;br&gt;
const libc = ffi.loadLibrary('libc.dylib'); // Or 'c' / 'msvcrt'&lt;/p&gt;

&lt;p&gt;const absVal = libc.abs(-42);&lt;br&gt;
const sqrtVal = libc.sqrt(2);&lt;/p&gt;

&lt;p&gt;window.console.log('C abs(-42) =', absVal);&lt;br&gt;
window.console.log('C sqrt(2)  =', sqrtVal);&lt;/p&gt;

&lt;p&gt;// 2. Manipulate a native Python DOM tree via Hyperscript h()&lt;br&gt;
function h(tag, props, ...kids) {&lt;br&gt;
  const el = document.createElement(tag);&lt;br&gt;
  for (const k in props) {&lt;br&gt;
    if (k === 'text') el.textContent = props[k];&lt;br&gt;
    else el.setAttribute(k, props[k]);&lt;br&gt;
  }&lt;br&gt;
  kids.forEach(c =&amp;gt; el.appendChild(&lt;br&gt;
    typeof c === 'string' ? document.createTextNode(c) : c&lt;br&gt;
  ));&lt;br&gt;
  return el;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;document.body.appendChild(&lt;br&gt;
  h('main', { class: 'card' },&lt;br&gt;
    h('h1', { text: 'Executed by myjs' }),&lt;br&gt;
    h('p', { text: 'Real Python DOM tree rendered from JS!' })&lt;br&gt;
  )&lt;br&gt;
);&lt;/p&gt;

&lt;p&gt;window.console.log('DOM Tree:', document.body.outerHTML);&lt;br&gt;
Run it via pipx:&lt;/p&gt;

&lt;p&gt;Bash&lt;br&gt;
$ pipx install myjs&lt;br&gt;
$ myjs myjs_demo.js&lt;br&gt;
Output:&lt;/p&gt;

&lt;p&gt;Plaintext&lt;br&gt;
C abs(-42)   = 42&lt;br&gt;
C sqrt(2)    = 1.4142135623730951&lt;br&gt;
DOM Tree     = &lt;/p&gt;
&lt;h1&gt;Executed by myjs&lt;/h1&gt;
&lt;p&gt;Real Python DOM tree rendered from JS!&lt;/p&gt;
&lt;br&gt;
host         = Darwin arm64 | python 3.13.12&lt;br&gt;
💡 Key Features&lt;br&gt;
Zero C-Compilers Required: Call C dynamic libraries, allocate raw C memory buffers, and pass function pointers straight from JS. Python’s runtime handles ABI resolution dynamically.

&lt;p&gt;Pure Python Portability: Embeddable anywhere Python runs—no heavy binary blobs (like V8) required.&lt;/p&gt;

&lt;p&gt;Direct DOM Integration: Mutate real domonic Python DOM nodes from within JS scripts.&lt;/p&gt;

&lt;p&gt;📦 Try It Out&lt;br&gt;
PyPI: &lt;a href="https://pypi.org/project/myjs/" rel="noopener noreferrer"&gt;https://pypi.org/project/myjs/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Installation: pip install myjs or pipx install myjs&lt;/p&gt;

&lt;p&gt;I’d love to hear feedback, feature ideas, or wild use cases from anyone interested in language runtimes, Python/JS interop, or native FFI bindings!&lt;/p&gt;

</description>
      <category>python</category>
      <category>javascript</category>
      <category>html</category>
      <category>c</category>
    </item>
    <item>
      <title>convert javascript to python</title>
      <dc:creator>Michael</dc:creator>
      <pubDate>Thu, 03 Sep 2026 07:49:49 +0000</pubDate>
      <link>https://dev.to/michael_b581c5c68faa9de1d/convert-javascript-to-python-3jp4</link>
      <guid>https://dev.to/michael_b581c5c68faa9de1d/convert-javascript-to-python-3jp4</guid>
      <description>&lt;p&gt;It's now easier to convert javascript to python than every before due to domonic! A full DOM in Python. see here:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/byteface/domonic-libs/" rel="noopener noreferrer"&gt;https://github.com/byteface/domonic-libs/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just clone this repo and tell claude what library you want to port, to make it faithful and lean on domonic's dom.py and javascript.py and bingo an hour later and a few reprompts and out pops a compatible library.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>javascript</category>
      <category>python</category>
      <category>html</category>
    </item>
    <item>
      <title>Beautiful Slop</title>
      <dc:creator>Michael</dc:creator>
      <pubDate>Sun, 30 Aug 2026 11:06:05 +0000</pubDate>
      <link>https://dev.to/michael_b581c5c68faa9de1d/beautiful-slop-4k1g</link>
      <guid>https://dev.to/michael_b581c5c68faa9de1d/beautiful-slop-4k1g</guid>
      <description>&lt;p&gt;I used AI to create a bs4 compatibility layer for domonic...&lt;/p&gt;

&lt;p&gt;&lt;a href="https://domonic.readthedocs.io/packages/bs4/" rel="noopener noreferrer"&gt;https://domonic.readthedocs.io/packages/bs4/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's called Beautiful Slop, let me know what you think&lt;/p&gt;

</description>
      <category>python</category>
      <category>javascript</category>
      <category>web</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
