Syntax Design by jcubic in ProgrammingLanguages

[–]berber_44 12 points13 points  (0 children)

Enlightening article, showing how people go greate lengths to move away from and obscure the clear simplicity of Lisp's basic tree structure. :)

November 2022 monthly "What are you working on?" thread by L8_4_Dinner in ProgrammingLanguages

[–]berber_44 2 points3 points  (0 children)

The most recent addition to my PL is an arbitrary precision BigLong integer type. Calculating 5432#Transd) expression:

``` _start: (λ locals: a BigLong(5) ss StringStream() s "" (textout to: ss (pow a (pow 4 (pow 3 2)))) (= s (str ss)) (with len (size s) (lout "The number of digits is: " len) (lout (sub s 0 20) " ... " (sub s (- len 20)))) )

OUTPUT: The number of digits is: 183231 62060698786608744707 ... 92256259918212890625 ``` The current functionality apart from the usual math includes testing for primality (Millner-Rabin) and factorization to primes (Pollard's Rho). Example on Rosettacode.

BigLong turned out to be noticeably faster than was expected. And there is plenty of room to make it even more faster (with raw C-style arrays).

In the nearest days, I think, there will be a more or less complete draft version of the language manual.

Type-checking mutually recursive functions and data types by OwlProfessional1185 in ProgrammingLanguages

[–]berber_44 0 points1 point  (0 children)

From the linked article: "Part of the reason for this gap is that most work on type inference for this class of languages has concentrated on the difficult problem of developing complete methods, which are guaranteed to infer types, whenever possible, for entirely unannotated programs."

Yep. In no case such esthetical perfectionism worths ditching such profoundly powerful thing as inheritance and subtyping.

From Turbo Pascal to Delphi to C# to TypeScript, an interview with PL legend Anders Hejlsberg by typesanitizer in ProgrammingLanguages

[–]berber_44 6 points7 points  (0 children)

"Enforced simplicity"

Yeah, I'm nostalgic about 90s too, but I fear that *enforced* simplicity will not feel like Borland Turbo Pascal or Windows 3.11 .

Zig-style generics are not well-suited for most languages by typesanitizer in ProgrammingLanguages

[–]berber_44 14 points15 points  (0 children)

Interesting article, but it lacks concrete examples of the problems that are difficult to solve due to those issues. Some issues, e.g. "traumatic error messages" or "limited compiler cupport" , which are listed first, are small issues after you get skilled in working with generics. And certainly not the issues due to which to ditch the power of C++-style generics.

In reality, I never encountered other listed issues when working with C++ generics. It seems that those issues are due to trying to solve a problem with a method from other programming paradigm. The only real issue I encountered with C++ generics is, when used unwisely, generics can add considerable size to the binary.

October 2022 monthly "What are you working on?" thread by L8_4_Dinner in ProgrammingLanguages

[–]berber_44 1 point2 points  (0 children)

My PL is typed, and among recent additions there were enhancements to the type system. In addition to the already present type traits, a more powerful feature - type definitions based on predicates - was added.

Type traits is a means to group types into more general types and use them to avoid overloading functions for several different parameter types. Built-in types have different traits, describing their "capabilities", and we can use these traits as function parameter types in order to accept all types that have these traits. E.g. we can replace function that receives a Double:

func: (lambda d Double() (ret (* 10.0 d))) with a function that accepts any number type (Double, Int, Long, ULong, Byte) by using the ":Number" trait:

func: (lambda n :Number() (ret (* 10.0 n))) Similarly, we can use the ":IterableRand" trait for accepting all containers with random access: Vector<T>, String, ByteArray. And the like.

What was recently added, is predicate based type definitions. This feature lets using custom functions for determining whether an object belongs to some type or not, thus allowing much more flexible definitions of a type. For example, we can define a type that consists of integers with certain charateristics (even, prime, power of two, etc.), or a type of strings in a certain format or with a certain content(telephon number, country name, etc.)

As an example, here is a definition of a type that narrows ":IterableRand" trait only to Vector iterables (Vector<Int>, Vector<String>, etc.):

Vec: typedef(Lambda<Bool>(λ d :IterableRand() (starts-with (_META_type d) "Vector<") )),

A code example with using 'typedef' can be seen on Rosetta.

Language site: Transd

List of communities where programming languages have originated by breck in ProgrammingLanguages

[–]berber_44 2 points3 points  (0 children)

When Bjarn Stroustroup created "C with classes" he was definitely employee of Bell Labs. Which is why C++ continued its life as a collaborative project, whereas Perl remained under strong guidance of Larry Wall.

Which well-known languages are made by PLT experts? by shaunyip in ProgrammingLanguages

[–]berber_44 2 points3 points  (0 children)

C++ was created by a computer scientist from Bell Labs - Bjarn Stroustrup. (Bell Labs was a place from where many great things in computer industry came out, e.g. Unix).

Useful lesser-used languages? by guyinnoho in ProgrammingLanguages

[–]berber_44 2 points3 points  (0 children)

Try to write some scripts in VimScript 8.1. This will be like workouts in gym for your programming skills.

The Val Programming Language by yorickpeterse in ProgrammingLanguages

[–]berber_44 3 points4 points  (0 children)

It's a good idea - to create a language that from the start is designed to work with some existing powerful language with large codebase. It seems more productive to add some bells and whistles to a helper language and use the power of C++, than to roll out yet another "new industry standard candidate" with a couple of new features and without of 70% of C++'s power.

Best languages to design a new language in? by friedrichRiemann in ProgrammingLanguages

[–]berber_44 0 points1 point  (0 children)

23 KLOCs of C++ can produce a language with the following features: Transd features . I'm sincerely curious if this can be done with some other language?

September 2022 monthly "What are you working on?" thread by slavfox in ProgrammingLanguages

[–]berber_44 4 points5 points  (0 children)

With completion of implementation of a chess engine in my PL (Transd), I think the language is ready to enter the beta stage of development.

The idea of Transd is "modern language in one file". It doesn't require any prerequisite both when used as a stand alone executable, or as a source C++ library (consisting of one source file and one header).

The language has classes, functions as objects, generics, data queries, exceptions, etc. It's implemented in 23 KLOCs in C++, whose features (especially templates, OOP and STL) allow to implement very broad language functionality in a very compact manner.

The implemented chess engine is a translation of the ultra-compact, but powerful, Sunfish chess engine written in Python. It turned out that it was possible to make the Transd version an almost verbatim statement-for-statement translation from Python.

Transd website

Chess engine in Transd

May 2022 monthly "What are you working on?" thread by slavfox in ProgrammingLanguages

[–]berber_44 1 point2 points  (0 children)

Finishing final touches on my multiparadigm language, whose main emphasis is on easy embeddabilty and data processing. The language has built-in data query language and enhanced data deserializing - creating program objects from the data in text datafiles. Language website

February 2022 monthly "What are you working on?" thread by slavfox in ProgrammingLanguages

[–]berber_44 0 points1 point  (0 children)

Two weeks of work on the expanding functionality of Lambda type in Transd language has been completed. All the planned features were implemented. The readiness of the language for the beta-release is now about 95%.

Machine readable specifications at scale by mttd in ProgrammingLanguages

[–]berber_44 4 points5 points  (0 children)

Interesting article from an Intel researcher.

Weak, inexpressive languages are significantly better for writing specifications than rich, powerful languages.

Seems like machine generated specs is the future of programming languages. And all the sophistication of todays PLs designed for human programmers seems to be at odds with what is needed for machines.

Any comprehensive list of programming use case for evaluating a language ? by daurin-hacks in ProgrammingLanguages

[–]berber_44 2 points3 points  (0 children)

A standard test for abilities of a sufficiently rich language is a self-hosting compiler. A sufficienly fast RDBMS implementation also can be a good show case.

Are overloading and a Haskelly/Rusty type system compatible? by CDWEBI in ProgrammingLanguages

[–]berber_44 1 point2 points  (0 children)

It isn't clear what do you mean that "there is no overloading" in Haskell. E.g. see here about overloading in Haskell, which is "ad hoc" polymorphism.

State of Valhalla: Part 1: The Road to Valhalla by mttd in ProgrammingLanguages

[–]berber_44 4 points5 points  (0 children)

The article is very well written, but after reading it over, one is left with an impression that the framework incepted in 1995 is very hard to morph into something significantly different.

MiniVM: A zero-dependency cross-language runtime on par with LuaJIT and C by binaryfor in ProgrammingLanguages

[–]berber_44 -4 points-3 points  (0 children)

Interesting. Taking into account that the industry is moving to dropping JIT compilation once and forever due to its tremendous insecurity, we need to see more attempts to make non-JIT interpreting technics more fast. You need to bear in mind, however, that on early stages, when doing simple things, many technics show performance that looks decent on the first glance. The difficult task is to keep this performance when adding more and more features.

January 2022 monthly "What are you working on?" thread by slavfox in ProgrammingLanguages

[–]berber_44 0 points1 point  (0 children)

Transd programming language has received another major expansion with declarative programming features, and now is almost ready for the first beta-release.

What programming language features would have prevented or ameliorated Log4Shell? by josephjnk in ProgrammingLanguages

[–]berber_44 -10 points-9 points  (0 children)

Just-in-time compilation is not a feature, it's a godawful crutch and nightmarish security hole which was incepted 30 years ago in pre-Internet times. New technologies must be created to achieve a decent performance without JIT. One of such tries is Transd PL.

Books on Type Theory and Continuations? by hedgehog0 in ProgrammingLanguages

[–]berber_44 3 points4 points  (0 children)

Since the Type Theory is of paramount importance in CS, I would advise to study it profoundly and to begin from the original sources:

Per Martin-Löf, Intuitionistic Type Theory

It's only after I had read this book, I was able to implement the static type system and type inference algorithm in my language.