<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Hacker News: psewell</title><link>https://news.ycombinator.com/user?id=psewell</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Wed, 09 Sep 2026 15:02:54 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=psewell" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by psewell in "Writing Your Own Programming Language"]]></title><description><![CDATA[
<p>No.  First, understand what the language is for (if nothing, stop here...).  Second, make the main design choices (expressiveness of type system, level of control of mutability or lack thereof, etc.). Third, design the type system, with a view to type inference.  Fourth, design and define the semantics. Do those last two in a way that will let you test your implementation against these definitions automatically.  Fifth, think about sufficiently efficient implementation strategies.  Sixth, pick a syntactic style that will be familiar to most of your users.  Seventh, design the actual syntax.  Eighth, implement it.  Ninth, try it out on users and go back to the start.  Tenth, rest.</p>
]]></description><pubDate>Thu, 10 Nov 2016 18:22:06 +0000</pubDate><link>https://news.ycombinator.com/item?id=12922792</link><dc:creator>psewell</dc:creator><comments>https://news.ycombinator.com/item?id=12922792</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=12922792</guid></item><item><title><![CDATA[New comment by psewell in "Into the Depths of C: Elaborating the De Facto Standards [pdf]"]]></title><description><![CDATA[
<p>Indeed.  The long version is at [pdf] <a href="http://www.cl.cam.ac.uk/~pes20/cerberus/notes30-full.pdf" rel="nofollow">http://www.cl.cam.ac.uk/~pes20/cerberus/notes30-full.pdf</a>; it has 85 questions supported by concrete code examples and experimental data, e.g. (one of several questions that refine the above):<p>Q64. After an explicit write of zero to a padding<p>byte followed by a write to adjacent members of<p>the structure, does the padding byte hold a<p>well-defined zero value? (not an unspecified<p>value)<p><pre><code>  #include <stdio.h>

  #include <stddef.h>

  typedef struct { char c; float f; int i; } st;

  int main() {

    // check there is a padding byte between c and f

    size_t offset_padding = offsetof(st,c)+sizeof(char);

    if (offsetof(st,f)>offset_padding) {

        st s; 

        unsigned char *p = 

          ((unsigned char*)(&s)) + offset_padding;

        *p = 0;

        s.c = 'A';

        s.f = 1.0;

        s.i = 42;

        unsigned char c3 = *p; 

        // does c3 hold 0, not an unspecified value?

        printf("c3=0x%x\n",c3);

    }

    return 0;

  }
</code></pre>
Some of the questions have clear answers with respect to either the ISO or de facto standards, but many do not - that's the point.</p>
]]></description><pubDate>Wed, 01 Jun 2016 21:59:10 +0000</pubDate><link>https://news.ycombinator.com/item?id=11818575</link><dc:creator>psewell</dc:creator><comments>https://news.ycombinator.com/item?id=11818575</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=11818575</guid></item></channel></rss>