History log of /petsc/src/snes/tutorials/ex1z.zig (Results 1 – 2 of 2)
Revision Date Author Comments
# 65d185e7 20-Jul-2022 Satish Balay <balay@mcs.anl.gov>

Merge branch 'barry/2022-07-10/add-zig-support' into 'main'

Add zig example to PETSc

See merge request petsc/petsc!5423


# 1b9f3db4 11-Jul-2022 Barry Smith <bsmith@mcs.anl.gov>

Add a builder for a zig example in PETSc

The BuildSystem is written in zig :-)

Extremely annoying, zig documentation is terrible for a beginner.
* compiler error messages are worse than useless, a

Add a builder for a zig example in PETSc

The BuildSystem is written in zig :-)

Extremely annoying, zig documentation is terrible for a beginner.
* compiler error messages are worse than useless, at least they are not endless like with C++.
* googling for help or example code is useless because most of it is out-dated and hence wrong
* the one true documentation does not link to examples so one has to guess (wrongly) how to use any functionality

Notes on the language.
* zig functions often return a union of an object and an error;
* this is not mentioned in the introductory material
* one must use if (path) |value| to pull out the valid case, just using path in the next call produces impossible to
understand error messages
* many examples on the web do not handle this (presumably from earlier zig versions) and thus are wrong and
hence confusing

Commit-type: feature
/spend 6h

show more ...