‘Woof’, a pure Scala 3 logging library
21–30 of 50 posts
Re: ‘Woof’, a pure Scala 3 logging library
#22Can someone please explain the purpose of a logging library (woof, log4j, etc)? There must be something beyond writing text to an external file, possibly with different error levels, that I'm missing. This is a serious question. I truly do not understand what you gain by depending on an external library for this (seemingly) simple operation and would appreciate some insight. Thanks!
Re: ‘Woof’, a pure Scala 3 logging library
#23Can someone please explain the purpose of a logging library (woof, log4j, etc)? There must be something beyond writing text to an external file, possibly with different error levels, that I'm missing. This is a serious question. I truly do not understand what you gain by depending on an external library for this (seemingly) simple operation and would appreciate some insight. Thanks!
Re: ‘Woof’, a pure Scala 3 logging library
#24Earlier quoted context omitted.
Where did you read "category theory" in that article? I'm not familiar with Woof but it looks like an attempt at writing a pure logging lib. What is wrong with that?
the so called "purity" is achieved by using a higher kinded type and the cats IO monad. it's like adding "1+1" with a "mathematical-calculation-monoid-combine-factory-builder-singleton-locator-evaluator-pattern". I remember keeping it simple as an ultimate goal but maybe I am just too for this FP peeing contest? why is it such a frickin' deal to log a message somewhere?
Need I remind you of the Log4J debacle? It's definitely a big deal.
Whether this is the right approach is another matter.
PS: trust me, you don't need to read on category theory to use or understand monoids, which at the level they are used in Scala and Haskell code, they are trivial to understand.
Re: ‘Woof’, a pure Scala 3 logging library
#25I have lived the life of somebody who wants to have every effect annotated, still on some level I believe maybe it can be achieved someday with ergonomics. I have done a lot of rust now and when I look back, I look differently at monads and those abstractions now. Maybe I felt smart using them.
There is some value in being able to just look at any library and being able to understand what and how. I have done this a lot in Rust. Scala has some amazing libs and I can't deny that they were immensely powerful, it wasn't easy to make sense of it all though, forget about tweaking and making changes easily.
All in all I have come to realise, there is no perfect paradigm, get work done. Use what makes sense. So stop fretting over dart/go, don't bemoan Kotlin, use Scala when you can and don't worry about making everything a kliesli. And really I would not worry about my logger having a side effect. Effect systems still sound cool though, maybe someday.
Not worrying about programming languages and code golfing has made me a much better and productive developer, I think.
Re: ‘Woof’, a pure Scala 3 logging library
#26Earlier quoted context omitted.
Where did you read "category theory" in that article? I'm not familiar with Woof but it looks like an attempt at writing a pure logging lib. What is wrong with that?
It's using IO monads
Also: you don't need to know category theory to use the IO monad.
Re: ‘Woof’, a pure Scala 3 logging library
#27Earlier quoted context omitted.
the so called "purity" is achieved by using a higher kinded type and the cats IO monad. it's like adding "1+1" with a "mathematical-calculation-monoid-combine-factory-builder-singleton-locator-evaluator-pattern". I remember keeping it simple as an ultimate goal but maybe I am just too for this FP peeing contest? why is it such a frickin' deal to log a message somewhere?
> I remember keeping it simple as an ultimate goal but maybe I am just too for this FP peeing contest? why is it such a frickin' deal to log a message somewhere? Don't know about others but for me it is about being able to easily verify that my logging is setup correctly. Once you write your logging to some monad (the library we use does not require it to be IO) testing it becomes trivial with a WriterT monad where i…
Re: ‘Woof’, a pure Scala 3 logging library
#28Having been primarily a Scala dev for the last 12 years I feel like people have slowly lost their minds over what pragmatic FP in Scala should be. People are willingly recreating the Java situation of 'I don't know the project yet but I know we need Spring!' with these ridiculous libraries from Haskell zealots for no obvious benefit. The ergonomics of this lib out of the box are literally worse for no reason, and wor…
As an observer of this exact phenomenon, I suggest that it is due to the culture that comes with scala. In any given scala-centric organization, there's going to eventually be someone who has mastered the art of talking High Scala. Unless there is someone equally skilled on both dimensions (persuasion and SW eng), and unfortunately, someone approximately as senior, then there is an interative game where added abstrac…
Re: ‘Woof’, a pure Scala 3 logging library
#29Earlier quoted context omitted.
> I remember keeping it simple as an ultimate goal but maybe I am just too for this FP peeing contest? why is it such a frickin' deal to log a message somewhere? Don't know about others but for me it is about being able to easily verify that my logging is setup correctly. Once you write your logging to some monad (the library we use does not require it to be IO) testing it becomes trivial with a WriterT monad where i…
Why would I verify logging which itself is a verification instrument? And, seriously, how hard is it to emit a diagnostic message so I need a test for that to get it right?
Re: ‘Woof’, a pure Scala 3 logging library
#30Having been primarily a Scala dev for the last 12 years I feel like people have slowly lost their minds over what pragmatic FP in Scala should be. People are willingly recreating the Java situation of 'I don't know the project yet but I know we need Spring!' with these ridiculous libraries from Haskell zealots for no obvious benefit. The ergonomics of this lib out of the box are literally worse for no reason, and wor…
This problem with the scala community exists because it is composed of two different philosophical schools of thought. There's the ML camp, which is where we get all of the awesome pragmatic features of the ML family of languages (Martin Odersky has been very clear that Scala is philosophically an ML-family language). And then we get the Haskell camp, which rightly determined that the Haskell ecosystem was terrible.…