Hauberk – A web-based roguelike written in Dart
github.com
github.com
http://gameprogrammingpatterns.com/ https://news.ycombinator.com/item?id=10195091
He is also writing a book on building interpreters: http://www.craftinginterpreters.com/
It has inspired me to build my own dungeon crawler, and I have reused a lot of his ideas from the article.
I'm curious if anyone with more experience with the languange could explain why this is and what it means.
https://codelabs.developers.google.com/codelabs/flutter/inde...
It's a super simple UI but you can just pretend it's Java and read through the code samples to get a feel for how things are structured/organized. As a web dev with a strong preference for functional programming I find it unpleasant but I don't think I'm the target audience.
As I mentioned in my longer post, I have considered alternatives. Dart's position was strengthened because the code analyzer is very advanced and easy to use. On the low-probability scenario where Dart development would cease, and I'm left with an important Dart codebase, I would have good chances that I could automatically transpile most of my app to a new stack (assuming I'm using enough type annotations).
However, as I follow Dart development and community closely, I believe there is very little risk of getting it abandoned anytime soon.
I had a choice last year where I could have chosen any stack for a new independent product. I've done an exhaustive research, did everything to detox myself from the Google cool-aid, got myself up-to-date with other languages and platforms, did my benchmarking and comparison using real code for the product I was to develop. In the end I've selected Dart for several reasons:
I can start coding using only a few types, and as the code gets its final shape, strengthen it with type annotations and turn on strong mode. This is an interesting productivity boost, because I can draft a quick script if needed, and when it becomes more complex, the toolchain is there to refactor and make more structure around it. People migrating from JS to TypeScript advocate the same process, only Dart is much better in both refactoring, and long-term safety (see the bad parts of JS).
I like the Dart VM. It is not as robust and fast as the Java VM, but close enough, and it is much faster than V8 (Node.js), Python or Ruby. Of course your results may vary on your benchmark, but for my workload it was a perfect match. One benefit compared to the JVM was that I didn't need to specify the max heap memory in DartVM, the program scaled up using 12G easily and almost effortlessly in a single isolate (which is a fine plus if you have several server processes, and need this boost only for a couple of minutes per day). Haven't tried larger heap sizes, but for a single-isolate memory use this was OK for me.
Readability is important. I've several examples where people were able to get quickly productive using Dart without former experience in it. I've applied for jobs (and got offers) using Dart as the interview language, and even though the companies were not using it, the interviewers were always able to get what I'm up to. A friend's company will soon train their HRs/recruiters in Dart, because they want to shorten the hiring process.
I could go on, but in short: it is a language and platform which, at least for me, combines the benefits of Java, Erlang, Python and JavaScript, while keeping it sane and useful.
I think you should evaluate any language and platform for your needs, and rely less on internet popularity scores.
A solid advice, but not very practical in this age when there's too many language-framework combinations to take them all for a spin. We just have to rely on other people's opinions and surveys. Your summary of Dart strengths is valuable in that sense.
I think that is both its blessing and its curse, because it distances you from what you are actually working with. Convenient, sure, but now there's a disconnect, and you will inevitably work with other Javascript code, so that this disconnect will then affect you.
I think TypeScript had the better idea here and ultimately what might have largely stopped Dart in its tracks. TypeScript being a superset of Javascript makes it easy to progressively port your apps to an often more sane, safe, and productive language, while still not creating a disconnect on the level of Dart. It even has a solution for third party JS code out of your control via type definitions.
Now that dart is also evolved into something else (A nice language that compiles to Javascript and runs on its VM for mobile devices) I wish that this bad blood goes away and people could take a fresh look. I really like the language and appreciate the hard work of developers of Dart ecosystem.
I WISH!!
KDE
OpenSUSE
RPM Based Distros
You name it and people have opinions based off of rumors.
(And even if I find it as bad as everbody says it is, I can still pour some condescension over it and feel good about myself - Either way, I win!)
Fortran did not click for me, but I gave it a fair (I think) try, and compared to its abysmal reputation, it was actually fairly nice. At least for the couple of toy programs I wrote in it. Fortran 90 or 95 was a significant improvement on previous versions, as far as I could figure out. But I had no use for it either, so I moved on.
I had to learn Java during my training, around the time I had finally understood the basics of functional programming and Lisp, so I hated Java with fierce passion. ;-)
Sometime after that I took another look at Java and now it wasn't as bad - Generics had been introduced to Java, and I finally had a computer powerful enough to run something like NetBeans or Eclipse. But you know what they say about first impressions. ;-) I don't hate Java, but I am not drawn to it, either.
Sometimes, the experience is very ambiguous, for example with C++. Some people love C++, and I think I can see why they love it. Some people hate C++ passionately, and I can see why they hate it, too. It's weird. (But then, so is C++)
My last roguelike was nethack and probably the genre improved on it and things changed. Example: I was surprised, and not pleasantly, that this game doesn't use the same keybindings of the rogue/nethack tradition. I had to read the docs to learn how to pick up things. It turned out it's "g" (lowercase and not uppercase as in the doc). I didn't find how to rest: "." didn't work but I confess I didn't spent much time on it.
You can also play online at https://crawl.develz.org/. It uses the Nethack keybinding for the most part, and you can get access to help in game by typing '?'.
There are some alternative keys but I keep mixing them up with (the more traditionally roguelike) vim keys, which they are near but not quite similar enough to.
Looks really beautiful though! Enjoying bashing my way round; I don't know Dart but I'm looking forward to taking a peek at the source later.
(My favourite actively updated roguelike is Dungeon Crawl: Stone Soup. There's a new version due next week...)
Strangely enough, this was one of my initial motivations for starting to hack on my own roguelike about twenty years ago.
I learned to play MacMoria and later Angband using the numeric keypad and never learned the Rogue keybindings. When I got my first laptop and it didn't have a full numeric keypad, it wasn't so easy to play Angband anymore. So I just started tinkering with my own game instead.
Yes, the keybindings for Hauberk are idiosyncratic (and not at all documented). I do like them, though. I've tried to make them ergonomic, at least for a user of a US English laptop keyboard.