To what extent do tight-knit teams adjust their interpretation of confidence levels on an individual basis to reflect their ratio? Like, "Overconfident Oscar expressed a tiny bit of doubt, so he must not really have high conviction at all." Or, "Underconfident Uma expressed slightly more conviction than usual, so we should pay attention."
Also, from my experience, it seems like (and this isn't a strong opinion) doing competitive high school debate teams turns people into Overconfident Oscars.
Yes. Perhaps this is a performance choice for DataScript since DataScript does not keep a complete transaction history the way Datomic does? I would guess this helps DataScript process transactions faster. There is a github issue about it here: https://github.com/tonsky/datascript/issues/366
I think the article answers your question at the end of section 3.1:
> "This behavior may be surprising, but it is generally consistent with Datomic’s documentation. Nubank does not intend to alter this behavior, and we do not consider it a bug."
When you say, "situations leading to invariant violations" -- that sounds like some kind of bug in Datomic, which this is not. One just has to understand how datomic processes transactions, and code accordingly.
I am unaffiliated with Nubank, but in my experience using Datomic as a general-purpose database, I have not encountered a situation where this was a problem.
This is good to hear! Nubank has also argued that in their extensive use of Datomic, this kind of issue doesn't really show up. They suggest custom transaction functions are infrequently written, not often composed, and don't usually perform the kind of precondition validation that would lead to this sort of mistake.
Yeah, I've used a transaction functions a few times but never had a case where two transaction functions within the same d/transaction ever interacted with each other. If I did encounter that case, I would probably just write one new transaction function to handle it.
Yes lots of programming consists of gluing together libraries, but in my experience languages vary dramatically at how well they do even this.
For example, consider logging libraries. It's useful to have statements like log.debug(someSlowFunction()) in your code. In LISPs it's really easy to create a (debug) macro that generates empty code when you don't want debug logging turned on. In other languages, you have to wrap the arguments in a function to avoid extra runtime costs, and even then you can't avoid the "if debug" conditional at runtime. All those anonymous function wraps add clutter, and that clutter accumulates. There are many other cases where having advanced language features greatly helps gluing together libraries.
Another aspect is the tooling. When I am considering a new library, I like to try it out in the REPL. In Clojure I can quickly start calling library functions, and use the (time) macro to get a sense of how long they take to evaluate. Not all popular languages are amenable to this kind of REPL-driven experimentation with libraries.
Not only does the language impact how you use libraries, but it also impacts what libraries may exist. Some libraries are simply not possible to write in less powerful programming languages. In LISP this would include any library that uses a macro. For example, Clojure was able to introduce core.async as a library, providing an async facility similar to what golang offers. But in most languages you wouldn't be able to implement that as a library.
Another major example is reagent vs. react. The concise hiccup representation supported by Reagent is only possible because of design decisions that went into Clojure. JavaScript users are stuck with JSX, which is less concise, and in my opinion far less good.
Another issue that arises when using libraries is whether or not the language has a static type system. Without getting into the age-old flamewar about static vs dynamic typing, I'll just note that popular languages differ in this dimension, and this has a big impact on what it's like to glue together libraries.
So overall, I think this essay undersells the benefits of LISP. Even if you spend all day gluing together libraries, LISP makes that much better by improving how you can call libraries, how you can quickly experiment with them, and even what kinds of libraries can exist.
> All those anonymous function wraps add clutter, and that clutter accumulates.
Another great example of this is feature flags -- adding/removing an entire chunk of code in most languages tends to be limited to (for example) the inside of a function.
... is not possible in most languages, where you end up intermingling conditionals into the body of definitions and functions all over the place, creating dead code and issues besides.
> JavaScript users are stuck with JSX, which is less concise, and in my opinion far less good.
And a key aspect to it as well is that JSX is a fully-custom extension, not something that can be implemented in JS as a library -- whereas Hiccup is 'just another library' allowing for fast iteration and experimentation by the community.
If the code in the parens that does what I think it does, Ruby has the same capability. Ruby allows you to redefine and even undefine... just about everything. Case in point: `binding.local_variable_set`. https://www.rubydoc.info/stdlib/core/Binding I think the only thing you can't do is undefine a local variable.
I've used environmental variables to determine which modules extend a class. This allowed me to test the same code against two different apis while we were migrating vendors. While this is done at "compile time", it could have easily been done during run time.
One nightmare of a system I worked on had the initializer of a class conditionally load modules to completely redefine the class. I called it reverse inheritance because it did the same thing as inheritance, without any of the readability or simplicity. Just because you can do a thing doesn't mean you should do a thing. XD
But I think Ruby is the exception that proves the rule. It allows absolutely crazy things and probably deserves the label of being a weird language. It's just wrapped in the trappings of a non-weird language.
I am going to argue for a most normal language with your points.
> For example, consider logging libraries. It's useful to have statements like log.debug(someSlowFunction()) in your code.
Java/C# have good debuggers and thus you can set breakpoints.
You often want to have a debug printing in final release build anyway, activated through a --verbose option for example.
Thus I think this is less useful than it seems.
> Another aspect is the tooling. When I am considering a new library, I like to try it out in the REPL. In Clojure I can quickly start calling library functions, and use the (time) macro to get a sense of how long they take to evaluate. Not all popular languages are amenable to this kind of REPL-driven experimentation with libraries.
In python REPL you can do a reasonable level of experimentation with libraries. You can't do weird stuff like runtime monkey patching but that's not always considered a good thing.
In java also, there's jshell. (importing maven libs is little roundabout, but there are packages for that, and in return you get a solid ecosystem with static typing and great compilers / runtime.
> Another major example is reagent vs. react. The concise hiccup representation supported by Reagent is only possible because of design decisions that went into Clojure. JavaScript users are stuck with JSX, which is less concise, and in my opinion far less good.
It's a matter of opinion. In my opinion, jetpack compose or flutter (admittedly, fringe language but can be learnt by anyone with java or c# experience), are better way of doing UI than jsx / fxml etc..
> Even if you spend all day gluing together libraries, LISP makes that much better by improving how you can call libraries, how you can quickly experiment with them, and even what kinds of libraries can exist.
I think benefits of macros is way overblown, and higher order functions with ocassionally well documented APIs that use compile-time or run-time reflection are good enough. Macros are not worth the readability and compile time sacrifices.
Overall, my point is, blub paradox isn't one dimensional. I place more importance to tooling and libraries than language itself, as long as language isn't horrible.
I agree with your main points but to be nit-picky, every C/C++ project I've ever worked on was/is able to 100% compile out logging code with a compile time flag. No "if debug" is left in the compiled code, it just doesn't exist.
That's a good point. Even though this would weaken my argument (slightly), I now wonder if modern JITs can completely optimize debug.log(someExpensiveFunction()) into a NOOP if they realize that the argument won't end up being used inside the log function.
The javadoc for slf4j's Logger.debug implies that the JIT cannot be relied on for this:
"This form avoids superfluous string concatenation when the logger is disabled for the DEBUG level"
I think that means if you call Logger.debug("a"+"b"), the string concatenation happens even if DEBUG logging is disabled. But maybe JITs have improved since that javadoc was written, or the author was not aware of how smart JITs are.
I would be curious to know if there is a JIT expert who could weigh in on this question.
In the case of non-toy runtimes in general to be honest.
It's one of the simplest and most commonly implemented peephole optimisations - perl has handled it for as long as I can remember, I'm pretty sure cpython does, etc. etc.
Like others, it took me a while to understand what this actually does. Even coming from a Clojure+Datomic background.
As best I can tell, this is like phpMyAdmin for Datomic. But the cool and unique thing about Hyperfiddle is that in addition to writing queries and seeing the results, you can customize the result display using markdown or even arbitrary clojurescript code. Then you can generate forms to input new data (based on the schema of the database), connect it to more clojurescript, and before you know it you've built a web app. Because the whole thing is web based, you can send a link to your "fiddle" (web app) to other people, and they can use it without knowing anything about programming. This is all without git, editing text files, or even thinking about deployment or hosting. I think that's all pretty cool.
In most situations, this would be dangerously powerful, especially running on a production database. But Datomic has unique facilities for speculating "what if I transacted this" (which is how the hyperfiddle staging area works). Datomic also has powerful undo and time-travel options, which makes it much less terrifying to hyperfiddle it.
It's also cool that hyperfiddle queries/views/code are all stored in Datomic, so you get a sort of version control type layer built-in.
I think this is a cool vision for making it much quicker to develop lightweight database-backed web apps. Obviously the current state of hyperfiddle needs a lot of work on the UI and home page to explain this all.
I know that algorithmic betting on horse racing is popular in the UK via exchanges like Betfair. Does anyone know if there is an exchange/API for Hong Kong horse racing?
You might think from the URL or logo that this is some kind of official ClojureScript page, but it's not. The official page is clojurescript.org (no hyphen).
I don't speak in any official way for ClojureScript, but as an enthusiast, I wish this author had chosen a different URL to make that more clear.
Other ideas to mitigate the confusion: using a different logo in the corner; prefixing the html <title> with "unofficial"; and adding a more prominent link to clojurescript.org titled "Official ClojureScript Page".
The main purpose of this page is trying to make new developers come to ClojureScript feel better by providing informations. People in Clojure community already knew it so I don't have to emphasis that my side is unofficial again. Plus I added a link at the corner.
Still thanks for putting down you impressions. But I thought about you option before when posting to Reddit.
I agree there are many considerations when choosing a library, but conciseness does come up. For example, I was recently impressed with how concise http-kit is. The author seems proud of it too:
You and I probably just have different values on this matter. Your comment implies that conciseness is merely "nice", so I'm guessing you just don't value that aspect of code as highly as I do.
I place zero value on the detail of the implementation of a library; only on the API that I use.
It's like picking a radio at the shop by opening each of them up and inspecting the quality of soldering and board schematics.
...yes, you'll get a better radio if you do, but if you're furnishing a kitchen, you'll spend the rest of the month opening appliances and looking inside them instead of building your kitchen.
Also, from my experience, it seems like (and this isn't a strong opinion) doing competitive high school debate teams turns people into Overconfident Oscars.