Weekly Dev Findings 8
Tags: news, javascript, python, webdev
Published: 2023-10-07 09:53:43



## Python

### [Python 3.12 release](https://docs.python.org/3.12/whatsnew/3.12.html#pep-695-type-parameter-syntax)

- Better error description

```python
>>> sys.version_info
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'sys' is not defined. Did you forget to import 'sys'?
```

- A lot of typing improvements

#### Simple Generics

```python
def max[T](args: Iterable[T]) -> T:
    ...

class list[T]:
    def append(self, element: T) -> None:
        ...
```

#### Type declaration

```python
type Point[T] = tuple[T, T]
```

#### kwargs typing

```python
from typing import TypedDict, Unpack

class Movie(TypedDict):
  name: str
  year: int

def foo(**kwargs: Unpack[Movie]): ...
```

- [Flask 3.0 release](https://flask.palletsprojects.com/en/3.0.x/changes/#version-3-0-0) - with async compatibily
- [Django + htmx + TailwindCSS for Rapid Prototyping](https://testdriven.io/blog/django-htmx-tailwind/)
- [django-tailwind-cli](https://github.com/oliverandrich/django-tailwind-cli) - yet another tailwind CSS integration in Django
- [humanize](https://docs.djangoproject.com/en/4.2/ref/contrib/humanize/) - formatting lib integrated in Django
- [django-upgrade](https://github.com/adamchainz/django-upgrade/tree/main) - update Django projects to upper versions of Django
- [icecream](https://github.com/gruns/icecream) - better `print` alternative

---

## JavaScript

### [TypeScript 5.3 Beta](https://devblogs.microsoft.com/typescript/announcing-typescript-5-3-beta/)

Switch narrowing:

```typescript
function f(x: unknown) {
    switch (true) {
        case typeof x === "string":
            // 'x' is a 'string' here
            console.log(x.toUpperCase());
            // falls through...

        case Array.isArray(x):
            // 'x' is a 'string | any[]' here.
            console.log(x.length);
            // falls through...

        default:
          // 'x' is 'unknown' here.
          // ...
    }
}
```

- [pattycake](https://github.com/aidenybai/pattycake) - fast pattern matching in TypeScript
- [nuxt.studio](https://nuxt.studio/) - Nuxt CMS
- [triplex](https://triplex.dev/) - React 3D editor

{% embed https://twitter.com/_douges/status/1708859381369221539 %}

- NativeScript (Vue Mobile framework) support in Apple Vision Pro

{% embed https://twitter.com/NativeScript/status/1709684288600572337 %}

---

## AI

- [AI Emojis](https://emojis.alexandru.so/) - generate custom emojis with AI
- [open-interpreter](https://github.com/KillianLucas/open-interpreter) - terminal app that turns prompts into running scripts
- [magentic](https://github.com/jackmpcollins/magentic) - decorate python function with prompt, lib will implement it using LLM
 
- Make films from scratch using AI

{% embed https://twitter.com/nickfloats/status/1707077921981005835 %}

- Make web apps with simple logic from diagram photo

{% embed https://twitter.com/mckaywrigley/status/1707101465922453701 %}

- [ollama](https://ollama.ai/) - tool for running LLMs like Llama, has task oriented models like [sqlcoder](https://ollama.ai/library/sqlcoder)

---

## Tools

- [new huge Windows 11 update with a lot of AI features](https://blogs.windows.com/windowsexperience/2023/09/26/the-most-personal-windows-11-experience-begins-rolling-out-today/)
- [roadmap.sh](https://roadmap.sh) released Roadmap Builder

{% embed https://twitter.com/kamrify/status/1708293162693767426 %}

- [codesnap](https://codesnap.dev/) - beutiful code snippets editor

---

## Entertainment

- [Mark Zuckerberg: First Interview in the Metaverse | Lex Fridman Podcast](https://www.youtube.com/watch?v=MVYrJJNdrEg) - amazing 3d visualization like in Matrix 😎

![amazing 3d visualization like in Matrix](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/n6dzxr2uzzgjdpnu7y9a.png)

- [Portfolio that looks like Desktop screen made with Flutter](https://portfolio.dctech.dev/)