 Yeah, okay, hello, welcome, thank you very much for joining, and I will talk about force and some experiments that we did with force, so my first question is who has, or who has heard about force, okay, who has written a force program, okay, I see. So I try to be with the terminology close to normal computer science terminology, because force has its own kind of language I try to be as understandable as possible. I will talk about the new synthesis that's a project that's ongoing and we try to understand the essentials of computation and find minimalistic ways to realize things and build a basis of computation and for this we build a family of force-like languages with restrictions and certain properties. I will go then and talk about the ICE concept, I think most of you wouldn't have heard about this before, but it's about 20 years ago that Charles Moore, the inventor of force proposed the ICE concept, so we will look at this and see that other programming languages have this as well. And today I will focus on C-force, which is one of these languages in the family of things that we do and the special thing about it, it doesn't accept text-based source code, but it accepts tokenized source code and we will look into the details and why is this of advantage in the setup that we're looking at, and then we do some summary and we have probably time for question and answers. Our set, we want to understand the general foundation of computation, so how small can it be looking at Feynman architecture and find out what is the essential really and with a force background, especially we want to know about the basic principles of force, so what can be left out, there's an international standard and of course you look at this following the quote from the little prince, take away what is not necessary and then you'll find perfection and so we want to go there, make things smaller and have a sound basis and then let things grow again. So yeah, we want by this build a basis of a new modern force and I think about this morning's talks, so even a poem language or XP that we just saw could be implemented not just on LLVM but on our basis and so that's probably a nice thing. So within the new synthesis we follow certain guidelines, so we want to express most of the things in force and if you think about it, it's a high level language and you can express function applications and you can define data structures and so on, so we try to express as much as we can in force and we did this also with a cooperative multitasker that is normally supposed to be written in some low level assembly language for the task friends so this is also done in force. We strive to get some bootstrapable things and one of the languages is bootstrapable and very nice, all should be completely transparent so you could talk to us and I'll say in two hours I can explain what's going on if you have some force background, computer science background and then you can look at all the source code that we have which is quite a small amount of source code and you can understand what's going on. So it's completely transparent for you, everything is accessible for you and it's simple to understand so we're looking for simplicity and for this we also look at analogy to biological things for example like how DNA is replicating and we're thinking about this and seed force, the name goes into the area of botanics of course so something is a small seed and then it grows and we will see how it grows. The technique that we use is disaggregation so we see this complex systems we try to dissect it and find the principles in isolation and then we reassemble these in an appropriate way afterwards. And on that way we build a family of minimalistic stack based languages and I have a slide that compares the two that are in the title of this talk that's pre-force and seed force and pre-force was the initial attempt and pre says it's not really a force because it has so many limitations and you can see maybe as a key characteristics the lines of code that you need to express this is 500 lines with pre-force and roughly the same for the seed force so they are very small languages and I'm not talking compiling to LLVM or some abstract machine this is for the 386 machine code interface which spits out assembly code and then in the sampler the other key feature maybe is the number of primitives so the pre-force has 13 primitives and this means many features are missing like memory it doesn't have addressable memory it has to do all on the two stacks which one is for parameter passing and the other one is for function called procedure return addresses and because of this if you want to do string handling you have to do this all on the stacks not in memory so there are no memory representation of strings you put them character by character on the stack and you deal with this which you can assume is not very comfortable but it works and you have recursive functions in all of them also pre-force doesn't have any control structures the only thing is that you have a procedure call with possibly tail recursion elimination and a conditional exit and then you are up to formulate whatever programs you want both are during complete so you can actually do this and it turned out pre-force is too simple actually to be the seed that we can grow everything out of it yeah I tried this and then within the discussion we said okay no it's not worth it but it's suitable to build the next force system and that is seed force and seed force now has memory it has memory operate operators it has some more primitives mainly for memory and yeah for for yeah I think it's mainly memory and and some some other things and it's only a little bit more in size it has conditional so we have branching instructions as well right and so yeah so that's mainly it and if you look at the data types then pre-force can only handle characters and integers and you build up all the structures on the stack and of course if you have memory you want to address the memory also have addresses right so let's come to the ice concept that's something that in talk of Charles Moore if you listen to him very carefully in 1999 and I revise the YouTube videos that have been made at that time and I came up with alright ice is what we actually doing that makes force and other languages very exciting and yeah the property is we have an interpreter that can take commands and work on them we have a compiler that can take text and create code and then we can even execute at arbitrary times things that we just defined yeah and force has this property but other languages like list has this property you do a function definition next time you call it and force you define a word next time you call it and you can even during compilation you can go ahead and switch between execution and interpretation so that's quite nice small example I can define a function definition erase which goes and initialize some memory with 0 then I can interpret define some constant buffer with an appropriate size and then I can execute the definition that I just defined in there and this will execute at compile time yeah when I process the file and compile it so let's have a look at C force the great thing about C force that it accepts tokenize source code and this means it doesn't have need to have a parser or whatever to analyze text so that's just great it's about 550 lines of code and you can extend it by doing function definitions that could be recursive function so that's really easy and because it follows the ice principle like all the languages that we do it has a compiler that compiles definitions and interpreters that can execute definitions even during compilation so that's quite nice and it's intended for building applications and one of these applications is actually a full featured interactive force system with a redevelopment loop repl which is called text interpreter in the force terminology and we have I386 and AMD64 implementation right now but I experimented with the C back end as well as some symbolic back end so we can stuff it into a list system and so get some execution so here's the course slide that shows what it is there's something that is created with pre-force that is called the C4 bed think of flower bed yeah so the botanic analogy and that's the small core 550 lines of code 2k of memory and this is 32 beds so about 500 bytes is just the initialization of the table so the code is really small it's 31 assembly primitives and then some amount of additional things and then you have three levels the text based source code at the top tokenized source code in the middle and then the seed force bed on the growing seed force system below also we have of course operating system hardware support necessary to do some IO or whatever if you have an IOT device to access the hardware and so if you have source code of your application it first will be tokenized and then this token stream will be fed into the seed force bed and it will be extended but still it can do ice it can interpret things it can compile things and it can execute things on the fly during compilation yeah the virtual machine that is about this looks like this it has these two stacks one for parameter passing one for return stacks and instead of a parser it just has a symbol table the names of functions are tokenized into a function numbers and so to know in order to know where function actually starts you just have an index access into the token table the token table just captures the start addresses of the functions and if you appear to see okay there's function 3b yeah actually coming then you can go ahead and look up what it's starting address and you can compile a call to that property thing so we have data data memory and code memory to do this and several pointers that mark the free areas of this so that's a quite simple architecture and here are the seaford seaford bed words I don't want to go into details or all of them but the two interesting things for the ice concept are the interpreter and the compiler and what does the interpreter do it accepts a token from the input stream and then it executes whatever function is associated with that number looks up in the table finds the start address and then jumps does it does a separating call and then it does interpreter again so that actually this is an endless loop and because we have tail interpreter it's tail recursive so it will not spill up the returns they go whatever the compiler will go accept the token or maybe it's a zero then we exit the compiler loop go back to the interpreter loop maybe it's a lid and then we'll do some stuff with the literal but in the end if it's not a lid then it will just go ahead and compile a reference to the appropriate function and then it it's also loops so the compiler is in a loop until it finds a zero and the token interpreter will just go ahead and execute things so we have source code there where we look at the source code and we see here some this is the hello world example for for seed for us so we just admit things and we find in the token I think also the string hello we won't go into detail here very much we can have a function definition increment the top element on the stick that is like this and then we can invoke this already here so again we have interpret compile and execute our things and if you look carefully on the previous slide the next token in the sequence would be 3b and tata here's the 3b that is the invocation of the that that is the tokenized of this at which will reside in the invocation in the in the compiler so and that said the output of course and so where is the ice principle now being applied really that's when we have control structures control structures like begin until need to be compiled into conditional branches yeah and yeah the in the end so begin the tokenizer takes function calls and make single tokens out of it and for there are also macros that expand to sequences of of tokens and so begin expands to the sequence by here compiler which means exit the compiler do something in interpret mode and then restart the compiler and until expanse to the sequence question branch by comma compiler which means compile branch then leave the compiler and compile the appropriate address and then restart the compiler and so if we look at the tokenization then we see begin is 0 1824 and until will be compiled or tokenized to 15 oh oh 2024 and if we run this then that's it right so seed forth grows you just feed the seed forth bed plan new things in there and we did lots of experiments with this and so we have dynamic memory and many many things like exceptions and it cooperated mighty task and closure like things and so on that you can build all on top of this and there's a full feature force system that I already talked about called seed forth interactive you can all look up this up on the on the pre-force Github page and yeah that's mainly it so we want to extend this father and if you're interested come and get in contact with me so we can talk about this so new targets especially iod targets are on the way and new synthesis the book and yeah thank you very much for listening and I'm happy to answer your questions yes yes yes so pre-force can actually take code words and colon definitions and it will convert this to appropriate assembly language in the setup that we currently have and then you use the platform assembler to create the executable in the end yeah so it's it's these 31 primitives written in the sampler and then about 20 things among these compiler interpreter to actually make this ice capability available okay thank you very much any more questions yeah yeah yeah actually you don't need to rewrite pre-force because it's it's used to do the seed force it can run on the host system but you need to rewrite the 31 primitives in seed force and the estimate time because they are really really simple like moving here and there there is half a day for a new platform so you can start reading the menu in the morning and in the evening you have a c-force bed system running and all above is just machine independent you can just load it on top and it feels fast enough to work you would think a small set of primitives would slow it down dramatically no that's not the case the experience is it's really fine good to use and high speed okay anyone yeah there's a there's a force program right now that does the tokenization and one of the tasks you might have seen on the slide is to rewrite the tokenizer in seed force itself it's already i already have a version in seed force interactive the the extended one but we want to have it in seed force itself and then so everything is self-contained and the bootstrapping is there everything transparent everything available to you no hidden things please yeah yeah okay thank you very much are the mic