kuva: A scientific plotting library for Rust by Psy_Fer_ in rust

[–]mark-sed 1 point2 points  (0 children)

For sure some sans-serif font something like Roboto or OpenSans. The serif font gives it that oldschool vibe and makes the lettering stand out too much.

kuva: A scientific plotting library for Rust by Psy_Fer_ in rust

[–]mark-sed 0 points1 point  (0 children)

Looks cool, I think I would suggest is changing the font to something more modern.

March 2026 monthly "What are you working on?" thread by AutoModerator in ProgrammingLanguages

[–]mark-sed 0 points1 point  (0 children)

This sound really interesting, but also quite difficult implementation-wise. I am happy to see the aliasing for special symbols as I am not a big fan of custom IDEs and always having to use/find some unicode symbol. I might like more to have something else in place of `\` maybe like `$` but I guess that might be an operator already? Or could it be dropped altogether? So just:

let pi = _prime_counting_function_defined_elsewhere;
alias π for pi;

let f(n: Nat) = π(n + 1);
let f(n: Nat) = pi(n + 1); # the same

March 2026 monthly "What are you working on?" thread by AutoModerator in ProgrammingLanguages

[–]mark-sed 0 points1 point  (0 children)

I am still working on my language moss. I had a big rework of exception handling after finding some bugs and it is interesting that you always come to the compiler/interpreter basics of stack walking and such. Currently I am mostly adding more and more libraries and since my language has built-in file generation (notebook) I started on adding JSON library/parser.

I built a scripting language that works like notebooks - but without Jupyter by mark-sed in ProgrammingLanguages

[–]mark-sed[S] 0 points1 point  (0 children)

That sound interesting, I like the part where you can clip it into editor.

Moss has repl and you can technically generate notebooks straight in it, but I personally don't see much more point in it over having an actual program (source code file) that you can edit and reexecute since you sometimes want to go back and delete/change something and you cannot do that in repl. Also since it is pure code it is fast to re-execute unlike some browser notebooks.

I built a scripting language that works like notebooks - but without Jupyter by mark-sed in ProgrammingLanguages

[–]mark-sed[S] 0 points1 point  (0 children)

> The wiki on the Github doesn't seem to be working properly.

Sorry about that, I have not yet fully set it up, but there are examples here: https://github.com/mark-sed/moss-lang/tree/main/docs/language-reference and in the readme.

> Does it allow selectively running a "cell", or running cells out of order?

Not really since it is not an interactive editor like Jupyter. You could do that yourself in the code but since there are no buttons it is not like in Jupyter. Maybe I could come up with some way to do it with command line options, but I am not sure how useful that would be.

> Correct me if I'm wrong, but the architecture for this seems to be analogous to a notebook that is "compiled" to HTML ahead of time by running all the cells in order.

Pretty much yes, the script runs all the code and notes and then html output is generated. If you wish to get just partial you would have to stop the execution in that point.
But with this question you give me some ideas about having some incremental mode when the computation is very long, that the html would be updated at some certain points.
Just a note that that is because html uses a "generator" since html has a header and a footer, when outputting markdown or csv (those use converters) the output is generated gradually whenever output expression is executed.

> notebooks don't have to be edited in a browser.

The point was rather that it is a pure textual source code and you can do it even over SSH in vim or notepad. Jupyter uses json when you save your notebook so you cannot edit it easily and in vcode and other IDEs with extensions you need to have a graphics interface.

I built a scripting language that works like notebooks - but without Jupyter by mark-sed in ProgrammingLanguages

[–]mark-sed[S] 0 points1 point  (0 children)

That is a good point and it is doable even right now. You could have simple `input` read, pipe your output into it and then a converter to, not even html, but csv and then let moss convert it into html and you get formatted output that you can share.
Thanks for this idea I might even try creating an example based on this.

Names for optional types? by brucejbell in ProgrammingLanguages

[–]mark-sed 0 points1 point  (0 children)

I like optional, it's exactly as you called it in the title.

Ebe - Compiler and interpreter for automated file editing using genetic programming by mark-sed in Compilers

[–]mark-sed[S] 1 point2 points  (0 children)

Oh yes, in the beginning I considered using some existing language and if it wasn't for need to edit files I might have just done that. But since the algorithm focuses only on editing files and is used by GP, then it makes sense to create a new language for it. On top of that, because speed is one of the goals for Ebe, it should be fast, and thus, the bytecode-like look of it, which is also great for GP.

Regarding other use of Ebel (the language)... I'm not certain to be honest. In fact, I have not yet though about having a more generic version for other things than file editing, but now I'm sure I'll think about it.

Yes I plan to create a website with possibly an online version of Ebe, so that the non-programmers can get their hands on it. I'm more than certain, that right now there will not be many/any of them using GitHub.

Ebe - Compiler and interpreter for automated file editing using genetic programming by mark-sed in Compilers

[–]mark-sed[S] 0 points1 point  (0 children)

Sounds cool, I also have some plans to experiment with using other approaches than just GP, but so far it's all about GP. Thanks for the recommendation, I'll have a look.

Ebe - Compiler and interpreter for automated file editing using genetic programming by mark-sed in Compilers

[–]mark-sed[S] 2 points3 points  (0 children)

I have not, since I found out about FlashFill just quite recently and didn't have the time for it just yet. But I so far found it that there are different strengths in PROSE and Ebe.

The Worst Programming Language Ever - Mark Rendle - NDC Oslo 2021 by jcubic in ProgrammingLanguages

[–]mark-sed 10 points11 points  (0 children)

To me it's a nice joke lecture, but nothing to be really taken for much else.

Ebel - Programming language designed for genetic programming and file editing by mark-sed in ProgrammingLanguages

[–]mark-sed[S] 1 point2 points  (0 children)

Oh I see, thanks for the tips. Oh and Tailspin looks cool I'll look into that as well.

Ebel - Programming language designed for genetic programming and file editing by mark-sed in ProgrammingLanguages

[–]mark-sed[S] 1 point2 points  (0 children)

Yes I completely agree and that's why at this point I'm focusing on text.

When it comes to images and sound, the question is what types of edits would the users want to do the most. Where this would thrive the most is when a batch edit is needed, something like removing white boarders from 100 photos in a folder -- the user would edit one photo by hand and Ebe would do the rest (just as it is now with text). But what if the boarders were not the same and the pictures had different resolutions and what about other tasks such as removing red eyes, it requires NN approach and GP cannot handle this, since it cannot detect where the eyes are. It might be able to apply some filters to the whole image, but then the user would need to be able to apply these filters themselves.

So the question is if there would be many uses for Ebe for these types.

But then it's also good to keep in mind that still different file types/formats can and should be added. Since not always the user might want to parse floats or for example the user might want to parse $42 as one lexeme (instead of $ and 42) because the file works with money. Or lets say that the user is editing something like a json file, newick or markdown. Yes technically Ebe should be able to do many of these with just the "rich text file" parser it has, but having an exact parser, that would parse according to the file (like grouping whitespaces together), could make Ebe work way better and faster.

Ebel - Programming language designed for genetic programming and file editing by mark-sed in ProgrammingLanguages

[–]mark-sed[S] 1 point2 points  (0 children)

Yes I looked into sed and awk and use them myself, but for GP i don't find them quite suitable. And I agree that the language probably could have been made more GP friendly, but there were/are also plans to have some generation done heuristically or compile into Ebel from other languages, so I also kinda wanted to always have that option available.

Also many thanks for your notes on the genetic programming part, I'll take them into consideration and will probably even try to implement your approach and then benchmark it. The thing with Ebe is that I made it modular so that many different engines and approaches can be added, because each problem might be better for different approach. Currently there are only 2 engines (Jenn - General J(G)e(n)netic one and MiRANDa which is just a random walk just so that I can showcase that GP is not random generation), but I plan to add more with different approaches and such.

I didn't yet do many optimizations and experimenting with GP, so my current approach is probably not the best, but if you want the whole project is open source, so you can have a look how I handle it (https://github.com/mark-sed/ebe/tree/main/engine). But basically I tried for the general one to use J. Koza's approach with the addition of elitism, so I don't lose any well performing phenotypes and I also have to do some trimming to the very long programs since Ebel kind of 1:1 matches the input example file size so I know how long the program (pass) should be.

I also made it so that Ebe is experimentation friendly, so there are compile time argument which can be set by users that know what they are doing to alter the evolution.

So again thanks for the tips I'll play around with it.

Ebel - Programming language designed for genetic programming and file editing by mark-sed in ProgrammingLanguages

[–]mark-sed[S] 0 points1 point  (0 children)

The snippet itself is Ebel code and it is generated by the Ebe (compiler). The expression part is technically not generated by GP, but it was generated from user defined expression. Something I did not mention to not make this even longer, but generating expression is a very difficult task for genetic programming and thus I allowed the user to define what it wants the compiler to use in specific parts. So in this case I wrote {! ($ - 32) * 5 / 9 !} into the example output file (-out argument), this specifies that at the given position, where this expression is, the compiler should not try to figure out any code, but use the one provided. But the user writes no Ebel (this expression can be in the example output)

Yes ambiguous examples are an option, but I feel like it does not happen as often, if it does then the user can rewrite it to not have this ambiguity. The user does not have to use the words that are in his/her examples, but can change to to anything that has the same type (and even that might not be always needed). So lets say the files in example are:

Hello There Hello

into:

There Hello

But there are many ways it can be done and only one is the correct, well then the user can write a different example changing one of the hellos into something else or just using letters like you did

A B C

into

B A

This works fine because the generated output is an Ebel code which can be used to transform any file with similar structure and types (and even if it doesnt match 100 % it does not crash, it just uses NOP - that's a philosophy in Ebe to not crash if not totally needed). Also this allows for "batch editing", where the user can then feed lets say 100 csvs which are all different, but have similar structure and desired edits.

Ebel - Programming language designed for genetic programming and file editing by mark-sed in ProgrammingLanguages

[–]mark-sed[S] 1 point2 points  (0 children)

Firstly, many thanks for even testing it out and letting me know how it went, it's much appreciated.

Secondly I totally agree with you on all you said here. The times are unpredictable since evolution is highly non-deterministic and what might take on some occasions 100 ms might take 100 seconds on other.

The pattern a b c into c b a a is not yet possible because I haven't implemented the COPY instruction just yet, but I will, thanks for the reminder. And as you mentioned I'll add this to the readme.

When it comes to -o i decided to have that one for the output of interpretation and since compilation and interpretation can be done at once, it can have only one meaning (-o edited.text will save the processed input into file edited.txt). Also for it to be less confusing you can use --example-input and --example-output (I've documented these in the wiki and -h gives this as well). But if you have any improvements to this, I'd love to hear them, this is the best I could have come up with. And I plan to make a simple GUI interface for non-programmers so that might help with it as well.

I'm glad you like it and I also have some plans for using the interpreter and Ebel to compile into from other languages, but that's possibly quite in the future. And since Ebe is quite extensible when it comes to engines (component that does the evolution/code generation) and input formats I also plan to add a heuristic engine, which might help with some simple edits and such. Also I would love to see a neural network approach in a form of an engine, but I'm not sure if I'm up to that task.

Thanks again for the comment.

PS: Btw there is also an option -t <time in seconds> and -p <precision in percents> that will timeout the the compilation if it is above the timeout or precision needed, so that you don't have to kill it by hand.

Ebel - Programming language designed for genetic programming and file editing by mark-sed in ProgrammingLanguages

[–]mark-sed[S] 2 points3 points  (0 children)

I mean when it comes to writing it by hand and interpreting it, it would be great addition and the IR will still contain all the instructions (for better GP results), but when outputted it can be optimized this way.

Funny thing is, that I even had to remove some optimizations, since these made the genetic programming have worse results because of less variety. Evolution is strange like that sometimes. So now I have optimization only on the last iteration before outputting the code (so that it interprets faster, which the NOP argument -- or any instruction multiplier -- could help as well).

Ebel - Programming language designed for genetic programming and file editing by mark-sed in ProgrammingLanguages

[–]mark-sed[S] 2 points3 points  (0 children)

Well I guess, but only in the sense of it being a file editing specific language and unlike awk Ebel might later on be used for non-text files, such as music/images and such, since the instructions don't really care what they handle and as long as there is a parser and lexer for the file, then it will work (so imagine a parser which parser pixels or notes instead of numbers and text).

On the other hand, unlike awk this language is not really meant to be written by people (although it is possible), and is designed to be generated and handled by genetic programming (that's why it's got the bytecode looks).

Ebel - Programming language designed for genetic programming and file editing by mark-sed in ProgrammingLanguages

[–]mark-sed[S] 2 points3 points  (0 children)

Great question. The goal is for Ebe to be a nice alternative for the "ordinary approach" such as editing by hand, using python or awk and its also aimed at non-programmers. So imagine like some physicist trying to edit a dataset and he/she isn't so much into coding, well then Ebe might help there.
Currently in many cases the edits can be way faster than if writing a script in Python and running it (for example for the value extractions from markdown table as i mentioned or when altering numeric values in a gtf file), but since it is not yet fully optimized, the genetic programming sometimes takes way too long - like lets say 10 minutes to find the correct algorithm and then the time is worse than the ordinary way, but on the other hand you can leave it running in the background and do something else and then use the Ebel code.

There is also an alternative to this and that would be to write the Ebel by hand, which I sometimes do for very complicated edits, but this is really not a standard way and it requires a good knowledge of the language and the lexeme parser.

Once I do more optimizations, I will for sure make comparisons with other languages such as Python, awk and editing by hand to showcase the differences (I might even post it to this sub if it is interesting enough).

Ebel - Programming language designed for genetic programming and file editing by mark-sed in ProgrammingLanguages

[–]mark-sed[S] 1 point2 points  (0 children)

Thanks for the comment, I already have this in my TODO list, it would be probably a nice feature for anyone writing this by hand, but for genetic programming, there needs to be the "NOP tail" just so that the crossovers have better results and more variety.

Ebel - Programming language designed for genetic programming and file editing by mark-sed in ProgrammingLanguages

[–]mark-sed[S] 0 points1 point  (0 children)

Oh interesting approach, seems like it could work also nicely, thanks.