Skip to content

Instantly share code, notes, and snippets.

Почему концепция таймтревела с его "телепортировался в прошлое и оказался в космое" абсолютно несостоятельна? Да потому что теория относительности как раз и говорит нам о том, что все относительно,в том числе и движение.
Один из примером - человек телепортируется на полгода в прошлое, и оказывается с другой стороны орбиты земли, и она только через полгода прилетит. Звучит нормально? Не совсем. Во-первых, что с импульсом человека? Когда он был на земле он летел с огромной скоростью сквозь пространство на этом камне. Путешествие во времени не может импульс произвольным образом менять.
Во-вторых почему мы говорим, что человек телепортируется на другой конец орбиты? Нет никакой выделенной системы координат связанной с солнцем, поэтому причин почему мы должны оказаться рядом с ним, а не у совершенно другой галактики загадка.
Ну и в-третьих эйнштейн уже больше 100 лет как показал, что просстранство-время это единая концепция. Люди схавали, но продолжают думать отдельными "машинами времени" и "машинами пространства
pragma solidity ^0.5.2;
contract Owned {
address public owner;
constructor() public {
owner = msg.sender;
}
modifier onlyOwner {
import scala.util.matching._
trait Monoid[A] {
def op(a1: A, a2: A): A
def zero: A
def productMonoid[A,B](a: Monoid[A], b: Monoid[B]): Monoid[(A,B)] =
new Monoid[(A, B)] {
override def op(a1: (A, B), a2: (A, B)): (A, B) = (a.op(a1._1, a2._1), b.op(a1._2, a2._2))
override def zero: (A, B) = (a.zero, b.zero)
sealed trait List[+A]
case object Nil extends List[Nothing]
case class Cons[+A](head: A, tail: List[A]) extends List[A]
object List {
def apply[A](as: A*): List[A] =
if (as.isEmpty) Nil
else Cons(as.head, apply(as.tail: _*))
def reverse[A](list: List[A]): List[A] = {
import List.{foldLeft, reverse}
import scala.language.reflectiveCalls
sealed trait List[+A]
case object Nil extends List[Nothing]
case class Cons[+A](head: A, tail: List[A]) extends List[A]
object List {
def apply[A](as: A*): List[A] =

Suppose we’re implementing a program to handle purchases at a coffee shop. We’ll begin with a Scala program that uses side effects in its implementation (also called an impure program).

class Cafe {
  def buyCoffee(cc: CreditCard): Coffee = {
    val cup = new Coffee()
    cc.charge(cup.price)
    cup
 }
public class ActionBatcher<T>
{
private readonly Action<IReadOnlyList<T>> action;
private List<T> batch;
public ActionBatcher(Action<IReadOnlyList<T>> action)
{
this.action = action;
batch = new List<T>();
}
Functional programmers have a peculiar way of approaching problems.
They start by asking very Zen-like questions. For instance, when designing an
interactive program, they would ask: What is interaction?
When implementing Conway’s Game of Life, they would probably ponder about the meaning of life. In this spirit, I’m going to ask: What is
programming? At the most basic level, programming is about telling
the computer what to do. “Take the contents of memory address x and
add it to the contents of the register EAX.” But even when we program
in assembly, the instructions we give the computer are an expression of
something more meaningful. We are solving a non-trivial problem (if it
were trivial, we wouldn’t need the help of the computer). And how do
void Main()
{
var foo = new C { B = new B { A = new A() }};
var helper = ExpressionHelper<C>.GetDelegate<A>("B.A");
helper(foo).Dump();
}
class A {
public int X => 10;
}
@Pzixel
Pzixel / shit.cs
Created September 12, 2019 09:33
using System;
using System.Linq;
using System.Threading.Tasks;
using Akka.Actor;
using Akka.Streams;
using Akka.Streams.Dsl;
using Directive = Akka.Streams.Supervision.Directive;
namespace ConsoleApp9
{