Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-11 Thread 'David Chase' via golang-nuts
I'm curious how much experience people have with hand-translation of one language into another. What I find is that for not-too-different languages (e.g., C to Java, or C to Modula-3) I can process about 1000 lines per day. K&R C to ANSI C goes a good deal more quickly. C pointers translated int

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-11 Thread Eric S. Raymond
Thomas Bushnell, BSG : > On Fri, Jan 11, 2019 at 9:33 AM Eric S. Raymond wrote: > > > Thomas Bushnell, BSG : > > > Suppose it has a way, however. Now you have Go code which will have a > > > bounds fault instead of a data leak. That's better, I suppose - the > > > resulting bug is now "the server

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-11 Thread 'Thomas Bushnell, BSG' via golang-nuts
On Fri, Jan 11, 2019 at 9:33 AM Eric S. Raymond wrote: > Thomas Bushnell, BSG : > > Suppose it has a way, however. Now you have Go code which will have a > > bounds fault instead of a data leak. That's better, I suppose - the > > resulting bug is now "the server crashes" instead of "the server ma

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-11 Thread Eric S. Raymond
Jesper Louis Andersen : > On Wed, Jan 9, 2019 at 7:07 PM Eric S. Raymond wrote: > > I agree. The class of old C program I am interested in is, however, > > not generally limited by CPU but by network and (less commonly) disk > > stalls. Again bear in mind that my type examples are NTP and DNS se

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-11 Thread Eric S. Raymond
Jesper Louis Andersen : > This must have been before I started reading this thread, but I know of the > CCured project by George Necula et.al, which is a C-to-C translator: > > https://web.eecs.umich.edu/~weimerw/p/p477-necula.pdf That actually looks pretty interesting. I may try testing on NTPs

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-11 Thread Eric S. Raymond
Thomas Bushnell, BSG : > Suppose it has a way, however. Now you have Go code which will have a > bounds fault instead of a data leak. That's better, I suppose - the > resulting bug is now "the server crashes" instead of "the server maybe > leaks a key". This is an improvement, but a packet-of-death

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-11 Thread Robert Engels
Yes, but then you just got into those performance critical routines and hand code in the bounds checks and remove the automatic checking. Still a lot less work. > On Jan 11, 2019, at 2:50 AM, Nigel Tao wrote: > >> On Fri, Jan 11, 2019 at 5:46 PM Nigel Tao wrote: >>> On Fri, Jan 11, 2019 at 4

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-11 Thread Nigel Tao
On Fri, Jan 11, 2019 at 5:46 PM Nigel Tao wrote: > On Fri, Jan 11, 2019 at 4:22 AM robert engels wrote: > > Again, what is wrong with the bounds checking/memory protection > > library/technique for C I referred you to? Even a decrease in performance > > will probably still be on par or better t

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread Nigel Tao
On Fri, Jan 11, 2019 at 4:22 AM robert engels wrote: > Again, what is wrong with the bounds checking/memory protection > library/technique for C I referred you to? Even a decrease in performance > will probably still be on par or better than the equivalent Go program. Quoting from https://www.d

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread Jesper Louis Andersen
On Thu, Jan 10, 2019 at 9:00 PM Thomas Bushnell, BSG wrote: > > I think the paper you linked is exciting, and actually suggests that the > hard work which needs to be done will solve the problem without a change of > language. This fits my intuition: the things necessary to take advantage of > ty

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread 'Thomas Bushnell, BSG' via golang-nuts
On Thu, Jan 10, 2019 at 10:49 AM Jesper Louis Andersen < jesper.louis.ander...@gmail.com> wrote: > On Thu, Jan 10, 2019 at 7:39 PM Thomas Bushnell, BSG > wrote: > >> >>> The server crashes - that's how we handle "any other exception", as a >> rule. >> >> > I write Erlang for a living. We don't cr

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread Jesper Louis Andersen
On Thu, Jan 10, 2019 at 7:39 PM Thomas Bushnell, BSG wrote: > >> The server crashes - that's how we handle "any other exception", as a > rule. > > I write Erlang for a living. We don't crash a server, ever, on a failure. Unless the failure is persistent :) > > I don't know what you mean by "just

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread robert engels
It was actually a different but related thread about converting C to Go…. the link I sent was https://www.doc.ic.ac.uk/~phjk/BoundsChecking.html > On Jan 10, 2019, at 12:20 PM, Jesper Louis Andersen > wrote: > > This must have been before I

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread 'Thomas Bushnell, BSG' via golang-nuts
> > > * Even if we did this, the bug only turns into a packet of death. A packet >> of death on this scale is of almost the same level of annoyance and chaos. >> (Witness this week's firestorm about an email packet of death on some Cisco >> something or other.) >> >> > I did address this. If each r

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread Jesper Louis Andersen
On Thu, Jan 10, 2019 at 6:26 PM Thomas Bushnell, BSG wrote: > I'm not sure the second one here is right. Heartbleed does not depend on > unitialized memory as far as I can tell. It works to copy whatever lies > after the incoming request buffer back to the attacker. It happens that in > the actua

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread Jesper Louis Andersen
This must have been before I started reading this thread, but I know of the CCured project by George Necula et.al, which is a C-to-C translator: https://web.eecs.umich.edu/~weimerw/p/p477-necula.pdf On Thu, Jan 10, 2019 at 6:22 PM robert engels wrote: > Again, what is wrong with the bounds chec

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread 'Thomas Bushnell, BSG' via golang-nuts
On Thu, Jan 10, 2019 at 8:50 AM Jesper Louis Andersen < jesper.louis.ander...@gmail.com> wrote: > On Wed, Jan 9, 2019 at 7:55 PM 'Thomas Bushnell, BSG' via golang-nuts < > golang-nuts@googlegroups.com> wrote: > >> >> I'm curious about why transpilation would have significantly mitigated >> the Hea

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread robert engels
Again, what is wrong with the bounds checking/memory protection library/technique for C I referred you to? Even a decrease in performance will probably still be on par or better than the equivalent Go program. Much simpler and efficient. > On Jan 10, 2019, at 10:49 AM, Jesper Louis Andersen >

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread Jesper Louis Andersen
On Wed, Jan 9, 2019 at 7:55 PM 'Thomas Bushnell, BSG' via golang-nuts < golang-nuts@googlegroups.com> wrote: > > I'm curious about why transpilation would have significantly mitigated the > Heartbleed bug. > > Heartbleed is a bug which relies on two things: - Failure to do proper bounds checking

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-10 Thread Jesper Louis Andersen
On Wed, Jan 9, 2019 at 7:07 PM Eric S. Raymond wrote: > > I agree. The class of old C program I am interested in is, however, > not generally limited by CPU but by network and (less commonly) disk > stalls. Again bear in mind that my type examples are NTP and DNS service. > A lot of other legac

Re: [go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-09 Thread 'Thomas Bushnell, BSG' via golang-nuts
On Wed, Jan 9, 2019 at 10:07 AM Eric S. Raymond wrote: > > Reasonable people can disagree, but I favor rewriting over > > transpilation, for draining that swamp. > > The problem is that in general nobody *does* rewrite old > infrastructure code. It tends to work just well enough to fester in > p

[go-nuts] Re: Wuffs: a new, memory-safe programming language

2019-01-09 Thread Eric S. Raymond
Nigel Tao : > Spun out of the "C++ 11 to Golang convertor" thread... > > > On Mon, Jan 7, 2019 at 12:27 AM Eric S. Raymond wrote: > > Perry and I have two different target languages in mind. Perry's > > target language is basically a repaired C - type-safe, almost > > upward-compatible. He and