Hacker News new | past | comments | ask | show | jobs | submit | lxtx's comments login

With Unix sockets you can even have in-order datagram semantics, which I think is just neat!


Rather go with C, or as was pointed out in this thread, Orthodox C++.

Less time being bogged down in the quagmire of C++ "features".


Language intricacies aside, is there a reason to use Clojure over Elixir, Erlang? Genuinely curious what JVM has to offer vs BEAM / OTP if you're going to use dynamic languages.


Clojure's version of immutability is more useful in some domains than Elixir/Erlang's. E.g. you can both safely and efficiently share memory in Clojure across multiple threads. You can't really do the same in Elixir that I'm aware of - it triggers a deep copy which can kill performance. Sometimes acceptable, sometimes not.

Elixir/Erlang processes serve a lot of roles. If those roles don't line up cleanly your code could end up a lot more complex than necessary in other languages.

In the past the JVM had better raw performance, but I'm not sure how much that might change with the new JIT in BEAM.


There is this interesting thread over in reddit about it: https://www.reddit.com/r/Clojure/comments/5q2gmi/convince_me...


Thanks! Although I don't agree with all of the points, it was a good read.


The JVM ecosystem is many orders of magnitude larger than than BEAM/OTP.

For example, you can usually find an API library for Java even from small vendors. I don’t think I’ve seen any vendor provide an Erlang API library.


Basho did for Riak, but that might be due to the fact that Riak was written in Erlang...


Practicality. Most of language "comparison" discussions miss out on the practicality aspect: does it work, does it have a good runtime (both true for Elixir and Erlang), can you write code that runs both client-side and server-side, are there good abstractions and libraries for many programming models, is it being actively maintained and developed?

Clojure ticks all of those and more, while most superficial comparisons concentrate on superficial aspects.


It has really good monitoring, profiling, interop tooling. Both JITCs it has (C2 and Graal) are very good at and optimised for compiling dynamic languages.

Also the recent JVMs have GCs that can collect enormous heaps without stuttering of any kind.


What's with the proliferation of emojispeak?


We’re regressing back to hieroglyphs


Not sure if it's a new one, but I'm liking https://www.coursera.org/learn/financial-markets-global thus far.


Quake's source code is very hackable. I forked ioquake3 for a personal project and it was surprisingly easy to add WebRTC support to the C codebase, so you could play it in your browser over WebRTC :)


That is really impressive! Are you still doing stuff with WebRTC? It is quite a niche area, but lets you do lots of interesting things.

If you are ever interested in getting back into the space you should come join us working on Pion (A Pure Go implementation of WebRTC). I would love to hear about what else you did! [0] I am just really trying to build a intellectually curious/supportive community of RTC. Right now everything is so anemic community wise.

[0] https://pion.ly/slack


What was your experience with WebRTC?

I read some people tried to use it for multiplayer, but the performance suffered with more than 10 players.


Only played it with my friends, don't think a map ever exceeded 10 players. So I can't say much about scaling - although it was a client-server model over UDP and not peer to peer networking.


Ah, so you had a WebRTC datachannel between the clients and the server?


Basically yes, a custom datachannel implementation. Haven't updated it lately, but it's up at https://github.com/seemk/WebUDP


Pretty cool.

You don't happen to have some ping comparisons betwen WebRTC and WebSockets?


Sadly no, but I don't think there's much of a ping difference on a good network. With WebRTC (datachannels in UDP mode) you just get the benefits of UDP (or lack thereof :)).


I see.

I had the impression UDP would lower the average ping, because you wouldn't have to wait on lost packages like with TCP.


It looks like the multiplayer here does similar, no?


If I remember right, this one is over WebSockets and the server is compiled to js as well. My version had a native server and browser clients.


If I remember correctly, there was no matching system in BW.


Brood War had (has) a ladder system and then there were external leagues such as ICCUP that has ranking as well.


You can. I've used WebRTC for multiplayer support in Quake 3 compiled to WebAssembly.


Do you have a link for that? Sounds super cool


The forked ioquake3 is available at https://github.com/seemk/ioq3

However it's not trivial to get it working at the moment, will hopefully soon come back to this project and finish it :D


You can also prerender the tiles on a powerful machine and host them on a cheap instance (assuming you don't need very large regions). A while ago I created an OSM server (https://github.com/seemk/TileSweep) to do this for me, you can select regions you want to render via a polygon and you get a SQLite database of the tiles. It can also run as an alternative for mod_tile + renderd.

I rendered all of Estonia from zoom levels 0 to 18 (~16.5M tiles) which is around 20GB and host the tiles on a cheap DigitalOcean instance.


* How is the workflow for updating OSM data with this project?

* What is the recommended procedure for backup + restore?

I find a lot of projects in this space make you go through an manual copy-paste setup process like if it was a one-time thing - it is not - updating OSM data is a crucial part in this process and should be part of it.


I haven't investigated updating of data using anything clever. I know the database load script can write out a list of tiles that need to be rerendered, which can be fed into the renderd process. Renderd has multiple priority channel so bulk renders are a lower priority than user views, so a live system can update the tilecache without much easier impact.

I haven't investigated it because we are probably moving to Vector tiles over the next month or two, and we don't need up to the minute map updates. On one of our sites, we have been rendering navteq tiles and we only get updates for those quarterly. It was only our public site that we were using Google Maps for.

Backup and restore we are just doing via normal backup programs. The tilecache is stored in meta tiles, which is a d duplicated set of 64 tiles in a single file. So we are only dealing with about a million files in a directory structure totaling 25 gigabytes.

If we needed to restore or update our tiles, we would probably just spin up a new box and rerun ansible to deploy it. I have it all encoded Within a Playbook.


I've written a library for that purpose [1]. It's not ideal, but I guess it's as close as you can get to UDP in a browser without using extensions.

[1] https://github.com/seemk/WebUDP


Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: