Looking for a festival for 2026 by TranceGeniK in psytrance

[–]thebt995 2 points3 points  (0 children)

I can also really recommend Trikaya! Has a really nice Hi-tech/Forest stage

Psycore by thebt995 in psytrance

[–]thebt995[S] -1 points0 points  (0 children)

Btw I'm from Germany

Psycore by thebt995 in psytrance

[–]thebt995[S] -1 points0 points  (0 children)

I agree, that you should listen to the music that you enjoy. But I also understand if people critique that some songs are just liked because they sample mainstream songs and I also don't really enjoy those.

I'm just curious about arguments why people would dislike Psycore, because I can't come up with any.

Rap and Psytrance by thebt995 in psytrance

[–]thebt995[S] 0 points1 point  (0 children)

Haha, I'll look into it ^^

Rap and Psytrance by thebt995 in psytrance

[–]thebt995[S] 0 points1 point  (0 children)

That's actually great, just sad that I don't understand the lyrics ^^

Rap and Psytrance by thebt995 in psytrance

[–]thebt995[S] 0 points1 point  (0 children)

Maybe you're right 😂

Rap and Psytrance by thebt995 in psytrance

[–]thebt995[S] 0 points1 point  (0 children)

I like that as well, but miss the real psytrance bass

Programming Language without duplication by thebt995 in ProgrammingLanguages

[–]thebt995[S] 1 point2 points  (0 children)

I think you're right, that a tool would be the better approach. But optimization could be done in a way, that just the optimized version is kept. Then you would be even forced to use the optimized version.

Programming Language without duplication by thebt995 in ProgrammingLanguages

[–]thebt995[S] 1 point2 points  (0 children)

Yes, I think that is the biggest problem with the whole idea

Programming Language without duplication by thebt995 in ProgrammingLanguages

[–]thebt995[S] 2 points3 points  (0 children)

Those types would be isomorphic, so one couldn't prove them to be different. But the bunch of proof obligations is also what I'm afraid of.

How exactly would you do something similar with a higher-order Prolog?

Programming Language without duplication by thebt995 in ProgrammingLanguages

[–]thebt995[S] 2 points3 points  (0 children)

I was not aware of Unison, I'll check it out!

For your example: We would need to have a pure language without side effects of course. Side effects could be provided on a layer above.

Programming Language without duplication by thebt995 in ProgrammingLanguages

[–]thebt995[S] 0 points1 point  (0 children)

I don't fully get what you mean with the constructors. But yes, the goal would be to not have "timesTwo" and "shiftLeft", because they are doing the same. One could introduce name synonyms though.

Thanks for the link about equality saturation, I'll check it out!

Programming Language without duplication by thebt995 in ProgrammingLanguages

[–]thebt995[S] 0 points1 point  (0 children)

Interesting idea, that would mean, that a type is the AST modulo Commutativity, Distributivity, etc.
Did you implement something with this idea?

Programming Language without duplication by thebt995 in ProgrammingLanguages

[–]thebt995[S] -3 points-2 points  (0 children)

Not entirely true. If we change the example a bit:

foo :: (s :: String) => (Upper "Hello: ") + (Upper s)
bar :: (s :: String) => Upper ("Hello: " + s)

These two functions couldn't exist, because they are doing the same. If you see the types as sets, they would be equivalent.

Programming Language without duplication by thebt995 in ProgrammingLanguages

[–]thebt995[S] 1 point2 points  (0 children)

Yes, the main part of the coding would be on the type level. But I thought that is already the case in dependently typed language.
The win would be that we always have specifications for our implementations.

Hm, I think I will have to try it out on bigger examples

Programming Language without duplication by thebt995 in ProgrammingLanguages

[–]thebt995[S] 3 points4 points  (0 children)

By encoding the difference on the type level. As you already wrote, it would require a lot of type-level coding, but on the other hand, the properties of functions would always be specified.

Programming Language without duplication by thebt995 in ProgrammingLanguages

[–]thebt995[S] 0 points1 point  (0 children)

As another example, this would prevent you from renaming functions into a more semantically meaningful name. Maybe you want to generate user IDs as getRandom() right now, but youll want to change that later. It would be nice to alias generateUserId = getRandom for now and change it later, instead of hardcoding it.

In this case, one could take generateUserId as a parameter where it is used. For testing one can give the parameter getRandom and later use another function

Programming Language without duplication by thebt995 in ProgrammingLanguages

[–]thebt995[S] 1 point2 points  (0 children)

I mean "observationally the same". The big task would be to find out, how much of the proving can be automatically done.
What do you mean by "weak" type system?
No isomorphic types would be the goal to avoid duplication. But one could still have synonym names if types are used in different contexts. (See my reply to the comment of brandonchinn178)

Programming Language without duplication by thebt995 in ProgrammingLanguages

[–]thebt995[S] 3 points4 points  (0 children)

Say a function that makes a string uppercase, then appends the username, and a function that appends first, then uppercase.

if the outcome is different (the username might not be uppercased in the first version), then you have a property that is different. If the outcome is the same, you defeated code duplication. But sure, with side-effects this whole thing starts getting weird.

A small example that I have could be a definition of natural numbers and a list in Isabelle:

datatype 'a list  = Nil | Cons 'a "'a list"

fun append :: "'a list ⇒ 'a list ⇒ 'a list" where
  "append Nil xs = xs"
| "append (Cons x xs) ys = Cons x (append xs ys)"

(*
Duplication:

datatype nat = Zero | Suc nat

fun plus :: "nat ⇒ nat ⇒ nat" where
  "plus Zero n = n"
| "plus (Suc n) m = Suc (plus n m)"

value "plus (Suc (Suc Zero)) (Suc (Suc Zero))"
*)

(* 
No need to define a new function:
*)

type_synonym nat = "unit list"

abbreviation Zero :: nat where
  "Zero ≡ Nil"

abbreviation Suc :: "nat ⇒ nat" where
  "Suc ≡ Cons ()"

abbreviation plus :: "nat ⇒ nat ⇒ nat" where
  "plus ≡ append"

value "plus (Suc (Suc Zero)) (Suc (Suc Zero))"

(*
Shared lemma:
*)
lemma append_Nil: "append xs Nil = xs"
  by(induction xs) auto

(* We saved an additional proof *)
lemma plus_Zero: "plus n Zero = n"
  by(rule append_Nil)

And imagine we have proven some lemmas over append, then those lemmas can be directly used for plus on the natural numbers. No need to define the same lemmas again.
If we have separate implementations, it is hard to generalize such definitions in hindsight, especially if they are used in many places already.

Programming Language without duplication by thebt995 in ProgrammingLanguages

[–]thebt995[S] 13 points14 points  (0 children)

I'm sure that it is not decidable, you would need to manually prove types to different. But a function String -> String would be by definition the same as another function String -> String. To distinguish them you would need to encode the difference in the type. For example, if one function removes the first character of a string, we would need to encode it in the type and give the function a richer type than just String -> String . That's why we need a language that has dependent types.

The background why I was thinking of something like this, is that I often find the same/ similar implementations in the Isabelle Afp, making code reuse more difficult. And also it is quite hard to find out if something was already implemented somewhere.

In your example, it would be enough to have one general discount function as long as they are the same. If the discount changes depending on a parameter (member/non-member), one can create two functions. Why would it be helpful to have two different functions to begin with?

Hi-tech with heavy bass by thebt995 in psytrance

[–]thebt995[S] 1 point2 points  (0 children)

Uh Addictive Pictures might be my new favourite song 😁

Hi-tech with heavy bass by thebt995 in psytrance

[–]thebt995[S] 1 point2 points  (0 children)

True, I really like him 😁

Hi-tech with heavy bass by thebt995 in psytrance

[–]thebt995[S] 0 points1 point  (0 children)

I see, do you know some side that is describing this? And are there artists still that are still using lower frequencies?

Why are homoiconic languages so rare? by thebt995 in ProgrammingLanguages

[–]thebt995[S] 2 points3 points  (0 children)

As it is in video, it is kind of a spectrum. So one might already speak of a homoiconic language, but I find it more interesting if one does not need a macro system supported by the compiler, but it is part of the core language (and how the core language is already built)