Blog post !

Developed or developing a new product in PureBasic? Tell the world about it.
srod
PureBasic Expert
PureBasic Expert
Posts: 10589
Joined: Wed Oct 29, 2003 4:35 pm
Location: Beyond the pale...

Re: Blog post !

Post by srod »

Little John wrote:
srod wrote:because I can't read my own writing!
So you get perfect analog cryptography for free. Cool! :D
Yes, but decrypted it makes less sense than the nonsensical ramblings I wrote down in the first place. :)
I may look like a mule, but I'm not a complete ass.
Axolotl
Enthusiast
Enthusiast
Posts: 432
Joined: Wed Dec 31, 2008 3:36 pm

Re: Blog post !

Post by Axolotl »

Hi
https://www.purebasic.fr/blog/?p=480
Very interesting news here.
PB back end is going to be a C compiler.
Mostly running PureBasic <latest stable version and current alpha/beta> (x64) on Windows 11 Home
BarryG
Addict
Addict
Posts: 3268
Joined: Thu Apr 18, 2019 8:17 am

Re: Blog post !

Post by BarryG »

Finally, a new blog post! And it explains why the team has been so quiet lately.
User avatar
Mijikai
Addict
Addict
Posts: 1360
Joined: Sun Sep 11, 2016 2:17 pm

Re: Blog post !

Post by Mijikai »

Great news and the best part no LLVM nonsense :)
This makes me really happy and hopeful.
User avatar
skywalk
Addict
Addict
Posts: 3960
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Blog post !

Post by skywalk »

This is tremendous news!!!
The LLVM study was not wasted since it pointed towards a more compatible path forward.
I read and tried several new languages that jumpstarted with LLVM, but then complained and started their own compiler effort. Emitting C just seems the most logical choice for a small team driving a tight procedural language.
Big yay 8)
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
Keya
Addict
Addict
Posts: 1891
Joined: Thu Jun 04, 2015 7:10 am

Re: Blog post !

Post by Keya »

LLVM sounds good on paper, but I find its IR language is a bit of a dogs breakfast. Here's "Hello World" from the LLVM wiki page:

Code: Select all

@.str = internal constant [14 x i8] c"hello, world\0A\00"
declare i32 @printf(i8*, ...)
define i32 @main(i32 %argc, i8** %argv) nounwind {
entry:
    %tmp1 = getelementptr [14 x i8], [14 x i8]* @.str, i32 0, i32 0
    %tmp2 = call i32 (i8*, ...) @printf( i8* %tmp1 ) nounwind
    ret i32 0
}
Here's the same in C:

Code: Select all

#include <stdio.h>
int main() {
   printf("Hello, World!");
   return 0;
}
I know which I prefer!

LLVM would've also required Fred and team having to learn an entirely new language, whereas they're already well versed in C (if im not mistaken PB itself is written in C). It would've also required all PB users to learn at least the basics of LLVM, whereas many of us are already at least somewhat familiar with C.

Having a C backend for PB would open up the door to many new possibilities, and would allow Fred and team to concentrate on the actual PB-to-C translations, while allowing the C compiler (assumingly gcc) to do all the grunt work in regards to assembly-level optimisations etc, and even compile to ARM/ARM64 for those who keep asking for that, without Fred having to spend time developing an entirely new backend just for ARM.

So I'm super glad they've chosen C over LLVM, and I'm super excited!
User avatar
kenmo
Addict
Addict
Posts: 1967
Joined: Tue Dec 23, 2003 3:54 am

Re: Blog post !

Post by kenmo »

This is exciting news! :!: A C backend opens the door to a wide ecosystem of tools and systems.

It seems like we think the same of LLVM (sounds good in theory, but the IR syntax is ugly, and getting LLVM up and running is a huge pain)
User avatar
useful
Enthusiast
Enthusiast
Posts: 363
Joined: Fri Jul 19, 2013 7:36 am

Re: Blog post !

Post by useful »

Why stop at C and JS?
We need to go in the direction of - one IDE for Pure(Spider)-basic with the ability to generate multiple targets.
Similar to https://haxe.org/ .
Dawn will come inevitably.
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: Blog post !

Post by Josh »

Yeah, it lives

Sounds good. Thanks to Fred & Co.
sorry for my bad english
Axolotl
Enthusiast
Enthusiast
Posts: 432
Joined: Wed Dec 31, 2008 3:36 pm

Re: Blog post !

Post by Axolotl »

Hi
I was really amazed and thought twice before posting (first april, or similar "fooling"). It seems to be serious.
Yes, from my point of view this is the best way to keep a procedural language modern and up-to-date.
Thanks to the PB-Team

Advantage on this side: I know the language C and can also program with it. yay.
Mostly running PureBasic <latest stable version and current alpha/beta> (x64) on Windows 11 Home
User avatar
Keya
Addict
Addict
Posts: 1891
Joined: Thu Jun 04, 2015 7:10 am

Re: Blog post !

Post by Keya »

Axolotl wrote:Advantage on this side: I know the language C and can also program with it. yay.
which is one of the reasons I'm not keen on Haxe - for the vast majority of us Haxe would require learning a whole new language (not another one, ugh!), whereas most of us are already familiar with/have invested time in C, and C is a very mature language, and has tonnes of libraries we can use also
Axolotl
Enthusiast
Enthusiast
Posts: 432
Joined: Wed Dec 31, 2008 3:36 pm

Re: Blog post !

Post by Axolotl »

@keya: exactly.

I do not participate in discussions about different languages. My motto: use the language you like best, or the one that will help you get the task done the fastest, or (add your reason). :-)
I can do windows programming in C/C++ or Delphi but I always coming back to PB.
Mostly running PureBasic <latest stable version and current alpha/beta> (x64) on Windows 11 Home
zikitrake
Addict
Addict
Posts: 833
Joined: Thu Mar 25, 2004 2:15 pm
Location: Spain

Re: Blog post !

Post by zikitrake »

Fantastic news. Thank you all.
It says on the blog that you are a small company. But those of you who run it are the biggest.
Again, thanks for your efforts.
User avatar
the.weavster
Addict
Addict
Posts: 1531
Joined: Thu Jul 03, 2003 6:53 pm
Location: England

Re: Blog post !

Post by the.weavster »

Very interesting development, especially if we can include unaltered C files and then use their commands directly in PB.

PB for Raspberry Pi. Very cool ! :D
Bitblazer
Enthusiast
Enthusiast
Posts: 730
Joined: Mon Apr 10, 2017 6:17 pm
Location: Germany
Contact:

Re: Blog post !

Post by Bitblazer »

the.weavster wrote:PB for Raspberry Pi. Very cool ! :D
Hmm yes or for smartwatches. Still one of my secret dreams, my own software on a sexy touchable smartwatch with gps and wlan <3
Maybe even with LORA WN (it will happen within the next years!).
webpage - discord chat links -> purebasic GPT4All
Post Reply