Находки в опенсорсе
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
​​#scala 3.0 might have indentation-based syntax like in #python.

Discussion: https://github.com/lampepfl/dotty/pull/7083
​​Open-sourcing Polynote: an IDE-inspired polyglot notebook:

> We are pleased to announce the open-source launch of Polynote: a new, polyglot notebook with first-class Scala support, Apache Spark integration, multi-language interoperability including #scala, #python, and #sql, as-you-type autocomplete, and more.

https://polynote.org/
Hedgehog automatically generates a comprehensive array of test cases, exercising your software in ways human testers would never imagine.

Generate hundreds of test cases automatically, exposing even the most insidious of corner cases. Failures are automatically simplified, giving developers coherent, intelligible error messages.

Features:

- Integrated shrinking, shrinks obey invariants by construction.
- Abstract state machine testing.
- Generators allow monadic effects.
- Range combinators for full control over the scope of generated numbers and collections.
- Equality and roundtrip assertions show a diff instead of the two inequal values.
- Template Haskell test runner which executes properties concurrently.

https://github.com/hedgehogqa/haskell-hedgehog

#haskell

Also available for #scala, #fsharp, #csharp, and #r
​​ScalaPy: use #python libraries from the comfort of #scala

Notable features:

- Complete Ecosystem: Use any Python library you can dream of. Want to train neural networks on GPUs with TensorFlow? ScalaPy supports it.
- Strong Typing: Add type definitions for Python libraries as you go to catch bugs before they happen in production.
- Performant Interop: Compile to native binaries with Scala Native to unlock maximum performance with direct bindings to CPython.

https://scalapy.dev/
> You will aquire knowledge on how to build software in a purely functional manner, you will leverage a particular kind of algebraic effects called environmental effects in order to structure your code in a better way enabling you to test each individual component in an isolated way and making your modules reusable and composable.

> We are not cheating, neither using magic tricks! By leveraging functional programming principles we have developed a set of libraries that enrich the fp-ts ecosystem with the functionalities that you may find in a library like ZIO in the Scala ecosystem.

> The latest development in the core TypeScript language allow us to take environment usage even further compared to what ZIO can achieve, namely TypeScript has a very good support for intersection types and this makes environment usage wonderful.

https://arnaldimichael.gitbook.io/matechs-effect/

#ts #scala
Great read about #scala's ZLayer from ZIO.

Nice and very useful concept that can be ported to many other languages.

https://zio.dev/docs/howto/howto_use_layers
​​Quill provides a Quoted Domain Specific Language (QDSL) to express queries in #scala and execute them in a target language. The library's core is designed to support multiple target languages, currently featuring specializations for Structured Query Language (SQL) and Cassandra Query Language (CQL).

Features:

- Boilerplate-free mapping: The database schema is mapped using simple case classes.
- Quoted DSL: Queries are defined inside a quote block. Quill parses each quoted block of code (quotation) at compile time and translates them to an internal Abstract Syntax Tree (AST)
- Compile-time query generation: The ctx.run call reads the quotation's AST and translates it to the target language at compile time, emitting the query string as a compilation message. As the query string is known at compile time, the runtime overhead is very low and similar to using the database driver directly.
- Compile-time query validation: If configured, the query is verified against the database at compile time and the compilation fails if it is not valid. The query validation does not alter the database state.

https://github.com/getquill/quill
​​Jargon from the functional programming world in simple terms!

Have you ever wondered what monads and functors are? This project has answers!
There are examples in #python #js #scala and #rust

You will learn that numbers, strings and lists are monoids, and what morphisms are.

https://github.com/hemanth/functional-programming-jargon
Breaking news!

A lightweight, distinctly #scala take on functional abstractions, with tight ZIO integration.

ZIO Prelude is a radically new approach to functional abstractions in Scala, which throws out the classic functor hierarchy in favor of a modular algebraic approach that is smaller, easier to understand and teach, and more expressive.

ZIO Prelude is an alternative to libraries like Scalaz and Cats, which imported the Haskell type class hierarchy into Scala without making significant changes.

ZIO Prelude has three key areas of focus:
- Data structures, and type classes that for traversing them. ZIO Prelude embraces the collections in the Scala standard library, and extends them with new instances and new useful additions.
- Patterns of composition for types. ZIO Prelude provides a small catalog of patterns for binary operators, which combine two values into another value of the same type. These patterns are named after the algebraic laws they satisfy: associativity, commutativity, and identity.
- Patterns of composition for type constructors. ZIO Prelude provides a catalog of patterns for binary operators on type constructors (things like Future, Option, ZIO Task). These patterns are named after the algebraic laws they satisfy (associativity, commutativity, and identity) and the structure they produce, whether a tuple or an either.

The library has a small research-stage package (zio.prelude.fx) that provides abstraction over expressive effect types like ZIO and ZPure.

https://github.com/zio/zio-prelude
​​Effekt Language: a research language with effect handlers and lightweight effect polymorphism written in #scala

-Lightweight Effect Polymorphism, No need to understand effect polymorphic functions or annotate them. Explicit effect polymorphism simply does not exist.
-Effect Safety, A type- and effect system that does not get into your way. Rely on a simple, yet powerful effect system that guarantees all effects to be handled.
- Effect Handlers, (Algebraic) effect handlers let you define advanced control-flow structures like generators as user libraries. Those libraries can be seamlessly composed.

https://effekt-lang.github.io/effekt-website/
​​Flix: Next-generation reliable, safe, concise, and functional-first programming language.

Flix is inspired by OCaml and Haskell with ideas from Rust and Scala. Flix looks like Scala, but its type system is based on Hindley-Milner. Two unique features of Flix are its polymorphic effect system and its support for first-class Datalog constraints.

Flix aims to offer a unique combination of features that no other programming language offers, including: algebraic data types and pattern matching (like Haskell, OCaml), extensible records (like Elm), type classes (like #haskell, #rust), higher-kinded types (like Haskell), local type inference (like Haskell, OCaml), channel and process-based concurrency (like #go), a polymorphic effect system (unique feature), first-class Datalog constraints (unique feature), and compilation to JVM bytecode (like #scala).

https://flix.dev/

Personal opinion: it has all the features new modern programming language should have. It has nice syntax, powerful ideas, and (hopefully) good JVM integration and code-reuse. That's a recipe for a success. I will keep an eye on this amazing language.

It also has a playground on its website, check it out!
I would love to highlight this example of polymorphic effects: