Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » My new programming language.

This thread is locked; no one can reply to it. rss feed Print
My new programming language.
verthex
Member #11,340
September 2009
avatar

m c said:

Many custom "web apps" are written in java, that is a java in-browser interface (or web-start or w/e). Things like government online paperless things to try to get away from the cumbersome past of having to get a thousand weird forms and do this and that. Now you can do it all online, pay tax, apply for passport, get welfare support for education blah blah blah. The government hire contractors to make this stuff (probably someone big like IBM). It's all written in Java.

But COBOL was that to begin with and Fujitsu tried to remake it recently into a more OOP language. Whatever happened with that?

m c
Member #5,337
December 2004
avatar

I don't know. I'm not omnipresent business czar, sorry I can't be of more help to your curiosity, though I'd imagine it would be aimed at people who are maintaining COBOL systems and havent yet re-implemented it all in Java (which many did, and long time ago already).

And from what I know, these are the kind of places where team leader is some pumpous "smarty-pants" 25 yo from india who is put as your team leader for reasons that you don't want to know, and you get like 30k a year if you're lucky, and if you end up there in real life and you're not just doing it as an alternative to unemployment, then you've done something wrong. Aka code monkey, Hahaha.

[EDIT] Wow we are off topic. I'll attempt to fix that:

I've got my own programming language, it is called "K" because that is the more Kickarse equivelant of the letter "C". Anyway it's just a custom pre-processor for C because I got sick of trying to do impossibly complex things with the normal C pre-processor and makefile.

I wasn't going to use variadic macros because msvc doesn't support them (which was a major handicap), and I wanted to do things like #define each function signature so there is only one place to change it (in the header file that the source file also includes), if only it wans't so ugly.

And it was thigns like in the header files:

#define MY_FUNC_SIG blah blah
FUNC_DEC(INDIRECT(MY_FUNC_SIG), BLAH BLAH)

and in the source:

FUNC_DEF(INDIRECT(MY_FUNC_SIG), blah blah)

Andi t would appropriately declspec or attribute accordingly on a common subset of things like pure or noalias and fastcall or cdecl and dll import or visibility default / hidden ETC ETC.

And in the makefiles I'd do things like

.PHONY : $(APPS)
$(APPS)    : $(wildcard $@/src/*.c) $(wildcard $@/src/*.h) $(wildcard $@/include/*.h)
  @echo && echo && echo "********************************************************************************"
  @echo "Compiling " $@ && echo "********************************************************************************"
  @echo "using CFLAGS= " $(FWCommon_CFLAGS) $(FWApps_CFLAGS) && echo
  $(CC) $(FWCommon_CFLAGS) $(FWApps_CFLAGS) -E -o bin/$@ $(wildcard $@/src/*.c) `cat $@/cmdline.inc 2>/dev/null`
  strip bin/$@

Where APPS was an array of my projects, with inter-project dependencies done like:

APPS= mylib myapp myapp2 myspeciallib
myapp: mylib
myapp2: mylib myspeciallib

And they had to be in appropriately named subdirs, and if they had special linker args that wouldb e put in a cmdline.inc file in their speical subdir, so on and so forth.

Problems was that DJGPP uses an old gcc that doesn't do whole-program at once optimization, and mingw doesn't have a /dev/null unless maybe I run it in that msys thing, and blah blah, so I also made my preprocessor a custom make / project manager tool.

But I still code in C, it's just more convenient now...

(\ /)_____#_____####__#
(O.o)¯¯¯#¯¯¯¯¯#¯¯¯#¯¯#
(> <)__####__####__####
Megabytes are where I keep my Data.

Jonatan Hedborg
Member #4,886
July 2004
avatar

verthex said:

What I heard was that NASA uses C for anything flight related because programmers tend to make more mistakes with Java.

[citation needed, seriously]

Java is a lot safer than C. We're talking orders of magnitude here.

-------
Sweden: Free from the shackles of Democracy since 2008-06-18!

verthex
Member #11,340
September 2009
avatar

[citation needed, seriously]

Theres no citation, it was a conversation I had once. But heres one pdf I found

Quote:

Java is a lot safer than C. We're talking orders of magnitude here.

He said it was mostly related to memory issues and overloaded programs crashing due to faults in program design.

axilmar
Member #1,204
April 2001

Evert said:

No, it is arrogant to assume that every programmer here will be intensely interested in your attempt to cure the (perceived) bad points in current C-like programming languages.

Where did I say that I assumed every programmer here will be intensely interested in my attempt? I never said that.

Quote:

Even if everyone agrees on what those are and how they should be solved (and that's a big if), then it still doesn't follow that you're the one to correct them.

Why not? please give me some reasons.

Quote:

How is that a language feature? You can write those in pretty much any language I can think of.

Perhaps you are confusing constness with pureness. They are different. I don't know an imperative native language that can enforce pureness on a function or class level. For example, in C++, a function with all const parameters can remove constness from one of its parameters with const_cast.

Quote:

Ok, so you were targeting C and C++ instead of FORTRAN. You're still up against the same type of inertia. You simply cannot expect people to abandon what they have and know for something new that you're designing when it's not even done yet. Especially if there's the risk that it's never going to be done.

Look at it this way: some guy on the internet is going to make a new cool programming language. Do I invest my time and energy into it, or do I sit on the fence and wait? If I invest my time and energy and said guy loses interest and pulls the plug, then I've just wasted my own time. On the other hand, if I wait and see I can step in later and not have wasted my time. So I wait and see.

I did not ask you to abandon what you have or use, nor to invest time and energy into it. I just asked about a little interest, i.e. read the stuff I've written to and tell me what you think. It's not that I have written millions of pages about it! one could easily spend 5 minutes going through it.

Personally, I like classes and primitives to be different things.

Why? interesting opinion, please give me a reason.

Quote:

There's tons of them, and what does "native" mean? That it compiles into platform-specific machine code?

There C, C++, D and ADA. Native means without a virtual machine.

Quote:

C# has that.

C# is not a native language.

Quote:

Solved in C#, D, Java, and about every other major language invented after C++.

C# and Java are not native.

D is a mess.

Quote:

You can't really reuse a compiler for a different programming language.

Of course you can. Many languages have that option...for example, Haskell can be compiled to C. C is used in many places as an intermediate representation.

Quote:

C# has this. By default, everything is garbage-collected, and you don't mess with pointers, but if you feel you need to, you can. Java also favours safety over performance, but the programmer's option for overriding this are limited.

So, all in all, I don't see too many exciting new features that would make me go "Oh yes, that's the language I've been waiting for".

But they are not native languages.

Vanneto
Member #8,643
May 2007

Whats with all the big walls of posts? You took the cowards way out because nobody took interest in a language that doesn't exist, what else is there to say?

In capitalist America bank robs you.

axilmar
Member #1,204
April 2001

Coward's way? I wouldn't have replied if that was the case. At least I replied ;-).

If there is interest in such a language (basically, a successor to C++) I will pursue the project. If not, then life has a lot of other interesting things to do.

bamccaig
Member #7,536
July 2006
avatar

Of course there's interest in a "modern day C++". :) You just have to give us something to work with before we can really say how we like it. The blog really wasn't a very good way to document the language (it would be a better place to chronicle the development). The actual language should be documented in an RFC or specification document. Something with proper code formatting and a logical structure.

You won't be able to satisfy everyone either. We all have our little preferences, etc. The best you can do is design it the way you think it would work best and see how it does. If it doesn't work then you can always try again.

Vanneto
Member #8,643
May 2007

I was interested, but not too much, but thats just because its not here yet. I did follow your blog though, every once in a while, had it in my bookmarks.

Finish the damn thing! Do it! ;)

In capitalist America bank robs you.

axilmar
Member #1,204
April 2001

Ok, I'll see what I can do and let you know. Thanks for the tips.

Kibiz0r
Member #6,203
September 2005
avatar

verthex said:

But heres one pdf I found

Whoa, they have a standard for C? Crazy, that's just like every other company that has ever programmed in C! They must not use any other languages!



Go to: