|
So the guy behind failed kickstarted roguelike CultRL has released his source code. https://bitbucket.org/dmhagar/empyrea-public/raw/4759faba1443e6105ff6cbf9c2829735f55df593/empyrea.py It's, uhh, it's something alright.
|
# ? Sep 24, 2013 04:03 |
|
|
# ? May 25, 2024 13:15 |
|
Try looking at the NetHack source code some time.
|
# ? Sep 24, 2013 04:27 |
|
That may have something to do with why it failed. [e] Nethack at least has multiple files and has the excuse of being incredibly old.
|
# ? Sep 24, 2013 04:30 |
|
Flashing Twelve posted:So the guy behind failed kickstarted roguelike CultRL has released his source code. Whaaaaaaat the gently caress I took one look at the bigass list of imports and just knew this was gonna be nuts. Holy god, I hope my code never looks like that.
|
# ? Sep 24, 2013 06:01 |
|
Uh, hate to break this to you, but that's not even a lot of imports in python. Also, I hope you never have to write something that uses tons of included dependencies like C/C++.
|
# ? Sep 24, 2013 06:04 |
|
Rainbow Pony Deluxe posted:Uh, hate to break this to you, but that's not even a lot of imports in python. Also, I hope you never have to write something that uses tons of included dependencies like C/C++. Well yeah, I mean it's not strange for a project to use a bunch of modules. But at least break it up into multiple files or make that list look nicer
|
# ? Sep 24, 2013 06:05 |
|
Rainbow Pony Deluxe posted:Uh, hate to break this to you, but that's not even a lot of imports in python. Also, I hope you never have to write something that uses tons of included dependencies like C/C++. That is a huge list of imports for a single Python file, which reflects how loving massive that source file is.
|
# ? Sep 24, 2013 06:13 |
|
Flashing Twelve posted:So the guy behind failed kickstarted roguelike CultRL has released his source code. Some googling suggests it had performance problems, I glanced at the source code and if this: code:
ETA: queryTile is called in only one location, and checklist is always a 1-element list. fritz fucked around with this message at 06:42 on Sep 24, 2013 |
# ? Sep 24, 2013 06:39 |
|
I didn't read very far, but my favorite part was: Python code:
|
# ? Sep 24, 2013 07:06 |
|
fritz posted:ETA: queryTile is called in only one location, and checklist is always a 1-element list. It's better than that: Python code:
Extortionist fucked around with this message at 07:24 on Sep 24, 2013 |
# ? Sep 24, 2013 07:09 |
|
I don't know why you guys are complaining. He gave us a "Coder's Guide" to navigating the file. Makes it super easy to navigate, unlike if it was broken up or something dumb like that.
|
# ? Sep 24, 2013 07:25 |
|
I have to say I was a little disappointed that I searched for vars() and he only used it 4 times. Oh, but there's 20 uses of globals(). breaks fucked around with this message at 07:36 on Sep 24, 2013 |
# ? Sep 24, 2013 07:33 |
|
That's even worse than Terraria's tile code and that's really saying something.
|
# ? Sep 24, 2013 10:47 |
|
bucketmouse posted:That's even worse than Terraria's tile code and that's really saying something. To be fair I think that was C# decompiling being weird, after studying the code a little while.
|
# ? Sep 24, 2013 11:35 |
|
Oh good, the first part of that code is "miscellaneous functions." Because when I look at a piece of source code for the first time I want to know what miscellaneous functions are in it.
|
# ? Sep 24, 2013 11:39 |
|
That's another crappy thing about python: no switch-case equivalent. I like syntactic purity as much as the next guy, but you'll also have to yield to pragmatism at some point for the sake of readability and maintainability.
|
# ? Sep 24, 2013 13:24 |
|
That's Empyrea. not Cult (which wasn't a failed Kickstarter at all, it asked for $5,000 and got $34,000).
|
# ? Sep 24, 2013 14:08 |
|
Crosscontaminant posted:That's Empyrea. not Cult (which wasn't a failed Kickstarter at all, it asked for $5,000 and got $34,000). Empyrea is Cult and the Kickstarter was a failure as the developer gave up on finishing it.
|
# ? Sep 24, 2013 14:19 |
Okay Python, this is kinda annoying...Python code:
Change it to this: Python code:
UnboundLocalError: local variable 'foo' referenced before assignment Suddenly a separate foo variable gets introduced into b's scope and it no longer references that of the outer one. Because of an assignment. I understand why it does this, but seriously, it's annoying. Couldn't there be a way to hoist in a variable from an outer scope, that isn't the global one?
|
|
# ? Sep 24, 2013 14:48 |
|
Python 3 adds nonlocal for exactly that.
|
# ? Sep 24, 2013 14:59 |
|
Master_Odin posted:I don't know why you guys are complaining. He gave us a "Coder's Guide" to navigating the file. Makes it super easy to navigate, unlike if it was broken up or something dumb like that. Ahah code:
|
# ? Sep 24, 2013 15:02 |
|
Crosscontaminant posted:That's Empyrea. not Cult (which wasn't a failed Kickstarter at all, it asked for $5,000 and got $34,000). Superschaf posted:Empyrea is Cult and the Kickstarter was a failure as the developer gave up on finishing it. Yeah it's not hard to look at the updates on the Kickstarter and see he's refunding the money and releasing the source code just from the update titles, even though only backers can see the post contents.
|
# ? Sep 24, 2013 15:04 |
Hammerite posted:How does someone learn Python to the degree of competence necessary to make this... thing, without picking up ideas like "split the project up into multiple modules in a logical fashion" and "put that poo poo in a docstring like a normal person"? It mostly looks like something out of a 1980es BASIC game. (What's the difference between ListCmp and ListCmp2 ?) Plorkyeran posted:Python 3 adds nonlocal for exactly that. I thought I had seen that keyword before. Turns out we're just using the wrong version here. Ugh. (And we could probably upgrade too.)
|
|
# ? Sep 24, 2013 15:23 |
|
Flashing Twelve posted:So the guy behind failed kickstarted roguelike CultRL has released his source code. yeah. who the hell needs to split source code into multiple files. throwing it all into one is always the best way.
|
# ? Sep 24, 2013 15:34 |
|
Python imports and environments are two other things that grind my gears.
|
# ? Sep 24, 2013 15:42 |
|
Guys when it comes to games you just can't accept the overhead of importing other files.
|
# ? Sep 24, 2013 16:34 |
|
Hammerite posted:How does someone learn Python to the degree of competence necessary to make this... thing, without picking up ideas like "split the project up into multiple modules in a logical fashion" and "put that poo poo in a docstring like a normal person"?
|
# ? Sep 24, 2013 16:35 |
|
nielsm posted:(What's the difference between ListCmp and ListCmp2 ?) I got curious, and one compares lists by their first element and one by the second. ListCmp2 is identical to DictCmp, in case you were wondering. Huragok posted:That's another crappy thing about python: no switch-case equivalent. I like syntactic purity as much as the next guy, but you'll also have to yield to pragmatism at some point for the sake of readability and maintainability. It's not the repeated-ifs-to-fake-a-switch I thought was bad it was the general hamfistedness nature of it. ETA: to be honest, I felt a little better about that switch once I realized that checklist could only every have one element, but dang, it's still bad. I also like the fact that he's doing "wfeaturedict['%s,%s' % (x,y)]" instead of "wfeaturedict[x,y]". At least he doesn't appear to ever have to split that back out and cast to integers. Also jiminy christmas: code:
fritz fucked around with this message at 17:24 on Sep 24, 2013 |
# ? Sep 24, 2013 17:21 |
|
Clearly the worst part of that is that he's using camelCase in Python.
|
# ? Sep 24, 2013 17:23 |
|
astr0man posted:Clearly the worst part of that is that he's using camelCase in Python. Sure it's not idiomatic python, but it's fine as long as you stick the convention throughout the source, no?
|
# ? Sep 24, 2013 18:07 |
|
It was a joke
|
# ? Sep 24, 2013 18:15 |
|
Hammerite posted:Ahah Nice of him to include a table of contents, but I would have preferred an alphabetical index of function names that tells us the line numbers where they get used.
|
# ? Sep 24, 2013 18:22 |
|
astr0man posted:It was a joke
|
# ? Sep 24, 2013 18:25 |
|
Someone's trying to outdo losethos with their own homegrown language/OS monstrosity: http://www.urbit.org/2013/08/22/Chapter-0-intro.html quote:If I can summarize Hoon’s goal, it’s to be the C of functional programming So, how great an idea is this? Let's take a look at the networking code: https://github.com/cgyarvin/urbit/blob/6012eed7a31f7dc9db323dbc4b1cbf361923f620/lib/191/arvo/ames.hoon code:
|
# ? Sep 24, 2013 19:07 |
|
Qwertycoatl posted:Someone's trying to outdo losethos with their own homegrown language/OS monstrosity: quote:So if we had to read the above decrement, omitting the spaces (which only a real purist would pronounce), we’d say: “luslus dec sigfas cen dec bartis a tis pat sigbar soq dec soq ketcab pat wutgal tis pel zero a per tislus b tis pat barhep wutcol tis pel a lus pel b per per b buc pel b lus pel b per per.”
|
# ? Sep 24, 2013 19:24 |
|
There is possibly more than one person working on thisquote:If you’re wondering how we wrote Hoon in Hoon when we didn’t have Hoon, the answer is that we wrote Hoon in C and evolved this C code into a mere jet. And just some stuff. quote:Hoon, like Lisp, unlike Haskell, is also very comfortable with typeless data; it should be, because it has no types, only “types.” quote:On the other hand, the apparent complexity of Hoon is very high. When you open a Hoon file, you are confronted with an enormous avalanche of barely structured line noise. Again this reminds us of C, which makes no attempt at the kind of abstract prettiness we expect from a Pascal or a Haskell. Learning Hoon involves learning nearly 100 ASCII digraph “runes.”
|
# ? Sep 24, 2013 19:33 |
|
quote:You just have to memorize these names. Sorry. No, actually I don't.
|
# ? Sep 24, 2013 19:37 |
|
law.l
|
# ? Sep 24, 2013 19:39 |
|
He has unorthodox ideas about software versioning, too:quote:In Kelvin versioning, releases count down by integer degrees Kelvin. At absolute zero, the system can no longer be changed. At 1K, one more modification is possible. And so on. For instance, Nock is at 9K. It might change, though it probably won't. Nouns themselves are at 0K - it is impossible to imagine changing anything about those three sentences
|
# ? Sep 24, 2013 19:44 |
|
|
# ? May 25, 2024 13:15 |
|
To be as nice as I possibly can, this guy is absolutely awful at communicating the main idea of Hoon. I honestly can't tell if there is an idea here worth a further look. Here is the hackernews thread. https://news.ycombinator.com/item?id=6438320
|
# ? Sep 24, 2013 19:46 |