Compiling with VS2015

Collapse
X
 
  • Time
  • Show
Clear All
new posts

  • Siemelink
    replied
    Originally posted by t4nk
    Yes, we haven't heard anything from the OP, so I guess he didn't manage to compile Angband with VC++.
    Still stuck. I've been distracted so haven't started debugging yet.

    Willem.

    Leave a comment:


  • t4nk
    replied
    Originally posted by AnonymousHero
    Have you tried actually using them with pattern matching... and "making illegal states unrepresentable", etc? (I'm talking in e.g. O'Caml, Haskell or the like. Not in toy programs either -- real programs.)
    Hm, don't recall doing that. Most of my experience with functional programming is from tinkering with Common Lisp (hated that thing and it's not particularly functional anyway), and Erlang, which was pretty nice. I especially liked the huge amount of mutable state it had - that's probably because it was used to solve practical problems, not doing research or proving some theories
    And, yeah, the C++ template language, which kind of scarred me for life

    Anyway, we've veered quite a bit off topic from VS2015, so I'll stop here .
    Yes, we haven't heard anything from the OP, so I guess he didn't manage to compile Angband with VC++.

    Leave a comment:


  • AnonymousHero
    replied
    Originally posted by takkaria
    Have you seen Elm? It's a very neat language, I think derived from Haskell, designed to be accessible for people who aren't into functional programming (which is me) but still has ADTs, and compiles into JS. I've not used it for anything yet but its design has heavily influenced a pure JS project I'm working on and made it a ton more manageable.
    Yes, but only tried it a little bit. It's too anemic for my taste, but it's lovely for what it is. (Especially if you can live with the rather low power ceiling.)

    Leave a comment:


  • AnonymousHero
    replied
    Originally posted by t4nk
    Well, even Angband has algebraic data types, you know
    No, not event close. You can pretend all you like, though .

    One of the major points of ADTs is to make illegal states undrepresentable -- and unions don't do that. In fact they possibly even make things worse because the programmer may easily get it wrong... leading to UB.

    These things still don't strike me as a super cool feature, though
    Have you tried actually using them with pattern matching... and "making illegal states unrepresentable", etc? (I'm talking in e.g. O'Caml, Haskell or the like. Not in toy programs either -- real programs.)

    (Interesting to see that D has an emulation of ADTs. I haven't tried D enough to know whether they're useful there, but having to use visitors to deconstruct (rather than true pattern matching) seems like it would basically cripple them.)

    I promise you, if you actually start using "true" ADTs + pattern matching, you'll change your mind .

    Anyway, we've veered quite a bit off topic from VS2015, so I'll stop here .

    Leave a comment:


  • t4nk
    replied
    Originally posted by AnonymousHero
    Algebraic Data Types + pattern matching are absolutely amazing when you want to model a domain, though.
    Well, even Angband has algebraic data types, you know
    Code:
    typedef union {
    	ui_event_type type;
    	struct mouseclick mouse;
    	struct keypress key;
    } ui_event;
    Not sure if D can do ADTs, but you can probably hack something similar using macros.
    Hm, I just discovered that it actually does have those in the standard library:
    Code:
    void main()
    {
        import std.variant : Algebraic, visit;
    
        alias Option = Algebraic!(int, string);
    
        void print(const ref Option o)
        {
            import std.stdio : writeln;
    
            o.visit!((string s) => writeln("got string: ", s),
                     (int n)    => writeln("got number: ", n));
        }
    
        Option o = 99;
        print(o);
    
        o = "some text";
        print(o);
    
        o = 1024;
        print(o);
    }
    These things still don't strike me as a super cool feature, though

    Leave a comment:


  • takkaria
    replied
    Originally posted by AnonymousHero
    Well, they're good languages .

    (Scala less so, but still a lot better than most things. Especially things that can target JS.)
    Have you seen Elm? It's a very neat language, I think derived from Haskell, designed to be accessible for people who aren't into functional programming (which is me) but still has ADTs, and compiles into JS. I've not used it for anything yet but its design has heavily influenced a pure JS project I'm working on and made it a ton more manageable.

    Leave a comment:


  • AnonymousHero
    replied
    Originally posted by t4nk
    Why are you always suggesting some bizarre functional languages like Racket, Haskell and now... Scala? ...js?
    Well, they're good languages .

    (Scala less so, but still a lot better than most things. Especially things that can target JS.)

    Originally posted by t4nk
    Anyway, Rust is pretty interesting, but it's verbose, full of Ocaml-isms (I don't see any particular advantages in them) and poorly documented. It's probably a good replacement for Ada.
    Algebraic Data Types + pattern matching are absolutely amazing when you want to model a domain, though. (That plus traits, in the case of Rust.)

    Not sure if D can do ADTs, but you can probably hack something similar using macros.

    Leave a comment:


  • t4nk
    replied
    Originally posted by AnonymousHero
    Another option which might be interesting would be to target browsers directly with something like Scala.js.

    EDIT: It has quite a big "runtime" (scala-library-as-js), but if you have game assets anyway they would probably dwarf that.
    Why are you always suggesting some bizarre functional languages like Racket, Haskell and now... Scala? ...js?
    Anyway, Rust is pretty interesting, but it's verbose, full of Ocaml-isms (I don't see any particular advantages in them) and poorly documented. It's probably a good replacement for Ada.
    I also changed my opinion on D again It's more general purpose than Rust, the flaws have workarounds and, all in all, Angband should be rewritten in D

    Leave a comment:


  • AnonymousHero
    replied
    Another option which might be interesting would be to target browsers directly with something like Scala.js.

    EDIT: It has quite a big "runtime" (scala-library-as-js), but if you have game assets anyway they would probably dwarf that.

    Leave a comment:


  • Nick
    replied
    Originally posted by t4nk
    BTW, I'm not actually going to rewrite Angband in anything
    Well, you've already rewritten a fair chunk of it in C...

    Leave a comment:


  • t4nk
    replied
    ^Hey, guys, I'm not talking about roguelikes, more like in general. BTW, I'm not actually going to rewrite Angband in anything

    Leave a comment:


  • Derakon
    replied
    If you can make a playable roguelike in Python or GameMaker, you can do it in Java or C#. The performance complaint about Java was kind of valid when it first came out, but they've had two decades to optimize the runtime now. It's plenty fast.

    Leave a comment:


  • Pete Mack
    replied
    Yeah, the runtime libraries are pretty ridiculous, I agree. But the performance is probably good enough for roguelikes.

    Leave a comment:


  • t4nk
    replied
    But how do I run them without their gigantic runtimes Those might be better, but they're not C, so they don't qualify as "better C".
    Also, performance is not good enough (pls no microbenchmarks...)

    Leave a comment:


  • Pete Mack
    replied
    Well, there are Java and C#. Both have better strings than C.

    Leave a comment:

Working...
😀
😂
🥰
😘
🤢
😎
😞
😡
👍
👎