21 May 2018 Tagged: adarationale

Why Use Ada For Critical Code

This page is a listing of all known "Why ada" log threads to date (2018-05-21). A summary list of the reasons is provided at the top.


  • Bounds checked

    • Bounds checked arrays and array slices

    • Hardwareizeable bounds checking

  • Standardized

    • Well specified in a written standard

    • Standardized stdlib

    • Standardized threading mechanism

    • Standardized scheduler

    • The level of completion allows the writing of whole systems using the language as described in the standard.

  • Brain damage not forced upon user

    • No Promiscuous Cast

    • Can eliminate promiscous pointers

    • Can Eliminate Buffer overflows

    • Type Safe

    • Deterministic memory usage

    • Static Memory Alloc

    • Integers not presumed machine words

    • Strict Conformance Enforced on Whole Program

  • Provides 'Rationale Manual' for every aspect of language

  • Compact binaries - the binaries are compact enough to run on small chips. It does not require the inclusion of a runtime.

  • Auditable binaries - with a corespondence between lines of code and physical machine

  • Non-proprietary

  • Native compiler for major cpu archs

  • No GC

  • Predicated Types

  • Links with C Code

  • Statically Compiled

Log References

Well Specified, Strict


asciilifeform: if i could fork myself, i'd be severely tempted to: attempt an
ada bitcoind.
thestringpuller: mircea_popescu: re: could you imaginge if Gavin was magically
replaced by ryanxcharles?
mircea_popescu: i'd have thoughjt a cl bitcoind
mircea_popescu: or for that matter a c bitcoind (as opposed to cpp)
thestringpuller: the original qt uses MFC stuff
thestringpuller: Satoshi sure did like windows.
mircea_popescu: i suspect ti's a case very close to the ida situation
asciilifeform was deploring last week
mircea_popescu: we're so fucking lucky satoshi wasn't any good with code.
asciilifeform: i suspect that mircea_popescu would actually like ada. not
writing it, mind you, but seeing it written?
BingoBoingo: !b 2 ?
assbot: Last 2 lines bashed and pending review. ( http://dpaste.com/2MMH5KE.txt
mircea_popescu: i'm not entirely unfamiliar.
mircea_popescu: !s ada from:mircea
assbot: 1 results for 'ada from:mircea' : http://s.b-a.link/?q=ada+from%3Amircea
asciilifeform: naggum's -other- lang. the only one other than cl that had not
only a standard but a -rationale document- for every page
mircea_popescu: hm.
mircea_popescu: i thought i musta mentioned it
asciilifeform: still used for genuinely safety-critical systems worldwide
(virtually all jet engine controllers, etc.) - language from hell, required you
to specify ranges for integers, and the like
mircea_popescu: uh. what typed language doesn't ?!
asciilifeform: i confess that i rather like it...
mircea_popescu: going int blabla; says : blabla between 0 and 65535 or w/e
asciilifeform: nononono - explicitly.
mircea_popescu: listen, everything in a program is explicit. whethr the user is
aware or not of this...
mircea_popescu: no means yes. yes means anal. it's how computiong works.
asciilifeform: as in 'this one is odd and between 3 and 15 and if it ever
isn't, pump in the halon
mircea_popescu: not that i disagree with the principle of making people
verbalize the stuff they're abotu to do.
asciilifeform: http://cs.fit.edu/~ryan/ada/programs << examples
assbot: Ada Programs ... ( http://bit.ly/1Cpq1LF )
assbot: [MPEX] [S.MPOE] 34100 @ 0.00042927 = 14.6381 BTC [+]
asciilifeform: ugly, pascal-like, but extraordinarily well-specified and strict
to the point of bdsm
Standardized, No Runtime, Can Eliminate Buffer overflows, Standardized in its

entirety 2015-02-16

asciilifeform: re: gnat: 4.6.4 builds but actually attempting to use yields
'gnatgcc: fatal error: -fuse-linker-plugin, but liblto_plugin.so not found'
asciilifeform: ^ does anyone other than me care
asciilifeform: if not about gnat, the overall state of decay.
decimation: asciilifeform: what are you trying to compile that is written in
asciilifeform: 'hello world'
decimation: heh
BingoBoingo: about decay yes. WFT "fix" was important enough to kill this
asciilifeform: who wants to laugh, but there are precisely two programming
languages in existence which are 1) standardized and 2) you can -actually write
complete systems- using -the language described in the standard-
asciilifeform: two and only two.
mircea_popescu: ada and lisp ?
asciilifeform: common lisp
asciilifeform: and yes - ada.
decimation: asciilifeform: even usg has abandoned ada
decimation: but not because it failed to serve a purpose
asciilifeform: (pet peeve of mine - 'lisp' (or worse, the '60s-ism LISP) is a
hopelessly nonspecific term that encompasses languages that differ from one
another far more even than 'algol' differs from 'c')
asciilifeform: decimation: usg, interestingly, did not entirely abandon. but
under pressure from microshit (primarily) relaxed the ancient laws
asciilifeform: avionics, power plant controls, the like - systems whose failure
reliably produces piles of corpses and messy 'pr' - are still very heavy on ada.
BingoBoingo: Also sun when they were monied enough to bezzel up Java
decimation: presumably they do not use gcc
assbot: [MPEX] [S.MPOE] 49000 @ 0.0004195 = 20.5555 BTC [+]
asciilifeform: decimation: actually - they do
decimation: heh
asciilifeform: or rather, the ada component of gcc is based on the ancient
usg-commissioned thing
asciilifeform: an ancient usg
decimation: I doubt they use x86 for such purposes either
asciilifeform: thing is mainly architecture-agnostic, interestingly
asciilifeform: (no big surprise to folks accustomed to gcc)
BingoBoingo: ^ most good things are architecture agnostic
asciilifeform: i advise folks to learn enough ada to understand why something
quite like it is necessary.
asciilifeform: it is more or less the antithesis of the 'hip language'
asciilifeform: in being tremendously unpleasant to work in
decimation: the problem is that many of the promises of ada cannot be kept by
the underlying hardware
assbot: [HAVELOCK] [AMHASH1] 2450 @ 0.0007311 = 1.7912 BTC [-] {18}
asciilifeform: situation today is that most folks would not even notice a
promise broken by hardware
asciilifeform: because it can be reliably blamed on softs.
asciilifeform: you more or less have to present a smoking cratered cpu to make
others believe in 'it was the hardware'
decimation: yeah that's a good point
asciilifeform: there are interesting things to be learned from the ada
approach, if you can pinch your nose and get past the 'ick factor'
asciilifeform: for instance, all error messages refer to a page in the
rationale book
asciilifeform: (in traditional implementations)
asciilifeform: buffer overflows, pointer fandango, etc. - are impossible
asciilifeform: ^ without requiring a bulky 'runtime'
TheNewDeal: ;;Later tell TomServo sorry I missed you last evening. Went out for
some drinks and left my irc on. Will be back thursday evening
gribble: The operation succeeded.
asciilifeform: just what the doctor ordered for proggys whose behaviour (and
error modes) must follow rigorous spec, or user - dies.
Standardized in its entirety, Non-proprietary, Provides 'Rationale Manual' for

every aspect of language 2015-02-18

decimation: asciilifeform: that was a neat link about ada
decimation: I wasn't aware that it was still going strong in non-defense areas
asciilifeform: i've learned that there is not actually a good substitute for
ada, as of yet.
asciilifeform: as in, something that actually provides the same functionality
asciilifeform: without the 'bondage & discipline' stylistic aspects
decimation: the trouble is that it seems the real toolchains used by these
projects are all $$$ commercial
asciilifeform: nope.
asciilifeform: gnat is both widely used and gpl
asciilifeform: (one of the conditions for the ancient usg mandate establishing
ada 'foundation' is that the product must be gpl'ed)
decimation: I guess the difference is the 'usg certificate'
asciilifeform: the certificate has nothing to do with ada per se
[]bot: Bet created: "BTC to top $500 before 1st May" http://bitbet.us/bet/1120/
asciilifeform: and is a separate racket
assbot: [MPEX] [S.MPOE] 47900 @ 0.0004491 = 21.5119 BTC [+] {2}
asciilifeform: for which the chumps, yes, pay
decimation: no it's the real time os I think
asciilifeform: at any rate, all of the 'standard library' is public
asciilifeform: and (iirc) lgpl
asciilifeform: there are proprietary ada systems, yes. i have not been able to
learn who uses them, and for what.
asciilifeform: but this being one of the only two programming languages in
existence which are -standardized in their entirety-, in principle there is no
reason - aside from retardation - to use a proprietary ada
asciilifeform: - actually - i can think of one
asciilifeform: gnat/gcc lacks support for some of the more exotic chips used
asciilifeform: 'MIL-STD-1750A' etc.
asciilifeform: ^ yes - actual cpu!
decimation: http://archive.adaic.com/projects/atwork/boeing.html << "For these
projects, Honeywell purchased DDC-I, Inc.'s Ada Compiler System, using it as
the front-end source for Honeywell's symbolic debugger. "
assbot: The Boeing 777 Flies on 99.9% Ada ... ( http://bit.ly/1AQmXtd )
[]bot: Bet placed: 1 BTC for Yes on "BTC to top $500 before 1st May"
http://bitbet.us/bet/1120/ Odds: 94(Y):6(N) by coin, 94(Y):6(N) by weight.
Total bet: 1.1 BTC. Current weight: 99,996.
decimation: asciilifeform: you can probably get access to mil-std's
asciilifeform: considering that the sole remaining makers of the product
described in that one are chinese...
asciilifeform: not so hard
asciilifeform: at any rate, all of the ada-related material is thoroughly public
asciilifeform: and guess which are the only two programming languages to have
'rationale manuals' for every aspect of the language ?
asciilifeform: i can sorta see why naggum went in for ada
decimation: "23-Jan-2015                        MILITARY STANDARD
Sixteen-Bit Computer Instruction Set ArchitectureMIL-STD-1750A, dated
12-Apr-2010, remains inactive for newdesign; however, the document is valid for
asciilifeform: it's a kind of 'polar opposite' of common lisp..
decimation: wouldn't you put it in the 'algol' family?
asciilifeform: decimation: that's traditional notation for a standard that no
longer has a working group but has not been retracted
asciilifeform: decimation: definitely. more specifically, pascal-likes.
asciilifeform: (ada is quite like a more 'fascist' incarnation of pascal)
asciilifeform: phun phact:
asciilifeform: quite a few usg-sponsored war projects are still -struggling to
modernize to ada-
asciilifeform: and making use of 1970s-era monstrosities (e.g., 'JOVIAL')
Standardized to Completion


asciilifeform: interestingly, even though ianal, i do so enjoy a good hardcopy
iso standard (that describes something useful, naturally)
asciilifeform: just got 'ada 95: the language, reference manual, and standard
libraries' ansi/iso/iec-8652:1995 in the post?
asciilifeform: and it's a work of art
asciilifeform: the pages are numbered like a bible's
asciilifeform: with paragraph indices
asciilifeform: for citing 'chapter & verse' at n00bs
thestringpuller: !up The20YearIRCloud
asciilifeform: and the thing has totality, even more so than common lisp - even
character sets are included in the standard
asciilifeform: as in, you can actually program without thinking about any
building block that isn't in the book...
asciilifeform: the down side is that you get to essentially write in pascal
asciilifeform: (the similarity is more than skin deep)
Brain Damage not forced Upon User


decimation: asciilifeform: unfortunately ada (derived from pascal-algol) has
1-based array indexes
assbot: [MPEX] [S.MPOE] 15186 @ 0.00040757 = 6.1894 BTC [+]
asciilifeform: decimation: foo: array (Integer range 0 .. N) of Whatever;
asciilifeform: decimation: so nope.
asciilifeform: at least, not if you don't want.
decimation: ah that's useful
decimation: all the examples I've found start with a 1
asciilifeform: can start with 31337 if you like.
decimation: I assumed it was a language 'feature' like matlab
decimation: matlab 1-based indexing is enraging
asciilifeform: ada, like common lisp, is interesting for the mostly-complete
absence of any obviously braindamaged decisions forced upon the user


asciilifeform: do any of you feel up to the task of ada-izing this ?
asciilifeform: until this happens, we're playing 'underhanded c contest'
BingoBoingo: <asciilifeform> put'em on separate continents. << Hard part is not
cloning the hardware. It is cloning the history and software.?
asciilifeform: BingoBoingo: we're talking about the classical fictional clones,
naturally, rather than the boring younger twin brother kind
BingoBoingo: Ah
mats: asciilifeform: i may be able to wrangle some time on a cluster if you're
interested in doing a batch job
mats: would be a good stop-gap until jurov gets going
asciilifeform: mats: i am specifically not interested in shuttling crud back &
asciilifeform: have plenty of cpu here at home
asciilifeform: but want to push button and forget again.
mats: ok
punkman: asciilifeform: I wonder how much extra code we'll need to make
microecc (or whatever else) parse/verify all the different crap already in
assbot: The FCC approves strong net neutrality rules - The Washington Post ...
( http://bit.ly/1AwUyrt )
asciilifeform: punkman: that is clearly part of the puzzle
punkman: I'd be interested in learning Ada (or other language), but damn that's
some gnarly syntax
BingoBoingo has build against LibreSSL 2.0 syncing, 9 days of history left, no
wedge blocks
asciilifeform: punkman: get the 'rationale' book. every piece of 'gnarl' is
justified, and the justification reads like your local fire code - every line
is likely there because of a corpse
punkman: I don't think we have fire code :P
punkman: asciilifeform: should I be looking at ada 2012 flavour?
asciilifeform: punkman: 2005 or better yet 95
asciilifeform: none of the post-95 features are likely to be usable on a
bare-metal build
asciilifeform: (they require the runtime libs)
asciilifeform: while the original 1983 standard had warts that were fixed in 95
punkman: http://www.ada2012.org/comparison.html handy table
assbot: Ada 2012 : Ada Comparison Chart ... ( http://bit.ly/1AwY998 )
Standardized, safe types, deterministic memory usage, extant compiler backends

for major cpu archs 2015-03-04

adlai: asciilifeform: any particular reason for your love of ada, specifically?
asciilifeform: (yes, let's call things by their true names - sabotage)
asciilifeform: adlai: i'd love to learn of a substitute for ada
decimation: asciilifeform: well, this is a general problem in C programming -
the failure to provide a global namespace
decimation: "no, I want the writef() that does the stuff, not the writef() that
displays singing monkeys"
asciilifeform: that is, a hard-standardized (iso preferred) prog. lang. with
safe types and deterministic memory usage, that has extant compiler back-ends
for all major cpu architectures
asciilifeform: and is happy with, e.g., 64k of total machine ram
asciilifeform: ^ ocaml, say, is right out
asciilifeform: ditto erlang
asciilifeform: ada's the only game in town for this not-uncommon set of
decimation: asciilifeform: also it's probably never going to attract hipsters
asciilifeform: in much the same way that mpex is the only game in town in its
asciilifeform: i don't give a flying fuck either way about the hipsters
Type Safe, Bounds Checked, Standardized, No GC, Static Memory Alloc


thestringpuller: asciilifeform: so brought up ADA at work, and coworker started
having Vietnam-esque flashbacks from school. Is this normal behavior?
asciilifeform: thestringpuller: absolutely
asciilifeform: thestringpuller: try 'scheme' on him
asciilifeform: never fails to bring back 'vietnam'
PeterL: and this is what you want people to use?
thestringpuller: this compels me to learn the language more.
asciilifeform: PeterL: life-critical embedded systems must be written in a
typesafe, bound-safe standardized language with hard-real time run (that means
no garbage collection) and static memory alloc.
asciilifeform: PeterL: there is precisely one such language in existence.
BingoBoingo: !up qntranet
BingoBoingo: Hello visitor
asciilifeform: PeterL: it's ugly as sin, and originally usg-promulgated, but
that doesn't change the facts.
PeterL: could we make a prettier version?
asciilifeform: PeterL: sure, go make. we'll check again in 50 yrs.
PeterL: ok, I'll get right on that
asciilifeform: PeterL: but you'll find that much of what programmers actually
object to in ada is precisely the good parts?
PeterL: what part do you find ugly?
asciilifeform: 'it's not sexy. whaddayamean i have to specify thing'
BingoBoingo: !b 7 ?
assbot: Last 7 lines bashed and pending review. ( http://dpaste.com/1W3HXTC.txt
asciilifeform: PeterL: the pascal syntax mostly
asciilifeform: but even it contributes to the actual purpose of the thing.
assbot: [MPEX] [S.MPOE] 3950 @ 0.00037468 = 1.48 BTC [-]
asciilifeform: which is safety and nonambiguity at any cost.
PeterL: in my initial introduction to ada, it seems verbose, with extra words
hanging around where a symbol could work just fine
asciilifeform: that's just about everybody's first impression
asciilifeform: then you actually read a book and try to think of which
'verbosity' could be cut
asciilifeform: and find that you are actually snipping off a living organ and
not dead weight.
asciilifeform: there is even a 'rationale' document (also book) ready to argue
with you?
jurov: http://cs.fit.edu/~ryan/ada/programs/ << some samples
assbot: Ada Programs ... ( http://bit.ly/1BIwYJr )
asciilifeform: it's numbered like a bible - for folks to quote chapter & verse.
PeterL: well, it has the same named closing tags like you complain about in
html (begin thing ... end thing)
asciilifeform: PeterL: has many things that feel 'heavy'
asciilifeform: but the result adds up to the fact that there will never, ever
be an 'underhanded ada contest'
PeterL: programs should be boringly obvious what they are doing?
asciilifeform: precisely.
Standardized stdlib, Standardized threading Mechanism, Standardized Scheduler


ben_vulpes: http://log.bitcoin-assets.com/?date=10-04-2015#1094362  << how so???
assbot: Logged on 10-04-2015 01:04:50; asciilifeform: because it declares war
on microshit and unix, 'a pox on both their houses'
mike_c: (as i patiently wait for cardano)
ascii_field: ben_vulpes: it carries own stdlib
ascii_field: ben_vulpes: and even has own threading mechanism, scheduler.
assbot: [MPEX] [S.MPOE] 100300 @ 0.00028657 = 28.743 BTC [+]
ascii_field: ben_vulpes: as a result, it is actually much easier to - usably -
plant ada on 'bare metal' (sans os) than nearly anything else
Type Safe, Bounds Checked, Sane Error Handling (undefined?), Standardized,

Multiple Native Compilers 2015-09-20

asciilifeform has been recently carrying out a kind of survey of programming
systems ~built for adults~. so far, nominees: common lisp, ada, standard ml.
and that's ~it~
asciilifeform: rough and non-exhaustive summary of what 'for adults' means:
asciilifeform: 1) type safety 2) MULTIPLE independent implementations 3) at
least two NATIVE compilers exist 4) written international standard, preferably
published on dead tree
asciilifeform: under (1) i also include bounds checking and sane error handling
asciilifeform: that's pretty much it.
mircea_popescu: i was hoping for whips and cuffs
asciilifeform: under (3) i also include that native compiler must support unix
asciilifeform: (or it is not properly speaking 'native')
asciilifeform: whips and cuffs come with ada
asciilifeform: if your book didn't come with then, get yer money back
asciilifeform: *them
mircea_popescu: lol
asciilifeform: i'd include forth, but it has the 'safety' of a frag grenade.
asciilifeform: (a frag is not a useless thing, has its place where nothing else
will do. but only there.)
asciilifeform: i recall there was a thread where mircea_popescu unzipped and
pissed on standards, but they are pretty much the only way you get to have (2)
and (3)
Bounds Checked, Auditable, No Runtime


asciilifeform: i was willing to deal with the cpp miseryu of trb because 1) it
pre-dates bitcoin being valuable 2) it was - and remains - the schelling point,
'father's pistols'
shinohai: I will use trb as long as it works on the overall network, failing
that I will have to find something else to occupy my time.
asciilifeform: this pointedly does not mean that i am interested in attempting
to wash the smell of shit off a rando sickly rat from rando sewer.
asciilifeform: http://log.bitcoin-assets.com/?date=10-03-2016#1428471  << ada.
assbot: Logged on 10-03-2016 10:52:32; jurov: but seriously, what is a must
have? mempool sanity and anything else?
asciilifeform: i am sick and tired of there being usg c/cpp code in the loop
asciilifeform: ENOUGH wotless nonboundschecked language.
asciilifeform: (i loathe ada, but this needs a BOUNDS-CHECKED language where i
can AUDIT THE BINARY and NO RUNTIME COMPONENT / GC - which leaves exactly ONE)
(External Reference)


asciilifeform: shinohai, mod6, et al: https://cowlark.com/2014-04-27-ada <<
possibly helpful?
assbot: A Random Walk Through Ada ... ( http://bit.ly/1UVyGjl )
asciilifeform: ^ mega-recommended to everyone with the faintest inkling of an
interest in subj. overview of nearly all key aspects.
Bounds Checked, No Runtime, No GC


asciilifeform: ;;later tell mircea_popescu i had a notion: if we're no longer
holding the 'father's pistols' line, is there any good reason not to replace
openssl in trb with, e.g., ada bignum ?
gribble: The operation succeeded.
asciilifeform: (the issue of whether the muscle exists, to do this, is a
separate question. the above is simply re the political aspect of whether it is
a thing that is even to be contemplated.)
asciilifeform: i regard it as a mircea_popescutronic question.
phf: wasn
phf: err
asciilifeform: in other 'news', in my dream, mircea_popescu was camping in a
tent in my house, and reading a dead tree copy of the logz summarized by
somebody or other, and it was a thing on ancient yellowed paper, he cursed and
spat and in the end tore it up and started smashing things, then went out the
door and started firing some sort of energy weapon at the trees
mircea_popescu: asciilifeform there is no good reason - for the contemplated
july alternative offering
asciilifeform: aha this is what i thought.
mircea_popescu: on the contrary - the more crud that can be snipped the very
asciilifeform: mircea_popescu: how about c-s in place of ecdsa ?
mircea_popescu: if we had a working implementation!
mircea_popescu: and something instead of bdb. but INSTEAD not alongfuckingside!
mircea_popescu: and and and.
asciilifeform: again these are mircea_popescutronic questions! they leave aside
the issue of 'have we the divisions'
mircea_popescu: truth be told our diligent efforts over the years - and by our
i mean mostly not mine - exposed so many hooks for fixing and improving it's
not even funny.
asciilifeform: the reason i asked was that i noticed that ada links just fine
with cpp crud, both having been shat out of ordinary gcc
mircea_popescu: nb.
asciilifeform: so piecemeal organ replacement is a realizable thing.
mircea_popescu: this is pretty great news, actually.
asciilifeform: folks who have been experimenting with gnat prolly already
realized this. but i am leaving it here for n00bz.
phf: property of all gcc, can link fortran for numerics
asciilifeform: aha
asciilifeform: (i can't fathom ~why~ you would, but yes, you can)
asciilifeform: 90% of why i like ada is that it 'compiles like c' (i.e. without
massive runtime or bytecode claptrap in place of ida-able binary) WHILE having
bounds-checked array accesses etc.
asciilifeform: if this were available somewhere else, i would look into the
somewhere else.
asciilifeform: 9 or so of the remaining % is because you get static memory (no
consing, no gc, FORCED to intelligently allocate).
Predicated Types, Standardized, Integers not presumed machine words


mircea_popescu: phf fwiw i believe "threads" are a miserable kludge, so i can
see the angle.
asciilifeform: even mcl has threads.
asciilifeform: mircea_popescu: no threads, no multicpu
phf: asciilifeform: quiters
mircea_popescu: asciilifeform were you gonna explain how the grocery thing
relates ?
mircea_popescu: and srsly, what, it's my job to tell the processor how to
process ? that's why it's a processor, let it process!
asciilifeform: mircea_popescu: in that most effective software isn't public.
mircea_popescu: but oh, no, "you gotta make this hacky flagging scheme to show
us what to paralellize!"
asciilifeform: mircea_popescu: you'd like ada then
mircea_popescu: asciilifeform that is utterly besides the point, isn't it ?
most well made statues were kept in temples, in the dark, untouched and unseen.
this doesn't mean they had ergonomic spoons in mass production!
asciilifeform: ada tasks, afaik, is the only sane implementation of parallelism
where you ~never~ specify explicit thread
asciilifeform: mircea_popescu: consider, e.g., naggum's oil/gas exploration
asciilifeform: they were 100% commonlisp (allegro) but never will be published
or advertised.
mircea_popescu: consider what i'm actually saying : it's one thing to solve
correctly a well defined problem ; it is another thing to solve well a nebulous
asciilifeform: they are not part of what folks think of as 'software ecosystem'
mircea_popescu: we'll be doing a lot of the 2nd willy-nilly.
asciilifeform: right
mircea_popescu: and it is good that the good tools, derived from 1st, get some
battle experience.
asciilifeform: i can't argue with this.
mircea_popescu: so then why are you :)
asciilifeform: my objection was to 'lisp never tested in Serious Business'
mircea_popescu: I DID SAY!!11!! "without importing" did i ?
mircea_popescu: and yes, the more i hear about ada the more i like it, or
properly speaking the more it sounds like right thing.
asciilifeform: mircea_popescu: i wish it weren't the right thing...
asciilifeform: but it is.
PeterL: asciilifeform could you make a "right thing" that is better than ada?
asciilifeform: has, e.g., predicated types. (which means, you can declare a
variable, where, say, assigning a prime number to it is an error condition in
the runtime. which means, yes, a check on EVERY assignment.)
asciilifeform: PeterL: when? by friday morning before breakfast ??
mircea_popescu: PeterL not in a lifetime.
PeterL: no, just conceivably, as in have you identified places where it could
be improved?
mircea_popescu: liek that it's a pretty good q.
asciilifeform: PeterL: understand, ada is necessary because we are stuck with
the idiot c machine.
asciilifeform: a properly constructed computer would perform ALL of the same
checks, and more, IN HARDWARE
asciilifeform: but we haven't such a thing.
PeterL: aha, so if you ditch c-machine then you could do better?
asciilifeform: PeterL: definitionally
mircea_popescu: different and incomparable.
asciilifeform: ^
mircea_popescu: there's no "better" in that space.
mircea_popescu: also you can't implicitly sort complex numbers.
phf: well, incremental improvement on ada doesn't seem like a particularly
interesting problem, thing comes with a lineage, wirth's pascal, modula,
oberon; ada fits into that ecosystem, so simply going over wirth's research you
can find a lot of existing ideas for ada improvements
asciilifeform: the 'better' is in the sense of 'less screaming idiocy in the
mircea_popescu: if idiocy screamed in the forest where there's no alf the
bee-dog to hear it,
mircea_popescu: would the world be better ?
asciilifeform: phf: there are some very obvious warts in the language - e.g.,
the compiler is one-pass and you end up having to write c-style prototypes for
some functions.
asciilifeform: but there is also a STANDARD
asciilifeform: and if you improve the thing, you break it.
asciilifeform: as in common lisp.
phf: but if you start with scheme-81/cadr or greenarrays or whatever, could
probably get more interesting results by a margin
mircea_popescu: incidentally, WHY is the compiler single pass ?
asciilifeform: phf: yes, but we haven't the factory.
asciilifeform: what we have is a great many rusty old pentiums.
asciilifeform: mircea_popescu: why? because it is.
asciilifeform: because it made sense in 1980
asciilifeform: when cpu cycles were precious, and disks - glacially slow.
mircea_popescu: i've been wondering bout this.
mircea_popescu: but might be the lowest fruit.
asciilifeform: incidentally, i recommend the 'random walk' article to anyone
with even a passive interest in the subj
mircea_popescu: asciilifeform> [...] you can declare a variable, where, say,
assigning a prime number to it is an error condition in the runtime. which
means, yes, a check on EVERY assignment. <<< now imagine the converse type :D
asciilifeform: at least read the section about pointer leakage prevention
asciilifeform: it is unique, afaik, to ada
asciilifeform: mircea_popescu: l0l
mircea_popescu: aha ?
mircea_popescu: but there's a point here. it's not a bounded problem!
mircea_popescu: and yeah, i get the "doc it hurts when i do this" "so don't do
it then" thing. but ...
asciilifeform: mircea_popescu: generally folks will use simple predicates
(e.g., 'not equal to 0')
asciilifeform: sorta like c 'assert' but you can attach it to ~anything~
mircea_popescu: hey. is it a thing or is it not a thing! stop giving me jam!
asciilifeform: which ?
mircea_popescu: the predicated types.
mircea_popescu: "all of the same checks, and more, in hardware". what now ?
miner core in every cpu, to check for primality ?
asciilifeform: mircea_popescu: basic hygiene.
asciilifeform: as in, arrays live with their bounds
asciilifeform: and ALL accesses are bounds-checked;
mircea_popescu: your idea of basic hygiene differs from the medieval french
only in form, not in substance.
mircea_popescu: it's still give or take "what everyone else does".
mircea_popescu: and fwiw most arabs'd be horrified at the notion of not
actually washing bunghole after defecation.
asciilifeform: integers are MARKED AS SUCH and tested when arithmetizing;
mircea_popescu: poorest village public toilet still had water implement in
working condition.
asciilifeform: mircea_popescu: i did not say that basic hygiene is a ~stopping~
place, but a starting point.
asciilifeform: we don't even HAVE the toilet yet.
mircea_popescu: the problem is that it being unbounded, it can't really be
asciilifeform: we're still at the shit-where-you-stand level.
asciilifeform: the basics ABSOLUTELY belong in hardware.
mircea_popescu: reasoning past the faith ?
hanbot: davout moar for you.
asciilifeform: there is no excuse for buffer overflows to be a thing.
mircea_popescu: why not ?
asciilifeform: why not shit where you stand?
asciilifeform: in your pants?
asciilifeform: do i have to justify that also ?
mircea_popescu: listen : the EARTH permits you to do so.
mircea_popescu: do you propose "not shit where yo ustand" should be a property
of earth and standing ?
mircea_popescu: would you buy pants with buttplug ?
asciilifeform: mircea_popescu: this is a ludicrous analogy.
asciilifeform: the butt plug has a down side.?
mircea_popescu: "as long as these are securely fastened, an absolute guarantee
to no pants shitting can be offered by manufacturer". and yes i used such
thjings, but for very peculiar purposes.
mircea_popescu: and if it's a shitty analogy blame yourself - you brought it in!
mircea_popescu: ha! what, and hardware has no downside ?!
mircea_popescu: now i understand why you expect the foundries to cost billionz!
you're outsourcing!
asciilifeform: sane hardware has no downside other than it not yet existing.
mircea_popescu: ...
asciilifeform: in that respect it has the same downside as eschewing microshit
had in 1995.
phf: that's a platonist right there
mircea_popescu: seems altogether easier for you to not shit where you stand
than for us to create a new reality.
asciilifeform: not entirely new, examples existed as early as 1969
asciilifeform: (control data corp.'s products)
mircea_popescu: a more general and unrelated problem : why should the specific
number of compiler passes be set down in the standard ?
mircea_popescu: i can't write sentences with a count at the end saying how many
times you have to read them until you get them.
asciilifeform: 2.
asciilifeform: as for 'why standard' - it affects the semantics.
asciilifeform: ergo a standard is meaningless unless it contains it.
mircea_popescu: wasn't by any means a practical consideration. more of a
"thinking about the compiler of the wetware future"
phf: $up a111
deedbot: a111 voiced for 30 minutes.
mircea_popescu: hola a111
phf: http://btcbase.org/log/2016-04-06#1446778 << i also agree, i just politely
pointed out that the feature is obviously needed, i just don't trust bot part
enough yet to put more functionality on it. ??
a111: Logged on 2016-04-06 12:30 asciilifeform: ;;later tell phf i find myself
agreeing with adlai, the way we have it now, the log is in fact near-unreadable
EXCEPT in wwwtron. links oughta dump into the chan assbot-style
mircea_popescu: o check it out , also had a bot.
phf: it's all bots sitting there unvoiced
mircea_popescu: juj
mircea_popescu: (ftn, juj = kik ^2 = lol ^ 4)
asciilifeform: what'd be the complex conjugate of l0l ?
asciilifeform: re earlier thread,
asciilifeform: http://www.ada-auth.org/standards/12rat/html/Rat12-2-5.html
asciilifeform: ^ predicates
mircea_popescu: which reminds me of my indignation in 9th grade. THERE ARE TWO
phf: $down a111
mircea_popescu: -a+bi / a + bi also!
mircea_popescu: "So we see that the predicate in the subtype Even cannot be a
static predicate because the operator mod is not permitted with the current
instance. But mod could be used in an inner static expression."
mircea_popescu: eh ffs.
mircea_popescu: even can be static irrespective of fucking mod wtf.
asciilifeform: mircea_popescu: you gotta know what mod means in ada
mircea_popescu: "and, in addition, a call of a Boolean logical operator and,
or, xor, not whose operands are such static predicate expressions, and, a
static predicate expression in parentheses." << right there. a xor maxint-1 > 0
asciilifeform: it means 'takes up this-many bits REGARDLESS'
mircea_popescu: EVEN is wrongly defined is the point.
asciilifeform: where?
mircea_popescu: im quoting from your link.
trinque: phf: http://dpaste.com/1SZ14HH << here's what I beat your example into
trinque: maybe we can collaborate on getting a bot that, y'know, stays
connected to an IRC channel
trinque: thing knows how to ghost, has your ping/pong code in it (thanks!)
trinque: and I have no idea if I did terrible things, so say so. I'm just some
dude reading books on lisp that washed up on my island
asciilifeform: trinque: neato
trinque: where I (think I'm) headed is the bot being a separate module. code
using the bot would pass the appropriate generic function to call for commands
into make-bot
mircea_popescu: asciilifeform basically they lazily decided "even" is to be
tested by "mod", which is unacceptable if they're going to make mod randomly
unavailable ; seeing how there are purely bit-logical ways to test for
mircea_popescu: which they don't make similarly unavailable.
phf: trinque: you can forgo the whole nickserv integration by putting password
into the irc:connect
asciilifeform: mircea_popescu: the bitwise thing works. i have nfi why not used
in the example.
phf: or better yet add ssl key
asciilifeform: or actually i no
asciilifeform: *do
asciilifeform: say it's an algebraic type (e.g. bignum)
trinque: phf: ah that's simpler
asciilifeform: ada is a civilized lang like commonlisp and there is NOT a
presumption that integers are machine words !
mircea_popescu: so you're saying i'm a sinful asm/cobol/c-head ?
asciilifeform: aha.
mircea_popescu: for shame.
asciilifeform: it is curable tho!
phf: trinque: http://dpaste.com/1SZ14HH#line-549, (irc:connect :nickname
*bot-nick* :server "irc.freenode.net" :password *bot-ns-password*)
phf: should solve all your service woes
phf: my ping/pong code was not very good. i reworked it yesterday, but haven't
yet enabled on this guy, so if he falls over, it'll be quietly, and we'll know
by lack of logs :D
trinque: and that'll just boot the previous instance of "deedbot" if I connect
that way?
asciilifeform: mircea_popescu: ada is a merciless thing. e.g., you cannot use
two types interchangeably even if 'they're the same inside'; can only take
pointers of items explicitly declared pointerable-to; by default, pointers only
valid in the context where they were taken
mircea_popescu: aha.
phf: that was my impression since that's how my bouncer runs, and the only time
i had issues is when my ssl cert silently expired. but come to think of it,
i've not tested it
asciilifeform: the basic philosophy is to take the most dangerous knobs and
attach broken glass spikes to them
asciilifeform: so programmer only grips it if he ~really~ must
asciilifeform: and feels the pain.
mircea_popescu: sounds a lot like v!
asciilifeform: aha.
Bounds Checked, Link with C Code


mircea_popescu: anyway, re earlier discussion, i guess it'd be worth
belabouring the point that nothing therein contained is an argument against
using ada. it's still a great technical solution, for bounds checking, for
other reasons, it's still a great practical solution, for native linkability
with c object code, for other reasons. same stands for scheme, still best
option for a scripting language for bitcoind.
asciilifeform: mircea_popescu: re thread, see also earlier threadz re
'impedance matching'
mircea_popescu: impedance yea
asciilifeform: as in 'why using 19 bit integer is 25x slower than 16'
asciilifeform: the concept pervades physics.
mircea_popescu: "why is no insect larger than a breadbox"
asciilifeform: well that's more euclidean geometric (surface/volume)
mircea_popescu: (contrary to what noob scientists may think, "a breadbox" is
neither arbitrary nor undefined in that sentence)
asciilifeform: this'd be more of a 'why is ear shaped like-so'
shinohai: Thanks for making my day entertaining anyway pete_dushenski o/
mircea_popescu: asciilifeform geometry doesn't really matter until physics
decides d^x is a factor :D
pete_dushenski: shinohai: yw!
pete_dushenski: ;;later tell davout don't scare-excite me like that next time!
(wait, what next time?) also, i wanted to show up here, but couldn't quite
meditate and irc atst?
gribble: The operation succeeded.
asciilifeform: ;;later tell mod6
gribble: The operation succeeded.
asciilifeform: ^ and anyone else
asciilifeform: spiffy resource.
Corespondence to physical machine, Type Safe, Bounds Checked


ben_vulpes: kinda interesting how haskell has yet to eke out a foothold around
ben_vulpes off to inject an urban food log down his throat
ben_vulpes: put it in mah face hole
mircea_popescu: ben_vulpes you don't get it : the "Reputation" bs is
institutionalized oppression.  in any system where group x has "reputation for
y-bad" you know for a fact that a) group z is in charge ; b) group z is y-bad
and c) group x is not.
mircea_popescu: STRICTLY that ; nothing else.
jurov: ben_vulpes: haskell is too young
mircea_popescu: ben_vulpes jurov haskell is domain specific for domains we're
not as of yet interested in ?
jurov: no it's actually quite suitable for bitcoin implementation, i have
written performant simulation in it (but had to instrument it not to gobble
memory for lazy computation)
jurov: just not stable yet
jurov: 10y old haskell code not worky
mircea_popescu: ah then that's the answer : jurov's not published yet.
mircea_popescu: apparently the "around here" is wider than previously thought.
asciilifeform: ben_vulpes: fwiw i programmed in it
asciilifeform: it has the prolog disease.
asciilifeform: (and, unlike prolog, is quite massive per se, and not easy at
all to implement, and there is ONE usable implementation...)
mircea_popescu: in other irrelevant home flavour, girl making zacusca (the
proper ro thing, baked peppers, etc) "what do i do with the juice ?" "freeze
it" "hmm... need to get bags we're out" "use an ice cube tray". now ima have
veggie broth cubed, for soups!
asciilifeform: 'lazy computation' is -- like it or not -- a horrendous idea.
mircea_popescu: asciilifeform i don't suspect he's using THAT part.
asciilifeform: (it is VERY attractive to academitards because it creates the
kind of problems which they can later convert into papers)
asciilifeform: mircea_popescu: you can't actually program in haskell 'without
using that part', not really
mircea_popescu: there's possibly a language under academia-haskell screaming to
get out ; strong types and etc
mircea_popescu: it's unclear if that language reduces then to ada, but i
suspect not.
asciilifeform: no, it reduces to ml
asciilifeform: specifically.
asciilifeform: i considered ml as a very, very close contender for 'an ada'
mircea_popescu: this is possible yes.
mircea_popescu: "typed lisp" w/e
asciilifeform: but i very much dislike the 'no native compiler exists or can
likely ever exist' part; and the 'there are 2 implementations ever made, and
only 1 is quasi-usable' part.
asciilifeform: ada suffers from the latter problem also
asciilifeform: (but not the former)
mircea_popescu: jurov did you consider and discard ml for your application
incidentally ?
jurov: never touched ml
mircea_popescu: ah.
asciilifeform: hardly anyone ever touches it today. no longer taught, afaik.
asciilifeform: it was 'replaced' with haskell in academiland, and with ocaml in
heavy industry
asciilifeform: (the latter has ONE IMPLEMENTATION, by some fr d00dz)
mircea_popescu: ocaml that ml which is ml in the sense javasCript is c.
phf: http://btcbase.org/log/2016-12-13#1582941 << i still think koi8-r was a
great hack. i think cleverness of that kind is no longer popular because idiots
ruined cleverness for everyone??
a111: Logged on 2016-12-13 19:54 Framedragger just discovered how phuctor's 404
page looks like: http://nosuchlabs.com/asdf - appreciates
asciilifeform: mircea_popescu: on the contrary, it has a native compiler for
x86. but i categorically am put off by the 'one implementation' thing.
mircea_popescu: phf as per naggumg quote ; quite exactly my mind too : there
not existing cleverness is more valuable to the empire-of-idiots than any gains
from clevernesses they realise.
asciilifeform: phf: i still have multi-GB stash of koi8
mircea_popescu: which is true, too. republic grows by cleverness ; empire
shrinks by it.
asciilifeform: fwiw i am still open to suggestions re 'the better ada'
asciilifeform: because ada per se is very, very hairy hair shirt.
asciilifeform: but afaik is not escapable, no.
mircea_popescu: that open-ness is imaginary at best ; minigame will use ada rsa
for example.
asciilifeform: theoretically open.
asciilifeform: i don't expect an answer.
mircea_popescu: there was a window, but i think it closed recently.
asciilifeform: am quite certain , in fact, that there isn't one
asciilifeform: as someone who ~likes~ 'functional' languages, etc., i still
must point out that it is a highly questionable business to use a language
where there is not a simple, kindergarten correspondence b/w each line of the
program and what the machine physically does, for safety-critical equipment.
asciilifeform: of the type-safe/bounds-safe languages, ada is the only one
which fills this description.
asciilifeform: afaik.
Bounds Checked


asciilifeform: in unrelated noose, 'nqb' reads & parses a full 1MB block, with
2218 tx, and recreates it from fast-form, again to disk, in 0.123 sec. on a
3GHz opteron cum ssd.?
mircea_popescu: ah that's not bad at all.
ben_vulpes: next time someone says "i know a feller", next question is "which
mircea_popescu: "oh nobody in particular"
asciilifeform: mircea_popescu: well that's merely the mechanical process, no tx
index queries, no scriptolade use.
mircea_popescu: aha.
mircea_popescu: still.
ben_vulpes: i know in point of fact that i've demonstrated how candidates for
voice are to introduce themselves before.
asciilifeform: fuzzed it, in various ways, ada bounds checking worx like a
champ in all cases
asciilifeform: (every variable knows what its expected range is, and said
bounds are checked on any assignment)
No Promiscous Pointer, No Promiscuous Cast


asciilifeform: ada in particular is 'a harsh mistress', you can sit for 3 hrs
and your thing simply won't build, gcc won't eat it, and you gotta actually
open the book and grasp the reason why, brute force knob-twiddling will get you
0 result.??
mod6: i've quite noticed that actually.  i was trying to figure out "packages"
and did an evening worth of headbanging.
mod6: over something that should have been totally trivial.
asciilifeform: then later it dawns on you that the 'could have been trivial'
would have been at the cost of becoming c.
mod6: right. fair enough. and reasonable advise.
asciilifeform: the pointer rules are the clearest case of this.
asciilifeform: in most cases you can't even point to a thing in ~your current
asciilifeform: because machine has nfi which items in ~current~ scope will go
out of scope first...
mod6: yah hmm.
mod6: I hope it's not too prohibitive.
asciilifeform: mod6: in principle you can always beg compiler for mercy and
introduce 'unchecked', c-isms. or even (1 line, in fact) import arbitrary c.
asciilifeform: but it is only 'last resort'
asciilifeform: and more or less any problem that doesn't involve os calls, can
be solved in some other way.
asciilifeform: but it does require letting go of n decades of 'c thinking',
where you reflexively litter the proggy with pointers to whatevers
asciilifeform: there ~are~ considerable wins in convenience -- you can ask an
array how big it is; and where it starts/ends (indices are not from zero, but
can be from anything to anything, as can types -- you can have a type 'integers
from 12 to 15', say.)
asciilifeform: but yes, you will do 2-3x the work, subjectively, as when
writing c proggy. but it is not ~wasted~ work, just as the work of using v
instead of 'git' etc. is not wasted.?
asciilifeform: the end result -- is different.
shinohai finds V far easier than git now for some reason .....
asciilifeform: i don't bring them up together out of superficial similarity,
but from fundamental one -- v rejects 'merge' as a concept; ada rejects the
promiscuous pointer and cast
asciilifeform: both are items 'civilians' are quite accustomed to, to the point
of 'how the fuck can anyone even think of living without'
asciilifeform: eventually one -- learns. and then you begin to see the monkeys
who 'why should i have to look for a special place before taking a shit, i can
do it wherever' as the loathesome things they are.
Bounds Checked Array Slices


asciilifeform: mod6: http://wotpaste.cascadianhacker.com/pastes/RxYkz/?raw=true
asciilifeform: btw, nobody's exempt from having to eventually grasp how ^ worx
asciilifeform: so may as well get head start.
asciilifeform: incidentally, (imaginary) prize to the first d00d who
understands why this had to be rewritten with the loops indexing from 0 .. L-1,
rather than, e.g., for i in X'Range ... as formerly
asciilifeform: rot13 spoiler: Nqn neenl fyvprf xrrc gur 'Svefg naq 'Ynfg bs
jurerire va gur cnerag gurl pnzr sebz! sbe fbzr ernfba guvf vf abg zragvbarq
naljurer ohg va gur fgnaqneq. Xnengfhon bs pbhefr raqf hc vaibxvat gur onfrpnfr
zhygvcyvre jvgu fyvprf gung qba'g ortva jvgu mreb, naq gb qrfgvangvba neenl
gung yvxrjvfr qbrfa'g. Fb jr tbggn abeznyvmr.
mod6: asciilifeform: thx, will read
mircea_popescu: asciilifeform this sounds like the ugliest of hacks.
asciilifeform: mircea_popescu: it ain't tho.
mircea_popescu: why does ada do that, anyway ?
asciilifeform: because not doing it would lead to increased ugly.
asciilifeform: though i also found it at first difficult to understand why.
mircea_popescu: i realyl don't like this "and now we magic-variable the
numbers". it's one step up from magic constant
asciilifeform: slices are not arrays in their own right, they are offsets into
another array
mircea_popescu: ok...
asciilifeform: and ergo retain the original's indexing.
asciilifeform: so you can get it back from a slice
mircea_popescu: wouldn't it actually be proper to copy the slice into its own
array ?
asciilifeform: no!!!!
asciilifeform: that ain't called a sloce
asciilifeform: *slice
asciilifeform: that's a copy, we do this also sometimes.
mircea_popescu: wouldn't it be actually proper to copy the slice into its own
array and to maintain a pairing of slices and new arrays ; rather trhan do
index magics on the mult code ?
asciilifeform: nope. blows the cache.
asciilifeform: and bloats the algo.
asciilifeform: worst of all worlds.
mircea_popescu: i didn't say practical, i was just going with proper
asciilifeform: seekrit : in the 'most fascist' restriction mode, ada... copies
mircea_popescu: aha
asciilifeform: ( behind the curtain )
mod6: ah.
asciilifeform: (no_implicit_loops pragma iirc)
mod6: i've read, so far seems ok -- i've got to wrap my mind around the second
("high loop") as I did before.
mod6: gotta take it the whiteboard a bit later perhaps.
asciilifeform: upstack, array slices ( which commonlisp also has ) are
important to being rid of having to use c-style pointers
asciilifeform: in much the same way as 'in' parameters (in ada procedures)
mircea_popescu: i am sitting here wondering if this is "getting rid" as in, rid
or rid as in, hid.
asciilifeform: rid.
asciilifeform: in that they are replaced with a far more constrained item
asciilifeform: about which you can prove particulars.
mircea_popescu: what particular can i prove re the relation between an array
slice and the index fixer variable ?
mircea_popescu: ~same as the relation between pointer and its content, "better
hope programmer didn't fuck up ; and also it usually blows up if he did so
there's that"
asciilifeform: wrong
asciilifeform: they get checked against the bounds
asciilifeform: every. time.
mircea_popescu: ah so no overflow
asciilifeform: aha.
mircea_popescu: but can i overflow THE SLICE ?
asciilifeform: nope.
mircea_popescu: wedll that's something.
asciilifeform: slice has own bounds, the correct ones.
mircea_popescu: i see.
asciilifeform: ada is a thing for a reason, i found. hence this entire thread.
mod6: so recently, i've done some multi-d array programming in ada..
asciilifeform: every time, to date, when i bashed head against wall and went
'WAI DOES IT DOOO THAT!1!!1' i ended up repenting
asciilifeform: 'oooh hey turns out, Right Thing'
mircea_popescu: that's encouraging...
asciilifeform: quite possibly i'dve given up long ago if not for this repeated
mod6: all i can say thus far is; stuff seems to be strict.  my code may
compile, but indeed blows up at runtime.
asciilifeform: every single time it was 'guess wat, this is How It Works in the
adult hut. for reasons that Make Sense'...
asciilifeform: mod6: note that 'blow up' still dun mean 'segfault'
mod6: index out of bounds.
mircea_popescu: he means it catches it itself
mod6: or whatever it was.  no did not seem to be a segfault.
mod6: im just dumb.  it seemed to be smarter than i am.
mod6: at least, for nw.
asciilifeform: mod6: you won't physically ever see a segfault in ada proggy
built with default 'fascism' level
asciilifeform: most you'll get is a stop.
Hardwareizeable Bounds Checking, Strict Conformance Enforced on Whole Program


mircea_popescu: for my own curiosity, what's the state of the art re "MINIMAL
cpu design" ? ie, the theory of how many instructions mustg be in a set and why
and per-instruction justification and everything ??
mircea_popescu: you know, the basis of design and documentation.
asciilifeform: this is actually asciilifeform's primary interest re subj
mircea_popescu: im not exactly shocked.
asciilifeform: and answer very very depends on what is required in terms of
mircea_popescu: asciilifeform design does not proceed towards requirement.
mircea_popescu: design proceeds from available.
asciilifeform: upstack -- you can do a great deal with 1 instruction.
asciilifeform: ( as in, 'oisc' )
asciilifeform: there are several known schemes for this.
mircea_popescu: car gets internal combustion engine NOT because "the needs of
the buyer", but because it needs a power plant and that's the better powerplant
available. the needs oif the buyer are welcome to adapt.
mircea_popescu: that's the design flow. automobile, therefore powerplant,
therefore ice.
asciilifeform: the basic tradeoff is, the fewer the moving parts in cpu, the
more constrained is the horse by the switching elements' speed.
asciilifeform: ( consider, elementarily, pipeline vs. none , for instance. )
asciilifeform: or the cost of not having a barrel shifter.
asciilifeform: or a multer. etc
asciilifeform: ( or, on the extreme end of things, not having arithmetic other
than add-one. as scheme chip did. )
mircea_popescu: but the decision of whether to have or not have barrel shifter
is strictly carried on the cost of it.
mircea_popescu: (what is the total cost of this item ? what percentage of that
is this new addition ? what is the output of this item ? what percentage of
that would the new addition produce ? make these two rations equal, you're done
adding parts.)
mircea_popescu: ratios*
asciilifeform: correct. but the answers to these depend SEVERELY on the
substrate. for instance, if your thing lives in a fpga, not filling it up
doesn't make it cycle any faster. so you want to actually use the available
gates, if they can be used productively
asciilifeform: ditto for a die made with particular process -- empty space
doesn't get your money back
mircea_popescu: so the cost will be 0, this is correct.
asciilifeform: ( it can lower thermal output, so still makes sense sometimes to
have empty. )
mircea_popescu: the design of any general purpose item is above, there's no
mircea_popescu: asciilifeform so the cost will be epsilon, 0 from real estate
and epsilon from heat.
asciilifeform: one other gotcha: complexity has a cost.
mircea_popescu: definitely.
mircea_popescu: this is not a gotcha.
asciilifeform: it apparently is a surprise to some people.
asciilifeform: ( largely because they historically were able to externalize the
cost. )
mircea_popescu: the usg not holding up to its side of any bargain it ever made
-- also surprise. to some people.
mircea_popescu: asciilifeform ftr, the "register window" spark thing seems the
height of idiocy, but what do i know.
asciilifeform: mircea_popescu: it was a pretty ordinary thing in '80s
mircea_popescu: leaving aside how "our idea of scalable is to define a number
up to 32 and then you can go from 3 to 32 and this is now scaling" hurr.
asciilifeform not aficionado of sparc specifically. it's a complexityhog.
asciilifeform: mircea_popescu: you can't have infinitely elastic registers.
there's N bits , physically.
asciilifeform: the word is this-wide.
mircea_popescu: you can not call your spec "scalable" while it has magic
numbers in it.
mircea_popescu: this is a fact.
mircea_popescu: magic numbers === friable.
asciilifeform: physical objects all contain immutable 'magic numbers'.
mircea_popescu: asciilifeform at issue is the count of "registger windows" that
can be implemented.
mircea_popescu: not the register width.
asciilifeform: the index into these is a register. having some immutable width.
asciilifeform: the thing being indexed, gets populated ( or not ) exactly like,
e.g., ipv4, or the holes in your pci bus, etc
mircea_popescu: they did this dumb shit whereby passing was done by shared
registers ; every process or w/e could see 8 proper and 8 shared or such.
mircea_popescu: the number of such "register views" aka windows was a
per-processor thing
mircea_popescu: and the sparc designers imagined allowing this to be between x
or y counts as "Scalable"
asciilifeform: and yes it's ridiculous . but they forced themselves into it by
having the window thing at all, is the idea.
mircea_popescu: ie, if you implement 32 register views you're then making a
server cpu whereas if you implement 3 you're thereby making an embeddable cpu
mircea_popescu: asciilifeform this is true, but the fucking correct solution
was to take the bs off not to "fix it". aaanyway
asciilifeform: i mention sparc as a historic item, it is afaik no longer
possible to source it.
mircea_popescu: i don't think it was ever any good.
asciilifeform: ( other than by baking into fpga. which 1) introduces the 'which
fpga, again' problem 2) if you have fpga, big enough for sparc, you can make up
a SANE arch to go in it
asciilifeform: )
mircea_popescu: anyway, there's that thing amateur rocketry kids dfick with,
what was it
mircea_popescu: the raspberri before the raspberri
asciilifeform: ?
mircea_popescu: gimme a sec
mircea_popescu: http://www.rte.se/blog/blogg-modesty-corex/leon3-soft-processor
asciilifeform: fpga only
mircea_popescu: 32 bit thing, has source, vdhl etc.
mircea_popescu: yes.
asciilifeform: never existed as an actual physical chip.
asciilifeform: there's NO shortage of these.
asciilifeform: i have own, even.
asciilifeform: what i was looking for, is actual physical off-the-shelf cpu.
asciilifeform: ( that doesn't rely on closed xilinx 20GB turdchain to fill,
doesn't contain a flash rom, doesn't double as a frying pan )
mircea_popescu: http://gaisler.com/index.php << check them out heh
mircea_popescu: dual-core leon3-ft processor, 200mips, 200mflops.
asciilifeform: looks like golden toilet asicization exists (existed) ?
asciilifeform: unsurprise
asciilifeform: but go and buy.
mircea_popescu: they're all asics, in the metal layer sense used in bitcoin
mining. they deliver.
asciilifeform: yes. but not on open market, is the point.
mircea_popescu: as in buy on amazon ?
asciilifeform: as in buy at digikey or other mainstream supply house .
mircea_popescu: aha. neah, they sell like NSA sells FG.
asciilifeform: ( and if i were producing $box by the million, i wouldn't deal
with these derps and use their weird arch, but have my own asiced. )
mircea_popescu: subject to http://btcbase.org/log/2017-08-02#1692736??
a111: Logged on 2017-08-02 20:04 mircea_popescu: for my own curiosity, what's
the state of the art re "MINIMAL cpu design" ? ie, the theory of how many
instructions mustg be in a set and why and per-instruction justification and
everything ?
asciilifeform: http://btcbase.org/log/2017-06-30#1677807 << see also thread...??
a111: Logged on 2017-06-30 19:42 asciilifeform: in fact, here's a new (afaik)
scheme for tta. an instruction is THREE addresses, X, Y, Z. and it performs Z
:= X xor Y.
mircea_popescu: to revisit a very ancient mp wonderment since his
less-interested days ( http://trilema.com/2010/curiozitate-calculatoristica/ )
: why not ada-on-a-chip ??
asciilifeform: what would that mean
pete_dushenski: in other "we didn't mean to phork ITWASAJOKE",
asciilifeform: ( if mircea_popescu meant a chip-that-checks-bounds. which
existed at various points, e.g. symbolics lineup supported ada natively just as
well as lisps . )
mircea_popescu: no. i mean chip whose instructyion set is ada.
asciilifeform: lol, as in basic interpreter, actually moving the fucking
humanreadable strings around ?
mircea_popescu: not necessarily.
mircea_popescu: as in language-on-a-chip, no interpreter no compiler no linker
no assembler.
mircea_popescu: native code, is ada.
asciilifeform: that'd mean 'shuffling the human strings' necessarily.
mircea_popescu: so i guess -- like old lispm
asciilifeform: which come in variable widths.
asciilifeform: the lispm was pointedly NEVER anything of the kind.
mircea_popescu: asciilifeform ince when the fuck ? use whatever glyphs you want
for the opcodes.
asciilifeform: huamnreadables come in variablewidths, so this doesn't work in
physical reality.
mircea_popescu: humanreadable face on code is a GLYPH. the code is actually
asciilifeform: in the end when you try an' make this, you end up with
essentially the bolix chip.
mircea_popescu: you currentyly know 0f is pop and 0f a9 is pop gs and so on.
mircea_popescu: for the same money you could know 0f is if or whatever the
fuck, ada instruction.
asciilifeform: the addresses are where you diverge from humanreadablelang.
asciilifeform: not the instructions.
mircea_popescu: but i only asked for ada chip in sense of, cpu instruction set
== ada language.
asciilifeform: ada is interesting because 1) all array accesses bounds checked.
you CAN hardwarize this. but also 2) whole program is forced to conform to
strict rules, said conformance can only be evaluated during compilation, and
strictly when taken as whole
asciilifeform: you can't hardwarize 2.
mircea_popescu: but you can in fact make the cpu run the same instruction set
as the language allows ?
asciilifeform cannot rightfully apprehend the confusion that leads to this
mircea_popescu: hm.
asciilifeform: possibly mircea_popescu had read my
http://www.loper-os.org/?p=46 piece. but in re lisps, there are specific
operations that are missing from extant hardware : gc/cons, and
boundscheckedarrayaccess. these are clumsily implemented in software.
mircea_popescu: ok, let's approach it this way : is the point of a "high level
language" strictly to clothe cpu instruction set in glyphs people like, or is
there an actual substantive function to it beyond ux ?
phf: http://btcbase.org/log/2017-08-02#1692636 << neal stephenson at some point
raised half a million dollars on kickstarter to write a realistic computer
simulation/game for sword fighting. his target audience/groupies/support staff
look remarkably similar to the people from the photo in this articles,
including the one lady in renfair getup.??
a111: Logged on 2017-08-02 19:22 mircea_popescu:
 << actually apparently they have the same dumbass on the west coast, too.
mircea_popescu: (in other lulz nobody likely cares about, * Topic for #bolix
is: *** IBM PCjr collectors club )
asciilifeform: lul
mircea_popescu: phf supposedly this was for some charity with kidsd and shit.
asciilifeform: mircea_popescu: there's a substantive function, in
transistor-poor era , to break down high level lang into the type of ops
realistically fittable into silicon
asciilifeform: ops like 'move these 64 bits from this-here-place to
that-there-place' etc
mircea_popescu: my hidden implication being that the traditional reasons to
have the cleave are no longer sound.
asciilifeform: that was the contention of my piece ( linked above )
mircea_popescu: so then why confusion of ideas ?
asciilifeform: but it was written from specific pov of lispm aficionado gripe
-- where's my boundschecked dereference and hardware gc.
asciilifeform: from ada pov only the former is relevant.
asciilifeform: but in neither case does the instr set 'fully correspond to the
language'. in the case of ada in particular, there is a useful thing that
happens ~where whole program~ is examined.
Bounds Checked, Nonproprietary, Statically Compiled, Permits Pointer-free

Code, Auditable Binaries, Standardized, No Runtime 2018-04-12

mircea_popescu: zx2c4 you ever used ada ?
zx2c4: we've also got implementations in Rust and Go
zx2c4: that are userspace based
asciilifeform: zx2c4, mircea_popescu : it is quite trivial to build a kernel
mod with gnat
asciilifeform: ( iirc i posted a cookbook re same, while back )
mircea_popescu: that was my next answer, yes.
zx2c4: ada kernel modules? cool
asciilifeform: ( it is however presently unclear to me why the entire ciphrator
has to live in kernelspace. granted the packet-thrower perhaps must. but why
whole thing. )
mircea_popescu: could you guess, zx2c4 , why we would favour ada for finnicy
work such as crypto libs ?
zx2c4: unlikely that'd make it upstream if i did wireguard that way, but neat
that that's possible
zx2c4: i dont have enough exposure to ada to say for certain. how come?
mircea_popescu: and could you guess WHY it wouldn't make it upstream ? because
ada object-links with c object code np.
mircea_popescu: ima let alf explain why ada.
zx2c4: linus has never been so happy about other languages in the kernel. for
example, he rejected a C++ layer many years ago
asciilifeform: i'ma cheat and cite my own article,
http://www.loper-os.org/?p=1913 : '... in a heavily-restricted subset of the
Ada programming language — the only currently-existing nonproprietary
statically-compiled language which permits fully bounds-checked,
pointerolade-free code and practically-auditable binaries. We will be using
GNAT, which relies on the GCC backend.'
asciilifeform: and add to this, that it has an actual paper standard, and
minimal 'implementation-defined' rubbish (tho sadly not zero)
zx2c4: cool
asciilifeform: and doesn't require a multi-MB runtime.
zx2c4: sounds great
mircea_popescu: zx2c4 the good news is that i am now finally in a position to
explain what EXACTLY is meant by "terrorist" : that feeling in
http://btcbase.org/log/2018-04-12#1797417 when shit keeps coming and coming and
coming up. what is it, if not spiritual terror ????
a111: Logged on 2018-04-12 17:20 zx2c4: you guys have invented lots of things
zx2c4: performance is good?
asciilifeform: there is absolutely no justification for the continued use of c,
aka overflowlang, aka heapabuselang, since... oh, 1985.
mircea_popescu: depends. performance on ACTUAL constanttime items is not so
mircea_popescu: but that's related to how they can't even exist in c.
asciilifeform: zx2c4: performance is difficult to compare; if you remove
various safeguards, you get ~same binary as equiv c proggy would have produced
on same ver of gcc.
asciilifeform: ( gnat , the ada compiler, is based on ordinary gcc )
zx2c4: so most checking is runtime instead of compile time then?
mircea_popescu: actually, most crap is not even permitted. see all the pragmas.
asciilifeform: if you switch the runtime checks on, you get a ~50% speed
penalty in practice, vs 'naked c'
asciilifeform: zx2c4: there is some quite 'fascist' compile-time checking. most
noobs to the lang, spend a week or so getting their proggy to even build.
zx2c4: hah i like that
zx2c4: ill give ada a look. ive long heard about it but never dived in
zx2c4: i need to head out for a bit now
asciilifeform: the use of pointers, for instance, is discouraged, and their
migration between scopes is prohibited
zx2c4: but ill idle in here for a while and will be back in several hours
mircea_popescu: zx2c4 and the good news is, linus permitted ada modules before.
zx2c4: ooo scoped pointers. thats nice
zx2c4: https://github.com/alkhimey/Ada_Kernel_Module_Toolkit
zx2c4: alright, ttyl guys
Bounds Checked, No GC, Compact binaries, Support Major CPU Archs, Written

Standard, Autditable Binary 2018-05-19

Mocky: speaking of plot twists, pretty surprised by the Ada usage. I pictured
usg.DOD-design-by-committee lang commissioned to help build out the
chumpatronic-mass-programmer infrastructure for gov contracts. I guess it's
time to reevaluate my priors.?
asciilifeform: Mocky: funnily enuff, it was resisted ( by lockheed et al, the
whole golden toilet 'industry' ) from ~day1, and is pretty much dead in usgdom
( with respect to new contracts ) , the brass began to succumb to 'use cpp +
massmarket programmertards +
these-here-fancy-auditing-toolz-that-totally-work-we-promise in 1990 or so)
asciilifeform: afaik boeing's passenger craft division is the last major usgdom
holdout where still used
asciilifeform: ( folx-on-the-periphery-of-l1 : might be a good use of coupla
hrs to dredge the logs for 'why ada' material that could point n00bz to, e.g.
http://btcbase.org/log/2017-07-13#1682480 )??
a111: Logged on 2017-07-13 15:16 asciilifeform: the other thing to remember, is
that the win from writing in ada - but not in ada in general, but the style
demonstrated in ffa in particular -- remains even if YOU HAVE NO ACCESS TO GNAT
and gotta compile by hand into asm. because it forces the style of algo that
CAN be safely so expressed - i.e. without presumption of pointerolade
arithmetic, gc, or other cost-externalizing electrosocialisms
asciilifeform: !#s bounds checked
a111: 9 results for "bounds checked",
asciilifeform: ^ a notbad place to start from.
Mocky: i'll have a look at that
asciilifeform: Mocky: it was the one item left standing when asciilifeform went
methodically through list of all known prog langs , and crossed off anything
that didn't : bounds-check, operate free of gc, produce compact binaries for
e.g. microcontrollers, support all major cpu archs , have written standard.
asciilifeform: the closest runner-up contender was standard ml, but it demands
a ~MB-sized runtime , and imposes gc , nobody is ever stuffing it into 32kB.
asciilifeform: ( it also failed on http://btcbase.org/log/2014-08-30#815513
condition )??
a111: Logged on 2014-08-30 01:55 asciilifeform generally believes that
safety-critical code must be written in such a way that auditor can see a tight
correspondence between every line and what machine physically does. note that
this doesn't entail 'use C!' but can also mean different machine.

Add a Comment