Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

smetvid

macrumors 6502a
Nov 1, 2009
551
433
Raw javascript in its purest form.

Sure it isn't super powerful but it can be used just about anywhere and on anything. It really is the ultimate use anywhere language. If only performance would get better but I know the language has come a long way in recent years. I have even started building desktop applications with the help of node.js.

Even sprite based game development is pretty darn good now with javascript. Just wish browsers and system would catch up in terms of optimized performance. iOS8 is a step in the right direction but it still leaves a rather big hole of support for older devices.

Up until recently my weapon of choice was Actionscript 3.0. I'm sure this will get some negative reaction but AS3 had much better performance compared to javascript and was a pretty mature language capable to some very impressive performance. for iOS development I can still squeeze better performance out of AIR and AS3 than javascript can currently do on its own. Especially when used on devices that do not support iOS8. I can get a decent 60 fps even on a iPhone4 and iPad3 for games I am developing by using gpu optimization and hardware acceleration. AIR and AS3 are not exactly at Objective C levels but with the right optimizations it is pretty darn close.

Since I do a lot of front end web development this days as well as develop apps I have started to make a lot more use of javascript since I can use it just about anywhere. If I am making a mobile game however I will usually reach for AIR since I know it can still get 60fps even on older iOS6 and Android devices.
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,565
6,071
Raw javascript in its purest form.

Sure it isn't super powerful but it can be used just about anywhere and on anything. It really is the ultimate use anywhere language. If only performance would get better but I know the language has come a long way in recent years. I have even started building desktop applications with the help of node.js.

Even sprite based game development is pretty darn good now with javascript. Just wish browsers and system would catch up in terms of optimized performance. iOS8 is a step in the right direction but it still leaves a rather big hole of support for older devices.

Up until recently my weapon of choice was Actionscript 3.0. I'm sure this will get some negative reaction but AS3 had much better performance compared to javascript and was a pretty mature language capable to some very impressive performance. for iOS development I can still squeeze better performance out of AIR and AS3 than javascript can currently do on its own. Especially when used on devices that do not support iOS8. I can get a decent 60 fps even on a iPhone4 and iPad3 for games I am developing by using gpu optimization and hardware acceleration. AIR and AS3 are not exactly at Objective C levels but with the right optimizations it is pretty darn close.

Since I do a lot of front end web development this days as well as develop apps I have started to make a lot more use of javascript since I can use it just about anywhere. If I am making a mobile game however I will usually reach for AIR since I know it can still get 60fps even on older iOS6 and Android devices.

Have you tried running your JavaScript through ASM.js? My understanding is that's supposed to offer a pretty significant speed boost in Chrome and Safari. I haven't used it directly, I just know that's part of what Unity 5 does when you deploy to JavaScript.
 

Nosferax

macrumors regular
Nov 11, 2014
164
7
Mostly C now...
I do use Obj-C for gui, but most of my code are in plain C.

I also use VB.Net on windows even though I also know C#, but for simple one task utility dev I prefer VB.

I do miss Pascal sometime since it was my first "real" programing language. I learned to program on a TRS-80 MC-10 with 20k of ram in Basic. I also did some C6502 assembler on my Atari 130XE later on and also for the MC68000 PIC at university in my bachelor degree in CS. I liked it a lot. But assembler today is a bit more complicated. The architecture are way more complex than they were in the good old day.

But I always come back to C...
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,565
6,071
Implementing the core of my language's interpreter in C. Total PITA. Never want to use C again once I'm done.
 

Nosferax

macrumors regular
Nov 11, 2014
164
7
Implementing the core of my language's interpreter in C. Total PITA. Never want to use C again once I'm done.

I love the simplicity of it and the fact that it doesn't hold your hand.
And beside assembler, you can't really beat it performance wise as it is only one step above assembler when it comes to talking to the machine.

I also have plenty of functions libraries that I've accumulated over the years, most of it written by me, so I don't have to reinvent the wheel everytime.
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,565
6,071
I also have plenty of functions libraries that I've accumulated over the years, most of it written by me, so I don't have to reinvent the wheel everytime.

That's sad, and one of the main things I want to do away with: people writing libraries that have already been written. It's a huge waste of time. Imagine what better things the human race could have done with all that collected time that was wasted writing yet another * library. Maybe we'd have cancer solved by now. But no, we wasted time reinventing the basics rather than moving forward.

I don't blame you, C is a really crappy language for sharing code in (as is every other language, because no language was actually designed with it in mind. There's a butt ton of SCM software (more people wasting time reinventing the same thing) that all tries to remedy this, but none of them do very well.)
 

chown33

Moderator
Staff member
Aug 9, 2009
10,755
8,445
A sea of green
Implementing the core of my language's interpreter in C. Total PITA. Never want to use C again once I'm done.

Stage 2 of your language should be writing a compiler for your language in your language. Then you run that compiler in your interpreter-in-C, which then compiles itself. Boom, bootstrapped.

After it's been implemented in itself, you can bootstrap a new interpreter, or just go with incremental compile/execute.
 

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,565
6,071
Stage 2 of your language should be writing a compiler for your language in your language. Then you run that compiler in your interpreter-in-C, which then compiles itself. Boom, bootstrapped.

After it's been implemented in itself, you can bootstrap a new interpreter, or just go with incremental compile/execute.

The language is interpreted, not compiled. I have little experience with assembly so I don't think I would write a very good compiler. Once it's open sourced someone else can write a compiler if they want.
 

chown33

Moderator
Staff member
Aug 9, 2009
10,755
8,445
A sea of green
The language is interpreted, not compiled. I have little experience with assembly so I don't think I would write a very good compiler. Once it's open sourced someone else can write a compiler if they want.

Compilation may not be the obstacle you may think it is. It could be a threaded interpretive language, or token-threaded, or various other things:
http://en.wikipedia.org/wiki/Forth_(programming_language)


Even if compilation is separate from interpretation, don't compile to assembler: compile to an intermediate language. There's no point in repeating all the work that's already been done with ILs.

One choice would be the IL used by the gcc compilers. That also brings some interoperability options with it.
http://en.wikipedia.org/wiki/GNU_Compiler_Collection#Front_ends

Or if you wanted a different IL, use the one Microsoft uses for C#.
http://en.wikipedia.org/wiki/C_Sharp_(programming_language)
http://en.wikipedia.org/wiki/Common_Language_Infrastructure
 
Last edited:

chrono1081

macrumors G3
Jan 26, 2008
8,463
4,187
Isla Nublar
Languages I like: C, C++, Objective-C

Languages I hate: Anything web. The syntax is horrible for all of them and you have to know a ton of them just to do a simple task.
 

Senor Cuete

macrumors 6502
Nov 9, 2011
424
30
C / Objective C

C runs fast. C is universal. Code can be shared easily in a C environment. C is intuitive for me. What you type is close to what happens on the computer.

I don't have any problems with things that bug people about C like using pointers. I understand memory management and find it easy.

Objective C is a strict super set of C, unlike C++. Objects can be shared easily. I find manual memory management easy and am responsible for projects that don't use ARC.

This isn't about language but Cocoa has great properties like no multiple inheritance.

Somebody is always trying to figure out a way to make programming a no-brainer. Object-oriented programming was supposed to do this and it is successful - allowing one to use fameworks like Cocoa, which saves you a lot of work. But programming will always be a brainer, no matter how many new languages you invent.

This is a Mac programming forum so I like XCode, Cocoa, C and Objective C. When Apple announced Swift I was bummed. There are thousands of languages and only a handful are useful. ANOTHER language? Please no.
 

firewood

macrumors G3
Jul 29, 2003
8,109
1,346
Silicon Valley
But no, we wasted time reinventing the basics rather than moving forward.

The people who can reinvent the basics are people who understand the basics. There are too many coders who have no clue of the basics and thus a less clear idea of what they are actually doing (killing the user's battery life or A/C bill, etc.).

The language is interpreted, not compiled. I have little experience with assembly so I don't think I would write a very good compiler.

You don't need to compile to assembly language to bootstrap a new language. You can compile to any intermediate language (such as LLVM, JVM, C, Forth or even Javascript) and let some other tools finish the job for you.

C runs fast. C is universal.

That's why knowing C is so very valuable. Get some new weird tiny micro-controller or access to some huge special purpose supercomputer, and most often it has a SDK that accepts C, or something very C-like. (OK, maybe Fortran as well...)
 

firewood

macrumors G3
Jul 29, 2003
8,109
1,346
Silicon Valley
Java and Java. I've written for micro controllers and AS/400.

Those tiny-uP JVMs (for the MSP400, AVR, PIC, et.al.) often run only small subsets of Java. And these JVMs are themselves sometimes ... written in C, not Java!

But the language for tiniest environments on this site should be 6502 ASM and Integer Basic (as in for the 4K Apple I).
 

talmy

macrumors 601
Oct 26, 2009
4,726
333
Oregon
But the language for tiniest environments on this site should be 6502 ASM and Integer Basic (as in for the 4K Apple I).

Sorry, just last year I wrote a program in PDP-8 assembler (4096 words of memory and an instruction set that has 8 instructions).
 

teagls

macrumors regular
May 16, 2013
202
101
The people who can reinvent the basics are people who understand the basics. There are too many coders who have no clue of the basics and thus a less clear idea of what they are actually doing (killing the user's battery life or A/C bill, etc.).



You don't need to compile to assembly language to bootstrap a new language. You can compile to any intermediate language (such as LLVM, JVM, C, Forth or even Javascript) and let some other tools finish the job for you.



That's why knowing C is so very valuable. Get some new weird tiny micro-controller or access to some huge special purpose supercomputer, and most often it has a SDK that accepts C, or something very C-like. (OK, maybe Fortran as well...)

I'm going to have to throw my vote for C as well. I do a lot of OpenGL programming as well as GLSL, which is very C like.

After spending so much time working with OpenGL doing c/c++ I despise loosely typed languages because data type matters so much for OpenGL.

I am not a big fan of the more abstract languages that hold your hand. It's great for learning concepts and developing rapid prototypes. But, after mentoring lots of computer science students out of college and junior developers many lack knowledge to even work on basic C/C++ software.

As languages become more abstract and higher level, understanding what happens at the low level becomes lost and I think thats a bad thing.
 

moonman239

Cancelled
Original poster
Mar 27, 2009
1,541
32
Implementing the core of my language's interpreter in C. Total PITA. Never want to use C again once I'm done.

Try C++ instead.

Edit: I just thought of something. It'd be nice if we could build a program using multiple languages at the same time. So, C++ for one task, C for another, Objective-C for another, Java for yet another task, Python for another task, etc. The assumption might be that the user has the tools one would normally use to run programs built in higher-level languages (JVM for Java code, Python interpreter for Python code, etc.)
 
Last edited:

ArtOfWarfare

macrumors G3
Nov 26, 2007
9,565
6,071
Try C++ instead.

Edit: I just thought of something. It'd be nice if we could build a program using multiple languages at the same time. So, C++ for one task, C for another, Objective-C for another, Java for yet another task, Python for another task, etc. The assumption might be that the user has the tools one would normally use to run programs built in higher-level languages (JVM for Java code, Python interpreter for Python code, etc.)

I think you're hitting at one of the key features of my language:

The syntax and style is whatever you want it to be. No more complaining about people who don't follow your style rule, or about having to follow someone else's style rule. If you want camel case and your coworker wants snake case, you can each use your own style. Somebody wants no braces around one line ifs and another wants them required, while a third wants significant whitespace like Python, a fourth wants to get lost in Lisp's parentheses, and somebody else thinks a graphical diagram is best for programming? Everyone can be happy.

The files themselves look like lisp (because it's trivial to write a parser for) in a plain text editor without a plugin, but I intend to have plugins for browsers and text editors to properly convert between that syntax and whatever your preferred syntax is (stored in a system wide file). Names and comments can be localized to multiple languages, so sharing code can be easier (granted, someone will need to make a translation.)

The programs that open/save the files are themselves written in the language, so you can write a new syntax using an old one.
 

talmy

macrumors 601
Oct 26, 2009
4,726
333
Oregon
Edit: I just thought of something. It'd be nice if we could build a program using multiple languages at the same time. So, C++ for one task, C for another, Objective-C for another, Java for yet another task, Python for another task, etc.

You already can. It's trivial to write programs in both C and C++, C and Objective C (and therefore also Swift), and possible but not as easy to have Java and C and/or C++ (the interface is cumbersome). Scripting languages (like Python) can easily execute programs in any compiled language to perform tasks and likewise compiled languages can execute scripts. I've done all of the above.
 

Senor Cuete

macrumors 6502
Nov 9, 2011
424
30
Implementing the core of my language's interpreter in C. Total PITA. Never want to use C again once I'm done.

You're doing it wrong. C gives you the power to do anything you want but it doesn't hold your hand.

ArtOfWarfare said:
I think you're hitting at one of the key features of my language:

The syntax and style is whatever you want it to be.

"My monster will have a perfect schvanstucker."
Dr. Victor Frankenstein in the movie Young Frankenstein
 

tyche

macrumors 6502
Jul 30, 2010
413
65
Object Pascal via Embarcadero RAD Studio. I've used Delphi for so many years I'm able to code anything I need and now I can deploy my code to Windows, OS X, iOS, and Android.

Shame it's so niche. Microsoft destroyed Delphi when they drove a dump truck full of money over to the creator of it so that he could write C# for them.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.