mys-lang / mys

The Mys programming language - an attempt to create a statically typed Python-like language that produces fast binaries. See https://mys-lang.org for more information.
Other
132 stars 5 forks source link

Communication channels and general orientation #7

Closed pmp-p closed 3 years ago

pmp-p commented 4 years ago

Hi, thanks for the invitation.

May i suggest freenode irc #msys for getting around various subjects at a slow pace ?

My goal is to get a slow, interpreted, async, easy language that can be optimized to the max but in simple ways.

I'm not interested in a fully compiled language, cython, a toy or a JIT : i'm mostly interested in turning functions bodies of dynamic languages like Python into C and wast/wasm when it's usefull.

=> I actually write the body in C so here's my interest for msys or transpilation.

I'm actually very interested in annotated (micro)python like syntax -> C transpilation and especially asynchronous aspect of things and also rapid prototyping of C ( maybe C++) functions compiled on-the-fly from inside python code like one can already do with dragonffi https://github.com/aguinet/dragonffi or maybe ppci https://github.com/windelbouwman/ppci.

pro: it just work already. con: mys or a 1:1 annotated python transpiler would be way better.

general idea for hosting compiled code in a bytecode vm : eg https://github.com/pmp-p/wapy/blob/wapy-wasi/ports/wapy/cmod/common/_zipfile.pym => https://github.com/pmp-p/wapy/blob/wapy-wasi/ports/wapy/cmod/common/_zipfile/mod_zipfile.c

or with dragon ffi : https://gist.github.com/pmp-p/d5902fb79f6ad4415cc24ac9b612948f

eerimoq commented 4 years ago

Ok, I see.

An IRC/Discord/Gitter channel could easily be created, but there is not enough interest for Mys at the moment to do so.

Async (coroutines etc) is not planned, but may be implemented at some point. Most of the time threads are enough though.

Mys will remain a "compiled" language. There may be an option to run on a VM at some point, but it's unlikely as it's lots of work to implement it.

ghost commented 4 years ago

What say we start a Gitter channel called Language Dev in Python?

ghost commented 4 years ago

And host Hex and Mys in that one Group?

eerimoq commented 4 years ago

Can you create it?

stefanhaustein commented 4 years ago

Orientation

I have tried to start the promised Tantilla comparison but realized I just know too little about Mys to make it meaningful... Can you be more explicit about your plans for compatibility to Pyhton vs. "cleanness"?

What is Mys adding to regular "typed python", what is it taking away? (I guess this would be best answered on your main project page or a dedicated "coming from python page" -- opposed to here). I guess we all have some kind of familiarity with Python, but I keep wondering "is this some new python thing I am not aware of or specific to Mys". Example: the recent len() -> length() change.

Do you think it would be possible to create reasonable test cases / examples that are

Communication

Why not something old-fashioned (= email group)? For me, chat is too distracting.

ghost commented 4 years ago

Gitter channel?

stefanhaustein commented 4 years ago

Gitter channel?

I am not sure about the name. "Language Dev in Python?" would exclude what I am doing -- I am not developing in python but a subset interpreter in Java. And I thought Mys was implemented in C++? My main interest is exploring language options between Python (easy to use syntax) and Rust (traits instead of traditional inheritance). And potentially sharing test cases etc. for the least common denominator we can come up with

ghost commented 4 years ago

Then just language dev.

eerimoq commented 4 years ago

@stefanhaustein The Mys readme file and the examples in the examples folder should describe and exemplify many of the differences to Python, at least for the experienced Python developer. There was a section with differences to Python in the readme, but I removed it was hard to keep it updated. It could possibly be re-added at some point, but I think it's more important to clearly describe how Mys works. At least that's what I am focusing on. However, a tutorial for Python developers would be very useful.

I prefer Github issues for discussions. One issue per problem/feature/idea instead of all of them in a single chat (which will probably be the case). Makes it much easier to follow discussions and search.

ghost commented 4 years ago

@eerimoq Agreed. Once I have a head with Hex, I will maybe add the section you talk about. :) Really trying to get basic functionality and an STD lib.

stefanhaustein commented 4 years ago

If centralized differences are hard to maintain (agreed), why not point them out in the corresponding spec sections? Perhaps just add a superscript plus (⁺) to functions and types that are not available in python (and list noteworthy omissions)? 

ghost commented 4 years ago

Good call!!

eerimoq commented 4 years ago

It's not prioritized by me at the moment.

I noticed that Tantilla uses traits. I was (and am) tempted to do the same in Mys, but it's initially a lot more work as neither the Python parser not C++ have traits. What is the big advantage of using traits instead of traditional inheritance in you opinion @stefanhaustein?

stefanhaustein commented 4 years ago

They are just cleaner: With interfaces, it's possible to have signature conflicts. Traits are explicit. They can be emulated with little adapters in generated code in a straightforward manner.

eerimoq commented 4 years ago

Another advantage is that the code is easier to understand as your know exactly which methods that are called. OOP inheritance can make it hard to understand which method is called. Also, traits are stateless, which is often preferred as it simplifies the understanding of the program. No side effects.

I will replace inheritance with traits in Mys as well. Soon Mys will be more like Rust under the hood, except the syntax and ownership memory model.

eerimoq commented 3 years ago

I created a Discord server. It will probably not be that useful, but let's see. The invite link is https://discord.gg/GFDN7JvWKS.