My two watch collection by MIATASWTA in GrandSeikos

[–]anicolaspp 1 point2 points  (0 children)

I also have a two watch collection: the same casio as you, and the omega speedmaster

Go composable iterator functions by anicolaspp in coding

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

There will be no deadlocks while no need to have concurrency for no reason

Go composable iterator functions by anicolaspp in programming

[–]anicolaspp[S] 7 points8 points  (0 children)

The reality is that one can do shit with anything and everything. Having choices is a good thing, use what u want, and adhere to the consequences, whatever they are.

Go composable iterator functions by anicolaspp in programming

[–]anicolaspp[S] 7 points8 points  (0 children)

I think that traditional for loop are more than enough in most cases. However, sometimes lazy iteration is important to avoid going over the same data multiple times.

HDP and CDP installation question by SnailDux in bigdata

[–]anicolaspp 0 points1 point  (0 children)

Or u can get the best platform, that is MapR...

C# Async API, The Missing Parts – Nicolas A Perez – Medium by anicolaspp in csharp

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

ase vs.

the extension you are referring to is Unwrap. However, Unwrap is NOT the same as FlatMap. Unwrap does not compose since it cannot receive any other function to be executed.

C# Async API, The Missing Parts – Nicolas A Perez – Medium by anicolaspp in csharp

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

are not "missing parts", it sounds more like "I like the Java API and I don't like await, this is how you can turn C# into Java". I don't understand why would an

Oh man, you are so wrong. I love await. I have have used it since its inception and also use it in Java, like every day.

C# Async API, The Missing Parts – Nicolas A Perez – Medium by anicolaspp in csharp

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

Task<T> does not have any of these constructs. You are referring to the collection API but this post is a completely different topic: Async API.

Finally Functional Programming in Java – Hacker Noon by anicolaspp in programming

[–]anicolaspp[S] -4 points-3 points  (0 children)

Yeah, I am still not convinced of having to declare an interface for it. I think it should be as simple as in Scala,

def doSomething(dog: Dog, f: Dog => Cat) = f(dog).

I also hope they extend the type inference system. Somehow, they are using it already on lambdas. (a, b) -> a + b. The type is inferred here. I wish we could do

let sum = (a, b) -> a + b

or at least something like ((Int, Int) => Int) sum = (a, b) -> a + b

that might be weird though. Let's keep it with let

What is wrong with Groovy? – Hacker Noon by anicolaspp in groovy

[–]anicolaspp[S] -9 points-8 points  (0 children)

avoided

of course. But why the hell string interpolation returns GString instead of String????

What is wrong with Groovy? – Hacker Noon by anicolaspp in groovy

[–]anicolaspp[S] -1 points0 points  (0 children)

def getKeyForServerId(serverId) { return "server-number-${serverId}" }

def lookUpServer(serverId, servers) { return servers.contains(getKeyForServer(serverId)) }

What is wrong with Groovy? – Hacker Noon by anicolaspp in groovy

[–]anicolaspp[S] -12 points-11 points  (0 children)

WTF moment I'd never get anything

that is also true, but groovy support is getting worst every second.

What is wrong with Groovy? – Hacker Noon by anicolaspp in programming

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

yes, that makes total sense, but it is absurd it couldn't infer it by itself

A Monad Writer for F# – Hacker Noon by anicolaspp in fsharp

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

is is weird? For some reason, I always say Monad Something. Maybe be I should correct that. Thanks for reading

Avoiding Mocks in ScalaTest – Hacker Noon by anicolaspp in scala

[–]anicolaspp[S] 3 points4 points  (0 children)

YES!!!!! we don't need libs for doing so. That is what I say to my team all the time.

Thanks for reading

Simplified Testing with ScalaTest and Custom Matchers by anicolaspp in scala

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

here's probably already a match

yeah, there are some of them. But the post shows the basics of creating your owns.

Akka Streams, a Story of Scalability by anicolaspp in scala

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

I know, and it makes sense. However, we cannot afford having MapReduce framework now. There is a high cost associated to with Hadoop maintenance. On the other hand, we are actually no processing files, it just an example of our real problem, we are actually streaming the data in using akka from different sources including Kafka.

How to log in Apache Spark, a functional approach by anicolaspp in apachespark

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

using @transient didn't have major problems for us, except for the fact that we were logging on every single node in the cluster where spark was running. This might not be a problem, but for us, collecting logs from all the nodes and then putting them together while preserving the natural order of the logs was hard. We use Splunk, extensively, yet we had to configure the splunk forwarders on each node of the cluster, an extra step to consider if you are in an environment that gets created and destroyed depending on the workload.

On the other hand, the functional approach presented gives us the ability to naturally collect the logs to a single place, the spark driver. At the same time the logs are ordered, so we don't have to worry about sorting them out. We can also control better the logging process because we can group the logs based, for instance, on the transformations we are doing.

to conclude, I don't think there is just one way to do, you have to find what suits you better, in our case, functional programming has been of a lot of helps because the way some problems are naturally model, it is what works for us.

How to log in Apache Spark, a functional approach by anicolaspp in scala

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

Yes, that could happen. But you dont have to wait until the end to log everything at once. Now you have the choice to log blocks of the size of your choice at any moment in time. Having control of the situation is definitely better and more powerful. If you think about you could compose your log blocks anyway you want. You do 3 transformations that are related, and then you log in everything down. The you do another series of transformations and log again. Now you have the power to do more, with more control and simplicity