r/ProgrammingLanguages • • May 21 '23

Bolin 0.4.1

0.4.1 is up https://bolinlang.com/

It's a boring release. For the most part, all we did was improve error messages, refactored code and improved inlining

0 Upvotes

42 comments sorted by

28

u/[deleted] May 21 '23 edited May 21 '23

Still no source code available! Have a nice day!

2

u/levodelellis May 21 '23 edited May 21 '23

Honestly, don't hold your breathe. I opened source projects before and it's a lot of trouble. I rather focus on the compiler for now. Someone on the team would have to offer to manage it and no one has offered. We also don't want to accept code from anyone until after 1.0

12

u/TheGreatCatAdorer mepros May 21 '23 edited May 21 '23

'Open source' does not require someone to clean up their code or accept contributions; you might feel somewhat ashamed about the codebase, but even in such a state it would inspire a lot more trust than opaque binaries, and most projects don't receive contributions anyway, not that you'd need to accept any you did.

All you need to do is add a license and allow redistribution and modification. It's really not a lot to ask. There's only one language I recall that's had a hostile fork (Zig) and that was in a different human language.

1

u/[deleted] May 25 '23

We also don't want to accept code from anyone until after 1.0

Open source does not mean open contribution - you are under no obligation to ever accept contributions from anyone else in your projects.

Open source means that your users have the ability to study, modify or fork the project to best suit their needs.

22

u/kaddkaka May 21 '23

What does this part of the Eula mean?

(b) Licensee shall not assign, rent, transfer, distribute, or sublicense the Software (which for certainty includes the Compiler, the Library, precompiled code and documentation) the Executable Product, or any of Licensee’s rights under this Agreement [...]

Does it mean that I cannot share the programs I create? o.O

12

u/Athas Futhark May 21 '23

Yes, that's made quite explicit:

For certainty, Licensee may not: distribute, assign, sell or grant any rights in or to the Software OR the binary executable product created by using the Software.

Also, you cannot put the programs you create on your "server", whatever that means:

Licensee shall not put the Executable Product on Licensee’s server for any reason

You also cannot talk about any bugs you find:

Licensee shall not publish or disclose to any third party the results of any benchmark tests or other evaluation run on the Software without the prior written consent of DeLellis.

13

u/Folaefolc ArkScript May 21 '23

Basically it's a language that you cannot use ; does it apply to the creator as well?

7

u/Solindek May 21 '23

This doesn't have any sense

-1

u/levodelellis May 21 '23

I didn't intend that to be part of the license. I also didn't want to spend a few hundred (it was literally that range) to ask a lawyer if I can remove a few lines without breaking something in the license

4

u/yorickpeterse Inko May 21 '23

Then why is it there in the first place? Why not just use e.g. the GPLv3 or a similarly viral license? If your concern is people stealing your work then A) that's not going to happen anyway so why bother B) the GPL is a perfectly valid and proven license for such a use case.

0

u/levodelellis May 21 '23

The license was essentially off the self. GPL doesn't handle certain cases that I'd like to avoid

14

u/yorickpeterse Inko May 21 '23

Reading this comment it seems you're worried about Amazon taking your language, somehow offering it as a paid service/claiming it as their own, then not giving you back anything in return.

Honestly, this is just FUD. No company is going to take your language (or any language on /r/ProgrammingLanguages for that matter) and run with it. And why would they? There's literally nothing to gain here. All EULAs like this do is drive people away from your language rather than getting them interested, and it may form a negative image around your language that will be hard so shake.

3

u/tesfabpel May 23 '23

In any case, the AGPL license covers even that use case.

-3

u/levodelellis May 21 '23 edited May 21 '23

You can open source your program just fine and other people can build it and run it on their machines. My team and I have seen a certain cloud company mislead people into thinking they created software so we're using this restrictive license to avoid that problem for the moment

15

u/thefriedel May 21 '23

With such a weird EULA, that even restricts to publish own compiled binaries and which does not allow to publish own benchmarks, it's a bold no-go.

1

u/levodelellis May 21 '23

I didn't intend that to be part of the license. I also didn't want to spend a few hundred (it was literally that range) to ask a lawyer if I can remove a few lines without breaking something in the license

2

u/thefriedel May 21 '23

Or you use a open-source license that fit your needs, as a good (and almost every) programming language use, but for sure that's up to you.

For now, if I even can't distribute binaries, I would rather go to other languages...

1

u/levodelellis May 21 '23

Why not open source your project and let people build their own binaries?

4

u/thefriedel May 21 '23

I would, but I also would have to add an extra constraint to not distribute binaries and adding my package to binary package managers (like apt, brew, dnf) is not possible, everyone would have to install the compiler and compile my project, thus nobody will use my project.

4

u/mungaihaha May 21 '23

Matches C execution speed, occasionally Bolin is faster

I am new to this programming languages thing. How is this possible?

4

u/levodelellis May 21 '23

The next bullet point has a link to two reasons. Our standard library has a few functions that may inline where C and C++ standard library does not, and no copying on fread/fgets https://bolinlang.com/more_optimal_standard

For the most part they're roughly the same speed

4

u/vmcrash May 21 '23

Automatic memory management (no gc, no rc)

Why say what is used if you can say what not if used? To increase the interest?

3

u/levodelellis May 21 '23

I tried explaining it in the past. I ended up with a 8 page document and it didn't seem helpful to read. I think I need to finish the type system and have working examples of every rule for people to really understand how it works

5

u/vmcrash May 21 '23

Yes, some good explanation would be really helpful. I'm not experienced with that, but I'm curious to know a) how it works and b) how it differs from Rust.

3

u/lngns May 21 '23

(e) Licensee shall not publish or disclose to any third party the results of any benchmark tests or other evaluation run on the Software without the prior written consent of DeLellis.

My understanding is that you both do not want to open-source unfinished software, and do not want people to use it for commercial purposes, which all are cool things, but that particular clause also prevents freely sharing information and hinders independent research. Not so cool.

Have you considered strong copyleft and/or anti-commercial and/or anti-capitalist licences instead?
The AGPL should scare off Amazon with its remote services clause. So does the SSPL by requiring users to open-source their entire operating system.

Parity goes way further by requiring users to open-source anything they do with your software. That includes programs they'd compile with your compiler.

2

u/levodelellis May 21 '23

agpl was considered and we might use it if we open source at 1.0 but no one on the team wants to deal with handling an open source community at the moment.

I never seen parity before. IMO it doesn't handle a case I like to avoid and I don't want to force everyone who uses my compiler to make their source follow the parity license

2

u/lngns May 21 '23

I don't want to encourage you to use one licence instead of another - like you if and when I decide to share my own language project, I'll use a custom licence, - I do however believe in Freedom of Information and think that this particular clause alone gets in the way.
Not too big a deal though; I just wanted to point it out.

2

u/levodelellis May 21 '23

I mentioned in another comment it wasn't my intention to have something that said no benchmarks.

Hopefully whatever license I use to replace the current will be much better

2

u/Inconstant_Moo 🧿 Pipefish May 22 '23

_OnEmpty is an interesting thought but why the _?

1

u/levodelellis May 22 '23

The first thing I did after release was break my syntax so you can write on empty, complete { codeForBoth() }. Do you prefer that?

4

u/Inconstant_Moo 🧿 Pipefish May 22 '23

I'd have to look at a bunch more of your syntax to see how it gels with the rest of it, but imho anything beats a leading underscore for looks.

13

u/Innf107 May 21 '23

Licensee shall not publish or disclose to any third party the results of any benchmark tests or other evaluation run on the Software without the prior written consent of DeLellis.

Lol. Yeah that's how you get people to trust you.

Hey, at least this absolutely achieves your goal: I don't see why any company would want to steal your software, even if they could.

1

u/[deleted] May 21 '23

I had a go at running this in WSL within my Windows OS. I didn't have much luck.

The installation is a ZIP file with some vague instructions about environment variables, which I don't have any idea about in Linux. I just extracted the files into C:\bolin under Windows, then switched to WSL and went to the bolin\linux\bin directory where there was an executable.

I tried ./bolin, it said internal files were missing. OK, I copied files from ../include and ../lib into bin. Now it worked better (a message to read the docs), but why doesn't it just work anyway? It should use relative paths from the executable to find the necessary files.

Now, I need hello.bolin, but there isn't one. Examples of code are sparse; I found one and stuck it in test.bol. Now I need to run the compiler but the readme example has two input source files; why? I tried this:

./bolin -g -tcc test.bol

plus variations. tcc is installed and should work (I don't know if the patch mentioned is essential or not, but I'm not going to mess about about building tcc!). It said "a.ll failed to build". Is that trying to use LLVM? That's installed too!

Only -v and -syntax worked.

This is not good. Installation and getting to run some Hello program should work better than this. If it can use a tcc backend, that sounds like it uses C intermediates, therefore gcc could work too (and there should be a option to just produce the C file). Everyone using Linux has gcc, even if it's not fast. Anything to get past the first obstacle.

1

u/levodelellis May 22 '23 edited May 22 '23

You're one of the few I known (outside of the team) who tried!

IIRC your machine doesn't have AVX2 instructions? And I don't know if WSL supports multiple threads using the fs register so if you see illegal instruction those could be the reason, but it appears you didn't

I got really lazy at the end when I realized how much of a pain this might be to figure out absolute path in order to detect where the files can be. If you have them all in the current working directory I think it may work so copying it all into bin was a good move. It might work if you execute using a full path but I never tried on WSL

I guess you didn't get a build? If you have bolin in your path and tcc (or clang) it should execute assuming it found all the files. Perhaps the include file wasn't found and it failed to build? The tcc patch isn't essential. If clang is in the path you don't need -tcc and the compiler will default to clang (the original backend)

I'll provide more examples in the next release. I figure people would execute the example on the bolin front page. I'll clean it up for the next release. The previous releases all depended on everything being in the current directory and the only complaints I gotten was it didn't work on their machine (kernel version was too low)

a.ll suggest it is trying to use llvm but I suspect I am reporting an old/poor error, it should be saying something else unless you actually see a a.ll in your working directory. -gcc could work but I imagine if tcc fails gcc would to. The missing internal files is a bitpattern, if you tell me the number I may possibly know what file is not being found. I really didn't think anyone would try this release since it is so boring

1

u/[deleted] May 22 '23

I really didn't think anyone would try this release since it is so boring

I wanted to see what it was about since there's an air of mystery about this language, and I have no idea about the compiler implementation.

For example, you mention that it makes use of tcc, which means that it uses intermediate C? But in that case, the use of fs and AVX2 should be irrelevant. And this is the first I've heard of Clang if you leave out -tcc. But is that Clang used for processing LLVM stuff, or processing C source code?

Adding a -verbose option that it displays all the steps it's doing would be helpful.

Or maybe the details of its overall structure are proprietary as well as the actual sources?

1

u/levodelellis May 22 '23

Everyone complained about llvm API. So I use llvm-ir as text and spawn a clang process instead of using the API directly. tcc compiles much faster and would let me not depend on llvm/clang. I typically use -tcc for debug builds and -O2 (with no -tcc) for optimize builds

I use a lot of AVX2 instructions in the lexer so that's why it's required. I didn't want to write a plain C version since AVX2 has been supported for over a decade. I wrote a NEON implementation for ARM as well

1

u/levodelellis May 22 '23

but why doesn't it just work anyway? It should use relative paths from the executable to find the necessary files.

When I wrote the code I didn't realize in my testing environment argv[0] was absolute and when you write ./bolin it's relative. The original code I wrote removed the directories and added lib/ but that doesn't work when your path is ./ (because ../ is required) and when I realize (right before release) I was at the point where I wanted to rewrite the function so I thought to myself do it for the next release. The other issue I wanted to fix was where to look when using a soft link.

I usually never look at binary paths when I write code

1

u/[deleted] May 22 '23

Maybe this is something that is easier on Windows than on Linux.

I have a function os_gethostname() which retrieves a full path to the executable that is running. So even if I start it as:

mm prog

that function could give me something like c:\m\bin\mm.exe. Since I now know where mm.exe lives, in C:\m\bin\ (or I can use C:/m/bin/ internally), I can use that path (say I store it in homepath), to access a dependency such as homepath + "mm_help.txt", or homepath+"../lib/etc...".

Now I don't need to set up environment variables; I can store multiple versions in different locations, it doesn't matter as each version knows where to pick up its own support files.

That function is defined on top of GetModuleFileName in WinAPI. I don't know if there's a Linux equivalent (multiple aliases to the file can make it harder). And on Linux, I think the tendency is not to put the support files of an application nearby, but in different parts of the file system (yours doesn't do that).

1

u/levodelellis May 22 '23

I think if you unzip a fresh copy and write sudo cp linux/* /usr/local it should essentially copy paste the bin, lib, include folder into your /usr/local/bin lib include. Then writing bolin in any folder should work. I assumed all the linux people would be hardcore and I didn't think this would run on WSL since I didn't use libc and I wrote lots of assembly

1

u/pthierry May 21 '23

I don't see in the highlights what's supposed to be in no other language…

0

u/MCRusher hi May 21 '23

"code will never be bolin"

the code: https://bolinlang.com/examples