Hacker Newsnew | past | comments | ask | show | jobs | submit | more devbug's commentslogin

As someone in the midst of building a game in C for 7 platforms, with WebAssembly being one of them, my main disappointment is with the lack of coroutines (or lack of control over the stack to implement them.) It hinders how wide my engine can go since I'm limited to a fork-and-join model for splitting work across threads. Poor code generation is also another pain point, but I fully expect that to improve drastically over the coming year.

Overall, I'm pretty excited for WASM and the implications of it, but it does feel like the web has regressed in the ability to deliver games.


Most common coroutine implementations, such as JavaScript's and Python's, are delimited or "symmetric". This means the most obvious implementation is in terms of compiler transformations in the source language. It seems out of WASM's scope to do this.

Undelimited "asymmetric" coroutines, like Lua's, could be an interesting addition. That still seems to me to be too high level a feature for a "portable assembly language" specification though.


I think you might be conflating characteristics regarding delimited and symmetric coroutines. But let's step back.

JavaScript's and Python's choice of coroutine styles was constrained and effectively dictated by runtime limitations. CPython, V8, and similar implementations mix their C and assembly callstacks with their logical language callstacks. Because the host runtimes didn't readily support multiple stacks without a complete rewrite, this bled into the language runtime. There was a path dependency whereby early implementation choices directed the evolution of the language semantics.

WASM is recapitulating the same cycle. Which is understandable because time is limited and you can't make the perfect the enemy of the good, but you still have to recognize it for what it is--a vicious cycle of short sightedness. If WASM doesn't provide multiple stacks as a primitive resource, then things like stackful coroutines, fibers, etc, will have to be emulated (at incredible cost, given WASM's other constraints regarding control flow). And if they have to be emulated they'll be slow, which means languages will continue avoiding them.


I agree that CPython and V8 omitting the ability to juggle multiple stacks is a mistake. For higher-level languages, undelimited coroutines or continuations allow for very useful abstractions like Go's and Erlang's transparently non-blocking IO.

However, it doesn't seem to be _entirely_ an implementation detail. Some developers just don't seem to like the semantics of called functions being able to cooperatively yield without the caller explicitly opting into it with a keyword like `await`. I disagree with them, but it's a legitimate complaint I've a few times.

It reminds me of arguments in the Lisp community about delimited continuations and undelimited, i.e. Common Lisp and Scheme. A lot of the arguments there are really about semantics and not implementation details, and come to the same point: should cooperative scheduling require explicit notation at each level of the call stack?

My view on this is that systems languages like C and Rust should require explicit notation for it whereas application languages should not. This seems to be a point in favour of Go and Erlang over Java and C#.

However WASM, similar to C or Rust, seems to target a level in the tech stack at which it should concern itself only with abstractions that have relatively direct translations to the instruction set of the underlying hardware. Support for multiple stacks doesn't fit into this from what I can see. (A similar argument can be made for WASM not supporting garbage collection too, although it looks like that'll be added at some point to make interoperability with JS smoother.)

With the JVM supposedly adding fibres soon, it poses a question for WASM: is it trying to be a portable assembly language, a portable high-level language runtime, or something in between?


The inability to implement coroutines is addressed in the second article in the series here http://troubles.md/posts/why-do-we-need-the-relooper-algorit...


All fun and games until you accidentally commit fraud.


> accidentally commit fraud.

That isn't a thing. Fraud is deliberate deception. You can not commit accidental deliberate deception.


True, but you can still be found guilty of fraud even so.


I don't get the hate. I can reason about asyncio code without fuss and the throughput/latency impact is worth it. My only pain point is the derth of libraries. There are few if any palatable libraries that provide the powerful abstractions I'm used too. Things like ORMs.


Grandparents concern about async is documented here:

http://techspot.zzzeek.org/2015/02/15/asynchronous-python-an...


Talk about timing!

I'm in the process of rejigging our live telemetry pipeline (dealing with petabytes) to improve flexibility and resiliency and have been looking for something to replace our similar systems that have grown organically. This fits the bill exactly; it's designed exactly how I imagined our new system should look.

I'm wondering if HN has their personal favorite for these sorts of problems.


We've been using logstash as our go-to stream processing glue, its large selection of input, output, and filter plugins lets it handle just about anything, reliably. My one complaint would be the use of the jvm, particularly the slow startup time it causes when doing development.


And yet it still doesn't respect the Insert key.

https://marketplace.visualstudio.com/items?itemName=adammara...


People actually use "work deletion mode" on purpose?

I've always wished this key at least had an LED indicator along with Caps Lock.


Once upon a time, hitting insert resulted in the caret switching from line to rectangle to indicate input mode.


It used to be that normal mode was an underline cursor and insert mode was a vertical cursor, but now that I guess vertical cursors are everywhere, Sublime switches between a vertical cursor for normal mode and an underline cursor for insert mode. A bit of a drag, but I don't use insert much at all.

One thing I'd like from the past is a blinking block cursor.


As a vim guy, and I say this because I think it makes more sense in vim, I think you mean insert mode (the “normal” mode) and replace mode (the “insert” mode). The fact that the insert is used to toggle out of the default insertion behaviour seems to add confusion.


I wasn't using the terms in the vi/m sense, but insert/replace does make more sense.


Now that I could dig


IntelliJ does this! Very convenient for recognizing accidentally hitting it.


I do maybe 10% of the time as it saves a few keystrokes if you are renaming stuff. I would be annoyed if it went away. But definitely not as useful as it was 40 years ago.


But "keystroke" is a very strange metric. In terms of speed, it's often much faster to just ctrl+a and rewrite it from scratch. The mental gymnastic in trying to compute in your head the difference of characters is definitely non-trivial. It only really works if the thing you're replacing has the exact same number of characters in it.

Can you explain the exact scenario you use it in, I honestly can't think of a scenario where insert is useful.


Are you trying to tell me that the computes I do in my own head aren’t efficient? That’s pretty funny as I even have a tough time measuring that.

It’s hard to come up with exact examples because it’s actually subconscious and as automatic as touch typing for me. Thinking back, when I’m on one line with the cursor maybe halfway through, I’ll hit down arrow, alt arrow to the word I want to rename, hit insert, type over it, hit insert. I think I did it when trying to clarify some documentation. I’ll be on the lookout in the near future, but unlikely to report back here unless it happens to happen really soon.


The opposite, I'm saying that your brain might be way more efficient than mine if you can pull that off, because whenever I try to use insert mode, I have a brainfart and get way confused.


My friend's wife uses CapsLock instead of Shift for each and all capitalization needs, even the sort of capitalization done in this sentence.


See, at least that's not as bad, since you're basically going Capslock -> letter -> capslock, so it's easy to get your brain used to that. With insert mode, you need to think as fast as you type about how many letters you're overwriting.


I've been using computers for over twenty years, and I'm still yet to use the insert key on purpose. My AutoHotkey profile actually suppresses the keypress entirely, along with some media keys.


Good idea. Mine blocks F1, which gets collaterally damaged in my attempts to hit ESC. Not sure why I didn't think of this but it's going in there!


I use the Overtype extension for that: https://marketplace.visualstudio.com/items?itemName=adammara...

It hasn't been updated in over a year, but I've yet to have any issues with it.


That's a feature, not a bug


Vim replace mode works great with VSCodeVim


Deadlifts and squats. If you're a newbie, follow Mark Rippetoe's "Starting Strength."


Recommend 5x5 stronglifts ... not because it's a particularly good program (it's not - it's too easy to burn out early), but because it's a good resource to learn the main lifts initially. Lots of photos and explanations all in one place to make it as easy as possible for the new lifter.

https://stronglifts.com/5x5/


What kind of burning out do you mean? Mental?

I have used the 5x5 program and while I'm not here to endorse any particular program, I found that I really liked it. It did help me learn proper form, as you say, and it also gave me a very regular workout. I had it memorized and it always uses the same part of the gym (squat rack) so it helped me maintain a rhythm.

I actually built a squat rack at home eventually to start it back up after some time away.

There may be better programs, I have not actually tried any others. 5x5 was the most-recommended I found in my research a few years back.

Also, GGP, lifting did correct my posture very quickly. People kept telling me I looked taller/stronger/wider even before anyone knew I was working out (and before I had actually gained any muscle), and I'm quite sure that was just my improved posture.


Yeah - mental. You reach your maxes quickly and progression gets difficult because you're trying to do so much in a single session, but you don't need to think about other programs while you're still making progress with what you're currently doing.

The other thing for me was it started to take too long - I generally try to get my stuff done in an hour or so before work. I went from SL to GSLP to 531 (3 main lifts, to 2, finally to 1, per session).

To be honest, I don't think it matters too much - as long as you find something you like to do enough to stick to regularly, you'll improve in health and posture either way.


I agree, stick with something.

I always found that I could get my lifts in in about 45 minutes. It can be slower with a partner if their weight is very different from yours, because you're moving weight on and off a lot the bar, but ours was small enough that it wasn't a major time concern.

Later I did it solo and my workout times were ~30 minutes for the quick day, and ~45 minutes for the long day. The long day being squat/bench/row, and I felt like my breather periods were very generous.


I recently used RCTEs in a production environment to operate on reasonably large graphs. We eventually moved to an in memory solution built on top of ETS for various reasons, but performance was not a deciding factor (at least as much as you would think); Postgres handled our queries well beyond expectation, even with heavy factoring into functions. It's definitely not slow.

The largest burden was on development and maintenance. Iterating algorithms and queries powered by RCTEs (and functions) on a changing schema is not scaleable (in effort), at least with the traditional migration scripts approach to upgrades and rollbacks. If you do want go this route, you need to change how you ship those functions and queries.

We theorized that shipping them as part of the application and performing necessary migrations behind-the-scenes would have drastically reduced the maintenance burden. We also considered composing queries completely dynamically and fully leveraging our language (Elixir) to provide a toolbag of functions that aren't functions as far as Postgres was concerned. In either case, the hassle of versioning functions and queries would no longer get in the way iteration.


Xenia is a similar project that uses static recompilation (with fallbacks for tricky parts).

https://github.com/benvanik/xenia


Security. Mostly against cheaters and pirates.


Same here.

They've not been humble, indie, or a bundle for a long time.

Par for the course. Similar disingenuous commercialization is rampant through the games industry: see what Valve has done to Steam, and what major publishers have done to their titles vis monetization.

Unfortunately the games industry is floating in too much money for another crash to clean house.


I think that's not really fair, only a few bundles a year are actually labeled "Humble Indie Bundle", and those do usually fit the bill and check all three boxes.

There were 13 Humble Indie Bundles since 2010 and 94 other types of bundles (not counting the Weekly Bundles). And those other types often include audiobooks, ebooks, comics etc. that one could claim are at least indie, or some indie games sprinkled in with the AAA titles.

There was also extremely commercial stuff such as the 2K bundles, but hey, it's always labeled as such.


I think this feeling is due to evolution. Humble Bundle started as Humble Indie Bundle, only later it turned into a brand.

It's kind of similar as with GOG, on which games are neither exclusively Good nor Old anymore ;).


As long as GOG keeps it DRM free, they will remain the only distributor that gets any more of my money, aside from direct, DRM-free sales by creators. Steam destroyed all rationalization I was using to be ok with DRM by locking my account for 3 weeks shortly after I opened an account.


I still don't really trust GOG after the whole "we're shutting down, too bad" PR stunt several years ago, but it's true they're a reliable distributor of DRM-free games which you can simply download and keep forever.


What happend with that PR stunt?


> not counting the weekly bundles

I think this was where it went downhill for me. That’s 107 bundles, plus 200 odd weekly bundles. They’re not special any more, and especially now that the bundles aren’t pay what you want, they’re pay above the average, which is higher because they hide some items behind a minimum price. It’s lost it’s allure to me, and most of my friends too.


Completely agreed.

There really isn't any confusion on the website about any of that. And the book and audiobook bundles have been fantastic, too.


I have 1 major issue with Steam, you cannot share individual games in your library and play a different one yourself. If you have 200 games in your library and want to share one with your kids, you cannot play any other game at same time.

Interested to see what other criticisms you have.


Actually, you can (I assume you use Family Sharing). Either you or your kids Steam client needs to go "offline" and you'll be able to play games from same collection simultaneously.


I don't believe you can, as of a few weeks ago in any case.

When you drop offline, any shared library you had access to will drop off. When changing connectivity during a session, your games terminate within 5 minutes.


That's why I largely moved to board games. They are by definition optimized for multiplayer and finished in one seating. Dedicated servers by default. "Spawn" system like in StarCraft 1 by default (one person owns the game, everyone plays). Board games practically don't get outdated. Good ones are still widely played decades later. There's high innovation in game mechanics. Many of them aren't even turn-based. There are dexterity games and real-time games. There are games with simultaneous turns, where you only wait for the slowest player. And you get to make friends.


This is assuming that the game opts into family sharing, or else you don't get to share nil.

I've been using Steam as the main means of communication with a lot of people, but these days the chat client is slow, outdated, lacking in basic features and tends to insert annoying redirections before shared links (or remove them outright when you're using a shady site like, I dunno, Google Docs). Hence I'm trying to figure out how to get everyone to migrate to discord.


> Steam [...] the chat client is slow

> Hence I'm trying to figure out how to get everyone to migrate to discord.

ouch!


I know why you're being sarcastic, but the Discord client DOES feel more responsive to me in daily usage. Especially if you're planning on clicking any links, which in Steam does a background API call to the Steam servers to check whether you should see the pointless redirection screen. This sometimes takes several seconds, and there's zero UI indication of what's going on. If you're impatient and you click the link several times, it will the open in multiple tabs at the same time.

Okay, the chat itself in Steam is pretty fast (unless you attempt to send an emote). The problem is, there's zero message delivery guarantees, and the client doesn't even care to inform you whether the message has been successfully sent. If you're on an unreliable internet connection, your best bet is to close and re-open the chat window to see whether the messages made it to the server in the mini chat log that shows the last 2-5 messages (that's the extent of the client's chat history feature by the way). It's an usability nightmare.

This isn't about how fast Discord is but about how bad of a job Valve is doing (I'm not even certain present tense applies here given that the chat client has essentially not received any major new features for like a decade).


The UX for Discord around group chat is also miles ahead of Steam's. Unlimited history, granular notification options with @mentions, rich media embedding, third party integrations, and seamless voice chat support (and now with video chat and screensharing to boot). Meanwhile Steam's chat client has been stagnating in terms of both features and UX for what feels like a decade.


They do have more than just games like e-books https://news.ycombinator.com/item?id=14791255


i've bought far more books than games from humble


Me too, but mostly because a couple of the book bundles had 50 or so titles. I've bought a lot more game bundles than book bundles.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: