HNHacker News
TopNewBestAskShowJobs

ewmailing

163 karma · joined February 18, 2016

submissionscomments
ewmailing··on Reversed engineered game Starflight (1986)
Star Control 2 (which takes many Starflight influences and also hired Greg Johnson) also used a lot of procedural generation. It has around 500 stars and 4000 worlds with minerals and lifeforms. I recall the SC2 lead programmer Fred Ford saying they used a fixed seed, and they went through many seeds until they found one that looked good. I presume Starflight was of the same mindset.
ewmailing··on Reversed engineered game Starflight (1986)
It goes beyond drawing inspiration. Greg Johnson, designer of Starflight, worked directly on Star Control 2.
ewmailing··on Video game crash of 1983
> So instead of finding the NES next to your other PCs at the time, it was near the toy aisle?

> Anyone who maybe was able to witness the revival able to comment with their anecdotes?

That is NOT my recollection. I bought my Atari games from the same isle I bought my NES games from at Toys R Us (obviously in different years).

I think there is truth that game console marketing shifted into its own more toy like thing, distinct from computers, but I think that shift was already underway by the heyday of the 2600. I remember an entire display of just video games (2600, ColecoVision, and others), which was separate from other software, computers, and the consoles.

With the Toys R Us closure, I wrote an article about my memories of Toys R Us and The Great Video Game crash (and recovery) that tries to fill in for people what living through the crash actually felt like.

https://playcontrol.net/ewing/jibberjabber/memories-of-the-g...

ewmailing··on Can you recreate Objective-C in C?
LuaCocoa author here.

While the objc_msgSend, objc_msgSend_stret, et. al, is an annoying detail, that isn't really the hard part. (And in fact, all the good bridges use libffi to do more direct invocations and avoids a lot of this problem.)

The hard part of bridging is those places where Objective-C introspection is not powerful enough to discover the types of parameters or signatures of functions. Typically, this is all the C stuff.

So for example, Obj-C's runtime introspection cannot tell you the make up of a struct. So it cannot tell you the size of NSRect, NSPoint, NSSize, or the individual data types inside the struct (and the names of each item if you need to access them).

And the Obj-C runtime introspection cannot tell you about what C functions exist and what the parameter types and return types are. So for example, there is no Obj-C runtime way to look up that CGPointMake takes two CGFloat parameters and returns a CGPoint struct.

Also, inline functions (marcos) in C/Obj-C are also problematic for these bridges since they need to call the functions at runtime.

Apple shipped a framework called BridgeSupport in Mac OS X 10.5 which contains XML data for all the things that cannot be determined at runtime. It also contains .dylibs with symbols for inline functions. BridgeSupport is still in macOS today, but it isn't getting much love and Apple keeps (accidentally?) breaking things in BridgeSupport every release.

ewmailing··on Chris Lattner: “Turns out that Tesla isn't a good fit for me”
Swift on Android already exists.

https://news.realm.io/news/swift-on-android/

ewmailing··on “A closure is a poor man’s object; an object is a poor man’s closure” (2003)
Lua creator Roberto Ierusalimschy just gave a talk about "Functions in Lua" and starts his talk explaining that our (conversational) language has still not evolved a precise way to articulate all these different ideas about functions.

On his first slides, he shows the words, "anonymous functions", "lambdas", "closures", "function values", and "first-class values", and shows how each has subtly different meanings/implications and tends to take us down different lines of thinking which affects the conversation you are trying to have with somebody else.

https://www.youtube.com/watch?v=wdRGOE1N-FA

ewmailing··on Show HN: My RIP Goodbye to my Co-Founder Carlos Icaza
I wrote a little about the QFG1 vs. QFG5 inspirations in my blog entry.

But here is a video of the QFG5 dryad dance which will probably start making it clear. https://www.youtube.com/watch?v=D2dTxSCGeNE

And this is from QFG1, which is where the concept of dancing and personality of the fairies originate from. https://www.youtube.com/watch?v=pYpN8Uii6ng

I don't remember if that clip shows all the dialog, but they talk about how they rule the forest and make rainbows and "fairies just want to have fun". They like to dance and don't know if humans can dance.

This video does show you making them mad by walking into the fairy ring (because the human smell is impossible to get rid of). So they make you dance to your death as punishment.

The last fairy message at the end of the credits is also borrowed straight from the game. When you leave the screen in the game, a fairy will fly to you in the next screen to say a randomized good bye message before flying off.

ewmailing··on Swift on Android (presentation)
Hi, I'm the presenter of the talk. I'm happy to try to answer any questions here.

Thanks to try! Swift Tokyo for making this talk happen, and thanks to Realm for posting it.

For more info, I wrote a few more things about the talk and conference on my blog. http://playcontrol.net/ewing/jibberjabber/swift-on-android-a...

Thanks for watching.

ewmailing··on Ikutaro Kakehashi, founder of Roland, has died
Here's a picture of the infamous "Insert Buckazoid" :)

http://www.midimusicadventures.com/queststudios/mt32-resourc...

ewmailing··on Ikutaro Kakehashi, founder of Roland, has died
A little more context for those who don't know the history of music in PC gaming, Sierra was the first major company to push hard on PC sound cards. They partnered up with Roland and Adlib to promote and sell their cards so they could take advantage of them for their games.

Wikipedia citation: King's Quest IV was the first commercially released game for PC compatibles to support sound cards instead of only the standard built-in speaker.

Sierra took it seriously and hired professional musicians to kick off their effort.

Hollywood composer William Goldstein (Fame) was hired to compose King's Quest IV. https://www.youtube.com/watch?v=19r6RnReAf4

Supertramp drummer, Bob Siebenberg, composed the Space Quest III soundtrack. https://www.youtube.com/watch?v=dxEP05TtOfE

ewmailing··on Ikutaro Kakehashi, founder of Roland, has died
I remember reading a story about how he picked the name "Roland". He wanted a company name that would be pronounced and spelled the same way in any language and country, and escape translation issues. The irony was not lost on him that the Japanese (his home country) have trouble pronouncing the 'R'.
ewmailing··on Ikutaro Kakehashi, founder of Roland, has died
I first learned about Roland because of their partnership with Sierra On-Line and the MT-32.

I remember Scott Murphy (Space Quest co-creator) told a story about the first time Roland came to hear how Sierra was using the MT-32. They were blown away by the full musical scores they sequenced (Space Quest 3). He thinks they were expecting Space Invaders like sound effects.

ewmailing··on Cross platform GUIs and Nim macros
And also iOS, Android, and a native web browser backend via Emscripten :)

This was a proposal/prototype/intro video for IUP for iOS & Android for the IUP community.

https://www.youtube.com/watch?v=UvrEfOg3Nyk

Repos:

https://github.com/ewmailing/IupCocoaTouch

https://github.com/ewmailing/IupAndroid

https://github.com/ewmailing/IupEmscripten

ewmailing··on How to build Apache modules in Swift
I was either told or read (during the 2.x time frame) they were likely going to break @_silgen_name. @_cdecl was added to replace this (at least for my usage case), but I think it is still unfinished and not official, hence the leading underscore.

It happens that @_silgen_name didn't break for me in 3.0. But I've been moving to @_cdecl.

ewmailing··on How to build Apache modules in Swift
I believe it is the calling convention. When I use it, if you look at the symbols/name mangling, what gets generated looks like a C symbol.

000061b4 T BlurrrSwiftEntry vs. 000061cc T _TF1MySDLMainActivity16BlurrrSwiftEntryFT_T_

ewmailing··on How to build Apache modules in Swift
I'm using @_cdecl on Android which doesn't have the the Obj-C runtime.
ewmailing··on Creating an embeddable Python distribution on OS X
I’ll stick my neck out there and praise Lua. While I will admit the stack is tedious to work with, all C binding bridges I’ve worked with are tedious. (With exceptions of languages that use compilers and architecture/platform specific tricks to pull off transparent bridging. LuaJIT and and LuaFFI would be one example. Swift would be another.)

Lua’s design is at least very clean and avoids allowing developers from accidentally creating nasty lifecycle design issues. It is very clear with Lua about ownership and visibility, which propagates cleanly through all aspects of Lua, such as working seamlessly with Lua’s garbage collection system. The design+code is also 100% portable to any processor/platform that has a C compiler (i.e. not requiring platform/arch specific #ifdefs, which is really useful when bringing up on a lesser-used platforms/chips.) And the design has very clear performance implications. In contrast, there was a recent talk at Google I/O about Android Dalvik vs. ARTs with respect to JNI bindings and performance. The results were non-obvious to say the least.

There is a research white paper that compared the C binding design tradeoffs of several different languages. http://www.inf.puc-rio.br/~roberto/docs/jucs-c-apis.pdf

ewmailing··on Creating an embeddable Python distribution on OS X
My rule of thumb is the Lua core is about 100kb, and the Lua standard library is about 100kb. Tcl is about 2MB. (All built as dynamic libraries.)

Lua’s source is pretty malleable. There are things you can rip out from Lua if you don’t need them to make it smaller. I once read a claim that a micro-controller use got it under 20kb.

ewmailing··on Flappy Bird Clone Code Injected into Super Mario World for SNES by Hand
I made this video in defense of Flappy Bird back when people were piling on the game and the author. There are multiple points, but it starts with my belief that people overstate the similarities to other semi-recent games and simultaneously forget much older games. The video includes clips of video games from the early 80s and even Space War! from 1962.

https://www.youtube.com/watch?v=Us-W5CWj7Ic

ewmailing··on Nuklear: A small ANSI C GUI toolkit
I didn't look at the demo, but that list of dependencies is not reflective of SDL.

This is what ldd on my build of SDL looks like:

    linux-vdso.so.1 =>  (0x00007ffda33d9000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff1e4c51000)
    libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007ff1e4a4d000)
    libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff1e4830000)
    librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007ff1e4628000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff1e426a000)
    /lib64/ld-linux-x86-64.so.2 (0x00007ff1e527e000)
SDL on Linux does a lot of dlopen detection at launch because it is so hard to know what kind of Linux environment you are running in at compile time. For example, you may have a X11 server, or you may be running completely on the command line without any window server. (It's really cool being able to develop for Raspberry Pi Raspbian via SDL without X11 since RAM is so limited.)

So that list is not SDL's contribution and that demo was just linking to a lot of things, most of which look unnecessary (and sloppy, though this also makes a case why people want header-only libraries because many people don't want to think about this part). For example, why is a gui demo demo linking to FLAC and all the Ogg Vorbis libraries? SDL doesn't use or depend on these either.

ewmailing··on Lwan, a high-performance web server with Lua support
Why? From one of Roberto Ierusalimschy's talks (starts at slide 6):

http://www.inf.puc-rio.br/%7Eroberto/talks/ws2011.pdf

Excerpt:

- Not all languages are 0-based: Icon, Fortran, AWK1, and Smalltalk are 1-based; Snobol, Pascal, Modula, Modula-32, and Ada have configurable bases.

- Currently, many languages are 0-based due to influence from C.

- Ironically, none of them share the reason that made C 0-based (where a[e] means *(a+e)).

1-based arrays:

- Much more intuitive: first is 1st (not 0th). ISO-C: “E1[E2] designates the E2-th element of E1 (counting from zero).”

- Much easier for non programmers. Easy for (good) programmers :)

- Historical reason: Fortran used 1-based arrays, and most first users of Lua had a Fortran background.

ewmailing··on Lwan, a high-performance web server with Lua support
Speaking to its small and high quality implementations, Verisign gave a talk on how they used it for their high availability/performance servers. Rather than the usual throw more hardware redundancy at the problem, they went the other extreme and audited and understood every line of code in Lua so they could create a reliable system by eliminating bugs.

And Wikipedia (Wikimedia) uses Lua for their multimedia scripting engine. Besides good performance, the implementation was good and small enough that it could be audited for security.

ewmailing··on Lwan, a high-performance web server with Lua support
Actually, Grim Fandango was the very first known game to use Lua and wasn't due to any hotness. Bret Mogilefsky, who against skepticism, dared to try to create a new scripting engine to replace the aging SCUMM engine. He was given the Dr. Dobbs article by a colleague and things came together. After the technical success of Grim Fandango, it was applied to Escape from Monkey Island.

A few years(?) later at GDC, there was a 2 hour session to discuss scripting in games. Near the end, after everybody was depressed with no viable solutions, Bret's colleague exclaimed, "Or you can do what Bret did" and he was dragged up on stage. Bret gave an impromptu spiel about what Lua was and how they used it at LucasArts. Everybody else frantically scribbled down notes and that was how the video game industry adopted Lua as the dominant game scripting language.

*Source: Bret Mogilefsky's talk at the very first Lua Workshop in 2005

ewmailing··on Ask HN: What are you working on and why is it awesome? Please include URL
BlurrrSDK: Write native cross-platform 2D games in C, Lua, JavaScript or Swift. (iOS, Android, SteamOS/Linux, OS X, Windows, Raspberry Pi).

I just posted a demo video yesterday of Swift development for Android. I think this could be the very first video of a (cross-platform) Swift program running on Android. https://youtu.be/w6FY_qSi8yY

A more talky introduction here: https://www.youtube.com/watch?v=wCWFqHJC_gI&index=1&list=PLf...

ewmailing··on Raspberry PI 3: gets a 64bit CPU
I've never heard of a 64-bit armv7. So I decided to look it up. Looks like this Reddit thread already said a lot of these things, i.e. armv7 is 32-bit, the document is blank, one of these things (armv7 or 64-bit) is an error:

https://www.reddit.com/r/raspberry_pi/comments/47zqzz/raspbe...

ewmailing··on Raspberry PI 3: gets a 64bit CPU
You are correct. The naming scheme is confusing as heck. When Android device manufactures transitioned to armv7, a dev tools company I worked with at the time made the decision to drop armv5/armv6 support. But users were absolutely confused by this, because device manufacturers continued pushing the marketing names. The worst for us was ARM11, which was like a dual armv6, because cheap device manufactures continued pushing new devices based on this instead of moving to armv7.
ewmailing··on AT&T is phasing out the U-verse TV service
AT&T kept trying to get me to sign up for years, and I would have done so, except every time they kept finding out they had not built the service into my zone.
ewmailing··on Swift Ported to Android
In addition to the Bionic short-comings already mentioned here, there appears to be other work to deal with the fact that things must be cross-compiled in a way that you can build a compiler for your host machine, but generate Android binaries (and for each architecture).

Also, there are also a bunch of support things for libICU which is not an official component on Android we are allowed.

ewmailing··on Swift Ported to Android
I haven't used React Native, but I've done quite a bit with native bridging with JavaScriptCore and v8. If your performance bottlenecks are crossing the Javascript-to-native boundary, JIT can't help you. And crossing the bridge boundary isn't the cheapest operation.
ewmailing··on Teaser of cross-platform 2D game dev in Swift
Hello, I’m the person who made the video. I’ve been developing a new SDK called Blurrr. I wanted to share this video showing a cross-platform development scenario using Swift language to make an app for SteamOS (Linux), OS X, iOS, and Raspberry Pi 2, all sharing the same code base and unified build system.

Under the hood, SDL provides the common platform layer. The build system is built on top of CMake. I have been adding Swift support to CMake.

Even if you aren’t interested in my SDK, I thought it would be interesting for people to see how much is already possible with Swift today.