News for hackers. Stuff that matters.
Re:Design and Implementation of a 256-Core BrainFuck Compute... by qwertyuiop924 on Sunday October 16, 2016 @03:28PM (#12720467)
But it's still an entirely pointless 336K. I could use that to store:

-197 copies of nethack

-10% of DarkPlaces

-36% of GCC

-44% of ZSH

-30 copies of CPython (just the executable, of course: that's all you counted)

-10% of ZSNES

-1.36 copies of XScreenSaver

-42% of Teeworlds

All of these are more valuable uses of my precious disk space, because all of them actually do something: They actually give me capabilities I previously didn't have.

Re:Design and Implementation of a 256-Core BrainFuck Compute... by nickpsecurity on Sunday October 16, 2016 @03:58PM (#12720619)
GCC and CPython are great illustrations of what Im talking about. Others are good. Also, Oberon System base with kernel, files, editor, viewer, etc is around 116KB per Wirth's paper on FPGA implementation.

So, you get a whole OS with some utilities in between 1/3 and 1/2 of SystemD binary. Also worth noting Oberon includes safety checks, too. ;)

Re:Design and Implementation of a 256-Core BrainFuck Compute... by qwertyuiop924 on Sunday October 16, 2016 @04:15PM (#12720692)
Oberon might be worth checking out. I've heard neat stuff.

However, from what I've seen, it's a bit too verbose for my tastes (the language, not the OS).

Re:Design and Implementation of a 256-Core BrainFuck Compute... by nickpsecurity on Sunday October 16, 2016 @06:49PM (#12721516)
Honestly, I found the tradeoffs of it to be the most interesting. It hits an interesting balance of readable, safe, fast compile, and fast runtime. Includes some OOP and concurrency foundations while barely changing the language. Whole platform can fit in one book. You could theoretically understand whole thing and reimplement in language of your choosing. Was esp good when hardware was weaker and more diverse. Also better starting language than C in education as it can be easy at first with difficulty gradually increased with intro of unsafe constructs. Finally, it's seeing some uptake in embedded with Astrobe IDE.

So, that's a quick review. The main one you'll find is older system where A2 Bluebottle is latest. Runs fast, too.

Re:Design and Implementation of a 256-Core BrainFuck Compute... by qwertyuiop924 on Sunday October 16, 2016 @07:00PM (#12721569)
Neat.

Yeah, it does look really cool, just verbose. And you say it's easy to implement....

Maybe I can get it running on my gameboy?

I kid. Sort of.

Re:Design and Implementation of a 256-Core BrainFuck Compute... by nickpsecurity on Sunday October 16, 2016 @08:07PM (#12721835)
"Yeah, it does look really cool, just verbose. And you say it's easy to implement...."

It is a compiler and OS. Easy means a different thing in this context versus average usage in software. I'd say vastly easier than trying to understand GCC or Linux. How about that? Also, the original version was done by 2 people and some change. Each port of compiler was done by 1-2 people in relatively short time. Mostly students with basic knowledge in CompSci. Helps it's well-documented.

So, it's not easy as throwing together a web app but can't be ridiculously hard if you take it a piece at a time. The use I had for it, other than learning or pleasure, would be for subversion-resistent, verified-to-assembly builds. It's super easy to learn Oberon with the OS itself straight-forward. People could code it up in a local language, the compiler too, compile those (or hand-done in ASM), and bootstrap into a trusted environment. That can be used to produce the rest with compilers built on top in a memory-safe language that handles foreign code more safely. Better, no patent suits or anything on Wirth-based tech like .NET or Java might get you.

Other than Oberon system, Modula-3 (not Wirth) and Component Pascal (Wirth et al) are most worthwhile to check out in terms of practical languages. BlackBox Component Builder is still in active use with Component Pascal, esp in Russia and Europe. They love it over there since it's got OOP & GUI with Oberon simplicity & safety.

Re:Design and Implementation of a 256-Core BrainFuck Compute... by captbill on Monday October 24, 2016 @08:49PM (#12784292)
Oberon is mind boggling, in all respects. You can download the emulator (<5mb total). It is SDL2 based so runs like a stand alone app, no VirtualBox or QEMU needed. Then you can get and compile Lola-2, the Verilog pre-processor compiler from Prof. Wirth. Now you can literally compile the RISC5 processor "chip" itself which runs on the FPGA!! Just use the output .v files from Lola-2 and compile with the Xilinx toolchain. Next you can compile the "Oberon OS" quite simply by hand in a few minutes. With a compile script the complete OS compiles in 10 seconds.

Then why not finish off with PICL, the language/compiler for the PIC16. Includes the uploader. All in <700 lines of Oberon code. The best part is the amazing tutorials/documentation. Some amazing finds at Prof Wirths personal site. https://www.inf.ethz.ch/personal/wirth/

This has to be the most jam packed tutorial you could ever hope for: https://www.inf.ethz.ch/personal/wirth/PICL/PIC.pdf

Re:Design and Implementation of a 256-Core BrainFuck Compute... by qwertyuiop924 on Sunday October 16, 2016 @08:30PM (#12721937)
Of course. I'm foolish, but not foolish enough to think "easy" compiler/OS equals "easy" webapp. However, I am foolish enough to start any project, although usually not mad enough to finish it once I get an idea of the work involved.

Once again, Oberon looks neat. I am usually not a fan of the Wirthian languages, so I might not enjoy it in the same way I enjoy, say, Python, or Scheme, but it looks interesting.

Re:Design and Implementation of a 256-Core BrainFuck Compute... by nickpsecurity on Sunday October 16, 2016 @08:58PM (#12722028)
"Of course. I'm foolish, but not foolish enough to think "easy" compiler/OS equals "easy" webapp. However, I am foolish enough to start any project, although usually not mad enough to finish it once I get an idea of the work involved."

You and I are appearing to be more similar than I thought on these kinds of things haha.

"Oberon looks neat. I am usually not a fan of the Wirthian languages, so I might not enjoy it in the same way I enjoy, say, Python, or Scheme, but it looks interesting."

In your case, rebooting PreScheme to do a small OS like Oberon or clone of it might be a better take. There's already books on quickly putting together a Scheme compiler. The PreScheme and VLISP papers are pretty detailed. Include some safety features from Clay (C-like) and Carp (Lisp) with Scheme's macros and simplicity. Mock-up assembly language in it so you can code & test it, too, in Scheme with extraction process to real thing.

That combo seems like it would work better for you plus result in at least one deliverable: a PreScheme implementation for system programming whose code was compiled with GCC or LLVM. You might find that useful over time esp if you made syntax compatible with one of your typical, Scheme implementations to port those libraries over easily. Split it between GC'd code and non-GC'd code like Modula-3 did.

Re:Design and Implementation of a 256-Core BrainFuck Compute... by qwertyuiop924 on Sunday October 16, 2016 @09:53PM (#12722206)
Seems neat. The original PreScheme is part of S48, which seems to be dead.

Speaking of which, I should probably consider doing that project I was thinking of doing for a while: port SCSH to some other scheme implementations which are actually alive.

So yeah, the trick with doing a prescheme project is that I'd first have to build a PreScheme compiler (with added safety, etc.) and then I'd have to build one that can run on bare metal. The former ought to be possible, especially if I'm targeting C or LLVM (some bits might get a bit rough, but most of Scheme is pretty easy to implement). The latter would perhaps be possible, but making use of it would likely require a more in-depth knowledge of the hardware than I currently possess.

You know, I was joking about porting Oberon to the gameboy, but the GBA is a really well-defined piece of hardware with readily available tooling (which I actually have, because you need it for LSDJ), and a good deal less complexity than a modern x86 machine...

Man, why can't I just write videogames, like the normal people?

Well, my current side project is writing a version of the Tafl-inspired board game Thud that you can play over a network, so I guess I'm already doing that...

Re:Design and Implementation of a 256-Core BrainFuck Compute... by nickpsecurity on Sunday October 16, 2016 @10:17PM (#12722303)
"The former ought to be possible, especially if I'm targeting C or LLVM (some bits might get a bit rough, but most of Scheme is pretty easy to implement)."

That's what they did originally. Should work.

" but the GBA is a really well-defined piece of hardware"

Then do a PreScheme wrapper on it supporting inline or calls to assembly for performance-critical routines. See if you can make the primitives on bottom close to how hardware works for efficiency. The AI research of the 80's indicate it might be able to handle a board game.

Re:Design and Implementation of a 256-Core BrainFuck Compute... by witty_username on Monday October 17, 2016 @07:31AM (#12724112)
> -30 copies of CPython (just the executable, of course: that's all you counted)

I checked with ldd; it doesn't have any other systemd dependencies as far as I can see.

I'm saying relative to disk space today which is on the magnitude of hundreds of gigabytes; the disk usage is not a concern.

Re:Design and Implementation of a 256-Core BrainFuck Compute... by qwertyuiop924 on Monday October 17, 2016 @08:39PM (#12731107)
To my knowledge, CPython is the only piece of software on that list that has its own shared libraries.

And yes, disk usage is a concern. Because those kilobytes add up fast, and I've only got so much space.

And finally, the point isn't merely that it takes up disk: the point is that it's worthless. The old solution to that problem, having init set locale on boot from a config file, worked fine. I don't mind disk use that much. But I do mind pointless software.

All code has bugs: to minimize bugs, write less code.