Author Topic: DIY programming language  (Read 8034 times)

Antsan

  • Priest
  • **
  • Posts: 52
    • View Profile
Re: DIY programming language
« Reply #75 on: August 29, 2016, 04:03:23 PM »
Any given language can be compiled into Java bytecode if you write a compiler that does it. There is no arcane barrier that prevents you from writing a compiler for compiling C, C++, Common Lisp, Scheme, Haskell, Prolog, Forth or any other arbitrary language into JVM bytecode – there is no need to use a detour over a compiler that first compiles into Java. It's probably about as hard as writing a compiler which compiles any of these languages into x86 or x86_64 or whatever other assembly.

Yes, there aren't compilers for all languages into Java bytecode. Just as there aren't compilers for every language into C or Assembly. That doesn't tell you anything about the language, though.
What a language compiles (translates) into is not a property of the language but of the compiler used. If a given compiler does not exist, you can write it.

Krice

  • Protector of the @
  • *****
  • Posts: 2041
    • View Profile
    • Email
Re: DIY programming language
« Reply #76 on: August 29, 2016, 04:36:26 PM »
Whatever.

Anyway, let's move on to more interesting things. I finally decided to update Visual Studio to Community 2015. It has a language called F# (with some other languages as well) which seems to be quite funky. It appears to be leaning to functional programming, but has also classes. Interestingly it has values default as immutable, the way I would also prefer and you have to use mutable keyword to make them mutable. You don't have to specify a type, but you can. Also I like the clear distinction between 'structure' and 'record'. And I don't have to desperately try to find IDE for it like it's with all those open source languages.
« Last Edit: August 29, 2016, 04:39:02 PM by Krice »

Krice

  • Protector of the @
  • *****
  • Posts: 2041
    • View Profile
    • Email
Re: DIY programming language
« Reply #77 on: August 30, 2016, 04:12:40 PM »
But.. it's slow. Seriously. I can see the 80x25 level printing on console, it's that slow. I tried to replace Map with simple array (for tile glyphs) and use Console.Write instead of printf, but there was no difference. At least it looks like console programming is out of the question. I wonder how easy it is to go graphical on F#.

tuturto

  • High Priest
  • ****
  • Posts: 259
    • View Profile
    • pyherc
Re: DIY programming language
« Reply #78 on: August 31, 2016, 03:24:59 AM »
But.. it's slow. Seriously. I can see the 80x25 level printing on console, it's that slow. I tried to replace Map with simple array (for tile glyphs) and use Console.Write instead of printf, but there was no difference. At least it looks like console programming is out of the question. I wonder how easy it is to go graphical on F#.

Easy as eating a pie. Just pick your favourite .Net graphics library and go wild. I found MonoGame (http://www.monogame.net/) both easy and fast. For console stuff there's MonoCurses (https://github.com/mono/mono-curses/).
Everyone you will ever meet knows something you don't.
 - Bill Nye

Krice

  • Protector of the @
  • *****
  • Posts: 2041
    • View Profile
    • Email
Re: DIY programming language
« Reply #79 on: August 31, 2016, 10:04:49 AM »
Easy as

I think you need to install some kind of Git Shell, or what it was called, and compile from source. Hard?

tuturto

  • High Priest
  • ****
  • Posts: 259
    • View Profile
    • pyherc
Re: DIY programming language
« Reply #80 on: August 31, 2016, 10:39:17 AM »
Easy as

I think you need to install some kind of Git Shell, or what it was called, and compile from source. Hard?

For MonoGame? Just use nuget-packages from nuget.org (https://www.nuget.org/profiles/MonoGame) and you're set. Bonus points for being ready to update to a newer version when it gets released.
Everyone you will ever meet knows something you don't.
 - Bill Nye

Krice

  • Protector of the @
  • *****
  • Posts: 2041
    • View Profile
    • Email
Re: DIY programming language
« Reply #81 on: September 01, 2016, 08:28:44 PM »

Krice

  • Protector of the @
  • *****
  • Posts: 2041
    • View Profile
    • Email
Re: DIY programming language
« Reply #82 on: September 03, 2016, 07:41:10 AM »
For MonoGame? Just use nuget-packages from nuget.org (https://www.nuget.org/profiles/MonoGame) and you're set.

People on reviews of that.. thing seem to be UPset rather than set.