Находки в опенсорсе
10.6K subscribers
11 photos
1 video
3 files
816 links
Привет!

Меня зовут Никита Соболев. Я занимаюсь опенсорс разработкой полный рабочий день.

Тут я рассказываю про #python, #c, опенсорс и тд.
Поддержать: https://boosty.to/sobolevn
РКН: https://vk.cc/cOzn36

Связь: @sobolev_nikita
Download Telegram
​​A kotlinx.html library provides DSL to build HTML to Writer/Appendable or DOM at JVM and browser (or other JavaScript engine) for better Kotlin programming for Web.

https://github.com/Kotlin/kotlinx.html

#kotlin
> I have a very long diatribe on the state of document editors that I am working on, and almost anyone that knows me has heard parts of it, as I frequently rail against all of them: MS Word, Google Docs, Dropbox Paper, etc. In the process of writing up my screed I started thinking what a proper document format would look like and realized the awfulness of all the current document formats is a much more pressing problem than the lack of good editors. In fact, it may be that failing to have a standard, robust, and extensible file format for documents might be the single biggest impediment to having good document editing tools. Seriously, even if you designed the world’s best document editor but all it can output is PNGs then how useful if your world’s best document editor?

#rant
​​SQLx is a modern SQL client built from the ground up for #rust, in Rust.

- Truly Asynchronous. Built from the ground-up using async-std using async streams for maximum concurrency.
- Type-safe SQL (if you want it) without DSLs. Use the query!() macro to check your SQL and bind parameters at compile time. (You can still use dynamic SQL queries if you like.)
- Pure Rust. The Postgres and MySQL/MariaDB drivers are written in pure Rust using zero unsafe code.

https://github.com/launchbadge/sqlx
​​npx snowpack is the easiest way to build your #js project!

It promises to be just a single config-less command to do everything you need. And even faster than webpack.

Interesting thing to try!

https://www.snowpack.dev/
> Legacy code is bad and if you keep using it, it's really your own fault. There are many variations of the same thing floating around in Open Source communities and it always comes down to the same thing: at one point something is being declared old and it has to be replaced by something newer which is better.

> Many open source communities behave exactly the same way: they are replacing something with something else without a clear migration path. However some communities manage to survive some transitions like this.
Open-source illustrations for every project you can imagine and create.

A constantly updated collection of beautiful #svg images that you can use completely free and without attribution.

https://undraw.co/
​​Scalene is a high-performance CPU and memory profiler for #python that does a few things that other Python profilers do not and cannot do. It runs orders of magnitude faster than other profilers while delivering far more detailed information.

1. Scalene is fast. It uses sampling instead of instrumentation or relying on Python's tracing facilities. Its overhead is typically no more than 10-20% (and often less).
2. Scalene is precise. Unlike most other Python profilers, Scalene performs CPU profiling at the line level, pointing to the specific lines of code that are responsible for the execution time in your program. This level of detail can be much more useful information than the function-level profiles returned by most profilers.
3. Scalene profiles memory usage. In addition to tracking CPU usage, Scalene also points to the specific lines of code responsible for memory growth. It accomplishes this via an included specialized memory allocator.
4. NEW: it now also separates out time spent running in Python from time spent in C code (including libraries).

https://github.com/emeryberger/scalene
​​The pipeline #shell command!

A utility to make building up a pipeline of shell commands easier, especially when doing data exploration.

If you've ever found yourself writing shell code, in an endless loop of piping output to less, scanning it over and making changes, then pipeline can make your life just a little bit more beautiful.

This is just a thin wrapper around your shell, not some totally new data mining tool. Launch pipeline, and start typing shell commands as usual. Every time you hit enter you'll see a one-screen preview of your output, similar to piping output to less, but your cursor will stay right where it was for further editing.

https://github.com/codekitchen/pipeline

#c
Breaking news!

actix-web (#rust actor-based web framework) is removed from Github, core-developer resignes from open-source work.

Repo: https://github.com/actix/actix-web/blob/606bc3f9162268726d174a8a4a295d3a65cb5228/README.md
Twitter: https://twitter.com/fafhrd91/status/1218135374339301378
Reddit: https://www.reddit.com/r/rust/comments/epszt7/actixnet_unsoundness_patch_is_boring/

Very sad, open-source should be fun and enjoyable. Big kudos to the author of this amazing tool! I hope that actix will continue its journey: one way or another.
​​A static analysis tool for #python that blurs the line between testing and type systems.

https://github.com/pschanely/CrossHair
CLI tool to generate wireframes from a localized human-readable format.

Looks amazing for people who love to write code instead of drawing stuff (like me).

https://github.com/imagineui/imagineui

#ts
​​SNAFU is a library to easily assign underlying errors into domain-specific errors while adding context for #rust

https://github.com/shepmaster/snafu

It looks much better than https://github.com/lovasoa/custom_error that I have used previously.
​​Excalidraw is a whiteboard tool that lets you easily sketch diagrams that have a hand-drawn feel to them.

Try it now!
https://github.com/excalidraw/excalidraw

#ts
​​sqlmap is an open source penetration testing tool that automates the process of detecting and exploiting #sql injection flaws and taking over of database servers. It comes with a powerful detection engine, many niche features for the ultimate penetration tester, and a broad range of switches including database fingerprinting, over data fetching from the database, accessing the underlying file system, and executing commands on the operating system via out-of-band connections.

https://github.com/sqlmapproject/sqlmap

#python
​​Get an overview of a directory, even a big one.

Notice the unlisted in the example?
That's what makes it usable where the old tree command would produce pages of output.
.gitignore files are properly dealt with to put unwanted files out of your way

https://dystroy.org/broot/

#rust
> Phoenix contexts are a great way to organize the code. They separate the business logic from the web related logic. They group together schemas and business logic. And provide clear ways of inter-contextual communication.

This articles covers one more way to structure business logic inside #elixir's phoenix framework. The thing I like about this one is that it does not use any dependencies. Just pure simple Elixir code.
The perfect dictionary of popular programming words.

My favourite one is:

> "dsl — A domain specific language, where code is written in one language and errors are given in another."

#rant
> I get the impression that many people think about static types as something that has to do with strings and numbers - particularly numbers. Introductions to programming languages often introduce strings first. That's natural, since the most common first example is Hello, world!. After that usually follows an introduction to basic arithmetic, and that often includes an explanation about types of numbers - at least the distinction between integers and floating-point numbers. At the time I'm writing this, the online C# tutorial is a typical example of this. Real World Haskell takes the same approach to introducing types.

> It's a natural enough way to introduce static types, but it seems to leave some learners with the impression that static types are mostly useful to prevent them from calling a method with a floating-point number when an integer was expected. That's the vibe I'm getting from this article by Robert C. Martin.

> When presented with the notion of a 'stronger' type system, people with that mindset seem to extrapolate what they already know about static types.

Great read from one of my the most favourite authors.
​​> There’s something rich, beautiful and mysterious in the several kinds of nothingness and identity that we encounter as Python/Django programmers. Understanding the connections they make with ontology, epistemology and metaphysics adds another dimension to the joy of programming. As Django programmers, we’re blessed - we have several kinds of nothingness and identity at our fingertips. There’s something rich, beautiful and mysterious in them, and in their variety and relation. For the programmer, the discovery of them is an opening into Python’s power and expressiveness. It’s the same richness and mystery that logicians and philosophers have discovered in them: entire schools of thought are founded on various approaches to nothingness. Programmers are in fact working with key ideas that are also crucially important to ontology, epistemology and metaphysics. From the pioneers of boolean electronics who adopted the NAND gate as the basic building block of logical circuits to thinkers like Sartre and Kant, nothing repeatedly turns out to be at the heart of everything. And the Python programmer who gets a surprise when checking for the identity of a variable is in fact running into the same problems that Heraclitus was aware of, 25 centuries before Guido van Rossum was even born. We’re in good company, in other words. Nothingness and identity and the way we use them in Python and Django are related to phenomenology, utopia, politics, theories of agency and much, much more. Knowing about these connections might not make anyone a better programmer, but it can add another dimension to their understanding of the discipline, and add to the richness and beauty of their world, making the joy of programming even deeper.