u/Lemicod
Lemicod
Lemicod
Now, lets switch things up a bit. Lets assume the Producer wins the next 2 races.
So now the broker queue has 2 elements in it
Given the implementation presented in the article, is it even possible for the broker to have more than one element, at any point in time, regardless of who wins the race?
This while loop
private final int MAX_SIZE = 1;
...
while(broker.size() == MAX_SIZE) {
broker.wait();
}
will prevent the Producer from adding anything to the broker queue, unless it is empty. Am I getting this wrong?
Lemicod
Great article, I'm also getting used to them, having prior experience only with monoliths.
Here's a nice trick on detecting dead code in microservices.
Lemicod
Isn't the feature mentioned at 2:34 already available since Java 7??
It appears to be so according to Java docs
https://docs.oracle.com/javase/7/docs/api/java/util/regex/Matcher.html#group(java.lang.String)
Also, I've used it already multiple times years ago.
Am I missing something?
Lemicod
Rife2
Lemicod
The team behind the Koka language are doing amazing work on this frontier.
Lemicod
Hi, it roughly boils down to the following:
apt-get install xvfb
export DISPLAY=:0
Xvfb :0 &
You can find the dockerfile and devcontainer.json files on the repo that's mentioned in the post.
Lemicod
Not always, for example when you want to use match-let, you usually have an expression on the right side, not the actual value. Similar thing is with match-lambda, you don't have the whole value bound to a variable in scope.
Lemicod
Yes! This is what I was looking for. Thanks!
Lemicod
Thanks for the quick reply. I am aware of the case where you can match parts of the data structure, but I'm looking for the possibility of binding the whole structure as well (list variable in example above).
Do you know if this is possible?
Lemicod
Thanks for the suggestion, but unfortunately it didn't help, I still get the same error.
Scratch that, I forgot to define DISPLAY=:0 envvar.
Works like a charm. Thanks!
Lemicod
Thanks, just reached out to the author. Waiting for a reply.
Lemicod
Lemicod
If you're into competitive programming and haskell — I highly recommend this blog.
Lemicod
This is a quite comprehensive list.
Lemicod
You would've had instant access to the eBook, source code and forums if you had purchased the book here.
Lemicod
A great follow-up Haskell in Depth
Lemicod
If you strive to a more FP-oriented ecosystem at work, the language doesn't really matter (in this case especially); given the discipline, you can write pure functions, immutable data, etc. in any language. The main criteria in this regard is the willingness of the team to practice FP. If they are OOP acolytes, your chances of writing FP code there are bleak, regardless of the language.
Lemicod
some insight here https://youtu.be/xb6eI8IBV0M
There's an ongoing effort to make an annotation/magic free Spring Boot called Spring-fu. Hopefully it picks up some steam, as it was on the backburner for quite a while now.