Live data from Hacker News

Let's Build a Compiler

generalproblem.net

1–10 of 48 posts

Re: Let's Build a Compiler

#2
We live in a world were ever PC has at least 2 Gbyte of ram and most CPU's are 64 bits, the section 'Data Representation' begins to explain how 'everything' can be stored in a single 32-bit integer, if we limit integers to 30 bits. What the hack?

Re: Let's Build a Compiler

#3
post #2

We live in a world were ever PC has at least 2 Gbyte of ram and most CPU's are 64 bits, the section 'Data Representation' begins to explain how 'everything' can be stored in a single 32-bit integer, if we limit integers to 30 bits. What the hack?

Keeping values small is still useful for the sake of CPU cache

Re: Let's Build a Compiler

#4
post #2

We live in a world were ever PC has at least 2 Gbyte of ram and most CPU's are 64 bits, the section 'Data Representation' begins to explain how 'everything' can be stored in a single 32-bit integer, if we limit integers to 30 bits. What the hack?

As Bill Gates was alleged to have said "640k ought to be enough for anybody."

Re: Let's Build a Compiler

#5
post #2

We live in a world were ever PC has at least 2 Gbyte of ram and most CPU's are 64 bits, the section 'Data Representation' begins to explain how 'everything' can be stored in a single 32-bit integer, if we limit integers to 30 bits. What the hack?

Yes, RAM is aplenty, lets have every program use it to its fullest :-P

Re: Let's Build a Compiler

#6
post #2

We live in a world were ever PC has at least 2 Gbyte of ram and most CPU's are 64 bits, the section 'Data Representation' begins to explain how 'everything' can be stored in a single 32-bit integer, if we limit integers to 30 bits. What the hack?

Most CPUs are 8-bit with 32-bit beginning to take over. They usually don't have more than 256K.

Re: Let's Build a Compiler

#7
post #2

We live in a world were ever PC has at least 2 Gbyte of ram and most CPU's are 64 bits, the section 'Data Representation' begins to explain how 'everything' can be stored in a single 32-bit integer, if we limit integers to 30 bits. What the hack?

Yes, RAM is aplenty, lets have every program use it to its fullest :-P

Also known as "unused RAM is wasted RAM".

Re: Let's Build a Compiler

#8
post #2

We live in a world were ever PC has at least 2 Gbyte of ram and most CPU's are 64 bits, the section 'Data Representation' begins to explain how 'everything' can be stored in a single 32-bit integer, if we limit integers to 30 bits. What the hack?

Most CPUs are 8-bit with 32-bit beginning to take over. They usually don't have more than 256K.

Most CPUs aren't in self-hosting systems.

Re: Let's Build a Compiler

#9
post #4
post #2

We live in a world were ever PC has at least 2 Gbyte of ram and most CPU's are 64 bits, the section 'Data Representation' begins to explain how 'everything' can be stored in a single 32-bit integer, if we limit integers to 30 bits. What the hack?

As Bill Gates was alleged to have said "640k ought to be enough for anybody."

He did not say that, sorry.

Re: Let's Build a Compiler

#10
post #2

We live in a world were ever PC has at least 2 Gbyte of ram and most CPU's are 64 bits, the section 'Data Representation' begins to explain how 'everything' can be stored in a single 32-bit integer, if we limit integers to 30 bits. What the hack?

https://cr.yp.to/bib/1995/wirth.pdf
Post reply on HN