Hacker Newsnew | past | comments | ask | show | jobs | submit | alexisread's commentslogin

If you don't mind, could you drop some code? I'd be interested to see the result :)

sure, for example it generated this small demo of the type and contract safeguards. As you can see, it's mostly "Forth but with things":

  # bank.ax — The Safe Bank (Milestone 2)
  #
  # Demonstrates property-based verification of financial operations.
  # Each function has PRE/POST contracts. VERIFY auto-generates random
  # inputs, filters by PRE, runs the function, and checks POST holds.
  
  # DEPOSIT: add amount to balance
  # Stack: [amount, balance] (amount on top)
  # PRE: amount > 0 AND balance >= 0
  # POST: result >= 0
  DEF deposit : int int -> int
    PRE { OVER 0 GTE SWAP 0 GT AND }
    ADD
    POST DUP 0 GTE
  END
  
  # WITHDRAW: subtract amount from balance
  # Stack: [amount, balance] (amount on top)
  # PRE: amount > 0 AND balance >= amount
  # POST: result >= 0
  DEF withdraw : int int -> int
    PRE { OVER OVER GTE SWAP 0 GT AND }
    SUB
    POST DUP 0 GTE
  END
  
  # Verify both functions — 500 random tests each
  VERIFY deposit 500
  VERIFY withdraw 500
  
  # Prove both functions — mathematically, for ALL inputs
  PROVE deposit
  PROVE withdraw
  
  # Demo: manual operations
  1000 200 deposit SAY
  1000 300 withdraw SAY

Running it outputs:

  VERIFY deposit: OK — 500 tests passed (1056 skipped by PRE)
  VERIFY withdraw: OK — 500 tests passed (1606 skipped by PRE)
  PROVE deposit: PROVEN — POST holds for all inputs satisfying PRE
  PROVE withdraw: PROVEN — POST holds for all inputs satisfying PRE
  1200
  700

How does it do the proving?

Spawns and calls z3 under the hood, I did let it cheat there because otherwise it's rabbit holes below rabbit holes all the way down :)

thanks.

Apart from transputers mentioned already, there’s https://greenarrays.com/home/documents/g144apps.php

Both the hardware and the forth software.

APIs in a B2B style would likely be much more prevalent, less advertising (yay!) and less money in the internet so more like the original internet I guess.

GUIs like https://en.wikipedia.org/wiki/SymbOS

And https://en.wikipedia.org/wiki/Newton_OS

Show that we could have had quality desktops and mobile devices


I want to chime in on SymbOS, which I think is the perfect reply to the GP's curiosity.

https://www.symbos.org/shots.htm

This is what slow computers with a few hundred kB of RAM can do.


The original Macintosh had similar specs as well – 128k with a 68k clocked at ~6-7 MHz. It helps that both platforms put a significant amount of OS code in ROM.


Very impressive demos! I did a quick look through the docs- it’s single threaded (in the cpu sense) and not multi process yes?


not for now, just launch many instances!


It was a massive shame the TV-toy project at Sinclair did not work out. It was a SOC/low cost computer based on the Inmos transputer (Called the T400, an M212 without dedicated link hardware) around 1983. That might have kept Inmos afloat- they were responsible for a lot of the RAM chip innovation, VGA standard, transputer etc. so the world would have looked very different. I do wonder what could have been with that chip paired with the Slipstream chip, oh well.

https://en.wikipedia.org/wiki/Transputer TV-toy

https://www.abortretry.fail/p/inmos-and-the-transputer TV-toy

https://www.transputer.net/tn/50/tn50.html M212 details

https://forums.atariage.com/topic/271372-flare-technology-an... 9.2mb/s bandwidth+sequencer_list


Tip of the hat there, it’s a very selfless thing to commit to caregiving. From a 50kft view, we have an aging demographic globally, and the bet seems to be robotics- hopefully they will get good enough to help meaningfully in this capacity. What happens to an economic system predicated around having more kids (GDP growth) is another concern.


We already have the ability to take care of people now. All it needs is is for someone in power to give a fuck and set up a system and fund it. The suggestion that we do nothing for 30 years so we can leave our loved ones home with a robot care taker is kind of fucking angering.


The robotics thing to replace caregivers misses the point that elder people also want connection. Yeah, it might free caregivers but still we will have a loneliness epidemic. I think this is more related to the desire for progress which is the backbone of modern life (you see it politics, school, your family, etcetera). This, I believe, has been slowly replacing the social glue of societies like religion, public space, play, chatting, etcetera.


I get the impression that the Atari AMY chip was an inspiration? Wonderful to see how the Alles speakers are implemented!


I agree you would need to specify the markdown to allow more implementations. https://github.com/jgm/djot Would make a good DSL inside languages, combine that with compile-time execution so that blocks can auto-recalculate and you have a more available mechanism than emacs/org in other languages.


I think this is the crux of the issue, use like this is like a real program, just built up incrementally in a notebook rather than a repl or shell-with-pipes, and with manual error handling. The STEPS project was all about this- a way of incrementally building blocks that can be composed.

With org mode in mind, ideally you would have language support for this ie. Comments are scoped metadata that can be formatted, tested, linked etc.

You need a well defined spec like djot as a DSL for this to work, so that parsers can be easily written for it. This level of language support allows many different views onto the source code. We’re not there yet.


Although it’s a bit weird, Able Forth has the explicit word ~

https://github.com/ablevm/able-forth/blob/current/forth.scr

I do prefer this as it keeps the language more regular (fewer surprises)


Related to this is the Atari Falcon port of Minecraft using a sparse voxel octree, might work for the GBA seeing as the Quake ports are similar performance-wise:

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


Man, that DSP made the Falcon an insane piece of hardware for its time. Shame that it never found any real success.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: