HNHacker News
TopNewBestAskShowJobs

def-

2,741 karma · joined November 25, 2012

https://dennis.felsing.org https://hookrace.net https://ddnet.org
submissionscomments
def-··on The paradigms of programming
https://groups.google.com/forum/#!topic/eve-talk/YFguOGkNrBo
def-··on HANA C++ Development Environment and Processes
Haven't seen it for HANA developers, but you can filter for "Virtual" location: https://jobs.sap.com/search/?q=%22software+development%22&lo...
def-··on OnePlus OxygenOS built-in analytics
At least for the OPO, Sultan includes the improved camera stuff that stock LineageOS is missing.
def-··on Like modern democracies, ancient Greek democracy had an anger problem
https://www.neh.gov/content/2017-lecture-video
def-··on What Is To Be Done? It is time to consider alternate systems of governance
> The most functional countries seem to all have a small population

The least functional ones also have a small population. See http://press.princeton.edu/chapters/s8863.pdf

def-··on Time.gif
I had problems with Haskell after 1024 open sockets, but compiling with ghc -threaded fixed them. Other than that, no problems encountered yet. (using nginx as proxy)
def-··on Time.gif
The most fun exercise for me was generating music in Haskell, but it was quite challenging and I remember not many students tried it.
def-··on Time.gif
This is just using the framework that I made for the exercise. The students didn't have to do any Crazy IO stuff. You can see the parts under "Aufgabe" here, which is what they were supposed to code: https://github.com/def-/gifstream/blob/master/SnakeFinished....

Exercises in German here: https://github.com/def-/gifstream/blob/master/Aufgabe.pdf

def-··on Time.gif
Too bad. I only tested with Firefox, Chrome and Android. You could try http://hookrace.net:5002/ directly

Edit: I have now added some cache-control directives, maybe they help

def-··on Time.gif
I notice that it has some problems with lots of visitors and some browsers that delay showing the next frame of the gif. I guess that's what happens when you misuse GIFs
def-··on Terminal and shell performance
For the throughput I created a file with 1 GB of random source code and ran `time cat file`

Latency for input: https://github.com/pavelfatin/typometer

def-··on Terminal and shell performance
Was curious and tried this out a bit on Linux+X11 on an i7 6700k with the igpu:

             stdout [MB/s]  idle 50 [ms]
    urxvt             34.9          19.8
    xterm              2.2           1.9
    rxvt               4.3           7.0
    aterm              6.0           7.0
    konsole           13.1          13.0  note: stops moving when printing large file
    terminator         9.1          29.4  note: stops moving when printing large file
    st                23.0          11.2
    alacritty         45.5          15.5
def-··on Efficient music players remain elusive
https://git.hans.ninja/git/hans/moc-pulse.git
def-··on Solar Roof
I couldn't quite believe your numbers, and couldn't find any confirmation for them: http://ec.europa.eu/eurostat/statistics-explained/images/4/4...

http://ec.europa.eu/eurostat/statistics-explained/index.php/...

def-··on Show HN: A new decentralized microblogging platform
Unique selling proposition
def-··on Crystal: Fast as C, Slick as Ruby
> I am still wondering why so few people use it.

While Nim is my favorite language, I can understand that it has a small userbase, for these reasons:

1. No major backer like Google for Go or Mozilla for Rust

2. No killer feature like "memory safety and performance without GC" for Rust, instead a mix of all the reasonable down-to-earth features I want in a programming language

3. Some unique decisions instead of what you're used to from other languages, for example partial case sensitivity

def-··on Overview of Running an Online Game for 3 Years
You're right. Unfortunately with virtual machines that doesn't always work. You can enable it manually but that's more inefficient because the Kernel can't use paravirtualization for clock then. I stumbled upon this a month ago: https://ddnet.tw/irclogs/2016-05-17.log

    21:37 <@deen> A third of the sys calls of a DDNet server are recfrom and
                  sendto each
    21:37 <@deen> they always occur in large chunks, so ideal for
                  sendmmsg/recvmmsg
    21:38 <@deen> the last third are mostly strange time and gettimeofday
                  calls, I thought I got rid of most of them
    21:40 <@deen> server with 30 players causes 3000 syscalls a second
    22:00 <@deen> PACKET_MMAP is very cool, reading packets with 0 syscalls,
                  too bad it's not for regular applications (requires root,
                  doesn't work with normal udp socket):
                  https://www.kernel.org/doc/Documentation/networking/packet_mmap.txt
    22:04 <@deen> and then the glibc version matters a lot for syscalls. new
                  versions of glibc don't syscall at all for gettimeofday
    22:05 <@deen> (or something else is causing that, not sure yet)
    22:13 <@deen> Reading the glibc implementation, that's done by vDSO,
                  interesting: http://man7.org/linux/man-pages/man7/vdso.7.html
    22:32 <@deen> totally confused why some of our servers use vdso
                  gettimeofday, others not even though they have more recent
                  kernel and glibc
    22:41 <@deen> ok, probably depends on the underlying clock that the vps
                  uses. pvclock is used with kvm and doesn't support vdso. but
                  looks like there's some progress being made:
                  https://lkml.org/lkml/2015/12/9/914
def-··on Overview of Running an Online Game for 3 Years
Teeworlds is a shooter. People wanted to race in Teeworlds, so a modification was required. From there it developed into multiplayer racing and the last few years of DDNet adding features.
def-··on Overview of Running an Online Game for 3 Years
Thanks! You can see the client here: https://github.com/ddnet/ddnet

SDL2, OpenGL, FreeType, pnglite, zlib, curl, md5, wavpack, opus, json-parser

So pretty much low level, keeps the performance and flexibility high.

def-··on Overview of Running an Online Game for 3 Years
Thanks! Interesting to hear about your experience as well. By requests per seconds you mean packets? I was curious and with 330 players playing on DDNet right now[1] we get ~7400 packets/s incoming, ~8300 packets/s outgoing.

[1] https://ddnet.tw/status/

def-··on Nim Programming Language 0.14.0 released
Which is automatically set if you compile with --debugger:native
def-··on Nim Programming Language 0.14.0 released
GDB and Valgrind work quite well, see for example:

- https://hookrace.net/blog/what-makes-nim-practical/#debuggin...

- https://hookrace.net/blog/writing-an-async-logger-in-nim/#op...

Edit: You can of course also change the program itself, using echo and writeStackTrace to figure out what's going on.

def-··on Klisp – An implementation of the Kernel programming language
> Try that in your programming language ;)

Short circuiting in Nim, seems simple enough:

    template myAnd(a, b: bool): bool =
      if a: b
      else: false
def-··on Show HN: “Nim in Action” is now available
Simple example of GDB debugging: http://hookrace.net/blog/what-makes-nim-practical/#debugging...
def-··on Why I Write Games in C
Yep, that works well enough: http://hookrace.net/blog/what-makes-nim-practical/#debugging...
def-··on 32C3 – Chaos Communication Congress – Streams Online
https://media.ccc.de/b/congress/2015

https://streaming.media.ccc.de/32c3/relive/

def-··on The Problem with Friendly C
You can't simply run code for all possible inputs.
def-··on Using a single AWS account is a serious risk
In the .bashrc/.zshrc of the remote machine add this:

    echo '\033]11;#440000\007'
On the local machine add this to reset the terminal color:

    ssh () {/usr/bin/ssh "$@"; echo '\033]11;#000000\007'}
def-··on DDNet for Mac, Windows, Linux, Web
Some of the things about this game HN might appreciate:

- Cross-Platform: Mac, Windows, Linux, Web ( http://teewebs.net ), Android (spectating mostly): http://ddnet.tw/downloads/

- Open Source ( https://github.com/def-/ddnet ), non-profit

- JavaScript Map previews: http://ddnet.tw/maps/?map=Just2Easy

- Official servers worldwide http://ddnet.tw/status/

- Worldwide ranking system with thousands of players: http://ddnet.tw/ranks/

We're sorely missing a tutorial on how to get started. Here's the gist of it:

- the goal is to get to the finish, together with everyone else

- Novice servers with 1 star map are easiest

- move with a and d, jump with space, hook with right mouse click, shoot with left mouse click, change weapon with mouse wheel

- pause with q, p or pause key, spectate another player with right shift

- kill yourself with k or pos1

- chat with t, teamchat with y

def-··on DDNet – Cooperative Online Game (Mac, Windows, Linux, Web)
Some of the things about this game HN might appreciate:

- Cross-Platform: Mac, Windows, Linux, Web ( http://teewebs.net ), Android (spectating mostly): http://ddnet.tw/downloads/

- Open Source ( https://github.com/def-/ddnet ), non-profit

- JavaScript Map previews: http://ddnet.tw/maps/?map=Just2Easy

- Official servers worldwide http://ddnet.tw/status/

- Worldwide ranking system with thousands of players: http://ddnet.tw/ranks/

We're sorely missing a tutorial on how to get started. Here's the gist of it:

- the goal is to get to the finish, together with everyone else

- Novice servers with 1 star map are easiest

- move with a and d, jump with space, hook with right mouse click, shoot with left mouse click, change weapon with mouse wheel

- pause with q, p or pause key, spectate another player with right shift

- kill yourself with k or pos1

- chat with t, teamchat with y

← PreviousPage 3 of 6Next →