Skip to content

u/Jetbeard

In this archive from Jul 2011 to Jul 2012

1
posts
15
comments
1
media
63
score

I have an HDD and an old laptop, and systemd cut my boot time from 30+ secs to 12 secs.

Services can depend on others and the outdated concept of runlevels is generalised to targets.

cgroups are a way of logically grouping processes. You can allocate maximum amounts of memory or change the priority of cgroups, which is useful if you have a service doing heavy background tasks.

6 points

All the logic for starting and restarting that is the same for all services is now handled by systemd rather than being replicated throughout all of the scripts. I'd rather have that than just a bunch of scripts.

10 points

xdg-open opens a file or URL in the user's preferred application. If a URL is provided the URL will be opened in the user's preferred web browser. If a file is provided the file will be opened in the preferred application for files of that type. xdg-open supports file, ftp, http and https URLs.

—xdg-open(1) manual page

It appears xdg-open doesn't handle the mapping of protocols to programs, so the path of least resistance would be to configure your browser to handle them. However, xdg-open is just a shell script, so you should be able to edit it and hack in the ability easily.

2 points

Yes, I've ran into type erasure issues whilst using Scala on the JVM — IntelliJ informing me that type erasure would occur is what caused me to actually learn about type erasure. Up until that point, not knowing about the JVM's evil ways of type erasure, I'd thought that although Java is horrible, the JVM itself is not that bad. Type erasure was enough to swing my entire opinion around.

But you're correct — Scala does make excellent use of its excellent type system. Having recently been taught Java formally (part of my CompSci degree) and being told that using instanceof and suppressing unchecked warnings was the right way of doing it, I really am convinced that type erasure, and by extension the JVM, is the devil.

On the topic of manifests: Yes, they'll solve the majority of problems, and it's definitely very cool that such a feature is implemented, but it's still just a workaround and shouldn't have to exist.

Personally I'm waiting until Scala-LLVM fixes all the problems in the world before starting coding my groundbreaking game. At least, that's my excuse ;)

2 points

The point of components is so that instead of game objects dealing with the domains of sound, graphics, and physics etc. all in one place, it is composed of components that only deal with one domain and then the game object deals with whatever interactions between the components there need to be. It makes the engine code easier to update without breaking things, as the game entities don't directly interact with any of it.

4 points

Forgive me if I'm wrong -- I quite often am -- but isn't the point of components something like this?

val physicsComponent = new tankPhysicsComponent()
val soundComponent = new tankSoundComponent()
val graphicsComponent = new tankGraphicsComponent()

def die() {
  physicsComponent.die()
  soundComponent.die()
  graphicsComponent.die()
}

(Or something like that with less repetition, anyway.) The point being that the game object class doesn't know or care what exactly happens with the physics, sound and graphics when the tank dies, it merely delegates to the components which just handle one domain? Of course, some coupling is inevitable, but exposing it via the components in a managed way means that nothing gets overly coupled.

1 points

End of this list.

Back to top

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.