Common Lisp-like condition system for Fennel language and Lua runtime

Hi r/lua! I'd like to announce the release of a library that implements Common Lisp-like condition system for Fennel language and Lua runtime - fennel-conditions.

Since this subreddit is about Lua, I understand that this may not be very relevant, as it doesn't target Lua language directly, rather the Lua runtime, via custom compiler, but I hope this still may be interesting, as this library provides alternative ways of error handling, which are mostly unique to Common Lisp.

If this library will receive a lot of interest from Lua users, I will consider porting it in such way that it can be used from Lua directly. (It is possible right now, but you would not want to write all that code by hand which is generated by macros provided in this library).

First, a bit about what Fennel is. Fennel is a Lisp-like language and a surface syntax for Lua, that compiles directly to Lua code. Fennel itself has no runtime, and is more a compiler rather than a language, but it provides a lot of additional facilities via macros, like table comprehensions, or pattern matching, and other things. Macros also allow to extend the language with new syntactic constructions, and this library is an example of that.

What is a condition system?

Condition system is something that is also known as resumable exception model, but it doesn't stop there in Common Lisp. It's a powerful control flow system, which also provides error handling. This library implements only the error handling part, but it's still pretty significnat part.

The condition system is implemented by introducing a dynamic scope. Lua doesn't have dynamic scope OOTB, but it does have tables, which can act as a dynamic scope. This library then maintains this dynamic scope state via various macros, like handler-case, restart-case, handler-bind, and so on.

Condition is an object, which can indicate that something happened. It can be any object, e.g. string, or table, but this library provides its own condition object type, which is based on the table, but has inheritance semantics. But condition objects by itself can't do anything, and the meat of this library is its own implementation of error function, which implements resumable exception point. Additionally there are non-error condition signaling functions like warn and signal. They provide the same resumable exception points, but do not interrupt flow of the pro

... keep reading on reddit ➑

πŸ‘︎ 14
πŸ’¬︎
πŸ‘€︎ u/andreyorst
πŸ“…︎ May 30 2021
🚨︎ report
The common understanding of Polymorphism takes into account only the runtime type of the β€œreceiving” object. That’s the implementation in most languages. But what if we also consider the method arguments as part of the runtime method resolution logic? That’s the idea behind β€œMultiple Dispatch.” vkontech.com/polymorphism…
πŸ‘︎ 30
πŸ’¬︎
πŸ‘€︎ u/Vasilkosturski
πŸ“…︎ Oct 10 2020
🚨︎ report
The common understanding of Polymorphism takes into account only the runtime type of the β€œreceiving” object. That’s the implementation in most languages. But what if we also consider the method arguments as part of the runtime method resolution logic? That’s the idea behind β€œMultiple Dispatch.” vkontech.com/polymorphism…
πŸ‘︎ 25
πŸ’¬︎
πŸ‘€︎ u/Vasilkosturski
πŸ“…︎ Nov 28 2020
🚨︎ report
[Question] Using Target Property COMMON_LANGUAGE_RUNTIME

I'm trying to enable the /clr option in Visual Studio 2017 C++ project using CMake and have been unsuccessful. Here is an example CMakeLists.txt I'm using

cmake_minimum_required(VERSION 3.15)

project(abc)
add_library(def SHARED main.cpp)

set_property(TARGET def PROPERTY COMMON_LANGUAGE_RUNTIME "")
set_property(TARGET def PROPERTY DOTNET_TARGET_FRAMEWORK_VERSION "v4.7.2")
set_property(TARGET def PROPERTY VS_DOTNET_REFERENCES "System")
set_property(TARGET def APPEND_STRING PROPERTY LINK_FLAGS_DEBUG " /ASSEMBLYDEBUG")

According to the documentation the value of "" should enable the /clr option but nothing ever changes in the project. Any help would be appreciated.

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/SeaPeaJay
πŸ“…︎ Dec 12 2019
🚨︎ report
Introduction to the Common Language Runtime (CLR) github.com/dotnet/coreclr…
πŸ‘︎ 102
πŸ’¬︎
πŸ‘€︎ u/xyziemba
πŸ“…︎ Feb 07 2015
🚨︎ report
Thread basics in Windows and the Common Language Runtime trevorhartsblog.com/2018/…
πŸ‘︎ 7
πŸ’¬︎
πŸ‘€︎ u/Trevor266
πŸ“…︎ Apr 04 2018
🚨︎ report
[github] Introduction to the Common Language Runtime github.com/dotnet/coreclr…
πŸ‘︎ 87
πŸ’¬︎
πŸ‘€︎ u/Subtle__
πŸ“…︎ Apr 24 2016
🚨︎ report
Can you make a pure functional language typed well enough to never throw runtime errors?

Is this doable? Is this practical? Does any language already do this?

πŸ‘︎ 52
πŸ’¬︎
πŸ‘€︎ u/scrogu
πŸ“…︎ Dec 16 2021
🚨︎ report
MiniVM: A zero-dependency cross-language runtime on par with LuaJIT and C github.com/FastVM/minivm
πŸ‘︎ 60
πŸ’¬︎
πŸ‘€︎ u/binaryfor
πŸ“…︎ Jan 08 2022
🚨︎ report
Overview of threads in Windows and the common language runtime trevorhartsblog.com/2018/…
πŸ‘︎ 9
πŸ’¬︎
πŸ‘€︎ u/Trevor266
πŸ“…︎ Apr 04 2018
🚨︎ report
MiniVM: A zero-dependency cross-language runtime on par with LuaJIT and C github.com/FastVM/minivm
πŸ‘︎ 37
πŸ’¬︎
πŸ‘€︎ u/binaryfor
πŸ“…︎ Jan 08 2022
🚨︎ report
Cardano working with Runtime Verification to design Yella (IELE): developers on the Cardano blockchain will be able to write dApps and execute them in ANY popular programming language.

Let’s face it: Haskell is too hard a programming language to write and the hate cardano gets for it is more than justified, but Cardano is aware of the problem and working on an adequate solution: They are working with Runtime Verification to design Yella (IELE).

Using IELE, developers on the Cardano blockchain will be able to write dApps and execute them in ANY popular programming language. It will also support Ethereum’s Solidity so that developers who want to leave Ethereum can do so with ease. That’s a huge deal, as Devs now have it much er easier developing on Cardano’s blockchain and will drive adoption even further.

You can also find more info about IELE in the article below.

https://iohk.io/en/blog/posts/2021/05/10/runtime-verification-iele-from-interoperability-to-universality/

πŸ‘︎ 71
πŸ’¬︎
πŸ‘€︎ u/KofiOlut
πŸ“…︎ Dec 01 2021
🚨︎ report
MiniVM: A zero-dependency cross-language runtime on par with LuaJIT and C github.com/FastVM/minivm
πŸ‘︎ 83
πŸ’¬︎
πŸ‘€︎ u/binaryfor
πŸ“…︎ Jan 08 2022
🚨︎ report
Could you create a Rust like language for the dot-net runtime?

Hoping to get a better understanding here. Could you create a Rust like language for the dot-net runtime? Ignoring the why would you do such a thing parts of the question - would it be possible to write a language that targeted the runtime that allowed you to be specific about ownership of objects in a similar way that the Rust language does?

EDIT: I should clarify I guess what I'm trying to understand - it was hard to phrase the question earlier because I wasn't even sure what I was trying to ask.

As I understand, the Rust language doesn't need a traditional "garbage collector" because it moves the problem of object ownership from a run-time problem to a compile-time problem. I'm asking if it would be possible to accomplish the same thing for a not invented language that targeted the CLR, essentially bypassing the need for the CLR to do garbage collection?

As for the "why would you do this?" I agree it's a silly thing. Different platforms exist for different reasons, and if you were to do such a thing you'd be missing the point of all the benefits of the CLR. If you want compile time checking of objects, I agree, just go ahead and use Rust rather than trying to invent a new language for the dot-net runtime.

πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/wpokcnumber4
πŸ“…︎ Dec 19 2021
🚨︎ report
Can you make a pure functional language typed well enough to never throw runtime errors? /r/ProgrammingLanguages/c…
πŸ‘︎ 16
πŸ’¬︎
πŸ‘€︎ u/kinow
πŸ“…︎ Dec 16 2021
🚨︎ report
Fantom: cross-runtime development language fantom.org
πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/unquietwiki
πŸ“…︎ Jan 24 2022
🚨︎ report
What always annoys me to no end is when people complain that python type hints are not runtime enforced, when this is quite normal for most statically typed languages news.ycombinator.com/item…
πŸ‘︎ 53
πŸ’¬︎
πŸ‘€︎ u/wzdd
πŸ“…︎ Nov 22 2021
🚨︎ report
MiniVM: A zero-dependency cross-language runtime on par with LuaJIT and C github.com/FastVM/minivm
πŸ‘︎ 5
πŸ’¬︎
πŸ‘€︎ u/qznc_bot2
πŸ“…︎ Jan 08 2022
🚨︎ report
Why use a Message Queue/Broker when you can use Event Loop in Language runtime?

Hello

let's say we want to do asynchronous background processing on multiple servers that are connected to a load balancer, and the client sends the process request to the load balancer. It's common to use a Message Queue to buffer these requests and let the worker servers pick them up on demand.

Question: Why not use an Event Loop language like Node.js to do the same and get rid of a Message Queue/Broker? What problems does a Message queue solve that an Event loop language runtime cannot solve?

πŸ‘︎ 4
πŸ’¬︎
πŸ‘€︎ u/git_world
πŸ“…︎ Dec 05 2021
🚨︎ report
Fun Fact: Despite the sentence being commonly associated with Zuko, he never once actually said, "I must capture the Avatar to restore my honour" in the show's entire runtime.
πŸ‘︎ 4k
πŸ’¬︎
πŸ‘€︎ u/MrPsychopath13
πŸ“…︎ Dec 26 2021
🚨︎ report
How feasible would it be to build a dynamic runtime library of simple Qt features, which could be used from different programming languages, without any need to adapt those languages to Qt?

The source code of the dynamic library could use "extern C" for the interface to a bunch of commonly used Qt features. Most programming languages could invoke those features that way even if they weren't compatible with C++. Most programming languages can already use dynamic runtime libraries.

Would this be a good way to make simple Qt features easily available in programming languages that don't have any support for Qt?

Or does Qt already have something like this?

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/aiaor
πŸ“…︎ Nov 30 2021
🚨︎ report
Second most common language per London borough
πŸ‘︎ 10k
πŸ’¬︎
πŸ‘€︎ u/198Throwawayy
πŸ“…︎ Jan 04 2022
🚨︎ report
Interpreter, Runtime Environment & the Programming Language

Hello everyone!

Hope the wonderful programming community is having a great day.

I was hoping if you could explain what the following terms are. I have recently started learning Python and following tutorials, I sometimes find myself lost when trying to understand the following

(Apologies in advance as I don't have a CS background)

  1. What am I exactly downloading when I download Python (programming language) fron python.org? I thought it was merely supposed to be a language instead of an application.

  2. What is an interpreter? Is it an application that converts specific programming language to computer code (binary code)?

  3. What is a Runtime Environment and Virtual Environment? These words get used at the beginning of tutorials and I can't seem to understand if these are folders (virtual environment to install packages in) or place where the code is run?

  4. How does a code editor run code in a particular language?

  5. What is PATH (Windows)?

Thank you all for your help!

πŸ‘︎ 2
πŸ’¬︎
πŸ“…︎ Nov 23 2021
🚨︎ report
NVIDIA Open-Source β€˜FLARE’ (Federated Learning Application Runtime Environment), Providing A Common Computing Foundation For Federated Learning

Standard machine learning methods involve storing training data on a single machine or in a data center. Federated learning is a privacy-preserving technique that is especially useful when the training data is sparse, confidential, or less diverse.

NVIDIA open-source NVIDIA FLARE, which stands for Federated Learning Application Runtime Environment. It is a software development kit that enables remote parties to collaborate for developing more generalizable AI models. NVIDIA FLARE is the underlying engine in the NVIDIA Clara Train’s federated learning software, which has been utilized for diverse AI applications such as medical imaging, genetic analysis, cancer, and COVID-19 research.

Researchers can use the SDK to customize their method for domain-specific applications by choosing from a variety of federated learning architectures. NVIDIA FLARE can also be used by platform developers to give consumers the distributed infrastructure needed to create a multi-party collaborative application.

Quick Read: https://www.marktechpost.com/2021/11/29/nvidia-open-source-flare-federated-learning-application-runtime-environment-providing-a-common-computing-foundation-for-federated-learning/

πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/techsucker
πŸ“…︎ Nov 29 2021
🚨︎ report
#RRR Runtime is 3 hrs 6 mins for All Languages. Rated U/A by Censor Board Today. #RRRMovie Grand Theatrical Release on 7th January 2022.
πŸ‘︎ 2
πŸ’¬︎
πŸ‘€︎ u/AlAkib_Official
πŸ“…︎ Nov 26 2021
🚨︎ report
Is it common in your country to learn German as a second language? Why/why not?

I noticed that when I talk to people about languages, most speak their native language plus English, and then potentially French, Spanish, or something more "global" like Mandarin, Japanese, Russian or Arabic. However, even though I'm pretty sure German is the language with the most native speakers in Europe (I am one of them for that matter), it doesn't seem very common for other Europeans to learn it. How prevalent is it to learn German in your country? Do you think it should be taught more in European schools?

πŸ‘︎ 361
πŸ’¬︎
πŸ‘€︎ u/icyDinosaur
πŸ“…︎ Jan 20 2022
🚨︎ report
Reflections on a decade of MoarVM, a runtime for the Raku programming language - Jonathan Worthington (VMIL keynote video) youtube.com/watch?v=3lxuC…
πŸ‘︎ 17
πŸ’¬︎
πŸ‘€︎ u/liztormato
πŸ“…︎ Oct 20 2021
🚨︎ report

Please note that this site uses cookies to personalise content and adverts, to provide social media features, and to analyse web traffic. Click here for more information.