- Видео 7
- Просмотров 17 451
Andre and Ryan Program
Добавлен 27 май 2022
Efficient 2D rendering on GPU
Today we talk about getting 2D graphics on screen using an atlas texture, starting simple and getting more efficient as we go.
This technique is great for drawing a 3D game's UI, for drawing everything in a 2D game, or for drawing an app's UI.
Boxy on GitHub: github.com/treeform/boxy
0:00 Intro
0:25 What is an atlas texture?
0:43 Why use an atlas texture?
1:50 Making an atlas
2:33 Generating an atlas
3:25 Example generated atlas
4:50 Runtime atlas
6:52 Tiling atlas
9:08 Fixing the mipmap issue
10:53 Optimizations
13:16 Resizing an atlas
14:21 Why not 3d texture?
15:04 Boxy open source library
15:40 Using Boxy
16:53 Closing
This technique is great for drawing a 3D game's UI, for drawing everything in a 2D game, or for drawing an app's UI.
Boxy on GitHub: github.com/treeform/boxy
0:00 Intro
0:25 What is an atlas texture?
0:43 Why use an atlas texture?
1:50 Making an atlas
2:33 Generating an atlas
3:25 Example generated atlas
4:50 Runtime atlas
6:52 Tiling atlas
9:08 Fixing the mipmap issue
10:53 Optimizations
13:16 Resizing an atlas
14:21 Why not 3d texture?
15:04 Boxy open source library
15:40 Using Boxy
16:53 Closing
Просмотров: 1 926
Видео
Pixie 5.0 out now - improved graphics performance!
Просмотров 2,3 тыс.2 года назад
In today's video we are discussing our latest major Pixie release. We talk about the improved SIMD (adding AVX2 and NEON), using trapezoids to speed up simple path filling, and a few other great improvements. Intro 0:00 Itinerary 0:21 SIMD 0:44 SIMD macro 3:28 Path filling 5:18 Image compositing 10:40 nimsimd repo 12:00 Faster PNG decode 12:25 Animated gif 12:56 Removing Mask object 13:48 Theor...
Discussing Nim 2.0
Просмотров 6 тыс.2 года назад
Nim 2.0 has been a hot discussion topic lately. In this video we share our thoughts on the many things being discussed for the upcoming new version. 0:00 Intro 2:20 mm:orc 4:32 threads:on 8:00 overloadableEnums 10:18 dotOperators 3:00 -d:ssl puppy 17:38 zlib zippy 19:35 async stack traces 21:37 Backward compat cleanup 22:35 Optional and not nil 26:52 Style insensitivty 30:16 Big vs small standa...
Nim Metaprogramming in the Real World
Просмотров 5 тыс.2 года назад
Originally presented at FOSDEM 2022 Metaprogramming in Nim is very powerful. But why would you use it? How is it used in the real world? We will explore the "power levels": starting from generics, continuing to templates and finally arriving at macros. We will first look at generics usage in VMath (Vector Math Library) and Jsony (JSON Parsing Library). Then we will continue on to templates and ...
The details of JPEG decoding in Nim
Просмотров 7642 года назад
In this video we discuss JPEG decoding in Nim. A blend of JPEG theory and programmer implementation details. Here is the awesome JPEG video we mentioned many times: ruclips.net/video/Kv1Hiv3ox8I/видео.html Pixie on GitHub: github.com/treeform/pixie
Loading JPEGs in Nim using Pixie
Просмотров 4112 года назад
Today we are talking about the new 100% Nim JPEG decoder in Pixie. Open source repo mentioned in this video: github.com/treeform/pixie
GPU Gaussian Blur in Nim using Boxy and Shady
Просмотров 8162 года назад
Today we are talking about adding GPU drop shadows to Boxy. Drop shadows are very common in UIs. In this video we talk about how we are implementing them on the GPU using Nim, Boxy, and Shady. We also take a look at the PR from our previous video, which adds GPU blurs to Boxy: ruclips.net/video/oUB0BGsNY5g/видео.html Open source repos mentioned in this video: github.com/treeform/pixie github.co...
LOL windows
talk about nim with complain about windows in between, good job, so professional.
There's another level of metaprogramming I believe. Look up homoiconicity. Probably not a option for Nim though...
Good to know
About the first simple generics example shown from VMath (I don't know if this was a simplified version) how can the type system allow arithmetic operation on any type T passed to it (as there are no constraints shown)?
And I got the answer @10:28 :)
How does path filling work for very large shapes? Do you still have to cast the scaline over the whoe bounds, or can this be limited to the viewport? I noticed that in Chrome, when you display very large SVGs, rendering becomes really slow, but only if convex shapes are included.
You guys are awesome!
Great presentation and great libraries, congrats!
Andre, thank you so much for this video and your Nim libraries. I'll be watching, learning, and note-taking if you do more presentations like this! 🙂
I’m just starting with nim but I’m already amazed not only by its unique feature set but also community which provides such a great solutions and presentations. Thank you for this video 🎉
Late to comment but thanks for all your work guys!
Thanks for the very interesting presentation. I am very new to Nim. This is above my pay grade but still learned a lot. Cheers from Canada.
Typo at 11:06 your parameter is op but you use operator in the the template body. Assuming I'm understanding correctly.
Python standard library actually *recommends* using requests. Like how weird is that? It's like placing your stl in in a legacy box by definition. If its too complicated to be in the standard library sure, but requests in the year 2022 needs to be in a standard library or the stl is garbage.
Ikr? And neither does resume. There are pip and poetry patches in limbo for that.
if only nim is curly based language.. i cant get through the white space sensitive
Then add curlies as comments.
You could like Haxe
Odd wish -- aren't the majority of choices for similar scope languages curly based? Why wish one out of twenty or so that isn't to be curly based?
You could just use () instead. Nim allows that You can go all the way from: proc hello(): void = ( echo("Hello Nim") ) To this: proc hello = echo "Hello Nim"
Subscribed. Keep it coming
this hack worked 100%!!! it's amazing
GG finally something that works
cool stuff. is there a project you're building this infrastructure for?
Prⓞм𝕠𝕤𝐌 🤪
First!!!
AMAZING!
please don't say orc, it's ORC ( O Ar See ) :D
shady looks VERY interesting
continuation passing style should be in the nim standard, from there, we can build any construct, the nim cps is a great example of that
I disagree. Continuation passing style is something that looks like it doesn't belong into a language like nim & where one would use things like iterators or coroutines or another async flow control syntax.
@@FrankHarwald cps can be used to build those control flows in libraries.
Your libraries are pretty cool man, congrats. Im interested in doing something similar to Shady, where instead of GLSL it outputs VEX. I was wondering if with your current approach, is it feasible to use GLSL libraries via doing bingings? I guess you can do ad hoc substitution but not sure
Guys, ffmpeg has loudness normalization built-it. It's just a single command to bring your volume to a comfortable level before uploading. Step up your game.
I'm watching this video at 153% volume 😄
RUclips have this built in by now?
Complaining about style insensitivity is even worse than complaining about white space -- it's optional.
Exactly, I am just tried of seeing comments (like yours above, and mine right here) mentioning it all the time.
@@treeform still gonna say it, white space sensitive language is weird as hell
@@_slier It sucks at oneliners, but code should normally be indented, anyway.
@@_slier I wouldn't use any other one
Option type is a godsend… have you guys never used rust??
Sorry don't use Rust. In Nim it just feels like an extra wrapper that annoys you. Isn't Rust is all about trading annoyance for safety so I can see how it fits well there?
@@treeform that is a perfect description of return monads in Rust. IMO Kotlin handles this better with syntax for marking nullability, null-coalescing, and an operator for "if (this == null)".
Andre, you convinced me on the case insensitivity issue. Flame wars are annoying. In fact, Nim needs some other changes to prevent even more flame wars: - Change imports to python-style imports, because python developers want to write python in Nim - HN doesn't like whitespace, so let's change Nim to use braces - Remove any memory management except manual, because HN taught me that's the only way to be fast - Rewrite the compiler in Rust, that would get endless upvotes on HN The roadmap is so clear now. With this approach, Nim will be popular in no time. Long live HN-oriented development! /s On a more serious note, I understand your frustration. I think the flame wars are a sign of people being interested enough to keep an eye on Nim, but not enough to actual learn how to use it. There's always a lot of excitment discussing things happening IN Nim itself. What's missing is exciting things being BUILT WITH Nim. We could look at Zig as a comparison. Where is Nim's Mach Engine or bun.sh? Not specifically, but in spirit. Nim has a ton of useful features and libraries, but not enough shiny ones.
The difference with the other flame wars you've listed is that there are other languages with such features *and* there are good reasons why Nim does things that way: - Change to Python-style imports: this would break Nim's UFCS, so we cannot do it. And there is plenty of other languages that do it the same way. - Whitespace: Python does it the same way (even Haskell has a bit of this!). Objectively it makes sense to use indentation (something which every programmer already does) to delimit scope. - Remove any memory management except manual: funny you mention this because that is kind of what's happening, with arc/orc Nim is following this hype. I personally feel that the gc is fine. But again, plenty of languages that just have a GC. Style insensitivity is only done by Nim. There are no other languages that do things this way. This means it puts off a significant majority of people and the objective benefits of this feature can be emulated using macros. Removing style sensitivity would also simplify Nim's implementation.
@@d0m96 It's not his conclusion I take issue with, I'm not sure where I stand on case sensitivity. Changing his mind based on HN-bikeshedding is what I think is counterproductive.
@dom96, I super agree with you. Style insensitivity is just an odd thing to have.
So I'll have to be honest and say that I commented before watching the video and based on how I read @Atlas' comment it read to me as "You've convinced me that style insensitivity makes sense" :) Please consider adding sections to the videos, skimming through a video to find the style insensitivity section wasn't easy. For those looking it starts around 26:50. Now that I've watched that segment I agree with your take @treeform. I've been seeing this come up for now almost 13 years, it's always the same arguments and honestly I have been of the opinion for a long time now that we will save each other a lot of time by just getting rid of this style insensitivity. The time I waste arguing about it with newcomers is not worth the benefit I gain from the feature. As you've alluded C wrappers are not usually what you want to use directly anyway, so you're writing a higher-level binding which will have the right style anyway. It's in Araq's hands to decide though. I hope he does so soon.
Even with braces you still use indentation. You now have two things to achieve one effect. I think it indention is more fundamental than braces if you are going to use ONE technique for describing structure it sure is not braces or parenthesis ))))))) (Lisp I am looking at you). Next!
Good video on JPEG. Your project seems interesting, I might have to follow it.
Hell yeah. I’m gonna watch this after work. I use your libraries all the time, and I think I’ve also contributed to one of your libraries.