Generate semi-dynamic UIs with Haskell - <AUTHOR> https://github.com/pkamenarsky/concur-static <comment><USER2> I simply love it how every single Haskell framework I've seen that has "ease of development" and "it's easy" and similar immediately devolves from this (from Concur's docs [1]):

      hello = do
        button [onClick] [text "Say Hello"]
        text "Hello Sailor!"

into this:

      inputWidget = input [(Changed <<< unsafeTargetValue) <$> onChange, Focused <$ onFocus]

or this:

      inputWidget st = input [st {focusCount = st.focusCount+1} <$ onFocus
                             , ((\s -> st {currentText = s}) <<< unsafeTargetValue) <$> onChange]

for even the slightest modifications (which are not even complex in this case)

      These instances, allow a natural handling of
      return values using <$>, <*>, <$, monadic
      do-notation, etc

Right...

[1] [https://github.com/ajnsit/concur- documentation/blob/master/R...](https://github.com/ajnsit/concur- documentation/blob/master/README.md)

<comment><USER3> The second example can be rewritten as such:

        inputWidget = let
            changeAction = do
              v <- onChange
              return (Changed (unsafeTargetValue v))
            focusAction = do
              _ <- onFocus
              return Focused
          in input [changeAction, focusAction]

and likewise for the third:

        inputWidget st = let
            focusAction = do
              _ <- onFocus
              return (st {focusCount = st.focusCount+1})
            changeAction = do
              v <- onChange
              return (st {s = unsafeTargetValue v})
          in input [focusAction, changeAction]

(I didn't compile this, so hopefully there's no major mistakes here)

Believe it or not, many Haskell programmers prefer brevity when it comes to programs like this. They're honestly not that unreadable once you learn the meaning of a few infix operators.

<comment><USER2> I prefer the approach described here: [http://www.haskellforall.com/2015/09/how-to-make-your- haskel...](http://www.haskellforall.com/2015/09/how-to-make-your-haskell-code- more.html)

</comment></comment></comment><comment><USER4> Cool application of Haskell's purity-by-default. I'm slightly surprised this takes the approach of enumerating the whole input space to get all states, though - given that termination for big spaces isn't a priority, why not just explore all paths instead? Then you could return `Int` as much as you wanted, if the actual code only goes through finitely many different values.

<comment><AUTHOR> > why not just explore all paths instead?

Author here.

The problem is that concur-static generates static JS code that encodes all possible UI state transitions - so if the state space is big or infinite, so will be the resulting generated JS.

I wanted to explore the viability of generating simple static UIs with _some_ level of dynamism. concur-static is definitely not intended as a replacement for full-blown client side UI libraries/frameworks.

<comment><USER4> > so if the state space is big or infinite, so will be the resulting generated > JS.

I understand that, but it's not like this doesn't already choke on big input spaces. Why not allow me to use a big input space with a small state space by exploring the state space instead? Otherwise you just seem to be exploiting the fact that small input spaces make for small state spaces, which seems like an unnecessary indirection.

Or is it to try to enforce small state spaces to prevent programmer error?

<comment><AUTHOR> Ah, I understand now.

That seems like a good idea indeed, however I'm not sure how it'd look in practice. The transition from input space to state space happens in the event handlers, which currently look like this:

        onClick :: Bounded a => Enum a => a -> VDOM a

If I understand correctly, you're proposing something like:

        onClick :: Bounded a => Enum a => a -> VDOM b

Where b can be whatever (i.e. an Int, etc)? How would a be converted into b?</comment></comment></comment></comment>


Behind the Burst Compiler - <AUTHOR> https://xoofx.com/blog/2019/03/28/behind-the-burst-compiler/ <comment><USER2> Here's a video of the author's "Deep Dive into the Burst Compiler" talk from Unite LA: [https://www.youtube.com/watch?v=QkM6zEGFhDY](https://www.youtube.com/watch?v=QkM6zEGFhDY)

</comment><comment><USER3> this is interesting - does anyone have a link to the repo

<comment><USER4> The Burst compiler is closed source. However, if you import the Burst package [1] into your Unity project, you can see most of the source using ILSpy [2].

In your project, see the directory: "Library/PackageCache/com.unity.burst@<package-version-here>/.Runtime". The DLLs you'll want to inspect are: "Burst.Backend.dll", "Burst.Compiler.IL.dll", "burst-llvm.dll", "Smash.dll" and possibly the "Cecil" DLLs.

1\. [https://firstname.lastname@example.com/manual...](https://firstname.lastname@example.com/manual/index.html)

2\. [https://github.com/icsharpcode/ILSpy](https://github.com/icsharpcode/ILSpy)</comment></comment>


Winner's Curse? On pace, progress, and empirical rigor [pdf] - <AUTHOR> https://openreview.net/pdf?id=rJWF0Fywf <comment><USER2> The summaries of the case studies in Section 2 was disturbing, to say the least. I sometimes think about the NIPS consistency experiment from a few years ago, which I think also speaks very negatively of the current state of academic ML research. I agreed with all of the authors' suggestions to solve this mess and I think many of them need to be implemented urgently.

</comment><comment><USER3> The suggestions for empirical evaluation are great, but would have to be insisted upon by reviewers, often chosen by authors and complicit in promoting the larger methodology at stake. I've seen this happen in methodology publications several times.

It makes sense though for companies to do this evaluation, and a ML PaaS that automates those empirical evaluations across a range of methods might have a uniquely useful service.

</comment><comment><USER4> What's ML?

<comment><USER5> "The rise of open source ML platforms such as TensorFlow and PyTorch, ...", so ML = Machine Learning.</comment></comment>


Ask HN: Which stock market website/app are you using? - <AUTHOR>

Im curious to know: Which stock market website/app are HN users using? What's the reason? <comment><USER2> In Australia comsec.com.au, large financial institution. Solid financials. Easy to transfer money in and out. Has a regular bank account with it that earns above 4% interest when my money isn't in stocks.

In the USA scottrade.com, colleague uses them. Read some reviews of them vs etrade, tdameritrade etc. And scottrade has the least evil reviews based on my limited sample of what I read.

</comment><comment><USER3> If you mean broker, I am in the United States and use Scottrade. I use them because their fees are low, their tools are good enough and their service is excellent -- especially because they have an office in my city where I can fill out transfer paperwork in front of an employee to reduce the chance of time-wasting mistakes.</comment>


Show HN: Bidgram- Sell to or collect offers from your social networks - <AUTHOR> http://www.bidgram.com

<comment><AUTHOR> Creator of Bidgram here. Here is our MVP of something we believe will help you sell easily to people in your networks. You can also use Bidgram to collect offers for something you own or can provide.

Bidgram is a free "auction" site where you create a listing and receive a private, unique URL. You can then share this URL to whomever you like and anybody who clicks on your URL can make a bid or offer on your listing. We dont share your URL publicly, its up to you to promote your listing. After 24 hours, you'll receive an email with all bids/offers that were made.

Sample usage cases:

Extra Tickets- Got extra tickets for a game or concert you want to sell? Create a Bidgram, share it with your friends, and pick someone to join you at the event.

Used Cars- Selling your car online? Use Bidgram to solicit offers from multiple buyers and get the most money for your car. Buying a new car? Use Bidgram to make dealers compete and save yourself money.

Ad Space- Looking to get the best ad rates for your publication? Invite advertisers to make offers on advertising space via Bidgram.

Feedback is definitely appreciated</comment>


Using a Smartphone's Eyes and Ears to Log Your Every Move - <AUTHOR> http://www.technologyreview.com/news/516566/using-a-smartphones-eyes-and-ears-to-log-your-every-move/

<comment><USER2> This is so nice and useful information</comment>


PostgreSQL 11: something for everyone - <AUTHOR> https://lwn.net/Articles/764515/ <comment><USER2> Note the following passage:

"It's clear to me that a certain proportion of application developers are allergic to putting business logic in the database system, despite the fact that batch processing logic is often a great deal faster when implemented that way. Perhaps the fact that clients are now able to cede full control of transaction scope to procedural code running on the database server (code that can be written in a familiar scripting language) will help application developers to get over the understandable aversion. Hope springs eternal."

<comment><USER3> I'm one of these application developers, and I'm still seeing a lot in my way to moving logic to the database.

From coding in Python with Django, I'd need to give up version control as I know it, use a different Python environment, give up unit testing as I know it (and as it integrates with the rest of my application), authentication (because that's owned by Django), distributed tasks and queueing, performance monitoring (as I know it), etc.

I would really like to see a Proof of Concept of a modern web framework like Django/Rails, but with a strong focus on moving as much to the database as possible - user management, queues, etc, as I think there are many benefits to be had from pushing more into the database.

Until something like that exists though, I think moving logic to the database will lose development tooling and process that we are used to, and end up re- implementing logic in multiple places which isn't great.

<comment><USER4> We don't use django, but we basically do this, we put python in the DB (PL/pythonu) and it's hosted in a VCS repo and use liquibase[0] to handle getting it into the DB, along with our schema's, etc.

Debugging can be a little harder, but testing generally isn't you know the calling signature(s) PG uses so writing a class for UnitTest/pytest is straightforward.

Our APP logins _ARE_ DB logins for our desktop product(s), but for web we have a single DB user that web apps log into the DB as. We'd love for web logins to become PG logins as well, but we haven't found a very performant way of doing that yet. PG sessions are a heavy startup cost.

The functionality for us, isn't the same between the web and desktop product(s) which helps a lot.

We push access control into the DB for the most part, using row, column and table level access controls PG provides us. So our desktop product has basically no access controls in it, since the DB provides all of that at login time. We have a few power users that connect directly with SQL, and we have zero issues just handing them access, since the DB controls what they can/can not see just fine.

Sadly so many tools just assume their DB connection is the equivalent to root, and can just go do whatever it wants, which makes lots of tools, especially reporting tools, hard to just hand directly to end users.

[0] [http://www.liquibase.org/](http://www.liquibase.org/)

<comment><USER5> I think Postgrest[0] takes an approach to authorization you may want to look into. My understanding is they use one base user that is granted the ability to switch roles to reflect the current user once they're authed by your app server.

Have you transitioned your business logic into your DB from your app or is that approach something you started with?

[0] [http://postgrest.org/en/stable/auth.html](http://postgrest.org/en/stable/auth.html)

<comment><USER4> We started with it. It's always best to offload your security/privacy posture onto something well known and supported rather than rolling your own, if possible. It's hard stuff to get right, and PG does it really well, especially in more recent versions. Row/Column security in the 8.X series was a bit painful :)

We looked into doing something similar, but it didn't scale to our workload and had a ton of edge cases we kept getting caught up in. If a breach on the PG connection happens with that approach, the world gets super bad, super fast, as if I remember right, you need to be a super user to switch roles like that. That's very, very worrisome exposing super-user credentials like that to a website. If I remember right, we had to throw the connection away after using it for some reason, so the startup-cost gets cut some, but if you have a mass influx of users and your pool size is not gigantic, it gets painful waiting for new PG connections to come up. Plus the cost of holding open so many PG connections if your pool size is too large.... And our product has a module where all users attack it pretty much all at once, twice a day... this was back in the 8.X series of PG, so maybe it's a lot better now...

If postgrest manages to make it scale to our workload and took care of all the edge cases well, it would be super awesome. I'll have to check into how they handle that.. maybe it's something we can look into adding in the future, thanks!

<comment> steve-chavez > you need to be a super user to switch roles like that

No need for superuser, only membership to the role that it's going to switch is required. i.e. a `GRANT web_user TO connector`. Besides that, only privilege the connector role requires is LOGIN.

</comment></comment></comment></comment></comment></comment><comment><USER6> Now, if I could only have a pljulia... so that I could run statistical analysis (packaged as a Julia function) from a query. With PostgreSQL the request queue is never ending ;)

<comment><USER7> I don't know the underlying engine for Julia, but I suspect where there's a will, there's a way. Have you considered either writing it yourself or sponsoring someone to work on it?

</comment></comment><comment><USER8> Curious to see if the emphasis on parallelism will affect Citus Data's business model?

<comment><USER9> At Citus we're actually very excited about the parallelism improvements within Postgres. For us at Citus the core of what we do is allow you scale horizontally beyond a single node. We view the parallelism work within Postgres as complementary, as we can focus on the distributed aspects while letting each node handle it's own workload.

Some of our customers do today very much leverage the parallelism Citus brings, but again that's across multiple nodes. A number of our customers don't choose Citus at all for real-time analytics, instead they're more focused on a more standard OLTP application, often multi-tenant app, that they need to scale.

</comment></comment><comment><USER10> A bit off topic but I wish postgres came with a good desktop app. pgadmin 4 is just abysmal compared to e.g. MySQL Workbench.

<comment><USER11> I know it's somewhat pricey but datagrip by jetbrains is amazing.

<comment><USER12> And if you are not only working with DBs you can get it bundled with their IDEs. Eg phpstorm has most of datagrip functionality built in.

</comment></comment></comment><comment><USER13> I'm fairly newb to PostgreSQL, and am not an expert (just a user) in many SQL systems. But if Postgres' typecasting methodology is unique to it, by jove it's a great point.

What other features should I learn about (comparisons to MySQL/Oracle)? Any reason to focus on Postgres/Greenplum over a Hadoop hive/impala setup?

<comment><USER14> Other DBMSs have similar typecasting to PostgreSQL, but they're all different. It's one of those things that never really standardised. Personally I like the breadth of different types available in PostgreSQL. First-class enums and ranges really help a lot of apps, and while table inheritance has issues it does have some really interesting uses.

As for features to look in too, I'd look at the in-server functions (plpgsql, plv8, plperl etc) for extensibility. Custom and complex types are pretty awesome as well. Also the range of functionality in window functions can make some really interesting queries possible. Also the concurrency model does need some understanding, as it means a commit will fail rather than deadlock.

Why should use use PostgreSQL over Hadoop? If you have less than ~20TB of data then it's much less complex to set up and maintain, and as long as you don't want to read the entire data set at once it's fast. If you have more but it's easily partitioned (eg multi-tenant) then Citus have a package that can help, or if you have column-oriented data Citus have a different extension to help.

Postgres is also really well tested and has decades of production use behind it, so backups and restores are well known, though that does require manual scripting to copy the files.

<comment><USER15> > Personally I like the breadth of different types available in PostgreSQL.

Also for how extensible they are. I'm a complete amateur at GIS, but PostGIS is one of the neatest large-scale uses of the system I've seen.

</comment></comment></comment><comment><USER16> Anyone know what the filter evaluation redesign they did in version 10 was?

> The v10 improvement essentially flattened the representation of expression > state and changed how expression evaluation was performed.

It sounds like they were using an expression tree and changed it to something like truth tables, which are essentially "flat" expression representations that can support any boolean expression.

<comment><USER17> > It sounds like they were using an expression tree and changed it to > something like truth tables, which are essentially "flat" expression > representations that can support any boolean expression.

I don't think that's an accurate description - it's more that we converted the tree representation (which still exists at parse/plan time) into an opcode/bytecode representation, evaluated by a mini-VM. Obviously that VM is quite specialized, and not general purpose (and currently it's afaik no internally turing complete, due to the lack of backward jumps, but that's just a question of the program generator, rather than the VM itself). The VM uses computed goto based dispatch if available (even though on modern x86 hardware the benefits aren't as large as on older HW).

<comment><USER16> Makes sense, thanks. I thought maybe this was a smaller change where you just used a different layout/representation of the tree that allowed faster, more cache-friendly evaluation, but you've actually gone much further with this VM, which is fascinating given that it opens up the possibility of JITing queries.

My day job involves working on a query engine that faces some of the same design challenges, so I find this stuff very interesting.

<comment><USER17> > but you've actually gone much further with this VM, which is fascinating > given that it opens up the possibility of JITing queries.

That's why I did it, and why that's the first part in PG 11 that got JITed ;)

> My day job involves working on a query engine that faces some of the same > design challenges, so I find this stuff very interesting.

FWIW, part of the design decisions I made for this stuff in PG were made to a significant part because it had to be adaptable incrementally without breaking too many idiosyncrasies (although there were some, in another commit, around multiple set-returning-functions in the SELECT list). I'd definitely do some things differently if I were to design more on a green field.

</comment></comment></comment></comment><comment><USER18> i am enjoying it much more than sql server

</comment><comment><USER19> How is it in regards to Vacuuming and DB size?

</comment><comment><USER20> I'm surprised covering indices is only now appearing in 11. It's fairly commonplace in other databases.

<comment><USER21> I believe HOT provided some of the advantages of covering indexes.

Covering indexes is tricky in Postgres, due to its MVCC implementation. Versioning info is in the table, not the index, so the index may have stale data. The table itself has to be consulted to find out if the data in the index is actually visible to your transaction.

<comment><AUTHOR> You're talking about index-only scans. Those appeared in Postgres 9.2, which came out about 5 years ago.

INCLUDE/covering indexes are indexes that can include extra "payload" columns, and exist only for the benefit of index-only scans. You can add something extra to the primary key for the largest table in your database, all without changing how and when duplicate violation errors are raised.

</comment></comment></comment><comment><USER22> Would be nice to see some JIT benchmarks with sample queries and the JIT speedup.

<comment><USER17> It's a bit hard what kind of benchmark to choose - you can easily get into 3-5x territory with arbitrarily expression heavy queries (say evaluating math equations in WHERE) - but whether that's realistic is another question.

      CREATE TABLE large(id serial not null, tz timestamptz DEFAULT clock_timestamp() NOT NULL, data_double float8 DEFAULT random() NOT NULL, data_text text DEFAULT (random()::text) NOT NULL, data_other text NOT NULL);

      INSERT INTO large(data_other) SELECT generate_series(1, 100000000) i;

      SELECT pg_prewarm('large');

yields (best of three)

        postgres[23419][1]=# set jit = 1;

      postgres[23419][1]=# EXPLAIN ANALYZE SELECT min(tz), sum(data_double), max(data_double) FROM large WHERE tz > '2018-09-23 14:47:30.298302-07';
      ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
      │                                                                    QUERY PLAN                                                                     │
      ├───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
      │ Finalize Aggregate  (cost=1495625.42..1495625.43 rows=1 width=24) (actual time=3871.540..3871.540 rows=1 loops=1)                                 │
      │   ->  Gather  (cost=1495625.20..1495625.41 rows=2 width=24) (actual time=3871.388..3873.705 rows=3 loops=1)                                       │
      │         Workers Planned: 2                                                                                │
      │         Workers Launched: 2                                                                                │
      │         ->  Partial Aggregate  (cost=1494625.20..1494625.21 rows=1 width=24) (actual time=3856.050..3856.050 rows=1 loops=3)                      │
      │               ->  Parallel Seq Scan on large  (cost=0.00..1417317.00 rows=10307760 width=16) (actual time=98.533..2216.673 rows=33333333 loops=3) │
      │                     Filter: (tz > '2018-09-23 14:47:30.298302-07'::timestamp with time zone)                                                      │
      │ Planning Time: 0.041 ms                                                                                │
      │ JIT:                                                                                │
      │   Functions: 8                                                                                │
      │   Generation Time: 0.934 ms                                                                                │
      │   Inlining: true                                                                                │
      │   Inlining Time: 5.145 ms                                                                                │
      │   Optimization: true                                                                                │
      │   Optimization Time: 55.719 ms                                                                                │
      │   Emission Time: 43.121 ms                                                                                │
      │ Execution Time: 3874.702 ms                                                                                │
      └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
      (17 rows)

      postgres[23419][1]=# set jit = 0;

      postgres[23419][1]=# EXPLAIN ANALYZE SELECT min(tz), sum(data_double), max(data_double) FROM large WHERE tz > '2018-09-23 14:47:30.298302-07';
      ┌──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
      │                                                                    QUERY PLAN                                                                    │
      ├──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
      │ Finalize Aggregate  (cost=1495625.42..1495625.43 rows=1 width=24) (actual time=5214.622..5214.622 rows=1 loops=1)                                │
      │   ->  Gather  (cost=1495625.20..1495625.41 rows=2 width=24) (actual time=5214.468..5216.057 rows=3 loops=1)                                      │
      │         Workers Planned: 2                                                                                │
      │         Workers Launched: 2                                                                                │
      │         ->  Partial Aggregate  (cost=1494625.20..1494625.21 rows=1 width=24) (actual time=5179.552..5179.552 rows=1 loops=3)                     │
      │               ->  Parallel Seq Scan on large  (cost=0.00..1417317.00 rows=10307760 width=16) (actual time=0.012..2671.871 rows=33333333 loops=3) │
      │                     Filter: (tz > '2018-09-23 14:47:30.298302-07'::timestamp with time zone)                                                     │
      │ Planning Time: 0.111 ms                                                                                │
      │ Execution Time: 5216.123 ms                                                                                │
      └──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
      (9 rows)

Now obviously those queries are somewhat nonsensical, but IMO they're not an unrealistic representation of what kind of operations happen in analytics queries. If you disable parallelism / add more aggregates / more filters, the benefit get bigger. If you add more joins etc, the benefits get smaller (because the overhead is in parts that don't benefit from JITing).

<comment><USER17> Oops, those included per-row timing overhead. Here's the same without that:

      postgres[24261][1]=# set jit = 1;

      postgres[24261][1]=# EXPLAIN (ANALYZE, TIMING OFF) SELECT min(tz), sum(data_double), max(data_double) FROM large WHERE tz > '2018-09-23 14:47:30.298302-07';
      ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
      │                                                         QUERY PLAN                                                          │
      ├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
      │ Finalize Aggregate  (cost=1495625.42..1495625.43 rows=1 width=24) (actual rows=1 loops=1)                                   │
      │   ->  Gather  (cost=1495625.20..1495625.41 rows=2 width=24) (actual rows=3 loops=1)                                         │
      │         Workers Planned: 2                                                                                │
      │         Workers Launched: 2                                                                                │
      │         ->  Partial Aggregate  (cost=1494625.20..1494625.21 rows=1 width=24) (actual rows=1 loops=3)                        │
      │               ->  Parallel Seq Scan on large  (cost=0.00..1417317.00 rows=10307760 width=16) (actual rows=33333333 loops=3) │
      │                     Filter: (tz > '2018-09-23 14:47:30.298302-07'::timestamp with time zone)                                │
      │ Planning Time: 0.121 ms                                                                                │
      │ JIT:                                                                                │
      │   Functions: 8                                                                                │
      │   Inlining: true                                                                                │
      │   Optimization: true                                                                                │
      │ Execution Time: 2440.328 ms                                                                                │
      └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
      (13 rows)

      Time: 2440.891 ms (00:02.441)

      postgres[24261][1]=# set jit = 0;

      postgres[24261][1]=# EXPLAIN (ANALYZE, TIMING OFF) SELECT min(tz), sum(data_double), max(data_double) FROM large WHERE tz > '2018-09-23 14:47:30.298302-07';
      ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
      │                                                         QUERY PLAN                                                          │
      ├─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
      │ Finalize Aggregate  (cost=1495625.42..1495625.43 rows=1 width=24) (actual rows=1 loops=1)                                   │
      │   ->  Gather  (cost=1495625.20..1495625.41 rows=2 width=24) (actual rows=3 loops=1)                                         │
      │         Workers Planned: 2                                                                                │
      │         Workers Launched: 2                                                                                │
      │         ->  Partial Aggregate  (cost=1494625.20..1494625.21 rows=1 width=24) (actual rows=1 loops=3)                        │
      │               ->  Parallel Seq Scan on large  (cost=0.00..1417317.00 rows=10307760 width=16) (actual rows=33333333 loops=3) │
      │                     Filter: (tz > '2018-09-23 14:47:30.298302-07'::timestamp with time zone)                                │
      │ Planning Time: 0.041 ms                                                                                │
      │ Execution Time: 4140.116 ms                                                                                │
      └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
      (9 rows)

      Time: 4140.499 ms (00:04.140)

<comment><USER17> FWIW, the non-parallel version yields a profile like:

      -   25.69%  postgres  jitted-24373-18.so             [.] evalexpr_3_3
         - 96.00% evalexpr_3_3
              ExecAgg
         + 2.89% __isnan
      -   12.15%  postgres  jitted-24373-16.so             [.] evalexpr_3_0
         - 99.38% evalexpr_3_0
              ExecSeqScan
              ExecAgg
         + 0.56% ExecSeqScan
      -   11.74%  postgres  postgres                       [.] heap_getnext
           99.83% heap_getnext
              ExecSeqScan
              ExecAgg
      +    9.31%  postgres  postgres                       [.] ExecSeqScan
      +    7.66%  postgres  libc-2.27.so                   [.] __memmove_avx_unaligned_erms
      +    5.61%  postgres  postgres                       [.] heapgetpage
      +    5.36%  postgres  postgres                       [.] ExecAgg
      +    5.35%  postgres  postgres                       [.] MemoryContextReset
      +    4.11%  postgres  postgres                       [.] HeapTupleSatisfiesMVCC
      +    3.53%  postgres  postgres                       [.] ExecStoreTuple
      +    2.55%  postgres  postgres                       [.] hash_search_with_hash_value
      +    1.63%  postgres  libc-2.27.so                   [.] __isnan
      +    1.16%  postgres  postgres                       [.] CheckForSerializableConflictOut

so it's pretty clear that there's plenty additional work can be done to improve the generated code (it's pretty crappy right now), and that there's potential around improving things due to batching (mainly for increased cache efficiency).

</comment></comment></comment></comment><comment><USER23> Love Pirsig's analogies and can't resist to point out that a "classic approach" will always beat an ignorant hype-driven bullshit in the long run.

Informix (now dead?) vs. Oracle is another classic example from the past.

Oracles's domination absolutely does not imply its technical superiority, actually popularity is usually a bad thing (hello, Ayn Rand) - Java and junk food are insanely popular.

<comment><USER23> It is useless to cowardly downvote an unpopular opinion without giving any reasons or because you don't like the style of a comment. Cosplay of political-correctness huts the truth and sometimes a form (wording) matters a lot.

Well-researched thing will always beat fast-coded-to-market crap. Erlang (despite all its syntactic ugliness), Go (especially stdlib and runtime, which is hard), Scala, Redis, nginx, Haskell (monad-madness aside), Clojure etc, etc.

Ability to produce a lot of crappy code quickly is not a substitute for a decent academic research with proper attention to details. This is the point. Postgres was a research vehicle in the past, now polished to a state-of-the- art product, just like SQLite.

How is MongoDB, by the way? Still a default choice or it has been recently obsoleted by a blockchain?</comment></comment>


Lambda Nights: Learn Functional Programming by writing a simple compiler - <AUTHOR> http://lambda-nights.com/

<comment><USER2> Great! Will the page be updated with new content or is just an announcement of next Lambda Nights?

<comment><USER3> Author Here: text and video sessions for the website go up one week after the session at UB. Lambda Nights will continue to have an update every week for the next couple of months.

</comment></comment><comment><USER4> What continent is "Davis 338B" on? Maybe it'd be good to include a bit more location info if this is an event that's being announced?

<comment><USER5> Looks like University at Buffalo (USA). Maybe farther than you want to swim.

</comment></comment><comment> d-equivalence thank you from the bottom of my heart! I was wishing for that not only a week ago! Please keep it up!</comment>


Way More Americans May Be Atheists Than We Thought - <AUTHOR> https://fivethirtyeight.com/features/way-more-americans-may-be-atheists-than-we-thought/ <comment><USER2> A big part of the problem is public misunderstanding about what it means to be an atheist. When people find out I'm an atheist, they often take it as a personal attack on their belief in god. Coming out of the closet as an atheist opened me up to all sorts of social problems. People defriended me on facebook, others started attacking me in comments, and I still get books from relatives who think I'm an idiot for not believing in god.

But I don't walk around all day thinking, "There's no god." The concept of god simply isn't something that ever factors into my thinking. I believe in science, rationality, the Enlightenment. I believe in all the human beings all over the world who I rely on and who make my life wonderful.

But I am also painfully aware of "Religious Privilege" in America. I must carry the words, "In God We Trust" on my money. My children are forced to pledge allegiance, "Under God" every morning at school. At the Coast Guard base where I used to work as a contractor, our group lunches and other gatherings were opened with a prayer to "Our Lord Jesus Christ." I was even asked to resign from our moral committee shortly after I requested we change our "Christmas Party" to a "Holiday Party."

Is it any wonder people are reluctant to admit they don't believe in god?

</comment><comment><USER3> From a modern rational perspective, the "god hypothesis" looks more and more like the answer looking for a question.

<comment><USER4> The modern, rational perspective has not answered the question of "how did we get here?". A divine creator is one of many proposed answers to this ancient question.

<comment><USER5> Answering "how did we get here?" with "god did it" is just kicking the can down the road. Where did the god come from?

<comment><USER6> If there's an ultimate explanation for the existence of the universe, the explanation has to stop somewhere. From a cosmological point of view, the properties of God are just the properties that any such terminus would have to have in order to be a terminus. Anything that comes from something else isn't God, so the question of where God comes from is moot.

<comment><USER7> > If there's an ultimate explanation for the existence of the universe, the > explanation has to stop somewhere.

Not really. It could be that the universe has existed for an infinite amount of time, and the big bang was an event that occurs from time to time.

No matter what explanation you pick, something came from "nothingness" at some point, which suggests nothingness has some unusual properties.

<comment><USER6> >Not really. It could be that the universe has existed for an infinite amount of time, and the big bang was an event that occurs from time to time.

That is a scenario where there is no ultimate explanation.

</comment></comment></comment></comment></comment></comment><comment><USER8> I personally go back and forth on this. It isn't so much that I do not believe in god. I suspect the concept of god may be a product of a human world view. i.e. If the universe were a simulation would the being(s) running the simulation be god(s/desses)? Maybe the fundamental nature of the universe is so complex that a god-being could both be defined to exist and not exist in some Godel-incompleteness sense.

<comment><USER9> If there's an outer universe in which ours was created/came to be, and you follow a realist version of the Copenhagen interpretation, then you could maybe get both created and non-created versions of our Universe.

Good thought, I like it.

</comment></comment><comment><USER10> I don't have a religion or a personal God, so by definition I'm atheist, but I'm also open to using the term God as a metaphor for a creating force (anything that initiated the universe) which puts me in the new-age-y spirituality and agnostic camps but doesn't anthropomorphise a God, define my moral code or add magical/superstitious decorations. My moral code is based around the Golden Rule, but not because someone or something said I should - it's because it's logical and purest form of fairness.

So perhaps a lot more people come under the Humanist umbrella, which generally share the same beliefs and moral codes when applied to the world around them, whether they possess a belief in a non-anthropomorphised God or not. That aspect of belief is just semantic.

<comment><USER11> >My moral code is based around the Golden Rule, but not because someone or something said I should - it's because it's logical and purest form of fairness.

No it's not logical, it's completely irrational. If someone has something you want, and there is no way to get it, the rational thing to do is kill them and take it. If we wish to kill him while still being in a society where we won't get killed ourselves the solution is to kill them in secret in a method that makes it as likely as possible that you won't get caught while publicly supporting laws forbidding murder.

Saying that morality is rational is a cop-out answer. If morality were rational we would live in a world where people rarely do anything immoral because they realize it would be irrational to do so. The reason morality is even an issue is because immoral actions are rational where we can derive a benefit from them and not face consequences (either because we are very unlikely to get caught or there is no consequence for getting caught.)

The golden rule is nice and all but it is most certainly not a rational principle - as evidenced by the fact that neither Jesus nor any of its other proponents have every tried to offer up rational justifications for it. Instead it was justified with "I'm God, do as I say," and that was the only justification ever offered for it.

Even just now, you claimed it was rational but didn't even even attempt to give logical arguments in support of it. You merely asserted it was "the purest form of fairness" without either explaining why. Most definitions of fairness would find "eye for an eye" to be fair, fairness requires good for good and evil for evil. The Golden rule is not fair.

Also fairness, while something that many people value, is not a logical principle, we do not derive the value of fairness from logical reasoning but human feelings. . . The universe and the world is rarely fair and the desire for fairness is often contrary to sound reason.

<comment><USER10> > _No it 's not logical, it's completely irrational._

Are you suggesting that the Golden Rule must be a divine law because it couldn't come from human reasoning alone? "Do unto others as you would have them do unto you" or in simpler, less frilly terms _treat others as you would want them to treat you_ is a basic form of preemptive reciprocity which even monkeys can grasp. Using deductive reasoning: if we can devise something as complex as language to describe our ideas, we can devise simple maxims.

> _If someone has something you want, and there is no way to get it, the > rational thing to do is kill them and take it._

In a constrained game-theory setting where 1.) there are only two players and 2.) it's something critical to remaining alive and it can't be shared, then you might have an argument. But squishy reality doesn't play well with half thought out game theory scenarios. If everyone did what you suggest, we'd all be dead. Instead we cooperate because we're gifted with theory of mind.

> _If morality were rational we would live in a world where people rarely do > anything immoral because they realize it would be irrational to do so._

Faulty reasoning - your position assumes all people are rational all of the time. We're bags of chemicals which in optimal conditions can be rational. Thankfully we have mechanisms to record our thoughts, including the odd rational ones we have which can then stand up to the test of time and consideration.

<comment><USER11> >Are you suggesting that the Golden Rule must be a divine law because it couldn't come from human reasoning alone?

No Im saying there is no rational reason to choose golden rule over lying, cheating and pillaging.

>But squishy reality doesn't play well with half thought out game theory scenarios. If everyone did what you suggest, we'd all be dead.

But we dont live in that world where everyone does as I suggest. We live in a world where most people dont lie cheat or kill, and thus its rational to lie cheat and kill while maintaining the reasonable belief that others wont copy us.

Some people, like those in severely war torn countries where there is little or no government do live in a world where many people do lie cheat and kill. In absolutely 0 cases have humans in that circumstance chosen the supposedly rational path advocated here. In fact, in that circumstance, the supposedly rational path of not killing in hopes that others won`t wont kill you seems naive and foolish.

>Faulty reasoning - your position assumes all people are rational all of the time. We're bags of chemicals which in optimal conditions can be rational.

Maybe but we do make rational decisions most of the time, we dont need people forcing us to behave rationally because thats sort of the default. If someone offers ice cream for 1 $ and I offer the same ice cream for $ 100 people will rationally choose my neighbors ice cream. This is rational.

How about stealing or hitting, do we have to teach kids that or do they come to it by reason? Imagine a kid who is never punished for lying or hitting other kids, will he or she naturally derive that its wrong through reason.

<comment><USER10> >> Are you suggesting that the Golden Rule must be a divine law because it couldn't come from human reasoning alone?

> No Im saying there is no rational reason to choose golden rule over lying, > cheating and pillaging.

Then you'd fail at any game theory scenarios with a player base larger than 2.

> But we dont live in that world where everyone does as I suggest.

Circular and somewhat nonsensical reasoning. Yes, we live in a world where most people cooperate and some don't. I never made claims otherwise. Just because some people act irrationally doesn't invalidate the claim that the Golden Rule is logical.

> do we have to teach kids that or do they come to it by reason?

You're making the error of suggesting I posited that logic is innate in all people and even at the earliest stages in life - I never made that claim. What I am willing to assert: we can learn things, and humans can build mental frameworks which can be transferred to others by speech and text.

<comment><USER11> >Circular and somewhat nonsensical reasoning. Yes, we live in a world where most people cooperate and some don't. I never made claims otherwise. Just because some people act irrationally doesn't invalidate the claim that the Golden Rule is logical.

You seem to have missed the point. I was responding to your objection that if everyone killed we would all be in trouble so we shouldnt kill ourselves.

My response was that we dont live in a world where everyone lies cheats and kills and there is no reasonable risk of others following my example if do lie cheat and kill. The mere fact that I kill someone wont create a world where everyone kills so your point about not wanting to live in such a world is moot.

<comment><USER10> > your point about not wanting to live in such a world is moot

I never made a _point about not wanting to live in_ any kind of world. Please quote the exact piece of text where I said such a thing.

The original argument, made by you, was that the Golden Rule wasn't logical as I suggested. What you possibly meant to say is that it isn't _innate_ \-- as in something present in all of us from birth. I never posited that the Golden Rule is innate.

Logic doesn't require all of humanity to follow it, to flow only within its boundaries like a fleshy stream, to validate it. It exists in spite of us.

<comment><USER11> >I never made a point about not wanting to live in any kind of world. Please quote the exact piece of text where I said such a thing.

your initial reply:

>If everyone did what you suggest, we'd all be dead. Instead we cooperate because we're gifted with theory of mind.

This is moot because not everyone is doing as I suggest. A murderer doesn't think "wait, if I kill, that might lead to a world in which everyone would kill" because that's ridiculous and it won't happen.

Seeing as that's the only reason you can provide for the golden rule, and it's not a very logical reason, we can conclude that following the golden rule is not rational, regardless of whether it is innate.

<comment><USER10> > > > your point about not wanting to live in such a world is moot

> > I never made a point about not wanting to live in any kind of world. > Please quote the exact piece of text where I said such a thing.

> your initial reply:

> > > > If everyone did what you suggest, we'd all be dead. Instead we > cooperate because we're gifted with theory of mind.

You've failed to demonstrate what I asked: quote the text where I mentioned _not wanting to live in such a world_

> A murderer doesn't think "wait, if I kill, that might lead to a world in > which everyone would kill"

And you present a bait-and-switch argument. Just because a killer is irrational doesn't mean the Golden Rule isn't logical.

<comment><USER11> >And you present a bait-and-switch argument. Just because a killer is irrational doesn't mean the Golden Rule isn't logical.

I'm not seeing the logical flow, perhaps you can point it out to me:

John wants Tim's wife, Marcy. Marcy is not happy with Tim, and she is in love with John. However, John knows that Marcy will never marry him while married to Tim.

One day John and Tim are out for a Swim in the lake and Tim begins to Drown. John can save him but decides not to knowing that he will never get caught for the murder. After letting Tim die, John seduces his wife.

Before the murder, John has a consideration "wait, if everyone killed, that would lead to an unpleasant world where I may get killed myself." Then John comes to his senses and realizes:

1\. No one is going to find out so it is impossible that my actions will influence anybody.

2\. This consideration of what happens if everyone kills is not relevant to my current act of killing Tim as killing Tim is very unlikely to result in everyone killing.

Thus, John realizes it is advantageous to kill Tim and John and Marcy live happily every after.

Please point out to me the logical (not moral, but ___logical_ __) flaw in John 's reasoning:

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER7> This sort of assumes that the people themselves know if they believe in god. People are often in denial of their own feelings, or flip back and forth. Plenty of priests will happily tell you about their personal doubts that god exists.

</comment><comment><USER12> If 1 in 10 Americans say they don't believe in God, and the true number may actually be 10x more than previously thought... Doesn't that mean 100% of Americans are atheist??

<comment><USER8> Being 538, they were discussing multiple polls at once. Some polls have it down as low as 3% and others suggest it may be 30%.

</comment></comment><comment><AUTHOR> Based on living in Tornado Alley for the past 20+ years, the one thing I can safely claim is that if there is a God with omnipotent powers, it hates trailer parks.

</comment><comment><USER13> fivethirtyeight.com, weren't these the folks that predicted Hillary winning in a landslide? I'll read this article with a grain of salt.

edit: Not sure why this is being downvoted. I'm just pointing out that the title is misleading and maybe should be changed to "Way More Americans May Be Atheists Than We Thought, Or Not". I think "An Analysis of Atheists in America" would be a more appropriate title.

<comment><USER14> I recommend taking some time to read what they publish rather than what you may have heard they publish. 538 consistently pushes for proper interpretation of stats and predictions—particularly uncertainty percentages, which is often not the case in other publications, even those that reproduce stats sourced from 538.

In particular, the primary numbers 538 published for the 2016 election were chances of winning, which can easily be misinterpreted as percentage of the vote. As of Nov 8, they had Clinton having a 71% chance of winning (with Trump at 27%), with 302 electoral votes, and 48.5% of the popular vote. This isn't a landslide prediction, and the 71% chance of winning is much lower than what was reported in many other publications.

[https://projects.fivethirtyeight.com/2016-election- forecast/](https://projects.fivethirtyeight.com/2016-election-forecast/)

In the submitted article, they're quite careful in their language in support of the title, which purposefully includes the operative word "may". This is in keeping with what I've come to expect from 538.

</comment></comment><comment><USER15> Atheists still exist? My my, the world really does turn slowly.

<comment><USER16> Was I in a coma the day that god clearly and unambiguously revealed himself to the world?

<comment><USER17> Yeah... You should have gotten a pamphlet on your door that explains everything. I hope you didn't throw it away.</comment></comment></comment>


The Microsoft layoffs are a sign of an Economic Recovery - <AUTHOR>

This will probably get dismissed as a conspiracy theory, but I have a suspicion about the Microsoft layoffs. They simply want to clean house and hire back the cream of the crop, when the economy improves.<p>They're using the layoffs to soften up the employees they bring back on, so they can reduce wage pressure from the improving economy. In warfare, it's not good enough to destroy the enemies equipment, you have to destroy their will to fight. I think that is what is going on. Pretty wacky idea? You decide. <comment><USER3> I think the employees who will get fired will receive a decent severance and they shouldn't have a too hard time finding a new job - especially the technical employees.

Also what you describe - reducing wage pressure and taming the employees - <USER2> something a company ruled by MBAs would want all the time, so I don't see what is has to do with the economy recovering or not.

In my opinion they just want to cut down the fat.</comment>


Our current hosting company keeps failing. Do you guys have any dedicated hosting companies to recommend? - <AUTHOR>

<comment><USER2> I'll concur on ServerBeach and RackSpace (and not just because they include Webmin on all of their boxes). Great company with great service and reasonable (not cheap) prices.

For the slightly lower end, Joyent's Accelerators are a cool and cheap way to get a "dedicated" system (they run in Solaris Zones, which are, frankly quite a bit more reliable than Virtuozzo and vservers based systems), and the company is run by a bunch of really smart guys. And I swear I'm not just saying that because they include Virtualmin GPL on all of those virtual servers, or because they are upgrading to Virtualmin Professional on their TextDrive shared hosting systems as we speak. Or because I like them personally.

And just so you don't think I'm only recommending companies that use our software, The Planet is good and cheap, too. Very solid network and hardware. We've got a big Dell box with them that includes a remote terminal thingy that allows me to see the BIOS and all via a remote Java applet console. Very cool. They do not, however, offer any Virtualmin products on their boxes...that's a problem, of course. But I'm sure we'll remedy it soon enough.

</comment><comment><USER3> I have a few boxes with Serverbeach and I think they're great. If you end up going with them, find a friend who uses serverbeach to give you a referral code. It'll give you and your friend $100 (I think) off their bill -- which can definitely help during the early bootstrap startup days.

If you have the money and really need hardcore service Rackspace is absolutely incredible.

</comment><comment><USER4> One more vote for ServerBeach. They're a rare combination of competence and low cost. Haven't had any problems whatsoever. Definitely find a referral code before you signup. Otherwise use mine! 7XYHDMBU8A It's $100 discount for the new user and $250 for the referrer.

<http://www.serverbeach.com/catalog/index.php?REF=7XYHDMBU8A>

</comment><comment><USER5> I have been happy with the service and support with Serverbeach for a few years now.

</comment><comment><USER6> This thread has some suggestions as well: <http://news.ycombinator.com/item?id=18363>

</comment><comment><USER7> dreamhost. Spectacular deal for the price.

They do have technical issues from time to time (including one that occurred recently), but so does everyone else, IMO. And they're much better about handling it quickly - and communicating to you what happened and how they're handling it.

</comment><comment><USER8> Layered Tech has been alright for me.

<comment><USER9> They worked well for ourdoings.com too. I've been using them for about 18 months. When I had a hardware failure (memory) they took care of it reasonably quickly.

</comment></comment><comment><USER10> I've had bad experiences with MediaTemple (gridserver) - avoid.

</comment><comment><AUTHOR> Thanks for the suggestions guys.</comment>


The Most Difficult CEO Skill? Managing Your Own Psychology (2011) - <AUTHOR> http://bhorowitz.com/2011/04/01/what%E2%80%99s-the-most-difficult-ceo-skill-managing-your-own-psychology/ <comment><USER2> I've been a co-founder a couple of times, but never a CEO. At one startup (not a co-founder, but was around it before it started), we took on a new CEO (new to us, first time CEO to him) to try and get the company directed the right way. For a time we did. About a year after that we hit a snag and things started going south.

Sometime during all of this the CEO took a pay cut, and then simply checked out (BAD BAD BAD). We ended up in a crisis and with nobody at the helm to guide us through it the crisis got worse. Executive decisions were made, but without a corporate officer to direct liability to, things were very "sketchy". Eventually it got so bad the investors decided to sell the company off and recoup what they could, but needed the CEO to stay on for some legal reasons -- they gave him no pay, he provided no interaction with anybody in the company. It was beyond unpleasant.

Talking with him later on he admitted he was embarrassed things had gone the way they did, but justified his behavior that half pay means half time and no pay means no time. There was some realization that with a few simple decisions early on (when it was just a snag) probably would have resulted in no pay cut and full time, plus a graceful exit. But hindsight is 20/20 and it's an experience that he and the management learned tremendously from.

TL;DR The real problem was that when times were good, he was the captain of a proud, well run sailing ship at full sail. When we ended up in a storm, his psychology told him to take cover, even as the ship sank into the abyss.

<comment><USER3> I'll relate a similar anecote; dot com exploding crisis in the board room, frozen management. I reached out to Scott McNealy and asked how at Sun we had hit rough times and it got painful but it never got stuck. His response changed my whole take on things. He said,

"Chuck nobody knows what they are going to be when the chips are down, they can think they will be a tiger but they sometimes they discover they are the deer, and stare transfixed at the headlights. The best you can do is test people early to get a sense of how they respond and move the ones who can't act in a crisis into safer jobs."

I have found this to be very accurate advice. People who you wouldn't think would freeze up can (and do) and people who you felt were meek and softspoken can suddenly stand up and take charge. Its the fight-or-flight instinct and its wired in the part of the brain you don't have a lot of control over. It sounds like your CEO friend discovered he couldn't take the pressure and ran. It can be a shameful place for a proud person, it has driven people to suicide. Understanding that its not under your conscious control can help.

<comment><USER2> A really excellent insight. It's amazing how people take on entirely new mantles when things get tough, and you just simply can't predict that that will look like.

It reminds me of the Mastermind Rational role variant in the Keirsey Temperament Sorter [1]. A personality type that doesn't want to lead, but when crisis hits and they feel leadership has let them down, will take charge and get shit done. It's a good kind of reserve person to keep in the wings I think.

I don't know of a corollary for the opposite though, who want to lead, but shut down at the first sign of trouble -- even though it seems to be a favorite archetype of writers.

[1] - <http://en.wikipedia.org/wiki/Mastermind_(role_variant)>

</comment></comment></comment><comment><USER4> As a side note, the picture at the end shows the last second of the great fight between Diego Corrales and José Luis Castillo[1][2].

Round 10: After being knocked down twice and hardly beating the clock, Corrales turns the match, traps his opponent against the ropes and causes the referee to end the fight.

[1] [http://en.wikipedia.org/wiki/Diego_Corrales_vs._Jose_Luis_Ca...](http://en.wikipedia.org/wiki/Diego_Corrales_vs._Jose_Luis_Castillo)

[2] <http://www.youtube.com/watch?v=imZaiGJgbsw>

<comment><USER5> And then poor old Corrales dies in a motorbike crash in Vegas :-(

</comment></comment><comment><USER6> Amazing write up - quite informative - interesting how non-CEO's do not understand and greatly underestimate the value a good CEO brings to the equation.

It's easy to talk about the CEO when he is not listening or present... but they can't imagine the work behind the scenes.

</comment><comment><USER7> Most difficult CEO skill? That's a life skill. Not to dismiss how hard it must be to be a CEO because I couldn't imagine it but those lessons apply everywhere. Replace the word CEO with the word life and you have an article about how to manage the stress of everyday life.

Edit: I really really don't want to sound dismissive, that's really not the intent.

<comment><USER8> Just because something is a crucial life skill doesn't mean it can't also be a critical CEO skill, or any other job-skill for that matter.

<comment><USER7> Like I said, I wasn't saying that. I wasn't being dismissive. I was just observing that this is a skill that applies very broadly. I read it, got it, liked it, then thought "hey, that actually applies everywhere". It's not a knock against the author or the article. Just my reaction.

</comment></comment></comment><comment><USER9> Previously discussed on HN 535 days ago, still a good article:

<http://news.ycombinator.com/item?id=2396120>

<comment><AUTHOR> Edited the title to (2011).

</comment></comment><comment><USER10> "If you focus on the wall, you will drive right into it. If you focus on the road, you will follow the road. Running a company is like that. " and "I didn't quit."

I am going to engrave the above mentioned quotes in gold* and put it on my wall.

* - Or just have my young kid write it with a pencil on a paper and put it on my wall.

<comment><USER11> Haha, it's a great life lesson no doubt. I learned this concept a few years ago when I first started to ride a motorcycle, and they have a phrase for it - target fixation:

<http://en.wikipedia.org/wiki/Target_fixation>

What amazed me more was how the fundamentals of riding a motorcycle contained many great life lessons. It's not just target fixation, but rider awareness, maintaining margin, and all sorts of other little things.

</comment></comment><comment><USER12> As a developer I also find my psychology difficult to manage ..

</comment><comment><USER13> Most difficult CEO skill? Raising money.

Seriously, have without a HUGE network or traction/lots of revenue it's almost statistically a miracle to make it happen.

Great article though, just pointing out the obvious.

<comment><AUTHOR> _Relevant_ : Author's job is handing out the money

<http://bhorowitz.com/about/>

</comment></comment><comment><USER14> The author forgot to attach his sources.

</comment><comment><USER15> At first I thought this title said "The Most Difficult SEO Skill?"

I was thinking someone's conscience finally caught up with them. Only to discover this is just more Internet VC gibberish. Oh well.

<comment><USER16> VC gibberish? I found this to be pretty insightful, and valuable life advice in general.

<comment><USER15> You are getting valuable life advice from an internet venture capitalist? I will say a prayer for you.

<comment><USER17> The ad-hominem is unnecessary and unfounded. Ben Horowitz has a legit entrepreneurial track record, and he generally says pretty smart and useful stuff.</comment></comment></comment></comment>


Lisp outside the Box (O'Reilly book) - <AUTHOR> http://lisp-book.org/

<comment><USER2> This from the publisher that used to have "no lisp books" in their submission guidelines. :)

<comment><USER3> Any reason for that?

<comment><USER2> I don't know what the reason was, but you can probably find someone mentioning it by searching the threads referencing the publisher in comp.lang.lisp, from 5-6 years ago.

<comment><USER4> The reason seems to just be that LISP books generally don't sell well. And it seems to still be in their submission guidelines.

<http://oreilly.com/oreilly/author/writeforus_1101.html>

"Books on topics that have dismal sales despite quality books being available. (If you're addressing a topic where good books have sold dismally in the past (for instance, LISP, LaTeX, or Web-based training),"

<comment><USER5> Well, maybe LISP stuff is moving out of the "doesn't sell" category.

</comment></comment></comment></comment></comment><comment><USER6> I wish he would have included a chapter on the condition system. I've had a hard time wrapping my head around it. Everyone says "It's great, but you have to see it in action."

<comment><USER7> Maybe it's not too late:

 _This is very much a draft outline. Both overall breakdown and specific chapter titles are likely to change over the coming months._

In any case, I though the chapter on conditions in PCL was pretty good: [http://gigamonkeys.com/book/beyond-exception-handling- condit...](http://gigamonkeys.com/book/beyond-exception-handling-conditions- and-restarts.html)

</comment></comment><comment><USER8> What I like best about the table of contents is that:

"Hmm, maybe it's time we mentioned Lists"

is chapter 9. Good way to escape the programming urban legend that "In Lisp, lists are the only data structure."

<comment><USER9> Lists are the most ingenious data structures possible; Nature uses them exclusively -- or what do you think DNA or our brain ore molecules are consisting of?

(You don't have 'arrays' or 'hashes' in Nature, and why would you need them? Read on:)

The only difficulty with lists is interconnection with other list elements; Nature uses this heavily, and our brain would not be possible without these inter-connections.

So -- lists as used in our current computer systems may be slow, but they are still the best data structure ever created.

<comment><USER3> How is DNA not an array? Correct me if I'm wrong, but Lisp lists are linked lists, so elements don't have to be next to each other in memory. On the other hand, DNA is stored and processed from one molecule to the next one physically.

<comment><USER9> Lists or arrays?

Nature doesn't know arrays. There's no index (which is the only real distinctive between arrays and lists), and the next atom of information can be (physically) more or less distant from the previous one, so: Nature only uses lists.

Think of it: arrays are only used because of faster accessing reasons, otherwise you never would even think of preferring arrays over lists.

Lists _are_ perfect, because they already contain the _previous_ and the _after_ information bit, which is always crucial to us -- we all are enclosed in the time barrier -- and all of other memory alignment and usage, invented by computer scientists, were simply born out of the necessity of speed, and nothing else.

Lists contain the information stored in the simplest possible way, without wasting any bit of information (which would be necessary if you would care about an index).

Interconnection is the real reason why computers never will be able to substitute a human brain -- and this statement (or better: fact) will never grow old...

<comment><USER3> _"the next atom of information can be (physically) more or less distant from the previous one"_

Not true, at least with something like DNA. When something like RNA polymerase goes through DNA, it _always_ goes to the physically closest nucleotide. Sure there is a "link" between bases in the form of molecular bonds, but this bond only works between nucleotides right next to each other. No nucleotide can bond to a nucleotide farther away, and have a polymerase follow that bond.

If DNA were a linked list, it would basically be one where every element is adjacent to the next one in memory. The whole point of a linked list is that they don't have to be like that, one element can point to another 4, 12, 32, etc bytes away. That way insertions and deletions are much easier.

DNA works much more like an array. The "index" for a gene is the promoter sequence at its beginning. A protein complex forms there and polymerase runs down sequentially from nucleotide to the next physically closest nucleotide.

Also, why do you say computers will never substitute a brain when linked lists can quite easily represent a neural network?

<comment><USER9> Computer memory is always aligned in a one-dimensional, (relatively) huge array.

All of artificial intelligence is based on a one-dimensional representation of a 3 dimensional fact (our physical existence).

DNA, our brain, every bit of information in Nature, _always_ , _exclusively_ , uses all 3 physical dimensions present to store its data, so we never will be able to directly compete with Nature in that fact. Because every dimension present has its own role, and how would you represent that in a simple computer memory (leaving out the fact that computer memory is really huge and really slow compared to the memory systems of Nature).

Do you (personally) know anything about how Nature uses _all_ of the 3 dimensions present, to align its data in a really ingenious and unique way? Do you?

Physically near has a special meaning in our human brain, and influences all the bits of information near the stored information.

So, you see, Nature is able to use all of the 3 dimensions of physical reality to represent its data, while computers (and, consequently, all of AI) seems to be condemned to use a 1 dimensional, slow, physically huge, representation...

So, please please, don't directly compare Nature with human investigation -- they are as far from each other as our planet is from sun...

The more you observe Nature (and I really do!), the more you experience yourself really ignorant about the Intelligence hiding behind...

<comment><USER3> I suggest you download FoldIt (<http://fold.it/portal/>), it does a pretty good job at modeling the 3d interactions in proteins using your computer, which I'm pretty sure also has that "1 dimensional" memory.

Do _you_ know how nature uses all 3 dimensions to store information, do you even know what you're talking about? DNA, no matter how "ingenious" its structure, ends up just being a series of bases. Each base in DNA will lead to a particular base in the resulting RNA, this is nothing more than a 1-to-1 mapping, a hash. Ever three bases of RNA (a codon) lead to a particular anti- codon which is mapped to an amino acid. Again, nothing complicated conceptually. You use a series of mappings to translate one series of molecules into another. It can be easily done with a computer. It's only complex in nature because it _needs_ to be complex in nature, otherwise it wouldn't work.

And even if 1 dimensional memory is limiting, how long until computers themselves use molecules to read and store data?

Your argument is effectively that of someone in the 19th century saying the flight is impossible because current transportation can only move on land.

Also, electronic systems are _much_ faster than biological ones, compare the speed of an electric signal in a wire to that of a nerve impulse.

<comment><USER9> In our brain, certain impulses are carried via electricity, so they are as fast as possible (inside their structure). Other, much more complex processes, don't involve electricity directly, but they are still fast enough -- but given their complexity, they are still really fast, relatively speaking, and they need quite no space (more important than everything else...).

Time is not a measure for intelligence. If it were so, humans could be defined as some of the least intelligent beings on our planet (as they need many many years to finally be adults; in fact, we need to learn so many things; most animals are quite ready when they are born -- ask somebody who knows animals).

As for your speculations of human future: are we talking about science or fiction? Although humans are really good in inventing really fantastical future scenes, that has nothing to do with science -- so let's call it fiction for now...

<comment><USER3> _"In our brain, certain impulses are carried via electricity, so they are as fast as possible (inside their structure)"_

No, electric impulses in your brain are not carried in the same way as electricity in wires. Please read up on basic neuroscience before you talk about the nervous system. Nerve signals are passed by having one section of a nerve be depolarized (lose polarity, the difference in charge from inside and outside the nerve wall), which causes the next section to depolarize, and so on. Your basic electric wire uses a difference in electric potential, or voltage, between one end and the other, which creates an electromagnetic field that moves electrons.

You completely misunderstood the importance of time. I'm not talking about long-term development (and even then your average human infant of even 6 months is far more intelligent than most animals on Earth). I meant the speed at which the nervous system works as compared to a computer. If you read my previous paragraph, you can see that a computer is still much faster than the human brain. The brain's advantage is the complex networking of all the neurons. Science has already gone a fair way in understanding the brain, we can even decipher signals to let paralyzed people control computers. How much longer until we can start modeling simple brains, and then further?

And as for my speculations, _look at what you're doing right now_. You, and I, can instantly communicate over a host of different ways even if we are on opposite sides of the Earth. If we wanted to talk face-to-face, we could even see digitized versions of each other in video chat. If we wanted to meet in person, it's only a matter of ours for one of us to go to the other. What do you think people from a hundred years ago would say when you told them such things would be possible?

It may take a while, dozens, hundreds, or even thousands of years, but your speculations of the uniqueness of nature are narrow-minded. You say that modern computers can _never_ match nature because they use 1-dimensional data storage. I've already shown you how such storage can model 3d interactions (it's not about the data, it's about the way it's processed).

Maybe we should call it fiction for now, but remember that the very idea of having a machine calculate an integral, much less solve protein structures, would have been laughable in the past.

<comment><USER9> Your position: science can imitate (and maybe even surpass) Nature.

My position: science will never ever be able to even come close to Nature (a simple example? Look at the most simple form of live possible: current (so heavily applauded) science has no idea, whatsoever, what even the principle of every live-form is consisting of -- it's called the "soul", BTW).

WWW -- Who Will Win?

;)

<comment><USER3> What counts as a living form? The definition of life is based entirely on scientific observations of what we currently perceive. Does a virus have a soul? Why or why not? (If you say it doesn't because it's not alive, what are your criteria for life? Science's?)

Remember that it is only a belief of yours' that the soul is at the heart of life. What if an entirely inorganic machine was one day created that could:

1\. Maintain its internal state (homeostasis).

2\. Harvest and utilize energy (metabolism). Very recently robots have been created that can digest organic matter and convert it to usable energy.

3\. Manufacture add-ons for itself (growth).

4\. Sense its environment and change behavior accordingly (response to stimuli).

5\. Manufacture smaller versions of itself by harvesting and creating the needed materials and assembling them (reproduction).

6\. Contain a code that can be modified and that governs its behavior, so that imperfect code can be weeded out or changed to improve (adaptation).

And this machine would be completely autonomous. It wouldn't even need much intelligence since all it essentially does is maintain itself, respond in pre- programmed ways to the environment, and create more of itself. How is this different from life other than it doesn't use life's materials? Would it have a soul?

<comment><USER9> Fiction again? Are your dreams more real than reality? You're not doing a real favor to science.

Science always has to be concrete and repeatable (as you well know). You already make my head ache, really badly...

Please remember: science can reach only that far, it has _real_ _limits_ , which nobody is able to extend, and which we all need to respect.

P.S: The principle of _any_ life in Nature is called it's _soul_ , which is invisible, and which only lasts as long as the life persists. So, every plant has its (simple) soul, and science until now has _no clue whatsoever_ what even the simplest form of these souls are consisting of -- as they are, in fact, outside of our _physical_ universe...

<comment><USER3> How do any of those break _any_ limits of science? Please, I'd love to know. Maybe you think I'm talking about Matrix-style robots and have decided that I'm just being silly. I'm not. A simple bot that has the capability of manufacturing more of itself won't be that hard, consider that most modern factories are highly automated.

Oh, as for your soul principle, do you have any concrete evidence, any proof?

Are you actually saying that science has limits because it doesn't conform to your belief system?

<comment><USER9> So, you say that it would (in theory) be possible, that the human brain could create something more intelligent than itself?

Come on, that's ridiculous.

(Like the evolution theory, which is completely ridiculous, as it says that a less intelligent being can "auto-evovle" into something more intelligent...)

At this point, any discussion is pointless, as we already completely substitute reality with fiction.

<comment><USER3> Since you:

hardly seem to read my comments

completely misinterpret what you do read

respond by calling everything fiction or ridiculous

and throw around equally baseless claims of your own.

Yes, this is discussion is over.

<comment><USER9> What a happy end, we finally agree.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER10> So "outside" now means "inside"? Lisp is reviled because it doesn't play nicely with "modern" (read: broken-by-design) technologies like MS-Windows and the WWW stack. Any attempt to make the language more cube-farm-friendly really ought to be called a boxing-in, rather than the opposite.

<comment><USER11> Calling an FFI tutorial an "attempt to make the language more cube-farm- friendly" is needlessly incendiary. The fact is, there are lots of C wheels out there that don't need reinventing, and calling them from a REPL is useful and mischievous and fun.

<comment><USER12> From what I've gleaned from the direction of many recent discussions on haskell-cafe, the good FFI support is a huge reason that Haskell is starting to fail to avoid success.

<comment><USER13> I still love that motto.</comment></comment></comment></comment>


Ask HN: Looking for some feedback on my jewelry business idea - <AUTHOR> I own a fashion jewelry manufacturing company. We currently export our products to overseas clients but the business is really low so I decided to jump into retail but with some innovation.
The idea is to start a company which sells jewelry box containing jewelries designed by AI & sold as a software product giving out monthly updates as another jewelry box which contains updated designs.
I've made a minimal landing page as well: https://hammadn.wixsite.com/gelry
Would really appreciate your kind feedback and/or advice. Signup on the landing page if interested. <comment><USER2> Hey! I checked out your landing page and I'm not sure I fully understand what "sold as a software product" means. Does it mean I get a digital file with a jewelry design that I can then do myself or do I actually get a physical product I can wear?

<comment><AUTHOR> Thanks for checking out the landing page. You'll get physical product. Jewelries in a jewelry box.

<comment><USER3> That's called that a subscription service or subscription box. Sometimes it's called a membership.

Dollar Shave Club popularized the concept back in 2012, although it's been around for decades for books then CDs, I guess DSC re-popularized it. Graze is another example.

Here are some existing services in the UK that do that with Jewelry:

[https://www.allsubscriptionboxes.co.uk/category/box/jeweller...](https://www.allsubscriptionboxes.co.uk/category/box/jewellery/)

It's got nothing to do with software. I guess you're trying to say something like "The Jewelry subscription box designed by AI that updates every month to send you new, unique designs".</comment></comment></comment>


BlackBerry Sued An Executive Who Defected To Apple - <AUTHOR> http://techcrunch.com/2014/03/26/blackberry-sued-an-executive-who-defected-to-apple/

<comment><USER2> The TechCrunch article seems to miss a few points. The main point of which is the fact that the executive in question clearly leveraged his position to get a job at Apple to lead Core OS. It's a case of leveraging his position after he was promoted to VP of Platform at BBRY.

(This information isn't cited in the TechCrunch article, but I read it elsewhere).</comment>


First Open Source Airplane Could Cost Just $15,000 - <AUTHOR> http://www.wired.com/autopia/2013/07/open-source-airplane-design/

<comment><USER2> I was wondering if the word "open source" is being used correctly in the context of aeroplane parts.

Dictionary.com has 2 definitions:

1\. Computers. pertaining to or denoting software whose source code is available free of charge to the public to use, copy, modify, sublicense, or distribute.

2\. pertaining to or denoting a product or system whose origins, formula, design, etc., are freely accessible to the public.

I guess the latter definition could apply, where the components can be produced (e.g. 3D printed) from detailed "open source" blueprints? However, I dont think the plane will be built from 100% "open source" rendered components. Generic or branded components may need to be purchased as well.

</comment><comment><USER3> The final cost of an actual airplane usually covers a lot of testing before going to market. It involves special test pilots that are ready to risk their lives while testing it. If we can find/fund a test pilot for this project, the price point can become a reality.

<comment><USER4> It's a light sport aircraft, akin to a "kit plane," so the person who builds it is the test pilot who is holding the risk.

<comment><USER5> But the design itself has been tested by the manufacturer, it's just your implementation that's untested.

<comment><USER6> Also you will need FAA inspection once it's been built if you are in the US.

In the UK you need to get a permit to fly, as you can't get a CoA (Certificate of Airworthiness) because its an unlicensed build.

Apparently (I've no first hand experience) these are rather thorough.

However my concern with this is the traceability of parts and such. There is a reason why a single rivnut costs a fortune for a plane.

<comment><USER7> In Canada, for a homebuilt LSA-equivalent you need to have the aircraft inspected and first flight performed by someone certified by Nav Canada. And no way he's going to risk his life in-flight unless he's pretty damn sure your aircraft is airworthy.

</comment></comment></comment></comment></comment><comment><USER8> I'd argue that the OpenEZ/OpenCanard project was the first... sadly it appears to be gone (the website, anyways).

This sheds some light on it: [http://www.homebuiltairplanes.com/forums/general- experimenta...](http://www.homebuiltairplanes.com/forums/general-experimental- aviation-questions/7026-open-ez-templates.html)

Note: This was based on the LongEZ, originally designed by Burt Rutan... a pioneer in homebuilt/plansbuilt aircraft (and the winner of the Ansari X-Prize).

</comment><comment><USER9> If bugfixing those planes will be as rigidly pursued as with some open source software, maybe the phrase 'buying a ticket' gets a totally new meaning ;-)

<comment><USER10> I did not get it. Please clarify.

<comment><USER11> I think it refers to the Hunter S. Thompson quote:

"No sympathy for the devil; keep that in mind. Buy the ticket, take the ride."

Basically meaning you may be getting in over your head, but you'll probably have a good story to tell if you don't end up dead. Similar to the idiom, "in for a penny, in for a pound."

<comment><USER12> I'm more inclined to think they were drawing a comparison between buying a ticket to ride a plane vs placing a bounty on a ticket/bug to be fixed.

<comment><USER11> I'm inclined to agree with you. The bounty part of it didn't cross my mind.

</comment></comment></comment></comment></comment><comment><USER13> This is great, I've been wanting to get into aviation for some time but the barrier of entry is steep.

Using their plans as a guideline for building an ultralight instead of a light sport aircraft would reduce the cost dramatically. Ultralights have much lower limits but don't require any formal training/licenses.

In the end you could probably build an ultralight for the cost of a pilots license.

<comment><USER14> > This is great, I've been wanting to get into aviation for some time but the > barrier of entry is steep.

There are some hobbies where starting without any prior knowledge and learning through a process of trial and error is fun and rewarding.

IMHO aviation is not one of these hobbies. It tends to be rather unforgiving of the "error" part of the equation, especially if the error is something like "wings not correctly attached". :)

</comment></comment><comment><AUTHOR> I was always told that new planes were so expensive because manufacturers had to tack on a huge amount to the price for expected lawsuits.

What I thought was original in this approach was how can you sue the manufacturer of a kit plane over its design if it's open source? Course lawyers will surely try so it has to be tested in court first.

</comment><comment><USER15> Tangent: predictions on a "3D printed plane"? Push a button, wait, result needs little more than an engine installed?

</comment><comment><USER16> git clone [http://github.com/open-source-airplane](http://github.com/open- source-airplane)

Damn, that didn't work.

</comment><comment><USER17> For those unfamiliar with planes, you can buy a used ultralite plane for under $10,000 in working condition. Something that has been proven to fly reliably.

<comment><USER18> In the United States, the restrictions on an "ultralight" are rather severe:

> The governing regulation in the United States is FAR 103 Ultralight > Vehicles, which specifies a powered "ultralight" as a single seat vehicle of > less than 5 US gallons (19 L) fuel capacity, empty weight of less than 254 > pounds (115 kg), a top speed of 55 knots (102 km/h or 64 mph), and a maximum > stall speed not exceeding 24 knots (45 km/h or 27.6 mph). Restrictions > include flying only during daylight hours and over unpopulated areas.

<comment><USER17> My point was, the biggest barrier to flying is not the price of the plane, but the desire to jump through all the hoops to get the license, to spend time/money on maintenance, to spend time on driving to the airport.

<comment><USER10> Don't forget the relatively high risk of general aviation.

<comment><USER19> It's not a high risk mode of transportation.. It's about as "deadly" as driving a motorcycle. Sadly, if people paid more attention to motorcycles on the road, then motorcycles would be exponentially safer and if people stopped flying into bad weather then airplanes would be exponentially safer. With that being said, there is no "Relatively high risk of general aviation".. there are lots of careers and hobbies with a much higher risk.. in fact, if I remember correctly more people die of boating accidents going out on a lake than GA aircraft.

<comment><USER20> Of course more people die in boating accidents than in GA aircraft, there is way more boating.</comment></comment></comment></comment></comment></comment>


Ask HN: Why do people sell bootstrapped startups? - <AUTHOR> A bit confused on why people sell bootstrapped companies? There is no pressure from investors (since there are no investors). I understand there is money coming in when you sell but what else makes people sell their company? <comment><USER2> Some people greatly prefer the challenges and joys of building new products and companies to the challenges and joys of operating companies over the long haul.

Selling the bootstrapped company locks in a financial return for that past effort and more importantly releases their mind, emotions and time to shift back to building something new.

</comment><comment><USER3> Sometimes because they've had enough of it and want to do something else with their time - be that working on a new idea or changing careers or just working for someone else and no longer having to be the one who lies awake at night wondering whether revenue will cover salary this month.

Bootstrapped doesn't by definition mean profitable. Some founders are using their own savings or bank loans or even credit cards as runway.

Also, even bootstrapped businesses that are doing better than breaking even may not be making enough of a profit that the founders are doing better than they would with a corporate salary.</comment>