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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

New embedded programming language with C as a host language

95 点作者 dsvr将近 3 年前

12 条评论

dsvr将近 3 年前
Sergio here, the creator of Vely. Go ahead and roast it. Here&#x27;s a brief from the front page:<p>Vely is an embedded programming language with C as a host language. It&#x27;s precompiled into C, creating a native executable.<p>Vely empowers C with rich features, simplicity and enhanced safety. It is general-purpose and well-suited for web applications.<p>Use Vely to rapidly develop high-performance and low-footprint applications
评论 #32234329 未加载
评论 #32231930 未加载
评论 #32233087 未加载
评论 #32234874 未加载
评论 #32234628 未加载
lifthrasiir将近 3 年前
Without a value judgement here is my analysis. It bears an unexpected similarity with PHP&#x2F;FI 1.0, where a limited set of extended statements are mixed to the base language (which is HTML in PHP&#x2F;FI and C in Vely). I had a gut reaction that memory management would be problematic, and Vely &quot;solved&quot; it by implicitly owning all memory allocated by Vely statements and deallocating them at the end of the current request. If my understanding is correct, vv doesn&#x27;t seem to fully understand the C-plus-Vely language and just detects Vely keywords from C tokens [1], and I don&#x27;t think it&#x27;s a good idea.<p>[1] <a href="https:&#x2F;&#x2F;vely.dev&#x2F;language_statements.html" rel="nofollow">https:&#x2F;&#x2F;vely.dev&#x2F;language_statements.html</a> &quot;Note that, Vely statements, after translated into C code by vv, are generally made of multiple C statements, hence Vely statements can never be treated as single-line statements.&quot; (suggesting that there is no full parser for C-plus-Vely)
评论 #32233159 未加载
评论 #32233048 未加载
lelanthran将近 3 年前
Unless I&#x27;m reading this wrong, Vely doesn&#x27;t actually understand C, correct?<p>This means that all the diagnostics being emitted will be very confusing. When incorrect input is given, Vely doesn&#x27;t produce the error message, gcc does, which makes it difficult to match the error message to what the user actually typed in.<p>I&#x27;ve used (and created many[1]) &quot;embedded&quot; languages, and this is the biggest problem with those that simply do pattern matching and replacement: the language the programmer is writing is unaware of errors and the programmer has determine what they did wrong by looking at the generated code.<p>It&#x27;s not a big problem if the programmer understands this limitation; that the &quot;language&quot; is a macro language that blindly transforms input to output with no understanding of the input. If the programmer accepts this, it can be very useful.<p>[1] I just created a html preprocessor in bash this morning. It performs variable substitution using environment variables and runs the C preprocessor on the input, allowing #include directives, #ifdef, etc. It lets me write my HTML files in fragments that can conditionally include other HTML files, and it lets me put in variables in the HTML file that are substituted with values from the environment.<p>I&#x27;ve no doubt that this is a hacky solution, but<p>a) It took only an hour to write (thus far - there&#x27;s some TODOs in there for stuff that might be useful in the future)<p>b) It was quicker than downloading and learning to use an existing tool that does the same thing, and ensuring that all that tools dependencies are brought in as well.
评论 #32235592 未加载
hydroid7将近 3 年前
Actually for someone using C only for microcontroller, it is an interesting approach.<p>Hardware drivers, like USB, SPI, etc could be done in C and wiring up things and pushing data around in a more high level language.<p>After considering micropython for exactly that purpose, I was disappointed because of the implementation complexity and slowness of computations on that platform.<p>What are your thoughts on this?
评论 #32237148 未加载
评论 #32238289 未加载
评论 #32241144 未加载
goodpoint将近 3 年前
Nim does the same but with a Python-like syntax.
muricula将近 3 年前
What is this language&#x27;s approach to memory safety? Does it guarantee there can never be out of bounds accesses, use after frees, double frees, or other memory corruption errors? Anything which talks to attackers over the internet is a prime target for these sorts of attacks.
评论 #32235862 未加载
jesse__将近 3 年前
FYI the hello world example instructions border on unreadable on a phone due to the indentation<p><a href="https:&#x2F;&#x2F;vely.dev&#x2F;example_hello_world.html" rel="nofollow">https:&#x2F;&#x2F;vely.dev&#x2F;example_hello_world.html</a>
评论 #32234786 未加载
评论 #32233464 未加载
kgeist将近 3 年前
I know it&#x27;s just an example, but querying database, saving to file, displaying web page - all in one function - reminded me of old big-ball-of-mud PHP codebases.
评论 #32234837 未加载
tsegratis将近 3 年前
How about releasing Vely as both a standard c library and...<p>A syntax preprocessor that can be generically applied to multiple libraries
评论 #32241171 未加载
xigoi将近 3 年前
Please stop reusing extensions. “.v” is already used by Coq <i>and</i> by V.
评论 #32235819 未加载
评论 #32235841 未加载
评论 #32236821 未加载
TazeTSchnitzel将近 3 年前
Somewhere between PHP and Objective-C?
评论 #32235874 未加载
fomine3将近 3 年前
Vala, Vale, Vely, and others?
评论 #32235143 未加载
评论 #32233182 未加载
评论 #32233191 未加载
评论 #32233077 未加载