<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: edemaine</title><link>https://news.ycombinator.com/user?id=edemaine</link><description>Hacker News RSS</description><docs>https://hnrss.org/</docs><generator>hnrss v2.1.1</generator><lastBuildDate>Thu, 25 Jun 2026 22:32:36 +0000</lastBuildDate><atom:link href="https://hnrss.org/user?id=edemaine" rel="self" type="application/rss+xml"></atom:link><item><title><![CDATA[New comment by edemaine in "Civet: A Superset of TypeScript"]]></title><description><![CDATA[
<p>Do blocks in Civet are mainly to provide shielded scopes (with local declarations). They're currently also necessary to handle declarations (const/let) in the middle of expressions, but hopefully they won't be necessary eventually - only when the user wants to shield scopes. They also have useful forms like `async do` that let you build Promises using await-style code.</p>
]]></description><pubDate>Wed, 23 Oct 2024 20:07:00 +0000</pubDate><link>https://news.ycombinator.com/item?id=41928834</link><dc:creator>edemaine</dc:creator><comments>https://news.ycombinator.com/item?id=41928834</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41928834</guid></item><item><title><![CDATA[New comment by edemaine in "Civet: A Superset of TypeScript"]]></title><description><![CDATA[
<p>Thanks for the report! This was tricky to track down, but I've got a fix: <a href="https://github.com/DanielXMoore/Civet/pull/1501">https://github.com/DanielXMoore/Civet/pull/1501</a></p>
]]></description><pubDate>Wed, 23 Oct 2024 20:03:50 +0000</pubDate><link>https://news.ycombinator.com/item?id=41928807</link><dc:creator>edemaine</dc:creator><comments>https://news.ycombinator.com/item?id=41928807</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41928807</guid></item><item><title><![CDATA[New comment by edemaine in "Civet: A Superset of TypeScript"]]></title><description><![CDATA[
<p>As an example, Solid's JSX compiler changes multiple times in a year. It's better to target JSX than the compiled form. There are also <i>many</i> JSX compilers. (Even React ships with at least two.)</p>
]]></description><pubDate>Tue, 22 Oct 2024 20:52:22 +0000</pubDate><link>https://news.ycombinator.com/item?id=41918571</link><dc:creator>edemaine</dc:creator><comments>https://news.ycombinator.com/item?id=41918571</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41918571</guid></item><item><title><![CDATA[New comment by edemaine in "Civet: A Superset of TypeScript"]]></title><description><![CDATA[
<p>Yes, Civet has taken a lot of syntactic inspiration from LiveScript. At this point, I think we have most of the good features, but we might be missing some. Let us know what you think!<p>The big difference, of course, is that Civet fully supports TypeScript, and is up-to-date with the latest JavaScript and TypeScript features.</p>
]]></description><pubDate>Tue, 22 Oct 2024 03:32:45 +0000</pubDate><link>https://news.ycombinator.com/item?id=41910950</link><dc:creator>edemaine</dc:creator><comments>https://news.ycombinator.com/item?id=41910950</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41910950</guid></item><item><title><![CDATA[New comment by edemaine in "Civet: A Superset of TypeScript"]]></title><description><![CDATA[
<p>The JSX spec hasn't changed for almost 10 years, and I'd guess there will never be a JSX 2.0. On the other hand, ideas for a better JSX are plentiful (check out the issues on the JSX repo, for example). If the spec never changes, how can we improve the JSX experience? Transpilation!<p>Civet's futuristic JSX compiles to actual spec-compliant JSX, to it's compatible with all forms of JSX, including React, Solid, etc. We'd like to support other DSLs like Astro and Svelte as well.</p>
]]></description><pubDate>Tue, 22 Oct 2024 03:27:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=41910930</link><dc:creator>edemaine</dc:creator><comments>https://news.ycombinator.com/item?id=41910930</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41910930</guid></item><item><title><![CDATA[New comment by edemaine in "Civet: A Superset of TypeScript"]]></title><description><![CDATA[
<p>Good question! I don't have hard numbers, but for larger files, I find that it can take on the order of a second to compile. It's still fast enough to get real-time feedback from TypeScript in VSCode, but it could definitely be faster. There's lots of optimization left to do; for now, we're focusing on features over speed, but we'll get to speed as well. (I am an algorithms guy after all!)</p>
]]></description><pubDate>Tue, 22 Oct 2024 03:20:56 +0000</pubDate><link>https://news.ycombinator.com/item?id=41910907</link><dc:creator>edemaine</dc:creator><comments>https://news.ycombinator.com/item?id=41910907</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41910907</guid></item><item><title><![CDATA[New comment by edemaine in "Civet: A Superset of TypeScript"]]></title><description><![CDATA[
<p>You can also turn off implicit returns in Civet if you don't like them. They also work well with TypeScript annotations: if you annotate a return value of `void`, then there's no implicit return.<p>I agree it can be easy to make and throw away big arrays if you're not aware of what's going on.  But it can also save a lot of time.  For loops as arrays are super useful, integrating the equivalent of "map" into the language itself.  We also recently added generator versions (for*).  JSX is a nice example where for loops as expressions and implicit return are powerful; see e.g. <a href="https://civet.dev/reference#code-children" rel="nofollow">https://civet.dev/reference#code-children</a></p>
]]></description><pubDate>Tue, 22 Oct 2024 03:16:57 +0000</pubDate><link>https://news.ycombinator.com/item?id=41910888</link><dc:creator>edemaine</dc:creator><comments>https://news.ycombinator.com/item?id=41910888</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41910888</guid></item><item><title><![CDATA[New comment by edemaine in "Civet: A Superset of TypeScript"]]></title><description><![CDATA[
<p>In case you wondered how Civet compared to CoffeeScript in these regards:<p>* `is not` is the textual equivalent of `!==`. You can use `isnt` if you turn on the feature explicitly (or even the weird CoffeeScript `is not` behavior if you want it, mainly for legacy code)<p>* Implicit returns are turned on by default. They are really useful, most of the time, and don't get in the way much if you use `void` return annotations (which turns them off). But if you don't like them, you can turn them off globally with a compiler flag.<p>* Civet's compiler is built on very different technology from CoffeeScript's (PEG parsing, similar to Python), and it is much more strict about indentation. None of those weird bugs anymore.<p>* We do have implicit parentheses and braces and such, but you're free to use explicit parentheses and braces as you like. We encourage people to rename their .ts files into .civet (which mostly just works without any converison) and just embrace the features/syntax they like.</p>
]]></description><pubDate>Tue, 22 Oct 2024 03:12:55 +0000</pubDate><link>https://news.ycombinator.com/item?id=41910863</link><dc:creator>edemaine</dc:creator><comments>https://news.ycombinator.com/item?id=41910863</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41910863</guid></item><item><title><![CDATA[New comment by edemaine in "Civet: A Superset of TypeScript"]]></title><description><![CDATA[
<p>It's doing a few things at once:<p>First line:<p>* `{min, max} := Math` is a destructuring declaration. It's similar to the destructuring assignment `{min, max} = Math` (i.e., `min = Math.min; max = Math.max`), but also declares min and max as const.<p>* The `operator` prefix means to treat min and max as new infix operators in the rest of the program.<p>Second line:<p>Given that min and max are infix operators, `value min ceiling max floor` is equivalent to `max(min(value, ceiling), floor)`. Yes, the latter is gross. That's why we like to write `value min ceiling max floor` instead. Think of it as "value minned with ceilling (i.e. capped at ceiling), then maxed with floor (i.e. prevented from going below floor)".</p>
]]></description><pubDate>Tue, 22 Oct 2024 03:04:52 +0000</pubDate><link>https://news.ycombinator.com/item?id=41910814</link><dc:creator>edemaine</dc:creator><comments>https://news.ycombinator.com/item?id=41910814</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41910814</guid></item><item><title><![CDATA[New comment by edemaine in "Civet: A Superset of TypeScript"]]></title><description><![CDATA[
<p>But we are using indentation style; that's one of the major design principles. In Civet, the body of an "if" can be multiple lines, and it's clear (from indentation) what they're nested under. Also, the body of an "if" statement can be empty, so if you comment out the body, the "if" doesn't apply to anything else. (This is an improvement over Python, which requires non-empty bodies, even if just to say "pass".)<p>I think there's a reason that Python is among the most popular programming languages, and part of it is the indentation-based syntax and lack of brackets. The core of Civet's syntax (originally inspired by CoffeeScript) is like a combination of JavaScript/TypeScript and Python, the two/three most popular programming languages.<p>But also, if you like brackets, you can include them! Most JavaScript/TypeScript code is also valid Civet. Just use the features you like.</p>
]]></description><pubDate>Tue, 22 Oct 2024 02:59:59 +0000</pubDate><link>https://news.ycombinator.com/item?id=41910791</link><dc:creator>edemaine</dc:creator><comments>https://news.ycombinator.com/item?id=41910791</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41910791</guid></item><item><title><![CDATA[New comment by edemaine in "Civet: A Superset of TypeScript"]]></title><description><![CDATA[
<p>We're definitely looking for ways to improve ways to specify types! I think destructured typing [<a href="https://civet.dev/reference#destructured-typing" rel="nofollow">https://civet.dev/reference#destructured-typing</a>] is already quite useful, especially for React. On the readability side, if/then/else [<a href="https://civet.dev/reference#conditional-types" rel="nofollow">https://civet.dev/reference#conditional-types</a>] seems easier to read than ?: ternaries, and "Partial Record Name, Info" seems easier to read than "Partial<Record<Name, Info>>" (implicit type arguments — <a href="https://civet.dev/reference#implicit-type-arguments" rel="nofollow">https://civet.dev/reference#implicit-type-arguments</a>). But we'd love to hear more ideas for features like branded types. Join us in Discord if you're interested!</p>
]]></description><pubDate>Tue, 22 Oct 2024 02:54:15 +0000</pubDate><link>https://news.ycombinator.com/item?id=41910764</link><dc:creator>edemaine</dc:creator><comments>https://news.ycombinator.com/item?id=41910764</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41910764</guid></item><item><title><![CDATA[New comment by edemaine in "Civet: A Superset of TypeScript"]]></title><description><![CDATA[
<p>One of the Civet devs here. To me, the main benefit of Civet is the ability to rapidly add useful features to the language, while preserving all the benefits of TS (tooling, etc.). We're constantly coming up with ideas — from TC39 proposals, other languages, or general brainstorming — and implementing them quickly. For example, we recently added pattern matching when catching exceptions, which took just a couple of hours of development; or Python-style from ... import ... for better autocompletion of imports. All of these features are optional; you can write well-formed TypeScript as usual, and just choose to use the features you think are worth the learning curve for readers. The plugins for VSCode, Vite, esbuild, Webpack, eslint, etc. aren't perfect, but they let Civet code enjoy most of the tooling out there.<p>I personally use Civet for all my coding projects, as I'm devoted to it continuing to flourish. But if you ever don't like what Civet is offering you, you can eject at any time by replacing your code with the TypeScript compilation, which we make as close as we can to your input.<p>What happens if a TC39 proposal is rejected? That's actually the good case for us, because it means we can keep the feature as is. Civet already transpiles all features to TypeScript, so they can live here forever if we think they're good. The trickier part is when Java/TypeScript changes in a way that's incompatible with Civet. Then we plan to change Civet to match Java/TypeScript, so that we don't diverge (though compiler flags allow us to also support the older form with explicit opt-in if we think it's worth doing so).<p>JavaScript and TypeScript move slow. Largely that's a good thing; they're a stable foundation, and we don't want to mess them up. But it's also exciting to be on the bleeding edge, explore new ideas, and obtain new features as quickly as we can design them, instead of waiting a decade. Many features are also too niche / add to much complexity for the general JavaScript language, but they're still fair game for languages that transpile to JavaScript. See also the recent JS0 vs. JSSugar discussion.</p>
]]></description><pubDate>Tue, 22 Oct 2024 02:45:58 +0000</pubDate><link>https://news.ycombinator.com/item?id=41910714</link><dc:creator>edemaine</dc:creator><comments>https://news.ycombinator.com/item?id=41910714</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=41910714</guid></item><item><title><![CDATA[New comment by edemaine in "Tetris Font (2020)"]]></title><description><![CDATA[
<p>Regarding the first question, I've gone ahead and implemented random build orders, so at least the two Ls in HELLO will usually produce different animations (depending on random choices). Designing completely different glyphs for the same letter is quite challenging (finding these already took a lot of work).<p>Regarding the second question, there's already a 2-second delay. I wonder if there should be a slider to specify the delay?</p>
]]></description><pubDate>Thu, 20 Jun 2024 22:17:39 +0000</pubDate><link>https://news.ycombinator.com/item?id=40744047</link><dc:creator>edemaine</dc:creator><comments>https://news.ycombinator.com/item?id=40744047</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40744047</guid></item><item><title><![CDATA[New comment by edemaine in "Tetris Font (2020)"]]></title><description><![CDATA[
<p>I find the back/forward buttons useful for undoing/redoing changes, so that I don't lose past cool designs / settings, though I can see it being a controversial approach.<p>That said, there were definitely way too much history generated when typing into a text field. I just implemented a planned compromise, where you only get a history event when changing a "committed" text field (meaning you previously defocused the field). Hopefully this is the best of both worlds!</p>
]]></description><pubDate>Thu, 20 Jun 2024 19:39:50 +0000</pubDate><link>https://news.ycombinator.com/item?id=40742464</link><dc:creator>edemaine</dc:creator><comments>https://news.ycombinator.com/item?id=40742464</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40742464</guid></item><item><title><![CDATA[New comment by edemaine in "Tetris Font (2020)"]]></title><description><![CDATA[
<p>Good idea! I've gone ahead and implemented this feature: if "obscure in URL" is turned on, the text won't be visible unless you focus on the textbox (e.g. to edit it).</p>
]]></description><pubDate>Thu, 20 Jun 2024 17:05:16 +0000</pubDate><link>https://news.ycombinator.com/item?id=40740887</link><dc:creator>edemaine</dc:creator><comments>https://news.ycombinator.com/item?id=40740887</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40740887</guid></item><item><title><![CDATA[New comment by edemaine in "Tetris Font (2020)"]]></title><description><![CDATA[
<p>I couldn't reproduce this bug. Perhaps the program you're using to display the GIF doesn't support the GIF frame delay feature? (E.g., Chrome seems to display them fine.) Feel free to open an issue on the repo if I'm missing something: <a href="https://github.com/edemaine/font-tetris">https://github.com/edemaine/font-tetris</a></p>
]]></description><pubDate>Thu, 20 Jun 2024 16:57:19 +0000</pubDate><link>https://news.ycombinator.com/item?id=40740803</link><dc:creator>edemaine</dc:creator><comments>https://news.ycombinator.com/item?id=40740803</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40740803</guid></item><item><title><![CDATA[New comment by edemaine in "Tetris Font (2020)"]]></title><description><![CDATA[
<p>Thanks for the feature suggestion! I've gone ahead and implemented random valid stacking order. So if you reload the page, and enter text that repeats the same letter more than once, you will hopefully get different build orders (depending on random choices). For example: <a href="https://erikdemaine.org/fonts/tetris/?text=aaaaa&rotate=0&speed=4" rel="nofollow">https://erikdemaine.org/fonts/tetris/?text=aaaaa&rotate=0&sp...</a></p>
]]></description><pubDate>Thu, 20 Jun 2024 16:54:09 +0000</pubDate><link>https://news.ycombinator.com/item?id=40740768</link><dc:creator>edemaine</dc:creator><comments>https://news.ycombinator.com/item?id=40740768</comments><guid isPermaLink="false">https://news.ycombinator.com/item?id=40740768</guid></item></channel></rss>