TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Lil: A Scripting Language

104 点作者 razetime超过 2 年前

8 条评论

samatman超过 2 年前
The &#x27;soft, spongy&#x27; type system is nice to see. That kind of strong dynamism is a good choice for the application: it will do the wrong thing sometimes, but will throw fewer show-stopping errors, which are really disheartening for casuals.<p>I do regard casting not-numbers to 0 as a flaw. I&#x27;ve had plenty of bugs where I wished `nil` would automatically cast to to `&quot;&quot;` in string position, or the empty list&#x2F;dict: but I have never, once, wanted a missing number to cast to 0.<p>The number zero doesn&#x27;t have the &quot;semantics of emptiness&quot; in programming. It shouldn&#x27;t be treated as false, either, unless we&#x27;re dealing with a &quot;raw&quot; language, in which case, one should have to at least <i>cast</i> to boolean to get the truthiness of anything.<p>Personally, I would promote this to an error, because the other option, &#x27;NaN&#x27;, is itself a source of confusion. But at least NaN-poisoning the calculation will eventually inform the user that &quot;htree&quot; isn&#x27;t a number.
评论 #33393871 未加载
mananaysiempre超过 2 年前
To clarify for others who only follow the link titles, this is not the Tcl-inspired scripting language LIL[1] nor the <i>other</i> Tcl-based, C-clothing-wearing scripting language Little[2].<p>[1] <a href="http:&#x2F;&#x2F;runtimeterror.com&#x2F;tech&#x2F;lil&#x2F;" rel="nofollow">http:&#x2F;&#x2F;runtimeterror.com&#x2F;tech&#x2F;lil&#x2F;</a><p>[2] <a href="https:&#x2F;&#x2F;www.little-lang.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.little-lang.org&#x2F;</a>, <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26204218" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=26204218</a>
评论 #33394080 未加载
nerdponx超过 2 年前
This looks like a really interesting set of language features. I do wonder why they decided to invent their own entirely new language though, instead of building on Tcl or Lua or a Basic dialect. Or even embedding Python. I can understand not wanting to use Scheme due to S-expressions being intimidating.<p>Did they consider them harder to learn in layers? Did they feel like some language features were lacking, or were unnecessary&#x2F;undesirable? Were there problems with syntax that prevented Decker scripts from looking the way they wanted them to look?
评论 #33410941 未加载
tuke超过 2 年前
Nice. The embedded querying is neat.<p>I see the query language goes: `select ... from`<p>One thing I like about query languages that start with the &quot;from&quot; class is that then it&#x27;s easier in REPLs to provide suggestions for what can be selected.<p>You type, say, `from people` and you can get a suggestion for `name`.
评论 #33394923 未加载
tangentstorm超过 2 年前
I&#x27;ve had the pleasure of alpha-testing several builds of lil and decker. It&#x27;s nice to see that it&#x27;s out in the wild now.<p>Some of the little applications I made in an hour or two each (with live help from the creator of Lil):<p>- a plotting program that tweens between two different plots when you move a slider<p>- a frame based traditional animation program<p>- a (color!) paint program with reflections for drawing little mandalas<p>It&#x27;s actually quite a nice tool for rapidly prototyping all kinds of applications.<p>Also, I&#x27;m not sure if it&#x27;s obvious from the given link, but there are implementations of both lil and decker in both C and JavaScript, so it&#x27;s an incredibly portable little system!
hoosieree超过 2 年前
Wow, the GUI calculator demo in ~2 minutes is pretty impressive: <a href="https:&#x2F;&#x2F;beyondloom.com&#x2F;decker&#x2F;" rel="nofollow">https:&#x2F;&#x2F;beyondloom.com&#x2F;decker&#x2F;</a>
dang超过 2 年前
Recent and related:<p><i>Decker, a platform that builds on the legacy of Hypercard and classic macOS</i> - <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33377964" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=33377964</a> - Oct 2022 (85 comments)
zasdffaa超过 2 年前
&gt; Lil has a soft, spongy, dynamic type system in which values do their best to convert to a more relevant type as the need arises.<p>Noooooo, this is a terrible idea if you want this to be used at any non-trivial scale
评论 #33394018 未加载
评论 #33393906 未加载