Better HN
topnewbestaskshowjobs
Log inSign up

zero_shift

4,017 karma · joined Mar 10, 2017 (9y ago) · 930 submissions

I really like computers!
Submissions

511.

Ask HN: Good practices for my first C project?

46 points · by zero_shift · 3y ago · 51 comments

comment 3y ago · link · parent

> I have a pet theory that lisp macros over an assembler is the right high level language for systems programming but that hasn't made it off the whiteboard yet.

I'm having a little trouble visualising this. Don't many assemblers provide macro-instructions already?

comment 3y ago · link · parent

Give it a couple of years, people will bemoan the "Frankenstein" of partial server rendering, pine for the "consistency" of SPAs instead.

comment 3y ago · link · parent

I've read McKinley's "Choose Boring Technologies" essay a few times. It is okay. I have no big objections to it, though I think the "innovation token" metaphor is oversimplified.

Yet every time I encounter it in the wild, it's always used to justify the most backwards technical decisions. They have included

- using Ember.js in 2018

- waiting 18 months before installing security patches

- continuing with Java 7 back in 2021

- an engineer who wanted to build his web service in C with CGI in 2019

It's like flypaper for people who can't process change

515.

As a scientist, I did a self-experiment to compare a vegan diet with eating meat(theguardian.com ↗)

10 points · by zero_shift · 3y ago · 5 comments

comment 3y ago · link · parent

Nostalgia: Volition also developed the first person shooters Red Faction.

comment 3y ago · link · parent

Humans are very good at recognising faces, so it stands to reason that the first emoticons would be faces too

comment 3y ago · link · parent

I have had to do similar, but in SVG. Back in the days before flexbox I had a project that needed to print colour reports in IE7+. Browser print removes background colours except for web graphics, so SVG can be used as a workaround. However, IE supported only it's own weird fork of SVG called VML.

This was how I ended up writing flexbox like layout code for SVG with a VML bridge. Was a good project as a junior developer.

comment 3y ago · link · parent

> IMHO typescript could just cut loose from its javascript compatibility. Why not compile it to wasm instead of transpiling it to javascript?

My fantasy for the past year has been, if I could magically program anything, bringing a compiler and spec wholesale into the world out of the void, I would create a new language (call it WebScript as a placeholder) that

- featured an ML style type system, ADTs, a type syntax nearly indistinguishable from TypeScript

- whose actual core language essentially resembled Kotlin or "Go with exceptions"

- compiled to WASM or JS as a compatibility bridge

Nothing radical. Nothing revolutionary. Just these things would be an immediate plus.

But maybe AssemblyScript is a good enough step towards that.

comment 3y ago · link · parent

> why does `...` use iterators??

If you couldn't use the iterator protocol, generators in particular would be a lot less powerful

comment 3y ago · link · parent

You know. That actually highlights an understated risk of the Chromium monopoly.

What happens if Chrome... doesn't become evil, it's just mismanaged? What happens if the team loses personnel and gains too much tech debt? What happens if Chromium is run into the ground just by happenstance? I don't know, maybe they give it to a product manager, or they try Scrum or something.

It's a lot of influence to put in the hands of a single fallible team.

comment 3y ago · link · parent

That's fair, ORMs can be slow but they rule out a whole category of basic mistakes

comment 3y ago · link · parent

(this was a flippant remark, if I could edit it I would reword it)

comment 3y ago · link · parent

From my experience, ORMs allow folk who know nothing about databases to continue knowing nothing about databases

comment 3y ago · link · parent

Is feedback the only reason to subsidize this product?

Making AI tools free, for 12-18 months, would be enough time to get individuals reliant on it for their workflows and enough time to discover the full range of their potential. At which point then the vendor can withdraw the bridge and monetise access.

I would see this as a big VC bet. Will it pay off? Maybe!

comment 3y ago · link · parent

The link is in the post, but if you need a plaintext URL it is: https://www.youtube.com/watch?v=S-8PVydb9CM

comment 3y ago · link · parent

I've produced a video showing how AI scripting works in the PlayStation classic, Final Fantasy VII.

Rather that being run from machine code, creatures are controlled by an embedded bytecode scripting language that acts like a simplified stack-based assembler language, executing on a basic runtime environment.

This video includes a short tutorial on writing a basic script, and extrapolates to some hypotheses on how the scripts were actually authored in a higher-level language.

528.

How Final Fantasy VII's monster scripting system works(youtube.com ↗)

2 points · by zero_shift · 3y ago · 4 comments

comment 3y ago · link · parent

I wonder how perspective corrected texture mapping works on emulators.

Maybe the coordinate values passed from GTE to GPU are "shadowed" with extra data about the transformation, that is then retrieved further down the pipeline

I suppose there could be multiple approaches

comment 3y ago · link · parent

I have worked with legacy apps in the 500 kloc scale that are still more enjoyable than reading the Fairie Qveene

comment 3y ago · link · parent

I don't believe sheer reading volume is the key here. I speak from some experience.

A long, long time ago, I did a degree in English literature. This was a bad name for it as a lot of it wasn't English. Or literature for that matter. But over the course of three years I must have read in the order of 300 seriously sized books / texts and a bunch of other secondary material.

Only a handful of memories stand out, out of a small swimming pool of ink. The Greek tragedies, some 20th century drama, and Chaucer.

What I really memorised though was what I _wrote_. My _essays_ are still easy to recall: parentheses in Thomas More; control of space in Ben Jonson; body integrity in Greek tragedy. I can still remember them 15 years on.

I didn't really like my English degree, and I probably shouldn't have done it, but I did gain a lot through the process of writing. I synthesised knowledge and developed my skill for spotting patterns. I forced myself to write original observations week in week out. I made myself start with an intimidating blank page and end with an artefact I could call my own.

(These things became part of my make-up as a software engineer, which is a job that rewards those willing to start from blank pages)

My advice is to match time spent reading with time spent writing. There's a reason why traditional pedagogy entails writing essays, not just sheer volume of reading. You are as smart as what you can write, not what books are on your shelf.

1
171819
31