Hacker Newsnew | past | comments | ask | show | jobs | submit | hkalbasi's commentslogin

I like https://github.com/rust-sailfish/sailfish more. It accepts arbitrary Rust code in the template so you don't need to learn another syntax.


For ~100K authors with content on Github Pages, Liquid conformance avoids learning new template syntax or a programming language.

For a greenfield site where Jekyll/Liquid compatibility is not beneficial, Zola may be an option, https://github.com/getzola/zola


One key feature of Liquid is that you can safely run customer-written code on your servers without worrying about security. It's a very underpowered language by design. This means that it's rather easy to be confident that its sandbox isn't leaky.


Looks like this does compile time templating. There are reasons to explore using those over runtime templating but they don't cover all of the use cases.


How it compares to other libraries in this space, e.g. reedline or rustyline?


Wow! rustyline has intensive support for a lot of the actions and things the user can do. Though I wanted to provide a more restrictive yet powerful abstraction that’s my I chose a trait based approach. It provides the exact control needed on certain aspects of the shell while providing ample control because of the shared state. Initially, I was planning to make the functions async, but I rather choose to pass the async runtime instead. It solves for 2 cool use-cases; 1 we can call block_on and manage an async task in the flow, or 2 queue in the action and consider pooling it when needed.


> iOS Simulator or the Android Simulator, which based on experience, neither are made for anything resembling "quickly".

It's not adb / avd or some device emulator. It's an app that you install on your device, and then it can load your app from your development device using a link. I was able to run it in 5 minutes without having android studio or any other android development kits on my laptop.


Thats neat. It makes me think of expo [0] that does it in the same way, pretty useful to try stuff quickly, but forces to go though their servers.

[0] https://expo.dev/


> In the framekernel OS architecture, the entire OS resides in the same address space (like a monolithic kernel) and is required to be written in Rust. However, there's a twist---the kernel is partitioned in two halves ... the unprivileged Services must be written exclusively in safe Rust.

Unprivileged services can exploit known compiler bugs and do anything they want in safe Rust. How this affects their security model?


I think it's not so much intended as a "you can allow arbitrary untrusted code to run as an unprivileged service" and more "a buggy unprivileged service won't compromise the whole system".


Zngur allows you to write functions operating over Rust types, adding methods to Rust types and implementing Rust traits for C++ and Rust types inside C++. So you can write a rusty wrapper for the C++ library inside C++.

If you want to immediately use a C++ library in Rust with minimal manual effort, check out autocxx [0]. Its generated api isn't very idiomatic Rust, and it uses Pin, moveit, ... but it covers a good percent of C++ apis and you can also make an idiomatic wrapper for it in Rust.

[0] https://docs.rs/autocxx/latest/autocxx/



It does pass this information to LLVM, in the form of the `readonly` attribute. This seems to be a bug in LLVM that does not optimize the function propely, I don't know why.


Among things mentioned in the article, pattern matching of strings is already available in the nightly.


Open AI knows every text that is generated by ChatGPT, so it can run a simple search algorithm instead of an AI model and achieve way higher true positive rate?


Not super useful without ADTs, but nice! I hope someday ADT and pattern matching find their way to the c++ language.


Sadly lvariant did not get into C++ language. The library supports pattern matching against std::variant/std::any and class inheritance as a replacement.


Can you mention the difference that made Go code is more readable than C++ and Rust?


> Can you mention the difference that made Go code is more readable than C++ and Rust?

Probably not, and to be fair anyone else's preference is equally valid. I think largely what individuals consider most readable depends less on what's being read and assessed now, and more on what route a developer has taken to reach this point in their career.

If I'm honest it's more about unconscious familiarity with idioms and constructs than it is an isolated unbiased opinion.

And I'd probably also change my comment slightly to say that by "Go code" I really did mean the actual code doing the work; I find the tests far less appealing.


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

Search: