Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Question:

The author writes (as an example of his problems relying on classes):

Well, some tables when updating need to do more than just “update” a record, such as insert a log into a side table.

I do not understand exactly if there is a problem here, or anyway I do not understand what the Functional alternative would be.

Assuming this is a problem, I suppose we have three choices:

a) You have to provide implementation for two distinct methods: - Update(...) and LoggedUpdate(...) (the latter calls the former and then logs the result, most probably).

b) You decide that update() implicitly logs maybe based on a global configuration or similar mechanism.

c) You provide a boolean flag as parte of the method signature update(log).

What would be the proper Functional approach here?

(Caveat - I have no experience with Functional programming)



sort by: page size:

Question: how do you feel about the lack of exceptions? To me, that's the biggest drawback to Go as it feels like sacrificing a major improvement in reliability and boilerplate reduction (obviously with Python-style syntax, not Java).

Question: I've built something that supports full CRUD, and queries that span multiple data sources with optimization and pushdown

What kind of headline would make you want to read/try such a thing?

(I'm planning on announcing it + releasing code on HN but have never done so before)


Question: why half of the salt isn't hardcoded in the application code? That would make a database access completely useless without a deeper penetration, and it's really easy to implement.

Question: why don't I see sites like "99 trivial, first-week-of-class problems solved in C?" If I have to stop and think about how to do the things on that page, or consult a web page to find out how to express them, then the language I'm working in is simply broken.

What problem(s) do software developers typically have that are solved by working in functional languages?


Question: can we use Carmack's post to say anything about statically typed languages versus dynamically typed languages? I'm versed in both and like both, so wanted others' opinions. I love(d) Haskell because it pretty much worked if it compiled (but monads are too restrictive); I work in Python because it's what most clients are using. But I read Carmack's post and think that I should be coding in a statically typed language again... No?

[PyCharm is great, but IDEs just don't do dynamic code like they can static code and it hurts.]


Question: Formal methods found the bug, but now that we know about it, what lessons can human programmers learn? That is, in the spirit of "20/20 hindsight," can we see the false assumption that made the bug possible as an instance of a certain kind of mistake, which we can look for and avoid in the future?

Or do you think the only lesson here is "Never fully trust anything that hasn't been formally verified"?


Question: Could a algorithm in scheme handling anonymous data handed to it by lambda predecessor functions traverse this process backwards- and create cache optimal objects.. that is structures that contain all needed data in the biggest possible density (no dead weight as it is usual in oo-objects)

Because if thats the case- and you put your data out- in a sort of masked union of the input data, you could create a nearly cach-miss free algorithm. Which should outperform everything except assembler altered C..


Question:

Why does Java have so many security holes? Is it really worse than any other language, or is it just so ubiquitous that it presents itself as a good target?


Question: 1. Can a GET request have a non-empty request body?

2. Assuming you don’t know the answer to that question, will the type system you use be able to tell you the answer to that question?

This is a pretty simple constraint one might want (a constraint that only certain requests have a body) but already a lot of static type systems (e.g. the C type system) cannot express and check it. If you can express that constraint, is it still easy to have a single function to inspect headers on any request? What about changing that constraint in the type system when you reread the spec? Is it easy?

The point isn’t that type systems are pointless but that they are different and one should focus on what the type system can do for you, and at what cost.


question: what do we do about this? Is this just how it's going to be? I wonder how much total programmer time was wasted re-learning how to do the same thing in a slightly differently flavored framework / language / pattern. Supposed we would have ended up with more overall productivity and stability in software had it not been for the endless iteration on the same old stuff.

Question: is it easier to implement a language that has manual memory management or a GC, or does it not really make a difference these days?

Question: what is the proper verb to use with a query? I always thought of it as a GET and passing the query via the body. You are GETting information, rather than trying to add information.

For that matter I've never quite figured out when to use POST vs PUT. POST doesn't feel right for a query.


Question:

With these "Serverless" frameworks (Zappa, Chalice, Serverless, etc), do you have to redeploy to Lambda every time you want to test your changes during development?

Is there a way to develop locally and get quick feedback?


This is some very impressive stuff, I look forward to trying it out. Question: Have you run into any cases where the hints have actually caused significant roadblocks to discovering the underlying problem? I can't count the number of times a compiler error has sent me down the wrong path entirely, I wonder how much worse/better this is with more human-readable hints.

Question - how well does the query parser handle stale queries? SQL Server for the longest time had issues with plan stability in that the plan became too stable. When the data distribution changed dramatically, the queries didn't age out of the cache and the queries would do such things as use the wrong index, or not work out the correct cardinality of a table and then use an index where really a full table scan would have been better... and so on.

How does the database handle this sort of thing?


This is really great! Maybe I'll incorporate this into my own software (scratchdata/scratchdb)

Question: it looks like you wrote the parser by hand. How did you decide that that was the right approach? I myself am new to parsers and am working on implementing the PostgREST syntax in go using PEG to translate to Clickhouse, which is to say, a similar mission as this project. Would love to learn how you approached this problem!


Question - the job/hiring post on hen for November has many positions for clojure and one definitively for Scala. Here, I see references to investment banks using scala.

Has scala become a readable alternative to java, while most of the future focus is on clojure? Does anyone know how real life performance compares between both.

From my viewpoint, scala is in use at several banks and Twitter - clojure doesn't really have a big name advocate behind it. From a startup standpoint, isn't talent/hiring an issue?


Question: can you modify, compile, and run that code and still have it work for the same uses?

Question: why do you claim EdgeDB is a "relational" database when you can't actually do relational algebra with it? How do you join?

Materialized edges (i.e. what you call "links") are not part of any relational model, it's a part of the graph model. You seem to have implemented a graph database, but possibly without the graph walking capabilities of graph databases.

next

Legal | privacy