Skip to content

Instantly share code, notes, and snippets.

View lovely-error's full-sized avatar
😆
Don't forget that you will die some day

Enigma Lav lovely-error

😆
Don't forget that you will die some day
View GitHub Profile
@lovely-error
lovely-error / thing.md
Last active August 4, 2020 07:23
Klim PL Black Paper

Introduction

The Rant

Since the beginning of a second half of the twentieth century the computer science has underwent through many discoveries and refinements(and still does), such transformations was happening to programming languages as well. Dozens of them of different flavors have emerged, whose purpose was diverse: from constructing artificial intelligence to translating mathematical formulas; there was some other wild applications. Whether fortunately or not, the graveyard now holds many of these blesses souls that died because of infitnes(yeap, DST is present here as well). As history unfold many better alternatives was offered and since 90 some of them - Java, Python, C++, C#, C, JavaScript - has sustained the presence on the market main stage and had become the defacto in many areas and received as much love as they did receive hatred. But while these has shown possibility of developing complex functioning systems, during the years of their existence, many disadvantages was revealed: Java

@lovely-error
lovely-error / S-CLISP
Last active August 4, 2020 06:38
A few sketches of klim code
```
//when ever you create an object and do not specify mutability specification
//S-CLISP treats that object with whole range (iso..tag) mutability
object Box {} //is similar to
object iso..tag Box {}
//this means that you can instantiate object with the mutability you need.
//there is 6 mutability sybtypes for every object
//iso - in local scope: one writer, one reader
//trn - in local scope: one writer, many readers
//ref - in local scope: many writers, many readers
@lovely-error
lovely-error / malleability.md
Created August 4, 2020 06:38
Protocols and their witnesses

Electable witnesses

  • Status: Active
  • Phase: (1/3)Gathering feedback

~Type Hierarchy - an ancestry representing what type is (class inheritance), and what type has (protocol conformance).

Introduction

Currently swift allows to declare rich protocol hierarchies, which serve the purpose of abstracting building blocks of software, while also providing the minimal dependency requirements between such blocks. Being a language that relies on paradigm of objects and inheritance, swift also provides capabilities to give these interfaces (or protocols in swift' terminology) the default implementation for its members (which makes them essentialy mixins). A teqnique known as retroactive moddeling can easily expand type' inheritance network to be consisting of multitude of entities that each can provide unique implementation of some functionality, without limiting the ability of being a customization point.

Swift is peice of crap. Since it's conception in 2013 no important features was added, and no problems was resolved. I regret about it, since there are points about which I am happy. It is one thing actually, visual aesthetic. Here are the list of features that would make swift the best.

  • Ban struct and explicit (fixed) generic signature: Remove <...> to designate a type variables. Instead take an approach of protocol associated types.
class Box {
  associatedtype Value
  var value: Value

You were failed

Disclaimer

All info in this draft didnt come from my wild dreams. What I did is lurked for some research sitting in public university domains. It is amizing what highspeed unmetered internet connection and human with brains can do together. In short I just assembled some stuff to satisfy what I needed - A language for ontology software creation and how it ought to look in 21st century. You may see papers youself here

Intro

Let me be frank with you. All popular languages in use are bad. They all share a set of common design failures, plaguing some and sometimes all aspects of what programming discepline is meant to be - which is about making models that can be used by someone else to make more usefull stuff. Most of languages that have big repositories of useful frameworks, utilities etc do constrain the developer and its evolution in one way or another.

@lovely-error
lovely-error / IP.md
Last active February 27, 2021 04:47
Oh, wow! Is that a paradigm shift ?!

It's time to move on

Dislcaimer: you can click this, then watch this, then find on net lanugage Terra to grasp a bit of what I am talking bout. Multistage metaprogramming is a big, unrealised area of research. I want a thing kinda like that, but better; with deeper integration with os/linker

All I have seen so far have hurt me deeply

During all my past, as long as I remember myslef, I noted that despite all major languages have had settled and now peacfylly stagnating, many newcomers represented by those like rust, haxe, zig, v, eta, and whatever few hundred other I missed, they inevitably will disappear without leaving a trace, because they all are mediocre. If you have been thinking along these lines that I am going to humiliate them, you gessed it right, I will. The all pieces of shit that came from people who either got so old it cut their ability to innovate, or total poseur, who cannot see world beyound their curriculum. It app

@lovely-error
lovely-error / more_types!.swift
Created October 2, 2021 21:50
Typelevelisation
import Foundation
func fix <A>(_ f : (A) -> A) -> A { f (fix (f)) }
// _ = fix { _ in }
indirect enum N {
case s(N), z
@lovely-error
lovely-error / selfreflections.md
Created November 5, 2022 10:22
Those which have many names, but only a single essence

Statement

Somehow, it is not possible to lie. These things are with the definiteviness of a combinatorial object. They are not fractals.

I heard one man once said that homological algebra is the most remarkable thing that has been discovered. In most unlike places I noticed glimpses of its presense.

@lovely-error
lovely-error / hs.hs
Created April 20, 2023 14:24
Stochastic bin packing algorithm, kinda. Was made for one of my lovers
import Data.List
infixl ///
class LaxDivision a where
(///) :: a -> a -> a
instance LaxDivision Int where
(///) = div
@lovely-error
lovely-error / kal.hs
Created August 3, 2023 08:26
The world simplest calculator with infix expressions and parens
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE PartialTypeSignatures #-}
import Data.Char (isNumber, isSpace)
infixl |>
v |> f = f v
main = do
print "Hey! I am ready to accept input :)"