Closed tripleo1 closed 3 years ago
What did crash, the generator (i.e. OberonViewer) or the generated code? I just run OberonViewer 0.8.6 on the OberonSystem project and could generate C++ using the CTRL+T function. But be aware that the generated code is not supposed to compile or run out of the box; I had to do significant modifications on the generated files.
Segfaults shouldn't be possible in Oberon, or is this not a true Statement?
Well, you can produce segmentation faults with Oberon too when using SYSTEM module functions, or by simply dereferencing a nil pointer. But all my compilers and generators are written in C++.
The Generator, when I press Ctrl-T. I think maybe there are some 64 bit issues?
I never compiled or run OberonViewer on a 64 bit machine (in contrast to the OberonIDE); maybe you could try to run the Win32 version in WINE?
What did crash, the generator (i.e. OberonViewer) or the generated code? I just run OberonViewer 0.8.6 on the OberonSystem project and could generate C++ using the CTRL+T function. But be aware that the generated code is not supposed to compile or run out of the box; I had to do significant modifications on the generated files.
Everything crashes for me on 64-bit. What distro do you use? I want to try to get this project running.
Segfaults shouldn't be possible in Oberon, or is this not a true Statement?
Well, you can produce segmentation faults with Oberon too when using SYSTEM module functions, or by simply dereferencing a nil pointer. But all my compilers and generators are written in C++.
I didn't think of that -- I always viewed Oberon as a high level language instead of a low level language.
What distro do you use?
I'm only using 32 bit Linux; there is no need or advantage to use x86_64 for me because all my embedded systems either use i386 (or ARM or MIPS 32 bit) or depend on tools running on i386. But as I said OberonIde.pro compiles and runs on macOS 64, and I will also make sure that ObxIde.pro will run on 64 bits. OberonViewer is essentially superseded by the IDEs.
I always viewed Oberon as a high level language
Wirth and Gutknecht actually used it to implement a bare bone operating system, and there are also people (not me) using it as an embedded programming language; so it's not much higher-level than C. Golang inherits a lot of concepts from Oberon (no surprise one of the authors made his PhD with Wirth and Mössenböck). Oberon is somewhere between C and Golang.
EDIT: you likely have to use the flags I use on macOS 64 because of LuaJIT also when you compile for x86_64 Linux: QMAKE_LFLAGS += -rdynamic -ldl -pagezero_size 10000 -image_base 100000000; see https://luajit.org/install.html
I just run OberonViewer 0.8.6 on the OberonSystem project and could generate C++ using the CTRL+T function.
Here is a ZIP with the generated files just in case: OberonSystem_cpp.zip
Segfaults shouldn't be possible in Oberon, or is this not a true Statement?
Anyway, I tried to generate the C++ code for https://github.com/rochus-keller/OberonSystem/blob/master/Applications/Hilbert.Mod and it crashed on me.