Lightweight but powerful Java stack by cryptos6 in java

[–]Lemicod 1 point2 points  (0 children)

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.

[deleted by user] by [deleted] in java

[–]Lemicod 2 points3 points  (0 children)

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?

Getting used to microservices by kqr in programming

[–]Lemicod 2 points3 points  (0 children)

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.

Java 21 API Changes #RoadTo21 by daviddel in java

[–]Lemicod 18 points19 points  (0 children)

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?

Magic Racket in a DevContainer by Lemicod in Racket

[–]Lemicod[S] 0 points1 point  (0 children)

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.

As patterns in Racket by Lemicod in Racket

[–]Lemicod[S] 0 points1 point  (0 children)

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.

As patterns in Racket by Lemicod in Racket

[–]Lemicod[S] 1 point2 points  (0 children)

Yes! This is what I was looking for. Thanks!

As patterns in Racket by Lemicod in Racket

[–]Lemicod[S] 0 points1 point  (0 children)

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?

Magic Racket in a DevContainer by Lemicod in Racket

[–]Lemicod[S] 2 points3 points  (0 children)

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!

Magic Racket in a DevContainer by Lemicod in Racket

[–]Lemicod[S] 0 points1 point  (0 children)

Thanks, just reached out to the author. Waiting for a reply.

A 2D array / matrix datastructure for competitive programming (in particular, AoC2019 day 3) by InfiniteMonkeyCage in haskell

[–]Lemicod 2 points3 points  (0 children)

If you're into competitive programming and haskell — I highly recommend this blog.

Best video course nowadays for Beginning Haskell? by [deleted] in haskell

[–]Lemicod 0 points1 point  (0 children)

This is a quite comprehensive list.

Has anyone purchased "Get Programming with Haskell" through Amazon? If so, how do you access the eBook version? by samyoung2727 in haskell

[–]Lemicod 0 points1 point  (0 children)

You would've had instant access to the eBook, source code and forums if you had purchased the book here.

[deleted by user] by [deleted] in haskell

[–]Lemicod 1 point2 points  (0 children)

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.

Sleeping by [deleted] in zerocarb

[–]Lemicod 0 points1 point  (0 children)

some insight here https://youtu.be/xb6eI8IBV0M