Re: [9fans] Undefined Behaviour in C

2015-11-25 Thread plannine
On Wed, Nov 25, 2015 at 09:25:55AM -0500, Brantley Coile wrote: > unindented consequences Is that a class of Python bugs or an awesome name for a Nerdcore band?

[9fans] Compiling ken-cc on Linux

2015-11-25 Thread Vasudev Kamath
Hi, I'm trying to compile ken-cc from ¹. Its giving me following error cc -c -m32 -g -O -I/home/vasudev/Documents/C_programming/compilers/9-cc/Linux/386/include -I/home/vasudev/Documents/C_programming/compilers/9-cc/include -DLINUX_386 -I../cmd/ 9obj.c In file included from

Re: [9fans] Undefined Behaviour in C

2015-11-25 Thread Ryan Gonzalez
Neither! It's what happens when you run sed 's/^\s*//' on your whole code base, yielding results like (from cmd/yacc.c): void setup(int argc, char *argv[]) { long c, t; int i, j, fd, lev, ty, ytab, *p; int vflag, dflag, stem; char actnm[8], *stemc, *s, dirbuf[128]; Biobuf *fout; ytab = 0; vflag

Re: [9fans] Compiling ken-cc on Linux

2015-11-25 Thread Ryan Gonzalez
See https://bitbucket.org/plan9-from-bell-labs/9-cc/issues/1/problems-building-under-x64-linux for some tips on fixing various errors you may encounter, including this one. (I opened that issue like 8 months ago...) On Wed, Nov 25, 2015 at 11:10 AM, Vasudev Kamath wrote:

Re: [9fans] Compiling ken-cc on Linux

2015-11-25 Thread Vasudev Kamath
Ryan Gonzalez writes: > See > https://bitbucket.org/plan9-from-bell-labs/9-cc/issues/1/problems-building-under-x64-linux > for some tips on fixing various errors you may encounter, including > this one. (I opened that issue like 8 months ago...) Thanks Ryan, I will follow

Re: [9fans] Undefined Behaviour in C

2015-11-25 Thread Prof Brucee
gcc is indeed a very sad tome. The mmap of 0 is disgusting. I like kenc. It just works. My behaviour this afternoon will be undefined but not as stupid as that of some programmers. On 26/11/2015 5:43 AM, "Brantley Coile" wrote: > Align it to column 7 and it looks like all

Re: [9fans] Undefined Behaviour in C

2015-11-25 Thread Brantley Coile
Bruce's law: undefined != stupid Sent from my iPad > On Nov 25, 2015, at 9:04 PM, Prof Brucee wrote: > > gcc is indeed a very sad tome. The mmap of 0 is disgusting. I like kenc. It > just works. My behaviour this afternoon will be undefined but not as stupid > as that

Re: [9fans] Undefined Behaviour in C

2015-11-25 Thread Prof Brucee
I am still fascinated by the VAX architecture manual which designates as "unpredictable" many things with consequences including machine crash. Pissed that I can't get my vaxen to crash or burst into flames. On 26/11/2015 1:46 PM, "Brantley Coile" wrote: > Bruce's law:

Re: [9fans] Undefined Behaviour in C

2015-11-25 Thread Ryan Gonzalez
I remember reading Jack Crenshaw's Let's Build a Compiler. In part 16, he mentioned that compiling an empty C source file on the VAX took 60 seconds and generated a 50K object file. Link (just search for the text "vax"): http://compilers.iecc.com/crenshaw/tutor16.txt (BTW, what exactly do you

Re: [9fans] Undefined Behaviour in C

2015-11-25 Thread Brantley Coile
Align it to column 7 and it looks like all the code I saw when I started. iPhone email > On Nov 25, 2015, at 12:13 PM, Ryan Gonzalez wrote: > > Neither! It's what happens when you run sed 's/^\s*//' on your whole code > base, yielding results like (from cmd/yacc.c): > > >

Re: [9fans] Undefined Behaviour in C

2015-11-25 Thread Steffen Nurpmeso
plann...@sigint.cs.purdue.edu wrote: |On Wed, Nov 25, 2015 at 09:25:55AM -0500, Brantley Coile wrote: |> unindented consequences | |Is that a class of Python bugs or an awesome name for a Nerdcore band? all that new C stuff and sequencing is shit. imho :) --steffen

Re: [9fans] Undefined Behaviour in C

2015-11-25 Thread Bakul Shah
Using 0xfff...f instead of 0 for a null ptr might've been less "disgusting"! > On Nov 25, 2015, at 6:04 PM, Prof Brucee wrote: > > gcc is indeed a very sad tome. The mmap of 0 is disgusting. I like kenc. It > just works. My behaviour this afternoon will be undefined but

[9fans] 9atom, S-ATA hard disk not detected

2015-11-25 Thread Rudolf Sykora
Hello, when trying to install 9atom I get to to the point where I should presumably say that the installation should go to the hard disc, but the only option I see is the usb flash device from which I have run the installation itself. I do not see any sd... under /dev. It's a Samsung HD103Si

Re: [9fans] Undefined Behaviour in C

2015-11-25 Thread Brantley Coile
Just curious, will Linux not panic when the kernel deterrences a nil pointer? Sent from my iPad > On Nov 25, 2015, at 5:27 AM, Alexandru Gheorghe > wrote: > >> On 11/23/2015 01:20 PM, Vasudev Kamath wrote: >> Ramakrishnan Muthukrishnan writes: >>

Re: [9fans] Undefined Behaviour in C

2015-11-25 Thread Alexandru Gheorghe
On 11/23/2015 01:20 PM, Vasudev Kamath wrote: > Ramakrishnan Muthukrishnan writes: > >> Had been reading the SOSP paper: >> >> >> and this blog post that proposes a simpler C: >> > I

Re: [9fans] Undefined Behaviour in C

2015-11-25 Thread Brantley Coile
My apologies for my iPad's spelling correction and my lack of proof reading. Proof reading is impotent. :) I meant "dereference". It's an easy matter to have page zero invalid in both user space and kernel space. Sent from my iPad > On Nov 25, 2015, at 5:43 AM, Brantley Coile

Re: [9fans] Undefined Behaviour in C

2015-11-25 Thread Charles Forsyth
The link to the lwn.net article explains that using mmap the naughty application mapped a page to virtual 0, which was then available in kernel mode in that process, and all they'd need to do is put their own "socket" structure at 0 + offsetof(struct tun_struct, sk). On 25 November 2015 at 10:43,

Re: [9fans] Undefined Behaviour in C

2015-11-25 Thread erik quanstrom
so to answer bwc's question, no.  not always.  On Nov 25, 2015 4:59 AM, Charles Forsyth wrote:The link to the lwn.net article explains that using mmap the naughty application mapped a page to virtual 0, which was then available in kernel mode in that process, and all

Re: [9fans] Undefined Behaviour in C

2015-11-25 Thread Brantley Coile
Insert various complaints about unwise complexities and their unindented consequences here. Just my personal taste, but I didn’t like shared libraries when the Unix world in the 1980’s were copying Window’s DLLs, and could never see the reason for linking the file system and paging system.

Re: [9fans] Undefined Behaviour in C

2015-11-25 Thread Brantley Coile
Dang it! I basically suck at proof reading! unintended consequences! > On Nov 25, 2015, at 9:25 AM, Brantley Coile wrote: > > Insert various complaints about unwise complexities and their unindented > consequences here.