<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://danzheng.me/feed.xml" rel="self" type="application/atom+xml" /><link href="https://danzheng.me/" rel="alternate" type="text/html" /><updated>2026-03-26T06:34:43+00:00</updated><id>https://danzheng.me/feed.xml</id><title type="html">Dan Zheng</title><subtitle>Dan Zheng
</subtitle><author><name>Dan Zheng</name></author><entry><title type="html">Dad’s award acceptance speech</title><link href="https://danzheng.me/2022/11/05/dad-award-acceptance-speech.html" rel="alternate" type="text/html" title="Dad’s award acceptance speech" /><published>2022-11-05T14:19:00+00:00</published><updated>2022-11-05T14:19:00+00:00</updated><id>https://danzheng.me/2022/11/05/dad-award-acceptance-speech</id><content type="html" xml:base="https://danzheng.me/2022/11/05/dad-award-acceptance-speech.html"><![CDATA[<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>from:	Zheng, Guohe &lt;...&gt;
to:	Dan Zheng &lt;...&gt;
date:	Nov 3, 2022, 4:44 PM
subject:	Acceptance Speech
</code></pre></div></div>

<blockquote>
  <h2 id="acceptance-speech-of-2022-iflta-distinguished-world-language-advocate-award">Acceptance Speech of: 2022 IFLTA Distinguished World Language Advocate Award</h2>

  <p>It is a great honor to receive the 2022 IFLTA Distinguished World Language Advocate Award. The honor came to me as a surprise because I already retired in May from Ball State University, after teaching there for 25 years. I would like to thank Board members of AITJ for nominating a retiree for this honor.</p>

  <p>Given the nature of the Advocate Award, today’s ceremony provides an occasion for me to look back at the paths that Japanese Education in Indiana has gone through in the past quarter century.</p>

  <p>A few lines from my CV have highlighted the ups and downs of the paths. For example,  one line says that “in the 3 years from 1999-2001, my colleague Dr. Tomizawa and I received $233,000.00 from Indiana Department of Education to train Indiana teachers in the development of Japanese culture curriculum in Indiana Schools including funds to take participating teachers and school administrators to Japan.” That project was completed in the summer right before 911. In retrospect, the pre-911 years were a golden age for World Language Education. Grant money seemed to be always available. All you need to do was to submit a proposal.</p>

  <p>But 911 changed everything. And 911 was followed by the 2008-2009 recession, by the subsequent budget-cut everywhere. World languages, particularly less-taught languages such as Japanese, were on top of the budge-cut list, even program elimination. Moreover, due to the rise of China around the time, Japanese programs came to face the competition from emerging Chinese programs.</p>

  <p>But Japanese programs in Indiana demonstrated great resilience in times of difficulties. This is shown by another line of my CV. In 2013, I co-edited a volume entitled Embracing the new phase in Japanese education in the United States, the Proceedings of the 23rd Annual Conference of the Central Association of Teachers of Japanese. That volume included stories of how some Japanese programs were phased out in Indiana, or forced to switch to Chinese, but it included more stories of how Japanese programs were retained with increased enrollment coming unexpectedly from students from China, or with petitions by students and parents, out of their love of their engaging and inspiring teachers of Japanese. Another way to cope with the challenge was the launching of dual credit Japanese in Indiana in 2013, which attracted many high school students. I am very proud to have played a role in creating and supervising Indiana Japanese dual credit and in doing so have had the good fortune to know many excellent high school teachers and learned so much from them, particularly their creative application of technology in the classroom.</p>

  <p>Covid-19 in the past 3 years proved another major challenge to us all. I am proud to report that there was no interruption of the AITJ-sponsored annual high school student Japanese competition called JOI, Japanese Olympiad of Indiana. In fact, the online JOI generated more enthusiasm and creativity from the students.</p>

  <p>As I stand here at the end of my career, I want to tell teachers mid-way in their career, but particularly teachers who have just started their career, that, I am confident that, even though you may have new challenges down the road, the future of Japanese education in Indiana is bright. My confidence comes from my personal journey of the past quarter century. Thank you all.</p>
</blockquote>]]></content><author><name>Dan Zheng</name></author><summary type="html"><![CDATA[from: Zheng, Guohe &lt;...&gt; to: Dan Zheng &lt;...&gt; date: Nov 3, 2022, 4:44 PM subject: Acceptance Speech]]></summary></entry><entry><title type="html">Effective type erasure</title><link href="https://danzheng.me/draft/2022/10/09/effective-type-erasure.html" rel="alternate" type="text/html" title="Effective type erasure" /><published>2022-10-09T15:25:00+00:00</published><updated>2022-10-09T15:25:00+00:00</updated><id>https://danzheng.me/draft/2022/10/09/effective-type-erasure</id><content type="html" xml:base="https://danzheng.me/draft/2022/10/09/effective-type-erasure.html"><![CDATA[<p>Bloop</p>

<p>Swift-focused</p>]]></content><author><name>Dan Zheng</name></author><category term="draft" /><category term="programming-languages" /><category term="swift" /><summary type="html"><![CDATA[Bloop]]></summary></entry><entry><title type="html">ML and PL can help each other</title><link href="https://danzheng.me/draft/2022/10/09/draft-ml-and-pl-can-help-each-other.html" rel="alternate" type="text/html" title="ML and PL can help each other" /><published>2022-10-09T04:50:00+00:00</published><updated>2022-10-09T04:50:00+00:00</updated><id>https://danzheng.me/draft/2022/10/09/draft-ml-and-pl-can-help-each-other</id><content type="html" xml:base="https://danzheng.me/draft/2022/10/09/draft-ml-and-pl-can-help-each-other.html"><![CDATA[<p>Terminology:</p>
<ul>
  <li>ML = machine learning</li>
  <li>PL = programming languages</li>
</ul>

<hr />

<p>The fields of ML and PL view the world from different perspectives.</p>

<p>&lt;system 1 vs system 2&gt;</p>

<p>ML is probabilistic and good at making suggestions, but has no guarantees built-in about properties of their predictions</p>

<p>PL techniques are rule-based (type systems, formal verification, etc) and guaranteed correct, but often do not scale to real world scenarios (production languages like C++, not enough of a sound solid base with nice properties to start with, need to build toy languages)</p>

<p>&lt;link to Lucas’ talk at PLDI about GitHub Copilot&gt;</p>

<p>It’s common for PL people to be skeptical of ML techniques, and vice versa.</p>

<p>However, one in which I learned on my current team is learning about how ML and PL can help each other.</p>

<p>&lt;PL: good training data for ML, known oracles like type checkers and theorem provers&gt;</p>

<p>&lt;ML: allow producing lots of suggestions&gt;</p>

<p>&lt;Cite Prof Mayur Naik’s talk, slides about system 1 vs system 2&gt;</p>

<p>View ML and PL not as in competition (actively bad) or orthogonal (neutral fields going in their own direction) but a positive feedback loop: ML helps PL be better at helping ML, etc</p>

<ul>
  <li>ML supports constrained decoding: can limit the vocabulary for the next token to autoregressively regress.</li>
  <li>
    <p><a href="https://arxiv.org/abs/2205.11822">Maieutic prompting</a>: a way to turn soft predictions from LLMs into more confident facts via clever self-consistency checking. Also enables getting confidence intervals on predictions, by recursively applying the approach to justify explanations and their negations. A good example of turning soft predictions into harder facts (not guaranteed, but quantified higher confidence).</p>
  </li>
  <li>Consideration: models are good at learning correct syntax, robust against typos. Want to use PL for the biggest value-add, e.g. add data that provides the greatest value and is most difficult for model to learn by itself. (Consider adding an 2D plot of difficulty vs value).</li>
</ul>

<hr />

<p>After I joined this team, it took me a year to feel comfortable. … The nature of the work felt so different: much of ML (these days, at least my work) is transforming data and running command line invocations.</p>

<p>However, talking to expert researchers helped me feel better over time: learning about what makes them excited helped me become excited and productive.</p>

<p>And then I learned about the connections between my past and current work, how ML and PL can help each other. <a href="https://www.youtube.com/watch?v=UF8uR6Z6KLc">connecting the dots</a></p>

<p>Meta point: having multiple areas of expertise is not zero sum, total knowledge is more than sum of the parts, interesting insights and connections are waiting to be discovered – the best of both worlds</p>

<p>Good researchers can dive in and find interesting aspects of any subject!</p>]]></content><author><name>Dan Zheng</name></author><category term="draft" /><category term="programming-languages" /><category term="machine-learning" /><summary type="html"><![CDATA[Terminology: ML = machine learning PL = programming languages]]></summary></entry><entry><title type="html">learning-korean</title><link href="https://danzheng.me/draft/2021/09/17/learning-korean.html" rel="alternate" type="text/html" title="learning-korean" /><published>2021-09-17T15:12:00+00:00</published><updated>2021-09-17T15:12:00+00:00</updated><id>https://danzheng.me/draft/2021/09/17/learning-korean</id><content type="html" xml:base="https://danzheng.me/draft/2021/09/17/learning-korean.html"><![CDATA[<p>I started learning Korean early in 2021, perhaps January.</p>]]></content><author><name>Dan Zheng</name></author><category term="draft" /><summary type="html"><![CDATA[I started learning Korean early in 2021, perhaps January.]]></summary></entry><entry><title type="html">Chinese ↔ Japanese</title><link href="https://danzheng.me/draft/2020/12/25/chinese-and-japanese.html" rel="alternate" type="text/html" title="Chinese ↔ Japanese" /><published>2020-12-25T14:56:00+00:00</published><updated>2020-12-25T14:56:00+00:00</updated><id>https://danzheng.me/draft/2020/12/25/chinese-and-japanese</id><content type="html" xml:base="https://danzheng.me/draft/2020/12/25/chinese-and-japanese.html"><![CDATA[<h2 id="china--japan">China → Japan</h2>

<ul>
  <li>Japan is part of the Chinese cultural sphere</li>
  <li>They learned and borrowed kanji (Chinese characters)</li>
</ul>

<h2 id="china--japan-1">China → Japan</h2>

<ul>
  <li>Japan was first modernized in the Meiji Restoration</li>
  <li>Many ideas and <em>actual Chinese words</em> were first invented by the Japanese (need sources)
    <ul>
      <li>Examples: society, science, chemistry, time(?), etd</li>
    </ul>
  </li>
</ul>

<h2 id="what-next">What next?</h2>

<p>More culture is coming from Japan into China in recent years</p>

<p>What about the other direction? I really do not know</p>]]></content><author><name>Dan Zheng</name></author><category term="draft" /><summary type="html"><![CDATA[China → Japan]]></summary></entry><entry><title type="html">On intelligence</title><link href="https://danzheng.me/draft/2020/12/25/intelligence.html" rel="alternate" type="text/html" title="On intelligence" /><published>2020-12-25T03:34:00+00:00</published><updated>2020-12-25T03:34:00+00:00</updated><id>https://danzheng.me/draft/2020/12/25/intelligence</id><content type="html" xml:base="https://danzheng.me/draft/2020/12/25/intelligence.html"><![CDATA[<h1 id="what-is-intelligence">What is intelligence?</h1>

<h2 id="g-constant">$g$ constant</h2>

<p>Trying to find one number</p>

<h2 id="programming-languages">Programming languages</h2>

<ul>
  <li>Turing tarpit</li>
  <li>Escape from tarpit by comparing relative expressiveness
    <ul>
      <li>Non-trivial (local) transformation = A is more expressive than B</li>
    </ul>
  </li>
  <li>What is the productivity number?
    <ul>
      <li>Hard to define, productivity is subjective and depends on complex human variables</li>
    </ul>
  </li>
</ul>

<h2 id="compression">Compression</h2>

<ul>
  <li>Kolmogorov complexity: reduce a program without losing information</li>
</ul>

<h2 id="prediction">Prediction</h2>

<ul>
  <li>Are some models better than others?
    <ul>
      <li>Character-model vs token-model vs tree-structured model</li>
    </ul>
  </li>
</ul>

<h2 id="humor">Humor</h2>

<ul>
  <li>Humor requires prediction, or can be formulated as seq2seq problem</li>
  <li>Humor requires compression: some jokes are best concise and bite-sized</li>
</ul>

<h3 id="acknowledgements">Acknowledgements</h3>

<p>Denys</p>]]></content><author><name>Dan Zheng</name></author><category term="draft" /><summary type="html"><![CDATA[What is intelligence?]]></summary></entry><entry><title type="html">Type erasure in Swift</title><link href="https://danzheng.me/draft/2020/12/17/swift-type-erasure.html" rel="alternate" type="text/html" title="Type erasure in Swift" /><published>2020-12-17T04:59:00+00:00</published><updated>2020-12-17T04:59:00+00:00</updated><id>https://danzheng.me/draft/2020/12/17/swift-type-erasure</id><content type="html" xml:base="https://danzheng.me/draft/2020/12/17/swift-type-erasure.html"><![CDATA[<h2 id="heavyweight-pattern-type-erasure-of-pats">Heavyweight pattern: type-erasure of PATs</h2>

<ul>
  <li>Requires three auxiliary types
    <ul>
      <li>Abstract box type
        <ul>
          <li>If protocol: it’s okay I guess</li>
          <li>If class: need abstract class fatalError stubs</li>
        </ul>
      </li>
      <li>Concrete box type
        <ul>
          <li>Forwarding shims</li>
        </ul>
      </li>
      <li>User-facing <code class="language-plaintext highlighter-rouge">AnyXXX</code> type
        <ul>
          <li>Stores an abstract box, implemented as a concrete box</li>
        </ul>
      </li>
    </ul>
  </li>
</ul>

<h2 id="possible-to-type-erase-generic-parameters">Possible to type-erase generic parameters?</h2>

<ul>
  <li>Seems hard if you try to store it, can’t do <code class="language-plaintext highlighter-rouge">TensorN&lt;Shape = _, Scalar = _&gt;</code></li>
  <li>But wait… possible with closures! Introducing closure-based type erasure</li>
</ul>

<h2 id="closure-fusion">Closure fusion</h2>

<p>Demonstrates successful optimization across composition of type-erased calculations using functions..</p>

<p>https://gist.github.com/dabrahams/a44a2a078d8556ef9c2ff2c56e83e62a</p>

<ul>
  <li>Note: closures are like <code class="language-plaintext highlighter-rouge">callAsMethod</code> function. This works best for types that have one main purpose: e.g. tensors are indexers, functions like <code class="language-plaintext highlighter-rouge">+</code> can be implemented in this paradigm.</li>
  <li>There is some relation to closures vs objects. Check out the Koan: https://wiki.c2.com/?ClosuresAndObjectsAreEquivalent</li>
</ul>

<h2 id="type-erasure-survey">Type erasure survey</h2>

<p>https://gist.github.com/dabrahams/c75760b7ed36dd4f039f3679ede825ea</p>]]></content><author><name>Dan Zheng</name></author><category term="draft" /><category term="swift" /><summary type="html"><![CDATA[Heavyweight pattern: type-erasure of PATs]]></summary></entry><entry><title type="html">On tribalism</title><link href="https://danzheng.me/draft/2020/12/15/tribalism.html" rel="alternate" type="text/html" title="On tribalism" /><published>2020-12-15T16:38:00+00:00</published><updated>2020-12-15T16:38:00+00:00</updated><id>https://danzheng.me/draft/2020/12/15/tribalism</id><content type="html" xml:base="https://danzheng.me/draft/2020/12/15/tribalism.html"><![CDATA[<h3 id="what-is-the-expressivity-number">What is the expressivity number?</h3>

<ul>
  <li>Turing tarpit</li>
  <li>Escape from tarpit by comparing relative expressiveness
    <ul>
      <li>Non-trivial (local) transformation = A is more expressive than B</li>
    </ul>
  </li>
</ul>

<h3 id="what-is-the-productivity-number">What is the productivity number?</h3>

<h3 id="acknowledgements">Acknowledgements</h3>

<p>Denys</p>]]></content><author><name>Dan Zheng</name></author><category term="draft" /><summary type="html"><![CDATA[What is the expressivity number?]]></summary></entry><entry><title type="html">What is a compiler?</title><link href="https://danzheng.me/draft/2020/12/14/what-is-a-compiler.html" rel="alternate" type="text/html" title="What is a compiler?" /><published>2020-12-14T17:22:00+00:00</published><updated>2020-12-14T17:22:00+00:00</updated><id>https://danzheng.me/draft/2020/12/14/what-is-a-compiler</id><content type="html" xml:base="https://danzheng.me/draft/2020/12/14/what-is-a-compiler.html"><![CDATA[<p>What is a compiler?</p>

<h3 id="start-small-brain">Start (small brain)</h3>

<p>Lexing -&gt; Parsing -&gt;</p>

<h3 id="bigger-brain">Bigger brain</h3>

<p>Why spend time on parsing?</p>

<p>What matters is:</p>
<ul>
  <li>Definition of AST as an ADT</li>
  <li>All compiler functionality (interpret, compile, pretty-printing) are recursive functions with a big switch-case over the ADT</li>
</ul>

<h3 id="conal-elliott">Conal Elliott</h3>

<p>Commutative diagram</p>

<ul>
  <li>Program</li>
  <li>Hardware</li>
  <li>Denotation (essence)</li>
</ul>

\[\begin{tikzcd}
A \arrow{r}{\varphi} \arrow[swap]{d}{\varrho_f} &amp; B \arrow{d}{\varrho_g} \\%
A_f \arrow{r}{\varphi_f}&amp; B_g
\end{tikzcd}\]

<h3 id="back-to-the-real-world">Back to the real world</h3>

<p>What kind of compiler job should I look for?</p>]]></content><author><name>Dan Zheng</name></author><category term="draft" /><summary type="html"><![CDATA[What is a compiler?]]></summary></entry><entry><title type="html">Tennis rackets</title><link href="https://danzheng.me/draft/2020/08/26/tennis-rackets.html" rel="alternate" type="text/html" title="Tennis rackets" /><published>2020-08-26T05:00:00+00:00</published><updated>2020-08-26T05:00:00+00:00</updated><id>https://danzheng.me/draft/2020/08/26/tennis-rackets</id><content type="html" xml:base="https://danzheng.me/draft/2020/08/26/tennis-rackets.html"><![CDATA[]]></content><author><name>Dan Zheng</name></author><category term="draft" /><category term="sports" /><summary type="html"><![CDATA[]]></summary></entry></feed>