A History of APL in 50 Functions - jim-jim-jim http://www.jsoftware.com/papers/50/ <comment><AUTHOR> I wonder if array languages will find wider popularity some day with a bit more verbose notation. Take "Array Indexing" (#29):

        {(,⍺)[(⊂⍴⍺)⊥¨⊃∘.,/⍵]}

Or "Inverted Table Index-Of" (#31):

        (⍉↑x⍳¨x) ⍳ (⍉↑x⍳¨y)

These could be written:

        {(reshape lhs)[(enclose shape lhs)
          polynomial each disclose
          outer product reshape reduce rhs]}

        (transpose take x index each x)
          index (transpose take x index each y)

Same terms, just with searchable words instead of symbols. (Don't mind the specific words—I'm not much of an APL user!) It definitely sacrifices some important aspects of APL, but in exchange I think it gains something in terms of accessibility by explicitly writing the pronunciations you might have in your head anyway when reading & writing the symbolic notation. It also encourages extracting reusable named definitions instead of repeatedly writing "idioms".

<comment><USER2> You can assign a name to each of those symbols if you want and have something equivalent to what you just wrote.

tranpose=:⍉

take:=↑

index=:⍳

each=:¨

done, now I can write (⍉↑x⍳¨x) as (transpose take x index each x)

But the entire idea of APL is notation as a tool of thought.

Would you write read your maths as five plus twenty is equals to twenty five or 5 + 20 = 25?

Would you rather read music with it's musical notiation

or quarter note at middle C, quarter note at middle E, etc?

The entire idea of APL is that we read and write algorithms the way we read mathematical and musical notes.

<comment><USER3> That's a pretty good analogy, the 5 + 20 example.

By using abstract symbols, it encourages one to skip the internal verbalization and go straight to the concept. Pretty neat.

But in the article, they use symbols that I don't have on my keyboard. I guess one would learn the combination for such symbols and become fluent to the point that it didn't matter. For example, I don't think of the individual letters when I'm typing.

Although my highschool typing class strongly encouraged doing so. I believe that was more for maintaining a rhythm, however.

<comment><USER4> Earlier this year I took a deep dive into APL (something I'd been meaning to do for a while). With Dyalog APL and the APL mode in emacs, typing these things in is pretty easy and becomes natural if you're already a touch typist.

For instance, iota is just `.i`, rho is `.r`, etc. Some are more natural (like that) others are arbitrary but logically consistent, like take and drop are next to each other on the keyboard.

After a few days I felt like I could type _most_ programs without having to think about where keys were. Admittedly, I've lost it all now since I haven't touched it for a couple months. If I actually stuck with it for more than the 4-6 weeks I did I imagine I wouldn't have lost it so quickly.

<comment><USER5> > APL mode in emacs, typing these things in is pretty easy...iota is just > `.i`, rho is `.r`, etc.

...and iota is just `i and rho is `r in the Dyalog editor. So non-emacs folks can play too.

<comment><USER4> Ah. You're right. I had changed the prefix in Dyalog to match emacs since that's what I'd started with.

</comment></comment></comment></comment></comment></comment><comment><USER6> APL was designed to be taught to non-programmers. Indeed it was taught in some high school maths classrooms.

I have been reading many books and other historical documents on APL from the 1960s/70s/80s and this one I found to be especially interesting:

[http://www.softwarepreservation.org/projects/apl/Papers/Elem...](http://www.softwarepreservation.org/projects/apl/Papers/ElementaryAlgebra)

I would like to thank the HN user who has posted this a couple of times. I am grateful for this resource and reading it sooner rather than later.

Why I found this particular publication unique amongst all the others I have read:

It is many pages before the reader encounters any _programming jargon_. I believe the use of the term "primitives" may be the first slip.

It is possible the reader with absolutely no familiarity with programming would not be alienated by any of the terminology Iverson uses. That is uncommon for an expository text by an author who knows how to program, in my experience as a reader.

Perhaps terminology was carefully chosen with a view to avoiding programming jargon and letting the _symbols_ (notation) and _example input and output_ communicate the concepts.

Here is another question:

Matrix multiplication can play an important role in so-called "AI" or "Machine Learning". For example, Hopfield networks.

The extraordinarily popular Python language, specifically the "NumPy" library, is frequently cited on HN.

How suitable or unsuitable is APL for matrix multiplication and, by extension, "Machine Learning"?

Assuming in each case a programmer competent in her chosen language (i.e. ignoring the competencies of the programmer), which language has faster execution times, Python or APL?

<comment><USER7> > How suitable or unsuitable is APL for matrix multiplication

Matrix-multiply is just plus-dot-times or +.×

> which language has faster execution times, Python or APL?

This is tricky to answer. For most problems, I'd say APL, but this is isn't quite fair.

A competent Python programmer who has made it "as fast as possible" without resorting to extensions will be creamed by a novice APL programmer, so you _need_ to consider third-party modules like NumPy just to compete.

Now NumPy is _very_ well-optimised, but you'll really struggle to do well against k/q[1] an APLish that actually focuses on performance, and if you run into a problem where it doesn't, there are extensions you can use to eke out even more performance.

At this point, you might try using Tensorflow -- which gives Python a great edge -- but are we really programming Python anymore? kdb+ can use Tensorflow as a library as well...

[1]: [http://tech.marksblogg.com/billion-nyc-taxi- kdb.html](http://tech.marksblogg.com/billion-nyc-taxi-kdb.html) fastest non- GPU

<comment><USER8> It's a style difference between "optimized C and ASM kernels wrapped in a slow heavyweight language" and "a very simple interpreter that fits in cache". Circumstances are probably going to drive which approach wins out.

</comment></comment></comment><comment><USER5> For those wishing to learn this mysterious language, Dyalog has an excellent online tutorial at:

[https://tutorial.dyalog.com/](https://tutorial.dyalog.com/)

Using this tool, I was "thinking APL" (at a novice level) in a couple of days.

Dyalog also has a free-for-personal-use 64-bit version.

<comment><USER9> Thanks for the link. Do you know if there is something similar for GNU APL?

Do you think it will be annoying to switch to GNU APL after going through this? I'd rather not spend time learning a proprietary interpreter if there's a viable free software alternative.

EDIT: Have started going through the tutorial using the GNU APL interpreter. I'll see how it goes I guess. 2+5 seems to work the same :)

EDIT 2: akt makes it possible to type the symbols without a special keyboard with GNU APL [https://github.com/TieDyedDevil/akt](https://github.com/TieDyedDevil/akt)

<comment><USER10> For that tutorial the only problem you might run into is multiple statements or recursion in dfns (bracketed functions)

<comment><USER9> Thanks, I'll try and keep an eye out for that.

EDIT: There is a smaller thing I noticed: a function on its own is a syntax error in GNU APL (and they can't be assigned to variables either).

</comment></comment></comment></comment><comment><USER10> Well this is just fucking gorgeous.

<comment><USER11> I was looking for more subtle words, but you are absolutely right. Great work.

</comment></comment><comment><USER12> When reading APL for the first time, how does one determine what the characters mean? E.g, the first example is (+⌿÷≢) x

I can look up the '+' '⌿' '÷' characters at [https://en.wikipedia.org/wiki/APL_syntax_and_symbols](https://en.wikipedia.org/wiki/APL_syntax_and_symbols) but I can't find the "≢)" characters which appear to be the '≢ ' and ')' characters when I copy and paste. However, I see it as '≡' '/)' when rendered. Is that broken Unicode rendering of the slash? I'm guessing this function means something like (divide (reduce sum array) (count array)) but I can't search for that triple equal sign on the Wikipedia page.

<comment><USER5> >how does one determine what the characters mean?

Download (free) Dyalog APL. Mouse-over any character in the editor and a mini- man page pops up.

Or use this cheat sheet:

[http://docs.dyalog.com/16.0/ReferenceCard.pdf](http://docs.dyalog.com/16.0/ReferenceCard.pdf)

</comment></comment><comment><USER13> APL and C were my first languages, but I can't read most of those, it's been too long.

Merrill Lynch's mortgage operation was an IBM APL2 shop with a few dozen programmers, along with people doing non-mortgage stuff.

[http://www.thocp.net/software/languages/apl.htm](http://www.thocp.net/software/languages/apl.htm)

[https://en.wikipedia.org/wiki/APL_(programming_language)#APL...](https://en.wikipedia.org/wiki/APL_\(programming_language\)#APL2)

I remember that people who came from the other dialects, Sharp and STSC, had different ways of doing e.g. nested arrays and calling out to the OS which made their code hard to read.

</comment><comment><USER14> I programmed in APL! When I was doing my masters, I worked with an IBM researcher who had some old code in APL that I had to modify.

It is completely crazy. I originally had a special keyboard with all the symbols: [http://i.imgur.com/8kOZkEX.jpg](http://i.imgur.com/8kOZkEX.jpg)

I needed to print a keyboard mask to put over the keys to remember where to type. After sometime you get used to it, but it is too much overload in your working memory when you are learning it.

The vector operations were really nice and the notation made it succinct, but packages like pandas are far better.

It is impressive how usability were not a factor considered when some languages were developed.

<comment><USER15> Perhaps we should have different keyboards for programming. Traders have Bloomberg terminals. Why shouldn't we have an APL keyboard if we're using that language? If language is a tool of thought, then the input devices reduce time to putting that thought into action.

<comment><USER16> [https://www.dyalog.com/uploads/images/Business/products/uk_r...](https://www.dyalog.com/uploads/images/Business/products/uk_rc.jpg)

</comment></comment></comment><comment><USER6> (Novice k user)

Exercise: Download to a single html page using k3 and curl

cat 1.k

       c:"curl http://jsoftware.com/papers/50/";
       f:("intro";"50_";"chrono";"pers";"fine";"ref";"ack")
       e:".htm;sleep 3"
       a:{,/$(c,:[x=0;f[1],f[0];f[1]],:[x>49;f[x-48]],:[x<10;:[x=0;;0,x];:[x>49;;x]],e)}'!55
       {`4:a[x]}'!55

k 1 > 1.html

firefox file:///1.html

<comment><USER17> A few simplifications:

        c:"curl http://jsoftware.com/papers/50/50_"
        e:".htm;sleep 3"
        f:{("intro";"chrono";"pers";"fine";"ref";"ack";-2#"0",$x)0 50 51 52 53 54?x}
        {`4:c,f[x],e}'!55

The pattern of using find and indexing into a table with a default case is a nice way to get rid of lots of twisty conditionals.

</comment></comment><comment><USER18> My MIT analog circuits course in 1973 used APL. I dont know what they use now.

<comment><USER19> I took the same course! I remember that we had been taught to calculate the voltages and currents for all points in an electrical network as vector algebra operations. Then, for one of our assignments we were expected to just learn APL on our own to write a program to do these calculations. As I recall, it wasn't too difficult using APL.

I believe that we were given or used some sort of IBM manual to learn APL. I just searched my library and found _APL /360 An Interactive Approach_ by Gilman and Rose, 1970[1]. However, APL was most definitely not the focus of the course so I think this was a book I bought a couple of years later in grad school for myself.

We wrote the programs on a fancy version of a teletype machine, made by IBM, called the IBM/360 APL Terminal System. See the photos of the paper based terminal in [2].

[1] [http://www.softwarepreservation.org/projects/apl/Books/Gillm...](http://www.softwarepreservation.org/projects/apl/Books/GillmanAndRose)

[2] [http://thenostalgicgeek.blogspot.com/2013/09/resurrecting- ap...](http://thenostalgicgeek.blogspot.com/2013/09/resurrecting-apl360.html)

</comment></comment><comment><USER20> There's not a single code snippet listed on Wikipedia.

</comment><comment><USER4> [http://www.jsoftware.com/papers/50/](http://www.jsoftware.com/papers/50/)

This link gives you the navigation panel on the left. Makes it a bit easier to peruse.

<comment><USER21> Thanks! We've updated the link from [http://www.jsoftware.com/papers/50/50_intro.htm](http://www.jsoftware.com/papers/50/50_intro.htm).

</comment></comment><comment><USER22> Took me about a minute: click ">>" in the top-right of the page.

edit: Oh.. reloaded and a side nav appeared. Probably just me then.

<comment><USER23> the joys of frameset

<comment><USER24> As if frameset is generally unreliable?

<comment><USER25> Framesets totally break the accessibility of a website. The main website is in one frame, and its navigation in another one. Both frames have different contexts and different URLs.

<comment><USER24> That's only true if screen readers haven't adopted to framesets.

With the popularity of the latter for 20+ years of early web, they're totally fine with them (as they are with tables for layout, and many other things people believe "break accessibility).

</comment></comment></comment></comment></comment><comment><USER26> I have no idea of what APL is, and the thing doesn't even bother explaining it.

<comment><USER27> Why is this downvoted? I had the same problem and I am certain many others faced it too.

<comment><USER28> Substitute e.g. Python or C++ for APL. Do you still think the articly should explain that "C++ is a programming language."

<comment><USER29> It's probably because APL doesn't look anything like your typical PL.

<comment><USER30> Which — once you're acquainted with its existence — is the very thing that makes it instantly recognizable.</comment></comment></comment></comment></comment>


Boeing quietly pulls plug on the 747, closing era of jumbo jets - <AUTHOR> https://www.bloomberg.com/news/articles/2020-07-02/boeing-quietly-pulls-plug-on-the-747-closing-era-of-jumbo-jets <comment><USER3> >>The Covid-19 pandemic threatens to leave their manufacturers scrounging to find buyers for the last jumbos built.

This is imply not true. The last 747s built are freighters. Freight demand is at an all time high due to COVID and constraints on supply chians. Even passenger vehicles are being called into freight service (which is far less efficient yet still economical).

<comment><USER4> I'd love to see some numbers on this. As far as I understand they are used for freight because it's better than to let them sit empty (and pilots and ground staff have to be paid too), but it still is not profitable.

<comment><USER5> A _large_ proportion of worldwide freight is ordinarily carried in the belly of passenger aircraft. When most airlines stopped flying, the price of air freight _quickly_ rose (as the capacity pretty much fell overnight to just the dedicated freighter aircraft). This meant it became profitable (i.e., above the marginal costs of the flights) to fly passenger aircraft purely for the belly-hold freight.

They certainly aren't doing this and making a loss: they're hemorrhaging enough money already that they wouldn't want to add to that, but when the marginal cost is essentially the landing fees minus the parking fees they'd otherwise be paying, plus the additional cost of paying the crew above and beyond any furlough payment, plus the cost of fuel, plus any marginal maintenance cost from the extra cycles.

<comment><USER6> I just watched a video about this, that basically goes over all your points: "Air Cargo's Coronavirus Problem" by Wendover Productions [https://www.youtube.com/watch?v=r2oPk20OHBE](https://www.youtube.com/watch?v=r2oPk20OHBE)

A summary of the video:

\- Passenger flight belly cargo used to be responsible for 25% of air cargo capacity, so capacity is severely reduced.

\- PPE emergency logistics has caused a huge spike in demand, since PPE allocations are currently too volatile for anything except for air cargo. Air cargo prices are high.

\- Government funding for airlines require pilots to remain on salary, so there's no additional marginal cost of labor.

\- The biggest marginal cost of a flight, the cost of fuel, has understandably also become very cheap.

The end result is that even though it's still quite inefficient as compared to dedicated freight planes, the perfect storm of circumstances makes passenger- planes-as-cargo-planes momentarily profitable.

<comment><USER7> Tangent: are there a ton of pilots struggling to remain qualified and well practiced given all the flights not flying?

<comment><USER8> From what I understand, most airlines are rotating the few remaining shifts. This way each pilot gets a couple of flights per month, which is enough to keep their ratings.

That said, since many airlines have completely stopped flying some plane types (particulary the A380 superjumbo), those pilots are going to have a problem soon.

<comment><USER5> AFAIK, some airlines were scheduling _extremely_ few flights of larger aircraft purely to keep currency.

</comment></comment></comment></comment></comment></comment></comment><comment><USER9> Sad day for me; for a plane geek, frequent traveler, son of immigrants, and someone who has been to the factory (incredible - visit the Everett Boeing facility if you get a chance), this is super nostalgic.

The "Queen of the skies" really changed air travel, and I'm a bit sad that they won't be flying much longer. The economics, size and scale of travel were drastically different before the 747. Before the 747, only the richest folks could really cross the globe at will. The 747 changed everyday notions of distance and ushered in the age of travel that we get to enjoy today. This plane shrank the world and allowed for the middle class to explore the world in a way that they never could before.

When my parents came to the US, they came on a 747. Before the 747 they probably would have had to make 5-6 stops, instead of the 2 that they came on.

Crazy enough, the 747 was designed with obsolescence in mind because when it was developed in the 60's, we thought all passenger jets would be flying supersonic... so they made the 747 with this hump to easily convert them into cargo jets (cargo would continue to fly subsonic even though passengers wouldn't).

<comment><USER10> I'm so happy my last flight was on a 747. It's truly stunning if you haven't flown on one before.

I also had the pleasure of visiting the C17 plant in Long Beach. Blew. My. Mind.

<comment><USER11> The first plane I flew on was a 747, so the whole experience was novel. I was 12, and the captain invited me to the flight deck as we were over Greenland.

I think my first and only time on an A380 might be comparable. It was huge! And so spacious, and so quiet. (Lufthansa.)

</comment></comment></comment><comment><USER12> the 747-8F freighter will continue, so the title is misleading. The era is not over, at a maximum closing the era of jumbo passenger jets.

and as points of interest, the hump on the 747 keeps the cockpit out of the way allowing freight to be loaded more easily and completely, and freighters don't mind stopping to refuel (too expensive to carry all that fuel for the whole trip) and that's what makes the 747 continue to make economic sense for freight, while the A380 never did.

<comment><USER13> Don't takeoff/landing cycles on the engines and airframe counteract the fuel savings?

EDIT: Specifically pressurization cycles and metal fatigue, since that's how aircraft lifespan is measured.

<comment><USER14> I wonder if the limiting fact to cargo capacity is weight or volume. If it's weight then perhaps the additional freight offsets those costs rather than saving fuel.

<comment><USER15> IIRC it really depends on the cargo. A very cool example I came across was iPhones being fairly heavy relative to their volume while roses were very light relative to their volume. The solution of the air freight company was to fill their aircraft 50/50 with roses and iPhones so that they were both at their weight limit and at their volume limit.

<comment><USER16> Ingenious on the part of freight company, but roses being transported halfway around the world is an indicator of what's wrong with modern commerce

<comment><USER17> iPhones being transported halfway around the world isn't? In both cases the difference in labor cost is large enough to make the flight profitable.

<comment><USER18> Yes, since roses can be grown almost anywhere, and they are 100s of replacement for a rose.

<comment><USER19> In theory bananas can be grown anywhere, but I believe biology has other things to say.

<comment><USER20> Bananas aren't flown though. They can be grown in many places, it's just the current supply chain for them is most cost-effective.

<comment><USER11> Some bananas certainly are flown, although I don't know the proportion of the total.

They were loaded into a flight I was on from Costa Rica to Paris.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER21> One thing that stands out in TFA is the photo of the cabin mock-up:

[https://assets.bwbx.io/images/users/iqjWHBFdfxIU/ijEVXdL5LsC...](https://assets.bwbx.io/images/users/iqjWHBFdfxIU/ijEVXdL5LsCY/v0/-1x-1.jpg)

What's the biggest difference? No overhead bins! It looks positively roomy in there.

I wonder if the overhead bin model is really the best one -- it feels like a huge bottleneck. Reduces headspace, slows down load in and load out dramatically since it essentially requires that every passenger be able to military press a 20lb+ weight (or have someone else do it).

I'm not sure what a better plan would be though :) Maybe raise the cabin slightly and have the bins be built into the floors below each seat?

<comment><USER22> Hum, expert in here will correct me if I'm wrong, but, beside the bins, over the years, version after version, I feel that airframes actually slowly shrunk.

<comment><USER23> You might feel that way, but that isn't correct.

Over the years, the airlines _have_ reduced seat pitch, and as you can see from the 747 illustration, added an additional seat in the middle section as well.

<comment><USER24> The layout in the picture seems to be 3-4-3, which pretty typical for 747s - <USER2> don't think anyone does 3-5-3.

<comment><USER25> I recently (a few years ago) flew transatlantic on a 3-5-3 747 (Delta).

<comment><USER26> I did a quick look through every 747 layout listed at [https://www.seatguru.com/charts/longhaul_economy.php](https://www.seatguru.com/charts/longhaul_economy.php)

I don't see any 3-5-3s - everyone was a 3-4-3. If anyone was doing it, they've since retired the plane/layout.

</comment></comment></comment></comment></comment></comment><comment><USER27> Such a shame. The best flight I ever took was on an A380. The thing was just so big that turbulence didn't seem to affect it.

Flying on the jumbo jets was always a trip. With Boeing pulling the plug on the 747, it will be long time before anyone makes a double decker again, if ever.

<comment><USER28> I'll never forget my first flight on a 747. DEN to LAX, and for some reason the plane was almost completely empty..maybe 20 passengers. I was way back and was able to absorb the view of almost the entire airframe from the inside. As we neared the end of the takeoff roll and the pilot started to rotate, the wingtips started to raise with the stress on the wings. I've seen this before in other planes of course, but the thing that was odd was that as this continued i could see the walls of the fuselage directly over the wings start to bow inward. Not by much of course, but it was incredibly obvious and interesting.

The next flight was from LAX to MEL and it was completely full. I never thought we were going to get into the air.

<comment><USER29> Even mostly full of passengers, you'll notice short hops like DEN-LAX have noticeably shorter takeoffs. Weight of the fuel for a 747-400 when fully fueled for something like the ass-deadening LAX-MEL and LAX-SYD routes is something like 25% of the plane.

</comment></comment></comment><comment><USER30> As I understand it, 4 engine planes are less economical and are now unnecessary due to the reliability of 2 engine planes. I could see the last 747s serving as great monuments purchased by Billionaires to add to their collections. No 737 Max is going to give you a spiral staircase. I can't help but see this as a problem though, as we converge on a single type of aircraft it moves more and more to winner take all for the design.

<comment><USER31> Two main things as I understand it:

1) The variability of traffic leads to jumbos being underutilized, wasting fuel and capital tied up in such oversized planes, when it's better to have a 787 in use full time more consistently

2) Airlines got tired of having to maintain 4 engines when they could just have 2...

<comment><USER32> Other thing is that 787 and A320 can reliably fill up on "thinner" routes, which siphons off people who would otherwise change at a hub airport onto a jumbo, and filling jumbos was already tricky.

There is a reason the largest operators of A380s and 747s are the ones with absolutely massive hubs; either a legacy European flag carrier, a Middle Eastern mega-hub airline, or an airline handling large amounts of transfer volume from an out-of-the-way place like Australia.

</comment></comment></comment><comment> sjm-lbm I know it's not the most important thing, but I feel that 747s are easily the prettiest passenger airplane in the sky right now.

Going to miss the variety they provided at the airport.

<comment><USER33> Strictly in terms of appearances, I think Antonovs look really nice. Granted, it was rare to see one in a western airport even in the best of times.

<comment><USER34> Just move to Mountain View, California and you can see it every week

<comment> iso8859-1 The An-225 goes to California every week? Why?

<comment><USER35> I don't think the An-225 is the only Antonov.

<comment><USER36> By antonov I'm certain they don't mean the 124...

</comment></comment></comment></comment></comment></comment><comment><USER37> This is really sad. I love both 747 and A380. To me it's still more comfortable to be in the large plane for a long flight. 4 engines are better than 2.

<comment><USER38> The fallacy of the A380 was the hub and spoke model.

Airbus thought people wanted to fly from a small airport to a central airport, to transfer to a A380, then fly to the other side of the world, then transfer to a smaller plane to get to their final airport.

Thus, your trip ended up becoming 3 possible transfers!

This is insane that I can't imagine why the designers didn't think this through.

And airports had to upgrade their facilities in order to handle the increased weight of the jumbo A380. This was a non-starter to begin with.

Boeing correctly realized that people want a direct point-to-point travel, with no transfers in between. Thus, they won out in the next generation airplanes.

But, whatever happened to those Dreamliners anyways? I don't hear much about them anymore.

<comment><USER39> When many airports are restricted by the number or airplane movements (takeoffs and landings), then transporting more passengers requires bigger planes. It was not a stupid plan.

It works well for Emirates, Etihad, Turkish etc. - they fly from everywhere to Dubai, Abu Dhabi, Istanbul resp., and depending on the traffic in big or small planes. So you basically get anywhere with 2 hops.

</comment></comment></comment><comment><USER40> A couple of years ago, I made an international flight with my children. I made sure that one leg of the journey was business class on a 747 on the upper deck. I wanted my children to have had the memory of flying in the most iconic location (upper deck) of the most iconic passenger airplane in history.

If you can get a flight on the 747, I urge you if you are able to, pay the extra and get a seat on the upper deck. It will be one of those things you talk about for years.

<comment><USER24> United used to serve Melbourne by having one of the 747s from the LA/SF to Sydney services continue on to Melbourne. Last time I took it I was the only passenger upstairs on the Sydney→Melbourne leg. Coupled with the performance of a lightly loaded 747 that's only fueled for a ~400 mile flight (fastest I've ever had from takeoff to the 10,000 feet chimes), it was quite an experience (especially since being the only person there means your drink gets refilled rather quickly…)

</comment></comment><comment><USER41> It's a little sad that we've retired the 747, the Concorde, and (almost) the A380. And we haven't introduced anything cool :(

<comment> Tiltowait-- The Concorde was done in by fuel prices, and because it was a small aircraft. I visited one in a museum and it was claustrophobic. Also nobody should be sorry that elites have to sit on long overseas flights just like we do.

The A380 was a boondoggle from the beginning, an attempt to outdo Boeing by having TEH BIGGEREST aircraft on the market. Having to rebuild airports to accommodate it wasn't a good idea.

The 747 is a 1960s design, for Pete's sake. How long were we planning on keeping it around?

<comment><USER42> When I worked in aerospace I was told by a Boeing old-timer that he was sure Boeing only made the 747-700X proposal last as long as it did in order to force Airbus into making the A380 mistake, and that none of the Boeing insiders thought a plane that big would ever make real sense to spend money developing. Naturally I have no way to verify this, but it's a fun corporate strategy conspiracy theory.

<comment><USER5> I don't think there's any question that it was a response to the A380, and it's quite plausible they wouldn't have developed it without the A380. That said, compared with the A380 development the 747-8 will have been cheap to develop, and had an impact on the market as a whole even if it scarcely made much money.

</comment></comment></comment></comment><comment> the-dude In The Netherlands we have an iconic train which must have been inspired by the 747.

[https://www.ns.nl/binaries/_ht_1533730717772/content/assets/...](https://www.ns.nl/binaries/_ht_1533730717772/content/assets/ns- nl/overig/posters/poster-intercity-icmm.pdf)

<comment><USER15> The designers elevated the driver cabin so that it would be possible for passengers to walk underneath it when they coupled multiple trains together into a longer one. Sadly, it turned out the doors for the interlocking mechanism were very error prone so in the end they just welded them shut and you have to go around outside (at a station) if you want to move between trains sets.

<comment> iso8859-1 Weird, intuitively seems like a less fragile approach than a giant diaphragm: [https://en.wikipedia.org/wiki/IC3](https://en.wikipedia.org/wiki/IC3)

<comment><USER15> There was also a telescoping gantry-like contraption that went across. I can see how that is quite fragile mechanically in a moving vehicle with vibrations and everything.

</comment></comment></comment></comment><comment><USER43> Another sign of mankind's technological regression when it comes to flight. First we lost the supersonic airliner, now jumbo jets.

<comment><USER44> Uh, the smaller planes are quite pleasant to fly on. Better cabin pressurization and larger windows. They also allow more long-haul routes.

Besides a 777 is not that much smaller than a 747.

<comment><USER45> Given the damage it causes to the environment, flying should be _less_ comfortable, not _more_.

<comment><USER44> Damage compared to what alternative? If I need to go somewhere as an individual, it's quite a bit more efficient to fly vs. driving. An Airbus A319Neo gets 122 mpg per seat. That's almost 5 times the 2017 average gas mileage for American cars. [2]

[1] [https://en.wikipedia.org/wiki/Fuel_economy_in_aircraft#Short...](https://en.wikipedia.org/wiki/Fuel_economy_in_aircraft#Short- haul_flights)

[2] [https://www.reuters.com/article/us-epa-emissions- autos/u-s-a...](https://www.reuters.com/article/us-epa-emissions-autos/u-s- auto-fleet-hit-record-high-fuel-efficiency-in-2017-idUSKCN1QN23N)

</comment></comment></comment></comment><comment><USER13> > _The 747 notched its last order as a passenger jet in 2017 -- for Air Force > One._

What's the next version going to be then?

<comment><USER46> Probably a 777. It's smaller, but not by a lot. Plus the current AF1 should be in the air for many years still.

<comment><USER47> Maybe... the Secret Service and Military _REALLY_ want a 4 engine plane for AF1 -- remember other than transporting the President it serves as command and control for US armed forces. Losing an engine due to an attack is part of their planning.

They may look at a military conversion if there isn't a civilian airliner available.

<comment><USER48> Hmm, does 4 engines really add to survivability? Looking at recent-ish cases like the 777(?) the Russians shot down over Ukraine or the case in Iran a few years ago, after being hit they go down pretty solidly whether they have 2 or 20 engines.

I guess the one case where 4 engines might be useful is if somebody sneaks up with an IR-guided manpad near an airport. Such a small missile might just take out an engine without breaking up the entire plane.

Then again, in a war if you're operating AF1 anywhere close where hostile missiles are a concern, you're doing something wrong.

</comment></comment></comment></comment><comment><USER49> A friend of mine drives 747-8F freighters for United Parcel Service (UPS).

She trained for the -8F series upgrade at Anchorage. [Via @ethagknight comment]([https://news.ycombinator.com/item?id=23718445](https://news.ycombinator.com/item?id=23718445)) I learned that this is Ted Stevens Airport, a refueling stop for everybody doing air freight from Shenzhen to USA. Apparently they have lots of other operations there, makes sense.

Anyway, 787-F pilots have had a very busy year.

</comment><comment><USER50> The old order changeth to make way for the new: the era of Starships.

</comment><comment><USER51> I really like the 747-8I it is a pretty plane and actually also economic. Widebodys are more comfortable and the upper deck is just awesome. For those who wanna fly with the 747: Book a trip with Deutsche Lufthansa or Korean Air. They both use the newest type and probably will keep them flying for a long time. Passengers is what keep them in them flying :)

</comment><comment><USER52> Wow, the end of an era! The 747 was _the_ workhorse plane for domestic US carriers for quite some time.

<comment><USER53> Certainly a milestone, but if the last 747 is yet to be _produced_ , the last one to fly will still be decades away.

</comment></comment><comment><USER54> [https://archive.is/SNd8N](https://archive.is/SNd8N)

</comment><comment><USER55> What's the failure rate of two engine aircraft versus four engine aircraft? Are they about the same?

<comment><USER56> More engines means more to fail

<comment><USER55> You're correct. I should have been specific. Between the two, are two engine aircraft or four engine aircraft responsible for more deaths? Normalized for number of aircraft/flights over a fixed time period.

<comment><USER44> Modern two engine aircraft are amazingly reliable, but there are rare cases where they have lost both engines. BA Flight 38 crash landed on approach to Heathrow due to ice in the fuel clogging heat exchangers for both engines.

[https://en.wikipedia.org/wiki/Boeing_777#Accidents_and_incid...](https://en.wikipedia.org/wiki/Boeing_777#Accidents_and_incidents)

<comment><USER48> Yes, but would more engines have helped in that case? If that problem stopped both engines, chances are the same problem would have stopped all 4 engines on a 4 engine plane as well.

So you'd need to look at cases where independent failures cause both engines on a twin engine plane to fail. I'd guess those are quite rare.

</comment></comment></comment></comment></comment><comment><USER57> I got to ride on one at least once, but I always wondered what it was like on the upper level.

<comment><USER58> Pretty good. I've been 'upgraded' a number of times on KL691/692 to and from Toronto when I ran a small multinational and shifted every week between Toronto and Amsterdam. The flight on a 747 compared to smaller planes is already much better, and on the upper deck the food; chair and room were several notches above anything else I've experienced on board of aircraft.

</comment></comment><comment><USER59> Does this mean more business for SpaceX' intra-Earth Starship?

</comment><comment><USER60> The 747 is humanity's greatest achievement. Air travel is the confluence of engineering, policy and governance (the heyday of the FAA/NTSB and how we got to the point where air travel is this safe), and the systems engineering that get aircraft, people, and baggage to so many different places. What the Boeing 747, and only the Boeing 747, has is true artistic value, with a profile evoking Botticelli or Rubens.

<comment> Tiltowait-- Artistic value? With the ugly hump?

That hump isn't just physically ugly, it's socially ugly as well. It is where the elites congregate. Anything that diminishes their status relative to our own is a good thing.

<comment><USER60> The hump is where business class usually sits. First class is up in the nose.

<comment><USER61> Though not originally. Upstairs used to be the first class lounge. Over time this generally under-utilized space got changed into business class seating.

(The lounge dates to before business class existed. That said, modern international business class is more comfortable in most ways than first class was at the time.)

</comment></comment></comment></comment><comment><USER62> The last day of 737 will come sometime soon too.

<comment><USER63> The 737 is pretty versatile though. It's limitation is capacity and perhaps range. Range has been improved over the years allowing a lot of medium-range thin-capacity flights. The 737, 777 and 787 combined have eliminated the need for the 747, 757 and 767.

The classics have mostly or entirely been retired, with the most common models being the -700 and -800. The family has enough flexibility to evolve in range without needing a completely new family. The 737 still has its place as the short to medium haul work horse, so I don't see it going anywhere for a long time.

<comment><USER64> > The 737, 777 and 787 combined have eliminated the need for the 747, 757 and > 767.

There are huge demand for A321LR precisely because there is a need for 757-like capacity and range. Granted, when 757 was discontinued the demand wasn't there yet.

<comment><USER63> I suppose I can still see a need for a 757 aircraft. My thinking was that our economy now requires so much travel that a 787 could be mostly filled. There are so many variants of the A320/321 that I can't even keep track.

<comment><USER32> Generally speaking, part of the point to point trend has also been to downsize planes, not only to serve thin markets but to provide higher frequencies so that passengers have choice of when to travel during the day. Plus there's money to be made with premiums on thin markets still, given that the matrix of East Coast - Europe flights is not anywhere close to being full.

</comment></comment></comment></comment></comment><comment><USER65> I would have thought they'd pull the plug on these new jets they had to fake safety compliance for and keep the older, working models that people will actually fly on.

I can't imagine anybody flying on a 737 Max even if the Boeing execs over at the FAA claim it's safe again.

<comment><USER66> This article is about the 747, not the 737. So far as I know, the 747 never had to fake safety compliance in any way.

</comment></comment><comment><USER67> Good riddance- with any luck the post COVID-19 world will be one with less reliance on air travel for the atmosphere's sake. Especially in the numbers that once made airplane designers believe the 747 and A380 could be economically viable.

<comment><USER68> If you need to do air travel, these larger airplanes are better then smaller airplanes per passenger.

<comment><USER67> The lifecycle impact of a 747 is much worse than a 737 or an Embraer 145: [https://escholarship.org/content/qt6m5865v5/qt6m5865v5.pdf](https://escholarship.org/content/qt6m5865v5/qt6m5865v5.pdf)

Regardless of the plane size however, there's no getting around planes depositing pollution in the upper atmosphere is worse than we thought and cannot be thought of in the same way as emissions from a train or power plant: [https://www.newscientist.com/article/2207886-it-turns-out- pl...](https://www.newscientist.com/article/2207886-it-turns-out-planes-are- even-worse-for-the-climate-than-we-thought/)

<comment><USER69> Running an electric train on a transatlantic -- or transpacific -- trip causes an awful lot of environmental degradation, too.

<comment><USER67> I believe the alternative to phasing out air travel isn't finding another mode of transport to replace it but instead asking whether or not in a world with teleconferencing and the internet if it's worth the damage to be physically moving people around.

<comment><USER19> You can't compare teleconferencing with in-person interactions. They aren't the same.</comment></comment></comment></comment></comment></comment>


Why We Don't Skip Photoshop - <AUTHOR> http://jeffcroft.com/blog/2008/jun/04/why-we-dont-skip-photoshop/ Jeff Croft's writeup in response to a recent article by 37Signals' position against the visual mockup.  Jeff cites that this may work for 37Signals because of their simple, established products and because they are not working for a client. <comment><USER2> I'm going to skip Photoshop for an entirely different reason.

All Adobe products gradually became classical bloatware over the past years. One or two minor features, or otherwise just a couple of crappy-buzzword- features and you get a binary twice as bigger as the previous one.

When you realize they are doing that just because they need to improve sales, you feel betrayed. So honestly, today I feel betrayed by Adobe and I'm going to dump Photoshop, Dreamweaver and Acrobat for something else, forever. Amen.

<comment><USER3> I've used every version of Photoshop since 2.5 (thats back in the day before layers existed!), and I've consistently been more happy with each version that comes out.

Often, it's very simple subtle things that improve my workflow, like layer folders or improved styles or non-destructive layers.

<comment><USER4> I think you probably can be classified as a fanboi. I don't mean it in the insulting way; simply you have been using it for so long, that you are used to it totally, and comfortable with it, and any other alternative would be considered non good enough.

People that have been using it just for a while, and used a lot of other tools, can give a more balanced opinion to it.

For me, I have CS2 in my computer, and I almost never use it. Fireworks has been enough for %90 of my needs.

</comment></comment></comment><comment><USER5> For the most part, Mr. Croft and 37signals work in too different arenas (as he points out). Bottom line: if you're designing a webpage, its still ok to start in photoshop. If you're designing an app with buttons and forms, start with HTML/CSS.

<comment><USER6> I think his point is if "You are only designing web apps that your will own and operate or are in a family of web apps that will have a similar look" then it is ok to skip photo shop

<comment><AUTHOR> I agree. I think, like it's been said, that 37Signals is a special case. I believe in the field we all work in, it is wise to assume a graphic mockup as a step in the progress and then carefully decide whether or not it's a neutral step based on the history of projects you've completed. In other words, there is no bottom line.

<comment><USER7> I don't think 37signals is necessarily a special case - there are plenty of customer oriented websites out there that have _a_ look and feel, and don't require client buy-in.

</comment></comment></comment></comment><comment><USER8> On the app side, I'm not sure if HTML/CSS always wins.

Between Yahoo's stencils (and some of my own), I can get some clear ideas in play that look like a web page in Photoshop in an hour or two, assuming I don't get tempted by pixel-perfection. This is slower than sketching, but I think just about always causes the audience to consider the prototype more thoroughly, uncovering problems and potential that a sketch usually won't.

Rails is fast, but it's still cheaper to tweak a Photoshop doc with your team looking over your shoulder.

<comment><USER9> Yes, I totally agree with this. I typically use Illustrator instead of Photoshop, just because I think it's easier to mock things up quickly and make edits quickly.

I will usually get to a stable design, and then bring the whole team in and put the design up on the projector. We then discuss, critique, and dissect the design. The whole time, I can rapidly make new versions and forks of the design based on suggestions. This is just something that you can't do in HTML/CSS, at least not in realtime.

There's just something about HTML/CSS that constrains you to think in a box. With Illustrator or some other design tool, it's easier to get your ideas out. For me, getting to a pixel perfect design after planning in Illustrator is trivial.

The hard part is getting the actual design down.

I think this whole thread has too many hackers that are either scared of using design tools like Photoshop, against them because they are expensive or bloated, or deem them unnecessary because HTML/CSS is "good enough". I guarantee you that I'm able to iterate on designs faster and more efficiently using design tools rather than hand coding.

</comment></comment><comment><USER10> Everybody has a a different creative process, and the only important metric to judge it by is: does it work for you, and does it work in the context of your team members?

the easiest way to stumble into a wrong approach is to blindly adopt somebody else's approach without tailoring it to the particulars of how YOU work and think.

</comment><comment><USER11> Why I voted this up: because the author suggests that there is not just one correct way to do something. Which is not what 37signals usually suggests.

<comment><USER3> Compelling writing often forces one to take a strong position.

<comment><USER11> Agreed. My point is just that 37signals doesn't have to go as far as they do. A somewhat milder position would aid their message.

<comment><USER12> Actually it almost certainly wouldn't, unless you mean specifically for you.

They're constantly in the press, they generate conversations on sites like this, and they've spawned a legion of (number)(noun) imitators. It's one of the basic principles of copywriting and social media marketing that it pays to be bold and occasionally controversial.

<comment><USER11> Pissing people off garners attention, sure. I'm not sure it's good business in the long run, though.

<comment><USER13> Um, they're proving otherwise. They've pissed off a whole boatload of people, and their customer based is still growing.

It's that old, "it nobody hates you, you aren't doing anything worthwhile".

<comment><USER11> Or, maybe their bullshit hasn't caught up with them yet.</comment></comment></comment></comment></comment></comment></comment>


GitHub got a new design - <AUTHOR> https://github.com/explore <comment><USER2> And, if one uses Firefox's ability to "scale text only" to zoom fonts to a more readable size for older eyes, the fixed pixel widths and heights on their grid boxes results in a _very_ bad layout of the content.

[http://postimg.org/image/zbc6qbrl7/](http://postimg.org/image/zbc6qbrl7/)</comment>


Project Euler - <AUTHOR> http://projecteuler.net/ <comment><USER2> The best technical interview I ever had involved picking a random Project Euler problem in the hundreds and pair-programming our way through it. The CTO wrote his version in Python and I worked in Perl . . . he was astounded mine ran 8x faster.

The same company also had regular hack night where everyone drinks a lot of Tecate, agress on a Project Euler problem and a language no one knows, and races. Fun times.

<comment><USER3> When I was conducting quantitative interviews I ended up doing the same thing. One of my favorite problems to give was 267 ([http://projecteuler.net/problem=267](http://projecteuler.net/problem=267)). It has a few "aha" moments but also requires coding to get it done.

<comment><USER4> Is there a list with Project Euler problems that focus less on number theory like this one?

<comment><USER5> You might like Rosalind ([http://rosalind.info/](http://rosalind.info/)). It's like Project Euler, but with a strong bioinformatics (espeically) genetics slant. There is certainly math, especially combinatrics (for obvious reasons), but much more so that Euler there is background given in the problems, so it's often much more about coding a reasonable implementation than about knowing some obscure corner of number theory.

</comment></comment></comment></comment><comment><USER6> I can't adequately express how great of a resource Project Euler is to someone learning about programming.

The way I learned to code was working my way through Project Euler problems in Python, eventually getting to a score of about 55 before I was at the point where I decided to try making "real" programs like Android apps.

When you learn to code people tell you that X or Y is bad for performance, and you should do A or B instead. The problem is that most beginner-type programs run in a few milliseconds and there is no way to see the performance either way. When you're doing a PE problem, a performance tweak can change your answer from a 1-minute runtime to a 1-second runtime. That's something anyone can appreciate, and it lets you experiment with performance on interesting math problems.

Another advantage of Project Euler is it makes you realize just how powerful a computer can be in the right hands. These are problems that nobody in their right mind would try to solve by hand, but they're so tractable with programming knowledge. That was a very exciting realization to me and it pushed me towards a career in software.

<comment><USER7> I've been using Euler to learn Python too. It's been so much fun that I kept going. Now I wonder if I should switch again.

</comment></comment><comment><USER8> I love project euler, but I've come to the realization that its purpose is to beat programmers soundly about the head and neck with a big math stick. At work last week, we were working on project euler at lunch, and had the one CS PhD in our midst not jumped up and explained the chinese remainder theorem to us, we wouldn't have had a chance.

<comment><USER9> I feel the same way. It was presented to me as a great way to learn new programming languages. But really it's challenging your ability to design algorithms, and overwhelmingly mathematics-related algorithms. (I'm not saying the site itself claims anything different).

It doesn't heavily challenge you to advance past a most basic level of a programming language. For example, most Project Euler problems are solved in Java most efficiently by using the features of Java that map 1:1 to features in C. You could do pretty much the entire suite of problems without even understanding the motivation of a language like Java.

I did find it better as a tool for learning functional programming languages (like Haskell) however, perhaps unsurprisingly.

<comment><USER10> What we need now is more focus towards females. Men are already sufficiently saturated in the maths/CS fields. What we need is to market the idea of maths as fun to more females.

<comment><USER11> As a female math grad and CS postgrad, I would like to say firstly that you have successfully trolled me. I do hereby take your bait.

Now for the points I would like to make, primarily for the benefit of the few who _actually_ think as you claim to think:

Women are actually similar to men in a number of novel ways.

We have eyes, and those eyes are intricately connected to very powerful and compact organic computers—capable of independent thought—called brains.

That's right, men and women can both have brains.

And those of us women fortunate enough to be blessed with brains are quite capable not only of independent thoughts, but even decision-making. And yet another way in which we women are similar to men is that each of us, as individuals, comes to have certain aptitudes, preferences and values.

Some of us, like myself, discover to their amazement that they can understand mathematics and even think mathematically about pretty much anything, and develop an interest in technology and computation because of the possibilities it opens up for mathematics and because of the ways mathematics can reflexively provide insights into computer science and programming.

Other women have an aptitude/preference for: polishing nails; answering telephones; designing cute little things that men can give to women at Christmas; and so on. Are women like myself a minority? Perhaps, but it isn't because we have to be shown things like maths and programming with striking adverts, responsive websites and pretty flyers.

I'm not going to pretend that society has been engineered into a patriarchy, over thousands of years, as part of a sinister plot by the Illuminati to preclude the success and independence of the children of the mother-goddess.

I'm likewise not going to pretend to think that there are men with power who purposefully keep women from rising up, or give preferential treatment to male candidates for scholarships/whatever without even realising it. Because ultimately I have no proof of such things and neither do I care about some male-dominant society, because in my experience, what matters is the talent; if you have it, if you have an original idea, a way how to implement it, or if you're simply the best at what you do, you will succeed if you want to, male or female. I do not care why my boss, my clients or my investors choose me, I just want the opportunity to do what I do best, what I like doing.

If you think women simply haven't been exposed to the magical and fun possibilities of mathematics and computers, think again. If women were ignorant to these fields and what they involve, they wouldn't laugh at you for being a "nerd" or date muscular/rich guys instead of you.

They know what maths is, and they know what programming is, and they'll never want to visit a forum and tell everyone how awesome it was when they elegantly solved some mathematical problems or came up with a new proof for some random theorem. They will on the contrary yearn to talk about shoes, interior design, literature, art, perfume, TV shows, movies, diets and so on.

The select few women who prefer mathematics/compsci and find it genuinely fun and inspiring were already posting on newsgroups, were already on IRC, were already subscribed to ars technica and slashdot on google reader, were already here; and they are already here; or they will be here in the future, or wherever else that such subjects can be discussed in the future.

It is not a case of marketing the idea to a mass of women who have no idea what makes their iPhone so useful, or how their cars' brakes are engineered. Women do not go to fashion forums and tell everyone about how much I wish I could expose men to the glories of haute couture. Women do not tell their nutritionists how much they wish they could entice their male friends with raw food diets and veganism.

There are the lost, unwashed masses who will never amount to anything, who will become a carbon copy of their parents and aspire to nothing beyond some repetition-of-basic-tasks job in an office or in retail, and the members of these masses are of both genders. You will fail to "market" math/compsci to these people, regardless of gender, because they cannot do it. Women who aspire to something and want to succeed do not generally want to do it with math and programming.

So, to all of you who think women need to have math/compsci marketed to them: kindly stop talking crap and just ignore the gender issue. It doesn't do you any credit. Women are here. We don't typically scream that we're women because why should we? We're just professionals or students trying to succeed and learn, no different to you gents.

If you want to encourage women to get into math/compsci, have a daughter and buy her a cheap laptop and "The C Programming Language" when she's young. If she takes to it, bang, she had an aptitude that would have gone unnoticed and you saved her from a life of instagram and film studies.

If she deletes some system folders she doesn't think she needs, watches make- up tutorials on youtube and checks facebook every 2 hours, you know you've got yourself a typical woman.

Protip: I don't think the statistics of how many women study math/compsci will be much different in the aforementioned compsci-introduced generation of daughters.

<comment><USER12> Seems like you're promoting some myths as well.

Kids don't magically decide that math or science or computer programming is fun. They're heavily influenced by what they're exposed to and what they see other people they respect doing. Yes, that's "marketing" or perhaps better call it education.

And no, giving a kid the "C programming language" isn't going to cut it unless they've previously had enough exposure to math or engineering to understand why it's interesting. (Based on what I've heard, Minecraft seems to be working a lot better.)

<comment><USER11> Okay, perhaps I am being subjective. I got into this stuff on my own, maybe exposure makes a difference for some. But let's face it, there's no objective reason why math/compsci/engineering should be interesting even after you understand it. It's not like you can just explain it _x_ many times and suddenly a girl will be like "wow it's so amazing and deep and clever." You and I may appreciate it, but can you say why? Can you give me the fundamental reason why it should be interesting as a matter of fact? Besides, we're in the 21st century. Girls can expose themselves to whatever they want. I don't think programming and calculus are terribly obscure.

<comment><USER12> I'm not sure calculus is a great example for your argument. How many kids do you think would actually learn calculus on their own? It's something that most kids think is way beyond them and they don't even know what it is (other than a kind of math) until they actually study it in school.

And that's a standard subject taught in high school. I think if instead you look at why kids learn music or art or dance or drama or sports or a foreign language or religion, you'll find that the parents and relatives and friends often (not always) have a lot to do with it. And even with parental support, often the kids decide it's not for them. And that's fine; at least they got the chance.

I don't see computer programming as being all that different; not every kid is going to be into any given activity, but if they're not exposed to it in a way that makes it seem interesting, that's going to drastically reduce the number of kids who even try it. And that exposure is going to vary pretty dramatically depending on where you grew up.

</comment></comment></comment></comment></comment></comment></comment><comment><USER13> I was really into Project Euler when I had a job where I didn't have to do anything. I've solved 122 problems. Now I work for myself and don't have the time, as well I solved all I was able to solve. I last solved a problem in 2009 I think.

It's fun, I encourage everybody to do a few. Get past the easy ones at least.

</comment><comment><USER14> To be honest, I'm shocked this is on the front page as this website has been out for years and already notably mentioned, but I guess it's good to recycle very important websites for those who haven't heard of it.

My favorite problems is 98. This problem, along with the Sudoku one at 96, require much more careful programming than some of the others due the drastically fewer number of people who solved it compared to the surrounding problems.

<comment><USER15> You may have inadvertently reversed the arrow of causality there :)

</comment></comment><comment><USER16> Another good one for (more general) programming problems is Programming Praxis: [http://programmingpraxis.com/](http://programmingpraxis.com/)

</comment><comment><USER17> I love project Euler. A nice way to improve programming skills in a new language is to go through others solutions in the same language after you solved a problem. This allows to break bad habits. Say you are a C programmer learning Ruby or Lisp, 'C-ish' approach will often seem the most straightforward, but will rarely be optimal and idiomatic in the new language you are learning.

</comment><comment><USER18> A dozen Project Euler solutions in a given language can be an excellent pre- interview candidate screening technique. Quite simple to check for plagiarism too, within reason.

<comment><USER19> _A dozen_? Perhaps a dozen of the easiest ones that one can do in a few minutes, but even so it seems like a lot of work for a pre-interview screening. But many Project Euler problems require a great deal of thought and are mostly testing mathematical prowess.

How much work are you comfortable making your candidates do before they even know whether they're getting an interview?

<comment><USER18> Yep sure, I'd expect any competent programmer to be able to bash out the first dozen without it being too onerous. Think of it as FizzBuzz-on-steroids. Remember this is only a screen, and it's something many programmers would find to be fun anyway!

<comment><USER20> Our time is still finite, especially when we are in job hunt mode. One party should not expect the other party to invest a lot of time in the process without doing so themselves.

I'm particularly sore because I spent a bunch of time working on learning something domain-specific for a potential employer who verbally indicated the interview process would be proceeding, but then forgot to tell me for a week they had decided to end the process.

<comment><USER18> That's why I like Euler for this, there's no possibility that someone is trying to get some free work out of you.

<comment><USER20> It's not the "free work," it's asking the candidate to make a large time commitment that she cannot use for pursuing other job opportunities.

<comment><USER21> > a large time commitment

No. Solving the first 12 PE problems should not take a competent programmer more than 30 minutes.

<comment><USER19> Well, I just did it. It took me about 35 minutes. I am terribly, terribly old (43 years) but I'm pretty sure I am a more than competent programmer and I have a very strong mathematical background. I was working on a laptop but a reasonably decent one, in an environment less distraction-free than an interview room but still not bad. I didn't particularly go all-out for maximum speed but wasn't gratuitously slothful.

I (deliberately) didn't use a programming language with, e.g., facilities for prime factorization built in; that would have made it much quicker but would also have made the whole thing useless as a programming test. So I had to implement the sieve of Eratosthenes, the number-of-divisors function (via prime factorization), etc.

I estimate that about 8 minutes of that time was the result of a couple of silly bugs. (It's surprising how many seconds one can lose to forgetting that 16 is less than 20.) That figure could easily have been zero or twice as much. I lost perhaps two minutes to spousal distraction.

These are all straightforward problems; in no case did I have to spend more than a few seconds thinking how to proceed, though in a couple of cases my response to having written buggy code was to replace it with something more simple-minded.

 _recursive_ , I invite you to actually sit down and implement solutions to the first 12 PE problems in, say, Python or Ruby or some similar language and tell us how comfortably under 30 minutes you come in. For the avoidance of doubt, I'm not at all saying you won't manage it -- I wasn't far off and you may very well be quicker than me. But I'll be surprised if you're so far ahead that after the exercise you still think every competent programmer should finish in at most 30 minutes.

(My rough timings for the 12 problems, in order, in minutes: 1, 1.5, 1.5, 1, 3, 1, 3, 2, 1, 4, 5, 10. These figures include bugfixing and checking against the PE site. Total lines of code: about 115.)

<comment><USER21> I had almost the same exact result as you. It did take me a little over 30 minutes. I finished with 125 lines.

Duly chastened, I take it back. But if the numbers were changed to 8 problems, and 1 hour, I still don't think that's unreasonable.

</comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER22> I solved about 80 of them, then my interest waned a little. But I wonder, are there any hints or recommended reading for the harder ones? Some of them I have no idea how to even start working on..

<comment><USER23> > Some of them I have no idea how to even start working on

Do you have an example of such a problem?

<comment><USER22> I am sorry, it's like 5 years back when I did it, and I don't remember (nor I am inclined in pursuing it further). (I didn't gave up because it became impossible, I just became less interested.)

But lot of those harder ones - as far as I can tell - required pretty deep knowledge of number theory, which even though I studied math (10 years ago), didn't have. I think it would be nice if there was sometimes a hint about what the people should study to be able to solve it.

</comment></comment></comment><comment><USER24> There's only one problem for me with Project Euler. Eventually, the problems become more about coming up with the mathematical algorithm you need to solve it.

That may be what you want. However, a lot of these are outside my math knowledge/ability, without really expanding my programming ability.

<comment><USER18> In many of them, the naive solution is intractable in terms of time or memory, so some programming skill is required.

<comment><USER24> This is definitely true. Finding the non-naive solution is still more of a math exercise, though.

I've spent a lot of time reading wikipedia articles for algorithms that I don't understand trying to solve some these problems.

<comment><USER25> I agree. I think the "hard" (and some of the "medium") challenges on codeeval.com are much better in terms of requiring coding ability vs requiring math ability. Math ability won't hurt, but it won't get you quite all the way there.

</comment></comment></comment></comment><comment><USER26> A lot of good links to similar sites in this comment thread.

I enjoy Project Euler, but as with many people slowly got annoyed by lack of specific mathematical knowledge as opposed to programming. One thing I believe would really help with this would be a resource that discussed the problem in the abstract. As an example, for most of the programs that rely on using primes, whether it be iterating them (e.g. first 1M primes) or the unique prime factorization of a number, discuss the known algorithms in pseudocode. Perhaps this is a bit much, as I would be satisfied with just knowing the words I need to go find resources for myself. This is what I tend to do anyway after I have taken a fair stab at a problem: "Oh, I'm doing prime factorization. I wonder if there are better algorithms than I have used." Indeed, one resource for this is the forums that are made available after the problem is solved.

Some might see this as ruining the fun, but I would personally have more fun and solve more problems if this was available.

</comment><comment><USER27> In my opinion it may be better to do practice SRMs/Codeforces contests instead of project Euler. Topcoder rank imo tends to mean more, since it is timed. If someone says "I solved x problems on site X" you can't say if he done it in days or weeks of effort. If someone says he's red on topcoder you can say he's awesome.

</comment><comment><USER28> Project Euler is great but as others here have said it is very math focused. Can anyone share other programming challenge sites? I saw one the other day here on HN in a comment but can't find it again. The only thing I remember is the problem I checked out was a kind of AI / pathfinding for a "floor cleaning robot" and code was submitted directly in the page.

[Edit] Just found it going through my history: [https://www.hackerrank.com/](https://www.hackerrank.com/)

<comment><USER29> The UVA Online Judge [1] is one of the largest and oldest programming competition sites on the web. They have a _huge_ library with problems in pretty much any CS area. However it can be a little overwhelming at first, so is better to use UHunt [2], which categorizes problems according to difficulty _and_ area, such as Data Structures, Computational Geometry, String Manipulation, etc.

[1] [http://uva.onlinejudge.org/index.php](http://uva.onlinejudge.org/index.php) [2] [http://uhunt.felix-halim.net/id/339](http://uhunt.felix-halim.net/id/339)

</comment></comment><comment><USER30> Problem that has been solved by the smallest number of people (31): [http://projecteuler.net/problem=453](http://projecteuler.net/problem=453)

<comment><USER31> It also was added just recently (relatively). So not necessarily it's the hardest one.

<comment><USER32> Back when I was working on PE problems, I had a spreadsheet of the problems and I'd sort them by the ratio of solvers to solvers of the preceding problem. It's a handy way to find the low hanging fruit and partially eliminates the recency factor.

</comment></comment></comment><comment><USER33> If you are not challenged by these problems, here is an alternative that I found considerably more difficult:

[http://www.spoj.com/](http://www.spoj.com/)

</comment><comment><USER34> I'm trying to go through this with Ruby right now and having a lot of fun. Being a bit rusty on basic algorithms and higher algebra has not helped much, though.

</comment><comment><USER35> Tangentially related: I made a pseudo-terminal web interface to Project Euler called CodeBot[1]. You can view problems, submit solutions, and do much more (some *nix commands work) in your browser. Its even open-source[2] on GitHub

[1]: [http://codebot.sdslabs.co.in/](http://codebot.sdslabs.co.in/)

[2]: [http://github.com/sdslabs/codebot](http://github.com/sdslabs/codebot)

</comment><comment><USER36> These are a lot of fun to do, especially in a new language you want to play with. However they are as much an exercise of your math skills (mostly basic number theory and combinatorics) as programming. One thing I'd suggest is that you pick an algorithm reference and stick with it, if you google anything too specific you will come across one of the many sites where people have blogged about thier solutions.

</comment><comment><USER37> I always love this site for when things get a little slow and I think I could use some relaxation.

Then I remember that I only took a little bit of math, so then there's the research, the papers to read and decipher, the code to write, and I finally solve the problem and swear I'll never come back.

So, yeah, I just finished a batch of problems last week so I could get a couple of ego badges just within reach. 75 down, 379 to go!

</comment><comment><USER38> I always liked this set of challenges/riddles, though it is directed at Python specifically. I appreciated that it forced you to deal with some Internet- related programming tools and concepts.

[http://www.pythonchallenge.com/](http://www.pythonchallenge.com/)

</comment><comment><USER31> Project Euler is great. Another one, but more algorithm and CS oriented: hackerrank.com

<comment><USER39> Hackerrank is great. Thanks for sharing!

</comment></comment><comment><USER40> For those interested I keep a list of these sorts of things at [https://github.com/technoskald/coding- entertainment](https://github.com/technoskald/coding-entertainment).

</comment><comment><USER41> This site is great fun to tinker with a new programming language.

<comment><USER42> I learned Python on this site. Started from the beginning until I had to start skipping a few.

</comment></comment><comment><USER43> The best and worst thing about project Euler is the binary feedback they give you: either you pass or you fail.

On the one hand, it is a good lesson in how hard it can be to write correct code.

On the other hand, real world problems aren't black boxes where you try an integer until you get the right one. Problems with multiple tests needed to pass (like topcoder) are much more realistic.

</comment><comment><USER11> Weird, I was just talking about this earlier when someone asked for productive activity on train journeys to/from work.

I used to do these problems years ago when I was still a student and later when commuting to London. I did as many as I could on paper before trying to program solutions. I'll have to log in sometime and finish the few I missed.

<comment><AUTHOR> really weird. I saw that post and your reply too when I was browsing the 'new' section after posting this.

</comment></comment><comment><USER44> Here's a little side project I've been working on for a few months: [https://github.com/seaneshbaugh/rosetta- euler/](https://github.com/seaneshbaugh/rosetta-euler/)

I've been a little busy lately so it's been neglected somewhat. Why is Prolog so hard?

</comment><comment><USER45> I used it to learn the basics of F# and solving algorithms using a functional approach.

</comment><comment><USER46> How does it work? Do you submit code or just input your answer as a number?

<comment><USER47> Input your answer as number. There are people who solve problems by hand.

</comment></comment><comment><USER48> Learning haskell with ProjectEuler right now. It's great and after solving it, one can always look up the forums and improve the own code or learn different ways to implement the solution!

</comment><comment><USER46> How does a site this old get so many upvotes? whatever, I guess it's worth bringing back into the collective consciousness.

</comment><comment><USER49> I love it, although I found I lack math knowledge to really be good at it.

I enjoyed solving a few of those problems using SQL, that was fun.

</comment><comment><USER50> If I see a github with 30+ solved Project Euler problems, 99% chance it becomes a hire.

</comment><comment><USER51> On CodeEval.com we have over 126+ executable programming challenges in 18 languages :)

<comment><USER52> Yeah! i tried some challenges in CodeEval and they're all cool!

</comment></comment><comment><USER53> more like this: [http://pineapple.io/resources/tagged/challenges](http://pineapple.io/resources/tagged/challenges)

</comment><comment><USER54> I will start this with python.

<comment><USER55> Even though I know python fairly decently, I found working on Project Euler problems improved my Python skills a lot - in particular, I had not had much awareness, nor need for the 'yield' command, but I ended up using it a lot on PE problems.</comment></comment>


Ask YC: What do you use for outbound email sending? - <AUTHOR>

I need to send out automated emails to users (e.g. invitations, share notices, etc.) and want to guarantee that recipients don't receive them in their spam folder.
I can minimize by utilizing SPF/DK/DKIM but it's not a guarantee.  Services like Port25 that specialize in outbound MTA is quite expensive.
What do you guys use/suggest? <comment><USER2> First of all, I'd advice NOT doing it yourself. (sorry epi0Bauqu).

Spammers ruined email and it can now be pretty hard to pass some spam filters. Of course, 95% of your emails will make it through if you do it yourself, but the last few % can be hard to get.

I recently started sending through Fastmail.fm for our website and it's been working fine. I simply setup sSmtp on our servers and everything that is sent through Sendmail is now relayed through Fastmail.

Another company I've considered is authsmtp.com. I haven't tried them, but their pricing seems to be very reasonable. The reason I didn't go with them is that I already had a Fastmail account (and I hate paying twice for the same thing ;-) )

We did Gmail before, but setuping Postfix to relay through them can be a major pain (mainly because of the way they authenticate). Fastmail (and I assume authsmtp) was a no-brainer.

Another thing that will help delivery tremendously is SPF. Make sure to set it properly (with hard fail if possible, ie: -all).

Good luck!

<comment><AUTHOR> How many outbound emails does FM allow?

EDIT: Looks like for the Enhanced service, they allow 2000 messages per hour. Cost $40/year.

<http://www.fastmail.fm/pages/fastmail/docs/pricingtbl.html>

EDIT2: Looks like that's inbound :(

<comment><AUTHOR> Just confirmed with FM: that's 2000 messages inbound and outbound per hour. Awesome!

</comment></comment></comment><comment><USER3> I would advise doing it yourself. It isn't that hard, and assuming email is an integral part of your service, I wouldn't trust anyone else with it.

In terms of specifics, I like qmail. In terms of spam management, there are lots of things to do. First and foremost, have daily monitors on all the major email providers. Get on all their feedback loops. I've found that contacting them with problems is annoying, but does work if you are following all their guidelines and are persistent about it.

<comment><USER4> Doing it yourself is hard, especially if you want any hope of getting past the major email providers spam filters. We deal with this every day.

Current stats say that our % of users who have signed up that make it through email confirmation step is about 22%.

Around 33% or so of our signups have yahoo.com addresses, and only about 12% of those manage email confirmation.

It is similarly bad for hotmail. GMail used to be quite good, but has slowly gotten worse over time.

I'd be very curious to know if others are measuring these things, and how you are doing. Feel free to contact me directly as well.

<comment><USER5> That sounds unreasonably low. You might have a different problem than just spam filters.

I've worked on several business that had to send confirmation emails (via our own servers), and the figures were never anywhere near as bad.

If there is any way that your users can benefit from signing up other users (e.g. if you run an MLM site), you might want to look into whether your stats are not being falsified by a few users submitting vast numbers of email addresses into your system.

<comment><USER4> I think it's unreasonably low too, but haven't figured out a way to solve it.

You can benefit by signing up other users, but this is not a very often used feature. It's not an MLM site, but a subscription chess service.

We track signups by ip and by browser cookies, so we're reasonable sure these are distinct people. Since we switched to the freemium model, there is little incentive for people to make duplicate accounts now, so I was hoping to see activation go up.

We do domainkeys and SPF and I have gone around the block with hotmail two times already.

We send approximately 25k emails a month, the bulk of which are sending out confirmation emails to people that signed up, and then a thank you for those that confirm. The rest are forgot password emails and invites.

<comment><AUTHOR> I'm assuming your forward and reverse DNS match?

[http://blog.fastmail.fm/2007/12/05/sending-email-servers- bes...](http://blog.fastmail.fm/2007/12/05/sending-email-servers-best- practice/)

<comment><USER4> Of course. That's the first thing on most checklists. Domainkeys and SPF records are also valid.

</comment></comment></comment></comment></comment></comment><comment><USER6> For newsletters, ConstantContact.com is THE standard and what I recommend to all my clients. They make sure that ISP's don't block your email, report on bounces, spam reports and provide statistics on opens, click-throughs etc.

</comment><comment><USER7> I've known the CEO of Aweber.com for years, and he strives to create a competitive service. They work very hard on deliverability and have connections to the big ISPs to deal with on-going issues. Good folks, check 'em out.

</comment><comment><USER8> Try campaignmonitor.com. These guys rock (and no, I'm not affiliated with them).

<comment><USER9> Campaignmonitor seems to be "permission based", so you cannot send out Invites since invitees gave no permission. A current user deciding to invite another doesn't cut it as "permission".

If permission based is OK for your needs, AWeber is top of the line (www.aweber.com)

Here's a similar discussion: <http://news.ycombinator.com/item?id=190633>

</comment></comment><comment><USER10> I'd say get your own dedicated host with your own IP address, and use normal outgoing mail. (I use a colocated Xserve G5 with Postfix, which is a great system.)

As long as your SMTP server is reasonably secure (you can run simple blacklist tests on it from various sites), you shouldn't get caught by IP-based spam filters, and then it's just a question of whether your content looks spammy to your recipients' mail systems. That's unrelated to how you're delivering the email, so it's the same problem no matter what you're using to send.

</comment><comment><USER11> My business relies heavily on e-mail (we send e-mail proposals on behalf of hotels to their customers), and we use AuthSMTP (<http://authsmtp.com>). $168/year buys you 10000 outbound e-mails per month.

That said, guaranteeing 100% success with the delivery of e-mail is pretty much impossible. You just can't control what the recipient has installed in terms of mail client, spam filtering software.

</comment><comment><USER12> I'm working on an application where I need to send emails to 10,000+ users. The emails can be sent: multiple times per day, daily, weekly, or other. The content of EACH email is completely custom HTML (not swappable fields, but sort of like a custom RSS feed in an email.)

Can anyone suggest a solution that allows tracking of opens, bounce backs, and other standard metrics?

<comment><USER13> EmailLabs has all of the traditional email marketing features (like the tracking that you want), but has a good API to allow your application to interact with them. I chose EmailLabs at an ecommerce company that I used to work with.

</comment></comment><comment><USER14> What makes you think you're not spending spam?

I'm not being glib. Really ask yourself if it's necessary to email this information to users. If I get email from a company and I don't want it, I don't like your company. If your company has information that _you_ think is important to me, notify me next time I log in. Let me determine whether or not it's important.

<comment><AUTHOR> It's information typically requested by a user (e.g. forgot password, register confirmation, etc.).

<comment><USER15> You must be running quite a big site if you're sending out 100k+ per month messages on forgotten passwords and registration confirmation.

<comment><AUTHOR> Plus invitations, message notices, etc.

<comment><USER14> Invitations and message notices are exactly what I was talking about.

</comment></comment></comment></comment></comment><comment><USER16> I use SPF from a slicehost IP for membership confirmations, more-than daily mailings to most members, and occasional announcements. No reported failures yet and all my tests have worked. I figured hitting a large percentage was enough. When volumes get high enough, I'll worry about what could only be a very small percent of failures.

</comment><comment><USER17> Whatever provider you decide to use (and whether or not you decide to host it yourself or use an ESP), you should:

A) be sending from your own dedicated IP address (so that spammers sharing your IP address don't cause all your email to go to spam) and

B) work with a deliverability provider such as ReturnPath or Habeas.

</comment><comment><USER18> Depending on how much you're sending out and to how many people; Google Apps is a good choice.

<comment><AUTHOR> Guestimating around 100K+ per month initially. Google Apps Premier allows 2000 per day per user. Which isn't bad for $50/year. That is not a bad option but quite manual.

Authsmtp seems pricey in comparison.

<comment><USER18> I'm not sure what you mean by "quite manual?"

You just need to set up the Google Apps service manually; everything else (including creating accounts, new addresses, sending emails, creating email aliases, etc.) is fully "automatable" via their API; with wrappers available in Python, PHP, C++, Java, Ruby, Perl, and more....

<comment><AUTHOR> I mean to say that if you need additional quota, you have to sign up/add a new account. It's one of those "you-wish-it-was-automated" thing.

</comment></comment></comment></comment><comment><USER19> cl-smtp <http://www.cliki.net/CL-SMTP>

<comment><USER20> Impossible. Lisp, as is well known, lacks the necessary libraries.

<comment><USER21> impossible ??

</comment></comment></comment><comment><USER22> Why not use Google Apps for your domain (it includes email!)? I know they don't delete email, which is bad, but I'm willing to take that risk instead of running my own mail system. It is a piece of cake to set up, and they offer mailing lists, too!

</comment><comment><USER23> I was just trying to figure this out today myself. Very helpful discussion as usual. I love this site.

</comment><comment><USER24> Fastmail is an excellent service as has been suggested. Another you might consider is Rollernet.us.

</comment><comment><USER25> VerticalResponse.com works pretty well for sending out email campaigns.

</comment><comment><USER26> try dodo</comment>


The J1 Forth CPU (2010) - <AUTHOR> http://excamera.com/sphinx/fpga-j1.html <comment><USER2> Forth machines have been around since Moore designed one in the mid-1980s.[1] He used to have a development system where the only input was three buttons, used in a chorded fashion, and the CPU was generating NTSC video in software. Now that's minimalism.

In the first hardware implementation, integer divide had been botched, and gave wrong answers for odd-numbered divisors. There was an argument in the data sheet that most divisors are even, and a subroutine for correct divides when needed.

[1] [http://www.cpushack.com/2013/02/21/charles-moore-forth- stack...](http://www.cpushack.com/2013/02/21/charles-moore-forth-stack- processors/)

</comment><comment><USER3> Or try my Hive soft processor core:

[http://opencores.org/project,hive](http://opencores.org/project,hive)

I need to update the paper and code, the core is at v9.03 and the simulator can now parse assembly code as input.

IMO canonical stack processors aren't a good substitute for register-based processors. Hive is a stack / register hybrid that makes the 2 operand architecture more efficient. And I don't know why barrel processors aren't taking over the world - they make too much sense I suppose.

<comment> david-given About a year ago we had this thread:

[https://news.ycombinator.com/item?id=9920760](https://news.ycombinator.com/item?id=9920760)

It's a thesis describing a C compiler for stack machines. (The link in the article is dead now. See [https://www-users.cs.york.ac.uk/chrisb/main- pages/publicatio...](https://www-users.cs.york.ac.uk/chrisb/main- pages/publications/ShannonThesis2006.pdf.1))

It achieves comparable code density with gcc's x86 (albeit for a fictional architecture).

The really interesting bit is Appendix E, which proposes an architecture for a fast stack machine. It uses a fairly traditional 16-bit instruction encoding, except instead of registers each 4-bit operand slot contains an encoded stack manipulation --- a rot or a pick. This should give even better code density while still being easy to implement.

Unfortunately I've never tracked down a copy of his compiler...

<comment><USER4> Thanks david for providing that reference. I missed the discussion the first time.

Perhaps you, or someone here, would know: has anyone asked and tried to analytically answer what primitive operations an ALU ought to have? I mean, everything could be coded as a look-up-table, but given code "on average", what should be available in hardware.

It's a strange question that requires you pose it properly to even begin to answer it. For example, in the kind of stuff I do, popcnt and other "set-like" bit operations, i.e. most-significant set bit, are important enough that I just wish they were built in.

Mine you, I'm doing high-performance data processing, so perhaps it's not part of the scope of "average" code, but I disagree.

<comment><USER3> "...has anyone asked and tried to analytically answer what primitive operations an ALU ought to have?"

Very good question. I think this is where the "art" of computer design starts, and it generally gets short shrift. For instance, the ARM lacks a leading zero count instruction, which is a pretty wild omission because it has tons of uses (particularly for floating point) and is fairly expensive to implement in software using other primitives.

I know it's not scientific, but I learned what to put in the Hive ALU by programming various algorithms I figured I would need at some point. I just developed a bunch of floating point subroutines for Hive (cos, sin, sqrt, 2^x, log2, 1/x, etc., not in the paper yet) and, short of adding a floating point pipeline, could only really justify adding an opcode that returns +1 / -1 based on the sign bit (for use in storing sign and doing absolute value). My seat of the pants rule is that if it has broad applicability, saves time and code space, and isn't too costly in terms of hardware / speed, then I put it in. Otherwise I leave it out.

IMO, more of computer engineering should focus on what to leave out.

<comment><USER4> I had a glance at your Hive paper. Seems like very interesting work.

I don't have all the know-how, but if I had the resources, I'd like to build a system where I push compute to a node that essentially is a M.2 SSD glued to a custom core glued to 10G networking. Wire it all up in a Clos network. Use IPv6 and treat it as the address space, throw in a few routing tricks, and call the whole thing a computer.

One day I'll build it. Hopefully I can get to that scale at some point.

<comment><USER3> I'm not sure why more processors aren't tightly integrated into memory (and vice versa). Physically separating processor and memory with slow package pins means caches and all the real-time headaches and complexity and die size / cost issues they bring with them.

When I assemble a new PC I almost never increase the memory down the road, so it might as well be on the processor die.

<comment><USER5> They probably will be, Integration is the future once all the other low (and not so low) fruit has been collected.

</comment></comment></comment></comment></comment></comment></comment><comment><USER6> A tiny, open CPU is good. Running Forth is not so good. People should also look at this one:

[http://www.jopdesign.com](http://www.jopdesign.com)

Their Java processor outperforms most of the others with small amount of space. It's open. Doesn't necessarily have to run Java as Oberon or something could probably be ported. The papers section is full of good stuff.

<comment><USER7> >Running Forth is not so good.

Why not?

<comment><USER6> It's an untyped, stack language. A strongly-typed language gives you more readability, safety/security and optimization abilities. Dynamic, but still safe, typing plus hygenic macros can be used to make that even higher-level and more productive. Plus, there's tons of tooling, talent, and libraries for a few, good ones. Forth is behind the curve in almost every respect.

Forth is the way it is mainly because Chuck Moore wants it that way. It's his preference. Tiny cores, typeless, hand-optimized to near metal, primitive VLSI tooling, 18-bit CPU's... nothing justified by scientific or engineering argument. All surpassed by other work in cost-benefit analysis. Nice write-up here by one person that delved deep into it to see good and bad of it:

[http://yosefk.com/blog/my-history-with-forth-stack- machines....](http://yosefk.com/blog/my-history-with-forth-stack- machines.html)

<comment><USER3> Thanks for the blog pointer, an interesting read.

As the blog author points out, local variables are a huge issue on a stack machine because they lead to stack thrash. ANY stack manipulation must be seen as fundamentally inefficient, and they make Forth a naturally obfuscated write-only language IMO.

I understand complexity push-back, particularly in the processor / SW worlds where so much of it seems actually harmful, but the cult they've formed around Chuck Moore is kinda weird and it makes it hard for noobs to get a balanced picture of computing.

<comment><USER8> > local variables are a huge issue on a stack machine

Forth routines are usually short so they don't need local variables.

> ANY stack manipulation must be seen as fundamentally inefficient

Why? I remember developing Forth code on a 6502 machine, and the code was just ten times slower than native assembler. That's not bad for a byte code interpreter. And the byte code is extremely compact which makes Forth very suitable for tiny systems.

<comment><USER3> > Forth routines are usually short so they don't need local variables.

Variables have to go somewhere. In a zero operand machine they go on the stack. Good luck finding them amidst all the confusing rolling, picking, duping, etc.

> Why?

Because the ALU is just laying there doing nothing while the stack is having it's spine manipulated (see above).

<comment><USER9> > Variables have to go somewhere. Good luck finding them amidst all the > confusing rolling, picking, duping, etc.

Of course you don't want to use roll or pick. That's tutorial-level knowledge that you shouldn't use them.

What you do when you see that coming is that you offload something to a global variable. The "something" is often the central topic of some part of the program, like a file handle for instance. So it makes sense to put it in a variable because it's needed in many places.

<comment><USER8> > Of course you don't want to use roll or pick. That's tutorial-level > knowledge that you shouldn't use them.

I think the opposite is true. Basic, Assembler and Forth were my first languages. Forth was the one that was the most powerful, and it showed me best on bare metal how a computer works.

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER10> I have one of these on my Gameduino board. Since my early computing experience was on Burroughs stack machines I've always liked stack machines and Forth. I had Forth on my early 8080 systems. It didn't take long to collect a decent collection of words that made programming go pretty fast.

The J1 was an interesting processor to work with. The speed was very impressive. They produced a pretty nice dev environment to process the code with the Arduino.

</comment><comment><USER11> Not to be "that guy", but can someone explain to me what about this architecture is Forth specific? I would have thought that as a stack based language that most architectures would align pretty closely with its primitive commands/functions (i.e. Push-Pop-Jmp)

<comment><USER3> People who design stack processors like to say they're Forth or Java machines. IMO it's more buzz-word than anything else.

I think we know now that tailoring a processor to a particular language isn't particularly efficient (though the opposite i.e. assembly is).

<comment><USER12> Current processors are tailored to C line of languages as they kind of follow up on the PDP-11 architecture.

And yet, given the way C exploits have plagued the industry, Intel, ARM, CHERI are actually adding tagged instructions that allow C compilers to generate code that validates array and pointer accesses at hardware level.

Just like the language specific processors that you state as not being efficient.

<comment><USER3> It's hard for me to see that CPUs historically and substantially pander specifically to C. IMO adding hardware crap to fix software crap should be strenuously resisted.

Early on there were efforts to build custom Lisp machines, etc. which were abandoned when CPUs became good enough and general purpose enough. Using a stack processor as a stack language target seems natural until you see all the inefficient stack gymnastics that go on at the lowest level.

<comment><USER12> Yeah, but unfortunately that software crap is going to stay with us for a long time.

Even I that usually bash C here, do use it when customers or a specific project requires it. I just try to follow all best practices to make it as safe as I can, ignoring third party code.

However I can convinced that Lisp Machines, Xerox PARC and Burroughs micro- architectures, Rational Ada Machines, i432, could have been much better.

Many times technology solutions fail not because they aren't good, rather the people aren't willing to invest the time they require to become good enough.

For example JavaScript JITs, if it wasn't for the research money that Google and other vendors are willing to invest, no one would believe they would achieve the execution speed they have nowadays.

I also remember when Z80 coders could easily outperform C, Pascal, Basic and Modula compilers for 8 bit micros.

<comment><USER3> Yes, but even with the most meticulously hand coded assembly, a canonical stack machine will starve the ALU ~1/3 of the time.

Better to code however is the most efficient at the top level, implement the HW however is the most efficient at the bottom level, and automate the middle ground.

</comment></comment></comment></comment></comment></comment><comment><USER13> in action in ice40 fpga using icestorm [http://www.excamera.com/sphinx/article-j1a-swapforth.html](http://www.excamera.com/sphinx/article-j1a-swapforth.html)</comment>


GPT-3 is going to change the way you work - <AUTHOR> https://twitter.com/OthersideAI/status/1285776335638614017 <comment> blaser-waffle > Automatically write emails in your personal style by simply writing the key > points you want to get across

> The days of spending hours a day emailing are over!!!

This is why I write grammatically incoherent emails and posts so that I can get GPT-3 to do it for me later. Has nothing to do with laziness, whimsy, or multitasking, honest!</comment>