Live data from Hacker News

Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”

plus.google.com

251–260 of 265 posts

Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”

#251

Earlier quoted context omitted.

Plot twist, It's actually a 'teach yourself lua game'

so level 38 is "figure out how to write the answer by editing the save file?"

Why not level 7? By 38 the player could be fixing bugged waypoints, profiling out bad O(n!) code, resetting time to get a specific time-based drop, tweaking character attributes to make puzzles/quests easier, etc. The savefile just becomes another interface to play with.

Gives a fresh angle on the 'open world' type game.

Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”

#252
post #226

>>So I've been thinking about this for basically months, but the way I work, I actually want to have a good mental picture of what I'm doing before I start prototyping. And while I had a high-level notion of what I wanted, I didn't have enough of a idea of the details to really start coding. This might be a tangential discussion. Earlier, I used to have a similar approach. Can't code until I have the complete picture…

I've got a few strategies that might help, depending on the circumstances.

A notebook: I'll write down some notes and just kind of free write whatever thoughts come to mind. If there's something that I think is important to come back to, I'll draw an empty box in the left margin (to be filled with a check mark later)

Readme: start writing the Readme for the project, even if you're not entirely sure of the details. Include code examples. If you don't like how the API is coming together, change it. It's way less work to modify the API now than it will be later.

Write a test: I don't always unit test, but when I do I test first :). This works well on projects that already have a decent test suite. It's kind of an executable version of the Readme.

Branch and Hack: branches are cheap. Make one and start playing. Don't like how it's turning out? Make a new branch and try again!

Ctrl-Z: maybe the answer won't come to you right away. Let it sit and run in the background for a while and come back to it. If I'm worried about forgetting details, I'll write it down in a notebook first.

Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”

#253
post #178

Earlier quoted context omitted.

in a single player game with save games on local disk? this question is nearly trolling.

Some people do compete for speed or score in single player games. Arcade games have always had scoreboards, modern "arcade-style" games have online ones, and a community can turn any solitary activity into a competitive one: http://speedrunslive.com/ http://speeddemosarchive.com/ Speedrunners are an exceptional case, but I think everyone gets a little annoyed when they look at a leaderboard and all the top players ha…

oh don't get me wrong, i love speedrunning and trickjumping competitions, except that they always should require the whole replay - and even then you can't be sure if the whole thing was or wasn't TASsed.

Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”

#254
post #245

Earlier quoted context omitted.

http://en.wikipedia.org/wiki/PostScript#The_language PostScript is Turing-complete.

Join me on my crusade to eliminate the use of 'former' and 'latter' in any writing unless the goal is obfuscation. It's error prone, almost always requires rereading, and never is the clearest choice. Here's my attempt at a clearer version: "Take Postscript vs PDF. Postscript is Turing-complete and therefore you cannot jump to an arbitrary page or even know how many pages the document has without running the entire t…

That's like campaigning to eliminate pronouns. "Former" and "latter" are just like "it", except they are for when you mentioned two things.

Repeating the proper noun doesn't achieve the goal of emphasizing the fact that you're referring to something you just mentioned.

Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”

#255
post #72

Earlier quoted context omitted.

JSON's semantics is that you represent numbers by their decimal representation. In this particular case, you're giving a different representation, so of course you an pass it as a string.

His point was that this number is too large to store it in a Javascript Number variable (which is a IEEE 754 double).

That's completely irrelevant. Grok the JSON specs and reconsider what the javascript number format has to do with it.

Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”

#256
post #245

Earlier quoted context omitted.

Join me on my crusade to eliminate the use of 'former' and 'latter' in any writing unless the goal is obfuscation. It's error prone, almost always requires rereading, and never is the clearest choice. Here's my attempt at a clearer version: "Take Postscript vs PDF. Postscript is Turing-complete and therefore you cannot jump to an arbitrary page or even know how many pages the document has without running the entire t…

That's like campaigning to eliminate pronouns. "Former" and "latter" are just like "it", except they are for when you mentioned two things. Repeating the proper noun doesn't achieve the goal of emphasizing the fact that you're referring to something you just mentioned.

Pronouns are fine. Substituting 'the first' and 'the second' would be an improvement. It's specifically 'former' and 'latter' that should be deprecated. I'd be interested in seeing a study comparing readers' comprehensions of the various phrasings. What cost in clarity would you be willing to pay?

Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”

#257
post #161
post #74

Earlier quoted context omitted.

The question nobody is asking, but actually should is: I wonder what other good G+ content you are missing? G+ is largely misunderstood. It is a lousy tool for interaction with people connected to you purely socially. It's a very good way to find and interact with people connected to you by interest.

The really sad thing is that I have tried several times to search for content that I know exists on G+, but I can't find it, even when I knew the author. After the third time failing at this my usage of G+ dropped significantly. Of all of the things that you would think would work search would be at the top... :|

Right, if I could subscribe to a Circle with all of the kernel devs in it I would.

G+ is actually a great place to read long form messages and comments, but doesn't really have content discovery down.

Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”

#258

Why not sqlite or sexpressions? Linus states that databases can't hold previous state but that's not really true... I'm not sure why git is the best tool for the job in this case, even after reading the post & some of the contents.

They can, if you recreate the primary feature of Git on top of them.

Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”

#259

Back in the bad old DOS days, instead of creating a file format for saving/loading the configuration of the text editor, I simply wrote out the image in memory of the executable to the executable file. (The configuration was written to static global variables.) Running the new executable then loaded the new configuration. This worked like a champ, up until the Age of Antivirus Software, which always had much grief ov…

Reminds me of the approach taken by Xmonad where the configuration is compiled into a new executable and then run.

Re: Linus Torvalds: “I'm happily hacking on a new save format using ‘libgit2’”

#260

Back in the bad old DOS days, instead of creating a file format for saving/loading the configuration of the text editor, I simply wrote out the image in memory of the executable to the executable file. (The configuration was written to static global variables.) Running the new executable then loaded the new configuration. This worked like a champ, up until the Age of Antivirus Software, which always had much grief ov…

Readers may be familiar with the TI-83 programmable graphing calculator's assembly language functionality (especially those who took high school math classes in the mid-to-late 1990's). The TI-83's only user-writable storage was 32K of RAM (there was a small lithium battery to keep it powered when you changed the AAA's; also some of the RAM was used for system stuff so somewhat less than 32K was actually available for user purposes).

You could write hex values in the program text editor, then you could tell the calculator to execute the hex codes as machine code. I understand the previous models, TI-82 and TI-85, were hacked / backdoored to run user-supplied assembly language, so TI responded by including an official entry point and developer documentation for the TI-83.

People later wrote loaders which allowed programs to be stored as binary instead of text (using half the space). Some loaders also had the capability to run binary programs by swapping them into the target address rather than copying them (theoretically a third option would be possible, running programs in-place if they weren't written to depend on their load address, but this wasn't a direction the community went in. gcc users may be familiar with -fPIC which produces code which can run from any address, and this flag is necessary when compiling code for shared libraries.)

This allowed people to create massive 20K+ applications (an RPG called Joltima comes to mind), that used most of the available RAM.

The fact that this loading scheme made static variables permanent was also quite convenient. (And most variables were static; stack-based addressing would be tough because the Z80 only has two index registers, one of which is used -- or perhaps I should say "utterly wasted" -- by the TI-83 OS.)

The next generation, the TI-83+, included I think 256K of flash ROM, and a special silver edition was released which contained 2 MB.

Post reply on HN