I wonder what’s more telling about the present state of Scala, the number of comments and views here, or how detached from reality this talk appears. Next 20 years? Seriously? If not for Kafka, Spark, and Flink, and a couple other projects supported by the Apache Foundation, there’s little real demand for Scala left. They only recently bumped it up to 2.13, finally. I recall Scala core developers arguing with me it wouldn’t be like Python 2 and 3. Turns out they were right, as it’s even worse than that. I’m writing this only because it’s so painful to see such an amazing ecosystem go under. But please don’t get us started on AI-generated Scala code, it’s way too complex a language for that. Just another unrealistic promise. There is no single selling point in that relevance pitch. Only extra complexity and pipe dreaming. I don’t know who that caters to, there surely will be someone, but nowhere I know of. Sorry for the negative sentiment, despite my decades long academic respect for Martin, I’m just very disappointed about this Scala leadership 😢
@Vexcenot25 күн бұрын
I dont get what this has to do with wielding a giant axe
@hansschenkerАй бұрын
looks cool, with setting a goal to receive with a pipeline would make the game even more attractive! sample: make a tower with 4 - 3 - 2 - 1 blocks above each other, base floor 4 blocks, first floor 3 blocks, ....
@plebanАй бұрын
Please fix a typo on the first slide „Agetns”.
@TheSuccessDiaries6Ай бұрын
Thanks for sharing 🙏 Keep supporting keep growing 💗 New friend 😊
@JohnSmith-fq3rgАй бұрын
AIM AIM AIM
@rajmalhotra6264Ай бұрын
I think overuse of functional has impacted readability, clean code which scala started. Looks like these days scala has two side old school oops scala and FP evolution which is a barrier for new devs. For trivial code we dont need scientific code like FP/zio/cats etc are going in. I m nt a scala expert! but a old school scala dev who is nt with advance FP idea anymore
@GrandMenas2 ай бұрын
Super
@Jafar-Sadik2 ай бұрын
Nice. It'd be great if scala was more widely adopted by the industry outside of big/fast data applications.
@avalagum79573 ай бұрын
At 16:50, I think that mapPar is nice otherwise we need a semaphore which each thread, that runs the println(quickRequest.get ...), will need to acquire and release. If I do that demoControlFlow in Java and suppose that namesFlow has 1k elements, I guess that Java will create 1k virtual threads and only 4 can run at any time. It seems like a waste of memory to hold 1k virtual threads in the memory and gradually run them instead of gradually creating them and running them. If that waste doesn't exist (i.e. my thought is wrong), great. Otherwise, does jox also have that waste? If not, how to write some code to show that 1k virtual threads are not created at once but are created gradually as needed?
@avalagum79573 ай бұрын
At 3:54, if IntelliJ shows the type we get at the end of lines 11 ... 19, that will be great. I know it can do that but I'm not sure when it does that and when it decides not to do that.
@AdamWarski23 ай бұрын
I think the feature you're referring to is called "inlay hints" and probably can be configured to be always visible ... I only know that double-pressing command shows them. Here each intermediate value would be a `Flow[Int]`, as we are always working with numbers.
@jutublizard3 ай бұрын
is sbt still a thing in scala world?
@AdamWarski23 ай бұрын
Yes it is - and works quite well. Not ideal, but still better than the alternatives. There are some alternatives, e.g. scala-cli for simpler, single-module projects, or for sharing self-contained code samples.
@jutublizard3 ай бұрын
@@AdamWarski2 Sorry for asking "stupid" questions but i'm a bit out of loop. Last time i used Scala professionally it was 2012... . Do i remember correctly that even Intellij had some problems parsing more complicated Scala code / sbt configs at that time? Is it still worth refreshing Scala knowledge in the current (sh**ty market) ?
@AdamWarski23 ай бұрын
@@jutublizard Not stupid questions at all :) IntelliJ for Scala 2 "just works" (importing SBT, or other builds, syntax highlighting, code completion, etc.), alongside with some Scala-specific features (such as inlay hints showing intermediate operation types, or displaying the values of implicits). IntelliJ for Scala 3 still has sometimes problems, but I'd say it "mostly works". However, there's also Scala Metals (works with VS Code and other editors), which provides first-class Scala 3 support. The editor itself is not IntelliJ, but the syntax highlighting is flawless (it uses the compiler), and the compilation itself is very vast.
@jutublizard3 ай бұрын
@@AdamWarski2 Is it still worth refreshing Scala knowledge in the current job market ?
@AdamWarski23 ай бұрын
@@jutublizard Oh I won't attempt answering that :). From our - probably narrow and biased perspective - we are hiring senior Scala engineers (although, we do require polish as a spoken language, which limits our reach), and we do have clients asking for more Scala development capacity. However, keep in mind that Scala is one of the specialisations of SoftwareMill, so this might not represent the overall market.
@White_Door_80643 ай бұрын
Tapir looks like pure programming kino; Thanks Warski! I aim to learn more about it in the future!
@AreHusby5 ай бұрын
He says something about modules, that they are important but that people don't understand them. I'm one of those people. Where can I learn what he means by that?
@Andreas-gh6is4 ай бұрын
I think he means traits and objects extending that trait. If you import a package, "nothing" happens, as opposed to Javascript and Python, where importing always means some code is run to create all the symbols you need, and often some initialization (though you shouldn't do that). In C# and Java/Scala etc importing just means linking and importing the compiled code, and maybe importing symbols to namespaces. No initialization. I'm too new to know exactly when it happens, either when importing the package or when using the object, code in the object is run and the object is actually instantiated. An object could actually connect to the database or have other sideeffects.
@abhijit-sarkar5 ай бұрын
11:14 - Why mention Rust, Rust is horrible. "I shall makest thy life unbearable by promising to solve the problems that thou dost not hast".
@user-uf4lf2bp8t3 ай бұрын
Rust is amazing. It is just not for everything. Obviously, a garbage collector is preferred for most of the use cases of functional languages, but when you NEED a manually managed language, it doesn't get better than rust.
@JoanGoyeau5 ай бұрын
I agree the documentation is already top notch
@darrenkim83015 ай бұрын
Simply, Contravariance is for input, Covariance is for output. That was very helpful for understanding contravariance. Thank you!
@eg49335 ай бұрын
Scala is actually the best. Industry hasn't caught yet.
@slizzardshroomer96664 ай бұрын
I wouldn't say the best but it's one of the best.
@eg49334 ай бұрын
@@slizzardshroomer9666 all they literally have to do is get low-level features like pointers etc included. Then you pretty much replace c++ by 95% and be far more accessible and productive than in c++. Because c++ was when hardware/storage was very limited, not the case anymore.
@HelloForeignWorld6 ай бұрын
An idea for another video: Can you show how to extend this application to have some dependency injection / context? I understand this will not be “Tapir only” video, but it will help people bridge the gap between theoretical use of Tapir and a real world use of it
@HelloForeignWorld6 ай бұрын
In 18:00, wouldn’t it work if you use “AvatarError.Unauthorized.type” 🤔
@jay-hinddoston83646 ай бұрын
I am planning to use this with zio http
@heck_fy6 ай бұрын
good overview, thank you very much!)
@rockthejvm6 ай бұрын
The final effect is at 30:29 - automatic edge detection and a nice message - enjoy!
@HelloForeignWorld6 ай бұрын
Nice, I didn’t know there is a mapInto macro 😮
@ReidMewborne6 ай бұрын
Again, so good!
@HelloForeignWorld7 ай бұрын
Idea for the next video: How can you express multiple error types and especially if you want to combine different errors in an ad-hoc manner using a untagged union.
@AdamWarski27 ай бұрын
Coming up :)
@AnatolyKosorukov7 ай бұрын
This is why I love my job! Mentally with you!
@avalagum79577 ай бұрын
How do we write logging messages in Scala? I'm not expecting answers like "what's wrong with logback? log4j? ..." as I know that we can use Java libraries in Scala. I'd like to know the common/popular ways to do that in Scala.
@AdamWarski27 ай бұрын
There are dedicated logging libraries for Scala, but most of the time you can simply use slf4j. It works just fine. So logback it is :)
@GVLPedro7 ай бұрын
Thank you!, I would like to know how authenticate endpoints
@adrianabreu15657 ай бұрын
This really adds a lot of value, we're missing a lot of clear explanations such as this one in the ecosystem! Thanks for all your work :)
@ReidMewborne7 ай бұрын
I love this so much!
@HelloForeignWorld7 ай бұрын
Great tutorial. Is there a way to describe websocket messages with OpenAPI, or how would you go about it?
@nicolaenmv7 ай бұрын
I find this tutorial excellent. Anyone looking to build an API and having swagger documentation will surely find this useful. Great work!
7 ай бұрын
Sadly the nausea causing bass sound from typing I commented about on the first video still persists :(. Separating the microphone from the desk would be one way to get rid of that.
@SoftwareMillCom7 ай бұрын
Thanks for the advice, we're gonna try to do something with this
7 ай бұрын
@@SoftwareMillCom Thank you! I'm very interested in this series and would love to be able to listen future videos :)
@TJ-hs1qm7 ай бұрын
Lerp function (Freya Holmé) kzbin.info/www/bejne/goSxgqh8eqmCr7M
@yaroslavsydorenko7 ай бұрын
Wow! Great! I will try tapir 🎉
7 ай бұрын
I would be interested of a series for tapir, but before that I'd suggest separating the microphone from the desk, or adding dampening for the microphone, as in this video your typing causes low bass sounds that make at least me nauseous. I wasn't able to watch anymore after you started working on the code :(
7 ай бұрын
(or maybe just run the audio through a high pass filter on the editor?)
@sevenxym7 ай бұрын
Adam, great work! Already using tapir and it is such a lovely tool. It is making Scala world richer. The learning curve of the library is low but also allows for advanced usage. Having different options for servers, clients and almost built in Swagger UI integration makes writing HTTP API very simple. Thank you for such great set of libraries!
@avalagum79577 ай бұрын
Why does your IntelliJ not show any code hint (i.e. the arguments of a method, the methods in a class ...)? I think IntelliJ already supports scala cli? You can go at a faster pace and put more examples (at least, that's what I like. If I like it, thousands of Joe developers like me will like it too). For example (this is what I copy from Spring), how to make the query parameter optional, if the query parameter is missing, can I give it a default value, does tapir help converting the string value of a query parameter to another type that I specify, how to catch all the query parameters even when I don't declare all of them ... If tapir can provide all the features Spring has, ... well I don't know what will happen then :)
@sevenxym7 ай бұрын
scala-cli can generate IntelliJ project files and integrate via BSP to scala-cli. So this part works well enough. Once you have this configured, just use the power of a typed language like Scala and code hint suggestions from IDE to explore what the APIs are and play around with the framework. how to make the query parameter optional? -> query[Option[String]]("name"). can I give it a default value? Yes! query[String]("name").default("John"). does tapir help converting the string value of a query parameter to another type. Also, yes. you can define a query parameter for any type. But you will have to provide `Codec` that will do mapping from primitive values to your own type. Most standard types are already covered by tapir
@AdamWarski27 ай бұрын
I didn't have the scala-cli file imported as a project - hence there were no completions. Not because of any special reason, just didn't need it for the video :). As for the pace, thanks for the feedback, I'll see what the general perception is.
@HelloForeignWorld7 ай бұрын
Great idea! I hope there are more video tutorials on Tapir 💡
@somasundaramvalliappan38517 ай бұрын
Please continue this series n keep going, thanks a lot for the video
@DevInsideYou7 ай бұрын
Thank You!
@ikbo7 ай бұрын
Scala is a beautiful language at its core especially v3. Too bad it was made complicated and esoteric and as a result lost mindshare among developers. Scala 3 should have been a different language with different branding and not tied to JVM. Unfortunately they constrained themselves with the technical debt of old Scala. How sad 😢
@avalagum79577 ай бұрын
You worked with Java from 2011 - 2013: that means 2 years with Java 6/7 (java 8 was released Mar 2014). That also means you might not know much about the current java language features. You use Scala in your personal projects: I guess you're up to date with Scala. You're using Kotlin at work, you must be pretty good at Kotlin. Looking at your Scala example, I'm not sure how many spaces you use for 1 indentation. Sometimes 3, some other times 4? IMO, it's a magic if your Scala 3 example at 7:53 compiles.
7 ай бұрын
Hello. I would like to apply similar pattern to run Akka Persistence on AWS Lambda? Don't you have a code snippet you can share with us?
@TJ-hs1qm8 ай бұрын
4:54 counting 20 people in the audience
@SoftwareMillCom8 ай бұрын
It's a huge auditorium for 480 people, we had almost 300 participants + there's a better view from the back ;)
@Jankoekepannekoek8 ай бұрын
I am quite surprised this could be done without a change in the compiler! I suppose the 'derived' method on the typeclass' companion object has no restriction on the type of the first argument then.
@jamie_thompson_8 ай бұрын
you're right, "derives Foo" really has only one restriction, that Foo has 1 type parameter. The desugaring is very flexible, it's up to the "derived" method to impose any restrictions. For example, if you ask for a scala.deriving.Mirror evidence, then the compiler enforces some rules before it will synthesize a mirror for you.
@Jankoekepannekoek8 ай бұрын
@@jamie_thompson_ Good to know! Thanks!
@senthilkumarm40638 ай бұрын
Thanks for this talk. Great Engineering !
@AlexRodriguez-gb9ez8 ай бұрын
What about having monads/arrows/applicatives be "hidden" say by the eval function so that you are inside the monad at the start, but you can change the current monad using let/where
@avalagum79578 ай бұрын
Hi Nguyen, you're just at the 2nd year of your phd program but you already went through Rust, Nodejs and Go. How much time did you spend on each of them?