Skip to content

Instantly share code, notes, and snippets.

@lovely-error
Last active February 27, 2021 04:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lovely-error/9c812137f6e272f3b6424c29ec78f6b6 to your computer and use it in GitHub Desktop.
Save lovely-error/9c812137f6e272f3b6424c29ec78f6b6 to your computer and use it in GitHub Desktop.
Oh, wow! Is that a paradigm shift ?!

It's time to move on

Dislcaimer: you can click this, then watch this, then find on net lanugage Terra to grasp a bit of what I am talking bout. Multistage metaprogramming is a big, unrealised area of research. I want a thing kinda like that, but better; with deeper integration with os/linker

All I have seen so far have hurt me deeply

During all my past, as long as I remember myslef, I noted that despite all major languages have had settled and now peacfylly stagnating, many newcomers represented by those like rust, haxe, zig, v, eta, and whatever few hundred other I missed, they inevitably will disappear without leaving a trace, because they all are mediocre. If you have been thinking along these lines that I am going to humiliate them, you gessed it right, I will. The all pieces of shit that came from people who either got so old it cut their ability to innovate, or total poseur, who cannot see world beyound their curriculum. It appears that despite new features keep being invented, no one is actually concerned for search of unifying framework for expressing, but most important thing - constructing a piece of software that works. I'll elaborate. Ambient code, efficient differientiable analysis paradigm, adaptive compilation for heterogenous world, a whole other bunch of stuff regarding type system expressivity, such as backed in security policies, context aware code generation, et cetera, et cetera. This pletora will never find an end, until progress will be halted, so it is nessecary to have a common computation platform that can host all current state of the art findings and more that await in future. People attemted to retrofit tensorflow into existing language to enable better toolling and naturally they failed. Foremost, it happened because the hosting platform's evolution, that is swift language, is solely controlled by one corporation; and here you cant have you cake and it it too you know. Another descision for swift is because alternatives were crap, lets have a quick review: c++ is garbage that rewrites its syntax tree - means crap; people who maintain rust - who are tootal pieces of shit for adding async, it also it indicates that they dont know what they are doing - break it betwen release or two in minor versions. The language also monomorphises shit outta everything it see, so no go. JVM is just crap. Tensotflow is hardcore math but this familiy of c criples dont even have ADT!!!

So they need a language with strong foundation, good tooling, and on top of it, have it being backed by big fintech. What could they instead pick? The answer is nothing!!! Current state of affairs has come to a state where good languages dont exist!!! Even if there were and google could stuff their autodiff black magic into compiler, it would solve the problem; it insted would route it onto different road. Because there would be still more incredible features that would to be put away to collect dust: Dependent types, gpu accelerated processing kernels, mobile code, security policies enforced as part of type system, typed code generation, multistage computation, programmatic manupilation of source within one language, et cetera, et cetera. So what can be done with this suboptimal state of the world? Lets go see my vision.

There is a way

To create a one framework in which all above things can be put together and dont explode the hell outta pc have interoperation, prior aproch has to be reconsidered. A more tight integration between os, and compiler is required. Much more that this, the process of creating a programm must become akin to how matemathicians develop their proofs. Iteratively, with great freedom, in a helping environment. Like sculptor, having tool to cut widely or precisely. The process of programming must be free from single type system, signle view of acceptable; in dynamic you do, in static you run. Lets examine at closer distance.

Stages

In mind I have the following:

  • Upper level development - here you write your semantics, aka type system. Accepted beheviour of your system is to be created here. The intension is to make the notion of type be turing-complete in a sense that you will be able to specify any invariant on all observable behaviour, whether it is variable range, or presence of certain members in type. Also time-space complexity of functions. Executed as interpreted.
  • Execution model - here you create a model of execution for you upper level. This level characterized by more control for machine resources. MLIR-like definition of runtime machine. Code from higher level is compiled to efficient machine code.

Both stages happen in a language with unified syntax of s-expressions. All stages from source code manipilation to compilation happen here, dedicated to your command.

Reprise

I want this, no bulshit.

  • (constructAST (loadSource ...)) - name say for itself. Manipulate programms. True metaprogramming. Maybe this what was Bjarne say that cpp has some nobble language stuck into mud of pointless additions.
  • (compile ...) - make the binary(or whatever) from quoted code
  • (loadPlugins ...) - "Somebody made new neat type level enhancement that is backward compatible with my current project! Gimme that!"
  • Its like JVM/CLR/MLIR - but not shit, with plugins that can extend almost every aspect of computation platform and without constraints of backward-compatability because it is optional.

Long story shot - not everything from ninetees is good. Will add more, when I ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment