Hacker News .hnnew | past | comments | ask | show | jobs | submit | dsvr's commentslogin

There's a framework for C now at https://vely.dev which may help with C strings safety and memory management, among other things.


I found Vely on dev.to and did a test project with it. Pretty neat and solid.


Simpler way to parse JSON in C with Vely framework.

See how to get a JSON request from the web, either from an HTML form (via POST) or JavaScript (application/json) request body.

The example shows parsing JSON in two different ways: traversing the whole document, or extracting the exact fields you need.

The example is a list of cities, within states, within countries.

Disclosure: I am Vely's creator. - Sergio


Here's an example of how an existing (and maybe the oldest?) language but with "new armor" can significantly lower the carbon footprint:

Writing Green Software - Is Our Code Unfriendly to Environment - https://dev.to/velydev/writing-green-software-is-our-code-un...


Vely is a framework for C developers.

Improvements in Vely 13/12:

- Bunch of examples, including multitenant SaaS Notes application in only about 300 lines of code.

- Added JSON support.

- Added UTF8 support.

- Added Hash table support.

- Added cache for super fast REGEX pattern matching and replacement.

- Simplified SQL queries for a clean simple interface.

- Source files now have .vely file extension to make it easy to recognize Vely code.

- Building applications now has automatic library inclusion.

- Lots of bug fixes.

See release notes at https://vely.dev/release_notes.html for details.


That is a very interesting suggestion. The API underneath is already well-defined and documented in code. Something to consider for sure.


In this case, just check if there is, near the beginning of file:

#include "vely.h"

which has to be in every Vely .v file.


A new file won't have that at the top. Unless you create it first by copying a template, I guess.


That is one of the use cases I would say are perfect for Vely. A combination of a low-level and high-level approach, which is often needed, and not just in this arena.

IOT (Internet Of Things) is a major application area for Vely. Obviously what you mentioned may fall into that. But also for example IOT-edge systems, where the communication with multiple near-devices converges, gets processed and then delivered to a cloud server for congregation.


I guess you could say that. Quite a few comparisons here, and none really wrong as it's all in the eye of a beholder. Vely's main goal is to give you building blocks for general purpose application development, especially including web applications.


Vely statements are created to generate safe code that will take care of memory issues you mentioned. It's like using a library that does something for you safely, except that Vely provides an interface that is more flexible and easier.

The trick is for Vely to be rich enough to provide the functionality that's typically needed. That is its goal. I hope it's far enough along to be useful, and with time it will get even more so.

Generally, the memory used by Vely statements is created by Vely and you don't have to free it, in fact you shouldn't, it will be freed automatically, even if those pointers are lost or overwritten. The approach is to drastically minimize using C's allocation, and do that only when absolutely necessary, which for most applications should be never.

However, you can still write any C code that does horrible things with memory. Vely exists so you don't have to. The idea is to use Vely to write code that you might otherwise write in pure C and have those issues.


At the time I didn't know that. Perhaps .vely extension, I guess that would do it. Something to consider to be nice for sure. Thanks for that.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: