- 67
- 191 928
Jakub Kozłowski
Poland
Приєднався 5 вер 2013
Welcome to my channel! This is where I'll post programming videos about Scala, typelevel libraries, and programming in general.
Contribute to Metals like Kasper Kondzielski - Scala with Friends
Watch how Kasper made a contribution to the Scala 3 compiler and the Metals language server! In this episode, we also talk about the various tools/protocols involved in the process, as well as what the next steps in this area could be.
Special thanks to github.com/rochala for driving this effort!
If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss another one ;)
Links:
Kasper's X: x.com/kkondzielski
Kasper's github: github.com/ghostbuster91
Scala3 PR: github.com/scala/scala3/pull/19780
Metals PR: github.com/scalameta/metals/pull/6378
I'm on X: x.com/kubukoz
on GitHub: github.com/kubukoz
sometimes stream on Twitch: twitch.tv/kubukoz
And you can buy me a coffee if you want: ko-fi.com/kubukoz
Chapters:
00:00:00 - Introduction
00:00:15 - What's the goal?
00:01:13 - Demo
00:03:03 - Structured errors initiative
00:04:36 - The compiler change
00:10:24 - The change in Metals
00:22:57 - Discussion
00:30:11 - End
Special thanks to github.com/rochala for driving this effort!
If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss another one ;)
Links:
Kasper's X: x.com/kkondzielski
Kasper's github: github.com/ghostbuster91
Scala3 PR: github.com/scala/scala3/pull/19780
Metals PR: github.com/scalameta/metals/pull/6378
I'm on X: x.com/kubukoz
on GitHub: github.com/kubukoz
sometimes stream on Twitch: twitch.tv/kubukoz
And you can buy me a coffee if you want: ko-fi.com/kubukoz
Chapters:
00:00:00 - Introduction
00:00:15 - What's the goal?
00:01:13 - Demo
00:03:03 - Structured errors initiative
00:04:36 - The compiler change
00:10:24 - The change in Metals
00:22:57 - Discussion
00:30:11 - End
Переглядів: 663
Відео
Play with your APIs in Smithy Playground
Переглядів 2293 місяці тому
Let's learn how to use the Smithy Playground tool to interactively explore your Smithy APIs (as well as the ones from AWS, or anyone else). If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss another one ;) Links: - smithy-playground github.com/kubukoz/smithy-playground - smithy4s dynamic module disneystreaming.github.io/smithy4s/docs/guides/dynamic/ - ...
Call AWS on ANY SCALA RUNTIME with Smithy4s
Переглядів 4603 місяці тому
Learn how to use Smithy4s to call AWS (Amazon Web Services) from Scala, on any platform (JVM, Scala.js, Scala Native). If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss another one ;) Project repository: github.com/kubukoz/smithy4s-course Links: - Smithy4s AWS support disneystreaming.github.io/smithy4s/docs/protocols/aws/aws/ - Smithy models for AWS s...
Extend your JVM app at runtime with SPI
Переглядів 8604 місяці тому
Learn how to add a plugin system to your JVM application using the Service Provider Interface. If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss another one ;) You can find the code here: github.com/kubukoz/videos/tree/main/java-spi Links: - SPI introductiondocs.oracle.com/javase/tutorial/ext/basics/spi.html - SPI in Java's sound APIs docs.oracle.com/...
Explore your Smithy models with the CLI
Переглядів 4194 місяці тому
This video outlines the capabilities of the Smithy CLI, and goes in depth on using it to get information about your shapes with selectors and the model AST. If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss another one ;) Project repository: github.com/kubukoz/smithy4s-course Links: - Smithy CLI introduction aws.amazon.com/blogs/developer/introducing-...
Improved reuse in Smithy with Mixins
Переглядів 3064 місяці тому
In this video, we talk about Mixins in Smithy - what problems they solve, how to use them, their limitations and possible usecases. If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss another one ;) Project repository: github.com/kubukoz/smithy4s-course Links: Mixin documentation smithy.io/2.0/spec/mixins.html Non-member property mixins: smithy.io/2.0/s...
Updating our Smithy4s stack in 2024
Переглядів 4335 місяців тому
Since the last video, we've had some version updates, and there's a new cool feature (smithy4sUpdateLSPConfig). Let's go over these together. Prerequisites: episodes 1-4. If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss another one ;) Project repository: github.com/kubukoz/smithy4s-course I'm on Twitter: kubukoz on GitHub: github.com/kubu...
Types of Shapes in Smithy
Переглядів 3015 місяців тому
We go over the types of Shapes available to us in Smithy. Prerequisites: episodes 1 and 2. If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss another one ;) Project repository: github.com/kubukoz/smithy4s-course I'm on Twitter: kubukoz on GitHub: github.com/kubukoz sometimes stream on Twitch: twitch.tv/kubukoz And you can buy me a coffee if...
Errors in Smithy/Smithy4s and how to deal with them
Переглядів 2485 місяців тому
In this one, we're talking about adding error responses to your Smithy specs and how that's handled in HTTP. Then, in the later part of the video, we go over how to raise and recover from errors in Smithy4s specifically. Prerequisites: Smithy side: episodes 1, 2, 5, 6 Smithy4s side: all past episodes. If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss ...
Customizing your HTTP spec in Smithy
Переглядів 3215 місяців тому
Let's talk about how you can customize what your API looks like on the HTTP level when using Smithy. Some Scala will be involved as a way to showcase some behavior, but this video counts as one of the "Smithy only" ones. Prerequisites: episodes 1, 2 and 5. If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss another one ;) Project repository: github.com/...
10 flavors of Scala's future - Scalar 2024 recap
Переглядів 1,6 тис.5 місяців тому
Another conference video! Has it been a year already? This time, I'm not the one doing the talking. In fact, we're barely talking about the actual conference. But I asked a bunch of questions about Scala's future and I think you'll want to hear the answers! Chapters: 0:00:00 - Intro 0:00:33 - Paweł Marks 00:01:11 - Michał Pawlik 00:02:21 - Łukasz Biały 00:03:04 - Darja Jovanovic 00:04:26 - Dani...
I got interviewed for a FAKE Scala job...
Переглядів 4,3 тис.Рік тому
In this collab with @marcinkrykowski, I'm answering his questions about Scala and functional programming. If you want to see how poorly or how well it went, enjoy the watch ;) Thanks for inviting me to this collab Marcin! Part 2 on Marcin's channel: ua-cam.com/video/gbIEVCi-mMg/v-deo.html If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss another one ;...
HTTP clients for free with Smithy4s
Переглядів 988Рік тому
Using smithy4s and our knowledge from the prior videos, let's get an HTTP client for our API. Prerequisites: episodes 1-3. If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss another one ;) Project repository: github.com/kubukoz/smithy4s-course I'm on Twitter: kubukoz on GitHub: github.com/kubukoz sometimes stream on Twitch: twitch.tv/kubuko...
Smithy4s - project setup and HTTP routes
Переглядів 1,9 тис.Рік тому
Having written our Smithy service spec, let's set up an HTTP server with Smithy4s. Prerequisites: episodes 1-2. If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss another one ;) Project repository: github.com/kubukoz/smithy4s-course I'm on Twitter: kubukoz on GitHub: github.com/kubukoz sometimes stream on Twitch: twitch.tv/kubukoz And you c...
How to write an API specification in Smithy
Переглядів 3 тис.Рік тому
Let's learn how to write API specifications in the Smithy language. Prerequisites: episode 1. If you enjoyed this video, please like and subscribe, and hit the bell icon so you don't miss another one ;) Project repository: github.com/kubukoz/smithy4s-course I'm on Twitter: kubukoz on GitHub: github.com/kubukoz sometimes stream on Twitch: twitch.tv/kubukoz And you can buy me a coffee...
Conferences are BACK! (Scalar Conf 2023 recap)
Переглядів 1 тис.Рік тому
Conferences are BACK! (Scalar Conf 2023 recap)
The Scala community will exile me for this
Переглядів 3,3 тис.Рік тому
The Scala community will exile me for this
How Scala MAGICALLY turns everything into functions!
Переглядів 2,3 тис.2 роки тому
How Scala MAGICALLY turns everything into functions!
Make your code testable with this simple refactoring!
Переглядів 1,9 тис.2 роки тому
Make your code testable with this simple refactoring!
Your vscode them is😍
Great video guys, I was wondering if those qustions could be also asked to a junior Scala developer ?
I think the questions no. 1, 2, 3, 8 are likely to show up, the rest not so much. As a junior I think your most important skill will be the ability to learn (it still is the most important skill later on, but experience will overpower it on interviews) :)
What is the scope for freshers in scala ?? And what projects should we build as a freshers ?? Thanks and loved the video!
It took me a sec to understand what you meant by "freshers", at first I thought it was a programming term 😂 because you mentioned scopes. I would expect some basic knowledge of the language and standard library, i.e. you can write a simple command-line app without messing with frameworks. Although knowledge of a HTTP client/server framework would be a significant plus. I can recommend the Scala toolkit for playing with those: docs.scala-lang.org/toolkit/introduction.html
@@kubukoz_ Hey 👋 thanks for your time and the guidance. I will also take a look at the Scala toolkit link you provided. 💯
When you write a plugin with dependencies and decide to package it as a fat jar (or a directory of jars), I guess that the Plugin interface must not be included in the packaging, we should use a "provided" scope for this dependency ?
Second time I look to this video, first time without knowing anything about SPI, second time after writing some SPI and everything is clear now. Will use this approach both to modularize our code and to provide a plugin system in order to give third parties a way to extend our software. Just fat jar will be OK for plugins (shading is not needed) as each plugin will have its own class loader. Thanks again for this video !
Edit: Like when I import a mixin from another smithy file, in the same namespace, the vscode plugin is crying that its not in the same model. I fucking hate languages that want me to put everything in the same file.
You don't need to put it in the same file. I think you may be bumping into a bug in the Smithy LSP that prevents new files from being properly registered - try reloading the window / restarting vscode and see if it helps. If it doesn't, feel free to report what you're seeing in github.com/smithy-lang/smithy-language-server/ :)
@@kubukoz_ yeah it was mostly fake errors from the linting. The linter just doesn't work properly, especially with monorepos. Also the one for intelliJ doesn't work at all as it's not yet adapted to the smithy-build.json and expects gradle build.
May I know which command autocompletion tools are you using?? You often type 3 dots and get a list of possibilities,,,
I'm not sure what you mean with three dots, the completions in this video are 100% powered by Metals, Scala's language server (and its vscode plugin). In other videos I use GitHub Copilot as well, it's an ML-based tool
Why is Ordering not contravariant in Scala? I should be able to use Ordering[Animal] to sort a List[Cat], for example.
My quick guess is that it's because Ordering also has methods like def max(x: T, y: T): T - there's a T in the covariant position.
I just checked, and there's no problem with such a definition. So, I don't know why they didn't do it 😅 But also, I remember in the past there were some issue with co/contra-variant typeclasses in Scala. gist.github.com/kubukoz/70f74407a078b96fe177168acfa16d7e
Hi Jakub could you make a video about how you manage your ADHD while programming?
I don't 😭😭😭 on a real note, I'd love to make something about this topic, but it's pretty ambitious and I don't have the capacity at the moment.
This was pretty good! Thank you for the content
It sounds like he's talking into a coke bottle. Unlistenable :(
I had to apply some pretty aggressive noise reduction, or else you'd mostly hear fans :/ I wasn't prepared for this amount of noise to filter 😅 still better than my voice quality on some of the older videos.
Completely audible IMHO
Junior = learning how to do things, what's good and bad Senior = making choices based on knowing the "what"
Hope after 2 years we can get the final episode or maybe more of the serie
episode 12 was published long ago, that's the end ;) ua-cam.com/video/erzlLMnf_8s/v-deo.html
[Error - 10:02:52 AM] Smithy LSP client: couldn't create connection to server. Launching server using command coursier failed. Error: spawn coursier ENOENT
Are you using the extension from disneystreaming? It should be able to download Coursier by itself (right now it looks like there's no such program). What OS are you on?
Reflection is good and bad is the same way, good to be dynamic and horrible in terms of performance perspective, for who understand the Proxy Pattern knows that is the core of Spring. BUT I strongly recommend take a look about JIT vs AOT.
Confirmo que la traducción a español si funcionó :D Awesome video as always.
Excelent video. Where do you use this in real-world scenarios?
I work on a team that (among others) builds Smithy tooling for our org, so we deal with Smithy validators regularly (as a user, knowing how they get loaded can also be useful for troubleshooting IDE setup or whatnot). I imagine you could use SPI to e.g. allow users of an educational website to upload additional exercise packs, but there are non-negligible security concerns in allowing arbitrary byte code to be uploaded for execution. Still, for desktop/CLI apps, plugins distributed by trusted authorities this might be suitable (let's say you're Adobe and some of your partners provide plugins for your app). Scala compiler plugins work in a similar way, although it's not actually SPI - there's an xml/properties file (Scala 2/Scala 3) at a standard location with the FQN of the plugin class.
I spent a lot of time editing this one so I hope y'all like it 😄 What was your favorite part?
The amount of effects is balanced. So I like it a lot.
1) Given how you started I was expecting a sponsor ad at the beginning 2) I like the xckd quote 3) Now that the screen size gets reduced when you say unpopular stuff, u'r a real UA-camr
@@TonioGela89 ...but before we get to that part, a word from our sponsor, VMWare...
Nice video, really liked it
Awesome bespoke content! Do you plan on having one about code generation with Smithy? Looking forward to all other videos in this series.
Like, about building a codegen? Not sure, but there will be some stuff that'd be useful for that as well (programmatic access to the model)
@@kubukoz_ Programmatic access would be quite helpful to me personally. I am interested in customizing and creating code generators currently.
For now I can only point you to the docs: smithy.io/2.0/guides/using-code-generation/index.html As for working with the model, I think the API is pretty self-descriptive in most areas. If you're not implementing a smithy-build plugin but want to load a model yourself, this can be a hurdle, and I can recommend looking at smithy-playground, smithy4s's, or the LSP's implementations: github.com/kubukoz/smithy-playground/blob/cb186f4b0b3b46ab0a47409d85537c92d4a8fe7f/modules/lsp/src/main/scala/playground/lsp/ModelLoader.scala github.com/disneystreaming/smithy4s/blob/d7afe2123095bc03389dc30c0a151bff78983ceb/modules/codegen/src/smithy4s/codegen/internals/ModelLoader.scala github.com/smithy-lang/smithy-language-server/blob/6ce7064a88be58df5fb7ebcf35e165f7fae1286f/src/main/java/software/amazon/smithy/lsp/SmithyInterface.java#L58 that said, if you can "plug into" smithy cli / gradle plugin's own build system, that's probably the easiest way to get going.
@@kubukoz_ Thanks. This is incredibly helpful as I am new to Smithy, its API and lib authoring itself. I will try both approaches from above. Overall I just need my CLI tools/options to work with Smithy IDL code as an input. ts-morph & AST libs from unifiedjs do most of the heavy lifting currently.
Great introduction. Thanks
If you set up TLS with your own certs, does Smithy have to know anything about that?
Usually this kind of thing appears to be done outside of the smithy spec, e.g. in the configuration of whatever client/server you use underneath. For example, in http4s you'd customize your Ember server's settings before launching the server.
Can you please make font in vs code a little bit bigger in your videos
I try to remember that but it doesn't always work out 🥺
Nice I have just discovered you. I think smithy is really cool tool. I am binge watching you 😅
love the vibe <3
Nice ❤
Great idea!
Thanks Kuba! Nice series with live coding!
Can you discuss about the functors and Monads?
It's one of these topics that I'm a bit reluctant to touch anymore. I gave some talks about these back in the day, here's the latest version of the talk where I described those: ua-cam.com/video/HMs_F7LXTak/v-deo.html
and there's a full list of my past talks if you want to have a look: blog.kubukoz.com/talks/
"Take your time, this is not a sprint." Scrum masters: "Yes it is" 😂
No amount of convincing will make scrum masters accept reality, or make reality accept them ;)
Thanks a lot, awesome, I've been really curious about this language so thank you, BUT - can you please stop editing the video so it's constantly switching back and forth between the screen and your face? Just keep it on the screen please as you explain.
yeah, I learned that lesson from the other comments back when this video was fresh 😅 sorry about that, I promise the other videos don't have this problem. I guess this is the Effect (wink wink) of me wanting to flex a new camera back then ;)
@@kubukoz_ Good to hear :) Not that you're a bad looking dude but I'm here to learn
hahah, indeed, this is a learning space 😅
What import did you use to apply traverse? My IDE says `Cannot resolve symbol traverse` and `*>` also unavailable (((
These days the only import is `cats.syntax.all.*` - if your IDE is still having trouble, you may need to check if there were errors when importing the build.
Thanks for the tutorial! It saved me a lot of time. I bought you a coffee, but consider setting up a Lightning address for donations :)
Thank you for the coffee! I appreciate the suggestion, but I don't want to deal with crypto, so I'll probably just skip that one cup 😅 Glad you found this helpful! Just out of curiosity, did you watch the previous episodes or did you bump into this one because of some Tapir issues specifically?
@@kubukoz_ I watched your other videos, but tbh, this was the first stream I have seen. And yes, I was dealing with the Tapir stream api 😀
Hey, thanks for the video. I really like the way you explain this concepts, you're the only one being this pragmatic for fp typelevel scala
I'm glad you see it that way! That said, there are many fantastic educators out there who are far better at it 😅
Pragmatic people are rare in our industry. Working with OCD people is one of the most miserable parts of software development.
To this day, I still try to curb my perfectionism 😭
I can’t agree more with your point of view!
Such great advice Jakub, that's rarely available on the internet. Thanks for sharing mate!
Loved this video, thank you!
Jakub, you know too much for a learner ) You would better pretend not knowing that stuff and asking simple questions ) anyway thank you 👍
I'll keep this in mind for the next video like this :)
what does thinking in terms of "senior" and "not senior" aka "junior" does achieve? id say ... data loss.
It achieves promotions, pay rises and sometimes even a change in the level of responsibility you feel :) Levels are useful. They are hardly consistent though, and one company's senior will be another's staff engineer.
when the recursive function call is at tail position it allows the VM or OS at runtime to drop the corresponding frame on the stack and replace it with the actuall result of the function call. The benefit of this is a constant stack size. In non tail position however, the vm is forced to keep each frame on the stack until the final condition is met. This growth will quickly exauhst the scarce stack memory... kaboom.
It's not the VM or OS at runtime. The Scala compiler is responsible for tail call elimination.
you can call curried on th extractor's apply method and get a fully curried constructor 😊
I found your advices actually useful.
That was the plan!
Great video, really liked your explanations, until we got to AnyVal. Opaque types are absolutely not a replacement for AnyVal, although that false impression was certainly given. Opaque types can not inherit traits. This behaviour of sometimes run time wrapping and sometimes not, can actually be what we want. For example a Polygon is an AnyVal on Array[Double]. 2 Doubles for each vertex. There are many transformations that can be done on a Polygon at runtime from Array[Double] to Array[Double] without the need to wrap. However if the type calls for a Shape, which could be a Polygon or a Circle or something else, then the Array[Double] needs a run time wrapper.
That's a good point, I haven't thought of that. Frankly I think too many devs bother about AnyVal wrapping or not (for most of them it'll never become a bottleneck!) but it may be the right thing to use when you want to inherit from traits.
Thank you for this awesome fake interview... I have worked with Scala for about 3 years now, but I have never had an interview about Scala, so this helps for any future endeavors I might take on! :-)
This code itself is a mistake. Why not decompose it?
Perhaps I did. It's a pretty old cut from a longer video ;)
This one, I think: ua-cam.com/video/Ig2rY0hR6JI/v-deo.htmlsi=3czUL5XRvLSsd62O
My 2 cents: Some answers are too long: unapply, @tailrec When there's a question about trait, the next question is usually about mixin and self type. The +, -, :<, :> on types are very well explained in the Scala for the Impatient book ... place holder for other comments after finishing the whole video ... Thank you very much for the video.
That's absolutely valid, they weren't prepared upfront 😅
I refuse to believe that as opposed to calling it a mock interview, as it happens in the first minute of the video, the wording "FAKE Scala job" is not intentionally misleading, aka. quite irritating clickbait. I find it misguided and unfortunate. Which is sad, because even though I am not going to watch it right now, I also believe that if I had, I would walk away with the impression that the content is actually useful to those interested and of decent quality. Unfortunately the initial presentation of the material devalues all that imo. But maybe others tolerate this kind of thing better. Either way, my comment is not meant to be confrontational, hopefully you won't read it that way.
I appreciate your feedback and I can see how it may seem misleading. That said, both the first minute and the description clearly explain what's happening so I don't think it's wrong. Yes, it's clickbait, but it's not a lie either (the job doesn't exist, meaning it's fake), and it's clarified early. This is the level of bait I'm currently OK with, and I've seen much worse :)
@tompoczos8312 Glad I'm not alone on this. While I would like to see more high-value Scala content like this on UA-cam, I dislike tabloid-style clickbait like this title. Even if it's not a lie, even if it's not as bad as others, and even taking into account I'm not a native English speaker, the usage of "fake" feels sensational and disingenuous to me. Scala videos are already scarce on UA-cam so I'm not sure these even need clickbait titles.
that was an good interview compared to what I got in the past
I’m very excited for job 😂😂😂