bright_id
stringlengths 11
257
| bright_doc
stringlengths 25
9.18M
| bright_split
stringclasses 8
values | scandi_id
stringlengths 3
7
| scandi_url
stringlengths 31
143
| scandi_title
stringlengths 1
79
| scandi_text
stringlengths 15
118k
| scandi_language
stringclasses 4
values | scandi_dist
float64 0.2
1.75
|
---|---|---|---|---|---|---|---|---|
Pony/2_how-it-works.txt | # Hello World -- How It Works
Let's look at our `helloworld` code again:
```pony
actor Main
new create(env: Env) =>
env.out.print("Hello, world!")
```
Let's go through that line by line.
## Line 1
```pony
actor Main
```
This is a __type declaration__. The keyword `actor` means we are going to define an actor, which is a bit like a class in Python, Java, C#, C++, etc. Pony has classes too, which we'll see later.
The difference between an actor and a class is that an actor can have __asynchronous__ methods, called __behaviours__. We'll talk more about that later.
A Pony program has to have a `Main` actor. It's kind of like the `main` function in C or C++, or the `main` method in Java, or the `Main` method in C#. It's where the action starts.
## Line 2
```pony
new create(env: Env) =>
```
This is a __constructor__. The keyword `new` means it's a function that creates a new instance of the type. In this case, it creates a new __Main__.
Unlike other languages, constructors in Pony have names. That means there can be more than one way to construct an instance of a type. In this case, the name of the constructor is `create`.
The parameters of a function come next. In this case, our constructor has a single parameter called `env` that is of the type `Env`.
In Pony, the type of something always comes after its name and is separated by a colon. In C, C++, Java or C#, you might say `Env env`, but we do it the other way around (like Go, Pascal, Rust, TypeScript, and a bunch of other languages).
It turns out, our `Main` actor __has__ to have a constructor called `create` that takes a single parameter of type `Env`. That's how all programs start! So the beginning of your program is essentially the body of that constructor.
__Wait, what's the body?__ It's the code that comes after the `=>`.
## Line 3
```pony
env.out.print("Hello, world!")
```
This is your program! What the heck is it doing?
In Pony, a dot is either a field access or a method call, much like other languages. If the name after the dot has parentheses after it, it's a method call. Otherwise, it's a field access.
So here, we start with a reference to `env`. We then look up the field `out` on our object `env`. As it happens, that field represents `stdout`, i.e. usually it means printing to your console. Then, we call the `print` method on `env.out`. The stuff inside the parentheses are the arguments to the function. In this case, we are passing a __string literal__, i.e. the stuff in double quotes. The `env.out.print` method will implicitly add a `\n` after the string literal, so make sure to not add an extra `\n` if you only wants to output one single line.
In Pony, string literals can be in double quotes, `"`, in which case they follow C/C++ style escaping (using stuff like \n), or they can be triple-quoted, `"""` like in Python, in which case they are considered raw data.
In Pony, `print` only support String type. So make sure to convert variables to String type through `.string()` method.
__What's an `Env`, anyway?__ It's the "environment" your program was invoked with. That means it has command line arguments, environment variables, `stdin`, `stdout`, and `stderr`. Pony has no global variables, so these things are explicitly passed to your program.
## That's it!
Really, that's it. The program begins by creating a `Main` actor, and in the constructor, we print "Hello, world!" to `stdout`. Next, we'll start diving into the Pony type system.
| pony | 47438 | https://sv.wikipedia.org/wiki/C-sharp | C-sharp | C# (engelska: C-sharp, försvenskning: C-kors) är ett objektorienterat programspråk utvecklat av Microsoft som en del av .NET-plattformen. Språket utveckling startades av Anders Hejlsberg som rekryterats från Borland där han skapat TurboPascal och varit chefsarkitekt för Delphi. Nuvarande chefsarkitekt för språket är Mads Torgersen. Officiellt är språket baserat på C++ , men det liknar till stor del Java.
Programkod skriven i C# omvandlas av en kompilator till så kallad CIL-kod (tidigare kallad MSIL-kod), vilket är en sorts bytekod vilken sedan körs i en virtuell maskin, CLR (Common Language Runtime). Detta liknar hur Java fungerar, där programkoden också omvandlas till bytekod som körs i en virtuell maskin. Språkens bytekoder är emellertid inte kompatibla.
C# är plattformsoberoende som programmeringsspråk, även om Microsofts utvecklingsverktyg bara finns för Windows. Det finns åtminstone två olika fria implementationer av C#-kompilatorer, inom Mono och DotGNU-projekten. Dessa implementationer är dock ofullständiga och saknar vissa komponenter i .NET-ramverket, så i praktiken kan program som utvecklas i C# och .NET bli låsta till Windows. På senare tid har det utvecklats populära verktyg såsom Xamarin som innebär att kod skriven i C# och .NET i hög grad och ända upp 100 % kan användas för att skapa appar till både iOS, Android och Windows. Dessa program kostade, men sedan 2015 kan man med Visual Studio utveckla till flera plattformar gratis.
Designmål
C# ska vara enkelt, modernt och objektorienterat.
Robusthet, beständighet och produktivitet är viktigt. Språket bör ha hög typsäkerhet, automatisk skräpinsamling och stoppa försök till att använda oinitierade variabler.
Historik
Anders Hejlsberg rekryterades 1996 till Microsoft som arkitekt för Visual J++. Hejlsberg blev sedan chefsarkitekt för C#. C# utvecklades för att Microsoft vill ha ett språk som liknade Java, men som man själv ägde och som var inriktat mot Microsoft Windows, till skillnad från Java som är mer plattformsoberoende.
Version 1.2 av C# lämnades in till ECMA för standardisering och blev 2001 godkänt som ECMA-334. C# är även ISO-standardiserat som ISO/IEC 23270. Version 2.0 av C# släpptes i samband med version 2005 av Microsoft Visual Studio i november 2005. Version 3.0 släpptes i samband med .NET Framework 3.5 i november 2007.
Funktioner
C# är det språk som är mest bundet till det underliggande Common Language Infrastructure (CLI). De flesta av de grundläggande datatyperna i C# motsvaras av värdetyper som stöds av de olika implementationerna av CLI. Specifikationen för C# tar dock aldrig upp några krav på kodgenerering: den säger inte att C# måste stödja en implementation av CLI, eller generera Common Intermediate Language-kod (eller CIL). En C#-kompilator skulle lika väl kunna generera vanlig maskinkod, som till exempel C- och FORTRAN-kompilatorer gör. Men i praktiken genererar alla existerande implementationer CIL.
C# skiljer sig ifrån C och C++ på många sätt:
Det finns inga globala variabler eller funktioner. Det är dock möjligt att deklarera statiska variabler och funktioner/metoder inuti publika klasser för att uppnå samma resultat.
Typen bool (alias för System.Boolean), som kan användas i villkorssatser (if, while etc.) är en separat typ. I C och C++ är den ett alias (typedef) för int (heltal). Typen int kan därför inte konverteras till en bool.
Minnesadresser kan refereras med pekare om de omsluts av ett kodblock (till exempel en metod) som är märkt med nyckelordet unsafe. Pekare kan referera till värdetyper, vektorer och andra pekare. Annars är pekare inte tillgängliga eftersom de inte anses vara säkra. Klassen System.IntPtr är en wrapper runt en pekare som är tillåten inom säker kontext. De kan dock bara manipuleras.
Hanterat minne kan inte frias av programmeraren, däremot kan det samlas in av skräpinsamlaren. Man kan också bestämma ett objekts livslängd med en using-sats.
C# är mer typsäkert än C och C++.
Enumerations-medlemmar placeras i sitt eget namnutrymme.
C# har egenskaper.
Reflektion av typer stöds fullt ut.
C# har för närvarande (i C# 3.0) 77 reserverade ord.
Fördelar
Relativt lätt att lära sig – C#:s syntax liknar syntaxen i språk som C, C++ och Java. .NET innehåller ett stort kodbibliotek vilket förenklar vid utformning av komplexa system.
Flera användningsområden – C# kan både användas som kompilerat språk på en lokal dator och som språk i ASP.NET. Detta gör det enkelt att länka samman program på en klientdator med serverdatorers program.
Erbjuder enkel integration med andra Microsoft-baserade programvaror (OBS! Se även avsnittet Nackdelar för mer information om detta).
C#-kompilatorn kan användas utan licenser och speciella utvecklingsverktyg.
Nackdelar
Marginellt långsammare programuppstart – Tillämpningar skrivna i C# körs liksom javaprogram i en virtuell maskin vilket bland annat innebär att programmet kompileras precis innan det körs (se JIT-kompilering) vilket leder till en fördröjd uppstartsfas. Detta kan dock avhjälpas med verktyget ngen.exe som ingår i programsviten vilket förkompilerar CIL-koden till maskinkod för aktuell processorarkitektur.
C# är ej lämpligt för realtidsapplikationer eftersom skräpsamlare används.
Prestandan är lägre än optimerad C eller C++-kod.
Programkodsexempel
Det klassiska "Hello, world!"-programmet i C#:
using System;
namespace HelloWorld
{
class Hello
{
public static void Main()
{
Console.WriteLine("Hello World!");
Console.Readline();
}
}
}
using System;
namespace HelloWorld
{
class Hello
{
static string hello = "Hello World!";
public static void Main()
{
Console.WriteLine(hello);
}
}
}
Båda Programmen matar ut textsträngen "Hello World!".
If-sats i C#:
using System;
namespace If
{
class Program
{
public static void Main()
{
int ageOfKalle;
int ageOfKajsa;
Console.WriteLine("Hur gammal är Kalle?");
ageOfKalle = int.Parse(Console.ReadLine());
Console.WriteLine("Hur gammal är Kajsa?");
ageOfKajsa = int.Parse(Console.ReadLine());
if(ageOfKalle > ageOfKajsa) //om Kalle är äldre än Kajsa
{
Console.WriteLine("Kalle är äldre än Kajsa");
}
else if(ageOfKalle < ageOfKajsa) //om kalle är yngre än Kajsa
{
Console.WriteLine("Kalle är yngre än Kajsa");
}
else //Inträffar om ingen av de ovanstående if-satserna inträffat
{
Console.WriteLine("Kalle är lika gammal som Kajsa");
}
}
}
}
Programmet frågar hur gamla Kajsa och Kalle är, sedan matar det ut en textsträng beroende på deras ålder.
Objekt i C#:
using System;
namespace CustomObject
{
// Vår egen klass
class Car
{
// Några fält som tillhör klassen
public string model;
public int year;
// Detta händer då ett nytt Car-objekt skapas
public Car()
{
this.model = "";
this.year = 0;
}
}
class Main
{
public static void Main()
{
// Skapa ett nytt Car-objekt
Car volvo = new Car();
volvo.model = "Volvo Amazon";
volvo.year = 1956;
// Skriv ut bilmodellen
Console.WriteLine("Modell: " + volvo.model);
Console.WriteLine("År: " + volvo.year);
}
}
}
Det finns olika sätt att instantiera ett objekt av en klass på, ett exempel vore att använda Bil bil = new Bil(); eller som här nedan beskriver, det nedan vore precis som att använda sig av en konstruktor istället. Istället har man valt att låta klassen vara möjlig att konstruera utan en konstruktor och istället använder man metodiken nedan.
Ett lite mer komplicerat exempel av objektorientering i C# är följande:
class Program
{
static void Main(string[] args)
{
//Metod ett
Car car = new Car { Model = "Volvo", RegistrationNumber = "ABC123", Owner = new Person { FirstName = "Fredrik", LastName = "Karlsson", Age = 19 } };
//Metod två
Car car2 = new Car();
car2.Model = "Volvo";
car2.RegistrationNumber = "ABC123";
car2.Owner = new Person();
car2.Owner.FirstName = "Fredrik";
car2.Owner.LastName = "Karlsson";
car2.Owner.Age = 19;
Console.Write(car.ToString());
Console.ReadKey();
}
}
class Person
{
public string FirstName { get; set; }
public string LastName { get; set; }
public int Age { get; set; }
public override string ToString()
{
return string.Format("{0} {1}, {2} år gammal.", FirstName, LastName, Age);
}
}
class Car
{
public string RegistrationNumber { get; set; }
public string Model { get; set; }
public Person Owner { get; set; }
public override string ToString()
{
return string.Format("En {0} med registreringsnummer {1}, ägs av {2}", Model, RegistrationNumber, Owner.ToString());
}
}
Programmet använder ett egengjort objekt för att enkelt lagra information om bilar.
Ovanstående exempel är alla program för kommandotolken.
C# kan även användas för att göra bland annat grafiska program i Windows, systemtjänster och DLL-filer.
I ett grafiskt program finns inte möjligheten att använda sig av Console.WriteLine("text här"); utan information måste ges till användaren på annat sätt, exempelvis genom en textBox, richTextBox eller en label vilket skulle kunna se ut såhär:
//Följande exempel byter ut texten i label1 till "Hello World!"
if(checkbox1.Checked)
{
label1.Text = "Hello World!";
}
Referenser
Källor
Litteratur
Albahari, J och Albahari, B C# 5.0 in a Nutshell. The Definitive Reference, 0'Reilly, 2012
Externa länkar
Microsoft Visual C#
csharpskolan.se programmeringsartiklar och exempel på svenska
.NET programspråk
Objektorienterade programspråk
Klassbaserade programspråk
Microsoft | swedish | 0.674124 |
Pony/7_equality.txt | # Equality in Pony
Pony features two forms of equality: by structure and by identity.
## Identity equality
Identity equality checks in Pony are done via the `is` keyword. `is` verifies that the two items are the same.
```pony
if None is None then
// TRUE!
// There is only 1 None so the identity is the same
end
let a = Foo("hi")
let b = Foo("hi")
if a is b then
// NOPE. THIS IS FALSE
end
let c = a
if a is c then
// YUP! TRUE!
end
```
## Structural equality
Structural equality checking in Pony is done via the infix operator `==`. It verifies that two items have the same value. If the identity of the items being compared is the same, then by definition they have the same value.
You can define how structural equality is checked on your object by implementing `fun eq(that: box->Foo): Bool`. Remember, since `==` is an infix operator, `eq` must be defined on the left operand, and the right operand must be of type `Foo`.
```pony
class Foo
let _a: String
new create(a: String) =>
_a = a
fun eq(that: box->Foo): Bool =>
this._a == that._a
actor Main
new create(e: Env) =>
let a = Foo("hi")
let b = Foo("bye")
let c = Foo("hi")
if a == b then
// won't print
e.out.print("1")
end
if a == c then
// will print
e.out.print("2")
end
if a is c then
// won't print
e.out.print("3")
end
```
If you don't define your own `eq`, you will inherit the default implementation that defines equal by value as being the same as by identity.
```pony
interface Equatable[A: Equatable[A] #read]
fun eq(that: box->A): Bool => this is that
fun ne(that: box->A): Bool => not eq(that)
```
## Primitives and equality
As you might remember from [Chapter 2](/types/primitives.md), primitives are the same as classes except for two important differences:
* A primitive has no fields.
* There is only one instance of a user-defined primitive.
This means, that every primitive of a given type, is always structurally equal and equal based on identity. So, for example, None is always None.
```pony
if None is None then
// this is always true
end
if None == None then
// this is also always true
end
```
| pony | 1711108 | https://no.wikipedia.org/wiki/Vitenskaps%C3%A5ret%201111 | Vitenskapsåret 1111 | Vitenskapsåret 1111 er en oversikt over hendelser, prisvinnere, fødte og avdøde personer med tilknytning til vitenskap i 1111.
Hendelser
Fødsler
Dødsfall
19. desember − Abu Hamid Ghazali (født 1058), arabisk økonomisk filosof. | norwegian_bokmål | 1.392364 |
Pony/builtin-U64-.txt |
U64¶
[Source]
primitive val U64 is
UnsignedInteger[U64 val] val
Implements¶
UnsignedInteger[U64 val] val
Constructors¶
create¶
[Source]
new val create(
value: U64 val)
: U64 val^
Parameters¶
value: U64 val
Returns¶
U64 val^
from[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[A] val)]¶
[Source]
new val from[A: ((I8 val | I16 val | I32 val |
I64 val | I128 val | ILong val |
ISize val | U8 val | U16 val |
U32 val | U64 val | U128 val |
ULong val | USize val | F32 val |
F64 val) & Real[A] val)](
a: A)
: U64 val^
Parameters¶
a: A
Returns¶
U64 val^
min_value¶
[Source]
new val min_value()
: U64 val^
Returns¶
U64 val^
max_value¶
[Source]
new val max_value()
: U64 val^
Returns¶
U64 val^
Public Functions¶
next_pow2¶
[Source]
fun box next_pow2()
: U64 val
Returns¶
U64 val
abs¶
[Source]
fun box abs()
: U64 val
Returns¶
U64 val
bit_reverse¶
[Source]
fun box bit_reverse()
: U64 val
Returns¶
U64 val
bswap¶
[Source]
fun box bswap()
: U64 val
Returns¶
U64 val
popcount¶
[Source]
fun box popcount()
: U64 val
Returns¶
U64 val
clz¶
[Source]
fun box clz()
: U64 val
Returns¶
U64 val
ctz¶
[Source]
fun box ctz()
: U64 val
Returns¶
U64 val
clz_unsafe¶
[Source]
Unsafe operation.
If this is 0, the result is undefined.
fun box clz_unsafe()
: U64 val
Returns¶
U64 val
ctz_unsafe¶
[Source]
Unsafe operation.
If this is 0, the result is undefined.
fun box ctz_unsafe()
: U64 val
Returns¶
U64 val
bitwidth¶
[Source]
fun box bitwidth()
: U64 val
Returns¶
U64 val
bytewidth¶
[Source]
fun box bytewidth()
: USize val
Returns¶
USize val
min¶
[Source]
fun box min(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
max¶
[Source]
fun box max(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
hash¶
[Source]
fun box hash()
: USize val
Returns¶
USize val
addc¶
[Source]
fun box addc(
y: U64 val)
: (U64 val , Bool val)
Parameters¶
y: U64 val
Returns¶
(U64 val , Bool val)
subc¶
[Source]
fun box subc(
y: U64 val)
: (U64 val , Bool val)
Parameters¶
y: U64 val
Returns¶
(U64 val , Bool val)
mulc¶
[Source]
fun box mulc(
y: U64 val)
: (U64 val , Bool val)
Parameters¶
y: U64 val
Returns¶
(U64 val , Bool val)
divc¶
[Source]
fun box divc(
y: U64 val)
: (U64 val , Bool val)
Parameters¶
y: U64 val
Returns¶
(U64 val , Bool val)
remc¶
[Source]
fun box remc(
y: U64 val)
: (U64 val , Bool val)
Parameters¶
y: U64 val
Returns¶
(U64 val , Bool val)
add_partial¶
[Source]
fun box add_partial(
y: U64 val)
: U64 val ?
Parameters¶
y: U64 val
Returns¶
U64 val ?
sub_partial¶
[Source]
fun box sub_partial(
y: U64 val)
: U64 val ?
Parameters¶
y: U64 val
Returns¶
U64 val ?
mul_partial¶
[Source]
fun box mul_partial(
y: U64 val)
: U64 val ?
Parameters¶
y: U64 val
Returns¶
U64 val ?
div_partial¶
[Source]
fun box div_partial(
y: U64 val)
: U64 val ?
Parameters¶
y: U64 val
Returns¶
U64 val ?
rem_partial¶
[Source]
fun box rem_partial(
y: U64 val)
: U64 val ?
Parameters¶
y: U64 val
Returns¶
U64 val ?
divrem_partial¶
[Source]
fun box divrem_partial(
y: U64 val)
: (U64 val , U64 val) ?
Parameters¶
y: U64 val
Returns¶
(U64 val , U64 val) ?
shl¶
[Source]
fun box shl(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
shr¶
[Source]
fun box shr(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
fld¶
[Source]
fun box fld(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
fldc¶
[Source]
fun box fldc(
y: U64 val)
: (U64 val , Bool val)
Parameters¶
y: U64 val
Returns¶
(U64 val , Bool val)
fld_partial¶
[Source]
fun box fld_partial(
y: U64 val)
: U64 val ?
Parameters¶
y: U64 val
Returns¶
U64 val ?
fld_unsafe¶
[Source]
fun box fld_unsafe(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
mod¶
[Source]
fun box mod(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
modc¶
[Source]
fun box modc(
y: U64 val)
: (U64 val , Bool val)
Parameters¶
y: U64 val
Returns¶
(U64 val , Bool val)
mod_partial¶
[Source]
fun box mod_partial(
y: U64 val)
: U64 val ?
Parameters¶
y: U64 val
Returns¶
U64 val ?
mod_unsafe¶
[Source]
fun box mod_unsafe(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
shl_unsafe¶
[Source]
fun box shl_unsafe(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
shr_unsafe¶
[Source]
fun box shr_unsafe(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
rotl¶
[Source]
fun box rotl(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
rotr¶
[Source]
fun box rotr(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
string¶
[Source]
fun box string()
: String iso^
Returns¶
String iso^
add_unsafe¶
[Source]
fun box add_unsafe(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
sub_unsafe¶
[Source]
fun box sub_unsafe(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
mul_unsafe¶
[Source]
fun box mul_unsafe(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
div_unsafe¶
[Source]
fun box div_unsafe(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
divrem_unsafe¶
[Source]
fun box divrem_unsafe(
y: U64 val)
: (U64 val , U64 val)
Parameters¶
y: U64 val
Returns¶
(U64 val , U64 val)
rem_unsafe¶
[Source]
fun box rem_unsafe(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
neg_unsafe¶
[Source]
fun box neg_unsafe()
: U64 val
Returns¶
U64 val
op_and¶
[Source]
fun box op_and(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
op_or¶
[Source]
fun box op_or(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
op_xor¶
[Source]
fun box op_xor(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
op_not¶
[Source]
fun box op_not()
: U64 val
Returns¶
U64 val
add¶
[Source]
fun box add(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
sub¶
[Source]
fun box sub(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
mul¶
[Source]
fun box mul(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
div¶
[Source]
fun box div(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
divrem¶
[Source]
fun box divrem(
y: U64 val)
: (U64 val , U64 val)
Parameters¶
y: U64 val
Returns¶
(U64 val , U64 val)
rem¶
[Source]
fun box rem(
y: U64 val)
: U64 val
Parameters¶
y: U64 val
Returns¶
U64 val
neg¶
[Source]
fun box neg()
: U64 val
Returns¶
U64 val
eq¶
[Source]
fun box eq(
y: U64 val)
: Bool val
Parameters¶
y: U64 val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
y: U64 val)
: Bool val
Parameters¶
y: U64 val
Returns¶
Bool val
lt¶
[Source]
fun box lt(
y: U64 val)
: Bool val
Parameters¶
y: U64 val
Returns¶
Bool val
le¶
[Source]
fun box le(
y: U64 val)
: Bool val
Parameters¶
y: U64 val
Returns¶
Bool val
ge¶
[Source]
fun box ge(
y: U64 val)
: Bool val
Parameters¶
y: U64 val
Returns¶
Bool val
gt¶
[Source]
fun box gt(
y: U64 val)
: Bool val
Parameters¶
y: U64 val
Returns¶
Bool val
hash64¶
[Source]
fun box hash64()
: U64 val
Returns¶
U64 val
i8¶
[Source]
fun box i8()
: I8 val
Returns¶
I8 val
i16¶
[Source]
fun box i16()
: I16 val
Returns¶
I16 val
i32¶
[Source]
fun box i32()
: I32 val
Returns¶
I32 val
i64¶
[Source]
fun box i64()
: I64 val
Returns¶
I64 val
i128¶
[Source]
fun box i128()
: I128 val
Returns¶
I128 val
ilong¶
[Source]
fun box ilong()
: ILong val
Returns¶
ILong val
isize¶
[Source]
fun box isize()
: ISize val
Returns¶
ISize val
u8¶
[Source]
fun box u8()
: U8 val
Returns¶
U8 val
u16¶
[Source]
fun box u16()
: U16 val
Returns¶
U16 val
u32¶
[Source]
fun box u32()
: U32 val
Returns¶
U32 val
u64¶
[Source]
fun box u64()
: U64 val
Returns¶
U64 val
u128¶
[Source]
fun box u128()
: U128 val
Returns¶
U128 val
ulong¶
[Source]
fun box ulong()
: ULong val
Returns¶
ULong val
usize¶
[Source]
fun box usize()
: USize val
Returns¶
USize val
f32¶
[Source]
fun box f32()
: F32 val
Returns¶
F32 val
f64¶
[Source]
fun box f64()
: F64 val
Returns¶
F64 val
i8_unsafe¶
[Source]
fun box i8_unsafe()
: I8 val
Returns¶
I8 val
i16_unsafe¶
[Source]
fun box i16_unsafe()
: I16 val
Returns¶
I16 val
i32_unsafe¶
[Source]
fun box i32_unsafe()
: I32 val
Returns¶
I32 val
i64_unsafe¶
[Source]
fun box i64_unsafe()
: I64 val
Returns¶
I64 val
i128_unsafe¶
[Source]
fun box i128_unsafe()
: I128 val
Returns¶
I128 val
ilong_unsafe¶
[Source]
fun box ilong_unsafe()
: ILong val
Returns¶
ILong val
isize_unsafe¶
[Source]
fun box isize_unsafe()
: ISize val
Returns¶
ISize val
u8_unsafe¶
[Source]
fun box u8_unsafe()
: U8 val
Returns¶
U8 val
u16_unsafe¶
[Source]
fun box u16_unsafe()
: U16 val
Returns¶
U16 val
u32_unsafe¶
[Source]
fun box u32_unsafe()
: U32 val
Returns¶
U32 val
u64_unsafe¶
[Source]
fun box u64_unsafe()
: U64 val
Returns¶
U64 val
u128_unsafe¶
[Source]
fun box u128_unsafe()
: U128 val
Returns¶
U128 val
ulong_unsafe¶
[Source]
fun box ulong_unsafe()
: ULong val
Returns¶
ULong val
usize_unsafe¶
[Source]
fun box usize_unsafe()
: USize val
Returns¶
USize val
f32_unsafe¶
[Source]
fun box f32_unsafe()
: F32 val
Returns¶
F32 val
f64_unsafe¶
[Source]
fun box f64_unsafe()
: F64 val
Returns¶
F64 val
compare¶
[Source]
fun box compare(
that: U64 val)
: (Less val | Equal val | Greater val)
Parameters¶
that: U64 val
Returns¶
(Less val | Equal val | Greater val)
| pony | 443033 | https://sv.wikipedia.org/wiki/Gammal | Gammal | Se även ålderdom.
Gammal är ett runsvenskt mansnamn, som återfinns i flera svenska vikingatida runinskrifter, från främst Uppland (U 56, U 144, U 163, U 207, U 409, U 952, U 1070) , men också från Södermanland (Sö 359) och Öland (Öl 37), samt möjligen i en 1100-tals inskrift i Penningtons kyrka, Cumbria, England.
Det har använts ända till våra dagar, men är numera väldigt ovanligt.
Källor
Samnordisk runtextdatabas
Mansnamn | swedish | 1.045208 |
Pony/src-files-path-.txt |
path.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554use "time"
use @pony_os_realpath[Pointer[U8] iso^](path: Pointer[U8] tag)
use @pony_os_cwd[Pointer[U8]]()
primitive _PathSep
primitive _PathDot
primitive _PathDot2
primitive _PathOther
type _PathState is (_PathSep | _PathDot | _PathDot2 | _PathOther)
primitive Path
"""
Operations on paths that do not require a capability. The operations can be
used to manipulate path names, but give no access to the resulting paths.
"""
fun is_sep(c: U8): Bool =>
"""
Determine if a byte is a path separator.
"""
ifdef windows then
(c == '/') or (c == '\\')
else
c == '/'
end
fun tag sep(): String =>
"""
Return the path separator as a string.
"""
ifdef windows then "\\" else "/" end
fun is_abs(path: String): Bool =>
"""
Return true if the path is an absolute path.
"""
try
ifdef windows then
is_sep(path(0)?) or _drive_letter(path)
else
is_sep(path(0)?)
end
else
false
end
fun join(path: String, next_path: String): String =>
"""
Join two paths together. If the next_path is absolute, simply return it.
The returned path will be cleaned.
"""
if path.size() == 0 then
clean(next_path)
elseif next_path.size() == 0 then
clean(path)
elseif is_abs(next_path) then
clean(next_path)
else
try
if is_sep(path(path.size()-1)?) then
if is_sep(next_path(0)?) then
return clean(path + next_path.trim(1))
else
return clean(path + next_path)
end
end
end
clean(path + sep() + next_path)
end
fun clean(path: String): String =>
"""
Replace multiple separators with a single separator.
Convert / to the OS separator.
Remove instances of . from the path.
Remove instances of .. and the preceding path element from the path.
The result will have no trailing slash unless it is a root directory.
If the result would be empty, "." will be returned instead.
"""
let s = recover String(path.size()) end
let vol = volume(path)
s.append(vol)
var state: _PathState = _PathOther
var i = vol.size()
var backtrack = ISize(-1)
let n = path.size()
try
var c = path(i)?
if is_sep(c) then
s.append(sep())
i = i + 1
state = _PathSep
elseif c == '.' then
i = i + 1
state = _PathDot
else
backtrack = s.size().isize()
end
while i < n do
c = path(i)?
if is_sep(c) then
match state
| _PathDot2 =>
if backtrack == -1 then
s.append("..")
s.append(sep())
else
s.delete(backtrack, -1)
try
backtrack = s.rfind(sep(), backtrack - 2)? + 1
else
backtrack = vol.size().isize()
end
if
(s.size() == 0) or
(s.compare_sub("../", 3, backtrack) is Equal) or
ifdef windows then
s.compare_sub("..\\", 3, backtrack) is Equal
else
false
end
then
backtrack = -1
end
end
| _PathOther =>
s.append(sep())
end
state = _PathSep
elseif c == '.' then
match state
| _PathSep =>
state = _PathDot
| _PathDot =>
state = _PathDot2
| _PathDot2 =>
backtrack = s.size().isize()
s.append("...")
state = _PathOther
| _PathOther =>
s.append(".")
end
else
match state
| _PathSep =>
backtrack = s.size().isize()
| _PathDot =>
backtrack = s.size().isize()
s.append(".")
| _PathDot2 =>
backtrack = s.size().isize()
s.append("..")
end
s.push(c)
state = _PathOther
end
i = i + 1
end
end
match state
| _PathDot2 =>
if backtrack == -1 then
s.append("..")
else
s.delete(backtrack, -1)
end
end
try
if is_sep(s(s.size()-1)?) and (s.size() > 1) then
s.delete(-1, sep().size())
end
end
if s.size() > 0 then
s
else
"."
end
fun normcase(path: String): String =>
"""
Normalizes the case of path for the runtime platform.
"""
if Platform.windows() then
recover val path.lower() .> replace("/", "\\") end
elseif Platform.osx() then
path.lower()
else
path
end
fun cwd(): String =>
"""
Returns the program's working directory. Setting the working directory is
not supported, as it is not concurrency-safe.
"""
recover String.from_cstring(@pony_os_cwd()) end
fun abs(path: String): String =>
"""
Returns a cleaned, absolute path.
"""
if is_abs(path) then
clean(path)
else
join(cwd(), path)
end
fun rel(to: String, target: String): String ? =>
"""
Returns a path such that Path.join(to, Path.rel(to, target)) == target.
Raises an error if this isn't possible.
"""
var to_clean = clean(to)
var target_clean = clean(target)
if to_clean == target_clean then
return "."
end
var to_i: ISize = 0
ifdef windows then
to_clean = abs(to_clean)
target_clean = abs(target_clean)
let to_vol = volume(to_clean)
let target_vol = volume(target_clean)
if to_vol != target_vol then
error
end
to_i = to_vol.size().isize()
end
var to_0 = to_i
var target_i = to_i
var target_0 = target_i
while true do
to_i = try
to_clean.find(sep(), to_i)?
else
to_clean.size().isize()
end
target_i = try
target_clean.find(sep(), target_i)?
else
target_clean.size().isize()
end
if
(to_i != target_i) or
(to_clean.compare_sub(target_clean, target_i.usize()) isnt Equal)
then
break
end
if to_i < to_clean.size().isize() then
to_i = to_i + 1
end
if target_i < target_clean.size().isize() then
target_i = target_i + 1
end
to_0 = to_i
target_0 = target_i
end
if
((to_i - to_0) == 2)
and (to_clean.compare_sub("..", 2, to_0) is Equal)
then
error
end
if to_0.usize() != to_clean.size() then
let result = recover String end
try
while true do
to_i = to_clean.find(sep(), to_i)? + 1
result.append("..")
result.append(sep())
end
end
result.append("..")
result.append(sep())
result.append(target_clean.trim(target_0.usize()))
result
else
target_clean.trim(target_0.usize())
end
fun split(path: String, separator: String = Path.sep()): (String, String) =>
"""
Splits the path into a pair, (head, tail) where tail is the last pathname
component and head is everything leading up to that. The tail part will
never contain a slash; if path ends in a slash, tail will be empty. If
there is no slash in path, head will be empty. If path is empty, both head
and tail are empty. The path in head will be cleaned before it is returned.
In all cases, join(head, tail) returns a path to the same location as path
(but the strings may differ). Also see the functions dir() and base().
"""
try
let i = path.rfind(separator)?.usize()
(clean(path.trim(0, i)), path.trim(i+separator.size()))
else
("", path)
end
fun base(path: String, with_ext: Bool = true): String =>
"""
Return the path after the last separator, or the whole path if there is no
separator.
If `with_ext` is `false`, the extension as defined by the `ext()` method
will be omitted from the result.
"""
let b = try
path.trim(path.rfind(sep())?.usize() + 1)
else
path
end
if with_ext then
b
else
let e_size = ext(b).size()
if e_size > 0 then
b.trim(0, b.size() - e_size - 1)
else
b
end
end
fun dir(path: String): String =>
"""
Return a cleaned path before the last separator, or the whole path if there
is no separator.
"""
try
clean(path.trim(0, path.rfind(sep())?.usize()))
else
path
end
fun ext(path: String): String =>
"""
Return the file extension, i.e. the part after the last dot as long as that
dot is after all separators. Return an empty string for no extension.
"""
try
let i = path.rfind(".")?
let j = try
path.rfind(sep())?
else
i
end
if i >= j then
return path.trim(i.usize() + 1)
end
end
""
fun volume(path: String): String =>
"""
On Windows, this returns the drive letter or UNC base at the beginning of
the path, if there is one. Otherwise, this returns an empty string.
"""
ifdef windows then
var offset = ISize(0)
if path.compare_sub("""\\?\""", 4) is Equal then
offset = 4
if path.compare_sub("""UNC\""", 4, offset) is Equal then
return _network_share(path, offset + 4)
end
end
if _drive_letter(path, offset) then
return path.trim(0, offset.usize() + 2)
end
try
if
is_sep(path.at_offset(offset)?) and
is_sep(path.at_offset(offset + 1)?)
then
return _network_share(path, offset + 3)
end
end
end
""
fun _drive_letter(path: String, offset: ISize = 0): Bool =>
"""
Look for a drive letter followed by a ':', returning true if we find it.
"""
try
let c = path.at_offset(offset)?
(((c >= 'A') and (c <= 'Z')) or ((c >= 'a') and (c <= 'z')))
and (path.at_offset(offset + 1)? == ':')
else
false
end
fun _network_share(path: String, offset: ISize = 0): String =>
"""
Look for a host, a \, and a resource. Return the path up to that point if
we found one, otherwise an empty String.
"""
try
let next = path.find("\\", offset)? + 1
try
path.trim(0, path.find("\\", next)?.usize())
else
path
end
else
""
end
fun from_slash(path: String): String =>
"""
Changes each / in the path to the OS specific separator.
"""
ifdef windows then
let s = path.clone()
let len = s.size()
var i = USize(0)
try
while i < len do
if s(i)? == '/' then
s(i)? = '\\'
end
i = i + 1
end
end
s
else
path
end
fun to_slash(path: String): String =>
"""
Changes each OS specific separator in the path to /.
"""
ifdef windows then
let s = path.clone()
let len = s.size()
var i = USize(0)
try
while i < len do
if s(i)? == '\\' then
s(i)? = '/'
end
i = i + 1
end
end
s
else
path
end
fun canonical(path: String): String ? =>
"""
Return the equivalent canonical absolute path. Raise an error if there
isn't one.
"""
let cstring = @pony_os_realpath(path.cstring())
if cstring.is_null() then
error
else
recover String.from_cstring(consume cstring) end
end
fun is_list_sep(c: U8): Bool =>
"""
Determine if a byte is a path list separator.
"""
ifdef windows then c == ';' else c == ':' end
fun list_sep(): String =>
"""
Return the path list separator as a string.
"""
ifdef windows then ";" else ":" end
fun split_list(path: String): Array[String] iso^ =>
"""
Separate a list of paths into an array of cleaned paths.
"""
let array = recover Array[String] end
var offset: ISize = 0
try
while true do
let next = path.find(list_sep(), offset)?
array.push(clean(path.trim(offset.usize(), next.usize())))
offset = next + 1
end
else
array.push(clean(path.trim(offset.usize())))
end
array
fun random(len: USize = 6): String =>
"""
Returns a pseudo-random base, suitable as a temporary file name or
directory name, but not guaranteed to not already exist.
"""
let letters =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"
let s = recover String(len) end
var n = USize(0)
var r = Time.nanos().usize()
try
while n < len do
let c = letters(r % letters.size())?
r = r / letters.size()
s.push(c)
n = n + 1
end
end
s
| pony | 287197 | https://no.wikipedia.org/wiki/Scalable%20Vector%20Graphics | Scalable Vector Graphics | Scalable Vector Graphics (SVG) er et XML-basert filformat for markeringsspråk som beskriver todimensjonal vektorgrafikk. Det er en åpen standard utviklet og vedlikeholdt av World Wide Web Consortium.
Eksempel
Siden SVG-filer kun er tekst, tar de ikke så mye plass og kan redigeres med en vanlig teksteditor om ønskelig. Her er et eksempel på en svg-fil:
<?xml version="1.0" encoding="ASCII" standalone="yes"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
version="1.0" width="520" height="520">
<style type="text/css">
<![CDATA[
path {
fill-opacity:1;stroke:none;stroke-width:1px;stroke-linejoin:miter;stroke-opacity:1
}
]]>
</style>
<defs>
<linearGradient id="dk">
<stop style="stop-color:black;stop-opacity:1" offset="0"/>
<stop style="stop-color:black;stop-opacity:0" offset="1"/>
</linearGradient>
<linearGradient id="lt">
<stop style="stop-color:#ffe681;stop-opacity:1" offset="0"/>
<stop style="stop-color:#ffe681;stop-opacity:0" offset="1"/>
</linearGradient>
<linearGradient x1="136.4" y1="136.4" x2="167.5" y2="167.5" id="tl" xlink:href="#lt" gradientUnits="userSpaceOnUse"/>
<linearGradient x1="136.4" y1="383.6" x2="167.5" y2="352.5" id="bl" xlink:href="#lt" gradientUnits="userSpaceOnUse"/>
<linearGradient x1="383.6" y1="383.6" x2="352.5" y2="352.5" id="br" xlink:href="#dk" gradientUnits="userSpaceOnUse"/>
<linearGradient x1="383.6" y1="136.4" x2="352.5" y2="167.5" id="tr" xlink:href="#dk" gradientUnits="userSpaceOnUse"/>
</defs>
<path style="fill:#d4a000;stroke:black;stroke-width:9" d="M 260,6.3 L 6.3,260 L 260,513.7 L 513.7,260 L 260,6.3 z"/>
<text style="font-size:362px;font-weight:bold;font-family:Times New Roman, serif" y="380" x="200">!</text>
<path style="fill:url(#tl)" d="M 260,12.7 L 260,75 L 75,260 L 12.7,260 L 260,12.7 z"/>
<path style="fill:url(#bl)" d="M 260,507.3 L 260,445 L 75,260 L 12.7,260 L 260,507.3 z"/>
<path style="fill:url(#br)" d="M 260,507.3 L 260,445 L 445,260 L 507.3,260 L 260,507.3 z"/>
<path style="fill:url(#tr)" d="M 260,12.7 L 260,75 L 445,260 L 507.3,260 L 260,12.7 z"/>
</svg>
Støtte på verdensveven
Bruk av SVG-filer på verdensveven er i dag begrenset av manglende støtte fra enkelte eldre nettlesere, hovedsakelig eldre versjoner av Internet Explorer. Mange nettsteder som bruker SVG-filer, slik som Wikipedia, gjør bildene også tilgjengelige som punktgrafikkfiler. Nyere versjoner av moderne nettlesere støtter i det minste formatets grunnleggende funksjonalitet.
Eksterne lenker
XML
Sidebeskrivelsespråk
W3C-standarder | norwegian_bokmål | 0.84516 |
Pony/collections-ListNodes-.txt |
ListNodes[A: A, N: ListNode[A] #read]¶
[Source]
Iterate over the nodes in a List.
class ref ListNodes[A: A, N: ListNode[A] #read] is
Iterator[N] ref
Implements¶
Iterator[N] ref
Constructors¶
create¶
[Source]
Build the iterator over nodes.
reverse of false iterates forward, while
reverse of true iterates in reverse.
new ref create(
head: (N | None val),
reverse: Bool val = false)
: ListNodes[A, N] ref^
Parameters¶
head: (N | None val)
reverse: Bool val = false
Returns¶
ListNodes[A, N] ref^
Public Functions¶
has_next¶
[Source]
Indicates whether there are any nodes remaining in the iterator.
fun box has_next()
: Bool val
Returns¶
Bool val
next¶
[Source]
Return the next node in the iterator, advancing the iterator by one element.
Order of return is determined by reverse argument during creation.
fun ref next()
: N ?
Returns¶
N ?
| pony | 2130080 | https://no.wikipedia.org/wiki/Politikk%C3%A5ret%201785 | Politikkåret 1785 |
Hendelser
Fødsler
|-
|Juni
|27. || Arild Sibbern || || offiser, arkitekt og medlem av Riksforsamlingenpå Eidsvoll i 1814 ||align=center|77 ||align=center| ||
|}
Bildegalleri
Referanser
Eksterne lenker | norwegian_bokmål | 1.307427 |
Pony/files-FileInfo-.txt |
FileInfo¶
[Source]
This contains file system metadata for a path.
A symlink will report information about itself, other than the size which
will be the size of the target. A broken symlink will report as much as it
can and will set the broken flag.
class val FileInfo
Constructors¶
create¶
[Source]
This will raise an error if the FileStat capability isn't available or the
path doesn't exist.
new val create(
from: FilePath val)
: FileInfo val^ ?
Parameters¶
from: FilePath val
Returns¶
FileInfo val^ ?
Public fields¶
let filepath: FilePath val¶
[Source]
let mode: FileMode val¶
[Source]
UNIX-style file mode.
let hard_links: U32 val¶
[Source]
Number of hardlinks to this filepath.
let device: U64 val¶
[Source]
OS id of the device containing this filepath.
Device IDs consist of a major and minor device id,
denoting the type of device and the instance of this type on the system.
let inode: U64 val¶
[Source]
UNIX specific INODE number of filepath. Is 0 on Windows.
let uid: U32 val¶
[Source]
UNIX-style user ID of the owner of filepath.
let gid: U32 val¶
[Source]
UNIX-style user ID of the owning group of filepath.
let size: USize val¶
[Source]
Total size of filepath in bytes.
In case of a symlink this is the size of the target, not the symlink itself.
let access_time: (I64 val , I64 val)¶
[Source]
Time of last access as a tuple of seconds and nanoseconds since the epoch:
(let a_secs: I64, let a_nanos: I64) = file_info.access_time
let modified_time: (I64 val , I64 val)¶
[Source]
Time of last modification as tuple of seconds and nanoseconds since the epoch:
(let m_secs: I64, let m_nanos: I64) = file_info.modified_time
let change_time: (I64 val , I64 val)¶
[Source]
Time of the last change either the attributes (number of links, owner,
group, file mode, ...) or the content of filepath
as a tuple of seconds and nanoseconds since the epoch:
(let c_secs: I64, let c_nanos: I64) = file_info.change_time
On Windows this will be the file creation time.
let file: Bool val¶
[Source]
true if filepath points to an a regular file.
let directory: Bool val¶
[Source]
true if filepath points to a directory.
let pipe: Bool val¶
[Source]
true if filepath points to a named pipe.
let symlink: Bool val¶
[Source]
true if filepath points to a symbolic link.
let broken: Bool val¶
[Source]
true if filepath points to a broken symlink.
| pony | 3826407 | https://sv.wikipedia.org/wiki/Phelister%20puncticollis | Phelister puncticollis | Phelister puncticollis är en skalbaggsart som beskrevs av Hinton 1935. Phelister puncticollis ingår i släktet Phelister och familjen stumpbaggar. Inga underarter finns listade i Catalogue of Life.
Källor
Stumpbaggar
puncticollis | swedish | 1.34865 |
Pony/format-AlignRight-.txt |
AlignRight¶
[Source]
primitive val AlignRight
Constructors¶
create¶
[Source]
new val create()
: AlignRight val^
Returns¶
AlignRight val^
Public Functions¶
eq¶
[Source]
fun box eq(
that: AlignRight val)
: Bool val
Parameters¶
that: AlignRight val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: AlignRight val)
: Bool val
Parameters¶
that: AlignRight val
Returns¶
Bool val
| pony | 1035258 | https://sv.wikipedia.org/wiki/ATC-kod%20R03%3A%20Medel%20vid%20obstruktiva%20luftv%C3%A4gssjukdomar | ATC-kod R03: Medel vid obstruktiva luftvägssjukdomar |
R03A Adrenergika, inhalationer
R03AA Alfa- och beta-stimulerande medel
R03AA01 Adrenalin
R03AB Beta-1- och beta-2-stimulerande medel
R03AB02 Isoprenalin
R03AB03 Orciprenalin
R03AC Selektiva beta-2-stimulerande medel
R03AC02 Salbutamol
R03AC03 Terbutalin
R03AC04 Fenoterol
R03AC05 Rimiterol
R03AC06 Hexoprenalin
R03AC07 Isoetarin
R03AC08 Pirbuterol
R03AC09 Tretokinol
R03AC10 Karbuterol
R03AC11 Tulobuterol
R03AC12 Salmeterol
R03AC13 Formoterol
R03AC14 Clenbuterol
R03AC15 Reproterol
R03AC16 Procaterol
R03AC17 Bitolterol
R03AH Kombinationer av adrenergika
Inga undergrupper.
R03AK Adrenergika och övriga medel vid obstruktiva luftvägssjukdomar
R03AK01 Adrenalin och övriga medel vid obstruktiva luftvägssjukdomar
R03AK02 Isoprenalin och övriga medel vid obstruktiva luftvägssjukdomar
R03AK03 Fenoterol och övriga medel vid obstruktiva luftvägssjukdomar
R03AK04 Salbutamol och övriga medel vid obstruktiva luftvägssjukdomar
R03AK05 Reproterol och övriga medel vid obstruktiva luftvägssjukdomar
R03AK06 Salmeterol och övriga medel vid obstruktiva luftvägssjukdomar
R03AK07 Formoterol och övriga medel vid obstruktiva luftvägssjukdomar
R03B Övriga medel vid obstruktiva luftvägssjukdomar, inhalationer
R03BA Glukokortikoider
R03BA01 Beklometason
R03BA02 Budesonid
R03BA03 Flunisolid
R03BA04 Betametason
R03BA05 Flutikason
R03BA06 Triamcinolon
R03BA07 Mometason
R03BA08 Ciklesonid
R03BB Antikolinergika
R03BB01 Ipratropium
R03BB02 Oxitropiumbromid
R03BB03 Stramonimedel
R03BB04 Tiotropiumbromid
R03BC Antiallergika, exkl kortikosteroider
R03BC01 Natriumkromoglikat
R03BC03 Nedokromil
R03BX Övriga medel vid obstruktiva luftvägssjukdomar, inhalationer
R03BX01 Fenspirid
R03C Adrenergika för systemiskt bruk
R03CA Alfa- och beta-stimulerande medel
R03CA02 Efedrin
R03CB Beta-1- och beta-2-stimulerande medel
R03CB01 Isoprenalin
R03CB02 Metoxifenadrin
R03CB03 Orciprenalin
R03CB51 Isoprenalin, kombinationer
R03CB53 Orciprenalin, kombinationer
R03CC Selektiva beta-2-stimulerande medel
R03CC02 Salbutamol
R03CC03 Terbutalin
R03CC04 Fenoterol
R03CC05 Hexoprenalin
R03CC06 Isoetarin
R03CC07 Pirbuterol
R03CC08 Prokaterol
R03CC09 Tretokinol
R03CC10 Karbuterol
R03CC11 Tulobuterol
R03CC12 Bambuterol
R03CC13 Klenbuterol
R03CC14 Reproterol
R03CC53 Terbutalin, kombinationer
R03CK Adrenergika och övriga medel vid obstruktiva luftvägssjukdomar
Inga undergrupper.
R03D Övriga systemiska medel för obstruktiva lungsjukdomar
R03DA Xantin-derivat
R03DA01 Diprofyllin
R03DA02 Kolinteofyllinat
R03DA03 Proxifyllin
R03DA04 Teofyllin
R03DA05 Aminofyllin
R03DA06 Etamifyllin
R03DA07 Teobromin
R03DA08 Bamifyllin
R03DA09 Acefyllin piperazin
R03DA10 Bufyllin
R03DA11 Doxofyllin
R03DA20 Kombinationer av xantinderivat
R03DA51 Diprofyllin, kombinationer
R03DA54 Teofyllin, kombinationer utan neuroleptika
R03DA55 Aminofyllin, kombinationer
R03DA57 Teobromin, kombinationer
R03DA74 Teofyllin, kombinationer med neuroleptika
R03DB Xantin-derivat i kombination med adrenergika
R03DB01 Diprofyllin och adrenergika
R03DB02 Kolinteofyllinat och adrenergika
R03DB03 Proxyfyllin och adrenergika
R03DB04 Teofyllin och adrenergika
R03DB05 Aminofyllin och adrenergika
R03DB06 Etamifyllin och adrenergika
R03DC Leukotrien-receptorantagonister
R03DC01 Zafirlukast
R03DC02 Pranlukast
R03DC03 Montelukast
R03DC04 Ibudilast
R03DX Övriga systemiska medel för obstruktiva lungsjukdomar
R03DX01 Amlexanox
R03DX02 Eprozinol
R03DX03 Fenspirid
R03DX05 Omalizumab
R03DX06 Seratrodast
R03DX07 Roflumilast
R03 | swedish | 1.150731 |
Pony/pony_check-PropertyResultNotify-.txt |
PropertyResultNotify¶
[Source]
interface val PropertyResultNotify
Public Functions¶
fail¶
[Source]
Called when a Property has failed (did not hold for a sample)
or when execution raised an error.
Does not necessarily denote completeness of the property execution,
see complete(success: Bool) for that purpose.
fun box fail(
msg: String val)
: None val
Parameters¶
msg: String val
Returns¶
None val
complete¶
[Source]
Called when the Property execution is complete
signalling whether it was successful or not.
fun box complete(
success: Bool val)
: None val
Parameters¶
success: Bool val
Returns¶
None val
| pony | 29186 | https://da.wikipedia.org/wiki/Delphi | Delphi | Delphi er et objektorienteret programmeringsmiljø til udvikling af software.
Delphi er langt det mest udbredte udviklingsværktøj for Object Pascal-programmører, og bliver brugt af millioner af softwareudviklere verden over. Delphi blev udviklet af det amerikanske firma Borland, men udvikles i dag af Embarcadero som er ejet af Idera.
Delphi 1
Delphi 1 udkom i 1995 og var revolutionerende i form af sin stærke native compiler, sit stærke sprog i form af Object Pascal og med super gode værktøjer i form af Visual Component Library og ikke mindst database egenskaber.
Delphi 1's slogan var meget sigende
Delphi and Delphi Client/Server are the only development tools that provide the Rapid Application Development (RAD) benefits of visual component-based design, the power of an optimizing native code compiler and a scalable client/server solution.
De første 3 udgaver af Delphi er i øvrigt bl.a. udviklet af danskeren Anders Hejlsberg inden han skiftede over til konkurrenten Microsoft.
Delphi 2
Delphi 2 udkom i 1996 og fortsatte sin konkurrence imod Microsofts Visual Basic med fuld Win32 (Windows 95 integrering) med endnu bedre databaseværktøjer, datatyper og bedre mulighed for at videreudvikle sine grafiske brugergrænseflade.
Borland skrev følgende om Delphi 2
Delphi 2 is the only Rapid Application Development tool that combines the performance of the world's fastest optimizing 32-bit native-code compiler, the productivity of visual component-based design, and the flexibility of scalable database architecture in a robust object-oriented environment.
Delphi 2: the Ease of VB with the Power of C++"
Delphi 3
Delphi 3 udkom i 1997 og introducerede helt nye funktioner.
Nogle af de vigtigste nye funktioner i Delphi 3 var "DLL Debugging", komponent skabeloner, TDecisionCube og TTeeChar komponenterne, Komponent pakker, integrering med COM Objekter og WebBroker teknologien.
Delphi 4
Delphi 5
Delphi 6
Nye compiler directiver:
{$IFDEF MSWINDOWS}
{$IFDEF LINUX}
{$LIBPREFIX}
{$LIBSUFFIX}
{$LIBVERSION}
{$MESSAGE 'message'}
{$SetPEFlags}
Support for {$IF}{$ELSE}
Styring af compiler hints: Experimental, Deprecated, Library, Platform
Variant datatypen baseres ikke længere på COM men er ren Object Pascal.
COM baseret variant hedder nu OLEVariant
Styring af om "Typed constants" kan overskrives {$J+}
Styring af om enumerations værdier kan tildeles specifikke værdier (lign. C++)
Interface properties
Support for at kalde eksterne varargs funktioner hvis de følger cdecl kalde konventionen
Support for custom variants
Delphi 7
3 nye kompiler warnings som default er disablet, men kan enables via {$WARN UNSAFE_CODE ON} etc.:
Unsafe_Type,
Unsafe_Code
Unsafe_Cast
Overload af rutiner til formattering of parsning af numeriske strenge, date/tids strenge og currency vha TFormatSettings record.
Delphi 8 for .NET
Delphi 2005
D2005 tilføjede:
for ... in loop
inline keyword
Wildcard i uses statement tillades
nested types
nested constants
{$REGION}/{$ENDREGION} directiver
Delphi 2006
Tilføjede:
Enhanced records
Operator overloading
Static methoder og properties
Class helpers
FastMM er nu standard memory manager
strict private/protected visibility keywords
final keyword til virtuelle methoder
{$METHODINFO} direktiv
Delphi 2007
Generics blev introduceret i .NET Delphi compileren
Delphi 2009
Følgende blev tilføjet:
String mapper tilUnicodeString
Generics introduceres i Win32 compileren
function Default(T): T intrinsic function
Smart pointers
Anonymous methods
Nested exception og exception tracing
Support for pointer matematik og nyt compiler direktiv: {$POINTERMATH ON|OFF}
4 nye compiler warnings:
W1057 Implicit string cast from '%s' to '%s',
W1058 Implicit string cast with potential data loss from '%s' to '%s',
W1059 Explicit string cast from '%s' to '%s',
W1060 Explicit string cast with potential data loss from '%s' to '%s';
Exit funktionen kan acceptere et resultat argument
resourcestrings er nu Widestrings
TObject includerer en TMonitor, som kan bruges til at lave objekt orienteret trådsikring
Der kan angives beskrivende tekst til deprecated keywordet
Delphi 2010
I D2010 blev følgende tilføjet:
Udvidet Delphi RTTI (Run Time Type Information).
Attributes
as operatoren kan caste en interface reference til sit oprindelige objekt.
is operatoren kan bruges til at tjekke om et interface reference er baseret på en specifik klasse.
Man kan nu lave unsafe casting fra en interface reference til et objekt: TObject(SomeInterface).
Nyt delayed direktiv, som indikerer at en ekstern DLL ikke skal loades ind på deklarations tidspunkt, men først når funktioner i den bruges første gang.
Class Constructor/Destructor
Touch funktionalitet til Visual Component Library som understøtter Windows 7's Touch Brugergrænseflade.
Delphi for PHP
Med Delphi for PHP udviklede Codegear det første Rapid Application Development udviklingsvæktøj til PHP.
Delphi for PHP inkluderer et helt Visual Component Library for PHP, med over 50 komponenter, ud fra PHP 5s definitioner om objekt orienteret programmering og brugen af klasser.
VCL for PHP indeholder knapper, labels, check bokse, billeder, DHTML menuer, Flash objekter og meget mere.
Delphi XE
{$STRINGCHECKS} compiler direktivet ignoreres i XE
Ny 16-byte mulighed til record og data alignment i {$ALIGN} direktivet
Nyt {$CODEALIGN} direktiv, som styrer start adressen for en procedure eller funktion.
{$STRONGLINKTYPES ON} direktiv
Runtime regulære udtryk
Delphi XE2
Cross platform support mod Mac OSX (32-bit), iOS 32 bit og Windows 64 bit.
Packed records byte alignes nu. Det skete ikke altid tidligere.
8 nye DEFINEs:
ALIGN_STACK
CPUX86
CPUX64
MACOS (Mac operating system)
MACOS32
PC_MAPPED_EXCEPTIONS
PIC
WIN64
Brug af fuld unit scope navngivning kræves nu i uses sektion. F.eks. Windows.WinAPI i stedet for WinAPI.
Native data typer afhænger nu af den valgte arkitektur. Extended data type er 80 bit på Win32, men 64 bit på andre arkitekturer.
FireMonkey introduceres. Det er et nyt "all is a container" 2D/3D GPU accelereret UI. Det er en forudsætning for iOS applikationer, men optionelt for Win32 applikationer som fortsat kan bruge VCL.
Delphi XE3
Record hjælpere for indbyggede data typer (String, Integer etc).
iOS support midlertidigt fjernet. I XE2 var supporten i form af FreePascal compileren.
Atomare indbyggede funktioner:
AtomicExchange()
AtomicIncrement()
AtomicCmpExchange()
AtomicDecrement()
Delphi XE4
Et antal nye precompiler conditionals introduceres:
AUTOREFCOUNT
CPUARM
EXTERNAL_LINKER
IOS
NEXTGEN
UNDERSCOREIMPORTNAME
WEAKREF
WEAKINSTREF
WEAKINTREF
Reintroduceret support for iOS, nu med Embarcaderos egen compiler.
ARC (Automatic Reference Count) GC support i NextGen compilere
Delphi XE5
Android Support. Kræver device med ARMv6 + NEON eller ARMv7
Nyt precompiler conditional ANDROID
Operator overloading på klasser i Nextgen compilere (iOS og Android)
Delphi XE6
Enum identifier navne uden prefixes
Delphi XE7
String ligenende metoder supporteres nu på dynamiske arrays.
Parallel Library tilføjet RTL
Nye intrinsic funktioner:
function IsManagedType(T: TypeIdentifier): Boolean;
function HasWeakRef(T: TypeIdentifier): Boolean;
function GetTypeKind(T: TypeIdentifier): TTypeKind;
function IsConstValue(Value): boolean;
Delphi XE8
Support for iOS 64-bit
Nye integer typer: FixedInt/FixedUInt som er 32-bit på alle platforme.
Nye (gamle) arkitektur afhængige integer typer: LongInt, LongWord (64-bits på iOS 64-bit, ellers 32 bit)
FQN (Fully qualified names) skal nu indeholde unit scope.
Delphi 10 Seattle
Support for Android 5.1.1 og iOS 8.4
Forbedret OSX exception håndtering
Delphi 10.1 Berlin
Support for Utf8String og RawByteString på alle arkitekturer
Performance forbedringer ved kompilering af generics
[weak], [unsafe] og [volatile] attributes supporteres på alle arkitekturer
Data typen extended er nu 16 bytes på OSX
class og record hjælpere kan ikke tilgå private medlemmer af klasser eller records som de tilføjer til
Support for Android op til 6.01
Support for Windows 10 Notifications
Support for DirectX 12 på Windows https://www.embarcadero.com/products/delphi/whats-new
Eksterne henvisninger
Dansk Delphi brugergruppe
Delphi i Danmark
Delphi Tricks
Delphi and C++ Builder roadmap
Delphi History
Referencer
Udviklingsværktøjer
Windows-software | danish | 1.034722 |
Pony/term-EraseLine-.txt |
EraseLine¶
[Source]
primitive val EraseLine
Constructors¶
create¶
[Source]
new val create()
: EraseLine val^
Returns¶
EraseLine val^
Public Functions¶
eq¶
[Source]
fun box eq(
that: EraseLine val)
: Bool val
Parameters¶
that: EraseLine val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: EraseLine val)
: Bool val
Parameters¶
that: EraseLine val
Returns¶
Bool val
| pony | 8637865 | https://sv.wikipedia.org/wiki/Kia%20EV6 | Kia EV6 | Kia EV6 är en elbil som den sydkoreanska biltillverkaren Kia introducerade i mars 2021.
Kia EV6 blev första sydkoreanska bilmodell att utses till årets bil 2022.
Versioner:
Referenser
Externa länkar
Officiell webbplats.
EV6
Elbilsmodeller
Årets bil
Lanseringar 2021 | swedish | 1.199596 |
Pony/src-bureaucracy-registrar-.txt |
registrar.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48use "collections"
use "promises"
actor Registrar
"""
A Registrar keeps a map of lookup string to anything. Generally, this is used
to keep a directory of long-lived service-providing actors that can be
looked up name.
"""
embed _registry: Map[String, Any tag] = _registry.create()
be update(key: String, value: Any tag) =>
"""
Add, or change, a lookup mapping.
"""
_registry(key) = value
be remove(key: String, value: Any tag) =>
"""
Remove a mapping. This only takes effect if provided key currently maps to
the provided value. If the key maps to some other value (perhaps after
updating), the mapping won't be removed.
"""
try
if _registry(key)? is value then
_registry.remove(key)?
end
end
fun tag apply[A: Any tag = Any tag](key: String): Promise[A] =>
"""
Lookup by name. Returns a promise that will be fulfilled with the mapped
value if it exists and is a subtype of A. Otherwise, the promise will be
rejected.
"""
let promise = Promise[A]
_fetch[A](key, promise)
promise
be _fetch[A: Any tag](key: String, promise: Promise[A]) =>
"""
Fulfills or rejects the promise.
"""
try
promise(_registry(key)? as A)
else
promise.reject()
end
| pony | 4850366 | https://sv.wikipedia.org/wiki/Amyris%20carterae | Amyris carterae | Amyris carterae är en vinruteväxtart som beskrevs av Rebman & F.Chiang. Amyris carterae ingår i släktet Amyris och familjen vinruteväxter. Inga underarter finns listade i Catalogue of Life.
Källor
Vinruteväxter
carterae | swedish | 1.471747 |
Pony/collections-MinHeap-.txt |
MinHeap[A: Comparable[A] #read]¶
[Source]
type MinHeap[A: Comparable[A] #read] is
BinaryHeap[A, MinHeapPriority[A] val] ref
Type Alias For¶
BinaryHeap[A, MinHeapPriority[A] val] ref
| pony | 1093603 | https://sv.wikipedia.org/wiki/Lista%20%C3%B6ver%20finl%C3%A4ndska%20adels%C3%A4tter | Lista över finländska adelsätter | Detta är en lista över ätter som introducerats på Finlands riddarhus:
(A) adlig; (F) friherrlig; (G) grevlig; (Furste) furstlig
A
(A) Adlercreutz
(A) Adlerstjerna
(A) Agricola
(A) von Alfthan
(F) von Alfthan
(A) Aminoff
(F) Aminoff
(G) Aminoff
(A) von Ammondt
(A) Antell
(A) Armfelt
(F) Armfelt
(G) Armfelt
(A) Arppe
B
(A) von Baumgarten
(A) von Becker
(A) Benzelstjerna
(A) Bergenheim
(F) Bergenheim
(A) Bergenstråle
(G) Berg
(A) Björkenheim
(A) af Björkesten
(A) af Björksten
(A) von Blom
(A) Blåfield
(A) von Boehm
(A) Boije af Gennäs
(F) Boije af Gennäs
(A) von Boisman
(A) von Bonsdorff
(F) von Bonsdorff
(A) von Born
(F) von Born
(A) Bosin
(A) Brakel
(A) Brand
(A) von Briskorn
(A) Brummer
(A) Brummer
(A) Bruncrona
(A) af Brunér
(A) Brunow
(A) Bruun
(F) Bruun
(A) von Burghausen
(A) Bäck i Finland
(A) von Böningh
C
(F) Carpelan
(F) Cedercreutz
(A) Cederholm
(F) Cederström
(A) von Cederwald
(A) Charpentier
(A) von Christierson
(A) Clementeoff
(A) von Collan
(A) Conradi
(G) Creutz
(G) Cronhjelm af Hakunge
(A) Cronstedt
(F) Cronstedt
D
(A) von Daehn
(A) de Besche
(A) de Carnall
(A) de Carnall
(A) De Geer
(G) de Geer Till Tervik
(A) de la Chapelle
(F) de la Chapelle
(A) de la Motte
E
(A) Edelfelt
(A) Edelheim
(A) Edelsköld
(A) Ehrenmalm
(A) Ehrenstolpe
(A) Ehrenström
(A) Ehrnrooth
(A) Ehrnrooth
(A) Ekbom
(A) Ekestubbe
(A) Eneberg
(A) af Enehjelm
(A) Eneskjöld
(A) von Essen
(A) Estlander
(A) Estlander
(A) Etholén
(A) Etholén
(A) von Etter
F
(A) Falckenheim
(A) Falck
(A) Fellman
(A) Feuerstern
(A) von Fieandt
(A) Finckenberg
(A) Fischer
(F) Fleming af Lieblitz
(A) Fock
(A) Forbes
(A) af Forselles
(F) af Forselles
(A) Forsman
(A) Fraser
(A) Fredensköld
(F) Freedricksz
(A) Freidenfelt
(A) von Frenckell
(F) von Friesendorff
(A) af Frosterus
(A) Furuhjelm
(A) Furumarck
G
(A) Gadolin
(A) af Gadolin
(A) von Gertten
(A) Glansentjerna
(A) Godenhjelm
(A) Granfelt
(A) Gripenberg
(F) Gripenberg
(A) Gripenwaldt
(A) Grotenfelt
(A) Grönhagen
(A) von Guvenius
(A) Gyldenstolpe
(F) Gyldenstolpe
(A) Gyllenbögel
(A) Gyllenhök
H
(A) von Haartman
(F) von Haartman
(A) Hackman
(A) von Hartmansdorff
(F) von Hauff
(A) von Hauswolff
(A) Hedenberg
(A) von Heideman
(A) von Hellens
(F) von Hellens
(A) af Hellen
(A) af Heurlin
(A) Hisinger
(F) Hisinger-Jägerskiöld
(F) Hjerta
(A) Hjulhammar
(A) Hjärne
(F) Hjärne
(A) af Hällström
(A) Hästesko af Målagård
I
(A) Idestam
(A) Indrenius
(F) Indrenius-Zalewski
J
(A) Jerlström
(A) Jordan
(A) von Julin
(A) Jägerhorn af Spurila
(A) Jägerhorn af Storby
(A) Jägerskiöld
(A) Järnefelt
K
(A) af Klercker
(F) af Klercker
(A) Klick
(F) Klinckowström
(A) Klingstedt
(A) Knorring
(F) von Knorring
(A) von Knorring
(A) von Konow
(A) von Kothen
(F) von Kothen
(A) Krabbe
(A) von Kræmer
(A) Kuhlefelt
(A) Kuhlman
(G) Kuscheleff-Besborodko
L
(A) Ladau
(A) Lagerborg
(A) Lagermarck
(A) Lagus
(F) Langenskiöld
(A) Langenskjöld
(F) Langhoff
(A) Lavonius
(A) Lillienberg
(A) Lilljebrunn
(A) Lindcrantz
(A) Lindelöf
(A) Linder
(F) Linder af Svartå
(A) af Lindfors
(A) Lode
(F) Lybecker
M
(F) Mannerheim
(G) Mannerheim
(A) Mannerstråle
(A) von Marquard
(A) Martinau
(A) Mechelin
(A) Mechelin
(A) af Meinander
(F) Mellin
(Furste) Menschikoff
(A) von Minckwitz
(A) Molander
(F) Molander
(A) Montgomerie
(A) Morian
(A) Munck af Fulkila
(F) Munck
(A) Munsterhjelm
(A) von Müller
(A) Möllersvärd
N
(A) von Nandelstadh
(A) Nassokin
(F) Nicolaij
(F) von Nolcken
(A) Nordenheim
(A) Nordenskjöld
(A) Nordenstam (nr. 161)
(A) Nordenswan
(A) Nordmann
(A) Norrmén
(A) von Nottbeck
(A) von Numers
(A) Nybom
(A) Nyborg
O
(A) Oker-Blom
(A) Olivecreutz
(A) Ollonberg
P
(A) Palmén
(F) Palmén
(A) Palmfelt
(A) af Petersen
(A) Pinello
(A) Pippingsköld
(A) Pipping
(A) Pistolekors
(A) von Platen
(A) Pomell
(A) von Post
(A) Procopé
(A) Prytz
Q
(A) von Qvanten
R
(F) Ramsay
(A) Ramsay
(A) von Rancken
(A) von Rehausen
(F) Rehbinder
(A) Reiher
(A) Rein
(A) Rennerfelt
(A) von Rettig
(A) Reuterskjöld
(A) Ridderborg
(A) Ridderstad
(A) Ridderstorm
(A) Riddersvärd
(A) Roediger
(A) von Rohr
(F) Rokassowskij
(A) Roos af Hjelmsäter
(A) Rosenbröijer
(F) Rosenkampff
(A) Rosenlew
(A) Rotkirch
(F) Rotkirch
S
(A) Sackleen
(F) Sackleen
(A) Sanmark
(A) Sass
(A) von Schantz
(A) Schatelowitz
(A) Schauman
(A) Schildt
(A) von Schoultz
(A) von Schrowe
(A) Schulman
(F) af Schultén
(A) af Schultén
(A) Schützercrantz
(A) Segercrantz
(A) Segerstråle
(F) Silfverhjelm
(A) Silfverswan
(A) Snellman
(A) Soisalon-Soininen
(A) Spåre
(F) Stackelberg
(A) Standertskjöld
(F) Standertskjöld
(F) Standertskjöld-Nordenstam
(A) Starck
(A) af Stenhof
(A) Steven
(G) Stewen-Steinheil
(A) von Sticht
(A) Stierncreutz
(F) Stjerncrantz
(A) Stjernschantz
(A) Stjernvall
(A) Ståhlhane
(A) Stålarm Tavast
(A) Stålhammar
(F) von Suchtelen
(G) von Suchtelen
(A) Svinhufvud af Qvalstad
(A) Sölfverarm
T
(A) Tandefelt
(F) Tandefelt
(A) Taube
(A) Tawaststjerna
(A) Tawast
(A) Teetgren
(A) af Tengström
(A) von Tesche
(A) Thesleff
(A) von Thomsen
(A) Tigerstedt
(A) Toll
(A) Toll
(A) Torwigge
(A) von Trapp
(A) Tudeer
(F) von Troil
(A) von Törne
(A) Törngren
(A) Törnqvist
U
(A) Uggla
(A) af Ursin
W
(A) Wadenstierna
(A) Wahlberg
(A) Wahren
(A) Walleen
(F) Walleen
(A) Wallensköld
(A) Wallenstjerna
(A) Wallenstråle
(A) Wasastjerna
(A) von Weissenberg
(A) von Wendt
(F) von Willbrand
(A) von Willebrand
(F) von Willebrand
(F) von Willebrand
(A) von Winther
(F) Wrede af Elimä
(A) von Wright
(A) von Wulffert
(A) von Wulffert
(A) Wuorenheimo
(A) Wärnhjelm
Y
(A) Yrjö-Koskinen
(F) Yrjö-Koskinen
Z
(G) Zakrewsky
(A) Zansen
Ö
(A) Örn
(A) Örnhjelm
Referenser
Lista
Listor med anknytning till Finlands historia
Adelsätter | swedish | 1.194448 |
Pony/src-pony_check-randomness-.txt |
randomness.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240use "random"
class ref Randomness
"""
Source of randomness, providing methods for generatic uniformly distributed
values from a given closed interval: [min, max]
in order for the user to be able to generate every possible value for a given
primitive numeric type.
All primitive number method create numbers in range [min, max)
"""
let _random: Random
new ref create(seed1: U64 = 42, seed2: U64 = 0) =>
_random = Rand(seed1, seed2)
fun ref u8(min: U8 = U8.min_value(), max: U8 = U8.max_value()): U8 =>
"""
Generate a U8 in closed interval [min, max]
(default: [min_value, max_value]).
Behavior is undefined if `min` > `max`.
"""
if (min == U8.min_value()) and (max == U8.max_value()) then
_random.u8()
else
min + _random.int((max - min).u64() + 1).u8()
end
fun ref u16(min: U16 = U16.min_value(), max: U16 = U16.max_value()): U16 =>
"""
Generate a U16 in closed interval [min, max]
(default: [min_value, max_value]).
Behavior is undefined if `min` > `max`.
"""
if (min == U16.min_value()) and (max == U16.max_value()) then
_random.u16()
else
min + _random.int((max - min).u64() + 1).u16()
end
fun ref u32(min: U32 = U32.min_value(), max: U32 = U32.max_value()): U32 =>
"""
Generate a U32 in closed interval [min, max]
(default: [min_value, max_value]).
Behavior is undefined if `min` > `max`.
"""
if (min == U32.min_value()) and (max == U32.max_value()) then
_random.u32()
else
min + _random.int((max - min).u64() + 1).u32()
end
fun ref u64(min: U64 = U64.min_value(), max: U64 = U64.max_value()): U64 =>
"""
Generate a U64 in closed interval [min, max]
(default: [min_value, max_value]).
Behavior is undefined if `min` > `max`.
"""
if (min == U64.min_value()) and (max == U64.max_value()) then
_random.u64()
elseif min > U32.max_value().u64() then
(u32((min >> 32).u32(), (max >> 32).u32()).u64() << 32) or _random.u32().u64()
elseif max > U32.max_value().u64() then
let high = (u32((min >> 32).u32(), (max >> 32).u32()).u64() << 32).u64()
let low =
if high > 0 then
_random.u32().u64()
else
u32(min.u32(), U32.max_value()).u64()
end
high or low
else
// range within U32 range
u32(min.u32(), max.u32()).u64()
end
fun ref u128(
min: U128 = U128.min_value(),
max: U128 = U128.max_value())
: U128
=>
"""
Generate a U128 in closed interval [min, max]
(default: [min_value, max_value]).
Behavior is undefined if `min` > `max`.
"""
if (min == U128.min_value()) and (max == U128.max_value()) then
_random.u128()
elseif min > U64.max_value().u128() then
// both above U64 range - chose random low 64 bits
(u64((min >> 64).u64(), (max >> 64).u64()).u128() << 64) or u64().u128()
elseif max > U64.max_value().u128() then
// min below U64 max value
let high = (u64((min >> 64).u64(), (max >> 64).u64()).u128() << 64)
let low =
if high > 0 then
// number will be bigger than U64 max anyway, so chose a random lower u64
u64().u128()
else
// number <= U64 max, so chose lower u64 while considering requested range min
u64(min.u64(), U64.max_value()).u128()
end
high or low
else
// range within u64 range
u64(min.u64(), max.u64()).u128()
end
fun ref ulong(
min: ULong = ULong.min_value(),
max: ULong = ULong.max_value())
: ULong
=>
"""
Generate a ULong in closed interval [min, max]
(default: [min_value, max_value]).
Behavior is undefined if `min` > `max`.
"""
u64(min.u64(), max.u64()).ulong()
fun ref usize(
min: USize = USize.min_value(),
max: USize = USize.max_value())
: USize
=>
"""
Generate a USize in closed interval [min, max]
(default: [min_value, max_value]).
Behavior is undefined if `min` > `max`.
"""
u64(min.u64(), max.u64()).usize()
fun ref i8(min: I8 = I8.min_value(), max: I8 = I8.max_value()): I8 =>
"""
Generate a I8 in closed interval [min, max]
(default: [min_value, max_value]).
Behavior is undefined if `min` > `max`.
"""
min + u8(0, (max - min).u8()).i8()
fun ref i16(min: I16 = I16.min_value(), max: I16 = I16.max_value()): I16 =>
"""
Generate a I16 in closed interval [min, max]
(default: [min_value, max_value]).
Behavior is undefined if `min` > `max`.
"""
min + u16(0, (max - min).u16()).i16()
fun ref i32(min: I32 = I32.min_value(), max: I32 = I32.max_value()): I32 =>
"""
Generate a I32 in closed interval [min, max]
(default: [min_value, max_value]).
Behavior is undefined if `min` > `max`.
"""
min + u32(0, (max - min).u32()).i32()
fun ref i64(min: I64 = I64.min_value(), max: I64 = I64.max_value()): I64 =>
"""
Generate a I64 in closed interval [min, max]
(default: [min_value, max_value]).
Behavior is undefined if `min` > `max`.
"""
min + u64(0, (max - min).u64()).i64()
fun ref i128(
min: I128 = I128.min_value(),
max: I128 = I128.max_value())
: I128
=>
"""
Generate a I128 in closed interval [min, max]
(default: [min_value, max_value]).
Behavior is undefined if `min` > `max`.
"""
min + u128(0, (max - min).u128()).i128()
fun ref ilong(
min: ILong = ILong.min_value(),
max: ILong = ILong.max_value())
: ILong
=>
"""
Generate a ILong in closed interval [min, max]
(default: [min_value, max_value]).
Behavior is undefined if `min` > `max`.
"""
min + ulong(0, (max - min).ulong()).ilong()
fun ref isize(
min: ISize = ISize.min_value(),
max: ISize = ISize.max_value())
: ISize
=>
"""
Generate a ISize in closed interval [min, max]
(default: [min_value, max_value]).
Behavior is undefined if `min` > `max`.
"""
min + usize(0, (max - min).usize()).isize()
fun ref f32(min: F32 = 0.0, max: F32 = 1.0): F32 =>
"""
Generate a F32 in closed interval [min, max]
(default: [0.0, 1.0]).
"""
(_random.real().f32() * (max-min)) + min
fun ref f64(min: F64 = 0.0, max: F64 = 1.0): F64 =>
"""
Generate a F64 in closed interval [min, max]
(default: [0.0, 1.0]).
"""
(_random.real() * (max-min)) + min
fun ref bool(): Bool =>
"""
Generate a random Bool value.
"""
(_random.next() % 2) == 0
fun ref shuffle[T](array: Array[T] ref) =>
_random.shuffle[T](array)
| pony | 29278 | https://sv.wikipedia.org/wiki/Lista%20%C3%B6ver%20tal | Lista över tal | Detta är en lista över artiklar som handlar om olika tal.
Naturliga tal
I nummerordning
Särskilda tal
Nedan följer några noterbara heltal med särskilda matematiska egenskaper och/eller särskild kulturell betydelse.
Klicka på ett tal för att läsa mer om det:
−40
−1
23
42
222
239
255
256
273
284
360
420
496
555
666
720
786
911
999
1000
1001
1089
1729
3600
4711
6174
7744
8128
65535
69105
100000
142857
1000000
6000000
10000000
100000000
1000000000
2147483647
9814072356
9223372036854775807
Primtal
Ett primtal är ett heltal p som är större än 1 och som bara är delbart med ±1 och ±p.
Nedan listas de 100 första primtalen:
Sammansatta tal
Ett sammansatt tal är ett naturligt tal som inte är primtal, det vill säga som har minst tre positiva delare, eller med andra ord minst en äkta delare.
De första sammansatta talen är:
4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 26, 27, 28, 30, 32, 33, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 60, 62, 63, 64, 65, 66, 68, 69, 70, 72, 74, 75, 76, 77, 78, 80, 81, 82, 84, 85, 86, 87, 88, 90, 91, 92, 93, 94, 95, 96, 98, 99, 100, 102, 104, 105, 106, 108, 110, 111, 112, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 128, 129, 130, 132, 133, 134, 135, 136, 138, 140, …
Perfekta tal
Ett perfekt tal (även kallat fullkomligt tal) är ett naturligt tal n för vilket summan av alla sina delare, inklusive n självt, är lika med 2n. Detta är även detsamma som att ett tal n är lika med summan av alla sina delare förutom sig självt.
Om ett tal p är ett perfekt tal gäller följande:
De tio första perfekta talen är :
6
28
496
8 128
Defekta tal
Ett defekt tal (även kallat omättat tal eller fattigt tal) är ett naturligt tal n, för vilket summan av alla positiva delare, inklusive n självt, betecknat σ(n), är mindre än 2n. Värdet 2n - σ(n) kallas ibland n:s defekthet.
Ett oändligt antal jämna och udda defekta tal existerar. Till exempel är alla primtal, primtalspotenser och alla äkta delare till defekta tal eller perfekta tal defekta.
De första defekta talen är:
1, 2, 3, 4, 5, 7, 8, 9, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 25, 26, 27, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 43, 44, 45, 46, 47, 49, 50, 51, 52, 53, 55, 57, 58, 59, 61, 62, 63, 64, 65, 67, 68, 69, 71, 73, 74, 75, 76, 77, 79, 81, 82, 83, 85, 86, …
Ymniga tal
Ett ymnigt tal (även kallat mättat tal, överflödande tal eller rikt tal) är ett naturligt tal n för vilket summan av alla dess positiva delare, inklusive n självt, är större än 2n. Värdet σ(n) - 2n, där σ(n), sigmafunktionen, är denna summa, kallas n:s ymnighet. Ymniga tal introducerades först av Nicomachus i dennes Introductio Arithmetica (cirka år 100).
De första ymniga talen är:
12, 18, 20, 24, 30, 36, 40, 42, 48, 54, 56, 60, 66, 70, 72, 78, 80, 84, 88, 90, 96, 100, 102, 104, 108, 112, 114, 120, 126, 132, 138, 140, 144, 150, 156, 160, 162, 168, 174, 176, 180, 186, 192, 196, 198, 200, 204, 208, 210, 216, 220, 222, 224, 228, 234, 240, 246, 252, 258, 260, 264, 270, …
Det första udda ymniga talet är 945.
Särskilda namngivna tal
Googol (10100)
Googolplex (1010100)
Googolplexian (101010100)
Skewes tal
Steinhaus-Mosers notation (mega, megiston och Mosers tal)
Grahams tal (det största ändliga tal som någonsin har använts seriöst i ett matematiskt bevis)
Andra stora tal
Från och med deciljon finns ett algoritmiskt system för bildandet av större latinska prefix utarbetat av John Horton Conway and Allan Wechsler, och publicerat i The Book of Numbers av Conway och Richard Guy. Prefixen kan användas både i den långa och den korta skalan, men ger upphov till olika tiopotenser enligt ovan. Namnen byggs ihop av bitar från tabellen nedan, som representerar potenser av 106, 1060 och 10600. Stavningen av de latinska prefixen har standardmässigt försvenskats något, till exempel genom att Q blir K.
Tillvägagångssättet vid ordbildningen för en valfri tiopotens (upp till 105999) är:
Heltalsdividera exponenten med 6.
Om resten är 0, 1 eller 2, sätt en, tio eller hundra (respektive) före själva namnet.
Om resten är 3, 4 eller 5, byt ut suffixet -iljon mot -iljard i slutet, och sätt en, tio eller hundra (respektive) före själva namnet.
Om kvoten är mindre än 10, använd standardnamnen från miljon till noniljard från den föregående tabellen. Om kvoten ≥ 10, fortsätt.
Bryt upp kvoten i ental tiotal och hundratal, och leta upp de rätta segmenten i tabellen.
Sätt ihop segmenten. Foga in en extra bokstav om någon av bokstäverna inom parentes efter ett led matchar en bokstav inom parentes före nästa. Ex: se(sx) + (mx)oktoginta = sexoktoginta, eftersom x:en matchar. Se(sx) + (ms)viginti = Sesviginti.
För specialfallet tre- ska ett 's' fogas in om det matchar mot antingen ett 's' eller ett 'x'.
Ta bort den avslutande vokalen.
Lägg på -iljon (eller -iljard, enligt punkt 1.2). Klart.
Övriga reella tal
Negativa tal
−1
−2
−3
−4
−5
−6
−7
−8
−9
−10
Rationella tal
Halv
Irrationella tal
Pi
e
Eulers konstant
Gyllene snittet
Kvadratroten ur 2
Kvadratroten ur 3
Ordinaltal
Alef-noll
c
Se även
Talteori
Talföljd
Matematik
Lista över årtal före Kristus
Lista över årtal efter Kristus
Primtal
Lista över matematiska symboler
Lista över matematiska konstanter
Referenser
Noter
Listor med anknytning till matematik
Lista över tal | swedish | 0.653732 |
Pony/cli-SyntaxError-.txt |
SyntaxError¶
[Source]
SyntaxError summarizes a syntax error in a given parsed command line.
class val SyntaxError
Constructors¶
create¶
[Source]
new val create(
token': String val,
msg': String val)
: SyntaxError val^
Parameters¶
token': String val
msg': String val
Returns¶
SyntaxError val^
Public Functions¶
token¶
[Source]
fun box token()
: String val
Returns¶
String val
string¶
[Source]
fun box string()
: String val
Returns¶
String val
| pony | 1836084 | https://no.wikipedia.org/wiki/Mossberg%20100ATR | Mossberg 100ATR | Mossberg 100ATR er en serie med sylinderlåsrifler produsert av O. F. Mossberg & Sons. ATR er en forkortelse for all-terrain rifle (engelsk), som kan oversettes direkte til "terrengrifle" på norsk.
ATR er tilgjengelig i kamringer som .308 Winchester, .243 Winchester, 7mm-08 Remington, .30-06 Springfield og .270 Winchester. Våpenet leveres med flere ulike typer skjefter, som for eksempel valnøttskjefte eller kamuflasjefarget syntetisk skjefte. Riflen har frittflytende pipe.
Varianter
ATR Night Train
Mossberg ATR Night Train er en skarpskytterutgave av ATR-riflen som bare leveres kamret for .308 Winchester. Den leveres med sort syntetisk skjefte, tofot og kompensator.
4X4
Mossberg 4x4 er en videreutvikling av det opprinnelige 100ATR-designet, og tilbys i et bredt utvalgt kamringer fra .22-250 Remington til .338 Win Mag. 4x4 har frittflytende pipe med fluting, munningsbrems og ventilert skjefte.
MVP
Mossberg MVP er en nyere utgave av ATR-riflen, og MVP står for Mossberg Varmint Predator. Utgaven med kort låskasse er kamret for 5.56x45 mm og tar AR-magasiner, mens den lange låskassen er kamret for 7.62x51 mm og tar både M1a, M14 og SR-25-magasiner. MVP leveres med fire hovedtyper skjefter (Predator, Varmint, Patrol og Flex), og har flutet sluttstykke
Se også
BMS Cam
Remington Model 7615
Ruger American Rifle
Referanser
Skytevåpen i kaliber 5,56 mm | norwegian_bokmål | 1.060291 |
Pony/files-FileErrNo-.txt |
FileErrNo¶
[Source]
type FileErrNo is
(FileOK val | FileError val | FileEOF val | FileBadFileNumber val | FileExists val | FilePermissionDenied val)
Type Alias For¶
(FileOK val | FileError val | FileEOF val | FileBadFileNumber val | FileExists val | FilePermissionDenied val)
| pony | 643810 | https://no.wikipedia.org/wiki/Jorun%20Marie%20Kvernberg | Jorun Marie Kvernberg | Jorun Marie Rypdal Kvernberg (født 10. juli 1979) er en norsk folkemusiker og komponist/arrangør med norsk folkemusikk som hovedfelt og hardingfele og fele som hovedinstrument. Hun er kjent fra flere plateutgivelser med folkemusikk.
Hun er fra Fræna i Romsdal, søster til jazzfiolinisten Ola Kvernberg og barnebarn til spelemannen og folkemusikkomponisten Peter L. Rypdal. Jorun Marie Kvernberg har tatt kandidatstudiet i utøvende folkemusikk ved Norges musikkhøgskole i tiden 1999–2003. Kvernberg har også praktisk-pedagogisk utdanning fra samme institusjon.
Kvernberg livnærer seg som frilans folkemusiker. I 2006 gav hun ut sin soloplate, Album, på plateselskapet ta:lik og i 2013 kom Tidens Løsen sammen med trekkspiller Øyvind Sandum. Som solist er det folkemusikken fra Møre og Romsdal som står i høysetet. Kvernberg har siden 2000 spilt i gruppene Tindra og Majorstuen som begge har flere albumutgivelser. I tillegg spiller hun i duo og ensemble med Gabriel Fliflet og i Kviven duo med Britt Pernille Frøholm.
I 2018 startet hun prosjektet «På geitevis» sammen med folkesanger Unni Boksasp, tubaist Daniel Herskedal og pianist Dag-Filip Roaldsnes. De har nå bandet «Perleskum» sammen, som presenterer nye tonesettinger av dikt skrevet av Aasmund Olavsson Vinje. Her er Kvernberg prosjektleder og komponist. Ensemblet platedebuterer mars 2020.
Kvernberg har tidligere spilt med gruppene Bruvoll/Halvorsen, Camilla Granlien Band og Unni Boksasp Ensemble.
Kvernberg har turnert verden over og mottatt Spellemannprisen to ganger, med Majorstuen for debutplata og med Unni Boksasp Ensemble for Keramello. For 2009-2010 hadde hun Statens Kunstnerstipend.
Premier/utmerkelser
2013: Vinner av Folkelarmprisen for Kvite fuglar med Unni Boksasp Ensemble
2013: Nominert til Folkelarmprisen for Tidens Løsen med Øyvind Sandum
2012: Vinner av Gnist Mørestipend fra Sparebanken Møre
2010: Vinner av Folkelarmprisen for plata Keramello i kategorien tradisjonell, med Unni Boksasp Ensemble
2010: Vinner av Spellemannprisen for plata Keramello med Unni Boksasp Ensemble
2010: Vinner av soloklasse fele/hardingfele – Landsfestivalen for gamaldans.
2008: Beste Dansespel – Landskappleiken 2008 (solo)
2007: Vinner av Vestlandskappleiken, åpen klasse (solo)
2007: Nominert til Folkelarmprisen for solocd ”Album” i to klasser
2007: Vinner av Folkelarmprisen for cd Bruvoll-Halvorsen/ ”Trillar for to” i klassen Nyskapande
2007: Nominert til Spellemannprisen for Majorstuen/Juledrøm og Tindra/Lukkeleg vaking
2007: Finalist i lanseringsprogrammet INTROfolk07 (solo)
2005: Vinner av TONOs Edvard-prisen, den første innen folkemusikksjangeren.
2005: Vinner av lanseringsprogrammet INTROfolk05 (Majorstuen)
2005: Vinner av Kvartsprisen 2005 (Tindra)
2004: Vinner av soloklasse, Landsfestivalen for gamaldans.
2004: Vinner av Spellemannprisen 2003, folkemusikklassen (Majorstuen)
2003: Tildelt Øivind Berghs Minnepris 2003
Diskografi
Tytebæret (ta:lik, 2020), med Perleskum
Skrible (MFC, 2017), med Majorstuen (band)
Syngjaren (Grappa/Heilo 2016), div. artister
Kvitre (MFC, 2015), med Majorstuen (band)
Kvite fuglar (UBE, 2013), med Unni Boksasp Ensemble
Tidens Løsen (Ta:lik, 2013), med Øyvind Sandum
Valseria (Etnisk Musikklubb, 2013), med Gabriel Fliflet
Live in Concert (MFC, 2012) med Majorstuen (band)
Les Boréales compilation (Buda Musique, FR) med Majorstuen (band)
Live in Førde (Ta:lik og NRK, 2011) Tindra og Kroke
Moder Norge (Ta:lik, 2011) med Tindra
Keramello (Øra Musikk, 2010), Unni Boksasp Ensemble
Skir (MFC, 2010), Majorstuen (band).
Den kvite hjorten (Ta:lik, 2009), og Helge Jordal
Songar frå Havdal (ta:lik, 2007), Unni Boksasp
Jarnnetter (ta:lik 2007), Camilla Granlien Band
Trillar for to (Grappa, 2007), Bruvoll/Halvorsen
Album (Ta:lik, 2006). Slåtter fra Møre og Romsdal.
Juledrøm (MFC, 2006), Majorstuen (band).
Lukkeleg vaking (Ta:lik, 2006), Tindra.
Majorstuen (2L, 2002), Majorstuen (band).
Jorun jogga (MFC, 2004), Majorstuen (band).
Medvirker på
Mot nye høyder (Tylden og co, 2007), Bjørns Orkester
Home Sweet Home (Odeon/EMI, 2005), Liv Marit Wedvik
Inger Lise (Master Music, 2001), Inger Lise Rypdal
Klassisk Kalvik (Daworks, 2002), Finn Kalvik
Referanser
Eksterne lenker
Norske fiolinister
Norske folkemusikere
Personer fra Fræna kommune
Fødsler i 1979 | norwegian_bokmål | 1.261032 |
Pony/capsicum-CapRights-.txt |
CapRights¶
[Source]
type CapRights is
CapRights0 ref
Type Alias For¶
CapRights0 ref
| pony | 4269104 | https://sv.wikipedia.org/wiki/Cyperus%20afroalpinus | Cyperus afroalpinus | Cyperus afroalpinus är en halvgräsart som beskrevs av Kaare Arnstein Lye. Cyperus afroalpinus ingår i släktet papyrusar, och familjen halvgräs. IUCN kategoriserar arten globalt som nära hotad. Inga underarter finns listade i Catalogue of Life.
Källor
Papyrusar
afroalpinus | swedish | 1.237813 |
Pony/net--index-.txt |
Net package¶
The Net package provides support for creating UDP and TCP clients and
servers, reading and writing network data, and establishing UDP and
TCP connections.
Public Types¶
primitive DNS
primitive DNSAuth
class NetAddress
primitive NetAuth
class NoProxy
primitive OSSockOpt
interface Proxy
primitive TCPAuth
primitive TCPConnectAuth
actor TCPConnection
interface TCPConnectionNotify
primitive TCPListenAuth
interface TCPListenNotify
actor TCPListener
primitive UDPAuth
interface UDPNotify
actor UDPSocket
| pony | 3690812 | https://sv.wikipedia.org/wiki/Tropidion%20pictipenne | Tropidion pictipenne | Tropidion pictipenne är en skalbaggsart som först beskrevs av Martins 1962. Tropidion pictipenne ingår i släktet Tropidion och familjen långhorningar.
Artens utbredningsområde är Paraguay. Inga underarter finns listade i Catalogue of Life.
Källor
Externa länkar
Långhorningar
pictipenne | swedish | 1.288088 |
Pony/src-collections-list-.txt |
list.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981class List[A] is Seq[A]
"""
A doubly linked list.
The following is paraphrased from [Wikipedia](https://en.wikipedia.org/wiki/Doubly_linked_list).
A doubly linked list is a linked data structure that consists of a set of sequentially
linked records called nodes (implemented in Pony via the collections.ListNode class). Each
node contains four fields: two link fields (references to the previous and to the next node in
the sequence of nodes), one data field, and the reference to the List in which it resides. A doubly
linked list can be conceptualized as two singly linked lists formed from the same data items, but
in opposite sequential orders.
As you would expect. functions are provided to perform all the common list operations such as
creation, traversal, node addition and removal, iteration, mapping, filtering, etc.
## Example program
There are a _lot_ of functions in List. The following code picks out a few common examples.
It outputs:
A new empty list has 0 nodes.
Adding one node to our empty list means it now has a size of 1.
The first (index 0) node has the value: A single String
A list created by appending our second single-node list onto our first has size: 2
The List nodes of our first list are now:
A single String
Another String
Append *moves* the nodes from the second list so that now has 0 nodes.
A list created from an array of three strings has size: 3
First
Second
Third
Mapping over our three-node list produces a new list of size: 3
Each node-value in the resulting list is now far more exciting:
First BOOM!
Second BOOM!
Third BOOM!
Filtering our three-node list produces a new list of size: 2
Second BOOM!
Third BOOM!
The size of our first partitioned list (matches predicate): 1
The size of our second partitioned list (doesn't match predicate): 1
Our matching partition elements are:
Second BOOM!
```pony
use "collections"
actor Main
new create(env:Env) =>
// Create a new empty List of type String
let my_list = List[String]()
env.out.print("A new empty list has " + my_list.size().string() + " nodes.") // 0
// Push a String literal onto our empty List
my_list.push("A single String")
env.out.print("Adding one node to our empty list means it now has a size of "
+ my_list.size().string() + ".") // 1
// Get the first element of our List
try env.out.print("The first (index 0) node has the value: "
+ my_list.index(0)?()?.string()) end // A single String
// Create a second List from a single String literal
let my_second_list = List[String].unit("Another String")
// Append the second List to the first
my_list.append_list(my_second_list)
env.out.print("A list created by appending our second single-node list onto our first has size: "
+ my_list.size().string()) // 2
env.out.print("The List nodes of our first list are now:")
for n in my_list.values() do
env.out.print("\t" + n.string())
end
// NOTE: this _moves_ the elements so second_list consequently ends up empty
env.out.print("Append *moves* the nodes from the second list so that now has "
+ my_second_list.size().string() + " nodes.") // 0
// Create a third List from a Seq(ence)
// (In this case a literal array of Strings)
let my_third_list = List[String].from(["First"; "Second"; "Third"])
env.out.print("A list created from an array of three strings has size: "
+ my_third_list.size().string()) // 3
for n in my_third_list.values() do
env.out.print("\t" + n.string())
end
// Map over the third List, concatenating some "BOOM!'s" into a new List
let new_list = my_third_list.map[String]({ (n) => n + " BOOM!" })
env.out.print("Mapping over our three-node list produces a new list of size: "
+ new_list.size().string()) // 3
env.out.print("Each node-value in the resulting list is now far more exciting:")
for n in new_list.values() do
env.out.print("\t" + n.string())
end
// Filter the new list to extract 2 elements
let filtered_list = new_list.filter({ (n) => n.string().contains("d BOOM!") })
env.out.print("Filtering our three-node list produces a new list of size: "
+ filtered_list.size().string()) // 2
for n in filtered_list.values() do
env.out.print("\t" + n.string()) // Second BOOM!\nThird BOOM!
end
// Partition the filtered list
let partitioned_lists = filtered_list.partition({ (n) => n.string().contains("Second") })
env.out.print("The size of our first partitioned list (matches predicate): " + partitioned_lists._1.size().string()) // 1
env.out.print("The size of our second partitioned list (doesn't match predicate): " + partitioned_lists._2.size().string()) // 1
env.out.print("Our matching partition elements are:")
for n in partitioned_lists._1.values() do
env.out.print("\t" + n.string()) // Second BOOM!
end
```
"""
var _head: (ListNode[A] | None) = None
var _tail: (ListNode[A] | None) = None
var _size: USize = 0
new create(len: USize = 0) =>
"""
Always creates an empty list with 0 nodes, `len` is ignored.
Required method for `List` to satisfy the `Seq` interface.
```pony
let my_list = List[String]
```
"""
None
new unit(a: A) =>
"""
Creates a list with 1 node of element.
```pony
let my_list = List[String].unit("element")
```
"""
push(consume a)
new from(seq: Array[A^]) =>
"""
Creates a list equivalent to the provided Array (both node number and order are preserved).
```pony
let my_list = List[String].from(["a"; "b"; "c"])
```
"""
for value in seq.values() do
push(consume value)
end
fun ref reserve(len: USize) =>
"""
Do nothing
Required method for `List` to satisfy the `Seq` interface.
"""
None
fun size(): USize =>
"""
Returns the number of items in the list.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
my_list.size() // 3
```
"""
_size
fun apply(i: USize = 0): this->A ? =>
"""
Get the i-th element, raising an error if the index is out of bounds.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
try my_list.apply(1)? end // "b"
```
"""
index(i)?()?
fun ref update(i: USize, value: A): A^ ? =>
"""
Change the i-th element, raising an error if the index is out of bounds, and
returning the previous value.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
try my_list.update(1, "z")? end // Returns "b" and List now contains ["a"; "z"; "c"]
```
"""
index(i)?()? = consume value
fun index(i: USize): this->ListNode[A] ? =>
"""
Gets the i-th node, raising an error if the index is out of bounds.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
try my_list.index(0)? end // Returns a ListNode[String] containing "a"
```
"""
if i >= _size then
error
end
var node = _head as this->ListNode[A]
var j = USize(0)
while j < i do
node = node.next() as this->ListNode[A]
j = j + 1
end
node
fun ref remove(i: USize): ListNode[A] ? =>
"""
Remove the i-th node, raising an error if the index is out of bounds, and
returning the removed node.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
try my_list.remove(0)? end // Returns a ListNode[String] containing "a" and List now contains ["b"; "c"]
```
"""
index(i)? .> remove()
fun ref clear() =>
"""
Empties the list.
"""
_head = None
_tail = None
_size = 0
fun head(): this->ListNode[A] ? =>
"""
Show the head of the list, raising an error if the head is empty.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
try my_list.head()? end // Returns a ListNode[String] containing "a"
```
"""
_head as this->ListNode[A]
fun tail(): this->ListNode[A] ? =>
"""
Show the tail of the list, raising an error if the tail is empty.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
try my_list.tail()? end // Returns a ListNode[String] containing "c"
```
"""
_tail as this->ListNode[A]
fun ref prepend_node(node: ListNode[A]) =>
"""
Adds a node to the head of the list.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let new_head = ListNode[String]("0")
my_list.prepend_node(new_head) // ["0", "a"; "b"; "c"]
```
"""
match _head
| let head': ListNode[A] =>
head'.prepend(node)
else
_set_both(node)
end
fun ref append_node(node: ListNode[A]) =>
"""
Adds a node to the tail of the list.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let new_tail = ListNode[String]("0")
my_list.append_node(new_head) // ["a"; "b"; "c", "0"]
```
"""
match _tail
| let tail': ListNode[A] =>
tail'.append(node)
else
_set_both(node)
end
fun ref append_list(that: List[A]) =>
"""
Empties the provided List by appending all elements onto the receiving List.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let other_list = List[String].from(["d"; "e"; "f"])
my_list.append_list(other_list) // my_list is ["a"; "b"; "c"; "d"; "e"; "f"], other_list is empty
```
"""
if this isnt that then
while that._size > 0 do
try append_node(that.head()?) end
end
end
fun ref prepend_list(that: List[A]) =>
"""
Empties the provided List by prepending all elements onto the receiving List.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let other_list = List[String].from(["d"; "e"; "f"])
my_list.prepend_list(other_list) // my_list is ["d"; "e"; "f"; "a"; "b"; "c"], other_list is empty
```
"""
if this isnt that then
while that._size > 0 do
try prepend_node(that.tail()?) end
end
end
fun ref push(a: A) =>
"""
Adds a new tail value.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
my_list.push("d") // my_list is ["a"; "b"; "c"; "d"]
```
"""
append_node(ListNode[A](consume a))
fun ref pop(): A^ ? =>
"""
Removes the tail value, raising an error if the tail is empty.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
try my_list.pop() end // Returns "c" and my_list is ["a"; "b"]
```
"""
tail()? .> remove().pop()?
fun ref unshift(a: A) =>
"""
Adds a new head value.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
my_list.unshift("d") // my_list is ["d"; "a"; "b"; "c"]
```
"""
prepend_node(ListNode[A](consume a))
fun ref shift(): A^ ? =>
"""
Removes the head value, raising an error if the head is empty.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
try my_list.shift() end // Returns "a" and my_list is ["b"; "c"]
```
"""
head()? .> remove().pop()?
fun ref append(
seq: (ReadSeq[A] & ReadElement[A^]),
offset: USize = 0,
len: USize = -1)
=>
"""
Append len elements from a sequence, starting from the given offset.
When len is -1, all elements of sequence are pushed.
Does not remove elements from sequence.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let other_list = List[String].from(["d"; "e"; "f"])
my_list.append(other_list) // my_list is ["a"; "b"; "c"; "d"; "e"; "f"], other_list is unchanged
```
"""
if offset >= seq.size() then
return
end
let copy_len = len.min(seq.size() - offset)
reserve(_size + copy_len)
let cap = copy_len + offset
var i = offset
try
while i < cap do
push(seq(i)?)
i = i + 1
end
end
fun ref concat(iter: Iterator[A^], offset: USize = 0, len: USize = -1) =>
"""
Add len iterated elements to the tail of the list, starting from the given
offset.
When len is -1, all elements of iterator are pushed.
Does not remove elements from iterator.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let other_list = List[String].from(["d"; "e"; "f"])
my_list.concat(other_list.values()) // my_list is ["a"; "b"; "c"; "d"; "e"; "f"], other_list is unchanged
```
"""
try
for i in Range(0, offset) do
if iter.has_next() then
iter.next()?
else
return
end
end
for i in Range(0, len) do
if iter.has_next() then
push(iter.next()?)
else
return
end
end
end
fun ref truncate(len: USize) =>
"""
Pop tail elements until the list is len size.
If the list is already smaller than len, do nothing.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
my_list.truncate(1) // my_list is ["a"]
```
"""
try
while _size > len do
pop()?
end
end
fun clone(): List[this->A!]^ =>
"""
Clone all elements into a new List.
Note: elements are not copied, an additional reference to each element is created in the new List.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let other_list = my_list.clone() // my_list is ["a"; "b"; "c"], other_list is ["a"; "b"; "c"]
```
"""
let out = List[this->A!]
for v in values() do
out.push(v)
end
out
fun map[B](f: {(this->A!): B^} box): List[B]^ =>
"""
Builds a new `List` by applying a function to every element of the `List`.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let other_list = my_list.map[String]( {(s: String): String => "m: " + s } ) // other_list is ["m: a"; "m: b"; "m: c"]
```
"""
try
_map[B](head()?, f, List[B])
else
List[B]
end
fun _map[B](
ln: this->ListNode[A],
f: {(this->A!): B^} box,
acc: List[B])
: List[B]^
=>
"""
Private helper for `map`, recursively working with `ListNode`s.
"""
try acc.push(f(ln()?)) end
try
_map[B](ln.next() as this->ListNode[A], f, acc)
else
acc
end
fun flat_map[B](f: {(this->A!): List[B]} box): List[B]^ =>
"""
Builds a new `List` by applying a function to every element of the `List`,
producing a new `List` for each element, then flattened into a single `List`.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let other_list = my_list.flat_map[String]( {(s: String): List[String] => List[String].from( ["m"; s] )} ) // other_list is ["m"; "a"; "m"; "b"; "m"; c"]
```
"""
try
_flat_map[B](head()?, f, List[B])
else
List[B]
end
fun _flat_map[B](
ln: this->ListNode[A],
f: {(this->A!): List[B]} box,
acc: List[B]): List[B]^
=>
"""
Private helper for `flat_map`, recursively working with `ListNode`s.
"""
try acc.append_list(f(ln()?)) end
try
_flat_map[B](ln.next() as this->ListNode[A], f, acc)
else
acc
end
fun filter(f: {(this->A!): Bool} box): List[this->A!]^ =>
"""
Builds a new `List` with those elements that satisfy the predicate.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let other_list = my_list.filter( {(s: String): Bool => s == "b" } ) // other_list is ["b"]
```
"""
try
_filter(head()?, f, List[this->A!])
else
List[this->A!]
end
fun _filter(
ln: this->ListNode[A],
f: {(this->A!): Bool} box,
acc: List[this->A!]): List[this->A!]
=>
"""
Private helper for `filter`, recursively working with `ListNode`s.
"""
try
let cur = ln()?
if f(cur) then acc.push(cur) end
end
try
_filter(ln.next() as this->ListNode[A], f, acc)
else
acc
end
fun fold[B](f: {(B!, this->A!): B^} box, acc: B): B =>
"""
Folds the elements of the `List` using the supplied function.
On the first iteration, the `B` argument in `f` is the value `acc`,
on the second iteration `B` is the result of the first iteration,
on the third iteration `B` is the result of the second iteration, and so on.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let folded = my_list.fold[String]( {(str: String, s: String): String => str + s }, "z") // "zabc"
```
"""
let h = try
head()?
else
return acc
end
_fold[B](h, f, consume acc)
fun _fold[B](
ln: this->ListNode[A],
f: {(B!, this->A!): B^} box,
acc: B)
: B
=>
"""
Private helper for `fold`, recursively working with `ListNode`s.
"""
let nextAcc: B = try f(acc, ln()?) else consume acc end
let h = try
ln.next() as this->ListNode[A]
else
return nextAcc
end
_fold[B](h, f, consume nextAcc)
fun every(f: {(this->A!): Bool} box): Bool =>
"""
Returns `true` if every element satisfies the predicate, otherwise returns `false`.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let all_z = my_list.every( {(s: String): Bool => s == "z"} ) // false
```
"""
try
_every(head()?, f)
else
true
end
fun _every(ln: this->ListNode[A], f: {(this->A!): Bool} box): Bool =>
"""
Private helper for `every`, recursively working with `ListNode`s.
"""
try
if not(f(ln()?)) then
false
else
_every(ln.next() as this->ListNode[A], f)
end
else
true
end
fun exists(f: {(this->A!): Bool} box): Bool =>
"""
Returns `true` if at least one element satisfies the predicate, otherwise returns `false`.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let b_exists = my_list.exists( {(s: String): Bool => s == "b"} ) // true
```
"""
try
_exists(head()?, f)
else
false
end
fun _exists(ln: this->ListNode[A], f: {(this->A!): Bool} box): Bool =>
"""
Private helper for `exists`, recursively working with `ListNode`s.
"""
try
if f(ln()?) then
true
else
_exists(ln.next() as this->ListNode[A], f)
end
else
false
end
fun partition(
f: {(this->A!): Bool} box)
: (List[this->A!]^, List[this->A!]^)
=>
"""
Builds a pair of `List`s, the first of which is made up of the elements
satisfying the predicate and the second of which is made up of
those that do not.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
(let lt_b, let gt_b) = my_list.partition( {(s: String): Bool => s < "b"} ) // lt_b is ["a"], while gt_b is ["b"; "c"]
```
"""
let l1 = List[this->A!]
let l2 = List[this->A!]
for item in values() do
if f(item) then l1.push(item) else l2.push(item) end
end
(l1, l2)
fun drop(n: USize): List[this->A!]^ =>
"""
Builds a `List` by dropping the first `n` elements.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let other_list = my_list.drop(1) // ["b"; "c"]
```
"""
let l = List[this->A!]
if size() > n then
try
var node = index(n)?
for i in Range(n, size()) do
l.push(node()?)
node = node.next() as this->ListNode[A]
end
end
end
l
fun take(n: USize): List[this->A!] =>
"""
Builds a `List` by keeping the first `n` elements.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let other_list = my_list.drop(1) // ["a"]
```
"""
let l = List[this->A!]
if size() > 0 then
try
var node = head()?
for i in Range(0, n.min(size())) do
l.push(node()?)
node = node.next() as this->ListNode[A]
end
end
end
l
fun take_while(f: {(this->A!): Bool} box): List[this->A!]^ =>
"""
Builds a `List` of elements satisfying the predicate, stopping at the first `false` return.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let other_list = my_list.take_while( {(s: String): Bool => s < "b"} ) // ["a"]
```
"""
let l = List[this->A!]
if size() > 0 then
try
var node = head()?
for i in Range(0, size()) do
let item = node()?
if f(item) then l.push(item) else return l end
node = node.next() as this->ListNode[A]
end
end
end
l
fun reverse(): List[this->A!]^ =>
"""
Builds a new `List` by reversing the elements in the `List`.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let other_list = my_list.reverse() // ["c"; "b"; "a"]
```
"""
try
_reverse(head()?, List[this->A!])
else
List[this->A!]
end
fun _reverse(ln: this->ListNode[A], acc: List[this->A!]): List[this->A!]^ =>
"""
Private helper for `reverse`, recursively working with `ListNode`s.
"""
try acc.unshift(ln()?) end
try
_reverse(ln.next() as this->ListNode[A], acc)
else
acc
end
fun contains[B: (A & HasEq[A!] #read) = A](a: box->B): Bool =>
"""
Returns `true` if the `List` contains the provided element, otherwise returns `false`.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let contains_b = my_list.contains[String]("b") // true
```
"""
try
_contains[B](head()?, a)
else
false
end
fun _contains[B: (A & HasEq[A!] #read) = A](
ln: this->ListNode[A],
a: box->B)
: Bool
=>
"""
Private helper for `contains`, recursively working with `ListNode`s.
"""
try
if a == ln()? then
true
else
_contains[B](ln.next() as this->ListNode[A], a)
end
else
false
end
fun nodes(): ListNodes[A, this->ListNode[A]]^ =>
"""
Return an iterator on the nodes in the `List` in forward order.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let nodes = my_list.nodes() // node with "a" is before node with "c"
```
"""
ListNodes[A, this->ListNode[A]](_head)
fun rnodes(): ListNodes[A, this->ListNode[A]]^ =>
"""
Return an iterator on the nodes in the `List` in reverse order.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let rnodes = my_list.rnodes() // node with "c" is before node with "a"
```
"""
ListNodes[A, this->ListNode[A]](_head, true)
fun values(): ListValues[A, this->ListNode[A]]^ =>
"""
Return an iterator on the values in the `List` in forward order.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let values = my_list.values() // value "a" is before value "c"
```
"""
ListValues[A, this->ListNode[A]](_head)
fun rvalues(): ListValues[A, this->ListNode[A]]^ =>
"""
Return an iterator on the values in the `List` in reverse order.
```pony
let my_list = List[String].from(["a"; "b"; "c"])
let rvalues = my_list.rvalues() // value "c" is before value "a"
```
"""
ListValues[A, this->ListNode[A]](_head, true)
fun ref _increment() =>
"""
Private method to control mutating `_size` field.
"""
_size = _size + 1
fun ref _decrement() =>
"""
Private method to control mutating `_size` field.
"""
_size = _size - 1
fun ref _set_head(head': (ListNode[A] | None)) =>
"""
Private method to control mutating `_head` field.
"""
_head = head'
fun ref _set_tail(tail': (ListNode[A] | None)) =>
"""
Private method to control mutating `_tail` field.
"""
_tail = tail'
fun ref _set_both(node: ListNode[A]) =>
"""
Private method to set both `_head` and `_tail` to the same node,
creating a `List` with a `_size` of 1.
"""
node._set_list(this)
_head = node
_tail = node
_size = 1
class ListNodes[A, N: ListNode[A] #read] is Iterator[N]
"""
Iterate over the nodes in a `List`.
"""
var _next: (N | None)
let _reverse: Bool
new create(head: (N | None), reverse: Bool = false) =>
"""
Build the iterator over nodes.
`reverse` of `false` iterates forward, while
`reverse` of `true` iterates in reverse.
"""
_next = head
_reverse = reverse
fun has_next(): Bool =>
"""
Indicates whether there are any nodes remaining in the iterator.
"""
_next isnt None
fun ref next(): N ? =>
"""
Return the next node in the iterator, advancing the iterator by one element.
Order of return is determined by `reverse` argument during creation.
"""
match _next
| let next': N =>
if _reverse then
_next = next'.prev()
else
_next = next'.next()
end
next'
else
error
end
class ListValues[A, N: ListNode[A] #read] is Iterator[N->A]
"""
Iterate over the values in a `List`.
"""
var _next: (N | None)
let _reverse: Bool
new create(head: (N | None), reverse: Bool = false) =>
"""
Build the iterator over values.
`reverse` of `false` iterates forward, while
`reverse` of `true` iterates in reverse.
"""
_next = head
_reverse = reverse
fun has_next(): Bool =>
"""
Indicates whether there are any values remaining in the iterator.
"""
_next isnt None
fun ref next(): N->A ? =>
"""
Return the next node in the iterator, advancing the iterator by one element.
Order of return is determined by `reverse` argument during creation.
"""
match _next
| let next': N =>
if _reverse then
_next = next'.prev()
else
_next = next'.next()
end
next'()?
else
error
end
| pony | 4228986 | https://sv.wikipedia.org/wiki/Agave%20stringens | Agave stringens | Agave stringens är en sparrisväxtart som beskrevs av William Trelease. Agave stringens ingår i släktet Agave och familjen sparrisväxter. Inga underarter finns listade i Catalogue of Life.
Källor
Sparrisväxter
stringens | swedish | 1.335999 |
Pony/files-FileSeek-.txt |
FileSeek¶
[Source]
primitive val FileSeek
Constructors¶
create¶
[Source]
new val create()
: FileSeek val^
Returns¶
FileSeek val^
Public Functions¶
value¶
[Source]
fun box value()
: U32 val
Returns¶
U32 val
eq¶
[Source]
fun box eq(
that: FileSeek val)
: Bool val
Parameters¶
that: FileSeek val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: FileSeek val)
: Bool val
Parameters¶
that: FileSeek val
Returns¶
Bool val
| pony | 100682 | https://sv.wikipedia.org/wiki/Terr%C3%A4ngbil%2011/13 | Terrängbil 11/13 | Terrängbil 11 (Tgb 11, Volvo C303) och Terrängbil 13 (Tgb 13, Volvo C304), är två vanliga terrängbilsversioner inom Försvarsmakten. Vanligtvis kallas de bara 11-bil eller 13-bil.
Bakgrund
Terrängbil 11 och dess övriga versioner är en vidareutveckling av Volvos tidigare Pltgb 903 (personlastterrängbil 903) som populärt kallades "Valpen". Tillverkad av Volvo för Svenska försvaret. I den svenska terrängen är det fördelaktigare med relativt smala fordon än bredare fordon som till exempel HMMWV som skulle ha stora svårigheter att kunna komma fram längs de smala skogsstigarna.
Tgb 11 har två axlar, medan Tgb 13 och 20 har tre. Fordonen driver normalt sett bara på bakhjulen, men framhjulen kan kopplas in för att få drivning på alla hjulen. Vakuumstyrda differentialspärrar finns även på alla modellerna.
För att få så hög markfrigång som möjligt används portalaxlar. Nackdelen med dessa är att fordonet får en högre tyngdpunkt.
Historia
Försvaret började under 1960-talet att diskutera om en ersättare till Pltgb 903. Det svenska, mycket varierande landskapet ställer höga krav på terrängframkomlighet. 1967 påbörjades arbetet kallat "Projekt 4140". Den nya terrängbilsgenerationen omfattade ett flertal varianter både två, tre och fyraxliga. Senare kom dock den fyraxliga åttahjulsdrivna och fyraxliga men sexhjulsdriva versionen att strykas ur programmet. Kvar blev de tvåaxliga fyrhjulsdrivna och treaxliga sexhjulsdrivna varianterna.
Civila fordon
De nya terrängfordonen blev populära efterträdare till "Valpen" hos landets räddningstjänster. Här användes de som slangutläggningsbilar, för sjuktransport, som materialtransportör, med mera. Även statliga verk, kraftbolag, med flera köpte dessa fordon till sin serviceorganisation. Fordonen såldes också utomlands, till exempel till Storbritannien där elektronikföretaget Pye inredde dem som OB-fordon för Télévision Algérienne i Algeriet.
Modeller
Det finns flera olika modeller av Volvo C300-serien, både militära och civila.
Tgb 11 (C303/4141)
Terrängbil 11 är grundversionen och har varit den vanligast förekommande militära bilen i Försvarsmakten.
PvPjTgb 1111 (C303/4151)
Pansarvärnspjästerrängbil 1111. Två axlar och en öppen kaross med fällbar störtbåge. Bilen är avsedd för pansarbekämpning med 9-centimeters Pansarvärnspjäs 1110.
Pvrbtgb RBS 56 (C303/4151)
Pansarvärnstrobotterrängbil Robot 56 (Pvrbtgb RBS 56 och i en senare version Pvrbtgb B RBS 56). Ombyggd Pvpjtgb 1111. Då Pansarvärnspjäs 1110 i början på 90-talet inte längre var effektiv mot nyare generationers stridsvagnar så byggs ett antal Pvpjtgb 1111 om till bärare av Pansarvärnsroboten Robot 56 Bill. Förändringarna innefattade utöver beväpningen även ny kaross med bakdörrar, en annan pjäshiss med plats för knästående skytt och stödben i varje hörn på fordonet. Utförande "B" har även fäste för Ksp 58/Ksp 90 för närskydd, fast RA 180/DART 380 och GPS.
Tgb 1112/1113 (C303/4141)
Terrängbil 1112/1113 är en radioterrängbil med två axlar, fem radioanslutningar (2 x ultrakortvåg, 2 x kortvåg, 1 x FM/lufor) och trådanslutningsmöjlighet. På grund av antennerna är takluckan flyttad bakåt och lavetten borttagen, dessutom får endast fem personer plats. I övrigt som standard Tgb 11.
Tgb 13 (C304/4143)
Terrängbil 13 är mycket lik Tgb 11, skillnaden är att Tgb 13 har två stycken drivande bakaxlar och är en meter längre i bakdelen. Därav även vissa prestandaskillnader.
Tgb 1312 (C304/-)
Terrängbil 1312 är en radiolänkterrängbil med tre axlar. Har en separat sambandshytt. Bilen har till uppgift att etablera samband med hjälp av radiolänk 340.
Tgb 1313 (C304/-)
Terrängbil 1313 är en stabsterrängbil med tre axlar och separat sambandshytt för stridsledning.
Tgb 1314A/1314B (C304/-)
Terrängbil 1314A/B är en sjukvårdstransportbil med tre axlar och separat extra rymligt sjukvårdsutrymme med plats för 4 stycken bårar och akututrustning.
Tgb 1315A/1315B (C304/-)
Terrängbil 1315A/B är en ambulans och utrustad med bår för en skadad och möjlighet att ta fyra civilförsvarsbårar. Full medicinsk utrustning (efter militära mått), blåljus och siren.
Tgb 1321A/1321B (C304/-)
Terrängbil 1321A/B är en batteriplatsbil med tre axlar och plats bakom förarutrymmet för en batteriplatsgrupp tillhörande ett artilleri eller granatkastarförband.
Prototyper
Prototyp Tgb 12 (C304/4142)
Amfibisk Tgb 13 med tre axlar (6x6). Under 1972–73 gjordes försök med 5 prototyper i "Projekt 4142". Dessa var en variant av Tgb 13 med luftintag och avgasrör rakt ovanför motorn. Taket hade delvis kapell för snabb evakuering. Framdrivning med vattenjetaggregat. Farten i vatten var 4,5 knop. Två exemplar finns bevarade. Modellen ströks ur programmet när det var dags för massproduktion på grund av kostnadsskäl.
Galleri
Se även
Terrängbil 14/15
Terrängbil 16
Terrängbil 20
Terrängbil 30/40
Referenser
Noter
Externa länkar
Terrängbil 11/13 på Soldf.com
https://web.archive.org/web/20090105214014/http://www.amphibiousvehicle.net/amphi/V/volvospecial/volvo.html
Militärfordon tillverkade av Volvo
Terrängfordon
Fordon i svenska armén
Fyrhjulsdrivna fordon
Allhjulsdrivna fordon | swedish | 1.14334 |
Pony/capsicum--index-.txt |
Capsicum package¶
Access to Capsicum capabilities for UNIX systems -- primarily in use by BSD-based systems.
Public Types¶
primitive Cap
type CapRights
class CapRights0
| pony | 850585 | https://da.wikipedia.org/wiki/Kapers-sl%C3%A6gten | Kapers-slægten | Kapers-slægten (Capparis) er en slægt med ca. 250 arter, der er udbredt i klodens subtropiske og tropiske egne. Det er buske med modsatte, helrandede blade og med store, 4-tallige og regelmæssige blomster. Frugterne er kapsler med få frø.
Kapers (‘’Capparis spinosa’’)
Capparis acutifolia
Capparis amplissima
Capparis cynophallophora
Capparis decidua
Capparis frondosa
Capparis grandidiera
Capparis indica
Capparis micracantha
Capparis mitchellii
Capparis olacifolia
Capparis prisca
Capparis sandwichiana
Capparis sepiaria
Capparis thorelii
Capparis tomentosa
Capparis zeylanica
Noter
Kapers-familien | danish | 0.773152 |
Pony/pony_check-ASCIIRange-.txt |
ASCIIRange¶
[Source]
type ASCIIRange is
(ASCIINUL val | ASCIIDigits val | ASCIIWhiteSpace val | ASCIIPunctuation val | ASCIILettersLower val | ASCIILettersUpper val | ASCIILetters val | ASCIIPrintable val | ASCIINonPrintable val | ASCIIAll val | ASCIIAllWithNUL val)
Type Alias For¶
(ASCIINUL val | ASCIIDigits val | ASCIIWhiteSpace val | ASCIIPunctuation val | ASCIILettersLower val | ASCIILettersUpper val | ASCIILetters val | ASCIIPrintable val | ASCIINonPrintable val | ASCIIAll val | ASCIIAllWithNUL val)
| pony | 3231898 | https://sv.wikipedia.org/wiki/Sciophila%20agassis | Sciophila agassis | Sciophila agassis är en tvåvingeart som beskrevs av Garrett 1925. Sciophila agassis ingår i släktet Sciophila och familjen svampmyggor.
Artens utbredningsområde är British Columbia. Inga underarter finns listade i Catalogue of Life.
Källor
Svampmyggor
agassis | swedish | 1.080253 |
Pony/pony_check-Property1-.txt |
Property1[T: T]¶
[Source]
A property that consumes 1 argument of type T.
A property is defined by a Generator, returned by
the gen() method, and a
property method that consumes the
generators' output and verifies a custom property with the help of a
PropertyHelper.
A property is verified if no failed assertion on
PropertyHelper has been
reported for all the samples it consumed.
The property execution can be customized by returning a custom
PropertyParams from the
params() method.
The gen() method is called exactly once to
instantiate the generator.
The generator produces
PropertyParams.num_samples
samples and each is passed to the
property method for verification.
If the property did not verify, the given sample is shrunken if the
generator supports shrinking.
The smallest shrunken sample will then be reported to the user.
A Property1 can be run with
Ponytest.
To that end it needs to be wrapped into a
Property1UnitTest.
trait ref Property1[T: T]
Public Functions¶
name¶
[Source]
The name of the property used for reporting during execution.
fun box name()
: String val
Returns¶
String val
params¶
[Source]
Returns parameters to customize execution of this Property.
fun box params()
: PropertyParams val
Returns¶
PropertyParams val
gen¶
[Source]
The Generator used to produce samples to verify.
fun box gen()
: Generator[T] box
Returns¶
Generator[T] box
property¶
[Source]
A method verifying that a certain property holds for all given arg1
with the help of PropertyHelper h.
fun ref property(
arg1: T,
h: PropertyHelper val)
: None val ?
Parameters¶
arg1: T
h: PropertyHelper val
Returns¶
None val ?
| pony | 1435781 | https://no.wikipedia.org/wiki/Templatspesialisering | Templatspesialisering | Templatspesialisering er å definere et spesialtilfelle for en gitt type i en template. Noen ganger så ønsker man en mer optimisert eller mer meningsfull implementering av templaten for en bestemt type i stedet for å bruke den generiske implementasjonen. Det finnes to typer templatspesialiseringer; eksplisitt og partiell templatspesialisering. Begge kan brukes for alle typer templater, sett bort i fra funksjonstemplater. Funksjonstemplater kan ikke partielltemplatspesialiseres, men man kan oppnå tilnærmet samme effekt med «function overloading» (funksjonsoverlastning). Det er også verdt og nevne at man ofte ikke vil spesialisere funksjoner i det hele tatt, men heller bruke funksjonsoverlastning hvor man heller har separate funksjonsdefinisjoner for hver type og lar kompilatoren bestemme hvilken den skal kalle på basert på argumentene som gis til funksjonen. Dette er fordi en kompilator alltid vil prøve å gjøre en funksjonsoverlastning til en bedre kandidat enn enhver templatspesialisering.
Eksplisitt templatspesialisering
En eksplisitt templatspesialisering er å la alle parameterne i spesialiseringen være ikke-type templatparametere. Sagt på en annen måte, templatspesialiseringen jobber ikke med generiske typer i det hele tatt. Det er ofte dette man ønsker når man skal spesialisere for et enkelttilfelle. Det brukes ofte når man har en type som ikke kan bruke den generiske implementasjonen av en gitt template som i følgende tilfelle. Merk at samme effekt kan oppnås ved «function overloading» som ofte er foretrukket.template <typename T>
T max(T t1, T t2) {
return t1 > t2 ? t1 : t2;
}
template <>
bool max<bool>(bool t1, bool t2) {
return t1 || t2;
}
Partiell templatspesialisering
En partiell templatspesialisering er å la spesialiseringen være avhengig av både ikke-type og typetemplatparametere. En annen måte å si det på er at vi lar spesialiseringen være delvis generisk ved å ha typetemplatparametere som representerer den ukjente typen. Resten av parameterne er ikke-type parametere, altså ordinære typer. Man spesialiserer for noen typer, mens de resterende typene blir generiske.
Eksempel
Anta at det finnes en klassetemplate KeyValuePair med to templatparametere.template <typename Key, typename Value>
class KeyValuePair {};Følgende vil være en eksplisitt templatspesialisering av denne klassen med int som Key og std::string som Value.template <>
class KeyValuePair<int, std::string> {};Følgende er en partiell templatspesialisering av klassen, med typetemplatparameteren Key og std::string for templatparameteren Value.template <typename Key>
class KeyValuePair<Key, std::string> {};
Referanser
C++ | norwegian_bokmål | 1.027819 |
Pony/src-random-mt-.txt |
mt.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101class MT is Random
"""
A Mersenne Twister. This is a non-cryptographic random number generator. This
should only be used for legacy applications that require a Mersenne Twister,
otherwise use Rand.
"""
embed _state: Array[U64]
var _index: USize
new create(x: U64 = 5489, y: U64 = 0) =>
"""
Create with the specified seed. Returned values are deterministic for a
given seed.
"""
_state = Array[U64](_n())
_index = _n()
var seed = x xor y
_state.push(seed)
var i: USize = 1
while i < _n() do
seed = ((seed xor (seed >> 62)) * 6364136223846793005) + i.u64()
_state.push(seed)
i = i + 1
end
fun ref next(): U64 =>
"""
A random integer in [0, 2^64)
"""
if _index >= _n() then
_populate()
end
try
var x = _state(_index)?
_index = _index + 1
x = x xor ((x >> 29) and 0x5555555555555555)
x = x xor ((x << 17) and 0x71d67fffeda60000)
x = x xor ((x << 37) and 0xfff7eee000000000)
x xor (x >> 43)
else
0
end
fun ref _populate() =>
"""
Repopulates the state array.
"""
try
_index = 0
var x = _state(0)?
var i: USize = 0
while i < _m() do
x = _lower(i, x)?
i = i + 1
end
x = _state(_m())?
i = _m()
while i < _n1() do
x = _upper(i, x)?
i = i + 1
end
_wrap()?
end
fun tag _n(): USize => 312
fun tag _m(): USize => 156
fun tag _n1(): USize => _n() - 1
fun tag _mask(x: U64, y: U64): U64 =>
(x and 0xffffffff80000000) or (y and 0x000000007fffffff)
fun tag _matrix(x: U64): U64 => (x and 1) * 0xb5026f5aa96619e9
fun tag _mix(x: U64, y: U64): U64 =>
let z = _mask(x, y)
(z >> 1) xor _matrix(z)
fun ref _lower(i: USize, x: U64): U64 ? =>
let y = _state(i + 1)?
_state(i)? = _state(i + _m())? xor _mix(x, y)
y
fun ref _upper(i: USize, x: U64): U64 ? =>
let y = _state(i + 1)?
_state(i)? = _state(i - _m())? xor _mix(x, y)
y
fun ref _wrap(): U64 ? =>
let x = _state(_n1())?
let y = _state(0)?
_state(_n1())? = _state(_m() - 1)? xor _mix(x, y)
y
| pony | 40315 | https://da.wikipedia.org/wiki/Adelskalenderen%20p%C3%A5%20sk%C3%B8jter | Adelskalenderen på skøjter | Adelskalenderen er i hurtigløb på skøjter en central og objektiv rangering af skøjteløbere baseret på personlige rekorder. Rangeringen følger det samme princip, som bruges i 'allroundmesterskab' på skøjter som består af 500, 1.000, 1.500 og 5.000 meter for kvinder og 500, 1.500, 5.000 og 10.000 meter for mænd. Rangeringen generes efter tiderne, hvor skøjteløberen med den laveste pointsum rangeres på 1. pladsen. Tiden på hver distance regnes om til sekunder og deles på antallet af 500 meter ,distansen består af. FEs.empelvisdeles tiden på 5.000 meter med 10 ,da en 5.000 meter er 10 gangerså langt som en 500 meter. En tid på 5.000 meter på 6 minutter og 35,67 sekunder vil gi vepointsummen 39,567 efter følgende udregning: ((6*60)+35,67)/10 = 39,567. Pointsummen for en skøjteløber på adelskalenderen bliver summen af tidspoint for de fire distancer, som indgår i adelskalenderen. Dersom en tid på en distance giver tidspoints med mere end 3tredecimaler ,rundes det ned til nærmeste tusinddel ,før tidspointene på hver distance lægges sammen til skøjteløberens samlede pointsum.
En nærmere redegørelse kan læses i opslagsværket "Norge på Terskelen" (Direkteforlaget, Oslo 2000, side 62-63), hvorfra følgende citat stammer:
"Adelskalenderen mente noen at gikk i glemmeboken i Norge etter at adelen i 1816 frasa seg sine privilegier (som Stortinget deretter opphevet i 1821), men Rocambole var ikke død! For i 1950-årene gjenoppstod kalenderen som navn på den fortløbende justérbare oversikt over verdens beste skøjteløberes personlige rekorder på de fire klassiske distanser – 500, 1.500, 5.000 og 10.000 meter – alt omregnet i sammenlagtpoeng basert på anvendte sekunder i gjennomsnitt per 500 m av hver distanse. Etter ethvert skøjteløb kunne enhver nordmann med avis eller rejseradio, ved hjelp af enkel hoderegning, selv oppjustere adelskalenderen. Dette gjorde adelskalenderen til den mest demokratiske kalenderen i verden."
Adelskalenderen på skøjter er en unik disciplin inden for idrætten og er fortsat en liges å objektiv oversigt, efter at hundredelene blev indført, bare mere præcis. For enkelte løbere er den bedst mulig tid på enkeltdistancerne endda vigtigere end den bedste mulige pointsum på adelskalenderen som følge af indførelsen af VM på enkeltdistanser fra det første enkeltdistance-VM på Hamar, Norge, 1996. Hurtigløb på skøjter er selve idrætstatistikkens højborg, ikke mindst takket være adelskalenderen.
Adelskalenderen for kvinder
Pr. 30. juni 2005 :
Rnk Navn Land NR Født 500m 1500m 3.000m 5.000m poeng år
1 KLASSEN Cindy CAN (1) 120879 38.30 1.53.87 3.58.97 6.55.89 157.673 2005
2 FRIESINGER Anni GER (1) 110177 38.60 1.54.02 3.59.39 6.58.39 158.343 2002
3 PECHSTEIN Claudia GER (2) 220272 39.85 1.54.83 3.57.70 6.46.91 158.433 2004
4 BARYSJEVA Varvara RUS (1) 240377 38.86 1.55.22 4.05.73 6.56.97 159.918 2002
5 RODRIGUEZ Jennifer USA (1) 080676 37.94 1.55.26 4.04.99 7.07.93 159.984 2005
5 GROENEWOLD Renate NED (1) 081076 39.48 1.55.68 3.58.94 7.01.21 159.984 2005
7 TABATA Maki JPN (1) 091174 39.18 1.54.76 4.01.01 7.05.49 160.150 2002
8 NIEMANN Gunda GER (3) 070566 40.34 1.55.62 4.00.26 6.52.44 160.167 2001
9 de JONG Tonny NED (2) 190774 39.36 1.56.02 4.00.49 7.01.17 160.231 2002
10 de LOOR Barbara NED (3) 260574 39.79 1.55.83 4.04.56 7.07.49 161.909 2005
11 GROVES Krisy CAN (2) 041276 39.97 1.57.76 4.05.61 6.57.61 161.919 2005
12 CRAMER Wieteke NED (4) 130681 39.40 1.57.64 4.05.55 7.05.94 162.132 2004
13 HUNYADY Emese AUT (1) 040366 38.87 1.56.51 4.06.55 7.15.23 162.320 2002
14 WÜST Ireen NED (5) 010486 39.29 1.56.69 4.07.71 7.09.23 162.394 2005
15 HUGHES Clara CAN (3) 270972 41.33 1.58.25 4.03.14 6.53.53 162.622 2005
16 ANSCHÜTZ Daniela GER (4) 201174 39.70 1.57.49 4.07.33 7.07.70 162.854 2005
17 THOMAS Annamarie NED (6) 150971 38.97 1.55.50 4.11.45 7.16.97 163.075 2002
18 SONG Li CHN (1) 100381 39.06 1.55.79 4.07.01 7.23.15 163.139 2001
19 VIS Marja NED (7) 150177 39.86 1.57.30 4.06.25 7.13.54 163.355 2002
20 NEMOTO Nami JPN (2) 240375 40.66 1.58.56 4.06.44 7.08.60 164.113 2005
21 RANEY Catherine USA (2) 200680 41.05 1.58.51 4.06.07 7.06.89 164.253 2005
22 ANKONÉ Fréderique NED (8) 071281 40.53 1.58.33 4.09.53 7.07.26 164.287 2005
23 OVERLAND Cindy CAN (4) 190276 39.78 1.57.67 4.11.24 7.14.31 164.307 2002
24 PROKASJEVA Ljudmila KAZ (1) 230169 41.06 1.58.64 4.05.01 7.09.42 164.383 2001
25 KLEINSMAN Moniek NED (9) 031182 40.41 1.59.51 4.07.60 7.08.77 164.389 2005
26 van GOOZEN Helen NED (10) 251280 40.89 1.59.28 4.06.40 7.06.84 164.400 2005
27 SEO Eriko JPN (3) 120379 40.52 1.58.46 4.08.52 7.09.95 164.421 2002
28 ISHINO Eriko JPN (4) 011285 40.28 1.58.79 4.09.26 7.11.27 164.546 2005
29 SMIT Gretha NED (11) 200176 42.18 2.02.02 4.05.25 6.49.22 164.650 2004
30 BAK Eun-Bi KOR (1) 140979 40.02 1.59.54 4.09.91 7.13.60 164.877 2000
31 JAKSJINA Valentina RUS (2) 060274 41.11 1.59.28 4.08.93 7.08.42 165.200 2002
32 TRAPETZNIKOVA Tatjana RUS (3) 031273 40.36 1.58.43 4.08.49 7.20.19 165.270 2002
33 SUNDSTROM Becky USA (3) 100576 38.49 1.57.28 4.14.60 7.33.80 165.396 2003
34 LAMB Maria USA (4) 040186 40.35 1.58.88 4.10.50 7.17.00 165.426 2005
35 POLOZKOVA Natalja RUS (4) 020472 40.02 1.56.25 4.08.60 7.32.92 165.495 2001
36 SIMPSON Kerry CAN (5) 061181 39.08 1.57.57 4.13.49 7.31.21 165.639 2003
37 TARASOVA Olga RUS (5) 280271 40.34 1.58.83 4.12.27 7.17.31 165.726 2005
38 BASJANOVA Svetlana RUS (6) 011272 40.77 1.59.46 4.12.02 7.13.12 165.905 2000
39 HOLZER Kristine USA (5) 210374 41.52 1.58.24 4.09.85 7.13.55 165.929 2005
40 WÓJCICKA Katarzyna POL (1) 010180 40.17 1.59.91 4.10.97 7.19.82 165.950 2005
41 de VRIES Elma NED (12) 200383 40.06 1.58.93 4.09.66 7.27.90 166.103 2004
42 't HART Sandra NED (13) 300874 40.00 1.58.95 4.14.31 7.20.70 166.105 2005
43 RISLING Tara CAN (6) 270781 40.49 2.00.11 4.11.83 7.16.94 166.191 2005
44 WANG Fei CHN (2) 200884 39.81 1.59.83 4.13.85 7.21.40 166.201 2005
45 VYSOKOVA Svetlana RUS (7) 120572 40.50 2.01.82 4.11.37 7.12.02 166.203 2005
46 WIJSMAN Marieke NED (14) 090575 38.31 2.00.03 4.17.22 7.30.33 166.223 2002
47 KALEX Katrin GER (5) 140279 40.46 2.00.89 4.11.41 7.17.22 166.379 2005
48 MAYR Nicola ITA (1) 060478 39.85 1.59.89 4.14.41 7.22.20 166.434 2005
49 GAO Yang CHN (3) 021280 40.11 1.59.51 4.12.39 7.24.61 166.472 2005
50 SLOT Nicole CAN (7) 130469 41.44 1.58.70 4.10.61 7.17.21 166.495 2002
Nordiske løbere blandt 112 løbere under 170 tidspoint
52 TØNSBERG Annette NOR (1) 020470 40.24 2.00.10 4.12.92 7.21.57 166.583 1999
76 HAUGLI Maren NOR (2) 030385 41.21 2.02.02 4.15.44 7.15.33 167.989 2005
86 BJELKEVIK Hedvig NOR (3) 180481 40.12 2.02.26 4.16.03 7.33.17 168.861 2004
89 BJELKEVIK Annette NOR (4) 120578 40.00 2.00.66 4.16.74 7.39.68 168.978 2005
107 TVETER Anne Therese NOR (5) 050576 41.93 2.04.88 4.14.25 7.19.04 169.835 2001
Adelskalenderen for mænd pr. 30. juni 2005
:
Nr Navn Land NR Født 500m 1500m 5.000m 10.000m poeng år
1 UYTDEHAAGE Jochem NED (1) 090776 36.40 1.44.57 6.14.66 12.58.92 147.668 (2005)
2 HEDRICK Chad USA (1) 170477 36.37 1.45.07 6.19.40 13.03.99 148.532 (2005)
3 DAVIS Shani USA (2) 130882 35.43 1.43.33 6.24.00 13.25.51 148.548 (2005)
4 PARRA Derek USA (3) 150370 35.88 1.43.95 6.17.98 13.33.44 149.000 (2002)
5 ROMME Gianni NED (2) 120273 36.97 1.47.88 6.14.70 13.03.40 149.570 (2005)
6 SJEPEL Dmitrij RUS (1) 080878 36.13 1.45.98 6.21.85 13.23.83 149.832 (2002)
7 BOUTIETTE K. C. USA (4) 110470 36.09 1.46.78 6.22.97 13.21.06 150.033 (2004)
8 RITSMA Rintje NED (3) 130470 35.90 1.45.86 6.25.55 13.28.19 150.150 (2002)
9 FABRIS Enrico ITA (1) 051081 36.71 1.46.65 6.18.34 13.22.99 150.243 (2005)
10 VERHEIJEN Carl NED (4) 260575 37.14 1.47.42 6.18.12 13.10.54 150.285 (2005)
11 MOLICKI Dustin CAN (1) 130875 36.19 1.46.00 6.26.29 13.34.58 150.881 (2002)
12 KRAMER Sven NED (5) 230486 37.02 1.48.23 6.24.29 13.09.65 151.007 (2005)
13 de JONG Bob NED (6) 131176 37.86 1.48.22 6.18.16 13.05.44 151.021 (2005)
14 TUITERT Mark NED (7) 040480 35.93 1.46.28 6.27.63 13.38.91 151.064 (2005)
15 WENNEMARS Erben NED (8) 011175 34.68 1.44.45 6.34.62 14.04.52 151.184 (2005)
16 JANMAAT Sicco NED (9) 221178 36.97 1.47.46 6.22.88 13.26.55 151.405 (2005)
17 SAJUTIN Vadim RUS (2) 311270 37.67 1.46.99 6.23.47 13.17.83 151.571 (2002)
18 SIGHEL Roberto ITA (2) 170267 36.93 1.47.47 6.25.11 13.26.19 151.573 (2002)
19 SHIRAHATA Keiji JPN (1) 081073 37.18 1.47.78 6.26.04 13.19.92 151.706 (2002)
20 POSTMA Ids NED (10) 281273 35.99 1.45.41 6.32.92 13.45.91 151.713 (2002)
21 ERVIK Eskil NOR (1) 110175 37.30 1.48.25 6.23.40 13.20.02 151.724 (2005)
22 PRINSEN Tom NED (11) 090982 37.09 1.47.70 6.26.29 13.22.88 151.763 (2004)
23 ELM Steven CAN (2) 120875 36.29 1.46.89 6.29.86 13.42.70 152.041 (2005)
24 BORGERSEN Odd NOR (2) 100480 38.17 1.49.57 6.20.78 13.15.67 152.554 (2005)
25 CHEEK Joey USA (5) 220679 34.66 1.44.98 6.42.57 14.13.81 152.600 (2003)
26 VELDKAMP Bart BEL (1) 221167 37.55 1.49.00 6.23.64 13.27.48 152.621 (2002)
27 SKOBREV Ivan RUS (3) 030283 36.63 1.48.75 6.30.52 13.36.14 152.739 (2005)
28 CALLIS Chris USA (6) 081179 35.71 1.45.84 6.36.29 14.04.02 152.820 (2003)
29 MARSHALL Kevin CAN (3) 120173 36.11 1.46.75 6.34.37 13.54.11 152.835 (2002)
30 NOAKE Hiroyuki JPN (2) 240874 35.61 1.46.34 6.33.49 14.08.96 152.853 (2001)
31 ANDERSEN Petter NOR (3) 020174 35.52 1.46.88 6.34.81 14.05.19 152.886 (2005)
32 SÆTRE Lasse NOR (4) 100374 38.15 1.49.36 6.24.64 13.16.92 152.913 (2004)
33 LALENKOV Jevgenij RUS (4) 160281 35.78 1.45.97 6.38.36 14.01.03 152.990 (2004)
34 GRØDUM Øystein NOR (5) 150277 39.13 1.50.80 6.16.74 13.05.44 153.009 (2005)
35 BREUER Christian GER (1) 031176 35.57 1.47.50 6.35.22 14.01.80 153.015 (2002)
36 SOLINGER Yuri NED (12) 190879 36.24 1.46.50 6.32.62 14.01.14 153.059 (2005)
37 van de RIJST Ralf NED (13) 160377 36.69 1.47.29 6.31.85 13.49.91 153.133 (2005)
38 RÖJLER Johan SWE (1) 111181 37.05 1.49.33 6.29.21 13.34.81 153.154 (2005)
39 HERSMAN Martin NED (14) 260274 36.38 1.46.76 6.31.62 14.01.42 153.199 (2002)
40 KIBALKO Aleksandr RUS (5) 251073 35.64 1.46.42 6.32.56 14.16.63 153.200 (2004)
41 WARSYLEWICZ Justin CAN (4) 191185 37.13 1.47.64 6.27.68 13.49.27 153.241 (2005)
42 DANKERS Arne CAN (5) 010680 37.96 1.47.83 6.24.05 13.39.92 153.304 (2005)
43 HIRAKO Hiroki JPN (3) 060882 37.67 1.49.17 6.30.46 13.27.88 153.500 (2002)
44 SØNDRÅL Ådne NOR (6) 100571 35.72 1.45.26 6.40.53 14.13.12 153.515 (2002)
45 KNOLL Mark CAN (6) 260776 37.00 1.48.54 6.30.63 13.47.96 153.641 (2003)
46 MEIJER Jarno NED (15) 141178 37.27 1.47.27 6.32.32 13.48.20 153.668 (2003)
47 MIYAZAKI Kesato JPN (4) 040481 37.53 1.48.92 6.32.81 13.31.24 153.679 (2005)
48 BEULENKAMP Jelmer NED (16) 161177 36.98 1.47.57 6.32.19 13.53.86 153.748 (2002)
49 TREVENA Jondon USA (7) 100772 36.84 1.48.56 6.30.15 13.55.60 153.821 (2002)
50 TSYBENKO Sergej KAZ (1) 091273 36.35 1.46.40 6.32.92 14.14.54 153.835 (2002)
Nordiske løbere blandt 594 løbere under 165 tidspoint
21 ERVIK Eskil NOR (1) 110175 37.30 1.48.25 6.23.40 13.20.02 151.724 (2005)
24 BORGERSEN Odd NOR (2) 100480 38.17 1.49.57 6.20.78 13.15.67 152.554 (2005)
31 ANDERSEN Petter NOR (3) 020174 35.52 1.46.88 6.34.81 14.05.19 152.886 (2005)
32 SÆTRE Lasse NOR (4) 100374 38.15 1.49.36 6.24.64 13.16.92 152.913 (2004)
34 GRØDUM Øystein NOR (5) 150277 39.13 1.50.80 6.16.74 13.05.44 153.009 (2005)
38 RÖJLER Johan SWE (1) 111181 37.05 1.49.33 6.29.21 13.34.81 153.154 (2005)
44 SØNDRÅL Ådne NOR (6) 100571 35.72 1.45.26 6.40.53 14.13.12 153.515 (2002)
56 BJØRGE Stian NOR (7) 310776 37.88 1.49.15 6.28.77 13.38.75 154.077 (2001)
62 BØKKO Håvard NOR (8) 020287 37.00 1.50.75 6.31.91 13.46.08 154.411 (2005)
76 ROSENDAHL Vesa FIN (1) 051275 37.08 1.48.02 6.39.87 13.59.91 155.068 (2005)
78 KOSS Johann Olav NOR (9) 291068 37.98 1.51.29 6.34.96 13.30.55 155.099 (1994)
82 ERVIK Arild Nebb NOR (10) 040278 37.72 1.49.51 6.32.11 13.54.24 155.146 (2005)
83 FALK Sebastian SWE (2) 050677 37.81 1.50.45 6.29.50 13.51.75 155.163 (2005)
95 STORELID Kjell NOR (11) 241070 38.86 1.52.19 6.30.05 13.27.24 155.623 (2002)
98 BORGERSEN Reidar NOR (12) 100480 39.09 1.52.01 6.32.37 13.20.77 155.701 (2003)
120 VALTONEN Jarmo FIN (2) 110781 36.76 1.50.40 6.45.25 14.10.19 156.594 (2005)
130 HEREIDE Remi NOR (13) 250373 39.91 1.52.64 6.28.98 13.31.14 156.911 (2000)
139 TVENGE Ørjan NOR (14) 030374 38.72 1.51.96 6.39.06 13.45.59 157.225 (2001)
147 BAKKE Andreas Snare NOR (15) 100375 38.5 1.53.10 6.35.51 13.51.26 157.314 (2002)
158 ROSENDAHL Risto FIN (3) 231179 35.58 1.47.89 6.53.79 14.51.39 157.491 (2005)
163 GUSTAFSON Tomas SWE (3) 281259 38.10 1.53.22 6.44.51 13.48.20 157.701 (1991)
166 CHRISTIANSEN Henrik NOR (16) 100283 38.10 1.50.93 6.44.20 14.06.85 157.838 (2005)
169 ZACHRISSON Eric SWE (4) 080980 35.62 1.48.71 6.52.60 14.56.12 157.922 (2005)
177 SLINNING Olav NOR (17) 210583 38.82 1.51.41 6.42.3 13.59.54 158.163 (2005)
189 KRISTENSEN Preben NOR (18) 040383 38.84 1.54.44 6.41.00 13.50.36 158.604 (2005)
197 GRAVEM Øyvind NOR (19) 240878 38.40 1.52.33 6.45.1 14.11.59 158.932 (2004)
200 BAKKE Tor Snare NOR (20) 201179 37.70 1.52.03 6.50.14 14.18.82 158.998 (2004)
212 JOHANSEN Steinar NOR (21) 270272 38.28 1.52.88 6.45.11 14.17.93 159.313 (1998)
216 BRANDT Robert FIN (4) 211082 38.86 1.54.43 6.44.96 13.57.55 159.376 (2005)
220 KARLSTAD Geir NOR (22) 070763 39.41 1.55.24 6.43.59 13.48.29 159.596 (1992)
229 GRAVEM Pål NOR (23) 040875 36.01 1.47.35 6.57.33 15.28.11 159.931 (2002)
234 POUTALA Mika FIN (5) 200683 35.53 1.51.42 6.55.56 15.16.59 160.055 (2005)
240 HAUGLI Sverre NOR (24) 021082 38.68 1.53.10 6.48.61 14.18.51 160.166 (2005)
243 NYQUIST Halvar NOR (25) 141279 38.8 1.55.08 6.46.58 14.08.39 160.237 (2004)
252 NORDVIK Frode NOR (26) 270274 38.50 1.52.69 6.46.70 14.32.91 160.378 (1998)
258 DALEN Stian NOR (27) 031176 37.92 1.51.77 6.55.13 14.35.89 160.483 (2003)
260 SCHÖN Jonas SWE (5) 020469 38.9 1.54.92 6.48.05 14.10.15 160.518 (1996)
261 BÅRDSEN Edvin NOR (28) 231180 38.0 1.53.48 6.56.0 14.22.08 160.530 (2004)
265 FALK-LARSSEN Rolf NOR (29) 210260 37.88 1.54.26 6.50.93 14.30.34 160.576 (1988)
271 HASSEL Stefan SWE (6) 110876 37.51 1.54.31 6.55.63 14.31.48 160.750 (2001)
284 VITÉN Daniel SWE (7) 031176 37.78 1.51.50 6.50.99 14.57.93 160.941 (2000)
289 STILLERUD Arnt Olaf NOR (30) 031073 38.71 1.53.92 6.54.37 14.21.34 161.187 (2001)
323 ERIKSON Joel SWE (8) 160984 37.62 1.54.09 7.00.00 14.40.52 161.676 (2004)
331 PETTERSEN Sigurd NOR (31) 020679 38.38 1.54.26 6.57.42 14.32.18 161.817 (2003)
335 KARLBERG Joakim SWE (9) 180364 39.08 1.55.34 6.55.31 14.16.63 161.888 (1988)
359 KOLNES Kent NOR (32) 130678 39.43 1.54.43 6.53.78 14.27.71 162.336 (2001)
364 NIITTYLÄ Pertti FIN (6) 160156 38.90 1.56.48 6.53.28 14.26.57 162.382 (1988)
372 BENGTSSON Per SWE (10) 310567 39.6 1.56.97 6.48.87 14.22.15 162.584 (1993)
383 SPIDSBERG Gisle NOR (33) 180572 38.05 1.51.73 7.08.0 14.52.3 162.708 (1998)
384 NYLAND Bjørn NOR (34) 081062 38.2 1.56.08 6.58.31 14.39.72 162.710 (1987)
393 NIEMINEN Mikko FIN (7) 140870 40.12 1.55.19 6.56.03 14.15.28 162.883 (1998)
402 VÅRVIK Atle NOR (35) 121265 39.3 1.58.7 6.53.02 14.16.89 163.012 (1994)
406 STORHOLT Jan Egil NOR (36) 130249 38.07 1.55.18 7.01.16 14.49.26 163.042 (1978)
428 LANGEGÅRD Odd Øistein NOR (37) 220480 38.97 1.55.07 7.00.21 14.38.39 163.266 (2002)
441 JOHANNESSEN Kent Robin NOR (38) 180380 38.88 1.54.88 6.56.39 14.51.77 163.400 (2001)
448 STENSHJEMMET Kay Arne NOR (39) 090853 38.2 1.56.18 6.56.9 14.57.30 163.481 (1981)
475 MAGNUSSEN Tor Arve NOR (40) 180484 38.1 1.55.02 6.56.85 15.13.54 163.802 (2005)
482 STORDAL Rune NOR (41) 080479 36.63 1.47.84 7.26.85 15.32.7 163.896 (2005)
499 JANACEK Adam USA (42) 180480 38.26 1.55.29 7.03.45 14.59.92 164.031 (1983)
503 TVETER Thor Olav NOR (43) 250272 38.8 1.56.3 6.58.66 14.52.75 164.069 (1994)
509 TVERRÅEN Tarjei NOR (44) 060378 37.5 1.54.49 7.07.86 15.13.57 164.127 (2005)
533 JÄRVINEN Timo FIN (8) 081166 40.23 1.57.91 6.55.21 14.25.93 164.350 (1994)
534 MAGNUSSON Hans SWE (11) 050760 38.25 1.54.38 7.09.52 15.00.72 164.364 (1987)
559 HILLE Per Thomas NOR (45) 140772 39.8 1.57.86 6.56.9 14.36.5 164.601 (1995)
561 STORDAL Morten NOR (46) 111280 36.45 1.49.38 7.19.05 15.55.88 164.609 (2005)
585 SYVERTSEN Frode NOR (47) 140163 39.46 1.58.37 7.03.35 14.32.08 164.855 (1988)
591 BENGTSSON Claes SWE (12) 121059 38.47 1.55.16 7.11.59 14.58.38 164.934 (1988)
Forklaring til tabellen: Placering på adelskalenderen i verden – Navn – Land – (Placering på adelskalenderen i eget land) – Fødselsdato – Personlig rekord på 500 meter – Personlig rekord på
1.500 meter – Personlig rekord på 5.000 meter – Personlig rekord på 10.000 meter – Tidspoint på adelskalenderen – (Sæson for sidste personlige rekord). At der står år 2005 for Arild Nebb Ervik på den 152. plads er, fordi han har sat personlig rekord i 2004/2005-sæsonen, som formelt er fra og med den 1. juli 2004 til og med den 30. juni 2005.
Udvikling i toppen af adelskalenderen
Tabellen viser lederen af adelskalenderen ved slutningen af alle sæsoner fra 1893 til 2005:
År Navn Land Født 500m 1500m 5.000m 10.000m poeng
1893: ERICSSON Rudolf SWE 061172 50.2 2.41.6 9.15.8 19.42.6 218.776
1894: EDEN Jaap NED 191073 50.4 2.35.0 8.37.6 19.12.4 211.446
1895: EDEN Jaap NED 191073 48.2 2.25.4 8.37.6 17.56.0 202.226
1900: ØSTLUND Peder NOR 070572 45.2 2.22.6 8.51.8 17.50.6 199.443
1909: MATHISEN Oscar NOR 041088 45.6 2.20.8 8.40.2 18.01.8 198.643
1910: MATHISEN Oscar NOR 041088 44.8 2.20.6 8.40.2 18.01.8 197.776
1912: MATHISEN Oscar NOR 041088 44.2 2.20.6 8.40.2 17.46.3 196.401
1913: MATHISEN Oscar NOR 041088 44.0 2.20.6 8.38.6 17.22.6 194.856
1914: MATHISEN Oscar NOR 041088 43.4 2.17.4 8.36.6 17.22.6 192.990
1916: MATHISEN Oscar NOR 041088 43.4 2.17.4 8.36.3 17.22.6 192.960
1920: MATHISEN Oscar NOR 041088 43.3 2.17.4 8.36.3 17.22.6 192.860
1929: MATHISEN Oscar NOR 041088 43.0 2.17.4 8.36.3 17.22.6 192.560
1930: BALLANGRUD Ivar NOR 070304 43.8 2.19.1 8.21.6 17.22.6 192.456
1935: BALLANGRUD Ivar NOR 070304 43.4 2.19.1 8.21.6 17.22.6 192.056
1936: BALLANGRUD Ivar NOR 070304 43.4 2.17.4 8.17.2 17.22.6 191.050
1937: STAKSRUD Michael NOR 020608 42.8 2.14.9 8.19.9 17.23.2 189.916
1939: BALLANGRUD Ivar NOR 070304 42.7 2.14.0 8.17.2 17.14.4 188.806
1942: SEYFFARTH Åke SWE 151219 43.2 2.14.2 8.13.7 17.07.5 188.678
1952: ANDERSEN Hjalmar NOR 120323 43.7 2.16.4 8.07.3 16.32.6 187.526
1954: MAMONOV Nikolaj URS ....23 42.2 2.17.4 8.03.7 16.52.2 186.980
1955: SJILKOV Boris URS 280627 42.8 2.10.4 7.45.6 16.50.2 183.336
1959: JÄRVINEN Juhanni FIN 090535 41.2 2.06.3 8.11.1 16.47.2 182.770
1960: JOHANNESEN Knut NOR 061133 42.3 2.12.2 7.53.1 15.46.6 181.006
1963: NILSSON Jonny SWE 090243 43.0 2.10.1 7.34.3 15.33.0 178.446
1964: MOE Per Ivar NOR 111144 41.6 2.09.5 7.38.6 15.47.8 178.016
1965: MATUSEVITSJ Eduard URS 161137 41.0 2.07.3 7.35.1 16.06.2 177.253
1966: SCHENK Ard NED 160944 41.0 2.05.3 7.35.2 16.02.8 176.426
1967: VERKERK Kees NED 281042 42.0 2.03.9 7.26.6 15.35.2 174.720
1968: VERKERK Kees NED 281042 40.4 2.02.6 7.19.9 15.28.7 171.691
1969: VERKERK Kees NED 281042 40.4 2.02.0 7.13.2 15.03.6 169.566
1970: VERKERK Kees NED 281042 40.4 2.01.9 7.13.2 15.03.6 169.533
1971: SCHENK Ard NED 160944 38.9 1.58.7 7.12.0 14.55.9 166.461
1972: SCHENK Ard NED 160944 38.9 1.58.7 7.09.8 14.55.9 166.241
1976: van HELDEN Hans NED 270448 39.03 1.55.61 7.07.82 14.59.09 165.302
1977: MARTSJUK Sergej URS 130452 38.45 1.56.4 6.58.88 14.39.56 163.116
1978: BELOV Vladimir URS 090454 37.90 1.56.70 6.59.8 14.42.1 162.885
1979: HEIDEN Eric USA 140658 37.80 1.55.68 6.59.15 14.43.11 162.430
1980: HEIDEN Eric USA 140658 37.63 1.54.79 6.59.15 14.28.13 161.214
1983: SJASJERIN Viktor URS 230762 37.63 1.54.36 6.55.43 14.25.29 160.557
1984: SJASJERIN Viktor URS 230762 37.59 1.53.70 6.49.15 14.25.29 159.669
1987: GULJAJEV Nikolaj URS 010166 37.24 1.52.70 6.51.28 14.28.45 159.356
1988: FLAIM Eric USA 090367 36.98 1.52.12 6.47.09 14.05.57 157.340
1992: KOSS Johann Olav NOR 291068 38.17 1.52.62 6.41.73 13.43.54 157.060
1993: KOSS Johann Olav NOR 291068 38.17 1.52.53 6.36.57 13.43.54 156.514
1994: KOSS Johann Olav NOR 291068 37.98 1.51.29 6.34.96 13.30.55 155.099
1998: RITSMA Rintje NED 130470 37.17 1.47.57 6.25.55 13.28.19 151.990
1999: RITSMA Rintje NED 130470 35.90 1.47.57 6.25.55 13.28.19 150.720
2001: UYTDEHAAGE Jochem NED 090776 36.54 1.46.32 6.20.82 13.23.02 150.213
2002: UYTDEHAAGE Jochem NED 090776 36.54 1.44.57 6.14.66 12.58.92 147.808
2005: UYTDEHAAGE Jochem NED 090776 36.40 1.44.57 6.14.66 12.58.92 147.668
Noter
Hurtigløb på skøjter | danish | 0.83876 |
Pony/collections-Map-.txt |
Map[K: (Hashable #read & Equatable[K] #read), V: V]¶
[Source]
This is a map that uses structural equality on the key.
type Map[K: (Hashable #read & Equatable[K] #read), V: V] is
HashMap[K, V, HashEq[K] val] ref
Type Alias For¶
HashMap[K, V, HashEq[K] val] ref
| pony | 871981 | https://sv.wikipedia.org/wiki/EKK | EKK | EKK är en typ av elkabel som ofta används vid fasta elinstallationer. EKK är en beteckning enligt SS 424 1701 och betyder att kabeln består av enkardeliga, PVC-isolerade ledare med en PVC-mantel.
Referenser
Se även
Elkabel
Externa länkar
fyrskeppsvagen.com - Kabelguide
fyrskeppsvagen.com - Elfärger
Starkströmsföreskrifterna 1999
Elektriska komponenter
Kablar | swedish | 1.259772 |
Pony/net-TCPConnection-.txt |
TCPConnection¶
[Source]
A TCP connection. When connecting, the Happy Eyeballs algorithm is used.
The following code creates a client that connects to port 8989 of
the local host, writes "hello world", and listens for a response,
which it then prints.
use "net"
class MyTCPConnectionNotify is TCPConnectionNotify
let _out: OutStream
new create(out: OutStream) =>
_out = out
fun ref connected(conn: TCPConnection ref) =>
conn.write("hello world")
fun ref received(
conn: TCPConnection ref,
data: Array[U8] iso,
times: USize)
: Bool
=>
_out.print("GOT:" + String.from_array(consume data))
conn.close()
true
fun ref connect_failed(conn: TCPConnection ref) =>
None
actor Main
new create(env: Env) =>
TCPConnection(TCPConnectAuth(env.root),
recover MyTCPConnectionNotify(env.out) end, "", "8989")
Note: when writing to the connection data will be silently discarded if the
connection has not yet been established.
Backpressure support¶
Write¶
The TCP protocol has built-in backpressure support. This is generally
experienced as the outgoing write buffer becoming full and being unable
to write all requested data to the socket. In TCPConnection, this is
hidden from the programmer. When this occurs, TCPConnection will buffer
the extra data until such time as it is able to be sent. Left unchecked,
this could result in uncontrolled queuing. To address this,
TCPConnectionNotify implements two methods throttled and unthrottled
that are called when backpressure is applied and released.
Upon receiving a throttled notification, your application has two choices
on how to handle it. One is to inform the Pony runtime that it can no
longer make progress and that runtime backpressure should be applied to
any actors sending this one messages. For example, you might construct your
application like:
// Here we have a TCPConnectionNotify that upon construction
// is given a ApplyReleaseBackpressureAuth token. This allows the notifier
// to inform the Pony runtime when to apply and release backpressure
// as the connection experiences it.
// Note the calls to
//
// Backpressure.apply(_auth)
// Backpressure.release(_auth)
//
// that apply and release backpressure as needed
use "backpressure"
use "collections"
use "net"
class SlowDown is TCPConnectionNotify
let _auth: ApplyReleaseBackpressureAuth
let _out: OutStream
new iso create(auth: ApplyReleaseBackpressureAuth, out: OutStream) =>
_auth = auth
_out = out
fun ref throttled(connection: TCPConnection ref) =>
_out.print("Experiencing backpressure!")
Backpressure.apply(_auth)
fun ref unthrottled(connection: TCPConnection ref) =>
_out.print("Releasing backpressure!")
Backpressure.release(_auth)
fun ref closed(connection: TCPConnection ref) =>
// if backpressure has been applied, make sure we release
// when shutting down
_out.print("Releasing backpressure if applied!")
Backpressure.release(_auth)
fun ref connect_failed(conn: TCPConnection ref) =>
None
actor Main
new create(env: Env) =>
let c_auth = TCPConnectAuth(env.root)
let bp_auth = ApplyReleaseBackpressureAuth(env.root)
let socket = TCPConnection(c_auth,
recover SlowDown(bp_auth, env.out) end, "", "7669")
Or if you want, you could handle backpressure by shedding load, that is,
dropping the extra data rather than carrying out the send. This might look
like:
use "net"
class ThrowItAway is TCPConnectionNotify
var _throttled: Bool = false
fun ref sent(conn: TCPConnection ref, data: ByteSeq): ByteSeq =>
if not _throttled then
data
else
""
end
fun ref sentv(conn: TCPConnection ref, data: ByteSeqIter): ByteSeqIter =>
if not _throttled then
data
else
recover Array[String] end
end
fun ref throttled(connection: TCPConnection ref) =>
_throttled = true
fun ref unthrottled(connection: TCPConnection ref) =>
_throttled = false
fun ref connect_failed(conn: TCPConnection ref) =>
None
actor Main
new create(env: Env) =>
TCPConnection(TCPConnectAuth(env.root),
recover ThrowItAway end, "", "7669")
In general, unless you have a very specific use case, we strongly advise that
you don't implement a load shedding scheme where you drop data.
Read¶
If your application is unable to keep up with data being sent to it over
a TCPConnection you can use the builtin read backpressure support to
pause reading the socket which will in turn start to exert backpressure on
the corresponding writer on the other end of that socket.
The mute behavior allow any other actors in your application to request
the cessation of additional reads until such time as unmute is called.
Please note that this cessation is not guaranteed to happen immediately as
it is the result of an asynchronous behavior call and as such will have to
wait for existing messages in the TCPConnection's mailbox to be handled.
On non-windows platforms, your TCPConnection will not notice if the
other end of the connection closes until you unmute it. Unix type systems
like FreeBSD, Linux and OSX learn about a closed connection upon read. On
these platforms, you must call unmute on a muted connection to have
it close. Without calling unmute the TCPConnection actor will never
exit.
Proxy support¶
Using the proxy_via callback in a TCPConnectionNotify it is possible
to implement proxies. The function takes the intended destination host
and service as parameters and returns a 2-tuple of the proxy host and
service.
The proxy TCPConnectionNotify should decorate another implementation of
TCPConnectionNotify passing relevent data through.
Example proxy implementation¶
actor Main
new create(env: Env) =>
MyClient.create(
"example.com", // we actually want to connect to this host
"80",
ExampleProxy.create("proxy.example.com", "80")) // we connect via this proxy
actor MyClient
new create(host: String, service: String, proxy: Proxy = NoProxy) =>
let conn: TCPConnection = TCPConnection.create(
TCPConnectAuth(env.root),
proxy.apply(MyConnectionNotify.create()),
host,
service)
class ExampleProxy is Proxy
let _proxy_host: String
let _proxy_service: String
new create(proxy_host: String, proxy_service: String) =>
_proxy_host = proxy_host
_proxy_service = proxy_service
fun apply(wrap: TCPConnectionNotify iso): TCPConnectionNotify iso^ =>
ExampleProxyNotify.create(consume wrap, _proxy_service, _proxy_service)
class iso ExampleProxyNotify is TCPConnectionNotify
// Fictional proxy implementation that has no error
// conditions, and always forwards the connection.
let _proxy_host: String
let _proxy_service: String
var _destination_host: (None | String) = None
var _destination_service: (None | String) = None
let _wrapped: TCPConnectionNotify iso
new iso create(wrap: TCPConnectionNotify iso, proxy_host: String, proxy_service: String) =>
_wrapped = wrap
_proxy_host = proxy_host
_proxy_service = proxy_service
fun ref proxy_via(host: String, service: String): (String, String) =>
// Stash the original host & service; return the host & service
// for the proxy; indicating that the initial TCP connection should
// be made to the proxy
_destination_host = host
_destination_service = service
(_proxy_host, _proxy_service)
fun ref connected(conn: TCPConnection ref) =>
// conn is the connection to the *proxy* server. We need to ask the
// proxy server to forward this connection to our intended final
// destination.
conn.write((_destination_host + "\n").array())
conn.write((_destination_service + "\n").array())
wrapped.connected(conn)
fun ref received(conn, data, times) => _wrapped.received(conn, data, times)
fun ref connect_failed(conn: TCPConnection ref) => None
actor tag TCPConnection is
AsioEventNotify tag
Implements¶
AsioEventNotify tag
Constructors¶
create¶
[Source]
Connect via IPv4 or IPv6. If from is a non-empty string, the connection
will be made from the specified interface.
new tag create(
auth: TCPConnectAuth val,
notify: TCPConnectionNotify iso,
host: String val,
service: String val,
from: String val = "",
read_buffer_size: USize val = 16384,
yield_after_reading: USize val = 16384,
yield_after_writing: USize val = 16384)
: TCPConnection tag^
Parameters¶
auth: TCPConnectAuth val
notify: TCPConnectionNotify iso
host: String val
service: String val
from: String val = ""
read_buffer_size: USize val = 16384
yield_after_reading: USize val = 16384
yield_after_writing: USize val = 16384
Returns¶
TCPConnection tag^
ip4¶
[Source]
Connect via IPv4.
new tag ip4(
auth: TCPConnectAuth val,
notify: TCPConnectionNotify iso,
host: String val,
service: String val,
from: String val = "",
read_buffer_size: USize val = 16384,
yield_after_reading: USize val = 16384,
yield_after_writing: USize val = 16384)
: TCPConnection tag^
Parameters¶
auth: TCPConnectAuth val
notify: TCPConnectionNotify iso
host: String val
service: String val
from: String val = ""
read_buffer_size: USize val = 16384
yield_after_reading: USize val = 16384
yield_after_writing: USize val = 16384
Returns¶
TCPConnection tag^
ip6¶
[Source]
Connect via IPv6.
new tag ip6(
auth: TCPConnectAuth val,
notify: TCPConnectionNotify iso,
host: String val,
service: String val,
from: String val = "",
read_buffer_size: USize val = 16384,
yield_after_reading: USize val = 16384,
yield_after_writing: USize val = 16384)
: TCPConnection tag^
Parameters¶
auth: TCPConnectAuth val
notify: TCPConnectionNotify iso
host: String val
service: String val
from: String val = ""
read_buffer_size: USize val = 16384
yield_after_reading: USize val = 16384
yield_after_writing: USize val = 16384
Returns¶
TCPConnection tag^
Public Behaviours¶
write¶
[Source]
Write a single sequence of bytes. Data will be silently discarded if the
connection has not yet been established though.
be write(
data: (String val | Array[U8 val] val))
Parameters¶
data: (String val | Array[U8 val] val)
writev¶
[Source]
Write a sequence of sequences of bytes. Data will be silently discarded if
the connection has not yet been established though.
be writev(
data: ByteSeqIter val)
Parameters¶
data: ByteSeqIter val
mute¶
[Source]
Temporarily suspend reading off this TCPConnection until such time as
unmute is called.
be mute()
unmute¶
[Source]
Start reading off this TCPConnection again after having been muted.
be unmute()
set_notify¶
[Source]
Change the notifier.
be set_notify(
notify: TCPConnectionNotify iso)
Parameters¶
notify: TCPConnectionNotify iso
dispose¶
[Source]
Close the connection gracefully once all writes are sent.
be dispose()
Public Functions¶
local_address¶
[Source]
Return the local IP address. If this TCPConnection is closed then the
address returned is invalid.
fun box local_address()
: NetAddress val
Returns¶
NetAddress val
remote_address¶
[Source]
Return the remote IP address. If this TCPConnection is closed then the
address returned is invalid.
fun box remote_address()
: NetAddress val
Returns¶
NetAddress val
expect¶
[Source]
A received call on the notifier must contain exactly qty bytes. If
qty is zero, the call can contain any amount of data. This has no effect
if called in the sent notifier callback.
Errors if qty exceeds the max buffer size as indicated by the
read_buffer_size supplied when the connection was created.
fun ref expect(
qty: USize val = 0)
: None val ?
Parameters¶
qty: USize val = 0
Returns¶
None val ?
set_nodelay¶
[Source]
Turn Nagle on/off. Defaults to on. This can only be set on a connected
socket.
fun ref set_nodelay(
state: Bool val)
: None val
Parameters¶
state: Bool val
Returns¶
None val
set_keepalive¶
[Source]
Sets the TCP keepalive timeout to approximately secs seconds. Exact
timing is OS dependent. If secs is zero, TCP keepalive is disabled. TCP
keepalive is disabled by default. This can only be set on a connected
socket.
fun ref set_keepalive(
secs: U32 val)
: None val
Parameters¶
secs: U32 val
Returns¶
None val
write_final¶
[Source]
Write as much as possible to the socket. Set _writeable to false if not
everything was written. On an error, close the connection. This is for data
that has already been transformed by the notifier. Data will be silently
discarded if the connection has not yet been established though.
fun ref write_final(
data: (String val | Array[U8 val] val))
: None val
Parameters¶
data: (String val | Array[U8 val] val)
Returns¶
None val
close¶
[Source]
Attempt to perform a graceful shutdown. Don't accept new writes. If the
connection isn't muted then we won't finish closing until we get a zero
length read. If the connection is muted, perform a hard close and shut
down immediately.
fun ref close()
: None val
Returns¶
None val
hard_close¶
[Source]
When an error happens, do a non-graceful close.
fun ref hard_close()
: None val
Returns¶
None val
getsockopt¶
[Source]
General wrapper for TCP sockets to the getsockopt(2) system call.
The caller must provide an array that is pre-allocated to be
at least as large as the largest data structure that the kernel
may return for the requested option.
In case of system call success, this function returns the 2-tuple:
1. The integer 0.
2. An Array[U8] of data returned by the system call's void *
4th argument. Its size is specified by the kernel via the
system call's sockopt_len_t * 5th argument.
In case of system call failure, this function returns the 2-tuple:
1. The value of errno.
2. An undefined value that must be ignored.
Usage example:
// connected() is a callback function for class TCPConnectionNotify
fun ref connected(conn: TCPConnection ref) =>
match conn.getsockopt(OSSockOpt.sol_socket(), OSSockOpt.so_rcvbuf(), 4)
| (0, let gbytes: Array[U8] iso) =>
try
let br = Reader.create().>append(consume gbytes)
ifdef littleendian then
let buffer_size = br.u32_le()?
else
let buffer_size = br.u32_be()?
end
end
| (let errno: U32, _) =>
// System call failed
end
fun ref getsockopt(
level: I32 val,
option_name: I32 val,
option_max_size: USize val = 4)
: (U32 val , Array[U8 val] iso^)
Parameters¶
level: I32 val
option_name: I32 val
option_max_size: USize val = 4
Returns¶
(U32 val , Array[U8 val] iso^)
getsockopt_u32¶
[Source]
Wrapper for TCP sockets to the getsockopt(2) system call where
the kernel's returned option value is a C uint32_t type / Pony
type U32.
In case of system call success, this function returns the 2-tuple:
1. The integer 0.
2. The *option_value returned by the kernel converted to a Pony U32.
In case of system call failure, this function returns the 2-tuple:
1. The value of errno.
2. An undefined value that must be ignored.
fun ref getsockopt_u32(
level: I32 val,
option_name: I32 val)
: (U32 val , U32 val)
Parameters¶
level: I32 val
option_name: I32 val
Returns¶
(U32 val , U32 val)
setsockopt¶
[Source]
General wrapper for TCP sockets to the setsockopt(2) system call.
The caller is responsible for the correct size and byte contents of
the option array for the requested level and option_name,
including using the appropriate machine endian byte order.
This function returns 0 on success, else the value of errno on
failure.
Usage example:
// connected() is a callback function for class TCPConnectionNotify
fun ref connected(conn: TCPConnection ref) =>
let sb = Writer
sb.u32_le(7744) // Our desired socket buffer size
let sbytes = Array[U8]
for bs in sb.done().values() do
sbytes.append(bs)
end
match conn.setsockopt(OSSockOpt.sol_socket(), OSSockOpt.so_rcvbuf(), sbytes)
| 0 =>
// System call was successful
| let errno: U32 =>
// System call failed
end
fun ref setsockopt(
level: I32 val,
option_name: I32 val,
option: Array[U8 val] ref)
: U32 val
Parameters¶
level: I32 val
option_name: I32 val
option: Array[U8 val] ref
Returns¶
U32 val
setsockopt_u32¶
[Source]
General wrapper for TCP sockets to the setsockopt(2) system call where
the kernel expects an option value of a C uint32_t type / Pony
type U32.
This function returns 0 on success, else the value of errno on
failure.
fun ref setsockopt_u32(
level: I32 val,
option_name: I32 val,
option: U32 val)
: U32 val
Parameters¶
level: I32 val
option_name: I32 val
option: U32 val
Returns¶
U32 val
get_so_error¶
[Source]
Wrapper for the FFI call getsockopt(fd, SOL_SOCKET, SO_ERROR, ...)
fun ref get_so_error()
: (U32 val , U32 val)
Returns¶
(U32 val , U32 val)
get_so_rcvbuf¶
[Source]
Wrapper for the FFI call getsockopt(fd, SOL_SOCKET, SO_RCVBUF, ...)
fun ref get_so_rcvbuf()
: (U32 val , U32 val)
Returns¶
(U32 val , U32 val)
get_so_sndbuf¶
[Source]
Wrapper for the FFI call getsockopt(fd, SOL_SOCKET, SO_SNDBUF, ...)
fun ref get_so_sndbuf()
: (U32 val , U32 val)
Returns¶
(U32 val , U32 val)
get_tcp_nodelay¶
[Source]
Wrapper for the FFI call getsockopt(fd, SOL_SOCKET, TCP_NODELAY, ...)
fun ref get_tcp_nodelay()
: (U32 val , U32 val)
Returns¶
(U32 val , U32 val)
set_so_rcvbuf¶
[Source]
Wrapper for the FFI call setsockopt(fd, SOL_SOCKET, SO_RCVBUF, ...)
fun ref set_so_rcvbuf(
bufsize: U32 val)
: U32 val
Parameters¶
bufsize: U32 val
Returns¶
U32 val
set_so_sndbuf¶
[Source]
Wrapper for the FFI call setsockopt(fd, SOL_SOCKET, SO_SNDBUF, ...)
fun ref set_so_sndbuf(
bufsize: U32 val)
: U32 val
Parameters¶
bufsize: U32 val
Returns¶
U32 val
set_tcp_nodelay¶
[Source]
Wrapper for the FFI call setsockopt(fd, SOL_SOCKET, TCP_NODELAY, ...)
fun ref set_tcp_nodelay(
state: Bool val)
: U32 val
Parameters¶
state: Bool val
Returns¶
U32 val
| pony | 18198 | https://no.wikipedia.org/wiki/TCP | TCP | Transmission Control Protocol (TCP) er en nettverksprotokoll for forbindelsesorientert, pålitelig overføring av informasjon, og opererer på transportlaget i OSI-modellen for datanett.
I protokollsettet for Internett opererer TCP mellom Internett-protokollen (under) og en applikasjon (over). Applikasjonene trenger som oftest en pålitelig tilkobling mellom endepunktene, noe Internett-protokollen ikke tilbyr alene.
Applikasjonene sender strømmer av 8-biters tegn for å bli sendt gjennom nettverket, og TCP-protokollen deler denne strømmen opp i pakker med en bestemt størrelse (vanligvis bestemt av nettverket som datamaskinen er koblet til). TCP sender så pakkene videre til Internett-protokollen som sørger for at de blir sendt til TCP-modulen i den andre enden av forbindelsen. TCP passer på at ingen pakker forsvinner ved å gi hvert tegn i strømmen et sekvensnummer, som også blir brukt for å forsikre at pakkene blir levert i riktig rekkefølge hos mottakeren.
TCP-modulen i mottakerenden sender så tilbake en kvittering for tegn som er blitt mottatt. Hvis kvitteringen ikke er mottatt innen et visst tidspunkt, vil et tidsavbrudd oppstå. Da vil sender anta at pakken er tapt, og pakken må sendes på nytt. TCP sjekker også at datastrømmen ikke er skadd ved å bruke en sjekksum. Sjekksummen blir beregnet av senderen, og kontrollert hos mottaker, for hver pakke.
Virkemåte
TCP forbindelser har tre faser: opprettelsen av en forbindelse, dataoverføringen og tilslutt avslutningen av forbindelsen. Et treveis håndtrykk blir brukt for å opprette en forbindelse. Et fireveis håndtrykk blir brukt for å avslutte en forbindelse. I opprettelsesfasen av en forbindelse vil parametre som sekvensnummer bli initialisert for å oppnå riktig rekkefølge på pakkene og robusthet.
Opprettelse av en forbindelse (treveis håndtrykk)
Selv om det er mulig for to endepunkter å åpne en forbindelse mellom hverandre samtidig, så vil dette typisk
skje ved at ene enden åpner en socket og venter passivt på at noen skal koble seg til. Dette blir ofte
kalt passiv åpning og er typisk for tjener-enden av en forbindelse. Klientsiden av en forbindelse utfører
en aktiv åpning ved å sende et TCP segment med SYN-flagget satt til tjeneren som en del av treveishåndtrykket.
Tjenersiden skal da besvare en gyldig SYN-forespørsel med SYN/ACK. Til slutt så skal klientsiden av forbindelsen
svare tjeneren med et ACK som fullfører treveishåndtrykket og opprettelsen av en forbindelse.
Dataoverføring
I dataoverføringsfasen har TCP noen mekanismer som avgjør grad av robusthet og pålitelighet.
Et sekvensnummer brukes for å ordne segmentene i riktig rekkefølge, og for å detektere dupliserte data. Sjekksummer
brukes for å detektere feil i segmentene. Kvitteringer og tidsavbrudd brukes for å detektere feil og for å tilpasse
TCP ved tap av segmenter eller ved forsinkelse.
I opprettelsesfasen utveksles innledende sekvensnummer mellom de to endepunktene. Disse sekvensnummerne blir brukt
til å identifisere hvert enkelt tegn i strømmen av tegn. Det er alltid et par av sekvensnummer i hvert TCP-segment. Disse blir referert til som henholdsvis sekvensnummeret og kvitteringsnummeret. En TCP-sender refererer til sitt eget sekvensnummer som sekvensnummer og mottakers sekvensnummer som kvitteringsnummer. For å opprettholde pålitlighet, kvitterer en mottaker et TCP-segment ved å indikere at alle tegn fram til et gitt tegn i den kontinuerlige tegnstrømmen er mottatt. En utvidelse av TCP, kalt SACK (Selective Acknowledgements), tillater en TCP-mottaker å kvittere for blokker av tegn som ikke er i rekkefølge.
Dette gjør at hvis et enkelt tegn i strømmen går tapt så kan TCP kvittere for tegn før dette, og dermed unngå at alle disse tegna må sendes på nytt.
Gjennom bruken av sekvens- og kvitteringsnummer kan TCP levere segmenter i korrekt rekkefølge til mottakerapplikasjonen. Sekvens- og kvitteringsnummer er 32-biters positive heltall som vil rulle rundt til 0 ved det neste tegnet i strømmen etter 232-1.
En 16-bit sjekksum som består av ener-komplementet til ener-komplement summen av innholdet i hodet og datadelen fra
TCP-segmentet blir kalkulert av senderen og inkludert i segmentet når det sendes.
TCP-mottakeren kalkulerer sjekksummen av TCP-hodet og datadelen som er mottatt, og hvis denne ikke avviker fra
sjekksummen senderen kalkulerte så antas segmentet å være intakt og uten feil.
TCP-sjekksummen er ganske svak i forhold til moderne standarder. Datalinklag med stor sannsynlighet for bitfeil,
krever gjerne bedre evne til å korrigere og påvise feil. Hvis TCP skulle bli konstruert på nytt i dag ville mest
sannsynlig en 32-bit syklisk redundanssjekk (CRC) spesifisert som en feilsjekk blitt brukt i stedet for sjekksummen. Den svake sjekksummen er delvis kompensert for ved bruken av CRC eller bedre integritetssjekk
på datalink-laget, under både TCP og IP, slik som for eksempel i en PPP- eller Ethernet-ramme. Imidlertid betyr
ikke dette at 16 bit-sjekksummen til TCP er redundant. Undersøkelser av internettrafikk har vist at programvare-
og maskinvarefeil som introduserer feil i pakker mellom CRC-beskytta hopp er vanlige, og at TCP-sjekksummen
fanger opp de fleste av slike enkle feil. Dette er et eksempel på ende-til-ende-prinsippet.
Kvitteringer for tegn som er sendt, eller fravær av kvitteringer, blir brukt av sendere for å implisitt lære om
tilstanden på nettverket mellom TCP-avsender og -mottaker. Dette sammen med tidtakere gjør at TCP-sendere og -mottakere kan endre oppførselen til flyten av tegn. Dette kalles vanligvis flytkontroll, metningskontroll og/eller metningsunngåelse. TCP bruker et antall mekanismer for å oppnå både robusthet og høy ytelse.
Disse mekanismene inkluderer bruken av et sliding window, slow-start algoritmen, congestion avoidance algoritmen, fast retransmit og fast recovery algoritmene, og så videre. Utvidelser av TCP for å pålitelig kunne håndtere tap, minimalisere feil, håndtere metning og ha en høy overføringshastighet i nettverk med svært høy kapasitet
er områder det forskes på og utvikles standarder for.
Avslutning av en forbindelse (4-veis håndtrykk)
I denne fasen benyttes et 4-veis håndtrykk. Hver ende av forbindelsen avslutter uavhengig av hverandre.
For hvert endepunkt som lukker forbindelsen kreves et par med FIN og ACK segmenter.
TCP-porter
TCP bruker portnummer for å identifisere sender- og mottakerapplikasjoner. Applikasjonen på hver side
av en TCP-forbindelse får tildelt et 16-bit unsigned portnummer. Porter er kategorisert i 3 grunnleggende kategorier: kjente, registrerte, og dynamiske/private. De kjente portene er tildelt av
Internet Assigned Numbers Authority (IANA) og er typisk brukt av systemnivå
eller rotprosesser. Velkjente applikasjoner som kjører som tjenere og venter passivt på tilkoblinger fra
klienter bruker typisk disse portene. Noen eksempler på slike er: FTP (21), Telnet (23), SMTP (25) og HTTP (80).
Registrerte porter blir typisk brukt av brukerapplikasjoner som midlertidige kildeporter når
tjenere kontaktes, men disse portene kan også identifisere kjente tjenester registrert av en tredjepart.
Dynamiske/private porter kan også bruke av sluttbrukerapplikasjoner, men blir ikke så ofte brukt på den måten.
Dynamiske/private porter har ingen mening utenfor en bestemt TCP-forbindelse. TCP-portnummeret lagres i
et felt på 16-bit i TCP-hodet, og 65535 porter er dermed tilgjengelige.
Utviklingen av TCP
TCP er en kompleks protokoll og fortsatt under utvikling. Selv om betydelige utvidelser har blitt gjort og foreslått siden TCP ble dokumentert i RFC 793 i 1981, har den grunnleggende funksjonaliteten få endringer.
RFC 1122, Host Requirements for Internet Hosts, oppklarte noen implementasjonskrav for TCP protokollen. RFC 2581, TCP Congestion Control som er en av de viktigste TCP relaterte RFCene i de senere år
beskriver oppdaterte algoritmer for å unngå urimelig metning. I 2001 ble RFC 3168 publisert som beskriver
explicit congestion notification (ECN) som er en mekanisme for å varsle om metning i nettverket. I dag brukes
TCP til tilnærmet 95 % av all Internett trafikk. Vanlige applikasjoner som bruker TCP er blant annet HTTP/HTTPS
(world wide web), SMTP/POP3/IMAP (e-post) og FTP (filoverføring). Den vidstrakte bruken vitner om at de
opprinnelige utviklerne gjorde en svært god jobb.
Alternativer til TCP
TCP er imidlertid ikke like godt egnet til alle applikasjoner. Derfor har nyere transportlags-protokoller blitt utviklet for å takle noen av svakhetene. For eksempel trenger sanntidsapplikasjoner ofte ikke, og vil
lide av TCP's pålitelige leveringsmekanismer. I slike applikasjoner er det ofte bedre å ha litt tap, feil eller
metning enn å prøve å tilpasse seg. Noen eksempler på slike applikasjoner er sanntids-strømmer av multimedia
(som Internett-radio), sanntidsspill og IP-telefoni. Slike applikasjoner kan velge å bruke
andre transportlagsprotokoller som for eksempel User Datagram Protocol (UDP), Stream Control Transmission Protocol SCTP), eller Datagram Congestion Control Protocol (DCCP)
Litteratur
W. Richard Stevens, TCP/IP Illustrated, Volume 1 : The Protocols, ISBN 0-201-63346-9
Eksterne lenker
RFC793 (Spesifikasjonen)
IANA Port Assignments
Sally Floyd's homepage
John Kristoff's Overview of TCP (Fundamental concepts behind TCP and how it is used to transport data between two endpoints)
When The CRC and TCP Checksum Disagree
Introduction to TCP/IP – with some pictures
The basics of Transmission Control Protocol
Tcp/Ip port numbers. Information for Unix based system administrators
TCP, Transmission Control Protocol
Datanett
Internett-protokoller | norwegian_bokmål | 0.620225 |
Pony/lexicon.txt | # Lexicon
Words are hard. We can all be saying the same thing but do we _mean_ the same thing? It's tough to know. Hopefully, this lexicon helps a little.
## Terminology
**Braces**: { }. Synonymous with curly brackets.
**Brackets**: This term is ambiguous. In the UK it usually means ( ) in the US is usually means [ ]. It should, therefore, be avoided for use for either of these. Can be used as a general term for any unspecified grouping punctuation, including { }.
**Compatible type**: Two types are compatible if there can be any single object which is an instance of both types. Note that a suitable type for the single object does not have to have been defined, as long as it could be. For example, any two traits are compatible because a class could be defined that provides both of them, even if such a class has not been defined. Conversely, no two classes can ever be compatible because no object can be an instance of both.
**Compound type**: A type combining multiple other types, i.e. union, intersection, and tuple. Opposite of a single type.
**Concrete type**: An actor, class or primitive.
**Curly brackets**: { }. Synonymous with braces.
**Declaration** and **definition**: synonyms for each other, we do not draw the C distinction between forward declarations and full definitions.
**Default method body**: Method body defined in a trait and optionally used by concrete types.
**Entity**: Top level definition within a file, i.e. alias, trait, actor, class, primitive.
**Explicit type**: An actor, class or primitive.
**Member**: Method or field.
**Method**: Something callable on a concrete type/object. Function, behaviour or constructor.
**Override**: When a concrete type has its own body for a method with a default body provided by a trait.
**Parentheses**: ( ). Synonymous with round brackets.
**Provide**: An entity's usage of traits and the methods they contain. Equivalent to implements or inherits from.
**Round brackets**: ( ). Synonymous with parentheses.
**Single type**: Any type which is not defined as a collection of other types. Actors, classes, primitives, traits and structural types are all single types. Opposite of a compound type.
**Square brackets**: [ ]
**Trait clash**: A trait clashes with another type if it contains a method with the same name, but incompatible signature as a method in the other type. A clashing trait is incompatible with the other type. Traits can clash with actors, classes, primitives, intersections, structural types and other traits.
| pony | 79723 | https://sv.wikipedia.org/wiki/Klass%20%28programmering%29 | Klass (programmering) | Klass är i objektorienterad programmering ett avsnitt programkod som samlar en mängd relaterade attribut och funktioner, även kallat metoder. Det är ett viktigt kännetecken för en klass att dess inre struktur inte är tillgänglig utanför klassen, utan den kan enbart manipuleras genom ett specificerat gränssnitt. Fenomenet att en klass privata delar ej är tillgängliga utanför kallas inkapsling (eng. encapsulation). En klass kan sägas vara en användardefinierad datatyp, som alltså kompletterar de fördefinierade datatyperna, i C++ till exempel int och char. För att de klasserna skall likna just användardefinierade datatyper använder man i vissa språk överlagring av operatorer för klasser.
Arvshierarkier
Objektorienterade programmeringsspråk tillåter klasser att ärva egenskaper från andra klasser i ett eller flera led. En klass som en annan klass ärver egenskaper ifrån kallas för superklass (överklass, basklass) medan den klass som ärver egenskaperna benämns subklass (underklass, härledd klass).
Exempel på klass i C++
#include <string>
class example
{
public:
example(int no, string s); //Konstruktor
void add(int no); //Metod för att addera värden med variabeln "value"
void subtract(int no); //Metod för att subtrahera från variabeln "value"
void change_name(string s); //Metod för att ändra innehållet i strängvariabeln "name"
protected:
int value; //En heltalsvariabel
std::string name; //En strängvariabel
};
example::example(int no, string s)
{
value = no; //Initering av de båda variablerna
name = s;
}
void example::add(int no)
{
value += no; //"no" adderas till "value"
}
void example::subtract(int no)
{
value -= no; //"no" subtraheras från "value"
}
void example::change_name(string s)
{
name = s; //name ändras till s
}
int main()
{
example test(10, "test"); //Objektet "test" initieras, value = 10, name = test
test.add(10); //"value" ökar med 10
test.subtract(5); //"value" minskar med 5, innehåller just nu 15
test.change_name("example"); //Variabeln "name" ändras från "test" till "example"
return 0;
}
Koden ovan definierar en klass som består av en variabel av typen int och en variabel av typen string (som inte är en primitiv datatyp, utan en egen klass). Dessutom anges metoder för att manipulera dessa värden, men inte för att hämta information från klassen. Ingen utskrift kan därför heller ske i huvudprogrammet, eftersom datan har gömts för alla utom arvingar till klassen (se vidare nedan).
Exempel på en subklass i C++
Exempleklassen ovan saknar vissa metoder som kan vara bra att ha och dessutom kanske man vill kunna lagra ytterligare värden förutom ett heltal och en textsträng. Ett alternativ är då att skapa en subklass till klassen exempel (i stället för att skriva om koden till klassen example). Det ser ut så här:
class betterexample : public example
{
//En klass är default private, alltså måste följande rad inte skrivas.
//private:
double anothervalue; //Ett attribut av typen double
public:
betterexample(int no, string s, double an); //Konstruktor
int getValue(); //Metod för att komma åt "value", som finns i superklassen
string getName(); //Metod för att hämta "name", som också finns i superklassen
double getAnothervalue(); //Metod för att hämta "anothervalue", som bara finns i subklassen
};
betterexample::betterexample(int no, string s, double an): example(no, s) //Anrop till superklassens konstruktor
{
anothervalue = an; //Initiering av den egna variabeln
}
int betterexample::getValue()
{
return value; //Hämtar "value" som definierats i superklassen
}
string betterexample::getName()
{
return name; //Hämtar "name" som definierats i superklassen
}
double betterexample::getAnothervalue()
{
return anothervalue; //Hämtar "anothervalue" som definierats på plats i subklassen
}
Här ärver klassen "betterexample" alla attribut och metoder från klassen example. Därtill definieras ett eget attribut, ett flyttal kallat "anothervalue" liksom metoder som kan användas för att hämta alla värden som lagras i klassen. Om man lägger till koden för "betterexample" till den som redan finns för "example" skulle man kunna definiera ett huvudprogram som ser ut så här:
int main()
{
betterexample nytt_test(10, "nytt test", 20.5); //Skapar ett objekt av typen "betterexample"
nytt_test.add(20); //adderar 20 till heltalet "value"
cout << nytt_test.getValue() << endl; //skriver ut värdet av "value"
cout << nytt_test.getAnothervalue() << endl; //Skriver ut värdet av "anothervalue"
cout << nytt_test.getName() << endl; //Skriver ut värdet av "name"
return 0;
}
Utskriften från detta program blir:
30
20.5
nytt test
Abstrakt klass
I objektorienterad programmering kan abstrakta klasser definieras.
Detta är klasser som inte kan instansieras, vilket innebär att det inte går att skapa objekt av klassen. I stället får man definiera en klass som ärver den abstrakta, och på så sätt skapa objekt.
Ett exempel kan vara klassen Däggdjur. I den kan definieras egenskaper och metoder som är gemensamma för alla däggdjur, men ett antal egenskaper som storlek, dräktighetstid etc kan inte definieras utan att veta vilket djur det rör sig om. Typiskt anger Däggdjur att det har en längd, men kan inte svara på hur stor den är.
Genom att definiera Människa och Delfin som klasser som ärver Däggdjur, och tillföra specifika egenskaper och metoder för sådant som skiljer, kan man både få god utvecklingsekonomi och en beskrivande struktur.
Abstrakta klasser är också praktiska för användare. Ett program för en zoologisk trädgård har troligen behov av att hålla kollektioner av objekt som har klassen Däggdjur eller rentav Djur, och nöjer sig med att respektive objekt själv vet vilken klass det egentligen implementerar.
Interface kan ses som ett specialfall av abstrakta klasser. Dessa innehåller enbart definitioner av metoder, och ingen implementering alls.
Programspråkselement
Objektorienterad programmering | swedish | 0.805182 |
Pony/src-builtin-bool-.txt |
bool.pony
1
2
3
4
5
6
7
8
9
10
11
12primitive Bool is Stringable
new create(from: Bool) => from
fun eq(y: Bool): Bool => this == y
fun ne(y: Bool): Bool => this != y
fun op_and(y: Bool): Bool => this and y
fun op_or(y: Bool): Bool => this or y
fun op_xor(y: Bool): Bool => this xor y
fun op_not(): Bool => not this
fun string(): String iso^ =>
(if this then "true" else "false" end).string()
| pony | 1929384 | https://sv.wikipedia.org/wiki/Boreacola | Boreacola | Boreacola är ett släkte av musslor. Boreacola ingår i familjen Lasaeidae.
Kladogram enligt Catalogue of Life:
Källor
Musslor
Boreacola | swedish | 1.220948 |
Pony/src-process-process_monitor-.txt |
process_monitor.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498use "backpressure"
use "collections"
use "files"
use "time"
actor ProcessMonitor is AsioEventNotify
"""
Fork+execs / creates a child process and monitors it. Notifies a client about
STDOUT / STDERR events.
"""
let _notifier: ProcessNotify
let _backpressure_auth: ApplyReleaseBackpressureAuth
var _stdin: _Pipe = _Pipe.none()
var _stdout: _Pipe = _Pipe.none()
var _stderr: _Pipe = _Pipe.none()
var _err: _Pipe = _Pipe.none()
var _child: _Process = _ProcessNone
let _max_size: USize = 4096
var _read_buf: Array[U8] iso = recover Array[U8] .> undefined(_max_size) end
var _read_len: USize = 0
var _expect: USize = 0
embed _pending: List[(ByteSeq, USize)] = _pending.create()
var _done_writing: Bool = false
var _closed: Bool = false
var _timers: (Timers tag | None) = None
let _process_poll_interval: U64
var _polling_child: Bool = false
var _final_wait_result: (_WaitResult | None) = None
new create(
auth: StartProcessAuth,
backpressure_auth: ApplyReleaseBackpressureAuth,
notifier: ProcessNotify iso,
filepath: FilePath,
args: Array[String] val,
vars: Array[String] val,
wdir: (FilePath | None) = None,
process_poll_interval: U64 = Nanos.from_millis(100))
=>
"""
Create infrastructure to communicate with a forked child process and
register the asio events. Fork child process and notify our user about
incoming data via the notifier.
"""
_backpressure_auth = backpressure_auth
_notifier = consume notifier
_process_poll_interval = process_poll_interval
// We need permission to execute and the
// file itself needs to be an executable
if not filepath.caps(FileExec) then
_notifier.failed(this, ProcessError(CapError, filepath.path
+ " is not an executable or we do not have execute capability."))
return
end
let ok = try
FileInfo(filepath)?.file
else
false
end
if not ok then
// unable to stat the file path given so it may not exist
// or may be a directory.
_notifier.failed(this, ProcessError(ExecveError, filepath.path
+ " does not exist or is a directory."))
return
end
try
_stdin = _Pipe.outgoing()?
else
_stdin.close()
_notifier.failed(this, ProcessError(PipeError,
"Failed to open pipe for stdin."))
return
end
try
_stdout = _Pipe.incoming()?
else
_stdin.close()
_stdout.close()
_notifier.failed(this, ProcessError(PipeError,
"Failed to open pipe for stdout."))
return
end
try
_stderr = _Pipe.incoming()?
else
_stdin.close()
_stdout.close()
_stderr.close()
_notifier.failed(this, ProcessError(PipeError,
"Failed to open pipe for stderr."))
return
end
try
_err = _Pipe.incoming()?
else
_stdin.close()
_stdout.close()
_stderr.close()
_err.close()
_notifier.failed(this, ProcessError(PipeError,
"Failed to open auxiliary error pipe."))
return
end
try
ifdef posix then
_child = _ProcessPosix.create(
filepath.path, args, vars, wdir, _err, _stdin, _stdout, _stderr)?
elseif windows then
let windows_child = _ProcessWindows.create(
filepath.path, args, vars, wdir, _stdin, _stdout, _stderr)
_child = windows_child
// notify about errors
match windows_child.process_error
| let pe: ProcessError =>
_notifier.failed(this, pe)
return
end
else
compile_error "unsupported platform"
end
_err.begin(this)
_stdin.begin(this)
_stdout.begin(this)
_stderr.begin(this)
else
_notifier.failed(this, ProcessError(ForkError))
return
end
// Asio is not wired up for Windows, so use a timer for now.
ifdef windows then
_setup_windows_timers()
end
_notifier.created(this)
be print(data: ByteSeq) =>
"""
Print some bytes and append a newline.
"""
if not _done_writing then
_write_final(data)
_write_final("\n")
end
be write(data: ByteSeq) =>
"""
Write to STDIN of the child process.
"""
if not _done_writing then
_write_final(data)
end
be printv(data: ByteSeqIter) =>
"""
Print an iterable collection of ByteSeqs.
"""
for bytes in data.values() do
_write_final(bytes)
_write_final("\n")
end
be writev(data: ByteSeqIter) =>
"""
Write an iterable collection of ByteSeqs.
"""
for bytes in data.values() do
_write_final(bytes)
end
be done_writing() =>
"""
Set the _done_writing flag to true. If _pending is empty we can close the
_stdin pipe.
"""
_done_writing = true
Backpressure.release(_backpressure_auth)
if _pending.size() == 0 then
_stdin.close_near()
end
be dispose() =>
"""
Terminate child and close down everything.
"""
match _child
| let never_started: _ProcessNone =>
// We never started a child process so do not do any disposal
// If we do, some weirdness can happen with dispose getting called
// on the notifier which is not supposed to happen if we never started
// a child (or haven't started one yet).
return
else
Backpressure.release(_backpressure_auth)
_child.kill()
_close()
end
fun ref expect(qty: USize = 0) =>
"""
A `stdout` call on the notifier must contain exactly `qty` bytes. If
`qty` is zero, the call can contain any amount of data.
"""
_expect = _notifier.expect(this, qty)
_read_buf_size()
be _event_notify(event: AsioEventID, flags: U32, arg: U32) =>
"""
Handle the incoming Asio event from one of the pipes.
"""
match event
| _stdin.event =>
if AsioEvent.writeable(flags) then
_pending_writes()
elseif AsioEvent.disposable(flags) then
_stdin.dispose()
end
| _stdout.event =>
if AsioEvent.readable(flags) then
_pending_reads(_stdout)
elseif AsioEvent.disposable(flags) then
_stdout.dispose()
end
| _stderr.event =>
if AsioEvent.readable(flags) then
_pending_reads(_stderr)
elseif AsioEvent.disposable(flags) then
_stderr.dispose()
end
| _err.event =>
if AsioEvent.readable(flags) then
_pending_reads(_err)
elseif AsioEvent.disposable(flags) then
_err.dispose()
end
end
_try_shutdown()
be timer_notify() =>
"""
Windows IO polling timer has fired
"""
_pending_writes() // try writes
_pending_reads(_stdout)
_pending_reads(_stderr)
_try_shutdown()
fun ref _close() =>
"""
Close all pipes and wait for the child process to exit.
"""
if not _closed then
_closed = true
_stdin.close()
_stdout.close()
_stderr.close()
_wait_for_child()
end
be _wait_for_child() =>
match _final_wait_result
| let wr: _WaitResult =>
None
else
match _child.wait()
| let sr: _StillRunning =>
if not _polling_child then
_polling_child = true
let timers = _ensure_timers()
let pm: ProcessMonitor tag = this
let tn =
object iso is TimerNotify
fun ref apply(timer: Timer, count: U64): Bool =>
pm._wait_for_child()
true
end
let timer = Timer(consume tn, _process_poll_interval, _process_poll_interval)
timers(consume timer)
end
| let exit_status: ProcessExitStatus =>
// process child exit code or termination signal
_final_wait_result = exit_status
_notifier.dispose(this, exit_status)
_dispose_timers()
| let wpe: WaitpidError =>
_final_wait_result = wpe
_notifier.failed(this, ProcessError(WaitpidError))
_dispose_timers()
end
end
fun ref _ensure_timers(): Timers tag =>
match _timers
| None =>
let ts = Timers
_timers = ts
ts
| let ts: Timers => ts
end
fun ref _dispose_timers() =>
match _timers
| let ts: Timers =>
ts.dispose()
_timers = None
end
fun ref _setup_windows_timers() =>
let timers = _ensure_timers()
let pm: ProcessMonitor tag = this
let tn =
object iso is TimerNotify
fun ref apply(timer: Timer, count: U64): Bool =>
pm.timer_notify()
true
end
let timer = Timer(consume tn, 50_000_000, 10_000_000)
timers(consume timer)
fun ref _try_shutdown() =>
"""
If neither stdout nor stderr are open we close down and exit.
"""
if _stdin.is_closed() and
_stdout.is_closed() and
_stderr.is_closed()
then
_close()
end
fun ref _pending_reads(pipe: _Pipe) =>
"""
Read from stdout or stderr while data is available. If we read 4 kb of
data, send ourself a resume message and stop reading, to avoid starving
other actors.
It's safe to use the same buffer for stdout and stderr because of
causal messaging. Events get processed one _after_ another.
"""
if pipe.is_closed() then return end
var sum: USize = 0
while true do
(_read_buf, let len, let errno) =
pipe.read(_read_buf = recover Array[U8] end, _read_len)
let next = _read_buf.space()
match len
| -1 =>
if (errno == _EAGAIN()) then
return // nothing to read right now, try again later
end
pipe.close()
return
| 0 =>
pipe.close()
return
end
_read_len = _read_len + len.usize()
let data = _read_buf = recover Array[U8] .> undefined(next) end
data.truncate(_read_len)
match pipe.near_fd
| _stdout.near_fd =>
if _read_len >= _expect then
_notifier.stdout(this, consume data)
end
| _stderr.near_fd =>
_notifier.stderr(this, consume data)
| _err.near_fd =>
let step: U8 = try data.read_u8(0)? else -1 end
match step
| _StepChdir() =>
_notifier.failed(this, ProcessError(ChdirError))
| _StepExecve() =>
_notifier.failed(this, ProcessError(ExecveError))
else
_notifier.failed(this, ProcessError(UnknownError))
end
end
_read_len = 0
_read_buf_size()
sum = sum + len.usize()
if sum > (1 << 12) then
// If we've read 4 kb, yield and read again later.
_read_again(pipe.near_fd)
return
end
end
fun ref _read_buf_size() =>
if _expect > 0 then
_read_buf.undefined(_expect)
else
_read_buf.undefined(_max_size)
end
be _read_again(near_fd: U32) =>
"""
Resume reading on file descriptor.
"""
match near_fd
| _stdout.near_fd => _pending_reads(_stdout)
| _stderr.near_fd => _pending_reads(_stderr)
end
fun ref _write_final(data: ByteSeq) =>
"""
Write as much as possible to the pipe if it is open and there are no
pending writes. Save everything unwritten into _pending and apply
backpressure.
"""
if (not _closed) and not _stdin.is_closed() and (_pending.size() == 0) then
// Send as much data as possible.
(let len, let errno) = _stdin.write(data, 0)
if len == -1 then // write error
if errno == _EAGAIN() then
// Resource temporarily unavailable, send data later.
_pending.push((data, 0))
Backpressure.apply(_backpressure_auth)
else
// Notify caller of error, close fd and done.
_notifier.failed(this, ProcessError(WriteError))
_stdin.close_near()
end
elseif len.usize() < data.size() then
// Send any remaining data later.
_pending.push((data, len.usize()))
Backpressure.apply(_backpressure_auth)
end
else
// Send later, when the pipe is available for writing.
_pending.push((data, 0))
Backpressure.apply(_backpressure_auth)
end
fun ref _pending_writes() =>
"""
Send any pending data. If any data can't be sent, keep it in _pending.
Once _pending is non-empty, direct writes will get queued there,
and they can only be written here. If the _done_writing flag is set, close
the pipe once we've processed pending writes.
"""
while (not _closed) and not _stdin.is_closed() and (_pending.size() > 0) do
try
let node = _pending.head()?
(let data, let offset) = node()?
// Write as much data as possible.
(let len, let errno) = _stdin.write(data, offset)
if len == -1 then // OS signals write error
if errno == _EAGAIN() then
// Resource temporarily unavailable, send data later.
return
else
// Close pipe and bail out.
_notifier.failed(this, ProcessError(WriteError))
_stdin.close_near()
return
end
elseif (len.usize() + offset) < data.size() then
// Send remaining data later.
node()? = (data, offset + len.usize())
return
else
// This pending chunk has been fully sent.
_pending.shift()?
if (_pending.size() == 0) then
Backpressure.release(_backpressure_auth)
// check if the client has signaled it is done
if _done_writing then
_stdin.close_near()
end
end
end
else
// handle error
_notifier.failed(this, ProcessError(WriteError))
return
end
end
| pony | 34253 | https://da.wikipedia.org/wiki/430%27erne | 430'erne | Århundreder: 4. århundrede – 5. århundrede – 6. århundrede
Årtier: 380'erne 390'erne 400'erne 410'erne 420'erne – 430'erne – 440'erne 450'erne 460'erne 470'erne 480'erne
År: 430 431 432 433 434 435 436 437 438 439
Begivenheder
Personer
6. april 432: Pave Celestin 1. dør
Eksterne henvisninger
å
Årtier | danish | 1.301212 |
Pony/net-TCPAuth-.txt |
TCPAuth¶
[Source]
primitive val TCPAuth
Constructors¶
create¶
[Source]
new val create(
from: (AmbientAuth val | NetAuth val))
: TCPAuth val^
Parameters¶
from: (AmbientAuth val | NetAuth val)
Returns¶
TCPAuth val^
Public Functions¶
eq¶
[Source]
fun box eq(
that: TCPAuth val)
: Bool val
Parameters¶
that: TCPAuth val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: TCPAuth val)
: Bool val
Parameters¶
that: TCPAuth val
Returns¶
Bool val
| pony | 3834237 | https://sv.wikipedia.org/wiki/Calopertha%20truncatula | Calopertha truncatula | Calopertha truncatula är en skalbaggsart som först beskrevs av César Marie Félix Ancey 1881. Calopertha truncatula ingår i släktet Calopertha och familjen kapuschongbaggar. Inga underarter finns listade i Catalogue of Life.
Bildgalleri
Källor
Externa länkar
Kapuschongbaggar
truncatula | swedish | 1.085949 |
Pony/builtin-RuntimeOptions-.txt |
RuntimeOptions¶
[Source]
Pony struct for the Pony runtime options C struct that can be used to
override the Pony runtime defaults via code compiled into the program.
The way this is done is by adding the following function to your Main actor:
fun @runtime_override_defaults(rto: RuntimeOptions) =>
and then overriding the fields of rto (the RuntimeOptions instance) as
needed.
NOTE: Command line arguments still any values set via
@runtime_override_defaults.
The following example overrides the --ponyhelp argument to default it to
true instead of false causing the compiled program to always display
the Pony runtime help:
actor Main
new create(env: Env) =>
env.out.print("Hello, world.")
fun @runtime_override_defaults(rto: RuntimeOptions) =>
rto.ponyhelp = true
struct ref RuntimeOptions
Constructors¶
create¶
[Source]
new iso create()
: RuntimeOptions iso^
Returns¶
RuntimeOptions iso^
Public fields¶
var ponymaxthreads: U32 val¶
[Source]
Use N scheduler threads. Defaults to the number of cores (not hyperthreads)
available.
This can't be larger than the number of cores available.
var ponyminthreads: U32 val¶
[Source]
Minimum number of active scheduler threads allowed.
Defaults to 0, meaning that all scheduler threads are allowed to be
suspended when no work is available.
This can't be larger than --ponymaxthreads if provided, or the physical
cores available.
var ponynoscale: Bool val¶
[Source]
Don't scale down the scheduler threads.
See --ponymaxthreads on how to specify the number of threads explicitly.
Can't be used with --ponyminthreads.
var ponysuspendthreshold: U32 val¶
[Source]
Amount of idle time before a scheduler thread suspends itself to minimize
resource consumption (max 1000 ms, min 1 ms).
Defaults to 1 ms.
var ponycdinterval: U32 val¶
[Source]
Run cycle detection every N ms (max 1000 ms, min 10 ms).
Defaults to 100 ms.
var ponygcinitial: USize val¶
[Source]
Defer garbage collection until an actor is using at least 2^N bytes.
Defaults to 2^14.
var ponygcfactor: F64 val¶
[Source]
After GC, an actor will next be GC'd at a heap memory usage N times its
current value. This is a floating point value. Defaults to 2.0.
var ponynoyield: Bool val¶
[Source]
Do not yield the CPU when no work is available.
var ponynoblock: Bool val¶
[Source]
Do not send block messages to the cycle detector.
var ponypin: Bool val¶
[Source]
Pin scheduler threads to CPU cores. The ASIO thread can also be pinned if
--ponypinasio is set.
var ponypinasio: Bool val¶
[Source]
Pin the ASIO thread to a CPU the way scheduler threads are pinned to CPUs.
Requires --ponypin to be set to have any effect.
var ponyprintstatsinterval: U32 val¶
[Source]
Print actor stats before an actor is destroyed and print scheduler stats
every X seconds. Defaults to -1 (never).
var ponyversion: Bool val¶
[Source]
Print the version of the compiler and exit.
var ponyhelp: Bool val¶
[Source]
Print the runtime usage options and exit.
| pony | 2012304 | https://no.wikipedia.org/wiki/Miami%20Dolphins%20i%20NFL-sesongen%202022 | Miami Dolphins i NFL-sesongen 2022 | Miami Dolphins spilte i lagets 53. sesong i National Football League (NFL), 57. totalt, første under hovedtrener Mike McDaniel og syvende under general manager Chris Grier.
Dolphins nådde sluttspillet for første gang siden 2016 og sikret en tredje vinnende sesong på rad for første gang siden 2001–2003. Dolphins hadde sin beste sesongstart, på 8–3, siden 2001, men tapte deretter fem strake kamper. I sesongfinalen mot New York Jets vant Dolphins, og sikret en tangering av fjorårets sesongresultat samt en plass i sluttspillet. De endte seriespillet med samme sesongresultat som Pittsburgh Steelers, men vant tiebreakeren etter en seier over Steelers i uke 7. Dolphins møtte divisjonsrivalene Buffalo Bill i wildcardrunden, hvor de tapte 34–31.
Draft
Bytter
Personale ved sesongslutt
Spillerstall ved sesongslutt
Sesongoppkjøring
Seriespill
Terminliste
Note: Divisjonslag vises i fet tekst.
Kampreferater
Uke 1: mot New England Patriots
Uke 2: at Baltimore Ravens
Uke 3: mot Buffalo Bills
Uke 4: at Cincinnati Bengals
Uke 5: at New York Jets
Uke 6: mot Minnesota Vikings
Uke 7: mot Pittsburgh Steelers
Uke 8: at Detroit Lions
Uke 9: at Chicago Bears
Uke 10: mot Cleveland Browns
Uke 12: mot Houston Texans
{{Americanfootballbox
|titlestyle=;text-align:center;
|state=autocollapse
|title=Uke 12: Houston Texans at Miami Dolphins – Kampreferat
|date=27. november
|time=13:00 EST
|road=Texans
|R1=0|R2=0|R3=6|R4=9
|home=Dolphins
|H1=10|H2=20|H3=0|H4=0
|stadium=Hard Rock Stadium, Miami Gardens, Florida
|attendance=66 205
|weather= og delvis skyet
|referee=Jerome Boger
|TV=CBS
|TVAnnouncers=Spero Dedes, Jay Feely og Aditi Kinkhabwala
|reference=Oppsummering, Game Book
|scoring=
Første kvarter
MIA – Jason Sanders 45-yard field goal, 10:21. Dolphins 3–0. Drive: 9 plays, 39 yards, 3:01.
MIA – Durham Smythe 4-yard pasning fra Tua Tagovailoa (Jason Sanders spark), 2:57. Dolphins 10–0. Drive: 8 plays, 59 yards, 4:44.
Andre kvarter
MIA – Jeff Wilson 3-yard løp (Jason Sanders spark), 12:22. Dolphins 17–0. Drive: 1 play, 3 yards, 0:05.
MIA – Jason Sanders 23-yard field goal, 6:22. Dolphins 20–0. Drive: 10 plays, 72 yards, 4:32.
MIA – Xavien Howard 16-yard fumble return (Jason Sanders spark), 4:59. Dolphins 27–0.MIA – Jason Sanders 35-yard field goal, 0:00. Dolphins 30–0. Drive: 11 plays, 71 yards, 1:52.Tredje kvarterHOU – Dare Ogunbowale 3-yard løp (mislykket løp), 10:21. Dolphins 30–6. Drive: 6 plays, 64 yards, 3:10.Fjerde kvarterHOU – Jordan Akins 25-yard pasning fra Kyle Allen (mislykket pasning), 12:46. Dolphins 30–12. Drive: 6 plays, 50 yards, 2:25.
HOU – Ka'imi Fairbairn 28-yard field goal, 9:00. Dolphins 30–15. Drive: 8 plays, 57 yards, 2:47.
|stats=Beste passereHOU – Kyle Allen – 26/39, 215 yards, TD, 2 INT
MIA – Tua Tagovailoa – 22/36, 299 yards, TDBeste på løpHOU – Dare Ogunbowale – 4 løp, 14 yards, TD
MIA – Jeff Wilson – 13 løp, 39 yards, TDBeste mottakereHOU – Jordan Akins – 5 mottakelser, 61 yards, TD
MIA – Tyreek Hill – 6 mottakelser, 85 yards
}}
Uke 13: at San Francisco 49ers
Uke 14: at Los Angeles Chargers
Uke 15: at Buffalo Bills
Uke 16: mot Green Bay PackersJulekamp'''
Uke 17: at New England Patriots
Uke 18: mot New York Jets
Tabeller
Divisjon
Conference
Sluttspill
Terminliste
Kampreferater
AFC Wildcardrunden: at (2) Buffalo Bills
Priser og utmerkelser
Referanser
Eksterne lenker
National Football League-sesongen 2022 etter lag
2022
Sport i USA i 2022 | norwegian_bokmål | 1.095974 |
Pony/builtin-AmbientAuth-.txt |
AmbientAuth¶
[Source]
This type represents the root capability. When a Pony program starts, the
Env passed to the Main actor contains an instance of the root capability.
Ambient access to the root capability is denied outside of the builtin
package. Inside the builtin package, only Env creates a Root.
The root capability can be used by any package that wants to establish a
principle of least authority. A typical usage is to have a parameter on a
constructor for some resource that expects a limiting capability specific to
the package, but will also accept the root capability as representing
unlimited access.
primitive val AmbientAuth
Public Functions¶
eq¶
[Source]
fun box eq(
that: AmbientAuth val)
: Bool val
Parameters¶
that: AmbientAuth val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: AmbientAuth val)
: Bool val
Parameters¶
that: AmbientAuth val
Returns¶
Bool val
| pony | 292463 | https://sv.wikipedia.org/wiki/Milj%C3%B6central | Miljöcentral | En miljöcentral var en statlig regionförvaltningsmyndighet i Finland. De ersattes 1 januari 2010 av regionförvaltningsverk och närings-, trafik- och miljöcentraler. Miljöcentraler ledde och skötte miljöfrågorna i regionerna. Miljöcentralerna samarbetade med andra regionala myndigheter och deltog i utvecklingen av regionen.
Ej längre existerande finländska statliga myndigheter
Organisationer upplösta 2009 | swedish | 1.324303 |
Pony/src-files-file_caps-.txt |
file_caps.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69use "collections"
primitive FileCreate
fun value(): U32 => 1 << 0
primitive FileChmod
fun value(): U32 => 1 << 1
primitive FileChown
fun value(): U32 => 1 << 2
primitive FileLink
fun value(): U32 => 1 << 3
primitive FileLookup
fun value(): U32 => 1 << 4
primitive FileMkdir
fun value(): U32 => 1 << 5
primitive FileRead
fun value(): U32 => 1 << 6
primitive FileRemove
fun value(): U32 => 1 << 7
primitive FileRename
fun value(): U32 => 1 << 8
primitive FileSeek
fun value(): U32 => 1 << 9
primitive FileStat
fun value(): U32 => 1 << 10
primitive FileSync
fun value(): U32 => 1 << 11
primitive FileTime
fun value(): U32 => 1 << 12
primitive FileTruncate
fun value(): U32 => 1 << 13
primitive FileWrite
fun value(): U32 => 1 << 14
primitive FileExec
fun value(): U32 => 1 << 15
type FileCaps is Flags[
( FileCreate
| FileChmod
| FileChown
| FileLink
| FileLookup
| FileMkdir
| FileRead
| FileRemove
| FileRename
| FileSeek
| FileStat
| FileSync
| FileTime
| FileTruncate
| FileWrite
| FileExec
),
U32 ]
| pony | 4825324 | https://sv.wikipedia.org/wiki/Truellum%20debile | Truellum debile | Truellum debile är en slideväxtart som först beskrevs av Meissn., och fick sitt nu gällande namn av Sojak. Truellum debile ingår i släktet Truellum och familjen slideväxter. Inga underarter finns listade i Catalogue of Life.
Källor
Slideväxter
debile | swedish | 1.319286 |
Pony/pony_bench-PonyBench-.txt |
PonyBench¶
[Source]
actor tag PonyBench
Constructors¶
create¶
[Source]
new tag create(
env: Env val,
list: BenchmarkList tag)
: PonyBench tag^
Parameters¶
env: Env val
list: BenchmarkList tag
Returns¶
PonyBench tag^
Public Behaviours¶
apply¶
[Source]
be apply(
bench: (MicroBenchmark iso | AsyncMicroBenchmark iso))
Parameters¶
bench: (MicroBenchmark iso | AsyncMicroBenchmark iso)
| pony | 2209966 | https://sv.wikipedia.org/wiki/Pachydelphus%20banco | Pachydelphus banco | Pachydelphus banco är en spindelart som beskrevs av Rudy Jocqué och Robert Bosmans 1983. Pachydelphus banco ingår i släktet Pachydelphus och familjen täckvävarspindlar.
Artens utbredningsområde är Elfenbenskusten. Inga underarter finns listade i Catalogue of Life.
Källor
Täckvävarspindlar
banco | swedish | 1.186439 |
Pony/builtin-ReadSeq-.txt |
ReadSeq[A: A]¶
[Source]
The readable interface of a sequence.
interface box ReadSeq[A: A]
Public Functions¶
size¶
[Source]
Returns the number of elements in the sequence.
fun box size()
: USize val
Returns¶
USize val
apply¶
[Source]
Returns the i-th element of the sequence. Raises an error if the index
is out of bounds. Note that this returns this->A, not A.
fun box apply(
i: USize val)
: this->A ?
Parameters¶
i: USize val
Returns¶
this->A ?
values¶
[Source]
Returns an iterator over the elements of the sequence. Note that this
iterates over this->A, not A.
fun box values()
: Iterator[this->A] ref^
Returns¶
Iterator[this->A] ref^
| pony | 3055692 | https://sv.wikipedia.org/wiki/Auximobasis | Auximobasis | Auximobasis är ett släkte av fjärilar. Auximobasis ingår i familjen förnamalar.
Dottertaxa till Auximobasis, i alfabetisk ordning
Källor
Externa länkar
Förnamalar
Auximobasis | swedish | 1.244989 |
Pony/bureaucracy-Registrar-.txt |
Registrar¶
[Source]
A Registrar keeps a map of lookup string to anything. Generally, this is used
to keep a directory of long-lived service-providing actors that can be
looked up name.
actor tag Registrar
Constructors¶
create¶
[Source]
new tag create()
: Registrar tag^
Returns¶
Registrar tag^
Public Behaviours¶
update¶
[Source]
Add, or change, a lookup mapping.
be update(
key: String val,
value: Any tag)
Parameters¶
key: String val
value: Any tag
remove¶
[Source]
Remove a mapping. This only takes effect if provided key currently maps to
the provided value. If the key maps to some other value (perhaps after
updating), the mapping won't be removed.
be remove(
key: String val,
value: Any tag)
Parameters¶
key: String val
value: Any tag
Public Functions¶
apply[optional A: Any tag]¶
[Source]
Lookup by name. Returns a promise that will be fulfilled with the mapped
value if it exists and is a subtype of A. Otherwise, the promise will be
rejected.
fun tag apply[optional A: Any tag](
key: String val)
: Promise[A] tag
Parameters¶
key: String val
Returns¶
Promise[A] tag
| pony | 1743355 | https://sv.wikipedia.org/wiki/T%C3%A5gsk%C3%A5l | Tågskål | Tågskål (Myriosclerotinia juncifida) är en svampart som först beskrevs av William Nylander och fick sitt nu gällande namn av J.T. Palmer 1969. Tågskål ingår i släktet Myriosclerotinia och familjen Sclerotiniaceae. Arten är reproducerande i Sverige. Inga underarter finns listade i Catalogue of Life.
Källor
Disksvampar | swedish | 1.486403 |
Pony/3_actors.txt | # Actors
An __actor__ is similar to a __class__, but with one critical difference: an actor can have __behaviours__.
## Behaviours
A __behaviour__ is like a __function__, except that functions are _synchronous_ and behaviours are _asynchronous_. In other words, when you call a function, the body of the function is executed immediately, and the result of the call is the result of the body of the function. This is just like method invocation in any other object-oriented language.
But when you call a behaviour, the body is __not__ executed immediately. Instead, the body of the behaviour will execute at some indeterminate time in the future.
A behaviour looks like a function, but instead of being introduced with the keyword `fun`, it is introduced with the keyword `be`.
Like a function, a behaviour can have parameters. Unlike a function, it doesn't have a receiver capability (a behaviour can be called on a receiver of any capability) and you can't specify a return type.
__So what does a behaviour return?__ Behaviours always return `None`, like a function without explicit result type, because they can't return something they calculate (since they haven't run yet).
```pony
actor Aardvark
let name: String
var _hunger_level: U64 = 0
new create(name': String) =>
name = name'
be eat(amount: U64) =>
_hunger_level = _hunger_level - amount.min(_hunger_level)
```
Here we have an `Aardvark` that can eat asynchronously. Clever Aardvark.
## Message Passing
If you are familiar with actor-based languages like Erlang, you are familiar with the concept of "message passing". It's how actors communicate with one another. Behaviours are the Pony equivalent. When you call a behavior on an actor, you are sending it a message.
If you aren't familiar with message passing, don't worry about it. We've got you covered. All will be explained below.
## Concurrent
Since behaviours are asynchronous, it's ok to run the body of a bunch of behaviours at the same time. This is exactly what Pony does. The Pony runtime has its own cooperative scheduler, which by default has a number of threads equal to the number of CPU cores on your machine. Each scheduler thread can be executing an actor behaviour at any given time, so Pony programs are naturally concurrent.
## Sequential
Actors themselves, however, are sequential. That is, each actor will only execute one behaviour at a time. This means all the code in an actor can be written without caring about concurrency: no need for locks or semaphores or anything like that.
When you're writing Pony code, it's nice to think of actors not as a unit of parallelism, but as a unit of sequentiality. That is, an actor should do only what _has_ to be done sequentially. Anything else can be broken out into another actor, making it automatically parallel.
In the example below, the `Main` actor calls a behaviour `call_me_later` which, as we know, is _asynchronous_, so we won't wait for it to run before continuing. Then, we run the method `env.out.print`, which is _also asynchronous_, and will print the provided text to the terminal. Now that we've finished executing code inside the `Main` actor, the behaviour we've called earlier will eventually run, and it will print the last text.
```pony
actor Main
new create(env: Env) =>
call_me_later(env)
env.out.print("This is printed first")
be call_me_later(env: Env) =>
env.out.print("This is printed last")
```
Since all this code runs inside the same actor, and the calls to the other behaviour `env.out.print` are sequential as well, we are guaranteed that `"This is printed first"` is always printed __before__ `"This is printed last"`.
## Why is this safe?
Because of Pony's __capabilities secure type system__. We've mentioned reference capabilities briefly before when talking about function receiver reference capabilities. The short version is that they are annotations on a type that make all this parallelism safe without any runtime overhead.
We will cover reference capabilities in depth later.
## Actors are cheap
If you've done concurrent programming before, you'll know that threads can be expensive. Context switches can cause problems, each thread needs a stack (which can be a lot of memory), and you need lots of locks and other mechanisms to write thread-safe code.
But actors are cheap. Really cheap. The extra cost of an actor, as opposed to an object, is about 256 bytes of memory. Bytes, not kilobytes! And there are no locks and no context switches. An actor that isn't executing consumes no resources other than the few extra bytes of memory.
It's pretty normal to write a Pony program that uses hundreds of thousands of actors.
## Actor finalisers
Like classes, actors can have finalisers. The finaliser definition is the same (`fun _final()`). All guarantees and restrictions for a class finaliser are also valid for an actor finaliser. In addition, an actor will not receive any further message after its finaliser is called.
| pony | 37602 | https://da.wikipedia.org/wiki/Storyboard | Storyboard | Et storyboard er det billedmateriale, som en instruktør og en storyboarder + evt. en kameramand laver sammen, for at have en visuel repræsentation af hvordan den færdige film skal se ud. Storyboardet beskriver hver ny kameraindstilling, og giver et overblik over hvilke vinkler af de givne rum det er nødvendigt at visualisere og hvilke skuespillere det er nødvendigt at have tilstede samtidigt på sættet.
En storyboarder er som regel illustrator, animator eller tegneserietegner.
Af danske storyboardere kan nævnes Jan Solheim, Lars Munck, Simon Bang, Sune Elskær.
Formål
Et grundigt storyboard er et bidrag til en grundig og økonomisk fordelagtig produktionsplanlægning; filmen kan nærmest rå-klippes på forhånd og det bliver mindre nødvendigt at samle op på manglende klip og indstillinger efterfølgende – hvor en genopbygning af scenografien vil være uforholdsmæssig dyr.
Derudover kan storyboardet bruges af instruktøren til at bevare den kunstneriske kontrol. Instruktøren Alfred Hitchcocks film havde som regel et storyboard. Alfred Hitchcock lærte af bitter erfaring kun at optage præcis de scener og klip som skulle med i hans film – kun på den måde kunne han undgå at filmselskabet skamklippede hans film.
En films skudliste kan udarbejdes fra storyboardet.
Form
Storyboardet kan bestå af et billede i den ene side, med det som skal være i den færdige indstilling, og en tekst i den anden side med det der bliver sagt eller tekniske informationer til skuddet + pile i billedet der beskriver evt. bevægelse. En anden form for storyboard består af små (enten tegnede eller beskrevne) papirslapper, som sættes op på opslagstavler, sådan så der nemt kan rokeres rundt og justeres op det.
Til meget dyre produktioner – tegnefilm, actionfilm, eventyrfilm fremstilles derudover også ofte en animatic – som er et filmet storyboard med midlertidig lyd på, evt med animerede sekvenser
Film
Infografik
Filmhold | danish | 1.093919 |
Pony/collections-Sort-.txt |
Sort[A: Seq[B] ref, B: Comparable[B] #read]¶
[Source]
Implementation of dual-pivot quicksort. It operates in-place on the provided Seq, using
a small amount of additional memory. The nature of the element-realation is expressed via
the supplied comparator.
(The following is paraphrased from Wikipedia.)
Quicksort is a common implementation of a sort algorithm which can sort items of any type
for which a "less-than" relation (formally, a total order) is defined.
On average, the algorithm takes O(n log n) comparisons to sort n items. In the worst case,
it makes O(n2) comparisons, though this behavior is rare. Multi-pivot implementations
(of which dual-pivot is one) make efficient use of modern processor caches.
Example program¶
The following takes an reverse-alphabetical array of Strings ("third", "second", "first"),
and sorts it in place alphabetically using the default String Comparator.
It outputs:
first
second
third
use "collections"
actor Main
new create(env:Env) =>
let array = [ "third"; "second"; "first" ]
let sorted_array = Sort[Array[String], String](array)
for e in sorted_array.values() do
env.out.print(e) // prints "first \n second \n third"
end
primitive val Sort[A: Seq[B] ref, B: Comparable[B] #read]
Constructors¶
create¶
[Source]
new val create()
: Sort[A, B] val^
Returns¶
Sort[A, B] val^
Public Functions¶
apply¶
[Source]
Sort the given seq.
fun box apply(
a: A)
: A^
Parameters¶
a: A
Returns¶
A^
eq¶
[Source]
fun box eq(
that: Sort[A, B] val)
: Bool val
Parameters¶
that: Sort[A, B] val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: Sort[A, B] val)
: Bool val
Parameters¶
that: Sort[A, B] val
Returns¶
Bool val
| pony | 835907 | https://sv.wikipedia.org/wiki/Platform%20Invocation%20Services | Platform Invocation Services | Platform Invocation Services, mer känd som P/Invoke, är en funktion i implementationer av Common Language Infrastructure, som till exempel Common Language Runtime, som tillåter hanterad kod att anropa maskinkod i DLL-filer. Maskinkoden refereras av metadata som beskriver funktionen som laddas ifrån DLL-filen.
Användning
När P/Invoke används hanterar exekveringsmotorn (CLR) DLL-filerna och konverterar ohanterade typer till CTS-typer (så kallad parameter marshalling).
Följande sker under denna process:
DLL-filen innehållande funktionen lokaliseras.
Filen laddas in i minnet.
Adressen till funktionen sparas i minnet och argumenten läggs på stacken. Därefter utförs operationerna som vanligt.
P/Invoke är mycket användbart när man vill använda C- och C++-DLL:er kompilerade till maskinkod. Det är också användbart när man vill ha tillgång till Windows API, som helt består av DLL-filer med maskinkod, då det för många av funktionerna i Windows inte finns någon tillgängliga wrappers. Detta resulterar i att man måste skriva en wrapper till till exempel Win32 API.
Exempel
Det första exemplet visar hur du kan få reda vilken version en DLL har:
DllGetVersion funktion vars signatur finns i Windows API:
HRESULT __stdcall DllGetVersion(DLLVERSIONINFO* pdvi)
P/Invoke C#-kod som anropar funktionen DllGetVersion:
[DllImport("shell32.dll")]
static extern int DllGetVersion(ref DLLVERSIONINFO pdvi);
Nästa exempel visar hur man extraherar en ikonfil.
Signaturen för funktionen ExtractIcon :
HICON __stdcall ExtractIcon(HINSTANCE hInst,LPCTSTR lpszExeFileName,UINT nIconIndex);
P/Invoke C#-kod som anropar funktionen ExtractIcon:
[DllImport("shell32.dll")]
static extern IntPtr ExtractIcon(
IntPtr hInst,
[MarshalAs(UnmanagedType.LPStr)] string lpszExeFileName,
uint nIconIndex);
Nästa exempel visar hur man skriver kod som delar ett Event mellan två program på Windows-plattformen:
Signaturen för funktionen CreateEvent:
HANDLE __stdcall CreateEvent(
LPSECURITY_ATTRIBUTES lpEventAttributes,
BOOL bManualReset,
BOOL bInitialState,
LPCTSTR lpName
);
P/Invoke C#-kod som anropar funktionen CreateEvent:
[DllImport("kernel32.dll", SetLastError=true)]
static extern IntPtr CreateEvent(
IntPtr lpEventAttributes,
bool bManualReset,
bool bInitialState,
[MarshalAs(UnmanagedType.LPStr)] string lpName);
Källor
Översättning av artikel på engelskspråkiga Wikipedia
Externa länkar
Platform Invocation Services
tutorial on P/Invoke
a site devoted to P/Invoke
J/Invoke Java access to Win32 API or Linux/Mac OS X shared libraries, similar to P/Invoke
.NET Framework | swedish | 0.79192 |
Pony/arrow-types.txt | # Arrow Types aka Viewpoints
When we talked about __reference capability composition__ and __viewpoint adaptation__, we dealt with cases where we know the reference capability of the origin. However, sometimes we don't know the precise reference capability of the origin.
When that happens, we can write a __viewpoint adapted type__, which we call an __arrow type__ because we write it with an `->`.
## Using `this->` as a viewpoint
A function with a `box` receiver can be called with a `ref` receiver or a `val` receiver as well since those are both subtypes of `box`. Sometimes, we want to be able to talk about a type to take this into account. For example:
```pony
class Wombat
var _friend: Wombat
fun friend(): this->Wombat => _friend
```
Here, we have a `Wombat`, and every `Wombat` has a friend that's also a `Wombat` (lucky `Wombat`). In fact, it's a `Wombat ref`, since `ref` is the default reference capability for a `Wombat` (since we didn't specify one). We also have a function that returns that friend. It's got a `box` receiver (because `box` is the default receiver reference capability for a function if we don't specify it).
So the return type would normally be a `Wombat box`. Why's that? Because, as we saw earlier, when we read a `ref` field from a `box` origin, we get a `box`. In this case, the origin is the receiver, which is a `box`.
But wait! What if we want a function that can return a `Wombat ref` when the receiver is a `ref`, a `Wombat val` when the receiver is a `val`, and a `Wombat box` when the receiver is a `box`? We don't want to have to write the function three times.
We use `this->`! In this case, `this->Wombat`. It means "a `Wombat ref` as seen by the receiver".
We know at the _call site_ what the real reference capability of the receiver is. So when the function is called, the compiler knows everything it needs to know to get this right.
## Using a type parameter as a viewpoint
We haven't covered generics yet, so this may seem a little weird. We'll cover this again when we talk about generics (i.e. parameterised types), but we're mentioning it here for completeness.
Another time we don't know the precise reference capability of something is if we are using a type parameter. Here's an example from the standard library:
```pony
class ListValues[A, N: ListNode[A] box] is Iterator[N->A]
```
Here, we have a `ListValues` type that has two type parameters, `A` and `N`. In addition, `N` has a constraint: it has to be a subtype of `ListNode[A] box`. That's all fine and well, but we also say the `ListValues[A, N]` provides `Iterator[N->A]`. That's the interesting bit: we provide an interface that let's us iterate over values of the type `N->A`.
That means we'll be returning objects of the type `A`, but the reference capability will be the same as an object of type `N` would see an object of type `A`.
## Using `box->` as a viewpoint
There's one more way we use arrow types, and it's also related to generics. Sometimes we want to talk about a type parameter as it is seen by some unknown type, _as long as that type can read the type parameter_.
In other words, the unknown type will be a subtype of `box`, but that's all we know. Here's an example from the standard library:
```pony
interface Comparable[A: Comparable[A] box]
fun eq(that: box->A): Bool => this is that
fun ne(that: box->A): Bool => not eq(that)
```
Here, we say that something is `Comparable[A]` if and only if it has functions `eq` and `ne` and those functions have a single parameter of type `box->A` and return a `Bool`. In other words, whatever `A` is bound to, we only need to be able to read it.
| pony | 1058243 | https://da.wikipedia.org/wiki/Rust%20%28programmeringssprog%29 | Rust (programmeringssprog) | Rust er et multi-paradigme programmeringssprog skabt af Graydon Hoare, der er omhyggeligt designet til at levere høj ydeevne og it-sikkerhed.
Sproget er særligt kendt for sin evne til at håndtere samtidighed på en sikker måde, hvilket minimerer risikoen for kørselsfejl. Rust svarer syntaktisk til C og C++, men kan garantere hukommelsessikkerhed ved at bruge en lånekontrol til at validere referencer. Man kan dog komme uden om dette ved f.eks. at bruge et såkaldt 'unsafe' keyword, hvilket giver mere fleksibilitet, men også øger programmørens ansvar for korrekt hukommelsesstyring, da det tillader kode, der potentielt kan bryde hukommelsessikkerheden .
Historie
I 2006 besluttede Graydon Hoare, en 29-årig computerprogrammør, der arbejdede for Mozilla, at designe et nyt programmeringssprog. Han blev inspireret af en frustrerende oplevelse med en elevator, der konstant gik i stykker på grund af softwarefejl. Hoare vidste, at mange af disse fejl skyldtes problemer med, hvordan et program bruger hukommelse. Han besluttede sig derfor at skabe et sprog, der kunne skrive hurtig kode uden hukommelsesbugs. Rust har fået sit navn efter en gruppe af bemærkelsesværdigt hårdføre svampe, Rustsvampe, som ifølge Hoare er "over-engineered for survival" .
Over et halvandet årti senere er Rust blevet et af de mest populære programmeringssprog.
Rust blev officielt sponsoreret af Mozilla i 2009. Sproget ville være open source, og kun de mennesker, der bidrog til dets udvikling, ville have ansvar for det. Mozilla var dog parat til at kickstarte det ved at finansiere projektet . I løbet af de følgende 10 år hyrede Mozilla mere end et dusin ingeniører til at arbejde fuldtid på Rust .
I 2015 blev den første stabile version af Rust udgivet, og det blev hurtigt populært blandt store virksomheder. I 2020 afslørede Dropbox en ny version af deres "sync engine", altså dét som synkroniserer filer i skyen, der var omskrevet til Rust . I samme år omskrev Discord deres "Read States" service, en kritisk service der holder styr på, hvilke kanaler og beskeder brugere har læst, til Rust, hvilket resulterede i en markant forbedring og derved gjorde systemet 10 gange hurtigere . Amazon Web Services, som leverer cloud computing-platforme og API'er efter behov, har også fundet, at Rust kan hjælpe dem med at skrive sikrere, hurtigere kode .
I Stack Overflows udviklerundersøgelse fra 2023, som de afholder hvert år, er Rust blevet kåret som det mest beundrede programmeringssprog, hvor over 80% af de udviklere, der har anvendt sproget, har udtrykt et ønske om at fortsætte med det i det kommende år . Dette står i skarp kontrast til det mindst attraktive sprog, MATLAB, hvor under 20% af de udviklere, der har brugt det, ønsker at fortsætte med det i det følgende år . Faktisk har Rust de sidste 7 år blevet kåret til at være det mest beundrede programmeringssprog ifølge samme undersøgelse .
Sikkerhedsforanstaltninger
I Rust beregner compileren, hvornår en variabel ikke længere er tilgængelig, og når det sker, indsætter compileren kode til frigivelse af variablens hukommelse. Variabler er som udgangspunkt uforanderlige (immutable), hvilket betyder, at deres værdi ikke kan ændres, når de først er blevet tildelt. Hvis en variabel skal kunne ændres, kan den defineres som foranderlig (mutable) ved at bruge 'mut' nøgleordet foran variabelnavnet.
Når en funktion modtager en variabel som parameter, overtager den som udgangspunkt ejerskabet, medmindre parameteren er en reference. Ved at definere parameteren som en reference, 'låner' funktionen variablen uden at overtage ejerskabet.
En reference giver som udgangspunkt kun læseadgang, men det er muligt at definere foranderlige (mutable) referencer, der tillader opdatering. Rust tillader kun én foranderlig reference til en bestemt data i en bestemt rækkevidde, hvilket hjælper med at forhindre 'data race' betingelser. En 'data race' opstår, når to eller flere tråde i en multithreaded applikation samtidigt forsøger at læse fra og skrive til den samme hukommelsesplads uden passende synkronisering. Desuden tillader Rust flere uforanderlige (immutable) referencer, men ikke en mutable reference samtidig med nogen immutable referencer. Dette er også en del af Rusts regler for "aliasing" og "mutability", som sikrer mod fejl, hvor data ændres eller slettes under læsning.
Programstruktur
Rust-programmer er typisk struktureret i mange funktioner, der kalder hinanden. Dette hjælper med at holde kode organiseret og genanvendelig.
Rust understøtter også moduler, som er en måde at gruppere relaterede definitioner, såsom funktioner, strukturer (datastrukturer, der kan indeholde forskellige typer data) og træk (en måde at definere fælles adfærd på), sammen. Som standard er alle definitioner i et modul private, hvilket betyder, at de kun kan tilgås inden for det modul, de er defineret i. Hvis en definition skal være tilgængelig uden for det modul, det er defineret i, kan det gøres offentligt ved hjælp af nøgleordet 'pub'.
I større Rust-programmer kan moduler være indlejret i hinanden for at skabe en hierarkisk struktur. Dette kan hjælpe med at organisere kode i logiske grupper. Desuden kan moduler flyttes ud i deres egne filer for at gøre koden mere overskuelig og nemmere at vedligeholde.
Her er et eksempel på, hvordan moduler kan bruges i Rust:
// Definerer et modul med navnet 'greetings'
mod greetings {
// Gør 'hello' funktionen offentlig med 'pub' nøgleordet
pub fn hello() {
println!("Hello, world!");
}
// 'goodbye' funktionen er privat og kan kun tilgås inden for 'greetings' modulet
fn goodbye() {
println!("Goodbye, world!");
}
}
// Hovedfunktionen
fn main() {
// Kalder den offentlige 'hello' funktion fra 'greetings' modulet
greetings::hello();
}
I dette eksempel er 'hello'-funktionen defineret i 'greetings'-modulet og gjort offentlig, så den kan kaldes fra 'main'-funktionen. Derimod er 'goodbye'-funktionen privat og kan kun kaldes inden for 'greetings'-modulet.
Eksempel
Her er et simpelt eksempel på et CLI script skrevet i Rust, hvor der genereres et tilfældigt tal ved hjælp af rand-programbiblioteket.
// Her importeres 'rand' biblioteket, som muliggør generering af tilfældige tal.
use rand::Rng;
// Hovedfunktionen, hvor programmet starter.
fn main() {
// Kalder 'generate_random_number' funktionen og gemmer resultatet i et uforanderligt variabel.
let random_number = generate_random_number();
// Her skrives en linje til konsollen.
println!("Det tilfældige tal er: {}", random_number);
}
// Funktion der genererer et tilfældigt tal mellem 1 og 10.
fn generate_random_number() -> i32 {
// Opretter en ny tilfældig nummergenerator.
let mut rng = rand::thread_rng();
// Genererer et tilfældigt tal mellem 1 og 10
// Der skrives ikke '1..10', men i stedet '1..11', fordi den øvre grænse, 11, ikke er inkluderet
let random_number = rng.gen_range(1..11);
// Returnerer det tilfældige tal.
return random_number;
}
Se også
Redox (styresystem) - skrevet i Rust
Referencer
Links
https://rust-lang.org - Rusts officielle hjemmeside
https://doc.rust-lang.org/stable/book/ - En guide til Rust
Programmeringssprog | danish | 0.684868 |
Pony/8_sugar.txt | # Sugar
Pony allows you to omit certain small details from your code and will put them back in for you. This is done to help make your code less cluttered and more readable. Using sugar is entirely optional, you can always write out the full version if you prefer.
## Apply
Many Pony classes have a function called `apply` which performs whatever action is most common for that type. Pony allows you to omit the word `apply` and just attempt to do a call directly on the object. So:
```pony
var foo = Foo.create()
foo()
```
becomes:
```pony
var foo = Foo.create()
foo.apply()
```
Any required arguments can be added just like normal method calls.
```pony
var foo = Foo.create()
foo(x, 37 where crash = false)
```
becomes:
```pony
var foo = Foo.create()
foo.apply(x, 37 where crash = false)
```
__Do I still need to provide the arguments to apply?__ Yes, only the `apply` will be added for you, the correct number and type of arguments must be supplied. Default and named arguments can be used as normal.
__How do I call a function foo if apply is added?__ The `apply` sugar is only added when calling an object, not when calling a method. The compiler can tell the difference and only adds the `apply` when appropriate.
## Create
To create an object you need to specify the type and call a constructor. Pony allows you to miss out the constructor and will insert a call to `create()` for you. So:
```pony
var foo = Foo
```
becomes:
```pony
var foo = Foo.create()
```
Normally types are not valid things to appear in expressions, so omitting the constructor call is not ambiguous. Remember that you can easily spot that a name is a type because it will start with a capital letter.
If arguments are needed for `create` these can be provided as if calling the type. Default and named arguments can be used as normal.
```pony
var foo = Foo(x, 37 where crash = false)
```
becomes:
```pony
var foo = Foo.create(x, 37 where crash = false)
```
__What if I want to use a constructor that isn't named create?__ Then the sugar can't help you and you have to write it out yourself.
__If the create I want to call takes no arguments can I still put in the parentheses?__ No. Calls of the form `Type()` use the combined create-apply sugar (see below). To get `Type.create()` just use `Type`.
## Combined create-apply
If a type has a create constructor that takes no arguments then the create and apply sugar can be used together. Just call on the type and calls to create and apply will be added. The call to create will take no arguments and the call to apply will take whatever arguments are supplied.
```pony
var foo = Foo()
var bar = Bar(x, 37 where crash = false)
```
becomes:
```pony
var foo = Foo.create().apply()
var bar = Bar.create().apply(x, 37 where crash = false)
```
__What if the create has default arguments? Do I get the combined create-apply sugar if I want to use the defaults?__ The combined create-apply sugar can only be used when the `create` constructor has no arguments. If there are default arguments then this sugar cannot be used.
## Update
The `update` sugar allows any class to use an assignment to accept data. Many languages allow this for assigning into collections, for example, a simple C array, `a[3] = x;`.
In any assignment where the left-hand side is a function call, Pony will translate this to a call to update, with the value from the right-hand side as an extra argument. So:
```pony
foo(37) = x
```
becomes:
```pony
foo.update(37 where value = x)
```
The value from the right-hand side of the assignment is always passed to a parameter named `value`. Any object can allow this syntax simply by providing an appropriate function `update` with an argument `value`.
__Does my update function have to have a single parameter that takes an integer?__ No, you can define update to take whatever parameters you like, as long as there is one called `value`. The following are all fine:
```pony
foo1(2, 3) = x
foo2() = x
foo3(37, "Hello", 3.5 where a = 2, b = 3) = x
```
__Does it matter where `value` appears in my parameter list?__ Whilst it doesn't strictly matter it is good practice to put `value` as the last parameter. That way all of the others can be specified by position.
| pony | 1711489 | https://no.wikipedia.org/wiki/Vitenskaps%C3%A5ret%20930 | Vitenskapsåret 930 | Vitenskapsåret 930 er en oversikt over hendelser, prisvinnere, fødte og avdøde personer med tilknytning til vitenskap i 930.
Hendelser
Fødsler
Dødsfall
ca. 930 – Sridhara, indisk matematiker og lærd innen sanskrit og filosofi (født ca. 870)
Referanser | norwegian_bokmål | 1.620662 |
Pony/builtin-ByteSeq-.txt |
ByteSeq¶
[Source]
type ByteSeq is
(String val | Array[U8 val] val)
Type Alias For¶
(String val | Array[U8 val] val)
| pony | 8695034 | https://sv.wikipedia.org/wiki/Ruvuv%C3%A4vare | Ruvuvävare | Ruvuvävare (Ploceus holoxanthus) är en fågel i familjen vävare inom ordningen tättingar.
Utbredning och systematik
Fågeln förekommer i östra Tanzania. Den behandlades tidigare som en del av brunstrupig vävare, men urskiljs sedan 2022 som egen art a. Den behandlas som monotypisk, det vill säga att den inte delas in i några underarter.
Status
IUCN erkänner den ännu inte som art, varför dess hotstatus inte bedömts.
Noter
Externa länkar
Vävare
Fåglar i etiopiska regionen | swedish | 1.167802 |
Pony/pony_check-Property2UnitTest-.txt |
Property2UnitTest[T1: T1, T2: T2]¶
[Source]
class iso Property2UnitTest[T1: T1, T2: T2] is
UnitTest ref
Implements¶
UnitTest ref
Constructors¶
create¶
[Source]
new iso create(
p2: Property2[T1, T2] iso,
name': (String val | None val) = reference)
: Property2UnitTest[T1, T2] iso^
Parameters¶
p2: Property2[T1, T2] iso
name': (String val | None val) = reference
Returns¶
Property2UnitTest[T1, T2] iso^
Public Functions¶
name¶
[Source]
fun box name()
: String val
Returns¶
String val
apply¶
[Source]
fun ref apply(
h: TestHelper val)
: None val ?
Parameters¶
h: TestHelper val
Returns¶
None val ?
exclusion_group¶
fun box exclusion_group()
: String val
Returns¶
String val
timed_out¶
fun ref timed_out(
h: TestHelper val)
: None val
Parameters¶
h: TestHelper val
Returns¶
None val
set_up¶
fun ref set_up(
h: TestHelper val)
: None val ?
Parameters¶
h: TestHelper val
Returns¶
None val ?
tear_down¶
fun ref tear_down(
h: TestHelper val)
: None val
Parameters¶
h: TestHelper val
Returns¶
None val
label¶
fun box label()
: String val
Returns¶
String val
| pony | 399986 | https://nn.wikipedia.org/wiki/Transklusjon | Transklusjon | Transklusjon er eit fenomen innanfor informatikk som skildrar inklusjon av ein del av eit dokument i eit anna dokument gjennom referanse. Omgrepet vart oppfunne av Ted Nelson, som òg er opphavsmannen til omgrepa hypertekst og hypermedia. Nokre hypertekst-system, inkludert Ted Nelson sitt Xanadu-prosjekt, støttar transklusjon. Ein artikkel om eit land kan til dømes inkludere ein tabell eller eit avsnitt som skildrer jordbrukseksporten i landet frå ein annan artikkel som handlar om jordbruk. Framfor å måtta kopiera den inkluderte informasjonen og lagra han på to stader, innarbeider transklusjon modulær design ved å tillate lagring berre ein gong (og, dersom lenketypen stør dette, korrigering og oppdatering) og framvising i ulike samanhengar. Referansen tener òg som lenke mellom begge artiklar.
I Ted Nelson sitt opphavlege framlegg til hypertekst, som han skildra i boka si Literary Machines frå 1982, kan mikrobetalingar automatisk innkrevast frå lesaren for all tekst, uansett kor mange delar av innhald som blir henta frå ulike stader.
Nelson har nyleg vist web-transklusjon gjennom programmet the Little Transquoter (programmert etter Nelson sin spesifikasjon av Andrew Pam). Det skaper eit nytt format som er bygd på porsjonsadresser frå nettstader. Dette verkar slik at når referansen opphøyrer, vil kvar porsjon på resultatsida bli verande klikk-bunden til den opphavlege samanhengen sin. Dette var alltid eit nøkkelaspekt for Nelson, men mangla i dei fleste gjennomføringane av transklusjon.
Sjølvavgrensing
Transklusjon verkar betre når transkluderte tekstelement er sjølvavgrensande, på den måten at dei kan stå åleine, uavhengig av samanhengen. Til dømes vil ordleggingar som «slik ein såg i den førre seksjonen» vere problematiske fordi den transkluderte seksjonen kan verke i ein annan samanheng, og slik skape forvirring.
Bruk i HTML og på verdsveven
HTML av i dag har ei avgrensa form for transklusjon. Ei side kan transkludere eit bilde, men òg eit anna dokument ved å inkludere rammer i dokumentet (kalla «iframe») – sjå direktelenking. Nettlesaren hentar inn rammeinnhaldet og syner det på sida. Nettstaden Weather.com har brukt denne teknikken sidan 2002 til å produsere vêrmeldingssidene sine frå fleire mindre dokument.
Framtidige versjonar av HTML vil ha høve til å stø djupare transklusjon av delar av dokument med bruk av XML-teknologiar, til dømes XPaths dokumentreferering og XSLT-manipulasjonar. Sjå òg rammer på nettsider.
Praksisen med «fjernlading», inkludert data frå andre nettstader, slik som lenker til bilete etc., blir vanlegvis ikkje likt på grunn av bruken av bandbreidde (til og med kalla «tjuveri av bandbreidd») og datakraft, som trengst frå det fjerne datasystemet. Ein seier at dette er å belasta ein annan nettverkstenar og blir ofte sett på som eit døme på «leeching».
Nettannonsering der annonsar, som er leverte av ein annonsør, blir publiserte saman med anna innhald av ein utgjevar, er eit vesentleg unntak frå denne regelen. Ein annonsør føretrekk å levere ein annonse for å kunna registrere når han vart lesen i staden for å la han blir levert av utgjevaren og vere nøydd til å stola på utgjevaren. (Sjå òg webcounter, web-bug).
Mashup er ein mekanisme av nyare dato som i funksjon liknar transklusjon.
Kjelder
Denne artikkelen bygger på «Transklusjon» frå , den 20. juli 2022.
Bakgrunnsstoff
Di Iorio, A. og Vitali, F., A Xanalogical Collaborative Editing Environment, Proceedings of the Second International Workshop of Web Document Analysis (WDA2003), 2003, Edinburgh, Storbritannia, august 2003. (pdf)
Kolbitsch, J. og Maurer, H., Transclusions in an HTML-Based Environment, Journal of Computing and Information Technology, Bind 14, nr. 2, juni 2006, ss. 161-174.
Kolbitsch, J., Fine-Grained Transclusions of Multimedia Documents in HTML, Journal of Universal Computer Science, Bind 11, nr. 6, juni 2005.
Krottmaier, H., Transcluded Documents: Advantages of Reusing Document Fragments, Proceedings of the 6th International ICCC/IFIP Conference on Electronic Publishing (ELPUB2002), 2002, Karlovy Vary, Tsjekkia, ss. 359–367. (pdf)
Krottmaier, H. og Helic, D., Issues of Transclusions, Proceedings of the World Conference on E-Learning in Corporate, Government, Healthcare, & Higher Education (E-Learn 2002), 2002, Montreal, Canada, ss. 1730–1733. 20. juni 2015 hos . (pdf)
Krottmaier, H. og Maurar, H., Transclusions in the 21st Century, Journal of Universal Computer Science, Bind 7, nr. 12 (juli 2001), ss. 1125–1136.
Moore, A. og andre, Personally tailored teaching in WHURLE using conditional translucion, Proceedings of the Twelfth ACM Conference on Hypertext and Hypermedia, 2001, Århus, Danmark, ss. 163–164.
Nelson, T. H., Literary Machines', Mindful Press, 1981.
Nelson, T. H., The Heart of Connection: Hypermedia Unified by Transclusion, Communications of the ACM, nr. 8, 1995, ss. 31–33.
Nelson, T. H., Generalized Links, Micropayment and Transcopyright, 1996. [død lenke]
Nelson, T. H., Transcopyright: Pre-Permission for Virtual Republishing, 1998.
Nelson, T. H., Xanalogical Structure, Needed Now More than Ever: Parallel Documents, Deep Links to Content, Deep Versioning and Deep Re-Use, ACM Computing Surveys, nr. 4es, 1999.
Pam, A., Fine-Grained Transclusion in the Hypertext Markup Language, Internet Draft, 1997.
Wilde, E. og Lowe, D., XML Linking Language. I: Wilde, E. og Lowe, D., XPath, XLink, XPointer, and XML: A Practical Guide to Web Hyperlinking and Transclusion, 2002, ss. 169-198, Addison-Wesley Professional. (pdf)
PurpleWiki er ei UseModWiki-avleiing som implementerer TransClusion ved bruk av Purple Numbers.
Linux-HA-prosjektet nyttar wiki-transklusjon for å lage den offentlege nettstaden sin.
Verdsveven
Dokument | norwegian_nynorsk | 0.995281 |
Pony/src-time-timer-.txt |
timer.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126use "collections"
class Timer
"""
The `Timer` class represents a timer that fires after an expiration
time, and then fires at an interval. When a `Timer` fires, it calls
the `apply` method of the `TimerNotify` object that was passed to it
when it was created.
The following example waits 5 seconds and then fires every 2
seconds, and when it fires the `TimerNotify` object prints how many
times it has been called:
```pony
use "time"
actor Main
new create(env: Env) =>
let timers = Timers
let timer = Timer(Notify(env), 5_000_000_000, 2_000_000_000)
timers(consume timer)
class Notify is TimerNotify
let _env: Env
var _counter: U32 = 0
new iso create(env: Env) =>
_env = env
fun ref apply(timer: Timer, count: U64): Bool =>
_env.out.print(_counter.string())
_counter = _counter + 1
true
```
"""
var _expiration: U64
var _interval: U64
let _notify: TimerNotify
embed _node: ListNode[Timer]
new iso create(
notify: TimerNotify iso,
expiration: U64,
interval: U64 = 0)
=>
"""
Create a new timer. The expiration time should be a nanosecond count
until the first expiration. The interval should also be in nanoseconds.
"""
_expiration = expiration + Time.nanos()
_interval = interval
_notify = consume notify
_node = ListNode[Timer]
try _node()? = this end
new abs(notify: TimerNotify, expiration: (I64, I64), interval: U64 = 0) =>
"""
Creates a new timer with an absolute expiration time rather than a relative
time. The expiration time is wall-clock adjusted system time.
"""
_expiration = _abs_expiration_time(expiration)
_interval = interval
_notify = notify
_node = ListNode[Timer]
try _node()? = this end
fun ref _cancel() =>
"""
Remove the timer from any list.
"""
_node.remove()
_notify.cancel(this)
fun ref _get_node(): ListNode[Timer] =>
"""
Returns the list node pointing to the timer. Used to schedule the timer in
a queue.
"""
_node
fun ref _slop(bits: USize) =>
"""
Apply slop bits to the expiration time and interval. This reduces the
precision by the given number of bits, effectively quantizing time.
"""
_expiration = _expiration >> bits.u64()
if _interval > 0 then
_interval = (_interval >> bits.u64()).max(1)
end
fun ref _fire(current: U64): Bool =>
"""
A timer is fired if its expiration time is in the past. The notifier is
called with a count based on the elapsed time since expiration and the
timer interval. The expiration time is set to the next expiration. Returns
true if the timer should be rescheduled, false otherwise.
"""
let elapsed = current - _expiration
if elapsed < (1 << 63) then
let count = (elapsed / _interval) + 1
_expiration = _expiration + (count * _interval)
if not _notify(this, count) then
_notify.cancel(this)
return false
end
end
(_interval > 0) or ((_expiration - current) < (1 << 63))
fun _next(): U64 =>
"""
Returns the next expiration time.
"""
_expiration
fun tag _abs_expiration_time(wall: (I64, I64)): U64 =>
"""
Converts a wall-clock adjusted system time to absolute expiration time
"""
let wall_now = Time.now()
Time.nanos()
+ (((wall._1 * 1000000000) + wall._2)
- ((wall_now._1 * 1000000000) + wall_now._2)).u64()
| pony | 25887 | https://da.wikipedia.org/wiki/Time | Time | Time er en enhed for tid på 3600 sekunder eller 3,6 kilosekunder.
Den internationale forkortelse for time er "h" (for latin hora). Ifølge Retskrivningsordbogen kan også "t." bruges som forkortelse for time, men hvis man gør det, er der fare for forveksling med "t" uden punktum som er den autoriserede forkortelse for ton.
Et døgn består af 24 timer.
En time består af 4 kvarter eller 60 minutter.
Oprindeligt blev dagen inddelt i 12 timer fra solopgang til solnedgang, hvilket gjorde at en time var længere om sommeren end om vinteren.
Et klokkeslæt angives ofte enten som antal timer og minutter (14:35) eller timer, minutter og sekunder (14:35:20).
Tidsenheder | danish | 0.635954 |
Pony/capsicum-Cap-.txt |
Cap¶
[Source]
The Capsicum rights.
primitive val Cap
Constructors¶
create¶
[Source]
new val create()
: Cap val^
Returns¶
Cap val^
Public Functions¶
enter¶
[Source]
This places the current process into capability mode, a mode of execution
in which processes may only issue system calls operating on file
descriptors or reading limited global system state. Access to global name
spaces, such as file system or IPC name spaces, is prevented.
fun box enter()
: Bool val
Returns¶
Bool val
read¶
[Source]
fun box read()
: U64 val
Returns¶
U64 val
write¶
[Source]
fun box write()
: U64 val
Returns¶
U64 val
seek_tell¶
[Source]
fun box seek_tell()
: U64 val
Returns¶
U64 val
seek¶
[Source]
fun box seek()
: U64 val
Returns¶
U64 val
pread¶
[Source]
fun box pread()
: U64 val
Returns¶
U64 val
pwrite¶
[Source]
fun box pwrite()
: U64 val
Returns¶
U64 val
mmap¶
[Source]
fun box mmap()
: U64 val
Returns¶
U64 val
mmap_r¶
[Source]
fun box mmap_r()
: U64 val
Returns¶
U64 val
mmap_w¶
[Source]
fun box mmap_w()
: U64 val
Returns¶
U64 val
mmap_x¶
[Source]
fun box mmap_x()
: U64 val
Returns¶
U64 val
mmap_rw¶
[Source]
fun box mmap_rw()
: U64 val
Returns¶
U64 val
mmap_rx¶
[Source]
fun box mmap_rx()
: U64 val
Returns¶
U64 val
mmap_wx¶
[Source]
fun box mmap_wx()
: U64 val
Returns¶
U64 val
mmap_rwx¶
[Source]
fun box mmap_rwx()
: U64 val
Returns¶
U64 val
creat¶
[Source]
fun box creat()
: U64 val
Returns¶
U64 val
fexecve¶
[Source]
fun box fexecve()
: U64 val
Returns¶
U64 val
fsync¶
[Source]
fun box fsync()
: U64 val
Returns¶
U64 val
ftruncate¶
[Source]
fun box ftruncate()
: U64 val
Returns¶
U64 val
lookup¶
[Source]
fun box lookup()
: U64 val
Returns¶
U64 val
fchdir¶
[Source]
fun box fchdir()
: U64 val
Returns¶
U64 val
fchflags¶
[Source]
fun box fchflags()
: U64 val
Returns¶
U64 val
chflagsat¶
[Source]
fun box chflagsat()
: U64 val
Returns¶
U64 val
fchmod¶
[Source]
fun box fchmod()
: U64 val
Returns¶
U64 val
fchmodat¶
[Source]
fun box fchmodat()
: U64 val
Returns¶
U64 val
fchown¶
[Source]
fun box fchown()
: U64 val
Returns¶
U64 val
fchownat¶
[Source]
fun box fchownat()
: U64 val
Returns¶
U64 val
fcntl¶
[Source]
fun box fcntl()
: U64 val
Returns¶
U64 val
flock¶
[Source]
fun box flock()
: U64 val
Returns¶
U64 val
fpathconf¶
[Source]
fun box fpathconf()
: U64 val
Returns¶
U64 val
fsck¶
[Source]
fun box fsck()
: U64 val
Returns¶
U64 val
fstat¶
[Source]
fun box fstat()
: U64 val
Returns¶
U64 val
fstatat¶
[Source]
fun box fstatat()
: U64 val
Returns¶
U64 val
fstatfs¶
[Source]
fun box fstatfs()
: U64 val
Returns¶
U64 val
futimes¶
[Source]
fun box futimes()
: U64 val
Returns¶
U64 val
futimesat¶
[Source]
fun box futimesat()
: U64 val
Returns¶
U64 val
linkat¶
[Source]
fun box linkat()
: U64 val
Returns¶
U64 val
mkdirat¶
[Source]
fun box mkdirat()
: U64 val
Returns¶
U64 val
mkfifoat¶
[Source]
fun box mkfifoat()
: U64 val
Returns¶
U64 val
mknodat¶
[Source]
fun box mknodat()
: U64 val
Returns¶
U64 val
renameat¶
[Source]
fun box renameat()
: U64 val
Returns¶
U64 val
symlinkat¶
[Source]
fun box symlinkat()
: U64 val
Returns¶
U64 val
unlinkat¶
[Source]
fun box unlinkat()
: U64 val
Returns¶
U64 val
accept¶
[Source]
fun box accept()
: U64 val
Returns¶
U64 val
bind¶
[Source]
fun box bind()
: U64 val
Returns¶
U64 val
connect¶
[Source]
fun box connect()
: U64 val
Returns¶
U64 val
getpeername¶
[Source]
fun box getpeername()
: U64 val
Returns¶
U64 val
getsockname¶
[Source]
fun box getsockname()
: U64 val
Returns¶
U64 val
getsockopt¶
[Source]
fun box getsockopt()
: U64 val
Returns¶
U64 val
listen¶
[Source]
fun box listen()
: U64 val
Returns¶
U64 val
peeloff¶
[Source]
fun box peeloff()
: U64 val
Returns¶
U64 val
recv¶
[Source]
fun box recv()
: U64 val
Returns¶
U64 val
send¶
[Source]
fun box send()
: U64 val
Returns¶
U64 val
setsockopt¶
[Source]
fun box setsockopt()
: U64 val
Returns¶
U64 val
shutdown¶
[Source]
fun box shutdown()
: U64 val
Returns¶
U64 val
bindat¶
[Source]
fun box bindat()
: U64 val
Returns¶
U64 val
connectat¶
[Source]
fun box connectat()
: U64 val
Returns¶
U64 val
sock_client¶
[Source]
fun box sock_client()
: U64 val
Returns¶
U64 val
sock_server¶
[Source]
fun box sock_server()
: U64 val
Returns¶
U64 val
mac_get¶
[Source]
fun box mac_get()
: U64 val
Returns¶
U64 val
mac_set¶
[Source]
fun box mac_set()
: U64 val
Returns¶
U64 val
sem_getvalue¶
[Source]
fun box sem_getvalue()
: U64 val
Returns¶
U64 val
sem_post¶
[Source]
fun box sem_post()
: U64 val
Returns¶
U64 val
sem_wait¶
[Source]
fun box sem_wait()
: U64 val
Returns¶
U64 val
event¶
[Source]
fun box event()
: U64 val
Returns¶
U64 val
kqueue_event¶
[Source]
fun box kqueue_event()
: U64 val
Returns¶
U64 val
ioctl¶
[Source]
fun box ioctl()
: U64 val
Returns¶
U64 val
ttyhook¶
[Source]
fun box ttyhook()
: U64 val
Returns¶
U64 val
pdgetpid¶
[Source]
fun box pdgetpid()
: U64 val
Returns¶
U64 val
pdwait¶
[Source]
fun box pdwait()
: U64 val
Returns¶
U64 val
pdkill¶
[Source]
fun box pdkill()
: U64 val
Returns¶
U64 val
exattr_delete¶
[Source]
fun box exattr_delete()
: U64 val
Returns¶
U64 val
exattr_get¶
[Source]
fun box exattr_get()
: U64 val
Returns¶
U64 val
exattr_list¶
[Source]
fun box exattr_list()
: U64 val
Returns¶
U64 val
exattr_set¶
[Source]
fun box exattr_set()
: U64 val
Returns¶
U64 val
acl_check¶
[Source]
fun box acl_check()
: U64 val
Returns¶
U64 val
acl_delete¶
[Source]
fun box acl_delete()
: U64 val
Returns¶
U64 val
acl_get¶
[Source]
fun box acl_get()
: U64 val
Returns¶
U64 val
acl_set¶
[Source]
fun box acl_set()
: U64 val
Returns¶
U64 val
kqueue_change¶
[Source]
fun box kqueue_change()
: U64 val
Returns¶
U64 val
kqueue¶
[Source]
fun box kqueue()
: U64 val
Returns¶
U64 val
eq¶
[Source]
fun box eq(
that: Cap val)
: Bool val
Parameters¶
that: Cap val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: Cap val)
: Bool val
Parameters¶
that: Cap val
Returns¶
Bool val
| pony | 1758955 | https://no.wikipedia.org/wiki/Indianapolis%20Colts%20i%20NFL-sesongen%202020 | Indianapolis Colts i NFL-sesongen 2020 | Indianapolis Colts spilte i sin 68. sesong i National Football League og 37. i Indianapolis. Det er også deres tredje sesong under hovedtrener Frank Reich og fjerde under general manager Chris Ballard. Etter å ha signert en 1-årig kontrakt verdt $25 millioner er Philip Rivers laget startende quarterback for første gang.
Colts forbedret på fjorårets sesongresultat på 7–9 med en seier over Houston Texans i uke 13, og nådde sluttspillet som et wildcard med 7. seed i AFC. Colts avsluttet sesongen med samme sesongresultat som Tennessee Titans, 11–5, men tapte tiebreakeren basert på resultat mot felles motstandere (5–1 mot 4–2). I wildcardrunden tapte Colts 27–24 mot Buffalo Bills, den første gangen i Rivers' karriere hvor han tapte i wildcardrunden av sluttspillet.
Etter sesongen annonserte Rivers at han skulle pensjonere seg.
Draft
Personale
Spillerstall ved sesongslutt
Sesongoppkjøring
Colts' terminliste for sesongoppkjøringen ble annonsert 7. mai, men ble senere kansellert av sikkerhetshensyn på grunn av koronaviruspandemien.
Seriespill
Terminliste
{| class="wikitable" style="text-align:center"
|-
!style=""| Uke
!style=""| Dato
!style=""| Motstander
!style=""| Resultat
!style=""| Stilling
!style=""| Stadion
!style=""| OppsummeringNFL.com
|-style="background:#fcc"
! 1
| 13. september
| at Jacksonville Jaguars
| T 20–27
| 0–1
| TIAA Bank Field
| Oppsummering
|-style="background:#cfc"
! 2
| 20. september
| Minnesota Vikings
| S 28–11
| 1–1
| Lucas Oil Stadium
| Oppsummering
|-style="background:#cfc"
! 3
| 27. september
| New York Jets
| S 36–7
| 2–1
| Lucas Oil Stadium
| Oppsummering
|-style="background:#cfc"
! 4
| 4. oktober
| at Chicago Bears
| S 19–11
| 3–1
| Soldier Field
| Oppsummering
|-style="background:#fcc"
! 5
| 11. oktober
| at Cleveland Browns
| T 23–32
| 3–2
| FirstEnergy Stadium
| Oppsummering
|-style="background:#cfc"
! 6
| 18. oktober
| Cincinnati Bengals
| S 31–27
| 4–2
| Lucas Oil Stadium
| Oppsummering
|-
! 7
| colspan="6" | Bye
|-style="background:#cfc"
! 8
| 1. november
| at Detroit Lions
| S 41–21
| 5–2
| Ford Field
| Oppsummering
|-style="background:#fcc"
! 9
| 8. november
| Baltimore Ravens
| T 10–24
| 5–3
| Lucas Oil Stadium
| Oppsummering
|-style="background:#cfc"
! 10
|
| at Tennessee Titans
| S 34–17
| 6–3
| Nissan Stadium
| Oppsummering
|-style="background:#cfc"
! 11
| 22. november
| Green Bay Packers
| S 34–31
| 7–3
| Lucas Oil Stadium
| Oppsummering
|-style="background:#fcc"
! 12
| 29. november
| Tennessee Titans
| T 26–45
| 7–4
| Lucas Oil Stadium
| Oppsummering
|-style="background:#cfc"
! 13
| 6. desember
| at Houston Texans
| S 26–20
| 8–4
| NRG Stadium
| Oppsummering
|-style="background:#cfc"
! 14
| 13. desember
| at Las Vegas Raiders| S 44–27
| 9–4
| Allegiant Stadium
| Oppsummering
|-style="background:#cfc"
! 15
| 20. desember
| Houston Texans| S 27–20
| 10–5
| Lucas Oil Stadium
| Oppsummering
|-style="background:#fcc"
! 16
| 27. desember
| at Pittsburgh Steelers
| T 24–28
| 10–6
| Heinz Field
| Oppsummering
|-style="background:#cfc"
! 17
| 3. januar
| Jacksonville Jaguars| S 28–14
| 11–5
| Lucas Oil Stadium
| Oppsummering
|}Merknader Divisjonsmotstandere er i fet''' tekst.
Kampreferater
Uke 1: at Jacksonville Jaguars
Uke 2: mot Minnesota Vikings
Uke 3: mot New York Jets
Uke 4: at Chicago Bears
Uke 5: at Cleveland Browns
Uke 6: mot Cincinnati Bengals
Uke 8: at Detroit Lions
Uke 9: mot Baltimore Ravens
Uke 10: at Tennessee Titans
Uke 11: mot Green Bay Packers
Uke 12: mot Tennessee Titans
Uke 13: at Houston Texans
Uke 14: at Las Vegas Raiders
Uke 15: mot Houston Texans
Uke 16: at Pittsburgh Steelers
Uke 17: mot Jacksonville Jaguars
Tabeller
Divisjon
Conference
Sluttspill
Terminliste
Kampreferater
AFC Wildcardrunden: at (2) Buffalo Bills
Referanser
Eksterne lenker
Indianapolis Colts
2020
Sport i USA i 2020 | norwegian_bokmål | 1.103376 |
Pony/builtin-U16-.txt |
U16¶
[Source]
primitive val U16 is
UnsignedInteger[U16 val] val
Implements¶
UnsignedInteger[U16 val] val
Constructors¶
create¶
[Source]
new val create(
value: U16 val)
: U16 val^
Parameters¶
value: U16 val
Returns¶
U16 val^
from[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[A] val)]¶
[Source]
new val from[A: ((I8 val | I16 val | I32 val |
I64 val | I128 val | ILong val |
ISize val | U8 val | U16 val |
U32 val | U64 val | U128 val |
ULong val | USize val | F32 val |
F64 val) & Real[A] val)](
a: A)
: U16 val^
Parameters¶
a: A
Returns¶
U16 val^
min_value¶
[Source]
new val min_value()
: U16 val^
Returns¶
U16 val^
max_value¶
[Source]
new val max_value()
: U16 val^
Returns¶
U16 val^
Public Functions¶
next_pow2¶
[Source]
fun box next_pow2()
: U16 val
Returns¶
U16 val
abs¶
[Source]
fun box abs()
: U16 val
Returns¶
U16 val
bit_reverse¶
[Source]
fun box bit_reverse()
: U16 val
Returns¶
U16 val
bswap¶
[Source]
fun box bswap()
: U16 val
Returns¶
U16 val
popcount¶
[Source]
fun box popcount()
: U16 val
Returns¶
U16 val
clz¶
[Source]
fun box clz()
: U16 val
Returns¶
U16 val
ctz¶
[Source]
fun box ctz()
: U16 val
Returns¶
U16 val
clz_unsafe¶
[Source]
Unsafe operation.
If this is 0, the result is undefined.
fun box clz_unsafe()
: U16 val
Returns¶
U16 val
ctz_unsafe¶
[Source]
Unsafe operation.
If this is 0, the result is undefined.
fun box ctz_unsafe()
: U16 val
Returns¶
U16 val
bitwidth¶
[Source]
fun box bitwidth()
: U16 val
Returns¶
U16 val
bytewidth¶
[Source]
fun box bytewidth()
: USize val
Returns¶
USize val
min¶
[Source]
fun box min(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
max¶
[Source]
fun box max(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
addc¶
[Source]
fun box addc(
y: U16 val)
: (U16 val , Bool val)
Parameters¶
y: U16 val
Returns¶
(U16 val , Bool val)
subc¶
[Source]
fun box subc(
y: U16 val)
: (U16 val , Bool val)
Parameters¶
y: U16 val
Returns¶
(U16 val , Bool val)
mulc¶
[Source]
fun box mulc(
y: U16 val)
: (U16 val , Bool val)
Parameters¶
y: U16 val
Returns¶
(U16 val , Bool val)
divc¶
[Source]
fun box divc(
y: U16 val)
: (U16 val , Bool val)
Parameters¶
y: U16 val
Returns¶
(U16 val , Bool val)
remc¶
[Source]
fun box remc(
y: U16 val)
: (U16 val , Bool val)
Parameters¶
y: U16 val
Returns¶
(U16 val , Bool val)
add_partial¶
[Source]
fun box add_partial(
y: U16 val)
: U16 val ?
Parameters¶
y: U16 val
Returns¶
U16 val ?
sub_partial¶
[Source]
fun box sub_partial(
y: U16 val)
: U16 val ?
Parameters¶
y: U16 val
Returns¶
U16 val ?
mul_partial¶
[Source]
fun box mul_partial(
y: U16 val)
: U16 val ?
Parameters¶
y: U16 val
Returns¶
U16 val ?
div_partial¶
[Source]
fun box div_partial(
y: U16 val)
: U16 val ?
Parameters¶
y: U16 val
Returns¶
U16 val ?
rem_partial¶
[Source]
fun box rem_partial(
y: U16 val)
: U16 val ?
Parameters¶
y: U16 val
Returns¶
U16 val ?
divrem_partial¶
[Source]
fun box divrem_partial(
y: U16 val)
: (U16 val , U16 val) ?
Parameters¶
y: U16 val
Returns¶
(U16 val , U16 val) ?
shl¶
[Source]
fun box shl(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
shr¶
[Source]
fun box shr(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
fld¶
[Source]
fun box fld(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
fldc¶
[Source]
fun box fldc(
y: U16 val)
: (U16 val , Bool val)
Parameters¶
y: U16 val
Returns¶
(U16 val , Bool val)
fld_partial¶
[Source]
fun box fld_partial(
y: U16 val)
: U16 val ?
Parameters¶
y: U16 val
Returns¶
U16 val ?
fld_unsafe¶
[Source]
fun box fld_unsafe(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
mod¶
[Source]
fun box mod(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
modc¶
[Source]
fun box modc(
y: U16 val)
: (U16 val , Bool val)
Parameters¶
y: U16 val
Returns¶
(U16 val , Bool val)
mod_partial¶
[Source]
fun box mod_partial(
y: U16 val)
: U16 val ?
Parameters¶
y: U16 val
Returns¶
U16 val ?
mod_unsafe¶
[Source]
fun box mod_unsafe(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
shl_unsafe¶
[Source]
fun box shl_unsafe(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
shr_unsafe¶
[Source]
fun box shr_unsafe(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
rotl¶
[Source]
fun box rotl(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
rotr¶
[Source]
fun box rotr(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
string¶
[Source]
fun box string()
: String iso^
Returns¶
String iso^
add_unsafe¶
[Source]
fun box add_unsafe(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
sub_unsafe¶
[Source]
fun box sub_unsafe(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
mul_unsafe¶
[Source]
fun box mul_unsafe(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
div_unsafe¶
[Source]
fun box div_unsafe(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
divrem_unsafe¶
[Source]
fun box divrem_unsafe(
y: U16 val)
: (U16 val , U16 val)
Parameters¶
y: U16 val
Returns¶
(U16 val , U16 val)
rem_unsafe¶
[Source]
fun box rem_unsafe(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
neg_unsafe¶
[Source]
fun box neg_unsafe()
: U16 val
Returns¶
U16 val
op_and¶
[Source]
fun box op_and(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
op_or¶
[Source]
fun box op_or(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
op_xor¶
[Source]
fun box op_xor(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
op_not¶
[Source]
fun box op_not()
: U16 val
Returns¶
U16 val
add¶
[Source]
fun box add(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
sub¶
[Source]
fun box sub(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
mul¶
[Source]
fun box mul(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
div¶
[Source]
fun box div(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
divrem¶
[Source]
fun box divrem(
y: U16 val)
: (U16 val , U16 val)
Parameters¶
y: U16 val
Returns¶
(U16 val , U16 val)
rem¶
[Source]
fun box rem(
y: U16 val)
: U16 val
Parameters¶
y: U16 val
Returns¶
U16 val
neg¶
[Source]
fun box neg()
: U16 val
Returns¶
U16 val
eq¶
[Source]
fun box eq(
y: U16 val)
: Bool val
Parameters¶
y: U16 val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
y: U16 val)
: Bool val
Parameters¶
y: U16 val
Returns¶
Bool val
lt¶
[Source]
fun box lt(
y: U16 val)
: Bool val
Parameters¶
y: U16 val
Returns¶
Bool val
le¶
[Source]
fun box le(
y: U16 val)
: Bool val
Parameters¶
y: U16 val
Returns¶
Bool val
ge¶
[Source]
fun box ge(
y: U16 val)
: Bool val
Parameters¶
y: U16 val
Returns¶
Bool val
gt¶
[Source]
fun box gt(
y: U16 val)
: Bool val
Parameters¶
y: U16 val
Returns¶
Bool val
hash¶
[Source]
fun box hash()
: USize val
Returns¶
USize val
hash64¶
[Source]
fun box hash64()
: U64 val
Returns¶
U64 val
i8¶
[Source]
fun box i8()
: I8 val
Returns¶
I8 val
i16¶
[Source]
fun box i16()
: I16 val
Returns¶
I16 val
i32¶
[Source]
fun box i32()
: I32 val
Returns¶
I32 val
i64¶
[Source]
fun box i64()
: I64 val
Returns¶
I64 val
i128¶
[Source]
fun box i128()
: I128 val
Returns¶
I128 val
ilong¶
[Source]
fun box ilong()
: ILong val
Returns¶
ILong val
isize¶
[Source]
fun box isize()
: ISize val
Returns¶
ISize val
u8¶
[Source]
fun box u8()
: U8 val
Returns¶
U8 val
u16¶
[Source]
fun box u16()
: U16 val
Returns¶
U16 val
u32¶
[Source]
fun box u32()
: U32 val
Returns¶
U32 val
u64¶
[Source]
fun box u64()
: U64 val
Returns¶
U64 val
u128¶
[Source]
fun box u128()
: U128 val
Returns¶
U128 val
ulong¶
[Source]
fun box ulong()
: ULong val
Returns¶
ULong val
usize¶
[Source]
fun box usize()
: USize val
Returns¶
USize val
f32¶
[Source]
fun box f32()
: F32 val
Returns¶
F32 val
f64¶
[Source]
fun box f64()
: F64 val
Returns¶
F64 val
i8_unsafe¶
[Source]
fun box i8_unsafe()
: I8 val
Returns¶
I8 val
i16_unsafe¶
[Source]
fun box i16_unsafe()
: I16 val
Returns¶
I16 val
i32_unsafe¶
[Source]
fun box i32_unsafe()
: I32 val
Returns¶
I32 val
i64_unsafe¶
[Source]
fun box i64_unsafe()
: I64 val
Returns¶
I64 val
i128_unsafe¶
[Source]
fun box i128_unsafe()
: I128 val
Returns¶
I128 val
ilong_unsafe¶
[Source]
fun box ilong_unsafe()
: ILong val
Returns¶
ILong val
isize_unsafe¶
[Source]
fun box isize_unsafe()
: ISize val
Returns¶
ISize val
u8_unsafe¶
[Source]
fun box u8_unsafe()
: U8 val
Returns¶
U8 val
u16_unsafe¶
[Source]
fun box u16_unsafe()
: U16 val
Returns¶
U16 val
u32_unsafe¶
[Source]
fun box u32_unsafe()
: U32 val
Returns¶
U32 val
u64_unsafe¶
[Source]
fun box u64_unsafe()
: U64 val
Returns¶
U64 val
u128_unsafe¶
[Source]
fun box u128_unsafe()
: U128 val
Returns¶
U128 val
ulong_unsafe¶
[Source]
fun box ulong_unsafe()
: ULong val
Returns¶
ULong val
usize_unsafe¶
[Source]
fun box usize_unsafe()
: USize val
Returns¶
USize val
f32_unsafe¶
[Source]
fun box f32_unsafe()
: F32 val
Returns¶
F32 val
f64_unsafe¶
[Source]
fun box f64_unsafe()
: F64 val
Returns¶
F64 val
compare¶
[Source]
fun box compare(
that: U16 val)
: (Less val | Equal val | Greater val)
Parameters¶
that: U16 val
Returns¶
(Less val | Equal val | Greater val)
| pony | 443033 | https://sv.wikipedia.org/wiki/Gammal | Gammal | Se även ålderdom.
Gammal är ett runsvenskt mansnamn, som återfinns i flera svenska vikingatida runinskrifter, från främst Uppland (U 56, U 144, U 163, U 207, U 409, U 952, U 1070) , men också från Södermanland (Sö 359) och Öland (Öl 37), samt möjligen i en 1100-tals inskrift i Penningtons kyrka, Cumbria, England.
Det har använts ända till våra dagar, men är numera väldigt ovanligt.
Källor
Samnordisk runtextdatabas
Mansnamn | swedish | 1.045208 |
Pony/builtin-SourceLoc-.txt |
SourceLoc¶
[Source]
Represents a location in a Pony source file, as reported by __loc.
interface val SourceLoc
Public Functions¶
file¶
[Source]
Name and path of source file.
fun box file()
: String val
Returns¶
String val
type_name¶
[Source]
Name of nearest class, actor, primitive, struct, interface, or trait.
fun box type_name()
: String val
Returns¶
String val
method_name¶
[Source]
Name of containing method.
fun box method_name()
: String val
Returns¶
String val
line¶
[Source]
Line number within file.
Line numbers start at 1.
fun box line()
: USize val
Returns¶
USize val
pos¶
[Source]
Character position on line.
Character positions start at 1.
fun box pos()
: USize val
Returns¶
USize val
| pony | 476679 | https://no.wikipedia.org/wiki/JSON | JSON | JSON (JavaScript Object Notation, uttales [ˈdʒeɪsən]) er en enkel tekstbasert standard for å formatere dokumenter (meldinger) som brukes for datautveksling. Den er opprinnelig avledet fra JavaScript for å representere enkle datastrukturer. Standarden er imidlertid uavhengig av JavaScript eller andre programmeringsspråk.
JSON-formatet ble opprinnelig spesifisert av Douglas Crockford, i standarden RFC 4627.
JSON blir ofte brukt for å serialisere datastrukturer som sendes over et nettverk, først og fremst mellom en server og en web-applikasjon, dette som et alternativ til XML. JSON har den fordelen fremfor XML at semantisk informasjon bare inngår en gang, mens XML som regel har dobbelt sett med start- og slutt-tag og er derfor mer plasskrevende. JSON har imidlertid en svakere formalisme for verdivalidering enn XML.
JSON er svært godt egnet til bruk i AJAX-applikasjoner.
Datatyper
JSON støtter følgende grunnleggende datatyper:
Tall
Tekst (String)
Boolske verdier
Tabeller
Objekter (nøkkel:verdi-par)
null (tom verdi)
Eksempel
Følgende datastruktur er en JSON-representasjon av et dataobjekt som beskriver en person. Objektet har tekstfelt for navn, et objekt som inneholder adresse og en liste over telefonnummer-objekter.
{
"fornavn": "Ola",
"etternavn": "Nordmann",
"alder": 25,
"adresse":
{
"gateadresse": "Bakken 4",
"postnummer": 1234,
"poststed": "Bakkebygrenda"
},
"telefonnumre":
[
{
"type": "mobil",
"nummer": "912 34 567"
},
{
"type": "hjem",
"nummer": "12 34 56 78"
},
{
"type": "fax",
"nummer": "87 65 43 21"
}
]
}
Eksterne lenker
Filformater | norwegian_bokmål | 0.805948 |
Pony/src-collections-persistent-set-.txt |
set.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158use mut = "collections"
type Set[A: (mut.Hashable val & Equatable[A])] is HashSet[A, mut.HashEq[A]]
type SetIs[A: Any #share] is HashSet[A, mut.HashIs[A]]
class val HashSet[A: Any #share, H: mut.HashFunction[A] val]
is Comparable[HashSet[A, H] box]
"""
A set, built on top of persistent Map. This is implemented as map of an
alias of a type to itself.
"""
let _map: HashMap[A, A, H]
new val create() =>
_map = HashMap[A, A, H]
new val _create(map': HashMap[A, A, H]) =>
_map = map'
fun size(): USize =>
"""
Return the number of elements in the set.
"""
_map.size()
fun apply(value: val->A): val->A ? =>
"""
Return the value if it is in the set, otherwise raise an error.
"""
_map(value)?
fun contains(value: val->A): Bool =>
"""
Check whether the set contains the value.
"""
_map.contains(value)
fun val add(value: val->A): HashSet[A, H] =>
"""
Return a set with the value added.
"""
_create(_map(value) = value)
fun val sub(value: val->A): HashSet[A, H] =>
"""
Return a set with the value removed.
"""
try _create(_map.remove(value)?) else this end
fun val op_or(that: (HashSet[A, H] | Iterator[A])): HashSet[A, H] =>
"""
Return a set with the elements of both this and that.
"""
let iter =
match that
| let s: HashSet[A, H] => s.values()
| let i: Iterator[A] => i
end
var s' = this
for v in iter do
s' = s' + v
end
s'
fun val op_and(that: (HashSet[A, H] | Iterator[A])): HashSet[A, H] =>
"""
Return a set with the elements that are in both this and that.
"""
let iter =
match that
| let s: HashSet[A, H] => s.values()
| let i: Iterator[A] => i
end
var s' = create()
for v in iter do
if contains(v) then
s' = s' + v
end
end
s'
fun val op_xor(that: (HashSet[A, H] | Iterator[A])): HashSet[A, H] =>
"""
Return a set with elements that are in either this or that, but not both.
"""
let iter =
match that
| let s: HashSet[A, H] => s.values()
| let i: Iterator[A] => i
end
var s' = this
for v in iter do
if contains(v) then
s' = s' - v
else
s' = s' + v
end
end
s'
fun val without(that: (HashSet[A, H] | Iterator[A])): HashSet[A, H] =>
"""
Return a set with the elements of this that are not in that.
"""
let iter =
match that
| let s: HashSet[A, H] => s.values()
| let i: Iterator[A] => i
end
var s' = this
for v in iter do
if contains(v) then
s' = s' - v
end
end
s'
fun eq(that: HashSet[A, H] box): Bool =>
"""
Return true if this and that contain the same elements.
"""
(size() == that.size()) and (this <= that)
fun lt(that: HashSet[A, H] box): Bool =>
"""
Return true if every element in this is also in that, and this has fewer
elements than that.
"""
(size() < that.size()) and (this <= that)
fun le(that: HashSet[A, H] box): Bool =>
"""
Return true if every element in this is also in that.
"""
for v in values() do
if not that.contains(v) then return false end
end
true
fun gt(that: HashSet[A, H] box): Bool =>
"""
Return true if every element in that is also in this, and this has more
elements than that.
"""
(size() > that.size()) and (that <= this)
fun ge(that: HashSet[A, H] box): Bool =>
"""
Return true if every element in that is also in this.
"""
that <= this
fun values(): Iterator[A]^ =>
"""
Return an iterator over the values in the set.
"""
_map.values()
| pony | 2241056 | https://sv.wikipedia.org/wiki/Huara%20ovalis | Huara ovalis | Huara ovalis är en spindelart som först beskrevs av Henry Roughton Hogg 1909. Huara ovalis ingår i släktet Huara och familjen Amphinectidae. Inga underarter finns listade i Catalogue of Life.
Källor
Externa länkar
Spindlar
ovalis | swedish | 1.229397 |
Pony/src-net-udp_notify-.txt |
udp_notify.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41interface UDPNotify
"""
Notifications for UDP connections.
For an example of using this class please see the documentatoin for the
`UDPSocket` actor.
"""
fun ref listening(sock: UDPSocket ref) =>
"""
Called when the socket has been bound to an address.
"""
None
fun ref not_listening(sock: UDPSocket ref)
"""
Called if it wasn't possible to bind the socket to an address.
It is expected to implement proper error handling. You need to opt in to
ignoring errors, which can be implemented like this:
```pony
fun ref not_listening(sock: UDPSocket ref) =>
None
```
"""
fun ref received(
sock: UDPSocket ref,
data: Array[U8] iso,
from: NetAddress)
=>
"""
Called when new data is received on the socket.
"""
None
fun ref closed(sock: UDPSocket ref) =>
"""
Called when the socket is closed.
"""
None
| pony | 218271 | https://da.wikipedia.org/wiki/In%20Rainbows | In Rainbows | In Rainbows er det syvende studiealbum fra Radiohead. Albummet blev den 1. oktober annonceret og udkom derefter den 10. oktober 2007 som MP3 download. Albummet udkom den 3. december sammen med en ekstra CD, der indeholder ekstra materiale.
Diskboks udgaven af albummet, der også inkluderer MP3 downloaden, har en fast pris på 40£. MP3 downloadens pris er fuldstændig op til køberen, som kan købe albummet for 0£. Guitarist i Radiohead, Jonny Greenwood har udtalt, at dette ikke var for at lave ravage i musikindustrien, men mere for at få forbrugeren til at stoppe op og reflektere over hvad musik er værd.
Indhold
"15 Step" – 3:57
"Bodysnatchers" – 4:02
"Nude" – 4:15
"Weird Fishes/Arpeggi" – 5:18
"All I Need" – 3:48
"Faust Arp" – 2:09
"Reckoner" – 4:50
"House of Cards" – 5:28
"Jigsaw Falling into Place" – 4:09
"Videotape" – 4:39
Diskboks udgaven af albummet indeholder en ekstra CD, der indeholder otte numre mere plus digitale fotos og artwork.
"MK 1"
"Down Is the New Up"
"Go Slowly"
"MK 2"
"Last Flowers"
"Up on the Ladder"
"Bangers and Mash"
"4 Minute Warning"
Kilder
Radiohead-album
Album fra 2007 | danish | 1.184369 |
Pony/use-statement.txt | # Use Statement
To use a package in your code you need to have a __use__ command. This tells the compiler to find the package you need and make the types defined in it available to you. Every Pony file that needs to know about a type from a package must have a use command for it.
Use commands are a similar concept to Python and Java "import", C/C++ "#include" and C# "using" commands, but not exactly the same. They come at the beginning of Pony files and look like this:
```pony
use "collections"
```
This will find all of the publicly visible types defined in the _collections_ package and add them to the type namespace of the file containing the `use` command. These types are then available to use within that file, just as if they were defined locally.
For example, the standard library contains the package _time_. This contains the following definition (among others):
```pony
primitive Time
fun now(): (I64, I64)
```
To access the _now_ function just add a use command:
```pony
use "time"
class Foo
fun f() =>
(var secs, var nsecs) = Time.now()
```
## Use names
As we saw above the use command adds all the public types from a package into the namespace of the using file. This means that using a package may define type names that you want to use for your own types. Furthermore, if you use two packages within a file they may both define the same type name, causing a clash in your namespace. For example:
```pony
// In package A
class Foo
// In package B
class Foo
// In your code
use "packageA"
use "packageB"
class Bar
var _x: Foo
```
The declarations of _x is an error because we don't know which `Foo` is being referred to. Actually using 'Foo' is not even required, simply using both `packageA` and `packageB` is enough to cause an error here.
To avoid this problem the use command allows you to specify an alias. If you do this then only that alias is put into your namespace. The types from the used package can then be accessed using this alias as a qualifier. Our example now becomes:
```pony
// In package A
class Foo
// In package B
class Foo
// In your code
use a = "packageA"
use b = "packageB"
class Bar
var _x: a.Foo // The Foo from package A
var _y: b.Foo // The Foo from package B
```
If you prefer you can give an alias to only one of the packages. `Foo` will then still be added to your namespace referring to the unaliased package:
```pony
// In package A
class Foo
// In package B
class Foo
// In your code
use "packageA"
use b = "packageB"
class Bar
var _x: Foo // The Foo from package A
var _y: b.Foo // The Foo from package B
```
__Can I just specify the full package path and forget about the use command, like I do in Java and C#?__ No, you can't do that in Pony. You can't refer to one package based on a `use` command for another package and you can't use types from a package without a use command for that package. Every package that you want to use must have its own `use` command.
__Are there limits on the names I can use for an alias?__ Use alias names have to start with a lower case letter. Other than that you can use whatever name you want, as long as you're not using that name for any other purpose in your file.
## Scheme indicators
The string we give to a `use` command is known as the _specifier_. This consists of a _scheme_ indicator and a _locator_, separated by a colon. The scheme indicator tells the `use` command what we want it to do, for example, the scheme indicator for including a package is "package". If no colon is found within the specifier string then the use command assumes you meant "package".
The following two use commands are exactly equivalent:
```pony
use "foo"
use "package:foo"
```
If you are using a locator string that includes a colon, for example, an absolute path in Windows, then you __have__ to include the "package" scheme specifier:
```pony
use "C:/foo/bar" // Error, scheme "C" is unknown
use "package:C:/foo/bar" // OK
```
To allow use commands to be portable across operating systems, and to avoid confusion with escape characters, '/' should always be used as the path separator in use commands, even on Windows.
| pony | 2000864 | https://sv.wikipedia.org/wiki/Opistomum%20pallidum | Opistomum pallidum | Opistomum pallidum är en plattmaskart. Opistomum pallidum ingår i släktet Opistomum och familjen Typhloplanidae. Inga underarter finns listade i Catalogue of Life.
Källor
Virvelmaskar
pallidum | swedish | 1.451644 |
Pony/term--index-.txt |
Term package¶
The Term package provides support for building text-based user interfaces in ANSI terminals.
Public Types¶
primitive ANSI
interface ANSINotify
actor ANSITerm
primitive EraseLeft
primitive EraseLine
primitive EraseRight
class Readline
interface ReadlineNotify
| pony | 2861729 | https://sv.wikipedia.org/wiki/Pseudonerice%20unidentata | Pseudonerice unidentata | Pseudonerice unidentata är en fjärilsart som beskrevs av Felix Bryk 1950. Pseudonerice unidentata ingår i släktet Pseudonerice och familjen tandspinnare. Inga underarter finns listade.
Källor
Tandspinnare
unidentata | swedish | 1.30485 |
Pony/builtin--index-.txt |
Builtin package¶
The builtin package is home to the following standard library members:
Types the compiler needs to know exist, such as None.
Types with "magic" internal workings that must be supplied directly by the
compiler, such as U32.
Any types needed by others in builtin.
The public types that are defined in this package will always be in scope for
every Pony source file. For details on specific packages, see their individual
entity entries.
Public Types¶
primitive AmbientAuth
interface Any
class Array
class ArrayKeys
class ArrayPairs
class ArrayValues
primitive AsioEvent
type AsioEventID
trait AsioEventNotify
primitive Bool
type ByteSeq
interface ByteSeqIter
interface Comparable
type Compare
interface DisposableActor
primitive DoNotOptimise
class Env
primitive Equal
interface Equatable
primitive F32
primitive F64
type Float
trait FloatingPoint
primitive Greater
interface HasEq
primitive I128
primitive I16
primitive I32
primitive I64
primitive I8
primitive ILong
primitive ISize
interface InputNotify
interface InputStream
type Int
trait Integer
interface Iterator
primitive Less
primitive None
struct NullablePointer
type Number
interface OutStream
primitive Platform
struct Pointer
interface ReadElement
interface ReadSeq
trait Real
struct RuntimeOptions
interface Seq
type Signed
trait SignedInteger
interface SourceLoc
actor StdStream
actor Stdin
class String
class StringBytes
class StringRunes
interface Stringable
primitive U128
primitive U16
primitive U32
primitive U64
primitive U8
primitive ULong
primitive USize
type Unsigned
trait UnsignedInteger
| pony | 2000330 | https://sv.wikipedia.org/wiki/Parotoplana%20primitiva | Parotoplana primitiva | Parotoplana primitiva är en plattmaskart som beskrevs av Ax 1955. Parotoplana primitiva ingår i släktet Parotoplana och familjen Otoplanidae. Inga underarter finns listade i Catalogue of Life.
Källor
Virvelmaskar
primitiva | swedish | 1.115544 |
Pony/pony_check-IntPropertySample-.txt |
IntPropertySample¶
[Source]
class ref IntPropertySample is
Stringable box
Implements¶
Stringable box
Constructors¶
create¶
[Source]
new ref create(
choice': U8 val,
int': U128 val)
: IntPropertySample ref^
Parameters¶
choice': U8 val
int': U128 val
Returns¶
IntPropertySample ref^
Public fields¶
let choice: U8 val¶
[Source]
let int: U128 val¶
[Source]
Public Functions¶
string¶
[Source]
fun box string()
: String iso^
Returns¶
String iso^
| pony | 273484 | https://da.wikipedia.org/wiki/IBATIS | IBATIS | iBATIS er et stykke fri software, der automatisk eller semi-automatisk laver objekter til programmeringssprogene java, C# eller ruby ud fra SQL. Programmøren skal ikke skrive SQL direkte i sin kode men i stedet skrive det i XML-filer.
Ideen med iBATES er at mindske mængden af kode en programmør skal skrive for at et program kan arbejde med data i en relationel database.
Hvis der i en database eksistere en tabel PRODUCT (PRD_ID: INTEGER, PRD_DESCRIPTION: VARCHAR) og man ønsker adgang til værdierne i en række i tabellen via et java-objekt com.example.Product (id: int, description: String) så kan iBATES lave java-objektet ved at skrive følgende i en XML-fil:
<select id="getProduct"
parameterClass="com.example.Product"
resultClass="com.example.Product">
select
PRD_ID as id,
PRD_DESCRIPTION as description
from
PRODUCT
where
PRD_ID = #id#
</select>
Java-koden der bruger Product-objektet til at hente værdier fra en bestemt række i tabellen i databasen kan se sådan her ud:
Product paramProduct = new Product();
paramProduct.setId(123);
Product resultProduct = IBatis.getObject("getProduct", paramProduct);
Eksterne links
ibatis.apache.org – Den officielle side.
Fri software | danish | 0.816977 |
Pony/process-Exited-.txt |
Exited¶
[Source]
Process exit status: Process exited with an exit code.
class val Exited is
Stringable box,
Equatable[(Exited val | Signaled val)] ref
Implements¶
Stringable box
Equatable[(Exited val | Signaled val)] ref
Constructors¶
create¶
[Source]
new val create(
code: I32 val)
: Exited val^
Parameters¶
code: I32 val
Returns¶
Exited val^
Public Functions¶
exit_code¶
[Source]
Retrieve the exit code of the exited process.
fun box exit_code()
: I32 val
Returns¶
I32 val
string¶
[Source]
fun box string()
: String iso^
Returns¶
String iso^
eq¶
[Source]
fun box eq(
other: (Exited val | Signaled val))
: Bool val
Parameters¶
other: (Exited val | Signaled val)
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: (Exited val | Signaled val))
: Bool val
Parameters¶
that: (Exited val | Signaled val)
Returns¶
Bool val
| pony | 492326 | https://sv.wikipedia.org/wiki/Yamaha%20EC | Yamaha EC | Yamaha EC-serien eller Excel-V som stod för Excellente (utmärkt) var en premiumsnöskoter från Yamaha som introducerades 1979.
EC- och XL-serien år från år
1979 Kom en första modellen i serien och den hette EC540C.
1980 EC540D som den nu hette hade fått ett nytt säte och några andra smärre förändringar. Detta var den sista EC5401981-1988 använder Yamaha återigen Excel och EC-beteckningen men nu i en Excel III som i princip är en ET340 för mer information se just denna maskin för var årgång. Skillnaden var att den var mer utrustad än ET340 och den hade också andra kulörer. 1985 Återkommer Excel-V men nu som XLV och heter eg. XL540J. Det är i princip samma snöskoter som 1980 års modell fast med ny dyna och andra moderationer.1986-1990''' Smärre förändringar av XL540 med ny sits från 1988.
Snöskotermodeller tillverkade av Yamaha | swedish | 1.202725 |
Pony/net-NetAuth-.txt |
NetAuth¶
[Source]
primitive val NetAuth
Constructors¶
create¶
[Source]
new val create(
from: AmbientAuth val)
: NetAuth val^
Parameters¶
from: AmbientAuth val
Returns¶
NetAuth val^
Public Functions¶
eq¶
[Source]
fun box eq(
that: NetAuth val)
: Bool val
Parameters¶
that: NetAuth val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: NetAuth val)
: Bool val
Parameters¶
that: NetAuth val
Returns¶
Bool val
| pony | 401272 | https://nn.wikipedia.org/wiki/Sanikiluaq | Sanikiluaq | Sanikiluaq, inuktitut ᓴᓂᑭᓗᐊᖅ, er ein busetnad på Belcherøyane i Qikiqtaaluk i det kanadiske territoriet Nunavut. Han er den sørlegaste busetnaden i Nunavut. Folketalet i 2016 var 882.
Sanikiluaq lufthamn ligg i nærleieken.
Kjelder
Denne artikkelen bygger på «Sanikiluaq» frå , den 18. oktober 2022.
Busetnader i Nunavut | norwegian_nynorsk | 1.216192 |
Pony/signals-SignalNotify-.txt |
SignalNotify¶
[Source]
Notifications for a signal.
interface ref SignalNotify
Public Functions¶
apply¶
[Source]
Called with the the number of times the signal has fired since this was
last called. Return false to stop listening for the signal.
fun ref apply(
count: U32 val)
: Bool val
Parameters¶
count: U32 val
Returns¶
Bool val
dispose¶
[Source]
Called if the signal is disposed. This is also called if the notifier
returns false.
fun ref dispose()
: None val
Returns¶
None val
| pony | 89784 | https://sv.wikipedia.org/wiki/POP3 | POP3 | POP3 är version 3 av Post Office Protocol. POP3 är det vanligaste kommunikationsprotokollet för att hämta e-postmeddelanden från en server till ett e-postprogram, även om det mer och mer håller på att konkurreras ut av IMAP som är ett mer kapabelt protokoll. Kommunikationen sker via TCP på port 110.
POP3 kräver inloggning av användaren, något som ibland sker genom att användarnamn och lösenord skickas i klartext (protokollet stödjer dock krypterad påloggning), och tillåter därefter att meddelanden laddas ner för permanent lagring på den anslutande datorn, klienten. Nedladdade meddelanden brukar normalt tas bort av e-postprogrammet, men det går även att lämna kvar meddelanden så att de kan laddas ner fler gånger av andra program på andra datorer. Eftersom varje meddelande ges ett unikt nummer så kan ett e-postprogram hålla reda på vilka meddelanden som redan laddats hem. Det är inte möjligt att ladda upp meddelanden via POP3, och man kan inte ha flera brevlådor kopplade till samma konto.
Liksom de flesta andra liknande protokoll är POP3 text- och radbaserat. Nedanstående fiktiva POP3-konversation visar hur klienten loggar in, kontrollerar vilka meddelanden som finns, laddar hem meddelande nummer fem samt tar slutligen bort det nedladdade meddelandet och avslutar sessionen. Text i fetstil skickas av klienten.
+OK Hello there.
USER kalle
+OK Password required.
PASS hemligt
+OK logged in.
STAT
+OK 5 30303
UIDL
+OK
1 UID13882-1064155887
2 UID13883-1064155887
3 UID13884-1064155887
4 UID13885-1064155887
5 UID13886-1064155887
RETR 5
+OK 158 octets follow.
Return-Path: <[email protected]>
From: Petros <[email protected]>
To: Kalle <[email protected]>
Subject: I kväll
Hej!
När skulle vi träffas i kväll?
/Petros
.
DELE 5
+OK Deleted.
QUIT
+OK Bye-bye.
Se även
SMTP
IMAP
HTTP
TLS
Referenser
Externa länkar
RFC1939 - Protokollspecifikationer för POP3.
E-post
Applikationsskiktsprotokoll | swedish | 0.881101 |
Pony/src-pony_test-test_helper-.txt |
test_helper.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447interface ITest
fun apply() ?
class val TestHelper
"""
Per unit test class that provides control, logging and assertion functions.
Each unit test is given a TestHelper when it is run. This is val and so can
be passed between methods and actors within the test without restriction.
The assertion functions check the relevant condition and mark the test as a
failure if appropriate. The success or failure of the condition is reported
back as a Bool which can be checked if a different code path is needed when
that condition fails.
All assert functions take an optional message argument. This is simply a
string that is printed as part of the error message when the condition fails.
It is intended to aid identifying what failed.
"""
let _runner: _TestRunner
let env: Env
"""
The process environment.
This is useful for getting the [root authority](builtin-AmbientAuth.md) in
order to access the filesystem (See [files](files--index.md)) or the network
(See [net](net--index.md)) in your tests.
"""
new val _create(runner: _TestRunner, env': Env) =>
"""
Create a new TestHelper.
"""
env = env'
_runner = runner
fun log(msg: String, verbose: Bool = false) =>
"""
Log the given message.
The verbose parameter allows messages to be printed only when the --verbose
command line option is used. For example, by default assert failures are
logged, but passes are not. With --verbose both passes and fails are
reported.
Logs are printed one test at a time to avoid interleaving log lines from
concurrent tests.
"""
_runner.log(msg, verbose)
fun fail(msg: String = "Test failed") =>
"""
Flag the test as having failed.
"""
_runner.fail(msg)
fun assert_true(actual: Bool, msg: String = "", loc: SourceLoc = __loc)
: Bool
=>
"""
Assert that the given expression is true.
"""
if not actual then
fail(_format_loc(loc) + "Assert true failed. " + msg)
return false
end
log(_format_loc(loc) + "Assert true passed. " + msg, true)
true
fun assert_false(actual: Bool, msg: String = "", loc: SourceLoc = __loc)
: Bool
=>
"""
Assert that the given expression is false.
"""
if actual then
fail(_format_loc(loc) + "Assert false failed. " + msg)
return false
end
log(_format_loc(loc) + "Assert false passed. " + msg, true)
true
fun assert_error(test: ITest box, msg: String = "", loc: SourceLoc = __loc)
: Bool
=>
"""
Assert that the given test function throws an error when run.
"""
try
test()?
fail(_format_loc(loc) + "Assert error failed. " + msg)
false
else
log(_format_loc(loc) + "Assert error passed. " + msg, true)
true
end
fun assert_no_error(
test: ITest box,
msg: String = "",
loc: SourceLoc = __loc)
: Bool
=>
"""
Assert that the gived test function does not throw an error when run.
"""
try
test()?
log(_format_loc(loc) + "Assert no error passed. " + msg, true)
true
else
fail(_format_loc(loc) + "Assert no error failed. " + msg)
true
end
fun assert_is[A](
expect: A,
actual: A,
msg: String = "",
loc: SourceLoc = __loc)
: Bool
=>
"""
Assert that the 2 given expressions resolve to the same instance
"""
_check_is[A]("is", consume expect, consume actual, msg, loc)
fun _check_is[A](
check: String,
expect: A,
actual: A,
msg: String,
loc: SourceLoc)
: Bool
=>
"""
Check that the 2 given expressions resolve to the same instance
"""
if expect isnt actual then
fail(_format_loc(loc) + "Assert " + check + " failed. " + msg
+ " Expected (" + (digestof expect).string() + ") is ("
+ (digestof actual).string() + ")")
return false
end
log(
_format_loc(loc) + "Assert " + check + " passed. " + msg
+ " Got (" + (digestof expect).string() + ") is ("
+ (digestof actual).string() + ")",
true)
true
fun assert_eq[A: (Equatable[A] #read & Stringable #read)]
(expect: A, actual: A, msg: String = "", loc: SourceLoc = __loc): Bool
=>
"""
Assert that the 2 given expressions are equal.
"""
_check_eq[A]("eq", expect, actual, msg, loc)
fun _check_eq[A: (Equatable[A] #read & Stringable)]
(check: String, expect: A, actual: A, msg: String, loc: SourceLoc)
: Bool
=>
"""
Check that the 2 given expressions are equal.
"""
if expect != actual then
fail(_format_loc(loc) + "Assert " + check + " failed. " + msg
+ " Expected (" + expect.string() + ") == (" + actual.string() + ")")
return false
end
log(_format_loc(loc) + "Assert " + check + " passed. " + msg
+ " Got (" + expect.string() + ") == (" + actual.string() + ")", true)
true
fun assert_isnt[A](
not_expect: A,
actual: A,
msg: String = "",
loc: SourceLoc = __loc)
: Bool
=>
"""
Assert that the 2 given expressions resolve to different instances.
"""
_check_isnt[A]("isn't", consume not_expect, consume actual, msg, loc)
fun _check_isnt[A](
check: String,
not_expect: A,
actual: A,
msg: String,
loc: SourceLoc)
: Bool
=>
"""
Check that the 2 given expressions resolve to different instances.
"""
if not_expect is actual then
fail(_format_loc(loc) + "Assert " + check + " failed. " + msg
+ " Expected (" + (digestof not_expect).string() + ") isnt ("
+ (digestof actual).string() + ")")
return false
end
log(
_format_loc(loc) + "Assert " + check + " passed. " + msg
+ " Got (" + (digestof not_expect).string() + ") isnt ("
+ (digestof actual).string() + ")",
true)
true
fun assert_ne[A: (Equatable[A] #read & Stringable #read)]
(not_expect: A, actual: A, msg: String = "", loc: SourceLoc = __loc): Bool
=>
"""
Assert that the 2 given expressions are not equal.
"""
_check_ne[A]("ne", not_expect, actual, msg, loc)
fun _check_ne[A: (Equatable[A] #read & Stringable)]
(check: String, not_expect: A, actual: A, msg: String, loc: SourceLoc)
: Bool
=>
"""
Check that the 2 given expressions are not equal.
"""
if not_expect == actual then
fail(_format_loc(loc) + "Assert " + check + " failed. " + msg
+ " Expected (" + not_expect.string() + ") != (" + actual.string()
+ ")")
return false
end
log(
_format_loc(loc) + "Assert " + check + " passed. " + msg
+ " Got (" + not_expect.string() + ") != (" + actual.string() + ")",
true)
true
fun assert_array_eq[A: (Equatable[A] #read & Stringable #read)](
expect: ReadSeq[A],
actual: ReadSeq[A],
msg: String = "",
loc: SourceLoc = __loc)
: Bool
=>
"""
Assert that the contents of the 2 given ReadSeqs are equal.
The type parameter of this function is the type parameter of the
elements in both ReadSeqs. For instance, when comparing two `Array[U8]`,
you should call this method as follows:
```pony
fun apply(h: TestHelper) =>
let a: Array[U8] = [1; 2; 3]
let b: Array[U8] = [1; 2; 3]
h.assert_array_eq[U8](a, b)
```
"""
var ok = true
if expect.size() != actual.size() then
ok = false
else
try
var i: USize = 0
while i < expect.size() do
if expect(i)? != actual(i)? then
ok = false
break
end
i = i + 1
end
else
ok = false
end
end
if not ok then
fail(_format_loc(loc) + "Assert EQ failed. " + msg + " Expected ("
+ _print_array[A](expect) + ") == (" + _print_array[A](actual) + ")")
return false
end
log(
_format_loc(loc) + "Assert EQ passed. " + msg + " Got ("
+ _print_array[A](expect) + ") == (" + _print_array[A](actual) + ")",
true)
true
fun assert_array_eq_unordered[A: (Equatable[A] #read & Stringable #read)](
expect: ReadSeq[A],
actual: ReadSeq[A],
msg: String = "",
loc: SourceLoc = __loc)
: Bool
=>
"""
Assert that the contents of the 2 given ReadSeqs are equal ignoring order.
The type parameter of this function is the type parameter of the
elements in both ReadSeqs. For instance, when comparing two `Array[U8]`,
you should call this method as follows:
```pony
fun apply(h: TestHelper) =>
let a: Array[U8] = [1; 2; 3]
let b: Array[U8] = [1; 3; 2]
h.assert_array_eq_unordered[U8](a, b)
```
"""
try
let missing = Array[box->A]
let consumed = Array[Bool].init(false, actual.size())
for e in expect.values() do
var found = false
var i: USize = -1
for a in actual.values() do
i = i + 1
if consumed(i)? then continue end
if e == a then
consumed.update(i, true)?
found = true
break
end
end
if not found then
missing.push(e)
end
end
let extra = Array[box->A]
for (i, c) in consumed.pairs() do
if not c then extra.push(actual(i)?) end
end
if (extra.size() != 0) or (missing.size() != 0) then
fail(
_format_loc(loc) + "Assert EQ_UNORDERED failed. " + msg
+ " Expected (" + _print_array[A](expect) + ") == ("
+ _print_array[A](actual) + "):"
+ "\nMissing: " + _print_array[box->A](missing)
+ "\nExtra: " + _print_array[box->A](extra))
return false
end
log(
_format_loc(loc) + "Assert EQ_UNORDERED passed. " + msg + " Got ("
+ _print_array[A](expect) + ") == (" + _print_array[A](actual) + ")",
true)
true
else
fail("Assert EQ_UNORDERED failed from an internal error.")
false
end
fun _format_loc(loc: SourceLoc): String =>
loc.file() + ":" + loc.line().string() + ": "
fun _print_array[A: Stringable #read](array: ReadSeq[A]): String =>
"""
Generate a printable string of the contents of the given readseq to use in
error messages.
The type parameter of this function is the type parameter of the
elements in the ReadSeq.
"""
"[len=" + array.size().string() + ": " + ", ".join(array.values()) + "]"
fun long_test(timeout: U64) =>
"""
Indicate that this is a long running test that may continue after the
test function exits.
Once this function is called, complete() must be called to finish the test,
unless a timeout occurs.
The timeout is specified in nanseconds.
"""
_runner.long_test(timeout)
fun complete(success: Bool) =>
"""
MUST be called by each long test to indicate the test has finished, unless
a timeout occurs. If you are using expect_action() then complete(true) will
be called once the last expected action has been completed via
complete_action().
The "success" parameter specifies whether the test succeeded. However if
any asserts fail the test will be considered a failure, regardless of the
value of this parameter.
Once this is called tear_down() may be called at any time.
"""
_runner.complete(success)
fun expect_action(name: String) =>
"""
Can be called in a long test to set up expectations for one or more actions
that, when all completed, will complete the test.
This pattern is useful for cases where you have multiple things that need
to happen to complete your test, but don't want to have to collect them
all yourself into a single actor that calls the complete method.
The order of calls to expect_action don't matter - the actions may be
completed in any other order to complete the test.
"""
_runner.expect_action(name)
fun complete_action(name: String) =>
"""
MUST be called for each action expectation that was set up in a long test
to fulfill the expectations. Any expectations that are still outstanding
when the long test timeout runs out will be printed by name when it fails.
Completing all outstanding actions is enough to finish the test. There's no
need to also call the complete method when the actions are finished.
Calling the complete method will finish the test immediately, without
waiting for any outstanding actions to be completed.
"""
_runner.complete_action(name, true)
fun fail_action(name: String) =>
"""
Call to fail an action, which will also cause the entire test to fail
immediately, without waiting the rest of the outstanding actions.
The name of the failed action will be included in the failure output.
Usually the action name should be an expected action set up by a call to
expect_action, but failing unexpected actions will also fail the test.
"""
_runner.complete_action(name, false)
fun dispose_when_done(disposable: DisposableActor) =>
"""
Pass a disposable actor to be disposed of when the test is complete.
The actor will be disposed no matter whether the test succeeds or fails.
If the test is already tearing down, the actor will be disposed immediately.
"""
_runner.dispose_when_done(disposable)
| pony | 4228986 | https://sv.wikipedia.org/wiki/Agave%20stringens | Agave stringens | Agave stringens är en sparrisväxtart som beskrevs av William Trelease. Agave stringens ingår i släktet Agave och familjen sparrisväxter. Inga underarter finns listade i Catalogue of Life.
Källor
Sparrisväxter
stringens | swedish | 1.335999 |
Pony/collections-SetIs-.txt |
SetIs[A: A]¶
[Source]
type SetIs[A: A] is
HashSet[A, HashIs[A!] val] ref
Type Alias For¶
HashSet[A, HashIs[A!] val] ref
| pony | 2569172 | https://sv.wikipedia.org/wiki/Asiotmethis%20heptapotamicus | Asiotmethis heptapotamicus | Asiotmethis heptapotamicus är en insektsart som först beskrevs av Zubovski 1898. Asiotmethis heptapotamicus ingår i släktet Asiotmethis och familjen Pamphagidae.
Underarter
Arten delas in i följande underarter:
A. h. heptapotamicus
A. h. extimus
A. h. griseus
A. h. transiens
A. h. songoricus
Källor
Hopprätvingar
heptapotamicus | swedish | 1.152462 |
Pony/src-builtin-stdin-.txt |
stdin.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194use @pony_asio_event_create[AsioEventID](owner: AsioEventNotify, fd: U32,
flags: U32, nsec: U64, noisy: Bool)
use @pony_asio_event_unsubscribe[None](event: AsioEventID)
use @pony_asio_event_destroy[None](event: AsioEventID)
use @pony_os_stdin_read[USize](buffer: Pointer[U8] tag, size: USize)
interface InputNotify
"""
Notification for data arriving via an input stream.
"""
fun ref apply(data: Array[U8] iso) =>
"""
Called when data is available on the stream.
"""
None
fun ref dispose() =>
"""
Called when no more data will arrive on the stream.
"""
None
interface tag InputStream
"""
Asynchronous access to some input stream.
"""
be apply(notify: (InputNotify iso | None), chunk_size: USize = 32)
"""
Set the notifier. Optionally, also sets the chunk size, dictating the
maximum number of bytes of each chunk that will be passed to the notifier.
"""
be dispose() =>
"""
Clear the notifier in order to shut down input.
"""
None
actor Stdin is AsioEventNotify
"""
Asynchronous access to stdin. The constructor is private to ensure that
access is provided only via an environment.
Reading from stdin is done by registering an `InputNotify`:
```pony
actor Main
new create(env: Env) =>
// do not forget to call `env.input.dispose` at some point
env.input(
object iso is InputNotify
fun ref apply(data: Array[U8] iso) =>
env.out.write(String.from_iso_array(consume data))
fun ref dispose() =>
env.out.print("Done.")
end,
512)
```
**Note:** For reading user input from a terminal, use the [term](term--index.md) package.
"""
var _notify: (InputNotify | None) = None
var _chunk_size: USize = 32
var _event: AsioEventID = AsioEvent.none()
let _use_event: Bool
new _create(use_event: Bool) =>
"""
Create an asynchronous stdin provider.
"""
_use_event = use_event
be apply(notify: (InputNotify iso | None), chunk_size: USize = 32) =>
"""
Set the notifier. Optionally, also sets the chunk size, dictating the
maximum number of bytes of each chunk that will be passed to the notifier.
"""
_set_notify(consume notify)
_chunk_size = chunk_size
be dispose() =>
"""
Clear the notifier in order to shut down input.
"""
_set_notify(None)
fun ref _set_notify(notify: (InputNotify iso | None)) =>
"""
Set the notifier.
"""
if notify is None then
if _use_event and not _event.is_null() then
// Unsubscribe the event.
@pony_asio_event_unsubscribe(_event)
_event = AsioEvent.none()
end
elseif _notify is None then
if _use_event then
// Create a new event.
_event = @pony_asio_event_create(this, 0, AsioEvent.read(), 0, true)
else
// Start the read loop.
_loop_read()
end
end
try (_notify as InputNotify).dispose() end
_notify = consume notify
be _loop_read() =>
"""
If we are able to read from stdin, schedule another read.
"""
if _read() then
_loop_read()
end
be _event_notify(event: AsioEventID, flags: U32, arg: U32) =>
"""
When the event fires, read from stdin.
"""
if AsioEvent.disposable(flags) then
@pony_asio_event_destroy(event)
elseif (_event is event) and AsioEvent.readable(flags) then
_read()
end
be _read_again() =>
"""
Resume reading.
"""
_read()
fun ref _read(): Bool =>
"""
Read a chunk of data from stdin. Read a maximum of _chunk_size bytes, send
ourself a resume message and stop reading to avoid starving other actors.
"""
try
let notify = _notify as InputNotify
var sum: USize = 0
while true do
let chunk_size = _chunk_size
var data = recover Array[U8] .> undefined(chunk_size) end
let len = @pony_os_stdin_read(data.cpointer(), data.size())
match len
| -1 =>
// Error, possibly would block. Try again.
return true
| 0 =>
// EOF. Close everything, stop reading.
_close_event()
notify.dispose()
_notify = None
return false
end
data.truncate(len)
notify(consume data)
ifdef windows then
// Not allowed to call pony_os_stdin_read again yet, exit loop.
return true
end
sum = sum + len
if sum > (1 << 12) then
if _use_event then
_read_again()
end
break
end
end
true
else
// No notifier. Stop reading.
_close_event()
false
end
fun ref _close_event() =>
"""
Close the event.
"""
if not _event.is_null() then
@pony_asio_event_unsubscribe(_event)
_event = AsioEvent.none()
end
| pony | 1713450 | https://no.wikipedia.org/wiki/Vitenskaps%C3%A5ret%201248 | Vitenskapsåret 1248 | Vitenskapsåret 1248 er en oversikt over hendelser, prisvinnere, fødte og avdøde personer med tilknytning til vitenskap i 1248.
Hendelser
Universitetet i Oxford får kongelig charter.
Fødsler
Dødsfall
Referanser | norwegian_bokmål | 1.319952 |
Pony/buffered-Reader-.txt |
Reader¶
[Source]
Store network data and provide a parsing interface.
Reader provides a way to extract typed data from a sequence of
bytes. The Reader manages the underlying data structures to
provide a read cursor over a contiguous sequence of bytes. It is
useful for decoding data that is received over a network or stored
in a file. Chunk of bytes are added to the Reader using the
append method, and typed data is extracted using the getter
methods.
For example, suppose we have a UDP-based network data protocol where
messages consist of the following:
list_size - the number of items in the following list of items
as a big-endian 32-bit integer
zero or more items of the following data:
a big-endian 64-bit floating point number
a string that starts with a big-endian 32-bit integer that
specifies the length of the string, followed by a number of
bytes that represent the string
A message would be something like this:
[message_length][list_size][float1][string1][float2][string2]...
The following program uses a Reader to decode a message of
this type and print them:
use "buffered"
use "collections"
class Notify is InputNotify
let _env: Env
new create(env: Env) =>
_env = env
fun ref apply(data: Array[U8] iso) =>
let rb = Reader
rb.append(consume data)
try
while true do
let len = rb.i32_be()?
let items = rb.i32_be()?.usize()
for range in Range(0, items) do
let f = rb.f32_be()?
let str_len = rb.i32_be()?.usize()
let str = String.from_array(rb.block(str_len)?)
_env.out.print("[(" + f.string() + "), (" + str + ")]")
end
end
end
actor Main
new create(env: Env) =>
env.input(recover Notify(env) end, 1024)
class ref Reader
Constructors¶
create¶
[Source]
new iso create()
: Reader iso^
Returns¶
Reader iso^
Public Functions¶
size¶
[Source]
Return the number of available bytes.
fun box size()
: USize val
Returns¶
USize val
clear¶
[Source]
Discard all pending data.
fun ref clear()
: None val
Returns¶
None val
append¶
[Source]
Add a chunk of data.
fun ref append(
data: (String val | Array[U8 val] val))
: None val
Parameters¶
data: (String val | Array[U8 val] val)
Returns¶
None val
skip¶
[Source]
Skip n bytes.
fun ref skip(
n: USize val)
: None val ?
Parameters¶
n: USize val
Returns¶
None val ?
block¶
[Source]
Return a block as a contiguous chunk of memory.
Will throw an error if you request a block larger than what is currently
stored in the Reader.
fun ref block(
len: USize val)
: Array[U8 val] iso^ ?
Parameters¶
len: USize val
Returns¶
Array[U8 val] iso^ ?
read_until¶
[Source]
Find the first occurrence of the separator and return the block of bytes
before its position. The separator is not included in the returned array,
but it is removed from the buffer. To read a line of text, prefer line()
that handles \n and \r\n.
fun ref read_until(
separator: U8 val)
: Array[U8 val] iso^ ?
Parameters¶
separator: U8 val
Returns¶
Array[U8 val] iso^ ?
line¶
[Source]
Return a \n or \r\n terminated line as a string. By default the newline is not
included in the returned string, but it is removed from the buffer.
Set keep_line_breaks to true to keep the line breaks in the returned line.
fun ref line(
keep_line_breaks: Bool val = false)
: String iso^ ?
Parameters¶
keep_line_breaks: Bool val = false
Returns¶
String iso^ ?
u8¶
[Source]
Get a U8. Raise an error if there isn't enough data.
fun ref u8()
: U8 val ?
Returns¶
U8 val ?
i8¶
[Source]
Get an I8.
fun ref i8()
: I8 val ?
Returns¶
I8 val ?
u16_be¶
[Source]
Get a big-endian U16.
fun ref u16_be()
: U16 val ?
Returns¶
U16 val ?
u16_le¶
[Source]
Get a little-endian U16.
fun ref u16_le()
: U16 val ?
Returns¶
U16 val ?
i16_be¶
[Source]
Get a big-endian I16.
fun ref i16_be()
: I16 val ?
Returns¶
I16 val ?
i16_le¶
[Source]
Get a little-endian I16.
fun ref i16_le()
: I16 val ?
Returns¶
I16 val ?
u32_be¶
[Source]
Get a big-endian U32.
fun ref u32_be()
: U32 val ?
Returns¶
U32 val ?
u32_le¶
[Source]
Get a little-endian U32.
fun ref u32_le()
: U32 val ?
Returns¶
U32 val ?
i32_be¶
[Source]
Get a big-endian I32.
fun ref i32_be()
: I32 val ?
Returns¶
I32 val ?
i32_le¶
[Source]
Get a little-endian I32.
fun ref i32_le()
: I32 val ?
Returns¶
I32 val ?
u64_be¶
[Source]
Get a big-endian U64.
fun ref u64_be()
: U64 val ?
Returns¶
U64 val ?
u64_le¶
[Source]
Get a little-endian U64.
fun ref u64_le()
: U64 val ?
Returns¶
U64 val ?
i64_be¶
[Source]
Get a big-endian I64.
fun ref i64_be()
: I64 val ?
Returns¶
I64 val ?
i64_le¶
[Source]
Get a little-endian I64.
fun ref i64_le()
: I64 val ?
Returns¶
I64 val ?
u128_be¶
[Source]
Get a big-endian U128.
fun ref u128_be()
: U128 val ?
Returns¶
U128 val ?
u128_le¶
[Source]
Get a little-endian U128.
fun ref u128_le()
: U128 val ?
Returns¶
U128 val ?
i128_be¶
[Source]
Get a big-endian I129.
fun ref i128_be()
: I128 val ?
Returns¶
I128 val ?
i128_le¶
[Source]
Get a little-endian I128.
fun ref i128_le()
: I128 val ?
Returns¶
I128 val ?
f32_be¶
[Source]
Get a big-endian F32.
fun ref f32_be()
: F32 val ?
Returns¶
F32 val ?
f32_le¶
[Source]
Get a little-endian F32.
fun ref f32_le()
: F32 val ?
Returns¶
F32 val ?
f64_be¶
[Source]
Get a big-endian F64.
fun ref f64_be()
: F64 val ?
Returns¶
F64 val ?
f64_le¶
[Source]
Get a little-endian F64.
fun ref f64_le()
: F64 val ?
Returns¶
F64 val ?
peek_u8¶
[Source]
Peek at a U8 at the given offset. Raise an error if there isn't enough
data.
fun box peek_u8(
offset: USize val = 0)
: U8 val ?
Parameters¶
offset: USize val = 0
Returns¶
U8 val ?
peek_i8¶
[Source]
Peek at an I8.
fun box peek_i8(
offset: USize val = 0)
: I8 val ?
Parameters¶
offset: USize val = 0
Returns¶
I8 val ?
peek_u16_be¶
[Source]
Peek at a big-endian U16.
fun box peek_u16_be(
offset: USize val = 0)
: U16 val ?
Parameters¶
offset: USize val = 0
Returns¶
U16 val ?
peek_u16_le¶
[Source]
Peek at a little-endian U16.
fun box peek_u16_le(
offset: USize val = 0)
: U16 val ?
Parameters¶
offset: USize val = 0
Returns¶
U16 val ?
peek_i16_be¶
[Source]
Peek at a big-endian I16.
fun box peek_i16_be(
offset: USize val = 0)
: I16 val ?
Parameters¶
offset: USize val = 0
Returns¶
I16 val ?
peek_i16_le¶
[Source]
Peek at a little-endian I16.
fun box peek_i16_le(
offset: USize val = 0)
: I16 val ?
Parameters¶
offset: USize val = 0
Returns¶
I16 val ?
peek_u32_be¶
[Source]
Peek at a big-endian U32.
fun box peek_u32_be(
offset: USize val = 0)
: U32 val ?
Parameters¶
offset: USize val = 0
Returns¶
U32 val ?
peek_u32_le¶
[Source]
Peek at a little-endian U32.
fun box peek_u32_le(
offset: USize val = 0)
: U32 val ?
Parameters¶
offset: USize val = 0
Returns¶
U32 val ?
peek_i32_be¶
[Source]
Peek at a big-endian I32.
fun box peek_i32_be(
offset: USize val = 0)
: I32 val ?
Parameters¶
offset: USize val = 0
Returns¶
I32 val ?
peek_i32_le¶
[Source]
Peek at a little-endian I32.
fun box peek_i32_le(
offset: USize val = 0)
: I32 val ?
Parameters¶
offset: USize val = 0
Returns¶
I32 val ?
peek_u64_be¶
[Source]
Peek at a big-endian U64.
fun box peek_u64_be(
offset: USize val = 0)
: U64 val ?
Parameters¶
offset: USize val = 0
Returns¶
U64 val ?
peek_u64_le¶
[Source]
Peek at a little-endian U64.
fun box peek_u64_le(
offset: USize val = 0)
: U64 val ?
Parameters¶
offset: USize val = 0
Returns¶
U64 val ?
peek_i64_be¶
[Source]
Peek at a big-endian I64.
fun box peek_i64_be(
offset: USize val = 0)
: I64 val ?
Parameters¶
offset: USize val = 0
Returns¶
I64 val ?
peek_i64_le¶
[Source]
Peek at a little-endian I64.
fun box peek_i64_le(
offset: USize val = 0)
: I64 val ?
Parameters¶
offset: USize val = 0
Returns¶
I64 val ?
peek_u128_be¶
[Source]
Peek at a big-endian U128.
fun box peek_u128_be(
offset: USize val = 0)
: U128 val ?
Parameters¶
offset: USize val = 0
Returns¶
U128 val ?
peek_u128_le¶
[Source]
Peek at a little-endian U128.
fun box peek_u128_le(
offset: USize val = 0)
: U128 val ?
Parameters¶
offset: USize val = 0
Returns¶
U128 val ?
peek_i128_be¶
[Source]
Peek at a big-endian I129.
fun box peek_i128_be(
offset: USize val = 0)
: I128 val ?
Parameters¶
offset: USize val = 0
Returns¶
I128 val ?
peek_i128_le¶
[Source]
Peek at a little-endian I128.
fun box peek_i128_le(
offset: USize val = 0)
: I128 val ?
Parameters¶
offset: USize val = 0
Returns¶
I128 val ?
peek_f32_be¶
[Source]
Peek at a big-endian F32.
fun box peek_f32_be(
offset: USize val = 0)
: F32 val ?
Parameters¶
offset: USize val = 0
Returns¶
F32 val ?
peek_f32_le¶
[Source]
Peek at a little-endian F32.
fun box peek_f32_le(
offset: USize val = 0)
: F32 val ?
Parameters¶
offset: USize val = 0
Returns¶
F32 val ?
peek_f64_be¶
[Source]
Peek at a big-endian F64.
fun box peek_f64_be(
offset: USize val = 0)
: F64 val ?
Parameters¶
offset: USize val = 0
Returns¶
F64 val ?
peek_f64_le¶
[Source]
Peek at a little-endian F64.
fun box peek_f64_le(
offset: USize val = 0)
: F64 val ?
Parameters¶
offset: USize val = 0
Returns¶
F64 val ?
| pony | 2012304 | https://no.wikipedia.org/wiki/Miami%20Dolphins%20i%20NFL-sesongen%202022 | Miami Dolphins i NFL-sesongen 2022 | Miami Dolphins spilte i lagets 53. sesong i National Football League (NFL), 57. totalt, første under hovedtrener Mike McDaniel og syvende under general manager Chris Grier.
Dolphins nådde sluttspillet for første gang siden 2016 og sikret en tredje vinnende sesong på rad for første gang siden 2001–2003. Dolphins hadde sin beste sesongstart, på 8–3, siden 2001, men tapte deretter fem strake kamper. I sesongfinalen mot New York Jets vant Dolphins, og sikret en tangering av fjorårets sesongresultat samt en plass i sluttspillet. De endte seriespillet med samme sesongresultat som Pittsburgh Steelers, men vant tiebreakeren etter en seier over Steelers i uke 7. Dolphins møtte divisjonsrivalene Buffalo Bill i wildcardrunden, hvor de tapte 34–31.
Draft
Bytter
Personale ved sesongslutt
Spillerstall ved sesongslutt
Sesongoppkjøring
Seriespill
Terminliste
Note: Divisjonslag vises i fet tekst.
Kampreferater
Uke 1: mot New England Patriots
Uke 2: at Baltimore Ravens
Uke 3: mot Buffalo Bills
Uke 4: at Cincinnati Bengals
Uke 5: at New York Jets
Uke 6: mot Minnesota Vikings
Uke 7: mot Pittsburgh Steelers
Uke 8: at Detroit Lions
Uke 9: at Chicago Bears
Uke 10: mot Cleveland Browns
Uke 12: mot Houston Texans
{{Americanfootballbox
|titlestyle=;text-align:center;
|state=autocollapse
|title=Uke 12: Houston Texans at Miami Dolphins – Kampreferat
|date=27. november
|time=13:00 EST
|road=Texans
|R1=0|R2=0|R3=6|R4=9
|home=Dolphins
|H1=10|H2=20|H3=0|H4=0
|stadium=Hard Rock Stadium, Miami Gardens, Florida
|attendance=66 205
|weather= og delvis skyet
|referee=Jerome Boger
|TV=CBS
|TVAnnouncers=Spero Dedes, Jay Feely og Aditi Kinkhabwala
|reference=Oppsummering, Game Book
|scoring=
Første kvarter
MIA – Jason Sanders 45-yard field goal, 10:21. Dolphins 3–0. Drive: 9 plays, 39 yards, 3:01.
MIA – Durham Smythe 4-yard pasning fra Tua Tagovailoa (Jason Sanders spark), 2:57. Dolphins 10–0. Drive: 8 plays, 59 yards, 4:44.
Andre kvarter
MIA – Jeff Wilson 3-yard løp (Jason Sanders spark), 12:22. Dolphins 17–0. Drive: 1 play, 3 yards, 0:05.
MIA – Jason Sanders 23-yard field goal, 6:22. Dolphins 20–0. Drive: 10 plays, 72 yards, 4:32.
MIA – Xavien Howard 16-yard fumble return (Jason Sanders spark), 4:59. Dolphins 27–0.MIA – Jason Sanders 35-yard field goal, 0:00. Dolphins 30–0. Drive: 11 plays, 71 yards, 1:52.Tredje kvarterHOU – Dare Ogunbowale 3-yard løp (mislykket løp), 10:21. Dolphins 30–6. Drive: 6 plays, 64 yards, 3:10.Fjerde kvarterHOU – Jordan Akins 25-yard pasning fra Kyle Allen (mislykket pasning), 12:46. Dolphins 30–12. Drive: 6 plays, 50 yards, 2:25.
HOU – Ka'imi Fairbairn 28-yard field goal, 9:00. Dolphins 30–15. Drive: 8 plays, 57 yards, 2:47.
|stats=Beste passereHOU – Kyle Allen – 26/39, 215 yards, TD, 2 INT
MIA – Tua Tagovailoa – 22/36, 299 yards, TDBeste på løpHOU – Dare Ogunbowale – 4 løp, 14 yards, TD
MIA – Jeff Wilson – 13 løp, 39 yards, TDBeste mottakereHOU – Jordan Akins – 5 mottakelser, 61 yards, TD
MIA – Tyreek Hill – 6 mottakelser, 85 yards
}}
Uke 13: at San Francisco 49ers
Uke 14: at Los Angeles Chargers
Uke 15: at Buffalo Bills
Uke 16: mot Green Bay PackersJulekamp'''
Uke 17: at New England Patriots
Uke 18: mot New York Jets
Tabeller
Divisjon
Conference
Sluttspill
Terminliste
Kampreferater
AFC Wildcardrunden: at (2) Buffalo Bills
Priser og utmerkelser
Referanser
Eksterne lenker
National Football League-sesongen 2022 etter lag
2022
Sport i USA i 2022 | norwegian_bokmål | 1.095974 |
Pony/files-FileExec-.txt |
FileExec¶
[Source]
primitive val FileExec
Constructors¶
create¶
[Source]
new val create()
: FileExec val^
Returns¶
FileExec val^
Public Functions¶
value¶
[Source]
fun box value()
: U32 val
Returns¶
U32 val
eq¶
[Source]
fun box eq(
that: FileExec val)
: Bool val
Parameters¶
that: FileExec val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: FileExec val)
: Bool val
Parameters¶
that: FileExec val
Returns¶
Bool val
| pony | 2294801 | https://sv.wikipedia.org/wiki/Eosentomon%20affine | Eosentomon affine | Eosentomon affine är en urinsektsart som beskrevs av Sören Ludvig Paul Tuxen 1967. Eosentomon affine ingår i släktet Eosentomon och familjen trakétrevfotingar. Inga underarter finns listade i Catalogue of Life.
Källor
Externa länkar
Trakétrevfotingar
affine | swedish | 1.137591 |
Pony/bureaucracy--index-.txt |
Bureaucracy package¶
It happens to almost every program. It starts small, tiny if you will, like a
village where every actor knows every other actor and shutdown is easy. One day
you realize your program is no longer a cute seaside hamlet, its a bustling
metropolis and you are doing way too much work to keep track of everything.
What do you do? Call for a little bureaucracy.
The bureaucracy contains objects designed to ease your bookkeeping burdens.
Need to shutdown a number of actors together? Check out Custodian. Need
to keep track of a lot of stuff and be able to look it up by name? Check out
Registrar.
Put bureaucracy to use today and before long, your sprawling metropolis of a
code base will be manageable again in no time.
Public Types¶
actor Custodian
actor Registrar
| pony | 37602 | https://da.wikipedia.org/wiki/Storyboard | Storyboard | Et storyboard er det billedmateriale, som en instruktør og en storyboarder + evt. en kameramand laver sammen, for at have en visuel repræsentation af hvordan den færdige film skal se ud. Storyboardet beskriver hver ny kameraindstilling, og giver et overblik over hvilke vinkler af de givne rum det er nødvendigt at visualisere og hvilke skuespillere det er nødvendigt at have tilstede samtidigt på sættet.
En storyboarder er som regel illustrator, animator eller tegneserietegner.
Af danske storyboardere kan nævnes Jan Solheim, Lars Munck, Simon Bang, Sune Elskær.
Formål
Et grundigt storyboard er et bidrag til en grundig og økonomisk fordelagtig produktionsplanlægning; filmen kan nærmest rå-klippes på forhånd og det bliver mindre nødvendigt at samle op på manglende klip og indstillinger efterfølgende – hvor en genopbygning af scenografien vil være uforholdsmæssig dyr.
Derudover kan storyboardet bruges af instruktøren til at bevare den kunstneriske kontrol. Instruktøren Alfred Hitchcocks film havde som regel et storyboard. Alfred Hitchcock lærte af bitter erfaring kun at optage præcis de scener og klip som skulle med i hans film – kun på den måde kunne han undgå at filmselskabet skamklippede hans film.
En films skudliste kan udarbejdes fra storyboardet.
Form
Storyboardet kan bestå af et billede i den ene side, med det som skal være i den færdige indstilling, og en tekst i den anden side med det der bliver sagt eller tekniske informationer til skuddet + pile i billedet der beskriver evt. bevægelse. En anden form for storyboard består af små (enten tegnede eller beskrevne) papirslapper, som sættes op på opslagstavler, sådan så der nemt kan rokeres rundt og justeres op det.
Til meget dyre produktioner – tegnefilm, actionfilm, eventyrfilm fremstilles derudover også ofte en animatic – som er et filmet storyboard med midlertidig lyd på, evt med animerede sekvenser
Film
Infografik
Filmhold | danish | 1.093919 |
Pony/src-process-auth-.txt |
auth.pony
1
2
3primitive StartProcessAuth
new create(from: AmbientAuth) =>
None
| pony | 4453717 | https://sv.wikipedia.org/wiki/Pouteria%20austin-smithii | Pouteria austin-smithii | Pouteria austin-smithii är en tvåhjärtbladig växtart som först beskrevs av Paul Carpenter Standley, och fick sitt nu gällande namn av Arthur John Cronquist. Pouteria austin-smithii ingår i släktet Pouteria och familjen Sapotaceae. IUCN kategoriserar arten globalt som sårbar.
Artens utbredningsområde är Costa Rica. Inga underarter finns listade i Catalogue of Life.
Källor
Ljungordningen
austin-smithii | swedish | 1.336588 |
Pony/collections-persistent-MapKeys-.txt |
MapKeys[K: Any #share, V: Any #share, H: HashFunction[K] val]¶
[Source]
class ref MapKeys[K: Any #share, V: Any #share, H: HashFunction[K] val]
Constructors¶
create¶
[Source]
new ref create(
m: HashMap[K, V, H] val)
: MapKeys[K, V, H] ref^
Parameters¶
m: HashMap[K, V, H] val
Returns¶
MapKeys[K, V, H] ref^
Public Functions¶
has_next¶
[Source]
fun box has_next()
: Bool val
Returns¶
Bool val
next¶
[Source]
fun ref next()
: K ?
Returns¶
K ?
| pony | 8391033 | https://sv.wikipedia.org/wiki/Havana%2C%20Kansas | Havana, Kansas | Havana är en ort i Montgomery County i Kansas. Vid 2010 års folkräkning hade Havana 104 invånare.
Källor
Orter i Kansas
Montgomery County, Kansas | swedish | 1.132995 |
Pony/reference-capabilities.txt | # Reference Capabilities
So if the object _is_ the capability, what controls what we can do with the object? How do we express our _access rights_ on that object?
In Pony, we do it with _reference capabilities_.
## Rights are part of a capability
If you open a file in UNIX and get a file descriptor back, that file descriptor is a token that designates an object - but it isn't a capability. To be a capability, we need to open that file with some permission - some access right. For example:
```C
int fd = open("/etc/passwd", O_RDWR);
```
Now we have a token and a set of rights.
In Pony, every reference has both a type and a reference capability. In fact, the reference capability is _part_ of its type. These allow you to specify which of your objects can be shared with other actors and allow the compiler to check that what you're doing is concurrency safe.
## Basic concepts
There are a few simple concepts you need to understand before reference capabilities will make any sense. We've talked about some of these already, and some may already be obvious to you, but it's worth recapping here.
### Shared mutable data is hard
The problem with concurrency is shared mutable data. If two different threads have access to the same piece of data then they might try to update it at the same time. At best this can lead to the two threads having different versions of the data. At worst the updates can interact badly resulting in the data being overwritten with garbage. The standard way to avoid these problems is to use locks to prevent data updates from happening at the same time. This causes big performance hits and is very difficult to get right, so it causes lots of bugs.
### Immutable data can be safely shared
Any data that is immutable (i.e. it cannot be changed) is safe to use concurrently. Since it is immutable it is never updated and it's the updates that cause concurrency problems.
### Isolated data is safe
If a block of data has only one reference to it then we call it __isolated__. Since there is only one reference to it, isolated data cannot be __shared__ by multiple threads, so there are no concurrency problems. Isolated data can be passed between multiple threads. As long as only one of them has a reference to it at a time then the data is still safe from concurrency problems.
### Isolated data may be complex
An isolated piece of data may be a single byte. But it can also be a large data structure with multiple references between the various objects in that structure. What matters for the data to be isolated is that there is only a single reference to that structure as a whole. We talk about the __isolation boundary__ of a data structure. For the structure to be isolated:
1. There must only be a single reference outside the boundary that points to an object inside.
2. There can be any number of references inside the boundary, but none of them must point to an object outside.
### Every actor is single threaded
The code within a single actor is never run concurrently. This means that, within a single actor, data updates cannot cause problems. It's only when we want to share data between actors that we have problems.
__OK, safely sharing data concurrently is tricky. How do reference capabilities help?__
By sharing only immutable data and exchanging only isolated data we can have safe concurrent programs without locks. The problem is that it's very difficult to do that correctly. If you accidentally hang on to a reference to some isolated data you've handed over or change something you've shared as immutable then everything goes wrong. What you need is for the compiler to force you to live up to your promises. Pony reference capabilities allow the compiler to do just that.
## Type qualifiers
If you've used C/C++, you may be familiar with `const`, which is a _type qualifier_ that tells the compiler not to allow the programmer to _mutate_ something.
A reference capability is a form of _type qualifier_ and provides a lot more guarantees than `const` does!
In Pony, every use of a type has a reference capability. These capabilities apply to variables, rather than to the type as a whole. In other words, when you define a class `Wombat`, you don't pick a reference capability for all instances of the class. Instead, `Wombat` variables each have their own reference capability.
As an example, in some languages, you have to define a type that represents a mutable `String` and another type that represents an immutable `String`. For example, in Java, there is a `String` and a `StringBuilder`. In Pony, you can define a single class `String` and have some variables that are `String ref` (which are mutable) and other variables that are `String val` (which are immutable).
## The list of reference capabilities
There are six reference capabilities in Pony and they all have strict definitions and rules on how they can be used. We'll get to all of that later, but for now here are their names and what you use them for:
__Isolated__, written `iso`. This is for references to isolated data structures. If you have an `iso` variable then you know that there are no other variables that can access that data. So you can change it however you like and give it to another actor.
__Value__, written `val`. This is for references to immutable data structures. If you have a `val` variable then you know that no-one can change the data. So you can read it and share it with other actors.
__Reference__, written `ref`. This is for references to mutable data structures that are not isolated, in other words, "normal" data. If you have a `ref` variable then you can read and write the data however you like and you can have multiple variables that can access the same data. But you can't share it with other actors.
__Box__. This is for references to data that is read-only to you. That data might be immutable and shared with other actors or there may be other variables using it in your actor that can change the data. Either way, the `box` variable can be used to safely read the data. This may sound a little pointless, but it allows you to write code that can work for both `val` and `ref` variables, as long as it doesn't write to the object.
__Transition__, written `trn`. This is used for data structures that you want to write to, while also holding read-only (`box`) variables for them. You can also convert the `trn` variable to a `val` variable later if you wish, which stops anyone from changing the data and allows it be shared with other actors.
__Tag__. This is for references used only for identification. You cannot read or write data using a `tag` variable. But you can store and compare `tag`s to check object identity and share `tag` variables with other actors.
Note that if you have a variable referring to an actor then you can send messages to that actor regardless of what reference capability that variable has.
## How to write a reference capability
A reference capability comes at the end of a type. So, for example:
```pony
String iso // An isolated string
String trn // A transition string
String ref // A string reference
String val // A string value
String box // A string box
String tag // A string tag
```
__What does it mean when a type doesn't specify a reference capability?__ It means you are using the _default_ reference capability for that type, which is defined along with the type. Here’s an example from the standard library:
```pony
class val String
```
When we use a String we usually mean an immutable string value, so we make `val` the default reference capability for `String` (but not necessarily for `String` constructors, see below). For example, when we don't specify the capability in the following code, the compiler understands that we are using the default reference capability `val` specified in the type definition:
```pony
let a: String val = "Hello, world!"
let b: String = "I'm a wombat!" // Also a String val
```
__So do I have to specify a reference capability when I define a type?__ Only if you want to. There are sensible defaults that most types will use. These are `ref` for classes, `val` for primitives (i.e. immutable references), and `tag` for actors.
## How to create objects with different capabilities
When you write a constructor, by default, that constructor will either create a new object with `ref` or `tag` as the capability. In the case of actors, the constructor will always create a `tag`. For classes, it defaults to `ref` but you can create with other capabilities. Let's take a look at an example:
```pony
class Foo
let x: U32
new val create(x': U32) =>
x = x'
```
Now when you call `Foo.create(1)`, you'll get a `Foo val` instead of `Foo ref`.
But what if you want to create both `val` and `ref` `Foo`s? You could do something like this:
```pony
class Foo
let x: U32
new val create_val(x': U32) =>
x = x'
new ref create_ref(x': U32) =>
x = x'
```
But, that's probably not what you'd really want to do. Better to use the capabilities recovery facilities of Pony that we'll cover later in the [Recovering Capabilities](/reference-capabilities/recovering-capabilities.md) section.
| pony | 1058243 | https://da.wikipedia.org/wiki/Rust%20%28programmeringssprog%29 | Rust (programmeringssprog) | Rust er et multi-paradigme programmeringssprog skabt af Graydon Hoare, der er omhyggeligt designet til at levere høj ydeevne og it-sikkerhed.
Sproget er særligt kendt for sin evne til at håndtere samtidighed på en sikker måde, hvilket minimerer risikoen for kørselsfejl. Rust svarer syntaktisk til C og C++, men kan garantere hukommelsessikkerhed ved at bruge en lånekontrol til at validere referencer. Man kan dog komme uden om dette ved f.eks. at bruge et såkaldt 'unsafe' keyword, hvilket giver mere fleksibilitet, men også øger programmørens ansvar for korrekt hukommelsesstyring, da det tillader kode, der potentielt kan bryde hukommelsessikkerheden .
Historie
I 2006 besluttede Graydon Hoare, en 29-årig computerprogrammør, der arbejdede for Mozilla, at designe et nyt programmeringssprog. Han blev inspireret af en frustrerende oplevelse med en elevator, der konstant gik i stykker på grund af softwarefejl. Hoare vidste, at mange af disse fejl skyldtes problemer med, hvordan et program bruger hukommelse. Han besluttede sig derfor at skabe et sprog, der kunne skrive hurtig kode uden hukommelsesbugs. Rust har fået sit navn efter en gruppe af bemærkelsesværdigt hårdføre svampe, Rustsvampe, som ifølge Hoare er "over-engineered for survival" .
Over et halvandet årti senere er Rust blevet et af de mest populære programmeringssprog.
Rust blev officielt sponsoreret af Mozilla i 2009. Sproget ville være open source, og kun de mennesker, der bidrog til dets udvikling, ville have ansvar for det. Mozilla var dog parat til at kickstarte det ved at finansiere projektet . I løbet af de følgende 10 år hyrede Mozilla mere end et dusin ingeniører til at arbejde fuldtid på Rust .
I 2015 blev den første stabile version af Rust udgivet, og det blev hurtigt populært blandt store virksomheder. I 2020 afslørede Dropbox en ny version af deres "sync engine", altså dét som synkroniserer filer i skyen, der var omskrevet til Rust . I samme år omskrev Discord deres "Read States" service, en kritisk service der holder styr på, hvilke kanaler og beskeder brugere har læst, til Rust, hvilket resulterede i en markant forbedring og derved gjorde systemet 10 gange hurtigere . Amazon Web Services, som leverer cloud computing-platforme og API'er efter behov, har også fundet, at Rust kan hjælpe dem med at skrive sikrere, hurtigere kode .
I Stack Overflows udviklerundersøgelse fra 2023, som de afholder hvert år, er Rust blevet kåret som det mest beundrede programmeringssprog, hvor over 80% af de udviklere, der har anvendt sproget, har udtrykt et ønske om at fortsætte med det i det kommende år . Dette står i skarp kontrast til det mindst attraktive sprog, MATLAB, hvor under 20% af de udviklere, der har brugt det, ønsker at fortsætte med det i det følgende år . Faktisk har Rust de sidste 7 år blevet kåret til at være det mest beundrede programmeringssprog ifølge samme undersøgelse .
Sikkerhedsforanstaltninger
I Rust beregner compileren, hvornår en variabel ikke længere er tilgængelig, og når det sker, indsætter compileren kode til frigivelse af variablens hukommelse. Variabler er som udgangspunkt uforanderlige (immutable), hvilket betyder, at deres værdi ikke kan ændres, når de først er blevet tildelt. Hvis en variabel skal kunne ændres, kan den defineres som foranderlig (mutable) ved at bruge 'mut' nøgleordet foran variabelnavnet.
Når en funktion modtager en variabel som parameter, overtager den som udgangspunkt ejerskabet, medmindre parameteren er en reference. Ved at definere parameteren som en reference, 'låner' funktionen variablen uden at overtage ejerskabet.
En reference giver som udgangspunkt kun læseadgang, men det er muligt at definere foranderlige (mutable) referencer, der tillader opdatering. Rust tillader kun én foranderlig reference til en bestemt data i en bestemt rækkevidde, hvilket hjælper med at forhindre 'data race' betingelser. En 'data race' opstår, når to eller flere tråde i en multithreaded applikation samtidigt forsøger at læse fra og skrive til den samme hukommelsesplads uden passende synkronisering. Desuden tillader Rust flere uforanderlige (immutable) referencer, men ikke en mutable reference samtidig med nogen immutable referencer. Dette er også en del af Rusts regler for "aliasing" og "mutability", som sikrer mod fejl, hvor data ændres eller slettes under læsning.
Programstruktur
Rust-programmer er typisk struktureret i mange funktioner, der kalder hinanden. Dette hjælper med at holde kode organiseret og genanvendelig.
Rust understøtter også moduler, som er en måde at gruppere relaterede definitioner, såsom funktioner, strukturer (datastrukturer, der kan indeholde forskellige typer data) og træk (en måde at definere fælles adfærd på), sammen. Som standard er alle definitioner i et modul private, hvilket betyder, at de kun kan tilgås inden for det modul, de er defineret i. Hvis en definition skal være tilgængelig uden for det modul, det er defineret i, kan det gøres offentligt ved hjælp af nøgleordet 'pub'.
I større Rust-programmer kan moduler være indlejret i hinanden for at skabe en hierarkisk struktur. Dette kan hjælpe med at organisere kode i logiske grupper. Desuden kan moduler flyttes ud i deres egne filer for at gøre koden mere overskuelig og nemmere at vedligeholde.
Her er et eksempel på, hvordan moduler kan bruges i Rust:
// Definerer et modul med navnet 'greetings'
mod greetings {
// Gør 'hello' funktionen offentlig med 'pub' nøgleordet
pub fn hello() {
println!("Hello, world!");
}
// 'goodbye' funktionen er privat og kan kun tilgås inden for 'greetings' modulet
fn goodbye() {
println!("Goodbye, world!");
}
}
// Hovedfunktionen
fn main() {
// Kalder den offentlige 'hello' funktion fra 'greetings' modulet
greetings::hello();
}
I dette eksempel er 'hello'-funktionen defineret i 'greetings'-modulet og gjort offentlig, så den kan kaldes fra 'main'-funktionen. Derimod er 'goodbye'-funktionen privat og kan kun kaldes inden for 'greetings'-modulet.
Eksempel
Her er et simpelt eksempel på et CLI script skrevet i Rust, hvor der genereres et tilfældigt tal ved hjælp af rand-programbiblioteket.
// Her importeres 'rand' biblioteket, som muliggør generering af tilfældige tal.
use rand::Rng;
// Hovedfunktionen, hvor programmet starter.
fn main() {
// Kalder 'generate_random_number' funktionen og gemmer resultatet i et uforanderligt variabel.
let random_number = generate_random_number();
// Her skrives en linje til konsollen.
println!("Det tilfældige tal er: {}", random_number);
}
// Funktion der genererer et tilfældigt tal mellem 1 og 10.
fn generate_random_number() -> i32 {
// Opretter en ny tilfældig nummergenerator.
let mut rng = rand::thread_rng();
// Genererer et tilfældigt tal mellem 1 og 10
// Der skrives ikke '1..10', men i stedet '1..11', fordi den øvre grænse, 11, ikke er inkluderet
let random_number = rng.gen_range(1..11);
// Returnerer det tilfældige tal.
return random_number;
}
Se også
Redox (styresystem) - skrevet i Rust
Referencer
Links
https://rust-lang.org - Rusts officielle hjemmeside
https://doc.rust-lang.org/stable/book/ - En guide til Rust
Programmeringssprog | danish | 0.684868 |
Pony/src-format-format_spec-.txt |
format_spec.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41trait val FormatSpec
primitive FormatDefault is FormatSpec
primitive FormatUTF32 is FormatSpec
primitive FormatBinary is FormatSpec
primitive FormatBinaryBare is FormatSpec
primitive FormatOctal is FormatSpec
primitive FormatOctalBare is FormatSpec
primitive FormatHex is FormatSpec
primitive FormatHexBare is FormatSpec
primitive FormatHexSmall is FormatSpec
primitive FormatHexSmallBare is FormatSpec
type FormatInt is
( FormatDefault
| FormatUTF32
| FormatBinary
| FormatBinaryBare
| FormatOctal
| FormatOctalBare
| FormatHex
| FormatHexBare
| FormatHexSmall
| FormatHexSmallBare )
primitive FormatExp is FormatSpec
primitive FormatExpLarge is FormatSpec
primitive FormatFix is FormatSpec
primitive FormatFixLarge is FormatSpec
primitive FormatGeneral is FormatSpec
primitive FormatGeneralLarge is FormatSpec
type FormatFloat is
( FormatDefault
| FormatExp
| FormatExpLarge
| FormatFix
| FormatFixLarge
| FormatGeneral
| FormatGeneralLarge )
| pony | 114951 | https://sv.wikipedia.org/wiki/Format | Format | Format kan syfta på:
Format (bokbinderi) – formatet på en bok
American Screen Standard – ett format för filmmanus
Tvåspaltsmanus – format för manus som skrivs inom svensk TV
Programformat – ett begrepp inom radio- och TV-branschen som anger en detaljerad struktur för ett radio eller TV-program
Filformat – den interna struktur av digitala datafiler
Format (data) – mönster enligt vilket data ordnas vid t.ex. datainsamling.
Pappersformat – standardmått på pappersark
Se även
Form | swedish | 0.713119 |
Pony/compiler-args.txt | # Compiler Arguments
`ponyc`, the compiler, is usually called in the project directory, where it finds the `.pony` files and its dependencies automatically. There it will create the binary based on the directory name. You can override this and tune the compilation with several options as described via `ponyc --help` and you can pass a separate source directory as an argument.
```bash
ponyc [OPTIONS] <package directory>
```
The most useful options are `--debug`, `--path` or just `-p`, `--output` or just `-o` and `--docs` or `-g`.
`--debug` will skip the LLVM optimizations passes. This should not be mixed up with `make config=debug`, the default make configuration target. `config=debug` will create DWARF symbols, and add slower assertions to ponyc, but not to the generated binaries. For those, you can omit DWARF symbols with the `--strip` or `-s` option.
`--path` or `-p` take a `:` separated path list as the argument and adds those to the compile-time library paths for the linker to find source packages and the native libraries, static or dynamic, being linked at compile-time or via the FFI at run-time. The system adds several paths already, e.g. on windows it queries the registry to find the compiler run-time paths, you can also use `use "lib:path"` statements in the source code and as a final possibility, you can add `-p` paths. But if you want the generated binary to accept such a path to find a dynamic library on your client system, you need to handle that in your source code by yourself. See the `options` package for this.
`--output` or `-o` takes a directory name where the final binary is created.
`--docs` or -`g` creates a directory of the package with documentation in [Read the Docs](http://readthedocs.org) format, i.e. markdown with nice navigation.
Let's study the documentation of the builtin standard library:
```bash
pip install mkdocs
ponyc packages/stdlib --docs && cd stdlib-docs && mkdocs serve
```
And point your web browser to [127.0.0.1:8000](http://127.0.0.1:8000) serving a live-reloading local version of the docs.
Note that there is _no built-in debugger_ to interactively step through your program and interpret the results. But ponyc creates proper DWARF symbols and you can step through your programs with a conventional debugger, such as GDB or LLDB.
## Runtime options for Pony programs
Besides using the `cli` package, there are also several built-in options for the generated binary (_not for use with ponyc_) starting with `--pony*`, see `ponyc --help`, to tweak runtime performance. You can override the number of initial threads, tune cycle detection (_CD_), the garbage collector and even turn off yield, which is not really recommended.
| pony | 1425331 | https://sv.wikipedia.org/wiki/Debug | Debug | debug är ett kommando i DOS, MS-DOS, OS/2 och Microsoft Windows (endast x86 versioner, inte x64) vilket programmet debug.exe (eller DEBUG.COM i äldre DOS-versioner) använder sig av. Debug kan användas som en assembler, Disassemblator, eller program för hexadecimal dump som tillåter användaren att interaktivt undersöka datorminnets innehåll (i assembler, hexadecimal eller ASCII), göra ändringar, och selektivt exekvera COM-fil, EXE och andra typer av filer. Det har också flera kommandon som används för att nå en viss disksektor, minnesmappad I/O port och minnesadresser. MS-DOS Debug är skriven för 16-bitars processer och är därför begränsad till 16-bitars datorprogram. FreeDOS Debug har en "DEBUGX"-version som också stödjer 32-bitars DPMI-programs.
Bakgrund
Traditionellt har alla datorer och operativsystem inkluderat en underhållsfunktion, som används för att undersöka om ett program arbetar korrekt. Debug skrevs av Tim Paterson för att tjäna detta syfte för QDOS. När Paterson började arbeta för Microsoft i början av 1980-talet tog han programmet med sig. Debug var en del av DOS 1.00 och har varit inkluderat i MS-DOS och Microsoft Windows. MS-DOS Debug har flera begränsningar:
Det kan bara läsa 16-bit register och inte 32-bit (extended) register.
När kommandot "n" används för att namnge filer lagras filnamnet offset DS:5D till DS:67 vilket betyder att programmet endast kan spara filer i FAT 8.3 filnamnsformat.
MS-DOS Debug kan bara läsa konventionellt minne, vilket är de första 640 kB i en IBM PC.
Kloner av Debug för 32-bitar, som FreeDOS Debug, har skrivits.
Syntax
debug [[Drive:][Path] FileName [parameters]]
När Debug körs utan någon parameter visas Debug-prompten, "-". Användaren kan då ange ett av flera kommandon med en eller två bokstäver, inklusive "a" för att gå in i assembler mode, "d" för att gör en hexadecimal dump, "t" för att spåra (trace) och "u" för att disassemblera (unassemble) ett program i minnet.
Debug kan också användas som "debug script" interpretator med följande syntax.
debug < FileName
En script-fil kan innehålla Debug-kommandon och assemblerinstruktioner. Denna metod kan användas för att skapa eller editera binärfiler från batchfiler.
Se även
Lista på DOS-kommandon
Edlin är ett annat DOS-verktyg som har skrivits av Tim Paterson.
SoftICE är en modern avlusare som har ärvt sin syntax från Debug
debug tutorial: http://www.armory.com/~rstevew/Public/Tutor/Debug/debug-manual.html
Referenser
Noter
Externa länkar
A Guide to DEBUG
Information about the debug command
Computer Debug Routines / Machine Code
, FreeDOS Debug
Programspråk
MS-DOS | swedish | 0.839882 |
Pony/net-UDPNotify-.txt |
UDPNotify¶
[Source]
Notifications for UDP connections.
For an example of using this class please see the documentatoin for the
UDPSocket actor.
interface ref UDPNotify
Public Functions¶
listening¶
[Source]
Called when the socket has been bound to an address.
fun ref listening(
sock: UDPSocket ref)
: None val
Parameters¶
sock: UDPSocket ref
Returns¶
None val
not_listening¶
[Source]
Called if it wasn't possible to bind the socket to an address.
It is expected to implement proper error handling. You need to opt in to
ignoring errors, which can be implemented like this:
fun ref not_listening(sock: UDPSocket ref) =>
None
fun ref not_listening(
sock: UDPSocket ref)
: None val
Parameters¶
sock: UDPSocket ref
Returns¶
None val
received¶
[Source]
Called when new data is received on the socket.
fun ref received(
sock: UDPSocket ref,
data: Array[U8 val] iso,
from: NetAddress val)
: None val
Parameters¶
sock: UDPSocket ref
data: Array[U8 val] iso
from: NetAddress val
Returns¶
None val
closed¶
[Source]
Called when the socket is closed.
fun ref closed(
sock: UDPSocket ref)
: None val
Parameters¶
sock: UDPSocket ref
Returns¶
None val
| pony | 2232490 | https://sv.wikipedia.org/wiki/Nops%20ursumus | Nops ursumus | Nops ursumus är en spindelart som beskrevs av Arthur M. Chickering 1967. Nops ursumus ingår i släktet Nops och familjen Caponiidae.
Artens utbredningsområde är Panama. Inga underarter finns listade i Catalogue of Life.
Källor
Spindlar
ursumus | swedish | 1.267035 |
Pony/cli-Option-.txt |
Option¶
[Source]
Option contains a spec and an effective value for a given option.
class val Option
Constructors¶
create¶
[Source]
new val create(
spec': OptionSpec val,
value': (Bool val | String val | I64 val |
U64 val | F64 val | _StringSeq val))
: Option val^
Parameters¶
spec': OptionSpec val
value': (Bool val | String val | I64 val |
U64 val | F64 val | _StringSeq val)
Returns¶
Option val^
Public Functions¶
spec¶
[Source]
fun box spec()
: OptionSpec val
Returns¶
OptionSpec val
bool¶
[Source]
Returns the option value as a Bool, defaulting to false.
fun box bool()
: Bool val
Returns¶
Bool val
string¶
[Source]
Returns the option value as a String, defaulting to empty.
fun box string()
: String val
Returns¶
String val
i64¶
[Source]
Returns the option value as an I64, defaulting to 0.
fun box i64()
: I64 val
Returns¶
I64 val
u64¶
[Source]
Returns the option value as an U64, defaulting to 0.
fun box u64()
: U64 val
Returns¶
U64 val
f64¶
[Source]
Returns the option value as an F64, defaulting to 0.0.
fun box f64()
: F64 val
Returns¶
F64 val
string_seq¶
[Source]
Returns the option value as a ReadSeq[String], defaulting to empty.
fun box string_seq()
: ReadSeq[String val] val
Returns¶
ReadSeq[String val] val
deb_string¶
[Source]
fun box deb_string()
: String val
Returns¶
String val
| pony | 440685 | https://sv.wikipedia.org/wiki/Volvo%20PV651 | Volvo PV651 | Volvo PV651 är en bilmodell som introducerades av Volvo den 23 april 1929. Modellnamnet skall utläsas som: PersonVagn, 6 cylindrar, 5 sittplatser, 1:a serien (modell 650 var samma, men utan kaross, det vill säga endast levererad som chassi).
PV650-652
Planerna på den nya, större efterträdaren till :Volvo ÖV4 hade tagit sin början 1926. :Helmer MasOlle fick åter förtroendet att rita karossen. De amerikanska märken som dominerade den svenska marknaden vid den här tiden och som därför utgjorde Volvos främsta konkurrenter kunde erbjuda sexcylindriga motorer. Därför stod det snart klart för Volvo att man måste göra detsamma. Detta var också ett krav för att kunna slå sig in på marknaden för taxidroskor.
Den nya bilen fick ett kraftigare chassi för att klara den stora motorn och karossen blev plåtklädd. Bilen vägde därmed 1 500 kilo. Taket förblev dock pegamoidklätt. Man höll också kvar vid det gamla byggsättet med en stomme i askträ samt svällare av björk och järn. Framsätena var ställbara och kunde fällas tillbaka för att ge två sängplatser. Kraftiga läderremmar höll ryggstödet i uppfällt läge.
Motorn försågs med en rejäl, sjulagrad vevaxel, ett ovanligt drag vid den här tiden. Bromsarna var mekaniska enligt Bendix-Perrot-systemet och handbromsen verkade fortfarande på kardanaxeln.
I augusti 1929 nådde Volvo break-even och kunde vid årets slut notera en blygsam vinst, 1 965 kronor. Under året sålde man totalt 1 383 vagnar, varav 27 exporterades. Priset i Sverige för PV651 var 6 900 kronor.
I augusti 1930 kom efterträdaren PV652. Den hade modifierad interiör och instrumentering, ny förgasare och framför allt, hydrauliska bromsar. I januari 1932 uppdaterades modellen med ny motor och synkroniserad växellåda.
Volvo byggde, som de flesta andra biltillverkare, inte bara kompletta bilar, utan även "halvfabrikat" i form av nakna chassin för karossering hos någon fristående karossmakare. Några enstaka chassin försågs med vackra öppna kreationer, men huvuddelen gick till kommersiellt bruk, som flak-, skåp- och likbilar, samt ambulanser.
Tekniska data
Motor (1929-32): typ DB, rak sexcylindrig sidventilsmotor
Cylindervolym: 3010 cm3
Borr x slag: 76,2x110 mm
Kompression: 5,1:1
Effekt: 55 hk vid 3000 r/m
Toppfart: 110 km/tim.
Motor (1932-33): typ EB, rak sexcylindrig sidventilsmotor
Cylindervolym: 3366 cm3
Borr x slag: 79,4x110 mm
Effekt: 65 hk vid 3200 r/m
Växellåda
3-växlad manuell, osynkroniserad (1929-31)
4-växlad manuell, osynkroniserad (1931)
3-växlad manuell med frihjul, osynkroniserad 1:a (1932-33)
Hjulbas: 295 cm
Varianter:
PV650: 1929-34, 206 tillverkade, chassi
PV651: 1929-30, mekaniska bromsar
PV652: 1930-33, hydrauliska bromsar
Totalt tillverkades 2 382 PV650/651/652, åren 1929-1934.
PV653-654
Hösten 1933 moderniserades Volvovagnarna med kryssförstärkt ram, mindre 17"-fälgar och helmetallkaross, utan trästomme. Taköppningen var, som vanligt vid den här tiden, täckt av pegamoid, eftersom pressar tillräckligt stora att pressa ett helt tak var ytterst ovanliga.
Därutöver fick bilen nya skärmar, lätt bakåtlutande vindrutestolpar samt ytterst lätt bakåtlutande kylare. Mekaniskt ändrades ingenting.
Volvo saluförde nu två varianter: standardmodellen PV653 och den lyxigare PV654. Den som slog till på den dyrare varianten fick bland annat mer påkostad inredning med armstöd bak och kurvstroppar, dubbla reservhjul, dubbla kromade signalhorn och dubbla bakljus.
Tekniska data
Motor:typ EB, rak sexcylindrig sidventilsmotor
Cylindervolym: 3366 cm3
Borr x slag: 79,4x110 mm
Effekt: 65 hk vid 3200 r/m
Växellåda: 3-växlad manuell med frihjul, osynkroniserad 1:a
Hjulbas: 295 cm
Varianter:
PV653: 1933-34, 230 tillverkade, standardmodell
PV654: 1933-34, 361 tillverkade, lyxmodell
PV655: 1933-35, 62 tillverkade, chassi
PV656-659
1935 började Volvobilarna se mer än lovligt gammalmodiga ut. Grundkarossen hade hängt med sedan 1929. Trots det höll Volvo liv i vagnen med en lätt ansiktslyftning: kylaren försågs med en lätt V-formad kylarmask. Lägg därtill en ny, större motor och Volvo bedömde att ändringarna var tillräckligt stora för att motivera nya modellbeteckningar: PV658 resp. 659.
Bilarna tillverkades till och med 1936 och ersattes därefter av nya :Volvo PV51.
Tekniska data
Motor: typ EC, rak sexcylindrig sidventilsmotor
Cylindervolym: 3670 cm3
Borr x slag: 84,14x110 mm
Effekt: 86 hk
Växellåda: 3-växlad manuell med frihjul, osynkroniserad 1:a
Hjulbas: 295 cm
Varianter:
PV656: 1935-36, 16 tillverkade, chassi
PV657: 1935-37, 55 tillverkade, chassi m hjulbas 355 cm
PV658: 1935-36, 301 tillverkade, standardmodell
PV659: 1935-36, 170 tillverkade, lyxmodell
Referenser
Källor
Volvo 1927-1977, red. Björn-Eric Lindh, Autohistorica, PR-Tryck, Sollentuna 1977 ISSN 0345-1003
Volvo Personvagnar-från 20-tal till 80-tal av Björn-Eric Lindh, 1984.
Volvo 1927-1988, utgiven av Informationsstaben, Volvo Personvagnar AB, Göteborg 1988 PR/PV 880201 s. 14
Volvo 1927-2002 75 år, Informationsavdelningen - Volvo Personvagnar AB, Göteborg 2002 ISSN 1104-9995
Externa länkar
Storvolvoklubben
PV651
Bakhjulsdrivna fordon
Lanseringar 1929 | swedish | 1.100577 |
Pony/format-AlignLeft-.txt |
AlignLeft¶
[Source]
primitive val AlignLeft
Constructors¶
create¶
[Source]
new val create()
: AlignLeft val^
Returns¶
AlignLeft val^
Public Functions¶
eq¶
[Source]
fun box eq(
that: AlignLeft val)
: Bool val
Parameters¶
that: AlignLeft val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: AlignLeft val)
: Bool val
Parameters¶
that: AlignLeft val
Returns¶
Bool val
| pony | 3882120 | https://sv.wikipedia.org/wiki/Ashmeadiella%20opuntiae | Ashmeadiella opuntiae | Ashmeadiella opuntiae är en biart som först beskrevs av Cockerell 1897. Ashmeadiella opuntiae ingår i släktet Ashmeadiella och familjen buksamlarbin. Inga underarter finns listade i Catalogue of Life.
Källor
Buksamlarbin
opuntiae | swedish | 1.118153 |
Pony/src-files-file_lines-.txt |
file_lines.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123use "buffered"
class FileLines is Iterator[String iso^]
"""
Iterate over the lines in a file.
Returns lines without trailing line breaks.
Advances the file cursor to the end of each line returned from `next`.
This class buffers the file contents to accumulate full lines. If the file
does not contain linebreaks, the whole file content is read and buffered, which
might exceed memory resources. Take care.
"""
let _reader: Reader = Reader
let _file: File
let _min_read_size: USize
var _last_line_length: USize
var _buffer_cursor: USize
"""Internal cursor for keeping track until where in the file we already buffered."""
var _cursor: USize
"""Keeps track of the file position we update after every returned line."""
var _has_next: Bool
new create(file: File, min_read_size: USize = 256) =>
"""
Create a FileLines instance on a given file.
This instance returns lines from the position of the given `file`
at the time this constructor is called. Later manipulation of the file position
is not accounted for. As a result iterating with this class will always return the full
file content without gaps or repeated lines.
`min_read_size` determines the minimum amount of bytes to read from the file
in one go. This class keeps track of the line lengths in the current file
and uses the length of the last line as amount of bytes to read next, but it
will never read less than `min_read_size`.
"""
_file = file
_buffer_cursor = _file.position()
_cursor = _file.position()
_min_read_size = min_read_size
_last_line_length = min_read_size
_has_next = _file.valid()
fun ref has_next(): Bool =>
_has_next
fun ref next(): String iso^ ? =>
"""
Returns the next line in the file.
"""
while true do
try
return _read_line()?
else
if not _fill_buffer() then
// nothing to read from file, we can savely exit here
break
end
end
end
_has_next = false
if _reader.size() > 0 then
// don't forget the last line
_read_last_line()?
else
// nothing to return, we can only error here
error
end
fun ref _read_line(): String iso^ ? =>
let line = _reader.line(where keep_line_breaks = true)?
let len = line.size()
_last_line_length = len
// advance the cursor to the end of the returned line
_inc_public_file_cursor(len)
// strip trailing line break
line.truncate(
len - if (len >= 2) and (line.at_offset(-2)? == '\r') then 2 else 1 end)
consume line
fun ref _fill_buffer(): Bool =>
"""
read from file and fill the reader-buffer.
Returns `true` if data could be read from the file.
After a successful reading operation `_buffer_cursor` is updated.
"""
var result = true
// get back to position of last line
let current_pos = _file.position()
_file.seek_start(_buffer_cursor)
if _file.valid() then
let read_bytes = _last_line_length.max(_min_read_size)
let read_buf = _file.read(read_bytes)
_buffer_cursor = _file.position()
let errno = _file.errno()
if (read_buf.size() == 0) and (errno isnt FileOK) then
result = false
else
// TODO: Limit size of read buffer
_reader.append(consume read_buf)
end
else
result = false
end
// reset position to not disturb other operations on the file
// we only actually advance the cursor if the line is returned.
_file.seek_start(current_pos)
result
fun ref _read_last_line(): String iso^ ? =>
let block = _reader.block(_reader.size())?
_inc_public_file_cursor(block.size())
String.from_iso_array(consume block)
fun ref _inc_public_file_cursor(amount: USize) =>
_cursor = _cursor + amount
_file.seek_start(_cursor)
| pony | 399261 | https://da.wikipedia.org/wiki/Tekstfil | Tekstfil | En tekstfil (med tekstfilformat; kortere tekstformat) kan være flere forskellige filformater (fx US-ASCII og unicode (fx UTF-8)). En fil med filendelsen ".txt" signalerer at filen er en tekstfil. (På et generisk beskrivelsesniveau er der grundlæggende to slags computerfilformater: Tekstfiler og binærfiler.)
Tekstfiler er i modsætning til andre typer computerfiler karakteristisk ved, at indholdet er menneskeligt læsbart og samtidigt ikke indeholder nogen skjulte formatteringskoder sådan som f.eks. en fil skabt med et tekstbehandlingsprogram. De eneste koder, der forekommer, som ikke er umiddelbart synlige, er koder til markering af linieslut, linieskift, tabulering, slutmarkering og lignende helt fundamentale ting. Disse koder ignoreres i forbindelse med maskinel fortolkning af indholdet.
Den simple form gør formatet velegnet til inspektion og udvikling samt til lagring af informationer, der skal kunne læses i og redigeres i af enhvert basalt editor-program, herunder Window's Notepad. Desuden gør simpelheden formatet velegnet til udveksling af data mellem forskellige systemer
Nogle af de vigtigste "usynlige" formateringskoder, der kan forekomme i tekstfiler (ASCII) er følgende:
Dec Oct Hex Bin HTML
008 010 008 0001000  BS backspace
009 011 009 0001001 	 HT Horizontal Tab (vandret tabulering)
010 012 00A 0001010 LF Line Feed (ny linje)
011 013 00B 0001011  VT Vertical Tab (lodret tabulering)
012 014 00C 0001100  FF Form Feed
013 015 00D 0001101 CR Carriage Return (retur)
Signalering af "ny linje"
Signalering af "ny linje" har ikke et standardtegn eller standardtegnssammensætning. I tekstfiler benyttes følgende, som typisk afhænger at anvendt styresystem, og anvendt teksteditorkonfiguration/filvalg:
indlejret signalering af "ny linje" (engelsk newline eller end of line) - nogle eksempler:
Unix og unix-lignende (incl. MacOS(X)(>=10)) - består af styretegnet: \n eller ASCII-linefeed (LF)
Microsoft Windows, DOS - består af styretegnet: \r efterfulgt af \n - eller ASCII-carriage-return (CR) efterfulgt ASCII-linefeed (LF)
Mac Classic Mac OS(<10) - består af styretegnet: \r eller ASCII-carriage-return (CR)
Ovenstående har historisk været og er i dag en stor udfordring, når man skal arbejde sammen på tværs af styresystemer og skal udveksle tekstfiler (fx kildekode) med andre som arbejder på andre styresystemer. Man bør som en del af dataintegriteten rydde op i "ny linje"-signaleringen. Gør man ikke det, kan der ske besynderlige ting, når andre skal editere (i bedste fald vises mystiske grafiksymboler) - og oversætte kildekode. Mange oversættere kan ikke behandle "forkerte" "ny linje"-signaleringer.
Nogle anvendelseseksempler (langt fra komplet liste)
Systemfiler af betydning for computerens eller visse computerprogrammers organisering og opsætning.
Initieringsfiler (med filtypebetegnelsen .ini)
Logfiler
Batchfiler og lignende kommandofiler vedrørende udførelse af DOS-programmer eller igangsætning af compilering af computerprogrammer.
Fortolkede formater
HTML-filer eller XHTML-filer (med en af filtypeendelserne .html, .htm eller .xhtml)
Javascript-kode (med filtypeendelsen .js – hvis ikke integreret i HTML-dokumenter)
ASP-kode og ASPX-kode (med en af filtypeendelserne .asp eller .aspx)
PHP-kode (med filtypeendelsen .php)
XML-kode (med filtypebetegnelse .xml)
VRML-kode (med filtypebetegnelsen .wrl)
include-filer af forskellig art (med filtypebetegnelsen .inc)
Fortolket programkode, f.eks. skrevet i Basic eller COMAL
Ressourcefiler
Cascading Style Sheets (med filtypeebetegnelsen .css – hvis ikke integreret i HTML-dokumenter)
Kommaseparerede databasefiler
Kommaseparerede tabeller beregnet på indlæsning i regneark
Kildefiler i forbindelse med systemudvikling og programmering af f.eks.
Javaprogrammer og Java-applets
Programmer skrevet i C, C# og C++
Programmer skrevet i assembler-kode
I forbindelse med programmering compileres kildekoden af en compiler til enten ren maskinkode (C og C++) eller til en komprimeret abstrakt bytekode (Java), der i modsætning til ren maskinkode er platformsuafhængig. Det man almindeligvis forstår ved software er sådan maskinlæsbar og dermed lynhurtigt eksekverbar kode.
Af de fortolkede tekstformater er XML-formatet (Expanable Markup Language) interessant ved at være så fleksibelt, at det kan benyttes til mange forskellige former for opbevaring og transmission af data, herunder bl.a. vektorgrafik.
Se også
Teksteditor
Notepad - standard Microsoft Windows teksteditor
Fodnoter
Filformater | danish | 0.57322 |
Pony/collections-HashFunction64-.txt |
HashFunction64[A: A]¶
[Source]
A pluggable hash function with 64-bit hashes.
interface val HashFunction64[A: A]
Constructors¶
create¶
[Source]
Data structures create instances internally. Use a primitive if possible.
new val create()
: HashFunction64[A] val^
Returns¶
HashFunction64[A] val^
Public Functions¶
hash64¶
[Source]
Calculate the hash of some type. This is an alias of the type parameter to
allow data structures to hash things without consuming them.
fun box hash64(
x: box->A!)
: U64 val
Parameters¶
x: box->A!
Returns¶
U64 val
eq¶
[Source]
Determine equality between two keys with the same hash. This is done with
viewpoint adapted aliases to allow data structures to determine equality
in a box fun without consuming keys.
fun box eq(
x: box->A!,
y: box->A!)
: Bool val
Parameters¶
x: box->A!
y: box->A!
Returns¶
Bool val
| pony | 2150108 | https://sv.wikipedia.org/wiki/Ascorhynchus%20stocki | Ascorhynchus stocki | Ascorhynchus stocki är en havsspindelart som beskrevs av Hong, J.S och I.H. Kim 1987. Ascorhynchus stocki ingår i släktet Ascorhynchus och familjen Ammotheidae. Inga underarter finns listade i Catalogue of Life.
Källor
Havsspindlar
stocki | swedish | 1.397 |
Pony/files-WalkHandler-.txt |
WalkHandler¶
[Source]
A handler for FilePath.walk.
interface ref WalkHandler
Public Functions¶
apply¶
[Source]
fun ref apply(
dir_path: FilePath val,
dir_entries: Array[String val] ref)
: None val
Parameters¶
dir_path: FilePath val
dir_entries: Array[String val] ref
Returns¶
None val
| pony | 8323830 | https://sv.wikipedia.org/wiki/46%20Draconis | 46 Draconis | 46 Draconis, eller c Draconis, är en roterande variabel av Alfa2 Canum Venaticorum-typ (ACV:) i stjärnbilden Draken.
46 Dra varierar mellan visuell magnitud +5,04 och 5,05 utan någon fastställd periodicitet.
Se även
Variabel stjärna
Referenser
Stjärnbilden Draken
Alfa2 Canum Venaticorum-variabler
Vita jättar
Flamsteedobjekt
HR-objekt
HD-objekt | swedish | 1.29114 |
Pony/generics-and-reference-capabilities.txt | # Generics and Reference Capabilities
In the examples presented previously we've explicitly set the reference capability to `val`:
```pony
class Foo[A: Any val]
```
If the capability is left out of the type parameter then the generic class or function can accept any reference capability. This would look like:
```pony
class Foo[A: Any]
```
It can be made shorter because `Any` is the default constraint, leaving us with:
```pony
class Foo[A]
```
This is what the example shown before looks like but with any reference capability accepted:
```pony
// Note - this won't compile
class Foo[A]
var _c: A
new create(c: A) =>
_c = c
fun get(): A => _c
fun ref set(c: A) => _c = c
actor Main
new create(env:Env) =>
let a = Foo[U32](42)
env.out.print(a.get().string())
a.set(21)
env.out.print(a.get().string())
```
Unfortunately, this doesn't compile. For a generic class to compile it must be compilable for all possible types and reference capabilities that satisfy the constraints in the type parameter. In this case, that's any type with any reference capability. The class works for the specific reference capability of `val` as we saw earlier, but how well does it work for `ref`? Let's expand it and see:
```pony
// Note - this also won't compile
class Foo
var _c: String ref
new create(c: String ref) =>
_c = c
fun get(): String ref => _c
fun ref set(c: String ref) => _c = c
actor Main
new create(env:Env) =>
let a = Foo(recover ref String end)
env.out.print(a.get().string())
a.set(recover ref String end)
env.out.print(a.get().string())
```
This does not compile. The compiler complains that `get()` doesn't actually return a `String ref`, but `this->String ref`. We obviously need to simply change the type signature to fix this, but what is going on here?
`this->String ref` is [an arrow type](/reference-capabilities/arrow-types.md). An arrow type with "this->" states to use the capability of the actual receiver (`ref` in our case), not the capability of the method (which defaults to `box` here). According to [viewpoint adaption](/reference-capabilities/combining-capabilities.md) this will be `ref->ref` which is `ref`. Without this [arrow type](/reference-capabilities/arrow-types.md) we would only see the field `_c` as `box` because we are in a `box` method.
So let's apply what we just learned:
```pony
class Foo
var _c: String ref
new create(c: String ref) =>
_c = c
fun get(): this->String ref => _c
fun ref set(c: String ref) => _c = c
actor Main
new create(env:Env) =>
let a = Foo(recover ref String end)
env.out.print(a.get().string())
a.set(recover ref String end)
env.out.print(a.get().string())
```
That compiles and runs, so `ref` is valid now. The real test though is `iso`. Let's convert the class to `iso` and walk through what is needed to get it to compile. We'll then revisit our generic class to get it working:
## An `iso` specific class
```pony
// Note - this won't compile
class Foo
var _c: String iso
new create(c: String iso) =>
_c = c
fun get(): this->String iso => _c
fun ref set(c: String iso) => _c = c
actor Main
new create(env:Env) =>
let a = Foo(recover iso String end)
env.out.print(a.get().string())
a.set(recover iso String end)
env.out.print(a.get().string())
```
This fails to compile. The first error is:
```error
main.pony:5:8: right side must be a subtype of left side
_c = c
^
Info:
main.pony:4:17: String iso! is not a subtype of String iso: iso! is not a subtype of iso
new create(c: String iso) =>
^
```
The error is telling us that we are aliasing the `String iso` - The `!` in `iso!` means it is an alias of an existing `iso`. Looking at the code shows the problem:
```pony
new create(c: String iso) =>
_c = c
```
We have `c` as an `iso` and are trying to assign it to `_c`. This creates two aliases to the same object, something that `iso` does not allow. To fix it for the `iso` case we have to `consume` the parameter. The correct constructor should be:
```pony
new create(c: String iso) =>
_c = consume c
```
A similar issue exists with the `set` method. Here we also need to consume the variable `c` that is passed in:
```pony
fun set(c: String iso) => _c = consume c
```
Now we have a version of `Foo` that is working correctly for `iso`. Note how applying the arrow type to the `get` method also works for `iso`. But here the result is a different one, by applying [viewpoint adaptation](/reference-capabilities/combining-capabilities.md) we get from `ref->iso` (with `ref` being the capability of the receiver, the `Foo` object referenced by `a`) to `iso`. Through the magic of [automatic receiver recovery](/reference-capabilities/recovering-capabilities.md) we can call the `string` method on it:
```pony
class Foo
var _c: String iso
new create(c: String iso) =>
_c = consume c
fun get(): this->String iso => _c
fun ref set(c: String iso) => _c = consume c
actor Main
new create(env:Env) =>
let a = Foo(recover iso String end)
env.out.print(a.get().string())
a.set(recover iso String end)
env.out.print(a.get().string())
```
## A capability generic class
Now that we have `iso` working we know how to write a generic class that works for `iso` and it will work for other capabilities too:
```pony
class Foo[A]
var _c: A
new create(c: A) =>
_c = consume c
fun get(): this->A => _c
fun ref set(c: A) => _c = consume c
actor Main
new create(env:Env) =>
let a = Foo[String iso]("Hello".clone())
env.out.print(a.get().string())
let b = Foo[String ref](recover ref "World".clone() end)
env.out.print(b.get().string())
let c = Foo[U8](42)
env.out.print(c.get().string())
```
It's quite a bit of work to get a generic class or method to work across all capability types, in particular for `iso`. There are ways of restricting the generic to subsets of capabilities and that's the topic of the next section.
| pony | 1181 | https://da.wikipedia.org/wiki/C%2B%2B | C++ | C++ (udtales C plus plus) er et multiparadigmatisk programmeringssprog baseret på C, med hvilket det fastholder næsten fuldstændig kompatibilitet. C++ er udviklet primært af Bjarne Stroustrup.
Historie
C++ blev oprindeligt udviklet af danskeren Bjarne Stroustrup i begyndelsen af 1980'erne (oprindelig kaldt C with Classes) og blev i løbet af en årrække et af de mest populære programmeringssprog nogensinde.
I dag er C++ særligt populært inden for computerspilsudvikling og andre steder, hvor man udvikler programmer, der kræver et højniveausprog og høj hastighed samtidig.
Den første C++-kompiler hed CFRONT og oversatte C++-kode til maskinafhængig C-kode. Det regnedes for en rigtig compiler, da den i modsætning til præprocessorer udførte fuld syntaktisk og semantisk tjek af kildekoden.
Filosofi
Filosofien bag C++ er at det skal være et højt ydelses sprog der, måske bortset fra Assembler, ikke har behov for noget lavere-liggende sprog. Centralt her er princippet om "Zero cost abstractions" (gratis abstraktionsniveau) hvor de i sproget indbyggede faciliteter (f.eks. virtuelle funktioner) ikke må kunne implementeres hurtigere ved at brugeren skriver speciel kode. Med udviklingen af moderne kompilere er dette lykkedes i en grad så man er begyndt at tale om "negative cost abstractions", altså at man ved at skrive højniveau kode kan skrive kode, der kører hurtigere og mere effektivt end sammenlignelig C-kode.
C++ er et multi paradigme sprog, der understøtter procedural kode (com i C eller Pascal), objekt-orienteret kode og funktionsorienteret programmering.
Ressource håndtering
I modsætning til mange populære sprog såsom Java og C# er der ingen support for garbage collection i C++. I stedet danner man objekter, der når de dannes henter deres ressourcer og når de destrueres frigiver dem. Dette er en mere generel metode da man her kan kontrollere alle ressource-typer (f.eks. filer og låse) og ikke blot hukommelse. Det kræver så til gengæld mere disciplin da man i god C++ kode skal huske altid at indkapsle sine ressourcer i et objekt.
Objektorienterede egenskaber
C++'s objektorienterede (OOP) syntaks er primært inspireret af Simula 67. Det andet C-baserede programmeringssprog, Objective-C, der konkurrerer med C++, får sin OOP-syntaks andetsteds fra. C++ er også inspireret af ALGOL 68, Ada, CLU og ML. Sprog som Java og C# er inspireret af C++ og får mange af deres features samt syntaks herfra.
C++ er standardiseret, både af ISO og ANSI.
"Hello World!"-eksempel i C++
#include <iostream>
class hello
{
};
std::ostream& operator<< (std::ostream& o, const hello&)
{
return o << "Hej verden";
}
int main()
{
hello h;
std::cout << h << std::endl;
return 0;
}
Hello World-programmet kan skrives på mange måder i C++. Det ovenstående eksempel er et der forsøger at illustrere brugen af klasser og streams.
Et mere klassisk (C-lignende) Hello World-program:
#include <iostream>
int main()
{
std::cout << "Hello World!\n";
return 0;
}
Kompatibilitet med C
Da Bjarne Stroustrup udviklede C++, lagde han stor vægt på, at C++ skulle fungere som en udvidelse til C. Af denne grund er alle basale features identiske med C, fx operator præcedens. Dette gør det muligt at portere C-kode til C++-. Et problem her er at C++ har færre implicitte konverteringer:
int* i = malloc(sizeof(int) * 5); /* Implicit konvertering fra void* til int* */
I C++ kræver en sådan konvertering en eksplicit typekonvertering:
int* i = (int* ) malloc(sizeof(int) * 5);
Standardbibliotek
Standardbiblioteket i C++ er forholdsvis lille. F.eks. indeholder det ikke faciliteter til grafiske brugergrænseflader eller netværk. Det forventes, at brugeren vælger nogle passende biblioteker til at supplere med disse faciliteter, som f.eks. Qt.
Standardbiblioteket indeholder Standard Template Library (STL). STL indeholder en række klassedefinitioner, templates samt funktioner, der tilsammen implementerer de mest almindelige programmeringsopgaver, såsom sortering, søgning, tekstmanipulation, filhåndtering og andre lignende.
C++ bliver løbende revideret. Den første egentlige revision var C++11 (fra 2011), der blandt andet tilføjede en hukommelses model med support for flertrådet programmering, variadiske templates, lambdas og flere dele af boost såsom shared_ptr. Det var oprindelig meningen at den nye version af C++11 skulle være klar meget tidligere, men standardiseringen tog længere tid end forventet og derfor besluttedes det at fremtidige revisioner skulle laves hvert tredje år. Siden har C++14, C++17 og C++20 set dagens lys hvor de to sidste cifre angiver årstallet for udgivelsen.
Derudover indeholder C++ hele standardbiblioteket fra C.
Det er meget almindeligt at blande C++-kode med C-biblioteker, hvilket gør den store mængde af C-biblioteker tilgængelige.
Eksterne henvisninger
Programmeringssprog | danish | 0.721065 |
Pony/random-XorShift128Plus-.txt |
XorShift128Plus¶
[Source]
This is an implementation of xorshift+, as detailed at:
http://xoroshiro.di.unimi.it
This should only be used for legacy applications that specifically require
XorShift128Plus, otherwise use Rand.
class ref XorShift128Plus is
Random ref
Implements¶
Random ref
Constructors¶
from_u64¶
[Source]
Use seed x to seed a SplitMix64 and use this to
initialize the 128 bits of state.
new ref from_u64(
x: U64 val = 5489)
: XorShift128Plus ref^
Parameters¶
x: U64 val = 5489
Returns¶
XorShift128Plus ref^
create¶
[Source]
Create with the specified seed. Returned values are deterministic for a
given seed.
new ref create(
x: U64 val = 5489,
y: U64 val = 0)
: XorShift128Plus ref^
Parameters¶
x: U64 val = 5489
y: U64 val = 0
Returns¶
XorShift128Plus ref^
Public Functions¶
next¶
[Source]
A random integer in [0, 2^64)
fun ref next()
: U64 val
Returns¶
U64 val
has_next¶
[Source]
fun tag has_next()
: Bool val
Returns¶
Bool val
u8¶
[Source]
fun ref u8()
: U8 val
Returns¶
U8 val
u16¶
[Source]
fun ref u16()
: U16 val
Returns¶
U16 val
u32¶
[Source]
fun ref u32()
: U32 val
Returns¶
U32 val
u64¶
[Source]
fun ref u64()
: U64 val
Returns¶
U64 val
u128¶
[Source]
fun ref u128()
: U128 val
Returns¶
U128 val
ulong¶
[Source]
fun ref ulong()
: ULong val
Returns¶
ULong val
usize¶
[Source]
fun ref usize()
: USize val
Returns¶
USize val
i8¶
[Source]
fun ref i8()
: I8 val
Returns¶
I8 val
i16¶
[Source]
fun ref i16()
: I16 val
Returns¶
I16 val
i32¶
[Source]
fun ref i32()
: I32 val
Returns¶
I32 val
i64¶
[Source]
fun ref i64()
: I64 val
Returns¶
I64 val
i128¶
[Source]
fun ref i128()
: I128 val
Returns¶
I128 val
ilong¶
[Source]
fun ref ilong()
: ILong val
Returns¶
ILong val
isize¶
[Source]
fun ref isize()
: ISize val
Returns¶
ISize val
int_fp_mult[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]¶
[Source]
fun ref int_fp_mult[optional N: ((U8 val | U16 val | U32 val |
U64 val | U128 val | ULong val |
USize val) & Real[N] val)](
n: N)
: N
Parameters¶
n: N
Returns¶
N
int[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]¶
[Source]
fun ref int[optional N: ((U8 val | U16 val | U32 val |
U64 val | U128 val | ULong val |
USize val) & Real[N] val)](
n: N)
: N
Parameters¶
n: N
Returns¶
N
int_unbiased[optional N: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Real[N] val)]¶
[Source]
fun ref int_unbiased[optional N: ((U8 val | U16 val | U32 val |
U64 val | U128 val | ULong val |
USize val) & Real[N] val)](
n: N)
: N
Parameters¶
n: N
Returns¶
N
real¶
[Source]
fun ref real()
: F64 val
Returns¶
F64 val
shuffle[A: A]¶
[Source]
fun ref shuffle[A: A](
array: Array[A] ref)
: None val
Parameters¶
array: Array[A] ref
Returns¶
None val
| pony | 1758955 | https://no.wikipedia.org/wiki/Indianapolis%20Colts%20i%20NFL-sesongen%202020 | Indianapolis Colts i NFL-sesongen 2020 | Indianapolis Colts spilte i sin 68. sesong i National Football League og 37. i Indianapolis. Det er også deres tredje sesong under hovedtrener Frank Reich og fjerde under general manager Chris Ballard. Etter å ha signert en 1-årig kontrakt verdt $25 millioner er Philip Rivers laget startende quarterback for første gang.
Colts forbedret på fjorårets sesongresultat på 7–9 med en seier over Houston Texans i uke 13, og nådde sluttspillet som et wildcard med 7. seed i AFC. Colts avsluttet sesongen med samme sesongresultat som Tennessee Titans, 11–5, men tapte tiebreakeren basert på resultat mot felles motstandere (5–1 mot 4–2). I wildcardrunden tapte Colts 27–24 mot Buffalo Bills, den første gangen i Rivers' karriere hvor han tapte i wildcardrunden av sluttspillet.
Etter sesongen annonserte Rivers at han skulle pensjonere seg.
Draft
Personale
Spillerstall ved sesongslutt
Sesongoppkjøring
Colts' terminliste for sesongoppkjøringen ble annonsert 7. mai, men ble senere kansellert av sikkerhetshensyn på grunn av koronaviruspandemien.
Seriespill
Terminliste
{| class="wikitable" style="text-align:center"
|-
!style=""| Uke
!style=""| Dato
!style=""| Motstander
!style=""| Resultat
!style=""| Stilling
!style=""| Stadion
!style=""| OppsummeringNFL.com
|-style="background:#fcc"
! 1
| 13. september
| at Jacksonville Jaguars
| T 20–27
| 0–1
| TIAA Bank Field
| Oppsummering
|-style="background:#cfc"
! 2
| 20. september
| Minnesota Vikings
| S 28–11
| 1–1
| Lucas Oil Stadium
| Oppsummering
|-style="background:#cfc"
! 3
| 27. september
| New York Jets
| S 36–7
| 2–1
| Lucas Oil Stadium
| Oppsummering
|-style="background:#cfc"
! 4
| 4. oktober
| at Chicago Bears
| S 19–11
| 3–1
| Soldier Field
| Oppsummering
|-style="background:#fcc"
! 5
| 11. oktober
| at Cleveland Browns
| T 23–32
| 3–2
| FirstEnergy Stadium
| Oppsummering
|-style="background:#cfc"
! 6
| 18. oktober
| Cincinnati Bengals
| S 31–27
| 4–2
| Lucas Oil Stadium
| Oppsummering
|-
! 7
| colspan="6" | Bye
|-style="background:#cfc"
! 8
| 1. november
| at Detroit Lions
| S 41–21
| 5–2
| Ford Field
| Oppsummering
|-style="background:#fcc"
! 9
| 8. november
| Baltimore Ravens
| T 10–24
| 5–3
| Lucas Oil Stadium
| Oppsummering
|-style="background:#cfc"
! 10
|
| at Tennessee Titans
| S 34–17
| 6–3
| Nissan Stadium
| Oppsummering
|-style="background:#cfc"
! 11
| 22. november
| Green Bay Packers
| S 34–31
| 7–3
| Lucas Oil Stadium
| Oppsummering
|-style="background:#fcc"
! 12
| 29. november
| Tennessee Titans
| T 26–45
| 7–4
| Lucas Oil Stadium
| Oppsummering
|-style="background:#cfc"
! 13
| 6. desember
| at Houston Texans
| S 26–20
| 8–4
| NRG Stadium
| Oppsummering
|-style="background:#cfc"
! 14
| 13. desember
| at Las Vegas Raiders| S 44–27
| 9–4
| Allegiant Stadium
| Oppsummering
|-style="background:#cfc"
! 15
| 20. desember
| Houston Texans| S 27–20
| 10–5
| Lucas Oil Stadium
| Oppsummering
|-style="background:#fcc"
! 16
| 27. desember
| at Pittsburgh Steelers
| T 24–28
| 10–6
| Heinz Field
| Oppsummering
|-style="background:#cfc"
! 17
| 3. januar
| Jacksonville Jaguars| S 28–14
| 11–5
| Lucas Oil Stadium
| Oppsummering
|}Merknader Divisjonsmotstandere er i fet''' tekst.
Kampreferater
Uke 1: at Jacksonville Jaguars
Uke 2: mot Minnesota Vikings
Uke 3: mot New York Jets
Uke 4: at Chicago Bears
Uke 5: at Cleveland Browns
Uke 6: mot Cincinnati Bengals
Uke 8: at Detroit Lions
Uke 9: mot Baltimore Ravens
Uke 10: at Tennessee Titans
Uke 11: mot Green Bay Packers
Uke 12: mot Tennessee Titans
Uke 13: at Houston Texans
Uke 14: at Las Vegas Raiders
Uke 15: mot Houston Texans
Uke 16: at Pittsburgh Steelers
Uke 17: mot Jacksonville Jaguars
Tabeller
Divisjon
Conference
Sluttspill
Terminliste
Kampreferater
AFC Wildcardrunden: at (2) Buffalo Bills
Referanser
Eksterne lenker
Indianapolis Colts
2020
Sport i USA i 2020 | norwegian_bokmål | 1.103376 |
Pony/src-pony_bench-benchmark-.txt |
benchmark.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97type Benchmark is (MicroBenchmark | AsyncMicroBenchmark)
// interface iso _IBenchmark
// fun name(): String
// fun config(): BenchConfig
// fun overhead(): _IBenchmark^
trait iso MicroBenchmark
"""
Synchronous benchmarks must provide this trait. The `apply` method defines a
single iteration in a sample. Setup and Teardown are defined by the `before`
and `after` methods respectively. The `before` method runs before a sample
of benchmarks and `after` runs after the all iterations in the sample have
completed. If your benchmark requires setup and/or teardown to occur beween
each iteration of the benchmark, then you can use `before_iteration` and
`after_iteration` methods respectively that run before/after each iteration.
"""
fun name(): String
fun config(): BenchConfig => BenchConfig
fun overhead(): MicroBenchmark^ => OverheadBenchmark
fun ref before() ? => None
fun ref before_iteration() ? => None
fun ref apply() ?
fun ref after() ? => None
fun ref after_iteration() ? => None
trait iso AsyncMicroBenchmark
"""
Asynchronous benchmarks must provide this trait. The `apply` method defines a
single iteration in a sample. Each phase of the sample completes when the
given `AsyncBenchContinue` has its `complete` method invoked. Setup and
Teardown are defined by the `before` and `after` methods respectively. The
`before` method runs before a sample of benchmarks and `after` runs after
the all iterations in the sample have completed. If your benchmark requires
setup and/or teardown to occur beween each iteration of the benchmark, then
you can use `before_iteration` and `after_iteration` methods respectively
that run before/after each iteration.
"""
fun name(): String
fun config(): BenchConfig => BenchConfig
fun overhead(): AsyncMicroBenchmark^ => AsyncOverheadBenchmark
fun ref before(c: AsyncBenchContinue) => c.complete()
fun ref before_iteration(c: AsyncBenchContinue) => c.complete()
fun ref apply(c: AsyncBenchContinue) ?
fun ref after(c: AsyncBenchContinue) => c.complete()
fun ref after_iteration(c: AsyncBenchContinue) => c.complete()
interface tag BenchmarkList
fun tag benchmarks(bench: PonyBench)
// TODO documentation
class val BenchConfig
"""
Configuration of a benchmark.
"""
let samples: USize
"""
Total number of samples to be measured. (Default: 20)
"""
let max_iterations: U64
"""
Maximum number of iterations to execute per sample. (Default: 1_000_000_000)
"""
let max_sample_time: U64
"""
Maximum time to execute a sample in Nanoseconds. (Default: 100_000_000)
"""
new val create(
samples': USize = 20,
max_iterations': U64 = 1_000_000_000,
max_sample_time': U64 = 100_000_000)
=>
samples = samples'
max_iterations = max_iterations'
max_sample_time = max_sample_time'
class iso OverheadBenchmark is MicroBenchmark
"""
Default benchmark for measuring synchronous overhead.
"""
fun name(): String =>
"Benchmark Overhead"
fun ref apply() =>
DoNotOptimise[None](None)
DoNotOptimise.observe()
class iso AsyncOverheadBenchmark is AsyncMicroBenchmark
"""
Default benchmark for measuring asynchronous overhead.
"""
fun name(): String =>
"Benchmark Overhead"
fun ref apply(c: AsyncBenchContinue) =>
c.complete()
| pony | 1036276 | https://sv.wikipedia.org/wiki/Upplands%20runinskrifter%20483 | Upplands runinskrifter 483 | Runinskrift U 483 är en runsten i Kasby, Lagga socken i Uppland. Tillsammans med U 482 markerar den infarten till Kasby gård och den står på vägens högra sida. Ornamentiken på U 483 påminner om U 484 som står en bit längre in utmed samma väg.
Inskriften
Inskriften på stenen saknar språkligt innehåll. Den innehåller upprepningar av runorna ᛏᛒᛘᛚ (tbml) och ᚼᚾᛁᛅᛋ (hnias), som är delar av sekvensen i futhark.
Sekvensen ᚼᚾᛁᛅᛋ (hnias) visar sig dock vara felstavad där den förekommer i runslingan:
ᚾᚼᛚᚾᛋ (ahlas)
ᚼᚾᛅᛁᛋ (hnais)
ᚼᛁᚾᛅᛋ (hinas)
Inskriften i runor
ᚠᛁᛋᚾᚼᛚᚾᛋᛏᛒᛘᛚᛋᛏᛁᚼᚾᛅᛁᛋᛏ᛫ᛁᚱᚾᛅᛋᛏᛒ[ᛘᛚ]ᛦ[ᚢᛋᛏᚼᛏᚭᛁᚾᛋᛒᚴᛚᛦᛋᛏᛁᚭ]ᚼᛁᚾᛅᛋᛏᛁᛘᛦ
ᚦᚢᛁ᛫ᚱᛁᛋᛁᛁ᛫ᚭᚱᛁᛋ[ᛏ_]ᛅᛁ᛫ᛋᛏᚴᛁᛋᛏᚴᚾᛋᛏᚦᛁᚼᚢᚭᛁᛁᛋᛏ᛫ᛁᛁᛋᛏᛒᛘᚴᛦᛁᛋ_ᛏᛁᛏᚼᛁᛏ__ᛏ__
Inskriften i translitterering
fisnhlnstbmlstihnaist * irnastb[ml]R[usthtoinsbklRstio]hinastimR +
+ þui × risii × oris[t...]ai * stkistknstþihuoiist × iistbmkRis=tithit---t--
Historia
Runstenen har tidigare stått widh Kasby Säthe Gårdh i Åbrädden, där den beskrevs under 1600-talet. Den stod då i närheten till U 484. Senare delades stenen på längden i två delar som användes som grindstolpar innan den återigen sammanfogades och restes år 1941 på sin nuvarande plats.
Se även
Alfabetisk lista över runinskrifter
Lista över Upplands runinskrifter
Referenser
Noter
Upplands runinskrifter
Runinskrifter i Knivsta kommun | swedish | 1.169991 |
Pony/src-capsicum-cap_rights-.txt |
cap_rights.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130use "files"
use @__cap_rights_init[Pointer[U64]](version: I32, ...)
if freebsd or "capsicum"
use @__cap_rights_clear[Pointer[U64]](...)
if freebsd or "capsicum"
use @__cap_rights_set[Pointer[U64]](...)
if freebsd or "capsicum"
use @__cap_rights_get[I32](version: I32, fd: I32, rights: Pointer[U64])
if freebsd or "capsicum"
use @cap_rights_limit[I32](fd: I32, rights: Pointer[U64])
if freebsd or "capsicum"
use @cap_rights_merge[None](dst: Pointer[U64], src: Pointer[U64])
if freebsd or "capsicum"
use @cap_rights_remove[None](dst: Pointer[U64], src: Pointer[U64])
if freebsd or "capsicum"
use @cap_rights_contains[Bool](big: Pointer[U64] tag, little: Pointer[U64] tag)
if freebsd or "capsicum"
type CapRights is CapRights0
class CapRights0
"""
Version 0 of the capsicum cap_rights_t structure.
"""
var _r0: U64 = 0
var _r1: U64 = 0
new create() =>
"""
Initialises with no rights.
"""
clear()
new from(caps: FileCaps box) =>
"""
Initialises with the rights from a FileCaps.
"""
clear()
if caps(FileCreate) then set(Cap.creat()) end
if caps(FileChmod) then set(Cap.fchmod()) end
if caps(FileChown) then set(Cap.fchown()) end
if caps(FileLink) then
set(Cap.linkat())
set(Cap.symlinkat())
end
if caps(FileLookup) then set(Cap.lookup()) end
if caps(FileMkdir) then set(Cap.mkdirat()) end
if caps(FileRead) then set(Cap.read()) end
if caps(FileRemove) then set(Cap.unlinkat()) end
if caps(FileRename) then set(Cap.renameat()) end
if caps(FileSeek) then set(Cap.seek()) end
if caps(FileStat) then
set(Cap.fstat())
set(Cap.fstatfs())
set(Cap.fcntl())
end
if caps(FileSync) then set(Cap.fsync()) end
if caps(FileTime) then set(Cap.futimes()) end
if caps(FileTruncate) then set(Cap.ftruncate()) end
if caps(FileWrite) then set(Cap.write()) end
if caps(FileExec) then set(Cap.fexecve()) end
new descriptor(fd: I32) =>
"""
Initialises with the rights on the given file descriptor.
"""
ifdef freebsd or "capsicum" then
@__cap_rights_get(_version(), fd, addressof _r0)
end
fun ref set(cap: U64) =>
ifdef freebsd or "capsicum" then
@__cap_rights_set(addressof _r0, cap, U64(0))
end
fun ref unset(cap: U64) =>
ifdef freebsd or "capsicum" then
@__cap_rights_clear(addressof _r0, cap, U64(0))
end
fun limit(fd: I32): Bool =>
"""
Limits the fd to the encoded rights.
"""
ifdef freebsd or "capsicum" then
@cap_rights_limit(fd, addressof _r0) == 0
else
true
end
fun ref merge(that: CapRights0) =>
"""
Merge the rights in that into this.
"""
ifdef freebsd or "capsicum" then
@cap_rights_merge(addressof _r0, addressof that._r0)
end
fun ref remove(that: CapRights0) =>
"""
Remove the rights in that from this.
"""
ifdef freebsd or "capsicum" then
@cap_rights_remove(addressof _r0, addressof that._r0)
end
fun ref clear() =>
"""
Clear all rights.
"""
ifdef freebsd or "capsicum" then
@__cap_rights_init(_version(), addressof _r0, U64(0))
end
fun contains(that: CapRights0): Bool =>
"""
Check that this is a superset of the rights in that.
"""
ifdef freebsd or "capsicum" then
@cap_rights_contains(addressof _r0, addressof that._r0)
else
true
end
fun _version(): I32 => 0
| pony | 1730301 | https://sv.wikipedia.org/wiki/Capnodium%20uniseptatum | Capnodium uniseptatum | Capnodium uniseptatum är en svampart som först beskrevs av L.R. Fraser, och fick sitt nu gällande namn av S. Hughes 1981. Capnodium uniseptatum ingår i släktet Capnodium och familjen Capnodiaceae. Inga underarter finns listade i Catalogue of Life.
Källor
Sporsäcksvampar
uniseptatum | swedish | 1.079269 |
Pony/src-builtin-array-.txt |
array.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990class Array[A] is Seq[A]
"""
Contiguous, resizable memory to store elements of type A.
## Usage
Creating an Array of String:
```pony
let array: Array[String] = ["dog"; "cat"; "wombat"]
// array.size() == 3
// array.space() >= 3
```
Creating an empty Array of String, which may hold at least 10 elements before
requesting more space:
```pony
let array = Array[String](10)
// array.size() == 0
// array.space() >= 10
```
Accessing elements can be done via the `apply(i: USize): this->A ?` method.
The provided index might be out of bounds so `apply` is partial and has to be
called within a try-catch block or inside another partial method:
```pony
let array: Array[String] = ["dog"; "cat"; "wombat"]
let is_second_element_wobat = try
// indexes start from 0, so 1 is the second element
array(1)? == "wombat"
else
false
end
```
Adding and removing elements to and from the end of the Array can be done via
`push` and `pop` methods. You could treat the array as a LIFO stack using
those methods:
```pony
while (array.size() > 0) do
let elem = array.pop()?
// do something with element
end
```
Modifying the Array can be done via `update`, `insert` and `delete` methods
which alter the Array at an arbitrary index, moving elements left (when
deleting) or right (when inserting) as necessary.
Iterating over the elements of an Array can be done using the `values` method:
```pony
for element in array.values() do
// do something with element
end
```
## Memory allocation
Array allocates contiguous memory. It always allocates at least enough memory
space to hold all of its elements. Space is the number of elements the Array
can hold without allocating more memory. The `space()` method returns the
number of elements an Array can hold. The `size()` method returns the number
of elements the Array holds.
Different data types require different amounts of memory. Array[U64] with size
of 6 will take more memory than an Array[U8] of the same size.
When creating an Array or adding more elements will calculate the next power
of 2 of the requested number of elements and allocate that much space, with a
lower bound of space for 8 elements.
Here's a few examples of the space allocated when initialising an Array with
various number of elements:
| size | space |
|------|-------|
| 0 | 0 |
| 1 | 8 |
| 8 | 8 |
| 9 | 16 |
| 16 | 16 |
| 17 | 32 |
Call the `compact()` method to ask the GC to reclaim unused space. There are
no guarantees that the GC will actually reclaim any space.
"""
var _size: USize
var _alloc: USize
var _ptr: Pointer[A]
new create(len: USize = 0) =>
"""
Create an array with zero elements, but space for len elements.
"""
_size = 0
if len > 0 then
_alloc = len.next_pow2().max(len).max(8)
_ptr = Pointer[A]._alloc(_alloc)
else
_alloc = 0
_ptr = Pointer[A]
end
new init(from: A^, len: USize) =>
"""
Create an array of len elements, all initialised to the given value.
"""
_size = len
if len > 0 then
_alloc = len.next_pow2().max(len).max(8)
_ptr = Pointer[A]._alloc(_alloc)
var i: USize = 0
while i < len do
_ptr._update(i, from)
i = i + 1
end
else
_alloc = 0
_ptr = Pointer[A]
end
new from_cpointer(ptr: Pointer[A], len: USize, alloc: USize = 0) =>
"""
Create an array from a C-style pointer and length. The contents are not
copied. This must be done only with C-FFI functions that return
pony_alloc'd memory. If a null pointer is given then an empty array
is returned.
"""
if ptr.is_null() then
_size = 0
_alloc = 0
else
_size = len
if alloc > len then
_alloc = alloc
else
_alloc = len
end
end
_ptr = ptr
fun _copy_to(
ptr: Pointer[this->A!],
copy_len: USize,
from_offset: USize = 0,
to_offset: USize = 0)
=>
"""
Copy copy_len elements from this to that at specified offsets.
"""
_ptr._offset(from_offset)._copy_to(ptr._offset(to_offset), copy_len)
fun cpointer(offset: USize = 0): Pointer[A] tag =>
"""
Return the underlying C-style pointer.
"""
_ptr._offset(offset)
fun size(): USize =>
"""
The number of elements in the array.
"""
_size
fun space(): USize =>
"""
The available space in the array.
"""
_alloc
fun ref reserve(len: USize) =>
"""
Reserve space for len elements, including whatever elements are already in
the array. Array space grows geometrically.
"""
if _alloc < len then
_alloc = len.next_pow2().max(len).max(8)
_ptr = _ptr._realloc(_alloc, _size)
end
fun _element_size(): USize =>
"""
Element size in bytes for an element.
"""
_ptr._element_size()
fun ref compact() =>
"""
Try to remove unused space, making it available for garbage collection. The
request may be ignored.
"""
if _size <= (512 / _ptr._element_size()) then
if _size.next_pow2() != _alloc.next_pow2() then
_alloc = _size.next_pow2()
let old_ptr = _ptr = Pointer[A]._alloc(_alloc)
old_ptr._copy_to(_ptr._convert[A!](), _size)
end
elseif _size < _alloc then
_alloc = _size
let old_ptr = _ptr = Pointer[A]._alloc(_alloc)
old_ptr._copy_to(_ptr._convert[A!](), _size)
end
fun ref undefined[B: (A & Real[B] val & Number) = A](len: USize) =>
"""
Resize to len elements, populating previously empty elements with random
memory. This is only allowed for an array of numbers.
"""
reserve(len)
_size = len
fun read_u8[B: (A & Real[B] val & U8) = A](offset: USize): U8 ? =>
"""
Reads a U8 from offset. This is only allowed for an array of U8s.
"""
if offset < _size then
_ptr._offset(offset)._convert[U8]()._apply(0)
else
error
end
fun read_u16[B: (A & Real[B] val & U8) = A](offset: USize): U16 ? =>
"""
Reads a U16 from offset. This is only allowed for an array of U8s.
"""
let u16_bytes = U16(0).bytewidth()
if (offset + u16_bytes) <= _size then
_ptr._offset(offset)._convert[U16]()._apply(0)
else
error
end
fun read_u32[B: (A & Real[B] val & U8) = A](offset: USize): U32 ? =>
"""
Reads a U32 from offset. This is only allowed for an array of U8s.
"""
let u32_bytes = U32(0).bytewidth()
if (offset + u32_bytes) <= _size then
_ptr._offset(offset)._convert[U32]()._apply(0)
else
error
end
fun read_u64[B: (A & Real[B] val & U8) = A](offset: USize): U64 ? =>
"""
Reads a U64 from offset. This is only allowed for an array of U8s.
"""
let u64_bytes = U64(0).bytewidth()
if (offset + u64_bytes) <= _size then
_ptr._offset(offset)._convert[U64]()._apply(0)
else
error
end
fun read_u128[B: (A & Real[B] val & U8) = A](offset: USize): U128 ? =>
"""
Reads a U128 from offset. This is only allowed for an array of U8s.
"""
let u128_bytes = U128(0).bytewidth()
if (offset + u128_bytes) <= _size then
_ptr._offset(offset)._convert[U128]()._apply(0)
else
error
end
fun apply(i: USize): this->A ? =>
"""
Get the i-th element, raising an error if the index is out of bounds.
"""
if i < _size then
_ptr._apply(i)
else
error
end
fun ref update_u8[B: (A & Real[B] val & U8) = A](offset: USize, value: U8): U8 ? =>
"""
Write a U8 at offset. This is only allowed for an array of U8s.
"""
if offset < _size then
_ptr._offset(offset)._convert[U8]()._update(0, value)
else
error
end
fun ref update_u16[B: (A & Real[B] val & U8) = A](offset: USize, value: U16): U16 ? =>
"""
Write a U16 at offset. This is only allowed for an array of U8s.
"""
let u16_bytes = U16(0).bytewidth()
if (offset + u16_bytes) <= _size then
_ptr._offset(offset)._convert[U16]()._update(0, value)
else
error
end
fun ref update_u32[B: (A & Real[B] val & U8) = A](offset: USize, value: U32): U32 ? =>
"""
Write a U32 at offset. This is only allowed for an array of U8s.
"""
let u32_bytes = U32(0).bytewidth()
if (offset + u32_bytes) <= _size then
_ptr._offset(offset)._convert[U32]()._update(0, value)
else
error
end
fun ref update_u64[B: (A & Real[B] val & U8) = A](offset: USize, value: U64): U64 ? =>
"""
Write a U64 at offset. This is only allowed for an array of U8s.
"""
let u64_bytes = U64(0).bytewidth()
if (offset + u64_bytes) <= _size then
_ptr._offset(offset)._convert[U64]()._update(0, value)
else
error
end
fun ref update_u128[B: (A & Real[B] val & U8) = A](offset: USize, value: U128): U128 ? =>
"""
Write a U128 at offset. This is only allowed for an array of U8s.
"""
let u128_bytes = U128(0).bytewidth()
if (offset + u128_bytes) <= _size then
_ptr._offset(offset)._convert[U128]()._update(0, value)
else
error
end
fun ref update(i: USize, value: A): A^ ? =>
"""
Change the i-th element, raising an error if the index is out of bounds.
"""
if i < _size then
_ptr._update(i, consume value)
else
error
end
fun ref insert(i: USize, value: A) ? =>
"""
Insert an element into the array. Elements after this are moved up by one
index, extending the array.
When inserting right beyond the last element, at index `this.size()`,
the element will be appended, similar to `push()`,
an insert at index `0` prepends the value to the array.
An insert into an index beyond `this.size()` raises an error.
```pony
let array = Array[U8](4) // []
array.insert(0, 0xDE)? // prepend: [0xDE]
array.insert(array.size(), 0xBE)? // append: [0xDE; 0xBE]
array.insert(1, 0xAD)? // insert: [0xDE; 0xAD; 0xBE]
array.insert(array.size() + 1, 0xEF)? // error
```
"""
if i <= _size then
reserve(_size + 1)
_ptr._offset(i)._insert(1, _size - i)
_ptr._update(i, consume value)
_size = _size + 1
else
error
end
fun ref delete(i: USize): A^ ? =>
"""
Delete an element from the array. Elements after this are moved down by one
index, compacting the array.
An out of bounds index raises an error.
The deleted element is returned.
"""
if i < _size then
_size = _size - 1
_ptr._offset(i)._delete(1, _size - i)
else
error
end
fun ref truncate(len: USize) =>
"""
Truncate an array to the given length, discarding excess elements. If the
array is already smaller than len, do nothing.
"""
_size = _size.min(len)
fun ref trim_in_place(from: USize = 0, to: USize = -1) =>
"""
Trim the array to a portion of itself, covering `from` until `to`.
Unlike slice, the operation does not allocate a new array nor copy elements.
"""
let last = _size.min(to)
let offset = last.min(from)
let size' = last - offset
// use the new size' for alloc if we're not including the last used byte
// from the original data and only include the extra allocated bytes if
// we're including the last byte.
_alloc = if last == _size then _alloc - offset else size' end
_size = size'
// if _alloc == 0 then we've trimmed all the memory originally allocated.
// if we do _ptr._offset, we will spill into memory not allocated/owned
// by this array and could potentially cause a segfault if we cross
// a pagemap boundary into a pagemap address that hasn't been allocated
// yet when `reserve` is called next.
if _alloc == 0 then
_ptr = Pointer[A]
else
_ptr = _ptr._offset(offset)
end
fun val trim(from: USize = 0, to: USize = -1): Array[A] val =>
"""
Return a shared portion of this array, covering `from` until `to`.
Both the original and the new array are immutable, as they share memory.
The operation does not allocate a new array pointer nor copy elements.
"""
let last = _size.min(to)
let offset = last.min(from)
recover
let size' = last - offset
// use the new size' for alloc if we're not including the last used byte
// from the original data and only include the extra allocated bytes if
// we're including the last byte.
let alloc = if last == _size then _alloc - offset else size' end
if size' > 0 then
from_cpointer(_ptr._offset(offset)._unsafe(), size', alloc)
else
create()
end
end
fun iso chop[B: (A & Any #send) = A](split_point: USize): (Array[A] iso^, Array[A] iso^) =>
"""
Chops the array in half at the split point requested and returns both
the left and right portions. The original array is trimmed in place and
returned as the left portion. If the split point is larger than the
array, the left portion is the original array and the right portion
is a new empty array.
The operation does not allocate a new array pointer nor copy elements.
The entry type must be sendable so that the two halves can be isolated.
Otherwise, two entries may have shared references to mutable data,
or even to each other, such as in the code below:
```pony
class Example
var other: (Example | None) = None
let arr: Array[Example] iso = recover
let obj1 = Example
let obj2 = Example
obj1.other = obj2
obj2.other = obj1
[obj1; obj2]
end
```
"""
let start_ptr = cpointer(split_point)
let size' = _size - _size.min(split_point)
let alloc = _alloc - _size.min(split_point)
trim_in_place(0, split_point)
let right = recover
if size' > 0 then
from_cpointer(start_ptr._unsafe(), size', alloc)
else
create()
end
end
(consume this, consume right)
fun iso unchop(b: Array[A] iso):
((Array[A] iso^, Array[A] iso^) | Array[A] iso^)
=>
"""
Unchops two iso arrays to return the original array they were chopped from.
Both input arrays are isolated and mutable and were originally chopped from
a single array. This function checks that they are indeed two arrays chopped
from the same original array and can be unchopped before doing the
unchopping and returning the unchopped array. If the two arrays cannot be
unchopped it returns both arrays without modifying them.
The operation does not allocate a new array pointer nor copy elements.
"""
if _size == 0 then
return consume b
end
if b.size() == 0 then
return consume this
end
(let unchoppable, let a_left) =
if (_size == _alloc) and (cpointer(_size) == b.cpointer()) then
(true, true)
elseif (b.size() == b.space()) and (b.cpointer(b.size()) == cpointer())
then
(true, false)
else
(false, false)
end
if not unchoppable then
return (consume this, consume b)
end
if a_left then
_alloc = _alloc + b._alloc
_size = _size + b._size
consume this
else
b._alloc = b._alloc + _alloc
b._size = b._size + _size
consume b
end
fun ref copy_from[B: (A & Real[B] val & U8) = A](
src: Array[U8] box,
src_idx: USize,
dst_idx: USize,
len: USize)
=>
"""
Copy len elements from src(src_idx) to this(dst_idx).
Only works for Array[U8].
"""
reserve(dst_idx + len)
src._ptr._offset(src_idx)._copy_to(_ptr._convert[U8]()._offset(dst_idx), len)
if _size < (dst_idx + len) then
_size = dst_idx + len
end
fun copy_to(
dst: Array[this->A!],
src_idx: USize,
dst_idx: USize,
len: USize)
=>
"""
Copy len elements from this(src_idx) to dst(dst_idx).
"""
dst.reserve(dst_idx + len)
_ptr._offset(src_idx)._copy_to(dst._ptr._offset(dst_idx), len)
if dst._size < (dst_idx + len) then
dst._size = dst_idx + len
end
fun ref remove(i: USize, n: USize) =>
"""
Remove n elements from the array, beginning at index i.
"""
if i < _size then
let count = n.min(_size - i)
_size = _size - count
_ptr._offset(i)._delete(count, _size - i)
end
fun ref clear() =>
"""
Remove all elements from the array.
"""
_size = 0
fun ref push_u8[B: (A & Real[B] val & U8) = A](value: U8) =>
"""
Add a U8 to the end of the array. This is only allowed for an array of U8s.
"""
let u8_bytes = U8(0).bytewidth()
reserve(_size + u8_bytes)
_ptr._offset(_size)._convert[U8]()._update(0, value)
_size = _size + u8_bytes
fun ref push_u16[B: (A & Real[B] val & U8) = A](value: U16) =>
"""
Add a U16 to the end of the array. This is only allowed for an array of U8s.
"""
let u16_bytes = U16(0).bytewidth()
reserve(_size + u16_bytes)
_ptr._offset(_size)._convert[U16]()._update(0, value)
_size = _size + u16_bytes
fun ref push_u32[B: (A & Real[B] val & U8) = A](value: U32) =>
"""
Add a U32 to the end of the array. This is only allowed for an array of U8s.
"""
let u32_bytes = U32(0).bytewidth()
reserve(_size + u32_bytes)
_ptr._offset(_size)._convert[U32]()._update(0, value)
_size = _size + u32_bytes
fun ref push_u64[B: (A & Real[B] val & U8) = A](value: U64) =>
"""
Add a U64 to the end of the array. This is only allowed for an array of U8s.
"""
let u64_bytes = U64(0).bytewidth()
reserve(_size + u64_bytes)
_ptr._offset(_size)._convert[U64]()._update(0, value)
_size = _size + u64_bytes
fun ref push_u128[B: (A & Real[B] val & U8) = A](value: U128) =>
"""
Add a U128 to the end of the array. This is only allowed for an array of U8s.
"""
let u128_bytes = U128(0).bytewidth()
reserve(_size + u128_bytes)
_ptr._offset(_size)._convert[U128]()._update(0, value)
_size = _size + u128_bytes
fun ref push(value: A) =>
"""
Add an element to the end of the array.
"""
reserve(_size + 1)
_ptr._update(_size, consume value)
_size = _size + 1
fun ref pop(): A^ ? =>
"""
Remove an element from the end of the array.
The removed element is returned.
"""
delete(_size - 1)?
fun ref unshift(value: A) =>
"""
Add an element to the beginning of the array.
"""
try
insert(0, consume value)?
end
fun ref shift(): A^ ? =>
"""
Remove an element from the beginning of the array.
The removed element is returned.
"""
delete(0)?
fun ref append(
seq: (ReadSeq[A] & ReadElement[A^]),
offset: USize = 0,
len: USize = -1)
=>
"""
Append the elements from a sequence, starting from the given offset.
"""
if offset >= seq.size() then
return
end
let copy_len = len.min(seq.size() - offset)
reserve(_size + copy_len)
var n = USize(0)
try
while n < copy_len do
_ptr._update(_size + n, seq(offset + n)?)
n = n + 1
end
end
_size = _size + n
fun ref concat(iter: Iterator[A^], offset: USize = 0, len: USize = -1) =>
"""
Add len iterated elements to the end of the array, starting from the given
offset.
"""
var n = USize(0)
try
while n < offset do
if iter.has_next() then
iter.next()?
else
return
end
n = n + 1
end
end
n = 0
// If a concrete len is specified, we take the caller at their word
// and reserve that much space, even though we can't verify that the
// iterator actually has that many elements available. Reserving ahead
// of time lets us take a fast path of direct pointer access.
if len != -1 then
reserve(_size + len)
try
while n < len do
if iter.has_next() then
_ptr._update(_size + n, iter.next()?)
else
break
end
n = n + 1
end
end
_size = _size + n
else
try
while n < len do
if iter.has_next() then
push(iter.next()?)
else
break
end
n = n + 1
end
end
end
fun find(
value: A!,
offset: USize = 0,
nth: USize = 0,
predicate: {(box->A!, box->A!): Bool} val = {(l, r) => l is r })
: USize ?
=>
"""
Find the `nth` appearance of `value` from the beginning of the array,
starting at `offset` and examining higher indices, and using the supplied
`predicate` for comparisons. Returns the index of the value, or raise an
error if the value isn't present.
By default, the search starts at the first element of the array, returns
the first instance of `value` found, and uses object identity for
comparison.
"""
var i = offset
var n = USize(0)
while i < _size do
if predicate(_ptr._apply(i), value) then
if n == nth then
return i
end
n = n + 1
end
i = i + 1
end
error
fun contains(
value: A!,
predicate: {(box->A!, box->A!): Bool} val =
{(l: box->A!, r: box->A!): Bool => l is r })
: Bool
=>
"""
Returns true if the array contains `value`, false otherwise.
The default predicate checks for matches by identity. To search for matches
by structural equality, pass an object literal such as `{(l, r) => l == r}`.
"""
var i = USize(0)
while i < _size do
if predicate(_ptr._apply(i), value) then
return true
end
i = i + 1
end
false
fun rfind(
value: A!,
offset: USize = -1,
nth: USize = 0,
predicate: {(box->A!, box->A!): Bool} val =
{(l: box->A!, r: box->A!): Bool => l is r })
: USize ?
=>
"""
Find the `nth` appearance of `value` from the end of the array, starting at
`offset` and examining lower indices, and using the supplied `predicate` for
comparisons. Returns the index of the value, or raise an error if the value
isn't present.
By default, the search starts at the last element of the array, returns the
first instance of `value` found, and uses object identity for comparison.
"""
if _size > 0 then
var i = if offset >= _size then _size - 1 else offset end
var n = USize(0)
repeat
if predicate(_ptr._apply(i), value) then
if n == nth then
return i
end
n = n + 1
end
until (i = i - 1) == 0
end
end
error
fun clone(): Array[this->A!]^ =>
"""
Clone the array.
The new array contains references to the same elements that the old array
contains, the elements themselves are not cloned.
"""
let out = Array[this->A!](_size)
_ptr._copy_to(out._ptr, _size)
out._size = _size
out
fun slice(
from: USize = 0,
to: USize = -1,
step: USize = 1)
: Array[this->A!]^
=>
"""
Create a new array that is a clone of a portion of this array. The range is
exclusive and saturated.
The new array contains references to the same elements that the old array
contains, the elements themselves are not cloned.
"""
let out = Array[this->A!]
let last = _size.min(to)
let len = last - from
if (last > from) and (step > 0) then
out.reserve((len + (step - 1)) / step)
if step == 1 then
copy_to(out, from, 0, len)
else
try
var i = from
while i < last do
out.push(this(i)?)
i = i + step
end
end
end
end
out
fun permute(indices: Iterator[USize]): Array[this->A!]^ ? =>
"""
Create a new array with the elements permuted.
Permute to an arbitrary order that may include duplicates. An out of bounds
index raises an error.
The new array contains references to the same elements that the old array
contains, the elements themselves are not copied.
"""
let out = Array[this->A!]
for i in indices do
out.push(this(i)?)
end
out
fun reverse(): Array[this->A!]^ =>
"""
Create a new array with the elements in reverse order.
The new array contains references to the same elements that the old array
contains, the elements themselves are not copied.
"""
clone() .> reverse_in_place()
fun ref reverse_in_place() =>
"""
Reverse the array in place.
"""
if _size > 1 then
var i: USize = 0
var j = _size - 1
while i < j do
let x = _ptr._apply(i)
_ptr._update(i, _ptr._apply(j))
_ptr._update(j, x)
i = i + 1
j = j - 1
end
end
fun ref swap_elements(i: USize, j: USize) ? =>
"""
Swap the element at index i with the element at index j.
If either i or j are out of bounds, an error is raised.
"""
if (i >= _size) or (j >= _size) then error end
let x = _ptr._apply(i)
_ptr._update(i, _ptr._apply(j))
_ptr._update(j, consume x)
fun keys(): ArrayKeys[A, this->Array[A]]^ =>
"""
Return an iterator over the indices in the array.
"""
ArrayKeys[A, this->Array[A]](this)
fun values(): ArrayValues[A, this->Array[A]]^ =>
"""
Return an iterator over the values in the array.
"""
ArrayValues[A, this->Array[A]](this)
fun pairs(): ArrayPairs[A, this->Array[A]]^ =>
"""
Return an iterator over the (index, value) pairs in the array.
"""
ArrayPairs[A, this->Array[A]](this)
class ArrayKeys[A, B: Array[A] #read] is Iterator[USize]
let _array: B
var _i: USize
new create(array: B) =>
_array = array
_i = 0
fun has_next(): Bool =>
_i < _array.size()
fun ref next(): USize =>
if _i < _array.size() then
_i = _i + 1
else
_i
end
class ArrayValues[A, B: Array[A] #read] is Iterator[B->A]
let _array: B
var _i: USize
new create(array: B) =>
_array = array
_i = 0
fun has_next(): Bool =>
_i < _array.size()
fun ref next(): B->A ? =>
_array(_i = _i + 1)?
fun ref rewind(): ArrayValues[A, B] =>
_i = 0
this
class ArrayPairs[A, B: Array[A] #read] is Iterator[(USize, B->A)]
let _array: B
var _i: USize
new create(array: B) =>
_array = array
_i = 0
fun has_next(): Bool =>
_i < _array.size()
fun ref next(): (USize, B->A) ? =>
(_i, _array(_i = _i + 1)?)
| pony | 241039 | https://sv.wikipedia.org/wiki/Talca | Talca | {{Geobox|Settlement
| name = Talca
| native_name =
| other_name =
| category = Stad
| etymology =
| official_name =
| motto =
| nickname =
| image = Montaje de Talca.jpg
| image_caption =
| flag =
| symbol = | symbol_type =
| country = Chile
| country_flag = true
| state =
| region = Maule | state_type = Region
| district = Talca | district_type = Provins
| municipality = Talca | municipality_type =
| part =
| landmark =
| river =
| location =
| elevation =
| lat_d = 35| lat_m = 25| lat_s = 23|lat_NS = S
| long_d = 71| long_m = 38| long_s = 58| long_EW = W
| highest = | highest_note =
| highest_elevation = | highest_elevation_note =
| lowest = | lowest_note =
| lowest_elevation = | lowest_elevation_note =
| length = | length_orientation =
| width = | width_orientation =
| area = 49.56 | area_note = | area_decimals =
| area_land =
| area_water =
| area_urban = 40.65 | area_urban_note = <ref name="ChileAUC"> [http://www.ide.cl/descargas/capas/minvu/Area_Urbana_Consolidada.zip Ministerio de Vivienda y Urbanismo, Chile; Área Urbana Consolidada (komprimerad fil'')] Dataset med kartor och statistik. Läst 6 januari 2020.</ref> | area_urban_decimals = | area_urban_type = tätort
| area_metro = 55.47 | area_metro_note = | area_metro_decimals =
| population = 206069 | population_date = 19 april 2017 | population_note =
| population_urban = 227725 | population_urban_date = 19 april 2017 | population_urban_note = | population_urban_type = tätort
| population_metro = 236347 | population_metro_date = 19 april 2017 | population_metro_note =
| population_density = auto
| population_urban_density = auto | population_urban_density_type = tätort
| population_metro_density = auto | population_metro_density_note =
| population1 = | population1_type =
| established = 17 februari 1742 | established_type = Grundad
| date = | date_type =
| government =
| government_location = | government_region = | government_state =
| mayor =
| mayor_party =
| leader = | leader_type =
| timezone = | utc_offset =
| timezone_DST = | utc_offset_DST =
| postal_code = | postal_code_type =
| area_code = | area_code_type =
| code = | code_type =
| code1 = | code1_type =
| free = | free_type =
| free1 = | free1_type =
| map =
| map_caption = Talcas läge i Chile.
| map_locator = Chile
| map_locator_x =
| map_locator_y =
| website =
| footnotes =
}}Talca''' är en stad i centrala Chile och är huvudstad i regionen Maule. Den är även huvudort för en provins med samma namn som staden. Folkmängden uppgår till lite mer än 200 000 invånare, med förorter cirka 240 000 invånare.
Källor
Externa länkar
Orter i Región del Maule | swedish | 1.034496 |
Pony/pony_check-ASCIIWhiteSpace-.txt |
ASCIIWhiteSpace¶
[Source]
primitive val ASCIIWhiteSpace
Constructors¶
create¶
[Source]
new val create()
: ASCIIWhiteSpace val^
Returns¶
ASCIIWhiteSpace val^
Public Functions¶
apply¶
[Source]
fun box apply()
: String val
Returns¶
String val
eq¶
[Source]
fun box eq(
that: ASCIIWhiteSpace val)
: Bool val
Parameters¶
that: ASCIIWhiteSpace val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: ASCIIWhiteSpace val)
: Bool val
Parameters¶
that: ASCIIWhiteSpace val
Returns¶
Bool val
| pony | 8261115 | https://sv.wikipedia.org/wiki/Julie%20Cash | Julie Cash | Julie Cash, född 23 maj 1989 i Dallas i Texas, är en amerikansk porrskådespelerska. Cash startade sin karriär inom porrindustrin 2009. Cash har blivit nominerad två gånger för AVN Awards.
Filmografi (urval)
2009 – Bomb Ass White Booty 13
2010 – Ass Ass and More Ass
2010 – Bomb Ass White Booty 13
2011 – Massive Anal Booty
2012 – Phat Ass White Booty 7
2012 – Mandingo Massacre 6
2012 – Oil Overload 6
2012 – Femdom Ass Worship 13
2013 – Femdom Ass Worship 21
2014 – Femdom Ass Worship 23
2014 – Bad Lesbian 2: Very Troubled Girls
2015 – Big Butt Girls Club
2016 – Pornstar Paradise
2016 – Superiority Complex
2017 – Mean Bitches POV 15
2017 – All Out Ass Attack!
2018 – Mean Amazon Bitches 8
2018 – Big Curves
Priser och nomineringar (urval)
2012 Urban X Award – Orgasmic Oralist of the Year
2013 NightMoves Award – Best BBW Performer
Nominerad
2015 AVN Awards – Fan Award: Hottest Ass
2016 AVN Awards – Fan Award: Most Epic Ass
Referenser
Externa länkar
Julie Cash på Instagram
Födda 1989
Amerikanska porrskådespelare
Amerikanska skådespelare under 2000-talet
Kvinnor
Levande personer
Personer från Dallas
Porrskådespelare från Texas | swedish | 1.146502 |
Pony/pony_check-ASCIILettersUpper-.txt |
ASCIILettersUpper¶
[Source]
primitive val ASCIILettersUpper
Constructors¶
create¶
[Source]
new val create()
: ASCIILettersUpper val^
Returns¶
ASCIILettersUpper val^
Public Functions¶
apply¶
[Source]
fun box apply()
: String val
Returns¶
String val
eq¶
[Source]
fun box eq(
that: ASCIILettersUpper val)
: Bool val
Parameters¶
that: ASCIILettersUpper val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: ASCIILettersUpper val)
: Bool val
Parameters¶
that: ASCIILettersUpper val
Returns¶
Bool val
| pony | 3645729 | https://sv.wikipedia.org/wiki/Saprosites%20sulcicollis | Saprosites sulcicollis | Saprosites sulcicollis är en skalbaggsart som beskrevs av Rudolph Petrovitz 1969. Saprosites sulcicollis ingår i släktet Saprosites och familjen Aphodiidae. Inga underarter finns listade i Catalogue of Life.
Källor
Skalbaggar
sulcicollis | swedish | 1.046001 |
Pony/src-net-proxy-.txt |
proxy.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18interface Proxy
fun apply(wrap: TCPConnectionNotify iso): TCPConnectionNotify iso^
class val NoProxy is Proxy
"""
Default implementation of a proxy that does not alter the supplied `TCPConnectionNotify`.
```pony
actor MyClient
new create(host: String, service: String, proxy: Proxy = NoProxy) =>
let conn: TCPConnection = TCPConnection.create(
TCPConnectAuth(env.root),
proxy.apply(MyConnectionNotify.create()),
"localhost",
"80")
```
"""
fun apply(wrap: TCPConnectionNotify iso): TCPConnectionNotify iso^ => wrap
| pony | 3572110 | https://sv.wikipedia.org/wiki/Compsocryptus%20jamiesoni | Compsocryptus jamiesoni | Compsocryptus jamiesoni är en stekelart som beskrevs av Nolfo 1982. Compsocryptus jamiesoni ingår i släktet Compsocryptus och familjen brokparasitsteklar. Inga underarter finns listade i Catalogue of Life.
Källor
Brokparasitsteklar
jamiesoni | swedish | 1.415734 |
Pony/collections-Flags-.txt |
Flags[A: Flag[B] val, optional B: ((U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val) & Integer[B] val)]¶
[Source]
Flags is a set of flags. The flags that are recognised should be passed as
a union type for type parameter A. For example:
primitive SSE
fun value(): U64 => 1
primitive AVX
fun value(): U64 => 2
primitive RDTSCP
fun value(): U64 => 4
type Features is Flags[(SSE | AVX | RDTSCP)]
Type parameter B is the underlying field used to store the flags.
class ref Flags[A: Flag[B] val, optional B: ((U8 val | U16 val | U32 val |
U64 val | U128 val | ULong val |
USize val) & Integer[B] val)] is
Comparable[Flags[A, B] box] ref
Implements¶
Comparable[Flags[A, B] box] ref
Constructors¶
create¶
[Source]
Create a Flags instance with an optional initial value.
Default is 0 (no flags set).
new iso create(
value': B = 0)
: Flags[A, B] iso^
Parameters¶
value': B = 0
Returns¶
Flags[A, B] iso^
Public Functions¶
value¶
[Source]
Returns the bit encoding of the set flags.
fun box value()
: B
Returns¶
B
apply¶
[Source]
Returns true if the flag is set.
fun box apply(
flag: A)
: Bool val
Parameters¶
flag: A
Returns¶
Bool val
all¶
[Source]
Sets all bits, including undefined flags.
fun ref all()
: None val
Returns¶
None val
clear¶
[Source]
Unsets all flags.
fun ref clear()
: None val
Returns¶
None val
set¶
[Source]
Sets the flag.
fun ref set(
flag: A)
: None val
Parameters¶
flag: A
Returns¶
None val
unset¶
[Source]
Unsets the flag.
fun ref unset(
flag: A)
: None val
Parameters¶
flag: A
Returns¶
None val
flip¶
[Source]
Sets the flag if it is unset, unsets the flag if it is set.
fun ref flip(
flag: A)
: None val
Parameters¶
flag: A
Returns¶
None val
union¶
[Source]
The union of this and that.
fun ref union(
that: Flags[A, B] box)
: None val
Parameters¶
that: Flags[A, B] box
Returns¶
None val
intersect¶
[Source]
The intersection of this and that.
fun ref intersect(
that: Flags[A, B] box)
: None val
Parameters¶
that: Flags[A, B] box
Returns¶
None val
difference¶
[Source]
The symmetric difference of this and that.
fun ref difference(
that: Flags[A, B] box)
: None val
Parameters¶
that: Flags[A, B] box
Returns¶
None val
remove¶
[Source]
Unset flags that are set in that.
fun ref remove(
that: Flags[A, B] box)
: None val
Parameters¶
that: Flags[A, B] box
Returns¶
None val
add¶
[Source]
This with the flag set.
fun box add(
flag: A)
: Flags[A, B] iso^
Parameters¶
flag: A
Returns¶
Flags[A, B] iso^
sub¶
[Source]
This with the flag unset.
fun box sub(
flag: A)
: Flags[A, B] iso^
Parameters¶
flag: A
Returns¶
Flags[A, B] iso^
op_or¶
[Source]
The union of this and that.
fun box op_or(
that: Flags[A, B] box)
: Flags[A, B] iso^
Parameters¶
that: Flags[A, B] box
Returns¶
Flags[A, B] iso^
op_and¶
[Source]
The intersection of this and that.
fun box op_and(
that: Flags[A, B] box)
: Flags[A, B] iso^
Parameters¶
that: Flags[A, B] box
Returns¶
Flags[A, B] iso^
op_xor¶
[Source]
The symmetric difference of this and that.
fun box op_xor(
that: Flags[A, B] box)
: Flags[A, B] iso^
Parameters¶
that: Flags[A, B] box
Returns¶
Flags[A, B] iso^
without¶
[Source]
The flags in this that are not in that.
fun box without(
that: Flags[A, B] box)
: Flags[A, B] iso^
Parameters¶
that: Flags[A, B] box
Returns¶
Flags[A, B] iso^
clone¶
[Source]
Create a clone.
fun box clone()
: Flags[A, B] iso^
Returns¶
Flags[A, B] iso^
eq¶
[Source]
Returns true if this has the same flags set as that.
fun box eq(
that: Flags[A, B] box)
: Bool val
Parameters¶
that: Flags[A, B] box
Returns¶
Bool val
lt¶
[Source]
Returns true if the flags set on this are a strict subset of the flags set
on that. Flags is only partially ordered, so lt is not the opposite of ge.
fun box lt(
that: Flags[A, B] box)
: Bool val
Parameters¶
that: Flags[A, B] box
Returns¶
Bool val
le¶
[Source]
Returns true if the flags set on this are a subset of the flags set on
that or they are the same. Flags is only partially ordered, so le is not
the opposite of te.
fun box le(
that: Flags[A, B] box)
: Bool val
Parameters¶
that: Flags[A, B] box
Returns¶
Bool val
gt¶
[Source]
Returns true if the flags set on this are a struct superset of the flags
set on that. Flags is only partially ordered, so gt is not the opposite of
le.
fun box gt(
that: Flags[A, B] box)
: Bool val
Parameters¶
that: Flags[A, B] box
Returns¶
Bool val
ge¶
[Source]
Returns true if the flags set on this are a superset of the flags set on
that or they are the same. Flags is only partially ordered, so ge is not
the opposite of lt.
fun box ge(
that: Flags[A, B] box)
: Bool val
Parameters¶
that: Flags[A, B] box
Returns¶
Bool val
compare¶
[Source]
fun box compare(
that: Flags[A, B] box)
: (Less val | Equal val | Greater val)
Parameters¶
that: Flags[A, B] box
Returns¶
(Less val | Equal val | Greater val)
ne¶
[Source]
fun box ne(
that: Flags[A, B] box)
: Bool val
Parameters¶
that: Flags[A, B] box
Returns¶
Bool val
| pony | 3535592 | https://sv.wikipedia.org/wiki/Blacus%20fulviceps | Blacus fulviceps | Blacus fulviceps är en stekelart som beskrevs av Van Achterberg 1988. Blacus fulviceps ingår i släktet Blacus och familjen bracksteklar. Inga underarter finns listade.
Källor
Bracksteklar
fulviceps | swedish | 1.290094 |
Pony/pony_check-GenObj-.txt |
GenObj[T: T]¶
[Source]
trait box GenObj[T: T]
Public Functions¶
generate¶
[Source]
fun box generate(
rnd: Randomness ref)
: (T^ | (T^ , Iterator[T^] ref)) ?
Parameters¶
rnd: Randomness ref
Returns¶
(T^ | (T^ , Iterator[T^] ref)) ?
shrink¶
[Source]
fun box shrink(
t: T)
: (T^ , Iterator[T^] ref)
Parameters¶
t: T
Returns¶
(T^ , Iterator[T^] ref)
generate_value¶
[Source]
Simply generate a value and ignore any possible
shrink values.
fun box generate_value(
rnd: Randomness ref)
: T^ ?
Parameters¶
rnd: Randomness ref
Returns¶
T^ ?
generate_and_shrink¶
[Source]
Generate a value and also return a shrink result,
even if the generator does not return any when calling generate.
fun box generate_and_shrink(
rnd: Randomness ref)
: (T^ , Iterator[T^] ref) ?
Parameters¶
rnd: Randomness ref
Returns¶
(T^ , Iterator[T^] ref) ?
iter¶
[Source]
fun box iter(
rnd: Randomness ref)
: Iterator[(T^ | (T^ , Iterator[T^] ref))] ref^
Parameters¶
rnd: Randomness ref
Returns¶
Iterator[(T^ | (T^ , Iterator[T^] ref))] ref^
value_iter¶
[Source]
fun box value_iter(
rnd: Randomness ref)
: Iterator[T^] ref
Parameters¶
rnd: Randomness ref
Returns¶
Iterator[T^] ref
value_and_shrink_iter¶
[Source]
fun box value_and_shrink_iter(
rnd: Randomness ref)
: Iterator[(T^ , Iterator[T^] ref)] ref
Parameters¶
rnd: Randomness ref
Returns¶
Iterator[(T^ , Iterator[T^] ref)] ref
| pony | 2567616 | https://sv.wikipedia.org/wiki/Rhinocypha%20tincta | Rhinocypha tincta | Rhinocypha tincta är en trollsländeart. Rhinocypha tincta ingår i släktet Rhinocypha och familjen Chlorocyphidae.
Underarter
Arten delas in i följande underarter:
R. t. adusta
R. t. amanda
R. t. dentiplaga
R. t. retrograda
R. t. sagitta
R. t. semitincta
R. t. tincta
Källor
Trollsländor
tincta | swedish | 0.896734 |
Pony/src-random-xoroshiro-.txt |
xoroshiro.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79class XorOshiro128Plus is Random
"""
This is an implementation of xoroshiro128+, as detailed at:
http://xoroshiro.di.unimi.it
This is currently the default Rand implementation.
"""
// state
var _x: U64
var _y: U64
new from_u64(x: U64 = 5489) =>
"""
Use seed x to seed a [SplitMix64](random-SplitMix64.md) and use this to
initialize the 128 bits of state.
"""
let sm = SplitMix64(x)
_x = sm.next()
_y = sm.next()
new create(x: U64 = 5489, y: U64 = 0) =>
"""
Create with the specified seed. Returned values are deterministic for a
given seed.
"""
_x = x
_y = y
next()
fun ref next(): U64 =>
"""
A random integer in [0, 2^64)
"""
let x = _x
var y = _y
let r = x + y
y = x xor y
_x = x.rotl(24) xor y xor (y << 16)
_y = y.rotl(37)
r
class XorOshiro128StarStar is Random
"""
This is an implementation of xoroshiro128**, as detailed at:
http://xoshiro.di.unimi.it/
This Rand implementation is slightly slower than [XorOshiro128Plus](random-XorOshiro128Plus.md)
but does not exhibit "mild dependencies in Hamming weights" (the lower four bits might fail linearity tests).
"""
var _x: U64
var _y: U64
new from_u64(x: U64 = 5489) =>
"""
Use seed x to seed a [SplitMix64](random-SplitMix64.md) and use this to
initialize the 128 bits of state.
"""
let sm = SplitMix64(x)
_x = sm.next()
_y = sm.next()
new create(x: U64 = 5489, y: U64 = 0) =>
_x = x
_y = y
next()
fun ref next(): U64 =>
let x = _x
var y = _y
let r = (x * 5).rotl(7) * 9
y = x xor y
_x = x.rotl(24) xor y xor (y << 16)
_y = y.rotl(37)
r
| pony | 40315 | https://da.wikipedia.org/wiki/Adelskalenderen%20p%C3%A5%20sk%C3%B8jter | Adelskalenderen på skøjter | Adelskalenderen er i hurtigløb på skøjter en central og objektiv rangering af skøjteløbere baseret på personlige rekorder. Rangeringen følger det samme princip, som bruges i 'allroundmesterskab' på skøjter som består af 500, 1.000, 1.500 og 5.000 meter for kvinder og 500, 1.500, 5.000 og 10.000 meter for mænd. Rangeringen generes efter tiderne, hvor skøjteløberen med den laveste pointsum rangeres på 1. pladsen. Tiden på hver distance regnes om til sekunder og deles på antallet af 500 meter ,distansen består af. FEs.empelvisdeles tiden på 5.000 meter med 10 ,da en 5.000 meter er 10 gangerså langt som en 500 meter. En tid på 5.000 meter på 6 minutter og 35,67 sekunder vil gi vepointsummen 39,567 efter følgende udregning: ((6*60)+35,67)/10 = 39,567. Pointsummen for en skøjteløber på adelskalenderen bliver summen af tidspoint for de fire distancer, som indgår i adelskalenderen. Dersom en tid på en distance giver tidspoints med mere end 3tredecimaler ,rundes det ned til nærmeste tusinddel ,før tidspointene på hver distance lægges sammen til skøjteløberens samlede pointsum.
En nærmere redegørelse kan læses i opslagsværket "Norge på Terskelen" (Direkteforlaget, Oslo 2000, side 62-63), hvorfra følgende citat stammer:
"Adelskalenderen mente noen at gikk i glemmeboken i Norge etter at adelen i 1816 frasa seg sine privilegier (som Stortinget deretter opphevet i 1821), men Rocambole var ikke død! For i 1950-årene gjenoppstod kalenderen som navn på den fortløbende justérbare oversikt over verdens beste skøjteløberes personlige rekorder på de fire klassiske distanser – 500, 1.500, 5.000 og 10.000 meter – alt omregnet i sammenlagtpoeng basert på anvendte sekunder i gjennomsnitt per 500 m av hver distanse. Etter ethvert skøjteløb kunne enhver nordmann med avis eller rejseradio, ved hjelp af enkel hoderegning, selv oppjustere adelskalenderen. Dette gjorde adelskalenderen til den mest demokratiske kalenderen i verden."
Adelskalenderen på skøjter er en unik disciplin inden for idrætten og er fortsat en liges å objektiv oversigt, efter at hundredelene blev indført, bare mere præcis. For enkelte løbere er den bedst mulig tid på enkeltdistancerne endda vigtigere end den bedste mulige pointsum på adelskalenderen som følge af indførelsen af VM på enkeltdistanser fra det første enkeltdistance-VM på Hamar, Norge, 1996. Hurtigløb på skøjter er selve idrætstatistikkens højborg, ikke mindst takket være adelskalenderen.
Adelskalenderen for kvinder
Pr. 30. juni 2005 :
Rnk Navn Land NR Født 500m 1500m 3.000m 5.000m poeng år
1 KLASSEN Cindy CAN (1) 120879 38.30 1.53.87 3.58.97 6.55.89 157.673 2005
2 FRIESINGER Anni GER (1) 110177 38.60 1.54.02 3.59.39 6.58.39 158.343 2002
3 PECHSTEIN Claudia GER (2) 220272 39.85 1.54.83 3.57.70 6.46.91 158.433 2004
4 BARYSJEVA Varvara RUS (1) 240377 38.86 1.55.22 4.05.73 6.56.97 159.918 2002
5 RODRIGUEZ Jennifer USA (1) 080676 37.94 1.55.26 4.04.99 7.07.93 159.984 2005
5 GROENEWOLD Renate NED (1) 081076 39.48 1.55.68 3.58.94 7.01.21 159.984 2005
7 TABATA Maki JPN (1) 091174 39.18 1.54.76 4.01.01 7.05.49 160.150 2002
8 NIEMANN Gunda GER (3) 070566 40.34 1.55.62 4.00.26 6.52.44 160.167 2001
9 de JONG Tonny NED (2) 190774 39.36 1.56.02 4.00.49 7.01.17 160.231 2002
10 de LOOR Barbara NED (3) 260574 39.79 1.55.83 4.04.56 7.07.49 161.909 2005
11 GROVES Krisy CAN (2) 041276 39.97 1.57.76 4.05.61 6.57.61 161.919 2005
12 CRAMER Wieteke NED (4) 130681 39.40 1.57.64 4.05.55 7.05.94 162.132 2004
13 HUNYADY Emese AUT (1) 040366 38.87 1.56.51 4.06.55 7.15.23 162.320 2002
14 WÜST Ireen NED (5) 010486 39.29 1.56.69 4.07.71 7.09.23 162.394 2005
15 HUGHES Clara CAN (3) 270972 41.33 1.58.25 4.03.14 6.53.53 162.622 2005
16 ANSCHÜTZ Daniela GER (4) 201174 39.70 1.57.49 4.07.33 7.07.70 162.854 2005
17 THOMAS Annamarie NED (6) 150971 38.97 1.55.50 4.11.45 7.16.97 163.075 2002
18 SONG Li CHN (1) 100381 39.06 1.55.79 4.07.01 7.23.15 163.139 2001
19 VIS Marja NED (7) 150177 39.86 1.57.30 4.06.25 7.13.54 163.355 2002
20 NEMOTO Nami JPN (2) 240375 40.66 1.58.56 4.06.44 7.08.60 164.113 2005
21 RANEY Catherine USA (2) 200680 41.05 1.58.51 4.06.07 7.06.89 164.253 2005
22 ANKONÉ Fréderique NED (8) 071281 40.53 1.58.33 4.09.53 7.07.26 164.287 2005
23 OVERLAND Cindy CAN (4) 190276 39.78 1.57.67 4.11.24 7.14.31 164.307 2002
24 PROKASJEVA Ljudmila KAZ (1) 230169 41.06 1.58.64 4.05.01 7.09.42 164.383 2001
25 KLEINSMAN Moniek NED (9) 031182 40.41 1.59.51 4.07.60 7.08.77 164.389 2005
26 van GOOZEN Helen NED (10) 251280 40.89 1.59.28 4.06.40 7.06.84 164.400 2005
27 SEO Eriko JPN (3) 120379 40.52 1.58.46 4.08.52 7.09.95 164.421 2002
28 ISHINO Eriko JPN (4) 011285 40.28 1.58.79 4.09.26 7.11.27 164.546 2005
29 SMIT Gretha NED (11) 200176 42.18 2.02.02 4.05.25 6.49.22 164.650 2004
30 BAK Eun-Bi KOR (1) 140979 40.02 1.59.54 4.09.91 7.13.60 164.877 2000
31 JAKSJINA Valentina RUS (2) 060274 41.11 1.59.28 4.08.93 7.08.42 165.200 2002
32 TRAPETZNIKOVA Tatjana RUS (3) 031273 40.36 1.58.43 4.08.49 7.20.19 165.270 2002
33 SUNDSTROM Becky USA (3) 100576 38.49 1.57.28 4.14.60 7.33.80 165.396 2003
34 LAMB Maria USA (4) 040186 40.35 1.58.88 4.10.50 7.17.00 165.426 2005
35 POLOZKOVA Natalja RUS (4) 020472 40.02 1.56.25 4.08.60 7.32.92 165.495 2001
36 SIMPSON Kerry CAN (5) 061181 39.08 1.57.57 4.13.49 7.31.21 165.639 2003
37 TARASOVA Olga RUS (5) 280271 40.34 1.58.83 4.12.27 7.17.31 165.726 2005
38 BASJANOVA Svetlana RUS (6) 011272 40.77 1.59.46 4.12.02 7.13.12 165.905 2000
39 HOLZER Kristine USA (5) 210374 41.52 1.58.24 4.09.85 7.13.55 165.929 2005
40 WÓJCICKA Katarzyna POL (1) 010180 40.17 1.59.91 4.10.97 7.19.82 165.950 2005
41 de VRIES Elma NED (12) 200383 40.06 1.58.93 4.09.66 7.27.90 166.103 2004
42 't HART Sandra NED (13) 300874 40.00 1.58.95 4.14.31 7.20.70 166.105 2005
43 RISLING Tara CAN (6) 270781 40.49 2.00.11 4.11.83 7.16.94 166.191 2005
44 WANG Fei CHN (2) 200884 39.81 1.59.83 4.13.85 7.21.40 166.201 2005
45 VYSOKOVA Svetlana RUS (7) 120572 40.50 2.01.82 4.11.37 7.12.02 166.203 2005
46 WIJSMAN Marieke NED (14) 090575 38.31 2.00.03 4.17.22 7.30.33 166.223 2002
47 KALEX Katrin GER (5) 140279 40.46 2.00.89 4.11.41 7.17.22 166.379 2005
48 MAYR Nicola ITA (1) 060478 39.85 1.59.89 4.14.41 7.22.20 166.434 2005
49 GAO Yang CHN (3) 021280 40.11 1.59.51 4.12.39 7.24.61 166.472 2005
50 SLOT Nicole CAN (7) 130469 41.44 1.58.70 4.10.61 7.17.21 166.495 2002
Nordiske løbere blandt 112 løbere under 170 tidspoint
52 TØNSBERG Annette NOR (1) 020470 40.24 2.00.10 4.12.92 7.21.57 166.583 1999
76 HAUGLI Maren NOR (2) 030385 41.21 2.02.02 4.15.44 7.15.33 167.989 2005
86 BJELKEVIK Hedvig NOR (3) 180481 40.12 2.02.26 4.16.03 7.33.17 168.861 2004
89 BJELKEVIK Annette NOR (4) 120578 40.00 2.00.66 4.16.74 7.39.68 168.978 2005
107 TVETER Anne Therese NOR (5) 050576 41.93 2.04.88 4.14.25 7.19.04 169.835 2001
Adelskalenderen for mænd pr. 30. juni 2005
:
Nr Navn Land NR Født 500m 1500m 5.000m 10.000m poeng år
1 UYTDEHAAGE Jochem NED (1) 090776 36.40 1.44.57 6.14.66 12.58.92 147.668 (2005)
2 HEDRICK Chad USA (1) 170477 36.37 1.45.07 6.19.40 13.03.99 148.532 (2005)
3 DAVIS Shani USA (2) 130882 35.43 1.43.33 6.24.00 13.25.51 148.548 (2005)
4 PARRA Derek USA (3) 150370 35.88 1.43.95 6.17.98 13.33.44 149.000 (2002)
5 ROMME Gianni NED (2) 120273 36.97 1.47.88 6.14.70 13.03.40 149.570 (2005)
6 SJEPEL Dmitrij RUS (1) 080878 36.13 1.45.98 6.21.85 13.23.83 149.832 (2002)
7 BOUTIETTE K. C. USA (4) 110470 36.09 1.46.78 6.22.97 13.21.06 150.033 (2004)
8 RITSMA Rintje NED (3) 130470 35.90 1.45.86 6.25.55 13.28.19 150.150 (2002)
9 FABRIS Enrico ITA (1) 051081 36.71 1.46.65 6.18.34 13.22.99 150.243 (2005)
10 VERHEIJEN Carl NED (4) 260575 37.14 1.47.42 6.18.12 13.10.54 150.285 (2005)
11 MOLICKI Dustin CAN (1) 130875 36.19 1.46.00 6.26.29 13.34.58 150.881 (2002)
12 KRAMER Sven NED (5) 230486 37.02 1.48.23 6.24.29 13.09.65 151.007 (2005)
13 de JONG Bob NED (6) 131176 37.86 1.48.22 6.18.16 13.05.44 151.021 (2005)
14 TUITERT Mark NED (7) 040480 35.93 1.46.28 6.27.63 13.38.91 151.064 (2005)
15 WENNEMARS Erben NED (8) 011175 34.68 1.44.45 6.34.62 14.04.52 151.184 (2005)
16 JANMAAT Sicco NED (9) 221178 36.97 1.47.46 6.22.88 13.26.55 151.405 (2005)
17 SAJUTIN Vadim RUS (2) 311270 37.67 1.46.99 6.23.47 13.17.83 151.571 (2002)
18 SIGHEL Roberto ITA (2) 170267 36.93 1.47.47 6.25.11 13.26.19 151.573 (2002)
19 SHIRAHATA Keiji JPN (1) 081073 37.18 1.47.78 6.26.04 13.19.92 151.706 (2002)
20 POSTMA Ids NED (10) 281273 35.99 1.45.41 6.32.92 13.45.91 151.713 (2002)
21 ERVIK Eskil NOR (1) 110175 37.30 1.48.25 6.23.40 13.20.02 151.724 (2005)
22 PRINSEN Tom NED (11) 090982 37.09 1.47.70 6.26.29 13.22.88 151.763 (2004)
23 ELM Steven CAN (2) 120875 36.29 1.46.89 6.29.86 13.42.70 152.041 (2005)
24 BORGERSEN Odd NOR (2) 100480 38.17 1.49.57 6.20.78 13.15.67 152.554 (2005)
25 CHEEK Joey USA (5) 220679 34.66 1.44.98 6.42.57 14.13.81 152.600 (2003)
26 VELDKAMP Bart BEL (1) 221167 37.55 1.49.00 6.23.64 13.27.48 152.621 (2002)
27 SKOBREV Ivan RUS (3) 030283 36.63 1.48.75 6.30.52 13.36.14 152.739 (2005)
28 CALLIS Chris USA (6) 081179 35.71 1.45.84 6.36.29 14.04.02 152.820 (2003)
29 MARSHALL Kevin CAN (3) 120173 36.11 1.46.75 6.34.37 13.54.11 152.835 (2002)
30 NOAKE Hiroyuki JPN (2) 240874 35.61 1.46.34 6.33.49 14.08.96 152.853 (2001)
31 ANDERSEN Petter NOR (3) 020174 35.52 1.46.88 6.34.81 14.05.19 152.886 (2005)
32 SÆTRE Lasse NOR (4) 100374 38.15 1.49.36 6.24.64 13.16.92 152.913 (2004)
33 LALENKOV Jevgenij RUS (4) 160281 35.78 1.45.97 6.38.36 14.01.03 152.990 (2004)
34 GRØDUM Øystein NOR (5) 150277 39.13 1.50.80 6.16.74 13.05.44 153.009 (2005)
35 BREUER Christian GER (1) 031176 35.57 1.47.50 6.35.22 14.01.80 153.015 (2002)
36 SOLINGER Yuri NED (12) 190879 36.24 1.46.50 6.32.62 14.01.14 153.059 (2005)
37 van de RIJST Ralf NED (13) 160377 36.69 1.47.29 6.31.85 13.49.91 153.133 (2005)
38 RÖJLER Johan SWE (1) 111181 37.05 1.49.33 6.29.21 13.34.81 153.154 (2005)
39 HERSMAN Martin NED (14) 260274 36.38 1.46.76 6.31.62 14.01.42 153.199 (2002)
40 KIBALKO Aleksandr RUS (5) 251073 35.64 1.46.42 6.32.56 14.16.63 153.200 (2004)
41 WARSYLEWICZ Justin CAN (4) 191185 37.13 1.47.64 6.27.68 13.49.27 153.241 (2005)
42 DANKERS Arne CAN (5) 010680 37.96 1.47.83 6.24.05 13.39.92 153.304 (2005)
43 HIRAKO Hiroki JPN (3) 060882 37.67 1.49.17 6.30.46 13.27.88 153.500 (2002)
44 SØNDRÅL Ådne NOR (6) 100571 35.72 1.45.26 6.40.53 14.13.12 153.515 (2002)
45 KNOLL Mark CAN (6) 260776 37.00 1.48.54 6.30.63 13.47.96 153.641 (2003)
46 MEIJER Jarno NED (15) 141178 37.27 1.47.27 6.32.32 13.48.20 153.668 (2003)
47 MIYAZAKI Kesato JPN (4) 040481 37.53 1.48.92 6.32.81 13.31.24 153.679 (2005)
48 BEULENKAMP Jelmer NED (16) 161177 36.98 1.47.57 6.32.19 13.53.86 153.748 (2002)
49 TREVENA Jondon USA (7) 100772 36.84 1.48.56 6.30.15 13.55.60 153.821 (2002)
50 TSYBENKO Sergej KAZ (1) 091273 36.35 1.46.40 6.32.92 14.14.54 153.835 (2002)
Nordiske løbere blandt 594 løbere under 165 tidspoint
21 ERVIK Eskil NOR (1) 110175 37.30 1.48.25 6.23.40 13.20.02 151.724 (2005)
24 BORGERSEN Odd NOR (2) 100480 38.17 1.49.57 6.20.78 13.15.67 152.554 (2005)
31 ANDERSEN Petter NOR (3) 020174 35.52 1.46.88 6.34.81 14.05.19 152.886 (2005)
32 SÆTRE Lasse NOR (4) 100374 38.15 1.49.36 6.24.64 13.16.92 152.913 (2004)
34 GRØDUM Øystein NOR (5) 150277 39.13 1.50.80 6.16.74 13.05.44 153.009 (2005)
38 RÖJLER Johan SWE (1) 111181 37.05 1.49.33 6.29.21 13.34.81 153.154 (2005)
44 SØNDRÅL Ådne NOR (6) 100571 35.72 1.45.26 6.40.53 14.13.12 153.515 (2002)
56 BJØRGE Stian NOR (7) 310776 37.88 1.49.15 6.28.77 13.38.75 154.077 (2001)
62 BØKKO Håvard NOR (8) 020287 37.00 1.50.75 6.31.91 13.46.08 154.411 (2005)
76 ROSENDAHL Vesa FIN (1) 051275 37.08 1.48.02 6.39.87 13.59.91 155.068 (2005)
78 KOSS Johann Olav NOR (9) 291068 37.98 1.51.29 6.34.96 13.30.55 155.099 (1994)
82 ERVIK Arild Nebb NOR (10) 040278 37.72 1.49.51 6.32.11 13.54.24 155.146 (2005)
83 FALK Sebastian SWE (2) 050677 37.81 1.50.45 6.29.50 13.51.75 155.163 (2005)
95 STORELID Kjell NOR (11) 241070 38.86 1.52.19 6.30.05 13.27.24 155.623 (2002)
98 BORGERSEN Reidar NOR (12) 100480 39.09 1.52.01 6.32.37 13.20.77 155.701 (2003)
120 VALTONEN Jarmo FIN (2) 110781 36.76 1.50.40 6.45.25 14.10.19 156.594 (2005)
130 HEREIDE Remi NOR (13) 250373 39.91 1.52.64 6.28.98 13.31.14 156.911 (2000)
139 TVENGE Ørjan NOR (14) 030374 38.72 1.51.96 6.39.06 13.45.59 157.225 (2001)
147 BAKKE Andreas Snare NOR (15) 100375 38.5 1.53.10 6.35.51 13.51.26 157.314 (2002)
158 ROSENDAHL Risto FIN (3) 231179 35.58 1.47.89 6.53.79 14.51.39 157.491 (2005)
163 GUSTAFSON Tomas SWE (3) 281259 38.10 1.53.22 6.44.51 13.48.20 157.701 (1991)
166 CHRISTIANSEN Henrik NOR (16) 100283 38.10 1.50.93 6.44.20 14.06.85 157.838 (2005)
169 ZACHRISSON Eric SWE (4) 080980 35.62 1.48.71 6.52.60 14.56.12 157.922 (2005)
177 SLINNING Olav NOR (17) 210583 38.82 1.51.41 6.42.3 13.59.54 158.163 (2005)
189 KRISTENSEN Preben NOR (18) 040383 38.84 1.54.44 6.41.00 13.50.36 158.604 (2005)
197 GRAVEM Øyvind NOR (19) 240878 38.40 1.52.33 6.45.1 14.11.59 158.932 (2004)
200 BAKKE Tor Snare NOR (20) 201179 37.70 1.52.03 6.50.14 14.18.82 158.998 (2004)
212 JOHANSEN Steinar NOR (21) 270272 38.28 1.52.88 6.45.11 14.17.93 159.313 (1998)
216 BRANDT Robert FIN (4) 211082 38.86 1.54.43 6.44.96 13.57.55 159.376 (2005)
220 KARLSTAD Geir NOR (22) 070763 39.41 1.55.24 6.43.59 13.48.29 159.596 (1992)
229 GRAVEM Pål NOR (23) 040875 36.01 1.47.35 6.57.33 15.28.11 159.931 (2002)
234 POUTALA Mika FIN (5) 200683 35.53 1.51.42 6.55.56 15.16.59 160.055 (2005)
240 HAUGLI Sverre NOR (24) 021082 38.68 1.53.10 6.48.61 14.18.51 160.166 (2005)
243 NYQUIST Halvar NOR (25) 141279 38.8 1.55.08 6.46.58 14.08.39 160.237 (2004)
252 NORDVIK Frode NOR (26) 270274 38.50 1.52.69 6.46.70 14.32.91 160.378 (1998)
258 DALEN Stian NOR (27) 031176 37.92 1.51.77 6.55.13 14.35.89 160.483 (2003)
260 SCHÖN Jonas SWE (5) 020469 38.9 1.54.92 6.48.05 14.10.15 160.518 (1996)
261 BÅRDSEN Edvin NOR (28) 231180 38.0 1.53.48 6.56.0 14.22.08 160.530 (2004)
265 FALK-LARSSEN Rolf NOR (29) 210260 37.88 1.54.26 6.50.93 14.30.34 160.576 (1988)
271 HASSEL Stefan SWE (6) 110876 37.51 1.54.31 6.55.63 14.31.48 160.750 (2001)
284 VITÉN Daniel SWE (7) 031176 37.78 1.51.50 6.50.99 14.57.93 160.941 (2000)
289 STILLERUD Arnt Olaf NOR (30) 031073 38.71 1.53.92 6.54.37 14.21.34 161.187 (2001)
323 ERIKSON Joel SWE (8) 160984 37.62 1.54.09 7.00.00 14.40.52 161.676 (2004)
331 PETTERSEN Sigurd NOR (31) 020679 38.38 1.54.26 6.57.42 14.32.18 161.817 (2003)
335 KARLBERG Joakim SWE (9) 180364 39.08 1.55.34 6.55.31 14.16.63 161.888 (1988)
359 KOLNES Kent NOR (32) 130678 39.43 1.54.43 6.53.78 14.27.71 162.336 (2001)
364 NIITTYLÄ Pertti FIN (6) 160156 38.90 1.56.48 6.53.28 14.26.57 162.382 (1988)
372 BENGTSSON Per SWE (10) 310567 39.6 1.56.97 6.48.87 14.22.15 162.584 (1993)
383 SPIDSBERG Gisle NOR (33) 180572 38.05 1.51.73 7.08.0 14.52.3 162.708 (1998)
384 NYLAND Bjørn NOR (34) 081062 38.2 1.56.08 6.58.31 14.39.72 162.710 (1987)
393 NIEMINEN Mikko FIN (7) 140870 40.12 1.55.19 6.56.03 14.15.28 162.883 (1998)
402 VÅRVIK Atle NOR (35) 121265 39.3 1.58.7 6.53.02 14.16.89 163.012 (1994)
406 STORHOLT Jan Egil NOR (36) 130249 38.07 1.55.18 7.01.16 14.49.26 163.042 (1978)
428 LANGEGÅRD Odd Øistein NOR (37) 220480 38.97 1.55.07 7.00.21 14.38.39 163.266 (2002)
441 JOHANNESSEN Kent Robin NOR (38) 180380 38.88 1.54.88 6.56.39 14.51.77 163.400 (2001)
448 STENSHJEMMET Kay Arne NOR (39) 090853 38.2 1.56.18 6.56.9 14.57.30 163.481 (1981)
475 MAGNUSSEN Tor Arve NOR (40) 180484 38.1 1.55.02 6.56.85 15.13.54 163.802 (2005)
482 STORDAL Rune NOR (41) 080479 36.63 1.47.84 7.26.85 15.32.7 163.896 (2005)
499 JANACEK Adam USA (42) 180480 38.26 1.55.29 7.03.45 14.59.92 164.031 (1983)
503 TVETER Thor Olav NOR (43) 250272 38.8 1.56.3 6.58.66 14.52.75 164.069 (1994)
509 TVERRÅEN Tarjei NOR (44) 060378 37.5 1.54.49 7.07.86 15.13.57 164.127 (2005)
533 JÄRVINEN Timo FIN (8) 081166 40.23 1.57.91 6.55.21 14.25.93 164.350 (1994)
534 MAGNUSSON Hans SWE (11) 050760 38.25 1.54.38 7.09.52 15.00.72 164.364 (1987)
559 HILLE Per Thomas NOR (45) 140772 39.8 1.57.86 6.56.9 14.36.5 164.601 (1995)
561 STORDAL Morten NOR (46) 111280 36.45 1.49.38 7.19.05 15.55.88 164.609 (2005)
585 SYVERTSEN Frode NOR (47) 140163 39.46 1.58.37 7.03.35 14.32.08 164.855 (1988)
591 BENGTSSON Claes SWE (12) 121059 38.47 1.55.16 7.11.59 14.58.38 164.934 (1988)
Forklaring til tabellen: Placering på adelskalenderen i verden – Navn – Land – (Placering på adelskalenderen i eget land) – Fødselsdato – Personlig rekord på 500 meter – Personlig rekord på
1.500 meter – Personlig rekord på 5.000 meter – Personlig rekord på 10.000 meter – Tidspoint på adelskalenderen – (Sæson for sidste personlige rekord). At der står år 2005 for Arild Nebb Ervik på den 152. plads er, fordi han har sat personlig rekord i 2004/2005-sæsonen, som formelt er fra og med den 1. juli 2004 til og med den 30. juni 2005.
Udvikling i toppen af adelskalenderen
Tabellen viser lederen af adelskalenderen ved slutningen af alle sæsoner fra 1893 til 2005:
År Navn Land Født 500m 1500m 5.000m 10.000m poeng
1893: ERICSSON Rudolf SWE 061172 50.2 2.41.6 9.15.8 19.42.6 218.776
1894: EDEN Jaap NED 191073 50.4 2.35.0 8.37.6 19.12.4 211.446
1895: EDEN Jaap NED 191073 48.2 2.25.4 8.37.6 17.56.0 202.226
1900: ØSTLUND Peder NOR 070572 45.2 2.22.6 8.51.8 17.50.6 199.443
1909: MATHISEN Oscar NOR 041088 45.6 2.20.8 8.40.2 18.01.8 198.643
1910: MATHISEN Oscar NOR 041088 44.8 2.20.6 8.40.2 18.01.8 197.776
1912: MATHISEN Oscar NOR 041088 44.2 2.20.6 8.40.2 17.46.3 196.401
1913: MATHISEN Oscar NOR 041088 44.0 2.20.6 8.38.6 17.22.6 194.856
1914: MATHISEN Oscar NOR 041088 43.4 2.17.4 8.36.6 17.22.6 192.990
1916: MATHISEN Oscar NOR 041088 43.4 2.17.4 8.36.3 17.22.6 192.960
1920: MATHISEN Oscar NOR 041088 43.3 2.17.4 8.36.3 17.22.6 192.860
1929: MATHISEN Oscar NOR 041088 43.0 2.17.4 8.36.3 17.22.6 192.560
1930: BALLANGRUD Ivar NOR 070304 43.8 2.19.1 8.21.6 17.22.6 192.456
1935: BALLANGRUD Ivar NOR 070304 43.4 2.19.1 8.21.6 17.22.6 192.056
1936: BALLANGRUD Ivar NOR 070304 43.4 2.17.4 8.17.2 17.22.6 191.050
1937: STAKSRUD Michael NOR 020608 42.8 2.14.9 8.19.9 17.23.2 189.916
1939: BALLANGRUD Ivar NOR 070304 42.7 2.14.0 8.17.2 17.14.4 188.806
1942: SEYFFARTH Åke SWE 151219 43.2 2.14.2 8.13.7 17.07.5 188.678
1952: ANDERSEN Hjalmar NOR 120323 43.7 2.16.4 8.07.3 16.32.6 187.526
1954: MAMONOV Nikolaj URS ....23 42.2 2.17.4 8.03.7 16.52.2 186.980
1955: SJILKOV Boris URS 280627 42.8 2.10.4 7.45.6 16.50.2 183.336
1959: JÄRVINEN Juhanni FIN 090535 41.2 2.06.3 8.11.1 16.47.2 182.770
1960: JOHANNESEN Knut NOR 061133 42.3 2.12.2 7.53.1 15.46.6 181.006
1963: NILSSON Jonny SWE 090243 43.0 2.10.1 7.34.3 15.33.0 178.446
1964: MOE Per Ivar NOR 111144 41.6 2.09.5 7.38.6 15.47.8 178.016
1965: MATUSEVITSJ Eduard URS 161137 41.0 2.07.3 7.35.1 16.06.2 177.253
1966: SCHENK Ard NED 160944 41.0 2.05.3 7.35.2 16.02.8 176.426
1967: VERKERK Kees NED 281042 42.0 2.03.9 7.26.6 15.35.2 174.720
1968: VERKERK Kees NED 281042 40.4 2.02.6 7.19.9 15.28.7 171.691
1969: VERKERK Kees NED 281042 40.4 2.02.0 7.13.2 15.03.6 169.566
1970: VERKERK Kees NED 281042 40.4 2.01.9 7.13.2 15.03.6 169.533
1971: SCHENK Ard NED 160944 38.9 1.58.7 7.12.0 14.55.9 166.461
1972: SCHENK Ard NED 160944 38.9 1.58.7 7.09.8 14.55.9 166.241
1976: van HELDEN Hans NED 270448 39.03 1.55.61 7.07.82 14.59.09 165.302
1977: MARTSJUK Sergej URS 130452 38.45 1.56.4 6.58.88 14.39.56 163.116
1978: BELOV Vladimir URS 090454 37.90 1.56.70 6.59.8 14.42.1 162.885
1979: HEIDEN Eric USA 140658 37.80 1.55.68 6.59.15 14.43.11 162.430
1980: HEIDEN Eric USA 140658 37.63 1.54.79 6.59.15 14.28.13 161.214
1983: SJASJERIN Viktor URS 230762 37.63 1.54.36 6.55.43 14.25.29 160.557
1984: SJASJERIN Viktor URS 230762 37.59 1.53.70 6.49.15 14.25.29 159.669
1987: GULJAJEV Nikolaj URS 010166 37.24 1.52.70 6.51.28 14.28.45 159.356
1988: FLAIM Eric USA 090367 36.98 1.52.12 6.47.09 14.05.57 157.340
1992: KOSS Johann Olav NOR 291068 38.17 1.52.62 6.41.73 13.43.54 157.060
1993: KOSS Johann Olav NOR 291068 38.17 1.52.53 6.36.57 13.43.54 156.514
1994: KOSS Johann Olav NOR 291068 37.98 1.51.29 6.34.96 13.30.55 155.099
1998: RITSMA Rintje NED 130470 37.17 1.47.57 6.25.55 13.28.19 151.990
1999: RITSMA Rintje NED 130470 35.90 1.47.57 6.25.55 13.28.19 150.720
2001: UYTDEHAAGE Jochem NED 090776 36.54 1.46.32 6.20.82 13.23.02 150.213
2002: UYTDEHAAGE Jochem NED 090776 36.54 1.44.57 6.14.66 12.58.92 147.808
2005: UYTDEHAAGE Jochem NED 090776 36.40 1.44.57 6.14.66 12.58.92 147.668
Noter
Hurtigløb på skøjter | danish | 0.83876 |
Pony/builtin-DoNotOptimise-.txt |
DoNotOptimise¶
[Source]
Contains functions preventing some compiler optimisations, namely dead code
removal. This is useful for benchmarking purposes.
primitive val DoNotOptimise
Constructors¶
create¶
[Source]
new val create()
: DoNotOptimise val^
Returns¶
DoNotOptimise val^
Public Functions¶
apply[A: A]¶
[Source]
Prevent the compiler from optimising out obj and any computation it is
derived from. This doesn't prevent constant propagation.
fun box apply[A: A](
obj: A)
: None val
Parameters¶
obj: A
Returns¶
None val
observe¶
[Source]
Prevent the compiler from optimising out writes to an object marked by
the apply function.
fun box observe()
: None val
Returns¶
None val
eq¶
[Source]
fun box eq(
that: DoNotOptimise val)
: Bool val
Parameters¶
that: DoNotOptimise val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
that: DoNotOptimise val)
: Bool val
Parameters¶
that: DoNotOptimise val
Returns¶
Bool val
| pony | 117735 | https://da.wikipedia.org/wiki/NDoc | NDoc | NDoc er et dokumentationsværktøj rettet mod .NET-udviklingsplatformen. NDoc fungerer i høj grad som JavaDoc gør for Java. NDoc muliggør dokumentation for udviklere imellem, og benyttes derfor primært til at give en stringent specifikation af en mængde kodes funktionalitet og grænseflade. NDoc benytter eksterne XML filer som input og sammenholder disse med oversatte assemblies for at give et fuldstændigt billede af den udviklede kode. Opdelingen af kode og dokumentation gør det muligt at skrive (eller flot gennemlæse) dokumentation uden mulighed for at indføre fejl i selve kildekoden. Endvidere er det muligt at skrive, redigere og klargøre dokumentation i forskellige formater uden at skulle oversætte kildekoden på ny.
Brug af værktøjet
NDoc scanner en eller flere .NET assemblies via reflection for at finde informationer som klasser, namespaces etc. Disse informationer sammenholdes med selve dokumentationen som bliver gemt i et specielt XML format. NDoc giver brugeren mulighed for at skjule informationer i dokumentationen selvom de er blevet dokumenterede af en programmør. Derved er det muligt for f.eks. et firma at vedligeholde en fuldstændig dokumentation til intern brug og dele en mere begrænset version til eventuelle kunder og samarbejdspartnere.
XML format
Dette er ikke en fuldstændig gennemgang af de dokumentationsmuligheder NDoc giver, men blot en kort introduktion til tankegangen bag. Følgende er et eksempel på dokumentation i C#, det er dog også muligt at benytte NDoc i andre .NET sprog.
/// <summary>Min klasse.. Printer Hello Wiki</summary>
/// <remarks>Jeg har ingen bemærkninger</remarks>
class MinKlasse {
/// <param name="args">Argument til main. Bliver dog ikke brugt til noget</param>
/// <returns>Et tal der altid er 1</returns>
public static int Main(string[] args) {
System.Console.WriteLine("Hello Wiki");
return 1;
}
}
Som det fremgår af eksemplet benyttes /// til at markere at linje skal læses af NDoc. Det er også muligt at holde selve dokumentationen ude af kildekoden ved at lave eksterne referencer:
/// <include file='mydoc.xml' path='Dokumentation/Klasser[@name="MinKlasse"]/*' />
class MinKlasse {
public static int Main(string[] args) {
System.Console.WriteLine("Hello Wiki");
return 1;
}
}
Med en dertilhørerende dokumentations xml fil:
Min klasse.. Printer Hello Wiki
Jeg har ingen bemærkninger
Generering af XML filer
Idet kommentarer i koden bliver fjernet under oversættelse til assemblies er det nødvendigt at hente alle NDoc linjerne fra kildekoden ud i en ekstern xml fil ved eller før kildekoden bliver oversat. Dette kan gøres ved out'' parameteren på Microsoft C# oversætter eller ved brug af VBCommenter for VB.NET. Rettelser til dokumentation bør ikke foretages i den genererede XML fil da disse vil blive overskrevet ved næste oversættelse af kildekoden.
Generering af dokumentation
Det er muligt både at benytte NDoc på kommandolinjen og som en grafisk klient. For større projekter vil det ofte være praktisk at automatisere dokumentationen ved brug af NDoc via kommandolinjen. Visse output formater (se næste afsnit) kræver specielle andre programmer som skal hentes og installeres.
Output formater
NDoc kan generere dokumentationen i flere forskellige formater:
JavaDoc: JavaDoc er Suns dokumentationsmetode og består af et frameset i HTML.
LaTeX: Generering af Latex, der derefter kan oversættes til DVI, postscript eller PDF.
LinearHTML: Simpel HTML struktur.
MSDN:
MSDN 2003:
VS.NET 2003:
XML''':
Eksterne links
NDoc Code Documentation Generator for .NET
Udviklingsværktøjer
Windows-software | danish | 0.913861 |
Pony/error-messages.txt | # A Short Guide to Pony Error Messages
You've been through the tutorial, you've watched some videos, and now you're ready to write some Pony code. You fire up your editor, shovel coal into the compiler, and... you find yourself looking at a string of gibberish.
Don't panic! Pony's error messages try to be as helpful as possible and the ultimate goal is to improve them further. But, in the meantime, they can be a little intimidating.
This section tries to provide a short bestiary of Pony's error messages, along with a guide to understanding them.
Let's start with a simple one.
## left side must be something that can be assigned to
Suppose you wrote:
```pony
actor Main
let x: I64 = 0
new create(env: Env) =>
x = 12
```
The error message would be:
```error
Error:
.../a.pony:6:5: can't assign to a let or embed definition more than once
x = 12
^
Error:
.../a.pony:6:7: left side must be something that can be assigned to
x = 12
^
```
What happened is that you declared `x` as a constant, by writing `let x`, and then tried to assign a new value to it, 12. To fix the error, replace `let` with `var` or reconsider what value you want `x` to have.
That one error resulted in two error messages. The first, pointing to the `x`, describes the specific problem, that `x` was defined with `let`. The second, pointing to the `=` describes a more general error, that whatever is on the left side of the assignment is not something that can be assigned to. You would get that same error message if you attempted to assign a value to a literal, like `3`.
## cannot write to a field in a box function
Suppose you create a class with a mutable field and added a method to change the field:
```pony
class Wombat
var color: String = "brown"
fun dye(new_color: String) =>
color = new_color
```
The error message would be:
```error
Error:
.../a.pony:4:11: cannot write to a field in a box function. If you are trying to change state in a function use fun ref
color = new_color
^
```
To understand this error message, you have to have some background. The field `color` is mutable since it is declared with `var`, but the method `dye` does not have an explicit receiver reference capability. The default receiver reference capability is `box`, which allows `dye` to be called on any mutable or immutable `Wombat`; the `box` reference capability says that the method may read from but not write to the receiver. As a result, it is illegal to attempt to modify the receiver in the method.
To fix the error, you would need to give the `dye` method a mutable reference capability, such as `ref`: `fun ref dye(new_color: String) => ...`.
## receiver type is not a subtype of target type
Suppose you made a related, but slightly different error:
```pony
class Rainbow
let colors: Array[String] = Array[String]
fun add_stripe(color: String) =>
colors.push(color)
```
In this example, rather than trying to change the value of a field, the code calls a method which attempts to modify the object referred to by the field.
The problem is very similar to that of the last section, but the error message is significantly more complicated:
```error
Error:
../a.pony:4:16: receiver type is not a subtype of target type
colors.push(color)
^
Info:
.../a.pony:4:5: receiver type: this->Array[String val] ref
colors.push(color)
^
.../ponyc/packages/builtin/array.pony:252:3: target type: Array[String val] ref
fun ref push(value: A): Array[A]^ =>
^
.../a.pony:2:15: Array[String val] box is not a subtype of Array[String val] ref: box is not a subtype of ref
let colors: Array[String] = Array[String]()
^
```
Once again, Pony is trying to be helpful. The first few lines describe the error, in general terms that only a programming language maven would like: an incompatibility between the receiver type and the target type. However, Pony provides more information: the lines immediately after "Info:" tell you what it believes the receiver type to be and the next few lines describe what it believes the target type to be. Finally, the last few lines describe in detail what the problem is.
Unfortunately, this message does not locate the error as clearly as the previous examples.
Breaking it down, the issue seems to be with the call to `push`, with the receiver `colors`. The receiver type is `this->Array[String val] ref`; in other words, the view that this method has of a field whose type is `Array[String val] ref`. In the class `Rainbow`, the field `colors` is indeed declared with the type `Array[String]`, and the default reference capability for `String`s is `val` while the default reference capability for `Array` is `ref`.
The "target type" in this example is the type declaration for the method `push` of the class `Array`, with its type variable `A` replaced by `String` (again, with a default reference capability of `val`). The reference capability for the overall array, as required by the receiver reference capability of `push`, is `ref`. It seems that the receiver type and the target type should be pretty close.
But take another look at the final lines: what Pony thinks is the actual receiver type, `Array[String val] box`, is significantly different from what it thinks is the actual target type, `Array[String val] ref`. And a type with a reference capability of `box`, which is immutable, is indeed not a subtype of a type with a reference capability of `ref`, which *is* mutable.
The issue must lie with the one difference between the receiver type and the target type, which is the prefix "this->". The type `this->Array[String val] ref` is a viewpoint adapted type, or arrow type, that describes the `Array[String val] ref` "as seen by the receiver". The receiver, in this case, has the receiver reference capability of the method `add_stripe`, which is the default `box`. *That* is why the final type is `Array[String val] box`.
The fundamental error in this example is the same as the last: the default receiver reference capability for a method is `box`, which is immutable. This method, however, is attempting to modify the receiver, by adding another color stripe. That is not legal at all.
As an aside, while trying to figure out what is happening, you may have been misled by the declaration of the `colors` field, `let colors...`. That declaration makes the `colors` binding constant. As a result, you cannot assign a new array to the field. On the other hand, the array itself can be mutable or immutable. In this example, it is mutable, allowing `push` to be called on the `colors` field in the `add_stripe` method.
## A note on compiler versions
The error messages shown in this section are from ponyc `0.2.1-1063-g6ae110f` release, the current head of the main branch at the time this is written. The messages from other versions of the compiler may be different, to a greater or lesser degree.
| pony | 13776 | https://da.wikipedia.org/wiki/Standard%20ML | Standard ML | Standard ML (SML) er et funktionsorienteret programmeringssprog som understøtter moduler, statisk typetjek og typeinferens. Sproget er populært til udvikling af compilere, forskning omkring programmeringssprog og udvikling af systemer til automatisk bevisførelse.
SML er en moderne dialekt af ML som blev brugt i bevisførelsesystemet LCF. Sproget udmærker sig blandt programmeringssprog med en formel specifikation som indeholder en operationel semantik (The Definition of Standard ML fra 1990, revideret i 1997), hvilket betyder at alle operationer i sproget har en formelt defineret betydning.
Sproget
Et Standard ML-program består af en række erklæringer som indeholder udtryk som enten er funktioner, værdier eller sammensatte udtryk som kan reduceres. Standard ML er et funktionsorienteret programmeringssprog med nogle imperative træk. Den primære abstraktion som benyttes er altså funktioner. For eksempel kan fakultetsfunktionen beskrives rekursivt således:
fun fakultet n =
if n = 0 then 1 else n * fakultet (n-1)
En Standard ML-compiler kan således udlede at fakultet må være en funktion som tager et heltal som argument og returnerer et heltal (typen int → int), helt uden at disse typer angives eksplicit. Typeinferensen foregår ved hjælp af Hindley-Milner-algoritmen og gør at programmer i praksis kan udtrykkes kortere.
Samme funktion kan udtrykkes ved hjælp af mønstergenkendelse som vist i følgende eksempel:
fun fakultet 0 = 1
| fakultet n = n * fakultet (n-1)
Mønstergenkendelsen fungerer således at man ikke betragter funktionsargumentet som navnet på én parameter, men et generelt mønster som skal passe med inputværdien. Mønstre prøves fra det øverste mønster og ned, så rækkefølgen har en betydning. Hvis mønstre har variable komponenter (for eksempel n), bliver disse bundet så man kan henvise til dem i den funktionskrop som hører til mønsteret (adskilt med tegnet =).
Typer
De primitive indbyggede typer i Standard ML er: int, real, char, string, bool. Hertil findes en række prædefinerede algebraiske typer og nogle indbyggede, sammensatte typer: tupler og lister. Tupler kan indeholde en fast mængde af værdier med forskellige typer, mens lister kan indeholde vilkårligt mange værdier af én type. For eksempel:
val land = ("Danmark", 5564219, "Der er et yndigt land...")
val sorteret = [1,1,2,3,5,8,13,21,34,55,89]
Foruden en række indbyggede typer, kan man lave synonymer (også kaldet aliaser) til eksisterende typer. For eksempel kan man definere et koordinat som to kommatal, eller en omkreds som et kommatal. Tegnet * i typerne nedenfor er udtryk for den indbyggede sammensatte tupel-type:
type koordinat = real * real
type omkreds = real
Efterfølgende kan man angive typen koordinat i stedet for real * real. Her er ikke tale om en konvertering af værdier.
Foruden synonymer til eksisterende typer er det også muligt at lave nye algebraiske typer. Det er nyttigt til at modellere en række ting. For eksempel kan man beskrive geometriske former i planet:
datatype form = Cirkel of koordinat * omkreds
| Rektangel of koordinat * koordinat
| Trekant of koordinat * koordinat * koordinat
Eller binære træer:
datatype tree = Leaf
| Node of trae * int * trae
Eller køretøjer:
type hjul = int
type gear = int
type tophastighed = int
type hestekraefter = int
datatype koretoj = Bil of tophastighed * hestekraefter
| Tank of tophastighed * hestekraefter
| Cykel of hjul * gear
Det er efterfølgende muligt at konstruere funktioner som behandler disse typer ved hjælp af mønstergenkendelse:
fun antal_elementer Leaf = 0
| antal_elementer (Node (venstre, n, hojre)) =
1 + antal_elementer(venstre) + antal_elementer(hojre)
Det er værd at bemærke at algebraiske datatyper kan være rekursivt definerede, og funktioner som arbejder på disse er derfor ofte også rekursive. Det er også interessant at bemærke hvordan mønstergenkendelse og typeinferens fungerer: Alle tomme træer bliver grebet af første mønster mens ikke-tomme træer bliver matchet således at deres obligatoriske tre parametre (et venstre-træ, en værdi og et højre-træ) får navne som kan bruges i funktionskroppen.
fun miljovenlig (Cykel _) = true
| miljovenlig (_) = false
Man kan også udelade dele af en struktur ved at give dem det særlige variabelnavn _.
Højereordensfunktioner
Funktioner i Standard ML har såkaldt førsteklassestatus, hvilket vil sige at alle funktioner kan betragtes som værdier på lige fod med almindelige værdier som sandhedsværdier, tal, lister og tekst. En konsekvens ved dette er at funktioner kan tage andre funktioner som argument. Det er også muligt at erklære en funktion som ikke har et navn, men blot er en værdi (en såkaldt closure, lambda-udtryk eller anonym funktion).
Følgende er et eksempel som definerer plus som en funktion der tager en 2-tuple som input og returnerer summen af dens første- og andenkomponent:
val plus = (fn (x,y) => x+y)
En funktion kaldes "af højere orden" hvis den tager imod funktioner som argument eller returnerer funktioner som værdi. En strengere definition kræver at begge er tilfældet. Følgende er et eksempel på en funktion, K, som tager et argument x som input og returnerer en funktion, som tager et argument y som input, smider y væk og returnerer x; funktionen er skrevet på tre måder som alle er ækvivalente og gyldige:
fun K x y = x
fun K x = (fn y => x)
val K = (fn x => (fn y => x))
Følgende funktion, fikspunkt, tager imod en funktion f og en startværdi x og begynder at regne f(x), f(f(x)), f(f(f(x))) osv. indtil den finder et punkt hvor det ikke gør nogen forskel om man tilføjer en ekstra anvendelse af funktionen:
fun fikspunkt (f, x) =
if f x = f (f x)
then x
else fikspunkt (f, f x)
Man kan sige at K og fikspunkt er højereordensfunktioner.
Undtagelser
Standard ML understøtter undtagelser ved brugen af to nøgleord: raise og handle. Man kan desuden definere sine egne undtagelser ved exception, der har en syntaks meget lignende den for abstrakte datatyper. Der findes en række indbyggede undtagelser: Empty, Div, Fail, Domain m.fl.
fun max [] = raise Empty
| max [x] = x
| max (x::y::xs) =
if x > y
then max (x::xs)
else max (y::xs)
Moduler
Afsnit mangler.
Implementeringer
MLTon er en optimerende compiler til hele programmer. Den producerer meget effektiv kode sammenlignet med andre Standard ML-compilere.
Standard ML of New Jersey (forkortet SML/NJ) er en compiler med tilhørende værktøjer, biblioteker og interaktiv fortolker.
Poly/ML er en compiler som producerer effektiv kode og understøtter hardware med flere kerner (igennem POSIX-tråde).
Moscow ML er en compiler baseret på CAML Light-runtime-miljøet og understøtter moduler såvel som en stor del af SML Basis-biblioteket.
HaMLet er en SML-fortolker som forsøger at være en tilgængelig og præcis referenceimplementation.
ML Kit tilføjer en spildopsamler og regionsbaseret hukommelseshåndtering, sigtet mod realtidsapplikationer.
SML.NET oversætter til Microsofts Common Language Runtime (CLR) og har udvidelser som muliggør linkning til andre .NET-kode.
SML2c er en batch-compiler og oversætter kun erklæringer på modulniveau (dvs. signaturer, strukturer og funktorer) til C. Den er baseret på SML/NJ 0.67, men understøtter ikke SML/NJ's debugging og profiling. Programmer som kun består af moduler, og som virker i SML/NJ, kan oversættes med sml2c uden ændringer.
Poplog-systemet implementerer en version af Standard ML samtidigt med Common Lisp og Prolog og tillader sammenblandingen af disse sprog.
SML# er en konservativ udvidelse til Standard ML som tilføjer polymorfi på record-typer og evnen til at arbejde sammen med C-kode.
Alice: en fortolker til Standard ML som tilføjer doven evaluering, samtidighed (trådprogrammering og distribuerede beregninger via RPC) og constraintprogrammering.
Disse systemer er alle open source og frit tilgængelige. De fleste er implementeret i Standard ML. Der findes ikke længere kommercielle Standard ML-implementeringer, men et firma kaldet Harlequin producerede engang en kommerciel IDE og compiler til Standard ML under navnet MLWorks. Firmaet eksisterer ikke længere.
Se også
Funktionsprogrammering
Rekursion
Haskell (programmeringssprog)
OCaml (programmeringssprog)
Noter
Eksterne henvisninger
StandardML.dk
Programmeringssprog | danish | 0.674769 |
Pony/itertools--index-.txt |
Itertools Package¶
The itertools package provides the Iter class for doing useful things with
iterators. It is Inspired by Python's itertools library, Rust's Iterator, and
Elixir's Enum and Stream.
Iter¶
The Iter class wraps iterators so that additional methods may be applied to it.
Some methods, such as fold and collect, run through the underlying iterator in
order to return a result. Others, such as map and filter, are lazy. This means
that they return another Iter so that the resulting values are computed one by
one as needed. Lazy methods return Iter types.
For example, the following code creates an Iter from the values of an array
containing the numbers 1 through 5, increments each number by one, filters out
any odd numbers, and prints the rest.
let xs = Iter[I64]([1; 2; 3; 4; 5].values())
.map[I64]({(x) => x + 1 })
.filter({(x) => (x % 2) == 0 })
.map[None]({(x) => env.out.print(x.string()) })
This will result in an iterator that prints the numbers 2, 4, and 6. However,
due to the lazy nature of the map and filter, no iteration has actually occurred
and nothing will be printed. One solution to this would be to loop over the
resulting Iter as so:
for x in xs do
None
end
This will trigger the iteration and print out the values 2, 4, and 6. This is
where the run method comes in handy by doing the iteration without the need
for a loop. So the final code would be as follows:
Iter[I64]([1; 2; 3; 4; 5].values())
.map[I64]({(x) => x + 1 })
.filter({(x) => (x % 2) == 0 })
.map[None]({(x) => env.out.print(x.string()) })
.run()
Output:
2
4
6
Public Types¶
class Iter
| pony | 3527994 | https://sv.wikipedia.org/wiki/Iphiaulax%20assimulator | Iphiaulax assimulator | Iphiaulax assimulator är en stekelart som först beskrevs av Nils Samuel Swederus 1787. Iphiaulax assimulator ingår i släktet Iphiaulax och familjen bracksteklar. Inga underarter finns listade i Catalogue of Life.
Källor
Bracksteklar
assimulator | swedish | 1.309652 |
Pony/src-files-auth-.txt |
auth.pony
1
2
3primitive FileAuth
new create(from: AmbientAuth) =>
None
| pony | 1825125 | https://no.wikipedia.org/wiki/Neonomius | Neonomius | Neonomius er en slekt av løpebiller.
Utseende
Små (ca. 4 millimeter), avlange, blanke, rødlige til brunsvarte løpebiller. Pronotum er rundet, dekkvingene litt rundede med fine punktstriper.
Levevis
Artene er knyttet til råtten ved og kan gjerne finnes under barken. De flyr om natten og kommer til lys.
Utbredelse
Slekten er utbredt i Australia.
Systematisk inndeling
Ordenen biller, Coleoptera Linnaeus, 1758
Underordenen Adephaga Schellenberg, 1806
Overfamilien løpebiller og vannkalver, Caraboidea Latreille, 1802
Familien løpebiller, Carabidae Latreille, 1802
Underfamilien Psydrinae LeConte, 1853
Slekten Neonomius Moore, 1963
Neonomius australis (Sloane, 1915)
Neonomius laevicollis (Sloane, 1915)
Neonomius laticollis (Sloane, 1900)
Litteratur
Eksterne lenker
Atlas of Living Australia - Neonomius
Psydrinae
Biller formelt beskrevet i 1963
Dyr formelt beskrevet av Barry Philip Moore
Australias insekter | norwegian_bokmål | 1.291977 |
Pony/net-NoProxy-.txt |
NoProxy¶
[Source]
Default implementation of a proxy that does not alter the supplied TCPConnectionNotify.
actor MyClient
new create(host: String, service: String, proxy: Proxy = NoProxy) =>
let conn: TCPConnection = TCPConnection.create(
TCPConnectAuth(env.root),
proxy.apply(MyConnectionNotify.create()),
"localhost",
"80")
class val NoProxy is
Proxy ref
Implements¶
Proxy ref
Constructors¶
create¶
[Source]
new iso create()
: NoProxy iso^
Returns¶
NoProxy iso^
Public Functions¶
apply¶
[Source]
fun box apply(
wrap: TCPConnectionNotify iso)
: TCPConnectionNotify iso^
Parameters¶
wrap: TCPConnectionNotify iso
Returns¶
TCPConnectionNotify iso^
| pony | 154732 | https://no.wikipedia.org/wiki/Chymotrypsin | Chymotrypsin | Chymotrypsin er et proteolyttisk fordøyelsesenzym som hovedsakelig spalter peptidbindinger i proteiner. Chymotrypsin produseres som chymotrypsinogen, en inaktiv form eller zymogen, i bukspyttkjertelen. Chymotrypsinogen transporteres til fordøyelseskanalen (tolvfingertarmen) og aktiveres av trypsin.
Fysiologi
Enzymer | norwegian_bokmål | 1.205577 |
Pony/builtin-I8-.txt |
I8¶
[Source]
primitive val I8 is
SignedInteger[I8 val, U8 val] val
Implements¶
SignedInteger[I8 val, U8 val] val
Constructors¶
create¶
[Source]
new val create(
value: I8 val)
: I8 val^
Parameters¶
value: I8 val
Returns¶
I8 val^
from[A: ((I8 val | I16 val | I32 val | I64 val | I128 val | ILong val | ISize val | U8 val | U16 val | U32 val | U64 val | U128 val | ULong val | USize val | F32 val | F64 val) & Real[A] val)]¶
[Source]
new val from[A: ((I8 val | I16 val | I32 val |
I64 val | I128 val | ILong val |
ISize val | U8 val | U16 val |
U32 val | U64 val | U128 val |
ULong val | USize val | F32 val |
F64 val) & Real[A] val)](
a: A)
: I8 val^
Parameters¶
a: A
Returns¶
I8 val^
min_value¶
[Source]
new val min_value()
: I8 val^
Returns¶
I8 val^
max_value¶
[Source]
new val max_value()
: I8 val^
Returns¶
I8 val^
Public Functions¶
abs¶
[Source]
fun box abs()
: U8 val
Returns¶
U8 val
bit_reverse¶
[Source]
fun box bit_reverse()
: I8 val
Returns¶
I8 val
bswap¶
[Source]
fun box bswap()
: I8 val
Returns¶
I8 val
popcount¶
[Source]
fun box popcount()
: U8 val
Returns¶
U8 val
clz¶
[Source]
fun box clz()
: U8 val
Returns¶
U8 val
ctz¶
[Source]
fun box ctz()
: U8 val
Returns¶
U8 val
clz_unsafe¶
[Source]
Unsafe operation.
If this is 0, the result is undefined.
fun box clz_unsafe()
: U8 val
Returns¶
U8 val
ctz_unsafe¶
[Source]
Unsafe operation.
If this is 0, the result is undefined.
fun box ctz_unsafe()
: U8 val
Returns¶
U8 val
bitwidth¶
[Source]
fun box bitwidth()
: U8 val
Returns¶
U8 val
bytewidth¶
[Source]
fun box bytewidth()
: USize val
Returns¶
USize val
min¶
[Source]
fun box min(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
max¶
[Source]
fun box max(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
fld¶
[Source]
fun box fld(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
fld_unsafe¶
[Source]
fun box fld_unsafe(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
mod¶
[Source]
fun box mod(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
mod_unsafe¶
[Source]
fun box mod_unsafe(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
addc¶
[Source]
fun box addc(
y: I8 val)
: (I8 val , Bool val)
Parameters¶
y: I8 val
Returns¶
(I8 val , Bool val)
subc¶
[Source]
fun box subc(
y: I8 val)
: (I8 val , Bool val)
Parameters¶
y: I8 val
Returns¶
(I8 val , Bool val)
mulc¶
[Source]
fun box mulc(
y: I8 val)
: (I8 val , Bool val)
Parameters¶
y: I8 val
Returns¶
(I8 val , Bool val)
divc¶
[Source]
fun box divc(
y: I8 val)
: (I8 val , Bool val)
Parameters¶
y: I8 val
Returns¶
(I8 val , Bool val)
remc¶
[Source]
fun box remc(
y: I8 val)
: (I8 val , Bool val)
Parameters¶
y: I8 val
Returns¶
(I8 val , Bool val)
fldc¶
[Source]
fun box fldc(
y: I8 val)
: (I8 val , Bool val)
Parameters¶
y: I8 val
Returns¶
(I8 val , Bool val)
modc¶
[Source]
fun box modc(
y: I8 val)
: (I8 val , Bool val)
Parameters¶
y: I8 val
Returns¶
(I8 val , Bool val)
add_partial¶
[Source]
fun box add_partial(
y: I8 val)
: I8 val ?
Parameters¶
y: I8 val
Returns¶
I8 val ?
sub_partial¶
[Source]
fun box sub_partial(
y: I8 val)
: I8 val ?
Parameters¶
y: I8 val
Returns¶
I8 val ?
mul_partial¶
[Source]
fun box mul_partial(
y: I8 val)
: I8 val ?
Parameters¶
y: I8 val
Returns¶
I8 val ?
div_partial¶
[Source]
fun box div_partial(
y: I8 val)
: I8 val ?
Parameters¶
y: I8 val
Returns¶
I8 val ?
rem_partial¶
[Source]
fun box rem_partial(
y: I8 val)
: I8 val ?
Parameters¶
y: I8 val
Returns¶
I8 val ?
divrem_partial¶
[Source]
fun box divrem_partial(
y: I8 val)
: (I8 val , I8 val) ?
Parameters¶
y: I8 val
Returns¶
(I8 val , I8 val) ?
fld_partial¶
[Source]
fun box fld_partial(
y: I8 val)
: I8 val ?
Parameters¶
y: I8 val
Returns¶
I8 val ?
mod_partial¶
[Source]
fun box mod_partial(
y: I8 val)
: I8 val ?
Parameters¶
y: I8 val
Returns¶
I8 val ?
shl¶
[Source]
fun box shl(
y: U8 val)
: I8 val
Parameters¶
y: U8 val
Returns¶
I8 val
shr¶
[Source]
fun box shr(
y: U8 val)
: I8 val
Parameters¶
y: U8 val
Returns¶
I8 val
shl_unsafe¶
[Source]
fun box shl_unsafe(
y: U8 val)
: I8 val
Parameters¶
y: U8 val
Returns¶
I8 val
shr_unsafe¶
[Source]
fun box shr_unsafe(
y: U8 val)
: I8 val
Parameters¶
y: U8 val
Returns¶
I8 val
string¶
[Source]
fun box string()
: String iso^
Returns¶
String iso^
add_unsafe¶
[Source]
fun box add_unsafe(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
sub_unsafe¶
[Source]
fun box sub_unsafe(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
mul_unsafe¶
[Source]
fun box mul_unsafe(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
div_unsafe¶
[Source]
fun box div_unsafe(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
divrem_unsafe¶
[Source]
fun box divrem_unsafe(
y: I8 val)
: (I8 val , I8 val)
Parameters¶
y: I8 val
Returns¶
(I8 val , I8 val)
rem_unsafe¶
[Source]
fun box rem_unsafe(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
neg_unsafe¶
[Source]
fun box neg_unsafe()
: I8 val
Returns¶
I8 val
op_and¶
[Source]
fun box op_and(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
op_or¶
[Source]
fun box op_or(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
op_xor¶
[Source]
fun box op_xor(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
op_not¶
[Source]
fun box op_not()
: I8 val
Returns¶
I8 val
add¶
[Source]
fun box add(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
sub¶
[Source]
fun box sub(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
mul¶
[Source]
fun box mul(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
div¶
[Source]
fun box div(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
divrem¶
[Source]
fun box divrem(
y: I8 val)
: (I8 val , I8 val)
Parameters¶
y: I8 val
Returns¶
(I8 val , I8 val)
rem¶
[Source]
fun box rem(
y: I8 val)
: I8 val
Parameters¶
y: I8 val
Returns¶
I8 val
neg¶
[Source]
fun box neg()
: I8 val
Returns¶
I8 val
eq¶
[Source]
fun box eq(
y: I8 val)
: Bool val
Parameters¶
y: I8 val
Returns¶
Bool val
ne¶
[Source]
fun box ne(
y: I8 val)
: Bool val
Parameters¶
y: I8 val
Returns¶
Bool val
lt¶
[Source]
fun box lt(
y: I8 val)
: Bool val
Parameters¶
y: I8 val
Returns¶
Bool val
le¶
[Source]
fun box le(
y: I8 val)
: Bool val
Parameters¶
y: I8 val
Returns¶
Bool val
ge¶
[Source]
fun box ge(
y: I8 val)
: Bool val
Parameters¶
y: I8 val
Returns¶
Bool val
gt¶
[Source]
fun box gt(
y: I8 val)
: Bool val
Parameters¶
y: I8 val
Returns¶
Bool val
hash¶
[Source]
fun box hash()
: USize val
Returns¶
USize val
hash64¶
[Source]
fun box hash64()
: U64 val
Returns¶
U64 val
i8¶
[Source]
fun box i8()
: I8 val
Returns¶
I8 val
i16¶
[Source]
fun box i16()
: I16 val
Returns¶
I16 val
i32¶
[Source]
fun box i32()
: I32 val
Returns¶
I32 val
i64¶
[Source]
fun box i64()
: I64 val
Returns¶
I64 val
i128¶
[Source]
fun box i128()
: I128 val
Returns¶
I128 val
ilong¶
[Source]
fun box ilong()
: ILong val
Returns¶
ILong val
isize¶
[Source]
fun box isize()
: ISize val
Returns¶
ISize val
u8¶
[Source]
fun box u8()
: U8 val
Returns¶
U8 val
u16¶
[Source]
fun box u16()
: U16 val
Returns¶
U16 val
u32¶
[Source]
fun box u32()
: U32 val
Returns¶
U32 val
u64¶
[Source]
fun box u64()
: U64 val
Returns¶
U64 val
u128¶
[Source]
fun box u128()
: U128 val
Returns¶
U128 val
ulong¶
[Source]
fun box ulong()
: ULong val
Returns¶
ULong val
usize¶
[Source]
fun box usize()
: USize val
Returns¶
USize val
f32¶
[Source]
fun box f32()
: F32 val
Returns¶
F32 val
f64¶
[Source]
fun box f64()
: F64 val
Returns¶
F64 val
i8_unsafe¶
[Source]
fun box i8_unsafe()
: I8 val
Returns¶
I8 val
i16_unsafe¶
[Source]
fun box i16_unsafe()
: I16 val
Returns¶
I16 val
i32_unsafe¶
[Source]
fun box i32_unsafe()
: I32 val
Returns¶
I32 val
i64_unsafe¶
[Source]
fun box i64_unsafe()
: I64 val
Returns¶
I64 val
i128_unsafe¶
[Source]
fun box i128_unsafe()
: I128 val
Returns¶
I128 val
ilong_unsafe¶
[Source]
fun box ilong_unsafe()
: ILong val
Returns¶
ILong val
isize_unsafe¶
[Source]
fun box isize_unsafe()
: ISize val
Returns¶
ISize val
u8_unsafe¶
[Source]
fun box u8_unsafe()
: U8 val
Returns¶
U8 val
u16_unsafe¶
[Source]
fun box u16_unsafe()
: U16 val
Returns¶
U16 val
u32_unsafe¶
[Source]
fun box u32_unsafe()
: U32 val
Returns¶
U32 val
u64_unsafe¶
[Source]
fun box u64_unsafe()
: U64 val
Returns¶
U64 val
u128_unsafe¶
[Source]
fun box u128_unsafe()
: U128 val
Returns¶
U128 val
ulong_unsafe¶
[Source]
fun box ulong_unsafe()
: ULong val
Returns¶
ULong val
usize_unsafe¶
[Source]
fun box usize_unsafe()
: USize val
Returns¶
USize val
f32_unsafe¶
[Source]
fun box f32_unsafe()
: F32 val
Returns¶
F32 val
f64_unsafe¶
[Source]
fun box f64_unsafe()
: F64 val
Returns¶
F64 val
compare¶
[Source]
fun box compare(
that: I8 val)
: (Less val | Equal val | Greater val)
Parameters¶
that: I8 val
Returns¶
(Less val | Equal val | Greater val)
| pony | 339547 | https://da.wikipedia.org/wiki/Jongl%C3%B8r%20sekvens | Jonglør sekvens | Inden for rekreativ matematik er en Jonglør sekvens en talfølge bestående af naturlige tal. Følgen starter med et tal a0, og hvert efterfølgende tal i sekvensen er defineret ved følgende rekursive relation:
Jonglør sekvenser blev publiceret af Clifford A. Pickover, en Amerikansk matematiker. Navnet kommer af sekvensernes voksende og faldende natur, som kan sammenlignes med bolde i en jonglørs hænder.
For eksempel ser sekvensen for a0 = 3 således ud:
Hvis en jonglør sekvens når tallet 1 vil alle efterfølgende tal ligeledes være lig 1. Det er formodet at alle jonglør sekvenser når tallet 1, og formodningen er bekræftet for startværdier op til 106, men er endnu ikke bevist. Denne formodning om jonglør sekvenser minder om Collatz formodningen, om hvilken Paul Erdős sagde "Matematikken er endnu ikke parat til sådanne problemer."
For en given startværdi n defineres I(n) som antallet af skridt jonglør sekvensen startende med n tager før den når 1, og h(n) som den største værdi i jonglør sekvensen startende med n. For små værdier af n fås da:
{| class="wikitable"
|-
! n
! Jonglør sekvens
! l(n)
! h(n)
|-
| 2
| 2, 1
| align="center" | 1
| align="center" | 2
|-
| 3
| 3, 5, 11, 36, 6, 2, 1
| align="center" | 6
| align="center" | 36
|-
| 4
| 4, 2, 1
| align="center" | 2
| align="center" | 4
|-
| 5
| 5, 11, 36, 6, 2, 1
| align="center" | 5
| align="center" | 36
|-
| 6
| 6, 2, 1
| align="center" | 2
| align="center" | 6
|-
| 7
| 7, 18, 4, 2, 1
| align="center" | 4
| align="center" | 18
|-
| 8
| 8, 2, 1
| align="center" | 2
| align="center" | 8
|-
| 9
| 9, 27, 140, 11, 36, 6, 2, 1
| align="center" | 7
| align="center" | 140
|-
| 10
| 10, 3, 5, 11, 36, 6, 2, 1
| align="center" | 7
| align="center" | 36
|}
Jonglør sekvenser kan nå meget høje værdier før de falder til 1. For eksempel, jonglør sekvensen startende med a0 = 37 når en maksimal værdi på 24906114455136. Harry J. Smith har bestemt at jonglør sekvensen startende med a0 = 48443 når en maksimal værdi ved a60 med 972463 cifre før den falder til 1 ved a157 .
Referencer
Eksterne links
Beregning af Jonglør sekvenser på Collatz Conjecture Calculation Center
Juggler Number sider af Harry J. Smith
Tal
Talteori | danish | 1.280267 |
Pony/consume-and-destructive-read.txt | # Consume and Destructive Read
An important part of Pony's capabilities is being able to say "I'm done with this thing." We'll cover two means of handling this situation: consuming a variable and destructive reads.
## Consuming a variable
Sometimes, you want to _move_ an object from one variable to another. In other words, you don't want to make a _second_ name for the object, you want to move the object from some existing name to a different one.
You can do this by using `consume`. When you `consume` a variable you take the value out of it, effectively leaving the variable empty. No code can read from that variable again until a new value is written to it. Consuming a local variable or a parameter allows you to move it to a new location, most importantly for `iso` and `trn`.
```pony
fun test(a: Wombat iso) =>
var b: Wombat iso = consume a // Allowed!
```
The compiler is happy with that because by consuming `a`, you've said the value can't be used again and the compiler will complain if you try to.
```pony
fun test(a: Wombat iso) =>
var b: Wombat iso = consume a // Allowed!
var c: Wombat tag = a // Not allowed!
```
Here's an example of that. When you try to assign `a` to `c`, the compiler will complain.
By default, a `consume` expression returns a type with the capability of the variable that you are assigning to. You can see this in the example above, where we say that `b` is `Wombat iso`, and as such the result of the `consume` expression is `Wombat iso`. We could also have said that `b` is a `Wombat val`, but we can instead give an explicit reference capability to the `consume` expression:
```pony
fun test(a: AnIncrediblyLongTypeName iso) =>
var b = consume val a
```
The expression in line 2 of the example above is equivalent to saying `var b: AnIncrediblyLongTypeName val = consume a`.
__Can I `consume` a field?__ Definitely not! Consuming something means it is empty, that is, it has no value. There's no way to be sure no other alias to the object will access that field. If we tried to access a field that was empty, we would crash. But there's a way to do what you want to do: _destructive read_.
## Destructive read
There's another way to _move_ a value from one name to another. Earlier, we talked about how assignment in Pony returns the _old_ value of the left-hand side, rather than the new value. This is called _destructive read_, and we can use it to do what we want to do, even with fields.
```pony
class Aardvark
var buddy: Wombat iso
new create() =>
buddy = recover Wombat end
fun ref test(a: Wombat iso) =>
var b: Wombat iso = buddy = consume a // Allowed!
```
Here, we consume `a`, assign it to the field `buddy`, and assign the _old_ value of `buddy` to `b`.
__Why is it ok to destructively read fields when we can't consume them?__ Because when we do a destructive read, we assign to the field so it always has a value. Unlike `consume`, there's no time when the field is empty. That means it's safe and the compiler doesn't complain.
| pony | 1058243 | https://da.wikipedia.org/wiki/Rust%20%28programmeringssprog%29 | Rust (programmeringssprog) | Rust er et multi-paradigme programmeringssprog skabt af Graydon Hoare, der er omhyggeligt designet til at levere høj ydeevne og it-sikkerhed.
Sproget er særligt kendt for sin evne til at håndtere samtidighed på en sikker måde, hvilket minimerer risikoen for kørselsfejl. Rust svarer syntaktisk til C og C++, men kan garantere hukommelsessikkerhed ved at bruge en lånekontrol til at validere referencer. Man kan dog komme uden om dette ved f.eks. at bruge et såkaldt 'unsafe' keyword, hvilket giver mere fleksibilitet, men også øger programmørens ansvar for korrekt hukommelsesstyring, da det tillader kode, der potentielt kan bryde hukommelsessikkerheden .
Historie
I 2006 besluttede Graydon Hoare, en 29-årig computerprogrammør, der arbejdede for Mozilla, at designe et nyt programmeringssprog. Han blev inspireret af en frustrerende oplevelse med en elevator, der konstant gik i stykker på grund af softwarefejl. Hoare vidste, at mange af disse fejl skyldtes problemer med, hvordan et program bruger hukommelse. Han besluttede sig derfor at skabe et sprog, der kunne skrive hurtig kode uden hukommelsesbugs. Rust har fået sit navn efter en gruppe af bemærkelsesværdigt hårdføre svampe, Rustsvampe, som ifølge Hoare er "over-engineered for survival" .
Over et halvandet årti senere er Rust blevet et af de mest populære programmeringssprog.
Rust blev officielt sponsoreret af Mozilla i 2009. Sproget ville være open source, og kun de mennesker, der bidrog til dets udvikling, ville have ansvar for det. Mozilla var dog parat til at kickstarte det ved at finansiere projektet . I løbet af de følgende 10 år hyrede Mozilla mere end et dusin ingeniører til at arbejde fuldtid på Rust .
I 2015 blev den første stabile version af Rust udgivet, og det blev hurtigt populært blandt store virksomheder. I 2020 afslørede Dropbox en ny version af deres "sync engine", altså dét som synkroniserer filer i skyen, der var omskrevet til Rust . I samme år omskrev Discord deres "Read States" service, en kritisk service der holder styr på, hvilke kanaler og beskeder brugere har læst, til Rust, hvilket resulterede i en markant forbedring og derved gjorde systemet 10 gange hurtigere . Amazon Web Services, som leverer cloud computing-platforme og API'er efter behov, har også fundet, at Rust kan hjælpe dem med at skrive sikrere, hurtigere kode .
I Stack Overflows udviklerundersøgelse fra 2023, som de afholder hvert år, er Rust blevet kåret som det mest beundrede programmeringssprog, hvor over 80% af de udviklere, der har anvendt sproget, har udtrykt et ønske om at fortsætte med det i det kommende år . Dette står i skarp kontrast til det mindst attraktive sprog, MATLAB, hvor under 20% af de udviklere, der har brugt det, ønsker at fortsætte med det i det følgende år . Faktisk har Rust de sidste 7 år blevet kåret til at være det mest beundrede programmeringssprog ifølge samme undersøgelse .
Sikkerhedsforanstaltninger
I Rust beregner compileren, hvornår en variabel ikke længere er tilgængelig, og når det sker, indsætter compileren kode til frigivelse af variablens hukommelse. Variabler er som udgangspunkt uforanderlige (immutable), hvilket betyder, at deres værdi ikke kan ændres, når de først er blevet tildelt. Hvis en variabel skal kunne ændres, kan den defineres som foranderlig (mutable) ved at bruge 'mut' nøgleordet foran variabelnavnet.
Når en funktion modtager en variabel som parameter, overtager den som udgangspunkt ejerskabet, medmindre parameteren er en reference. Ved at definere parameteren som en reference, 'låner' funktionen variablen uden at overtage ejerskabet.
En reference giver som udgangspunkt kun læseadgang, men det er muligt at definere foranderlige (mutable) referencer, der tillader opdatering. Rust tillader kun én foranderlig reference til en bestemt data i en bestemt rækkevidde, hvilket hjælper med at forhindre 'data race' betingelser. En 'data race' opstår, når to eller flere tråde i en multithreaded applikation samtidigt forsøger at læse fra og skrive til den samme hukommelsesplads uden passende synkronisering. Desuden tillader Rust flere uforanderlige (immutable) referencer, men ikke en mutable reference samtidig med nogen immutable referencer. Dette er også en del af Rusts regler for "aliasing" og "mutability", som sikrer mod fejl, hvor data ændres eller slettes under læsning.
Programstruktur
Rust-programmer er typisk struktureret i mange funktioner, der kalder hinanden. Dette hjælper med at holde kode organiseret og genanvendelig.
Rust understøtter også moduler, som er en måde at gruppere relaterede definitioner, såsom funktioner, strukturer (datastrukturer, der kan indeholde forskellige typer data) og træk (en måde at definere fælles adfærd på), sammen. Som standard er alle definitioner i et modul private, hvilket betyder, at de kun kan tilgås inden for det modul, de er defineret i. Hvis en definition skal være tilgængelig uden for det modul, det er defineret i, kan det gøres offentligt ved hjælp af nøgleordet 'pub'.
I større Rust-programmer kan moduler være indlejret i hinanden for at skabe en hierarkisk struktur. Dette kan hjælpe med at organisere kode i logiske grupper. Desuden kan moduler flyttes ud i deres egne filer for at gøre koden mere overskuelig og nemmere at vedligeholde.
Her er et eksempel på, hvordan moduler kan bruges i Rust:
// Definerer et modul med navnet 'greetings'
mod greetings {
// Gør 'hello' funktionen offentlig med 'pub' nøgleordet
pub fn hello() {
println!("Hello, world!");
}
// 'goodbye' funktionen er privat og kan kun tilgås inden for 'greetings' modulet
fn goodbye() {
println!("Goodbye, world!");
}
}
// Hovedfunktionen
fn main() {
// Kalder den offentlige 'hello' funktion fra 'greetings' modulet
greetings::hello();
}
I dette eksempel er 'hello'-funktionen defineret i 'greetings'-modulet og gjort offentlig, så den kan kaldes fra 'main'-funktionen. Derimod er 'goodbye'-funktionen privat og kan kun kaldes inden for 'greetings'-modulet.
Eksempel
Her er et simpelt eksempel på et CLI script skrevet i Rust, hvor der genereres et tilfældigt tal ved hjælp af rand-programbiblioteket.
// Her importeres 'rand' biblioteket, som muliggør generering af tilfældige tal.
use rand::Rng;
// Hovedfunktionen, hvor programmet starter.
fn main() {
// Kalder 'generate_random_number' funktionen og gemmer resultatet i et uforanderligt variabel.
let random_number = generate_random_number();
// Her skrives en linje til konsollen.
println!("Det tilfældige tal er: {}", random_number);
}
// Funktion der genererer et tilfældigt tal mellem 1 og 10.
fn generate_random_number() -> i32 {
// Opretter en ny tilfældig nummergenerator.
let mut rng = rand::thread_rng();
// Genererer et tilfældigt tal mellem 1 og 10
// Der skrives ikke '1..10', men i stedet '1..11', fordi den øvre grænse, 11, ikke er inkluderet
let random_number = rng.gen_range(1..11);
// Returnerer det tilfældige tal.
return random_number;
}
Se også
Redox (styresystem) - skrevet i Rust
Referencer
Links
https://rust-lang.org - Rusts officielle hjemmeside
https://doc.rust-lang.org/stable/book/ - En guide til Rust
Programmeringssprog | danish | 0.684868 |
Pony/as.txt | # As Operator
The `as` operator in Pony has two related uses. First, it provides a safe way to increase the specificity of an object's type. Second, it gives the programmer a way to specify the type of the items in an array literal.
## Expressing a different type of an object
In Pony, each object is an instance of a single concrete type, which is the most specific type for that object. But the object can also be held as part of a "wider" abstract type such as an interface, trait, or type union which the concrete type is said to be a subtype of.
`as` (like `match`) allows a program to check the runtime type of an abstract-typed value to see whether or not the object matches a given type which is more specific. If it doesn't match the more specific type, then a runtime `error` is raised. For example:
```pony
class Cat
fun pet() =>
...
type Animal is (Cat | Fish | Snake)
fun pet(animal: Animal) =>
try
// raises error if not a Cat
let cat: Cat = animal as Cat
cat.pet()
end
```
In the above example, within `pet` our current view of `animal` is via the type union `Animal`. To treat `animal` as a cat, we need to do a runtime check that the concrete type of the object instance is `Cat`. If it is, then we can pet it. This example is a little contrived, but hopefully elucidates how `as` can be used to take a type that is a union and get a specific concrete type from it.
Note that the type requested as the `as` argument must exist as a type of the object instance, unlike C casting where one type can be forced to become another type. Coercion from one concrete type to another is not possible using `as`, so one can not do `let value:F64 = F32(1.0) as F64`. `F32` and `F64` are both concrete types and each object can only have a single concrete type. Many concrete types do provide methods that allow you to convert them to another concrete type, for example, `F32(1.0).f64()` to convert an `F32` to an `F64` or `F32(1.0).string()` to convert to a string.
In addition to using `as` with a union of disjoint types, we can also express an intersected type of the object, meaning the object has a type that the alias we have for the object is not directly related to the type we want to express. For example:
```pony
trait Alive
trait Well
class Person is (Alive & Well)
class LifeSigns
fun is_all_good(alive: Alive)? =>
// if the instance 'alive' is also of type 'Well' (such as a Person instance). raises error if not possible
let well: Well = alive as Well
```
`as` can also be used to get a more specific type of an object from an alias to it that is an interface or a trait. Let's say, for example, that you have a library for doing things with furry, rodent-like creatures. It provides a `Critter` interface which programmers can then use to create specific types of critters.
```pony
interface Critter
fun wash(): String
```
The programmer uses this library to create a `Wombat` and a `Capybara` class. But the `Capybara` class provides a new method, `swim()`, that is not part of the `Critter` class. The programmer wants to store all of the critters in an array, in order to carry out actions on groups of critters. Now assume that when capybaras finish washing they want to go for a swim. The programmer can accomplish that by using `as` to attempt to use each `Critter` object in the `Array[Critter]` as a `Capybara`. If this fails because the `Critter` is not a `Capybara`, then an error is raised; the program can swallow this error and go on to the next item.
```pony
interface Critter
fun wash(): String
class Wombat is Critter
fun wash(): String => "I'm a clean wombat!"
class Capybara is Critter
fun wash(): String => "I feel squeaky clean!"
fun swim(): String => "I'm swimming like a fish!"
actor Main
new create(env: Env) =>
let critters = Array[Critter].>push(Wombat).>push(Capybara)
for critter in critters.values() do
env.out.print(critter.wash())
try
env.out.print((critter as Capybara).swim())
end
end
```
You can do the same with interfaces as well. In the example below, we have an Array of `Any` which is an interface where we want to try wash any entries that conform to the `Critter` interface.
```pony
actor Main
new create(env: Env) =>
let anys = Array[Any ref].>push(Wombat).>push(Capybara)
for any in anys.values() do
try
env.out.print((any as Critter).wash())
end
end
```
Note, All the `as` examples above could be written using a `match` statement where a failure to match results in `error`. For example, our last example written to use `match` would be:
```pony
actor Main
new create(env: Env) =>
let anys = Array[Any ref].>push(Wombat).>push(Capybara)
for any in anys.values() do
try
match any
| let critter: Critter =>
env.out.print(critter.wash())
else
error
end
end
end
```
Thinking of the `as` keyword as "an attempt to match that will error if not matched" is a good mental model to have. If you don't care about handling the "not matched" case that causes an error when using `as`, you can rewrite an `as` to use match without an error like:
```pony
actor Main
new create(env: Env) =>
let anys = Array[Any ref].>push(Wombat).>push(Capybara)
for any in anys.values() do
match any
| let critter: Critter =>
env.out.print(critter.wash())
end
end
```
You can learn more about matching on type in the [captures section of the match documentation](/pattern-matching/match.md#captures).
## Specify the type of items in an array literal
The `as` operator can also be used to tell the compiler what type to use for the items in an array literal. In many cases, the compiler can infer the type, but sometimes it is ambiguous.
For example, in the case of the following program, the method `foo` can take either an `Array[U32] ref` or an `Array[U64] ref` as an argument. If a literal array is passed as an argument to the method and no type is specified then the compiler cannot deduce the correct one because there are two equally valid ones.
```pony
actor Main
fun foo(xs: (Array[U32] ref | Array[U64] ref)): Bool =>
// do something boring here
true
new create(env: Env) =>
foo([as U32: 1; 2; 3])
// the compiler would complain about this:
// foo([1; 2; 3])
```
The requested type must be a valid type for the items in the array. Since these types are checked at compile time they are guaranteed to work, so there is no need for the programmer to handle an error condition.
| pony | 5655 | https://sv.wikipedia.org/wiki/Applikationsprogrammeringsgr%C3%A4nssnitt | Applikationsprogrammeringsgränssnitt | Ett API eller applikationsprogrammeringsgränssnitt, av engelskans application programming interface, är en specifikation av hur olika applikationsprogram kan använda och kommunicera med en specifik programvara, som vanligen utgörs av ett dynamiskt länkat bibliotek och som därmed blir en mjukvarukomponent i applikationen. API:et är ett gränssnitt mellan applikationen och biblioteket. Biblioteket blir en mjukvarukomponent i applikationen och utgörs vanligen av en uppsättning funktioner som är tillgängliga för applikationen att anropa, variabler som den kan läsa och/eller ändra, samt datatyper och klasser som den kan använda. Dessa funktioner kan i sin tur använda funktioner, variabler, och så vidare, som inte har gjorts tillgängliga från externa program, utan har kapslats in bakom API:et.
Definition
De flesta programvaror i dagens läge är applikationer som knyter samman annan mjukvarufunktion i olika former och skapar en meningsfull helhet, och denna sammanknytning sker med hjälp av API:er. API:er ger alltså möjlighet att på ett strukturerat sätt återanvända redan utvecklad och kvalitetssäkrad mjukvara som har kapslats in i någon form av kodbibliotek (eng: library). I någon mening kan man säga att ett API är de yttre attributen för en abstrakt datatyp.
Ett välformat API är till sin natur lite "abstrakt" i den meningen att det beskriver en funktion utan att berätta något om hur denna funktion implementeras (ett API som förutsätter något om den underliggande implementationen sägs vara icke välformat).
Olika typer av API:er
Man kan särskilja två olika typer av API:er:
API:er som ger tillgång till olika typer av systemresurser, ofta utan att fästa avseende vid vilket operativsystem programmet ska användas på. Exempel:
Skrivare
Filhantering
Grafikhantering
Radiokretsar (exempelvis WLAN eller Bluetooth)
I detta fall talar man om drivrutins-API:er. API:et används som ett lager mellan högnivåprogrammering och lågnivåresurser (systemresurser).
API:er som ger tillgång till högnivåfunktioner som återanvänds på ett eller annat sätt. Här rör det sig ofta om mjukvara som tillhandahålls av andra leverantörer för olika typer av datahantering eller beräkningar. Exempel:
Matrisberäkningsbibliotek
API:er för att skicka e-post
I detta fall talar man ofta om kommersiella API:er eller högnivå-API:er.
Implementation av ett API
Den programkod som utför det API:et är tänkt att utföra för kallas API:ets implementation. Det existerar ofta ett flertal implementationer för ett visst API, exempelvis för olika operativsystem såsom Windows och olika UNIX-dialekter såsom Linux och Mac OS Classic. Ett API kan implementeras i snart sagt vilket programspråk som helst i vilken operativsystemsmiljö som helst, så länge som det är möjligt för en programmerare att använda det.
Generella och specifika API:er
Man skiljer också på generella och specifika API:er:
Ett generellt API beskriver ett generellt sätt att använda en viss systemresurs eller annan resurs. Exempel är printer-API:er och grafik-API:er såsom OpenGL. Denna typ av API:er tillåter en mjukvaruutvecklare att skapa en programvara som är väldigt flexibel och som kan flyttas mellan olika hårdvaruarkitekturer och operativsystem utan att ändras.
Ett specifikt API ger tillgång till en specifik resurs, ofta en hårdvaruresurs såsom ett specialiserat GPS-chip eller liknande. Denna typ av API:er är vanliga på mer specialiserade hårdvaruarkitekturer.
Vanliga API:er
API:er som många kommer i kontakt med på ett eller annat sätt, exempelvis när man installerar ett nytt program på sin dator, är:
DirectX – för 3D-grafik
GTK+ – för användargränssnitt
OpenGL – för 3D-grafik
Win32 – för applikationsprogrammering på Windows
Open Database Connectivity (ODBC) – för databaser
API och Copyright
2010 stämdes Google av Oracle för att ha implementerat Javakod i Androids operativsystem och sedan distribuerat det. Google hade inte fått tillåtelse att återanvända Java API. Oracle vann tvisten genom ett avgörande i maj 2015.
API:ets kontrakt
Termen kontrakt används ibland som en benämning på en kvasiformell beskrivning på hur, och vilka villkor som ska vara uppfyllda, för att ett API eller en API-funktion ska anropas. Termen kontrakt används också mer formellt i den engelska termen "Design by Contract" (DbC) och avser då en formell specifikation av ett API eller en API-funktion som också utgör en faktisk del av källkoden. Sådana kontrakt möjliggör således kontroll av villkor när anrop till ett API eller API-funktion faktiskt görs. DbC har oftast implementerats i objektorienterade programmeringsspråk.
DbC utvecklades av Bertrand Meyer och har sitt teoretiska ursprung i Tony Hoares Hoare-logik och Jean-Raymond Abrials arbete med Z-notation. "Design by Contract" implementerades först i programmeringsspråket Eiffel och beskrevs först 1986. Stöd för DbC finns idag i flera programmeringsspråk, däribland Ada 2012 och D. Att använda DbC kallas ibland för kontraktsprogrammering.
Ett exempel på kvasiformell beskrivning
Ett kvasiformellt kontrakt för ett matematikbibliotek som tillhandahåller funktionerna Min(...) och Max(...) för heltal kan se ut på följande sätt:
Kontrakt för MinMax
---
Funktioner:
int Max(int a, int b)
Funktion: Max(...) returnerar det större talet av de två inparametrarna a och b
Returvärdets datatyp är heltal (int)
Sidoeffekter: Inga.
int Min(int a, int b)
Funktion: Min(...) returnerar det mindre talet av de två inparametrarna a och b
Returvärdets datatyp är heltal (int)
Sidoeffekter: Inga.
Ett exempel på formell kontraktsbeskrivning i Eiffel
Ett exempel på kontrakt för en funktion för att lägga till element (ELEMENT) i en hashtabell (DICTIONARY) kan se ut så här:
put (x: ELEMENT; key: STRING) is
-- Insert x so that it will be retrievable through key.
require
count ⇐ capacity
not key.empty
do
... Some insertion algorithm ...
ensure
has (x)
item (key) = x
count = old count + 1
end
API-transformator
En API-transformator är en kraftfull lösning som gör att man kan omvandla API-specifikationer till vilket format som helst. Den kan stödja ett brett utbud av olika format.
Referenser
Programutveckling
Teknologisk kommunikation | swedish | 0.837244 |
Pony/src-builtin-seq-.txt |
seq.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81interface Seq[A]
"""
A sequence of elements.
"""
new create(len: USize = 0)
"""
Create a sequence, reserving space for len elements.
"""
fun ref reserve(len: USize)
"""
Reserve space for len elements.
"""
fun size(): USize
"""
Returns the number of elements in the sequence.
"""
fun apply(i: USize): this->A ?
"""
Returns the i-th element of the sequence. Raises an error if the index
is out of bounds.
"""
fun ref update(i: USize, value: A): A^ ?
"""
Replaces the i-th element of the sequence. Returns the previous value.
Raises an error if the index is out of bounds.
"""
fun ref clear()
"""
Removes all elements from the sequence.
"""
fun ref push(value: A)
"""
Adds an element to the end of the sequence.
"""
fun ref pop(): A^ ?
"""
Removes an element from the end of the sequence.
"""
fun ref unshift(value: A)
"""
Adds an element to the beginning of the sequence.
"""
fun ref shift(): A^ ?
"""
Removes an element from the beginning of the sequence.
"""
fun ref append(
seq: (ReadSeq[A] & ReadElement[A^]),
offset: USize = 0,
len: USize = -1)
"""
Add len elements to the end of the list, starting from the given
offset.
"""
fun ref concat(iter: Iterator[A^], offset: USize = 0, len: USize = -1)
"""
Add len iterated elements to the end of the list, starting from the given
offset.
"""
fun ref truncate(len: USize)
"""
Truncate the sequence to the given length, discarding excess elements.
If the sequence is already smaller than len, do nothing.
"""
fun values(): Iterator[this->A]^
"""
Returns an iterator over the elements of the sequence.
"""
| pony | 3894859 | https://sv.wikipedia.org/wiki/Q-gammafunktionen | Q-gammafunktionen | Inom q-analogteori är q-gamma funktionen en generalisering av den vanliga Gammafunktionen. Den introducerades av F. H. Jackson. Dess definition är
då |q|<1, och
då |q|>1. Här (·;·)∞ är den oändliga q-Pochhammersymbolen. Den satisfierar
För heltal större än0 är
där [·]q! är q-fakulteten.
Grönsvärdet då q närmar sig 1
En q-analog av Stirlings formel för |q|<1 ges av
En q-analog av multiplikationsformeln för |q|<1 ges av
En annan formel är
Relation till andra funktioner
Q-gammafunktionen är relaterad till Jacobis thetafunktioner enligt
Källor
Gamma- och relaterade funktioner
Q-analogier | swedish | 1.14898 |
Pony/memory-allocation.txt | # Memory Allocation at Runtime
Pony is a null-free, type-safe language, with no dangling pointers, no buffer overruns, but with a **very fast garbage collector**, so you don't have to worry about explicit memory allocation, if on the heap or stack, if in a threaded actor, or not.
## Fast, Safe and Cheap
* An actor has ~240 bytes of memory overhead.
* No locks. No context switches. All mutation is local.
* An idle actor consumes no resources (other than memory).
* You can have millions of actors at the same time.
## But Caveat Emptor
But Pony can use external C libraries via the **FFI** which does not have this luxury.
So you **can** use any external C library out there, but the question is if you **need to** and if you **should**.
The biggest problem is external heap memory, created by an external FFI call, or created to support an external call. But external stack space might also need some thoughts, esp. when being created from actors.
Pony does have **finalisers** (callbacks which are called by the garbage collector which may be used to free resources allocated by an FFI call); However, the garbage collector is _not timely_ (as with pure reference counting), it is not triggered immediately when some object goes out of scope.
A blocked actor will keep its memory allocated, only a dead actor will release it eventually.
## And, long-running actors
Might cause unexpected out of memory errors, since the GC is not yet triggered on an out-of-memory segfault or stack exhaustion.
...
| pony | 4874311 | https://sv.wikipedia.org/wiki/Marvel%20One-Shots | Marvel One-Shots | Marvel One-Shots är en serie av direkt till video producerade kortfilmer från Marvel Studios, som utspelar sig i Marvel Cinematic Universe (MCU). De är inkluderade som extramaterial i filmernas Blu-ray och digital nedladdning utgåvor, men inte i DVD-utgåvan. Samtliga kortfilmer, som har en speltid på 4-14 minuter, är designade att vara fristående historier som ger mer bakgrundsinformation kring karaktärer eller händelser som har introducerats i filmerna. Två av kortfilmerna har varit inspiration för TV-serier som utspelar sig i MCU.
I de två första filmerna spelar Clark Gregg huvudrollen som Agent Phil Coulson och ger en bild över hur en vanlig dag för en S.H.I.E.L.D.-agent kan se ut. I den tredje filmen medverkar Lizzy Caplan och Jesse Bradford som ett olyckligt par som hittar ett kasserat Chitaurivapen efter händelserna i The Avengers. Den fjärde filmen fokuserar på Hayley Atwell som Peggy Carter efter händelserna i Captain America: The First Avenger, medan den femte handlar om Ben Kingsley som Trevor Slattery efter händelserna i Iron Man 3.
Historik
I augusti 2011 tillkännagav Marvel att ett antal fristående kortfilmer, med en egen historia, skulle släppas direkt till video. Medproducenten Brad Winderbaum kommenterade följande: "It's a fun way to experiment with new characters and ideas, but more importantly it's a way for us to expand the Marvel Cinematic Universe and tell stories that live outside the plot of our features." De första två filmerna producerades tillsammans med The Ebeling Group, regisserades av Leythum och skrevs av Eric Pearson.
En av Marvel Studios chefer Louis D’Esposito upprepade denna idé, där han uppgav att målet med Item 47 var att "expandera världen och visa dig mer mänskliga inslagen i det". Han fortsatte att tala om att Marvel brottades med tanken på att införa etablerade karaktärer som kanske ännu inte är redo att bära sina egna filmer i framtida One-Shots, där han sade följande: "There’s always a potential to introduce a character. We have 8,000 of them, and they can’t all be at the same level. So maybe there are some that are not so popular, and we introduce them [with a short] – and they take off. I could see that happening."
I juli 2013 uppgav D’Esposito att han övervägde att producera fristående kortfilmer för flera karaktärer, däribland Loke, en ung Nick Fury och Black Panther. När det gällde Loke, sade D’Esposito följande: "Being on Asgard is very difficult for us to do in a short. It’s just impossible for us cost wise. The short would be 30 seconds, and it’s over. One shot of Loki on Asgard." Angående Fury och Black Panther anmärkte han följande: "It’s very complicated to do: who plays those characters? And designing the costume, getting it going … We tried. We were there in development, and we tried, but they were very difficult for all the reasons I gave. And we don’t want to do something that’s half baked because it’s not good for us and it’s not good for our fans." Under panelen som handlade om Agent Carter vid 2013 års San Diego Comic-Con International, uppgav D'Esposito att studion övervägde att visa kortfilmerna i biograferna, före filmerna.
I oktober 2013 uppgav Ben Kingsley att han jobbade på ett hemligt projekt med Marvel som även omfattade "flera medlemmar ur filmteamet som jobbade på Iron Man 3," vilket senare blev tillkännagivet som kortfilmen All Hail the King. I en intervju med Total Film från februari 2014, nämnde Drew Pearce andra kortfilmer som han hade skrivit men som aldrig blev verklighet, däribland några som var baserade på Sin, Crossbones och Damage Control. I maj 2014 blev det känt att ingen kortfilm skulle släppas ihop med Captain America: The Return of the First Avenger, samt i oktober 2014 att det inte heller skulle finnas med någon kortfilm ihop med släppet av Guardians of the Galaxy. Guardians of the Galaxy regissör James Gunn uppgav att en One-Shot inte inkluderades med filmen var till följd av utrymmesbrist på skivan.
Kortfilmer
The Consultant (2011)
Handlingen utspelar sig efter filmerna Iron Man 2 och The Incredible Hulk, där Phil Coulson informerar Jasper Sitwell om att World Security Council anser att Emil Blonsky ska släppas från fängelset för att ansluta sig till Avengers Initiative. De ser honom som en krigshjälte och lägger skulden för förödelsen i New York på Bruce Banner. Rådet beordrar dem att skicka en agent för att be general Thaddeus "Thunderbolt" Ross att överlämna Blonsky till S.H.I.E.L.D.'s förvar. Då Nick Fury inte vill släppa Blonsky, beslutar de båda agenterna att skicka en syndabock för att sabotera mötet. På en uppmaning från Sitwell urging, skickar Coulson motvilligt "The Consultant": Tony Stark. Som det delvis avbildades i eftertextscenen i The Incredible Hulk, sitter en vanhedrad Ross i en bar och dricker, när han kontaktas av Stark, som retar Ross så mycket att han försöker få Stark utsparkad från baren. Som svar köper Stark baren och låter riva den. Nästa dag informerar Coulson Sitwell om att deras plan har fungerat och att Blonsky fortsätter att sitta fängslad.
Vid 2011 års San Diego Comic-Con tillkännagav Marvel att The Consultant skulle vara en exklusiv del av Blu-ray-utgåvan av filmen Thor den 13 september 2011. Den regisserades av Leythum och manuset skrevs av Eric Pearson, medan musiken komponerades av Paul Oakenfold. Clark Gregg och Maximiliano Hernández repriserade sina roller som agenterna Phil Coulson och Jasper Sitwell från filmerna. De fick sällskap genom arkmaterial av Robert Downey, Jr. som Tony Stark / The Consultant, William Hurt som General Thaddeus "Thunderbolt" Ross och Tim Roth som Emil Blonsky i sin Abomination-form. Medproducenten Brian Winderbaum sade att producenterna: "wanted to paint a picture of S.H.I.E.L.D. pulling the strings and being responsible for some of the events seen in the films. What better character to represent this idea than Agent Coulson, the first S.H.I.E.L.D. agent we were introduced to in the first Iron Man film?"
A Funny Thing Happened on the Way to Thor's Hammer (2011)
Handlingen utspelar sig under händelserna i filmen Thor, där Phil Coulson stannar vid en bensinstation på sin väg till Albuquerque, New Mexico. Medan Coulson handlar tilltugg i den bakre delen av stationen, kommer två rånare in i butiken och kräver att få pengarna i kassan. När rånarna frågar vems bilen är som står parkerad utanför, avslöjar Coulson sig själv, överlämnar sina nycklar, samt erbjuder sig att även ge dem sin pistol. Samtidigt som han är på väg att överlämna pistolen, distraherar han rånarna och kuvar de båda männen på några sekunder. Han betalar sedan nonchalant för sina mellanmål samtidigt som han ger ett subtilt råd till expediten att inte nämna hans engagemang i rånet och lämnar stationen.
A Funny Thing Happened on the Way to Thor's Hammer inkluderades tillsammans med Blu-ray-utgavan av Captain America: The First Avenger den 25 oktober 2011. Den regisserades av Leythum och skrevs av Eric Pearson, med musik av Paul Oakenfold. I kortfilmen medverkar Clark Gregg i sin roll som agent Phil Coulson.
Item 47 (2012)
Det olyckliga paret Bennie och Claire hittar ett kvarlämnat och kasserat Chitaurivapen ("Item 47") från attacken mot New York i The Avengers. Paret använder vapnet för att råna ett par banker, vilket lockar till sig S.H.I.E.L.D., som utser agenterna Sitwell och Blake för att återta vapnet och "neutralisera" paret. Agent Sitwell spårar upp paret till ett motellrum som förstörs i den efterföljande konfrontationen och de stulna pengarna blir förstörda. Istället för att döda paret, erbjuder Sitwell dem att gå med i S.H.I.E.L.D., där Bennie blir tilldelad en plats i tankesmedjan R&D för att dekonstruera Chitauriteknologin och Claire blir Blakes assistent.
Item 47 släpptes på Blu-ray ihop med Marvel's The Avengers den 25 september 2012. I kortfilmen medverkar Jesse Bradford och Lizzy Caplan som Bennie och Claire, medan vi får återse Agent Sitwell, spelad av Maximiliano Hernández och blir introducerade till Agent Blake, spelad av Titus Welliver. Den regisserades av en av Marvel Studios chefer, Louis D’Esposito och skrevs av Eric Pearson. Filmen, som filmades under fyra dagar, har en speltid på 12 minuter, lite längre än de föregående filmerna, som inte var längre än 4 minuter. Item 47 hjälpte till att inspirera MCU:s TV-serie Marvel's Agents of S.H.I.E.L.D..
Agent Carter (2013)
Handlingen utspelar sig ett år efter händelserna i Captain America: The First Avenger, och agent Carter, som nu är medlem av organisationen Strategic Scientific Reserve, har fastnat i att sammanställa data istället för att arbeta med fältarbete. En natt då hon är ensam på kontoret, börjar uppdragstelefonen att ringa, som ger Carter information över platsen för den mystiska Zodiac. Hon beger sig till platsen och lyckas hämta serumet ensam. Nästa dag får hon en anmärkning av sin chef agent Flynn, då hon inte har gått igenom de korrekta förfaranden för att slutföra uppdraget. Carter förklarar att uppdraget var tidskänsligt, men Flynn är oberörd och avfärdar Carter som en "gammal flamma" till Captain America som fick sitt nuvarande arbete av medlidande för hennes sorg. Samtidigt som Flynn går till sitt kontor, ringer uppdragstelefonen och denna gång är det Howard Stark som talar i andra ändan. Han uppmanar Flynn att informera Carter om att hon kommer att bli delägare i den nyinrättade organisationen S.H.I.E.L.D. och att Flynn själv måste hjälpa Carter med sina saker. I en scen i eftertexterna får vi se Dum Dum Dugan sitta vid poolen med Stark, och förundras över två kvinnor som bär den nyligen skapade bikinin. Dugan frågar Stark om han uppfann den, till vilka Stark svarar: "No, the French".
Agent Carter släpptes på Blu-ray tillsammans med Iron Man 3 den 24 september 2013, samt som en del av en digital utgivning den 3 september 2013. I filmen ser vi återigen Hayley Atwell i rollen som Peggy Carter. Andra bekanta ansikten som också medverkar är Dominic Cooper och Neal McDonough i sina roller som Howard Stark och Timothy "Dum Dum" Dugan, Chris Evans via arkivmaterial som Steve Rogers / Captain America, samt introducerar Bradley Whitford som agent Flynn och Shane Black som den okroppsliga rösten. Den regisserades av Louis D’Esposito och skrevs av Eric Pearson. Korfilmen spelades in under fem dagar. TV-serien Marvel's Agent Carter är direkt relaterad till kortfilmen.
All Hail the King (2014)
Handlingen fokuserar på Trevor Slattery, som i slutet av Iron Man 3 blivit tillfångatagen, och nu sitter fängslad i Seagate Prison. I fängelset lever han lyxliv och har sin egen personliga "butler", Herman, liksom andra fångar som fungerar som hans fanclub och skydd från andra intagna. En som sitter i cafeterian och tittar på den uppmärksamhet som Slattery får är Justin Hammer, som funderar över vad som gör honom så speciell. Slattery har pratat med en dokumentärfilmare vid namn Jackson Norriss, som dokumenterar händelserna kring Mandarin-situationen som sågs i Iron Man 3. Norriss, som personligen försöker att lära sig mer om Slattery, återberättar sitt förflutna från sin första roll som barn samt huvudrollen i en misslyckad CBS-pilot. Norriss informerar småningom Slattery att hans skildring har förargat en del människor, däribland själva terrorgruppen Ten Rings, som Slattery inte visste fanns. Norriss berättar historien om Mandarinen och terroristgruppen, innan avslöjar att han faktiskt är medlem i gruppen. Den verkliga orsaken till Norriss intervju med Slattery är att få ut honom ur fängelset så att han kan möta den verkliga Mandarinen. Efter att få höra detta, har Slattery fortfarande ingen aning om de fulla konsekvenserna av att han poserade som Mandarinen.
All Hail The King släpptes den 4 februari 2014 som en digitalutgåva med Thor: En mörk värld och den 25 februari 2014 på Blu-ray. I filmen medverkar Ben Kingsley i rollen som Trevor Slattery som han tidigare spelade i Iron Man 3, Scoot McNairy som Jackson Norriss en medlem av terrorgruppen Ten Rings som utgör sig för att vara en dokumentärfilmare, Lester Speight som Herman och Sam Rockwell som återkommer i rollen som Justin Hammer. Kortfilmen ar skriven och regisserad av Drew Pearce,som var en av manusförfattarna till Iron Man 3. Musiken är komponerad av Brian Tyler, tillsammans med Caged Heat-scenerna som komponerades av 1980-talets TV-musikikonen Mike Post. Namnet Caged Heat användes tidigare av Marvel som den falska arbetstiteln för Iron Man 3.
När det gällde Rockwells cameo uppgav Pearce följande beskrivning: "I floated it to Marvel, wrote a tag, got his people on board. Then it looked like he wasn't going to be able to do it, as he was in Canada shooting the Poltergeist remake and then, while he was in post-production, he read it and I got a phone call saying that Sam would like to speak to me. So I got on the phone with Rockwell, and he said that if we could shoot it in an hour, on a Sunday lunchtime, in Toronto, then I am in." Pearce reste till Kanada och målade en vägg för att matcha de scener som spelades in Los Angeles och "Rockwell came in and just nailed it."
Rollista
En grå zon innebär att skådespelaren inte deltog eller att skådespelaren ej är bekräftad..
Ett innebär att rollfiguren medverkar i en TV-serie.
Ett indikerar att skådespelaren bara lånat ut sin röst till rollfigur.
Ett indikerar att skådespelaren medverkar genom arkivmaterial från tidigare filmer.
Mottagande
Cindy White från IGN kallade The Consultant för "intressant" och beskrev den följande: "The snappy dialogue seems to fit right in with what we expect from a Joss Whedon-ized Avengers movie." Scott Chitwood från ComingSoon.net kommenterade kortfilmen följande: "Considering a third of this is a rehash of an old bonus scene and the other 2/3 is Coulson sitting and having a chat, this is a pretty big disappointment."
R.L. Shaffer från IGN tyckte att A Funny Thing Happened on the Way to Thor's Hammer var "rolig". Zachary Scheer från Cinema Blend ansåg att: "The short is as hackneyed as that title. It's about four minutes of Coulson being a badass, if the definition of 'badass' is "performing needless slow-motion action stunts and then pausing to consider something normal people would consider – like which donuts to buy."
Andre Dellamorte från Collider kallade Item 47 för "dum". William Bibbiani från Crave Online beskrev filmen som följande: "The short is largely a success: [Maximiliano] Hernandez, [Jesse] Bradford and [Lizzy] Caplan are all in fine form although, [Titus] Welliver seems saddled with a little awkward dialogue, particularly in regards to Coulson, which doesn’t entirely sell." Spencer Terry från Superhero Hype! sade följande: "[Item 47] is easily the best one they've done, and I think that can be attributed to its length seeing as it's three times longer than the other One-Shots. With a longer run time, the short film doesn't have to rush to show us everything that it wants to - we get a clear understanding of both the S.H.I.E.L.D. perspective of the events and the robbers' point of view."
Andy Hunsaker från Crave Online kommenterade följande om Agent Carter: "Agent Carter is a fun treat which could lead the way for some female-led Marvel films and, if nothing else, it gives its title character the send-off she deserves." Scott Collura från IGN beskrev den som följande: "Atwell's Carter is the big-screen female superhero we've all been waiting for. She kicks so much ass in this short story with such aplomb, using not just brawn but also brains, and it's all very clever and fun." Rosie Fletcher från Total Film sade följande: "Atwell makes a perfect femme fatale-come-special agent, and this '40s noir-style short looks great and packs some euphoric action moments."
Cliff Wheatley från IGN gav All Hail the King ett betyg på 9,4 av 10 möjliga. Han motiverade detta följande: "a return to the loveable personality of the hapless Trevor and a step forward for the larger Marvel Cinematic Universe. It has its twists that should satisfy both lovers and haters of Trevor Slattery. But it’s the approach that Pearce takes with the material, from the kung-fu movie style credit sequences to the light-hearted tone that takes a sudden and jarring turn. Kingsley once again shines in the role of Slattery, aloof and ignorant, but more than happy to slide back into Mandarin mode if it will please his adoring fans. Pearce does go for some of the same jokes from Iron Man 3 in a sort of referential way, but it’s nothing too damaging." Andrew Wheeler från Comics Alliance kritiserade sättet som homosexualitet presenterades i kortfilmen, eftersom det var Marvel Studios första försök att föra in HBTQ-koncept till MCU.
Referenser
Externa länkar
Engelskspråkiga filmer
Amerikanska kortfilmer
Marvel Cinematic Universe | swedish | 1.043052 |
Pony/format-FormatSpec-.txt |
FormatSpec¶
[Source]
trait val FormatSpec
| pony | 788615 | https://sv.wikipedia.org/wiki/Projektilbildande%20RSV | Projektilbildande RSV | Projektilbildande RSV (riktad sprängverkan), militärförkortning: RSV-4 (, kort EFP, "explosivt formad projektil"), är en speciell typ av riktad sprängverkan utformad för att penetrera pansar på korta avstånd. Sådan består av en inåtgående metallplatta framför en riktad sprängladdning, vilken verkar genom att spränga ihop metallplattan till en projektil med enorm projektilhastighet på korta avstånd, resulterande i mycket hög genomslagsförmåga inom ram.
RSV-4 utvecklades för första gången under andra världskriget. Idag används de vanligen hos takslående ammunition, såsom Bofors BONUS och Saab Bofors Dynamics NLAW.
Engelska namn
Explosively formed projectile (explosivt formad projektil)
Explosively formed penetrator (Explosivt formad penetrator)
Self-forging warhead (självformande stridsdel)
Self-forging fragment (självformande skärva)
Se även
Strålbildande RSV (RSV-3)
Referenser
Noter
Tryckta verk
Pansarvärnsvapen
Sprängämnen | swedish | 1.03014 |
Pony/src-math-greatest_common_divisor-.txt |
greatest_common_divisor.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37primitive GreatestCommonDivisor
"""
Get greatest common divisor of x and y.
Providing 0 will result in an error.
Example usage:
```pony
use "math"
actor Main
new create(env: Env) =>
try
let gcd = GreatestCommonDivisor[I64](10, 20)?
env.out.print(gcd.string())
else
env.out.print("No GCD")
end
```
"""
fun apply[A: Integer[A] val](x: A, y: A): A ? =>
let zero = A.from[U8](0)
if (x == zero) or (y == zero) then
error
end
var x': A = x
var y': A = y
while y' != zero do
let z = y'
y' = x' % y'
x' = z
end
x'
| pony | 601504 | https://no.wikipedia.org/wiki/Film%C3%A5ret%201910 | Filmåret 1910 | Filmåret 1910 er en oversikt over lanserte filmer, fødte og avdøde filmpersonligheter i 1910.
Årets filmer
Afgrunden
Bröllopet på Ulfåsa II
Den hvide slavehandel (Fotorama)
Den hvide slavehandel (Nordisk Film)
Fänrik Ståls sägner
Frankenstein
Regina von Emmeritz och Konung Gustaf II Adolf
Värmlänningarne
Värmländingarna
Fødsler
|-
| rowspan=7| Januar || 8. || Richard Cromwell || || skuespiller || align=center| 50 ||align=center| 1960 ||
|-
|12. || Luise Rainer || || skuespiller || align=center|104 ||align=center| ||
|-
|20. || Åke Söderblom || || skuespiller ||align=center| 55 ||align=center| 1965 ||
|-
|rowspan=2|23. ||Walter Greene || || komponist|| align=center| 73 || align=center| 1983 ||
|-
|Irene Sharaff || || scenograf og kostymedesigner || align=center| 83 || align=center| 1993 ||
|-
|28. || Adina Mandlová || || skuespiller || align=center| 81 || align=center| 1991 ||
|-
|30. || Carola Höhn || || skuespiller || align=center| 95 || align=center| 2005 ||
|rowspan=10|Februar || 8. || Stig Järrel || || skuespiller || align=center|88 || align=center| 1998 ||
|9. || Gun Adler || || skuespiller || align=center|67 || align=center| 1977 ||
|14. || Leif Juster || || komiker og skuespiller || align=center|85 || align=center| 1995 ||
|16. || Börje Larsson || || regissør, manusforfatter, sangtekstforfatter og skuespiller || align=center|71 || align=center| 1982 ||
|17. || Walter Sarmell || || skuespiller og inspisient || align=center|79 || align=center| 1989 ||
|19. || Dorothy Janis || || skuespiller || align=center|100 || align=center| 2010 ||
|24. || Marianne Löfgren || || skuespiller || align=center|47 || align=center| 1957 ||
|26. || Nils Gustafsson || ||prest (kyrkoherde) og skuespiller || align=center|78 || align=center| 1989 ||
|rowspan=2|27. ||Joan Bennett || ||skuespiller|| align=center|{{#expr:(1990)-(1910)-((12)<(02)or(12)=(02)and(07)<(27))}} || align=center| 1990 ||
|Wolfgang Preiss || || skuespiller || align=center|{{#expr:(2002)-(1910)-((11)<(02)or(11)=(02)and(27)<(27))}} || align=center| 2002 ||
|-
|rowspan=8|Mars ||rowspan=2| 1. || David Niven || ||skuespiller || align=center|73 || align=center| 1983 ||
|-
|Olly von Flint || || skuespiller || align=center|82 || align=center| ||
|-
|5. || Ennio Flaiano || || forfatter, manusforfatter og journalist || align=center|{{#expr:(1972)-(1910)-((11)<(11)or(11)=(11)and(20)<(20))}} || align=center| 1972 ||
|-
|8. || Claire Trevor || || skuespiller || align=center|{{#expr:(2000)-(1910)-((04)<(01)or(04)=(01)and(08)<(30))}} || align=center| 2000 ||
|-
|9. || S. Sylvan Simon || || regissør og produsent || align=center|{{#expr:(1951)-(1910)-((05)<(03)or(05)=(03)and(17)<(09))}} || align=center| 1951 ||
|-
|20. || Greta Bjerke || || sangerinne og skuespiller || align=center|{{#expr:(1991)-(1910)-((03)<(03)or(03)=(03)and(09)<(20))}} || align=center| 1991 ||
|-
|23. || Akira Kurosawa || || regissør og manusforfatter || align=center|{{#expr:(1998)-(1910)-((09)<(03)or(09)=(03)and(06)<(23))}}|| align=center| 1998 ||
|-
|24. || Richard Conte || || skuespiller || align=center|{{#expr:(1975)-(1910)-((04)<(03)or(04)=(03)and(15)<(24))}} || align=center| 1975 ||
|rowspan=4|April ||6. || Gudrun Brost || || skuespiller || align=center|{{#expr:(1993)-(1910)-((06)<(04)or(06)=(04)and(28)<(06))}} || align=center| 1993 ||
|20. || Brigitte Mira || || skuespiller || align=center|{{#expr:(2005)-(1910)-((03)<(04)or(03)=(04)and(08)<(20))}} || align=center| 2005 ||
|23. || Simone Simon || || skuespiller || align=center|{{#expr:(2005)-(1910)-((02)<(04)or(02)=(04)and(22)<(23))}} || align=center| 2005 ||
|30. || Al Lewis || || skuespiller || align=center|{{#expr:(2006)-(1910)-((02)<(04)or(02)=(04)and(03)<(30))}} || align=center| 2006 ||
|-
|rowspan=5| Mai || 19. || Helge Hagerman || || skuespiller, visesanger, regissør, og produsent || align=center|{{#expr:(1995)-(1910)-((11)<(05)or(11)=(05)and(25)<(19))}} || align=center| 1995 ||
|-
|23. || Scatman Crothers || || skuespiller || align=center|{{#expr:(1986)-(1910)-((11)<(05)or(11)=(05)and(22)<(23))}} || align=center| 1986 ||
|-
|24. || Gunnar Ekwall || || skuespiller || align=center|{{#expr:(1982)-(1910)-((04)<(05)or(04)=(05)and(15)<(24))}} || align=center| 1982 ||
|-
|25. || Lars Seligman || || skuespiller || align=center|{{#expr:(1994)-(1910)-((02)<(05)or(02)=(05)and(25)<(25))}} || align=center| 1994 ||
|-
|30. || Inge Meysel || || skuespiller || align=center|{{#expr:(2004)-(1910)-((07)<(05)or(07)=(05)and(10)<(30))}} || align=center| 2004 ||
|rowspan=9| Juni || 3. || Paulette Goddard || || skuespiller || align=center|{{#expr:(1990)-(1910)-((04)<(06)or(04)=(06)and(23)<(03))}} || align=center| 1990 ||
|6. || Axel Monjé || || skuespiller og stemmeskuespiller || align=center|{{#expr:(1962)-(1910)-((08)<(06)or(08)=(06)and(18)<(06))}} || align=center| 1962 ||
|rowspan=2|11. || Carmine Coppola || || komponist || align=center|{{#expr:(1991)-(1910)-((04)<(06)or(04)=(06)and(26)<(11))}} || align=center| 1991 ||
|Jacques Cousteau || || dokumentarfilmskaper || align=center|{{#expr:(1997)-(1910)-((06)<(06)or(06)=(06)and(25)<(11))}} || align=center| 1997 ||
|13. || Mary Wickes || || skuespiller || align=center|{{#expr:(1995)-(1910)-((10)<(06)or(10)=(06)and(22)<(13))}} || align=center| 1995 ||
|rowspan=2|15. || David Rose || || komponist || align=center|{{#expr:(1990)-(1910)-((08)<(06)or(08)=(06)and(23)<(15))}} || align=center| 1990 ||
| Walter Ulbrich || || produsent og manusforfatter || align=center|81 || align=center| 1991 ||
|22. || Axel von Ambesser || || filmregissør || align=center|{{#expr:(1988)-(1910)-((09)<(06)or(09)=(06)and(06)<(22))}} || align=center| 1988 ||
|29. || Frank Loesser || || komponist || align=center|{{#expr:(1969)-(1910)-((07)<(06)or(07)=(06)and(28)<(29))}} || align=center|1969 ||
|-
|rowspan=5| Juli || 4. || Gloria Stuart || || skuespiller || align=center|100 || align=center| ||
|-
|7. || Olle Björling || || musiker (saksofon) || align=center|{{#expr:(1968)-(1910)-((10)<(07)or(10)=(07)and(06)<(07))}} || align=center| 1968 ||
|-
|16. || Olle Janson || || skuespiller || align=center|{{#expr:(1962)-(1910)-((03)<(07)or(03)=(07)and(10)<(16))}} || align=center| 1962 ||
|-
|17. || Barbara O'Neil || || skuespiller || align=center|{{#expr:(1980)-(1910)-((09)<(07)or(09)=(07)and(03)<(17))}} || align=center| 1980 ||
|-
|24. ||| Harry Horner || ||scenografi og regissør || align=center|{{#expr:(1994)-(1910)-((12)<(07)or(12)=(07)and(05)<(24))}} || align=center| 1994 ||
|rowspan=5| August || 1. || Walter Scharf || || komponist || align=center|{{#expr:(2003)-(1910)-((02)<(08)or(02)=(08)and(24)<(01))}} || align=center| 2003 ||
|2. || Tilli Breidenbach || || skuespiller || align=center|{{#expr:(1994)-(1910)-((10)<(08)or(10)=(08)and(23)<(02))}} || align=center| 1994 ||
|4. || Anita Page || || skuespiller || align=center|{{#expr:(1910)-(2008)-((08)<(09)or(08)=(09)and(04)<(06))}} || align=center| 2008 ||
|6. || Charles Crichton || || regissør || align=center|{{#expr:(1999)-(1910)-((09)<(08)or(09)=(08)and(14)<(06))}} || align=center|1999 ||
|8. || Sylvia Sidney || || skuespiller || align=center|{{#expr:(1999)-(1910)-((08)<(08)or(08)=(08)and(08)<(08))}} || align=center| 1999 ||
|-
|rowspan=6| September || 8. || Jean-Louis Barrault || || skuespiller || align=center|{{#expr:(1994)-(1910)-((01)<(09)or(01)=(09)and(22)<(08))}} || align=center| 1994 ||
|-
|11. || Carin Lundquist || || skuespiller || align=center|{{#expr:(1977)-(1910)-((06 )<(09)or(06 )=(09)and(19)<(11))}} || align=center| 1977 ||
|-
|rowspan=2|14. ||Lasse Dahlqvist || || komponist, visesanger og skuespiller || align=center|{{#expr:(1979)-(1910)-((10)<(09)or(10)=(09)and(14)<(14))}} || align=center| 1979 ||
|-
|Jack Hawkins || || skuespiller || align=center|{{#expr:(1973)-(1910)-((07)<(09)or(07)=(09)and(18)<(14))}} || align=center| 1973 ||
|-
|26. || Gösta Bernhard || || skuespiller || align=center|{{#expr:(1986)-(1910)-((01)<(09)or(01)=(09)and(04)<(26))}} || align=center| 1986 ||
|-
|28. || Albert Christiansen || || barneskuespiller og ingeniør || align=center|{{#expr:(1998)-(1910)-((11)<(09)or(11)=(09)and(19)<(28))}} || align=center| 1998 ||
| rowspan=3| Oktober || 13. || Claes Gill || || forfatter, journalist, dikter og skuespiller || align=center|{{#expr:(1973)-(1910)-((06)<(10)or(06)=(10)and(11)<(13))}} || align=center| 1973 ||
|23. || Toni van Eyck || || skuespiller || align=center|77 || align=center| ||
|27. || Jack Carson || || skuespiller || align=center|{{#expr:(1963)-(1910)-((01)<(10)or(01)=(10)and(03)<(27))}} || align=center| 1963 ||
|-
|rowspan=6|November|| 5. || Else Heiberg || || skuespiller || align=center|62 || align=center| 1972 ||
|-
|6. || Erik Ode || || skuespiller || align=center|{{#expr:(1983)-(1910)-((07)<(11)or(07)=(11)and(19)<(06))}} || align=center| 1983 ||
|-
|12. || Kurt Hoffmann || || regissør || align=center|{{#expr:(2001)-(1910)-((06)<(11)or(06)=(11)and(25)<(12))}} || align=center| 2001 ||
|-
|16. || Jane Tilden || || skuespiller || align=center|{{#expr:(2002)-(1910)-((08)<(11)or(08)=(11)and(27)<(16))}} || align=center| 2002 ||
|-
|18. || Gunnar Fischer || || filmfotograf || align=center|100 || align=center| ||
|-
|26. || Cyril Cusack || || skuespiller || align=center|{{#expr:(1993)-(1910)-((10)<(11)or(10)=(11)and(07)<(26))}} || align=center| 1993 ||
|rowspan=6|Desember ||8. || Arne Nyberg || || skuespiller || align=center|{{#expr:(1994)-(1910)-((10)<(12)or(10)=(12)and(03 )<(08))}} || align=center| 1994 ||
|13. || Van Heflin || || skuespiller || align=center|{{#expr:(1971)-(1910)-((07)<(12)or(07)=(12)and(23)<(13))}} || align=center| 1971 ||
|25. || Anatole de Grunwald || || manusforfatter og produsent || align=center|{{#expr:(1967)-(1910)-((01)<(12)or(01)=(12)and(13)<(25))}} || align=center| 1967 ||
|27. || Karl-Erik Alberts || || filmfotograf og kortfilmsregissør || align=center|{{#expr:(1989)-(1910)-((12)<(12)or(12)=(12)and(02)<(27))}} || align=center| 1989 ||
|29. || Ruth Hall || || skuespiller || align=center|{{#expr:(2003)-(1910)-((10)<(12)or(10)=(12)and(09)<(29))}} || align=center| 2003 ||
|31. || Roy Rowland || || regissør || align=center|{{#expr:(1995)-(1910)-((06)<(12)or(06)=(12)and(29)<(31))}} || align=center| 1995 ||
|}
Referanser
Eksterne lenker | norwegian_bokmål | 0.982204 |
Pony/pony_check-GenerateResult-.txt |
GenerateResult[T2: T2]¶
[Source]
Return type for
Generator.generate.
Either a single value or a Tuple of a value and an Iterator
of shrunken values based upon this value.
type GenerateResult[T2: T2] is
(T2^ | (T2^ , Iterator[T2^] ref))
Type Alias For¶
(T2^ | (T2^ , Iterator[T2^] ref))
| pony | 287467 | https://sv.wikipedia.org/wiki/TTS | TTS | TTS kan syfta på:
Talsyntes (Text To Speech)
Tal och Ton Studioteknik
T-Tauri-stjärna
Teater Teamet Skiftinge
Tvillingtransfusionssyndrom
Girls' Generation-TTS (TaeTiSeo) | swedish | 0.951836 |
Pony/recursion.txt | # Recursion
Recursive functions in Pony can cause many problems. Every function call in a program adds a frame on the system call stack, which is bounded. If the stack grows too big it will overflow, usually crashing the program. This is an out-of-memory type of error and it cannot be prevented by the guarantees offered by Pony.
If you have a heavy recursive algorithm, you must take some precautions in your code to avoid stack overflows. Most recursive functions can be easily transformed into tail-recursive function which are less problematic. A tail-recursive function is a function in which the recursive call is the last instruction of the function. Here is an example with a factorial function:
```pony
fun recursive_factorial(x: U32): U32 =>
if x == 0 then
1
else
x * recursive_factorial(x - 1)
end
fun tail_recursive_factorial(x: U32, y: U32): U32 =>
if x == 0 then
y
else
tail_recursive_factorial(x - 1, x * y)
end
```
The compiler can optimise a tail-recursive function to a loop, completely avoiding call stack growth. Note that this is an _optimisation_ which is only performed in release builds (i.e. builds without the `-d` flag passed to ponyc.) If you need to avoid stack growth in debug builds as well then you have to write your function as a loop manually.
If the tail-recursive version of your algorithm isn't practical to implement, there are other ways to control stack growth depending on your algorithm. For example, you can implement your algorithm using an explicit stack data structure instead of implicitly using the call stack to store data.
Note that light recursion usually doesn't cause problems. Unless your amount of recursive calls is in the hundreds, you're unlikely to encounter this problem.
| pony | 1058243 | https://da.wikipedia.org/wiki/Rust%20%28programmeringssprog%29 | Rust (programmeringssprog) | Rust er et multi-paradigme programmeringssprog skabt af Graydon Hoare, der er omhyggeligt designet til at levere høj ydeevne og it-sikkerhed.
Sproget er særligt kendt for sin evne til at håndtere samtidighed på en sikker måde, hvilket minimerer risikoen for kørselsfejl. Rust svarer syntaktisk til C og C++, men kan garantere hukommelsessikkerhed ved at bruge en lånekontrol til at validere referencer. Man kan dog komme uden om dette ved f.eks. at bruge et såkaldt 'unsafe' keyword, hvilket giver mere fleksibilitet, men også øger programmørens ansvar for korrekt hukommelsesstyring, da det tillader kode, der potentielt kan bryde hukommelsessikkerheden .
Historie
I 2006 besluttede Graydon Hoare, en 29-årig computerprogrammør, der arbejdede for Mozilla, at designe et nyt programmeringssprog. Han blev inspireret af en frustrerende oplevelse med en elevator, der konstant gik i stykker på grund af softwarefejl. Hoare vidste, at mange af disse fejl skyldtes problemer med, hvordan et program bruger hukommelse. Han besluttede sig derfor at skabe et sprog, der kunne skrive hurtig kode uden hukommelsesbugs. Rust har fået sit navn efter en gruppe af bemærkelsesværdigt hårdføre svampe, Rustsvampe, som ifølge Hoare er "over-engineered for survival" .
Over et halvandet årti senere er Rust blevet et af de mest populære programmeringssprog.
Rust blev officielt sponsoreret af Mozilla i 2009. Sproget ville være open source, og kun de mennesker, der bidrog til dets udvikling, ville have ansvar for det. Mozilla var dog parat til at kickstarte det ved at finansiere projektet . I løbet af de følgende 10 år hyrede Mozilla mere end et dusin ingeniører til at arbejde fuldtid på Rust .
I 2015 blev den første stabile version af Rust udgivet, og det blev hurtigt populært blandt store virksomheder. I 2020 afslørede Dropbox en ny version af deres "sync engine", altså dét som synkroniserer filer i skyen, der var omskrevet til Rust . I samme år omskrev Discord deres "Read States" service, en kritisk service der holder styr på, hvilke kanaler og beskeder brugere har læst, til Rust, hvilket resulterede i en markant forbedring og derved gjorde systemet 10 gange hurtigere . Amazon Web Services, som leverer cloud computing-platforme og API'er efter behov, har også fundet, at Rust kan hjælpe dem med at skrive sikrere, hurtigere kode .
I Stack Overflows udviklerundersøgelse fra 2023, som de afholder hvert år, er Rust blevet kåret som det mest beundrede programmeringssprog, hvor over 80% af de udviklere, der har anvendt sproget, har udtrykt et ønske om at fortsætte med det i det kommende år . Dette står i skarp kontrast til det mindst attraktive sprog, MATLAB, hvor under 20% af de udviklere, der har brugt det, ønsker at fortsætte med det i det følgende år . Faktisk har Rust de sidste 7 år blevet kåret til at være det mest beundrede programmeringssprog ifølge samme undersøgelse .
Sikkerhedsforanstaltninger
I Rust beregner compileren, hvornår en variabel ikke længere er tilgængelig, og når det sker, indsætter compileren kode til frigivelse af variablens hukommelse. Variabler er som udgangspunkt uforanderlige (immutable), hvilket betyder, at deres værdi ikke kan ændres, når de først er blevet tildelt. Hvis en variabel skal kunne ændres, kan den defineres som foranderlig (mutable) ved at bruge 'mut' nøgleordet foran variabelnavnet.
Når en funktion modtager en variabel som parameter, overtager den som udgangspunkt ejerskabet, medmindre parameteren er en reference. Ved at definere parameteren som en reference, 'låner' funktionen variablen uden at overtage ejerskabet.
En reference giver som udgangspunkt kun læseadgang, men det er muligt at definere foranderlige (mutable) referencer, der tillader opdatering. Rust tillader kun én foranderlig reference til en bestemt data i en bestemt rækkevidde, hvilket hjælper med at forhindre 'data race' betingelser. En 'data race' opstår, når to eller flere tråde i en multithreaded applikation samtidigt forsøger at læse fra og skrive til den samme hukommelsesplads uden passende synkronisering. Desuden tillader Rust flere uforanderlige (immutable) referencer, men ikke en mutable reference samtidig med nogen immutable referencer. Dette er også en del af Rusts regler for "aliasing" og "mutability", som sikrer mod fejl, hvor data ændres eller slettes under læsning.
Programstruktur
Rust-programmer er typisk struktureret i mange funktioner, der kalder hinanden. Dette hjælper med at holde kode organiseret og genanvendelig.
Rust understøtter også moduler, som er en måde at gruppere relaterede definitioner, såsom funktioner, strukturer (datastrukturer, der kan indeholde forskellige typer data) og træk (en måde at definere fælles adfærd på), sammen. Som standard er alle definitioner i et modul private, hvilket betyder, at de kun kan tilgås inden for det modul, de er defineret i. Hvis en definition skal være tilgængelig uden for det modul, det er defineret i, kan det gøres offentligt ved hjælp af nøgleordet 'pub'.
I større Rust-programmer kan moduler være indlejret i hinanden for at skabe en hierarkisk struktur. Dette kan hjælpe med at organisere kode i logiske grupper. Desuden kan moduler flyttes ud i deres egne filer for at gøre koden mere overskuelig og nemmere at vedligeholde.
Her er et eksempel på, hvordan moduler kan bruges i Rust:
// Definerer et modul med navnet 'greetings'
mod greetings {
// Gør 'hello' funktionen offentlig med 'pub' nøgleordet
pub fn hello() {
println!("Hello, world!");
}
// 'goodbye' funktionen er privat og kan kun tilgås inden for 'greetings' modulet
fn goodbye() {
println!("Goodbye, world!");
}
}
// Hovedfunktionen
fn main() {
// Kalder den offentlige 'hello' funktion fra 'greetings' modulet
greetings::hello();
}
I dette eksempel er 'hello'-funktionen defineret i 'greetings'-modulet og gjort offentlig, så den kan kaldes fra 'main'-funktionen. Derimod er 'goodbye'-funktionen privat og kan kun kaldes inden for 'greetings'-modulet.
Eksempel
Her er et simpelt eksempel på et CLI script skrevet i Rust, hvor der genereres et tilfældigt tal ved hjælp af rand-programbiblioteket.
// Her importeres 'rand' biblioteket, som muliggør generering af tilfældige tal.
use rand::Rng;
// Hovedfunktionen, hvor programmet starter.
fn main() {
// Kalder 'generate_random_number' funktionen og gemmer resultatet i et uforanderligt variabel.
let random_number = generate_random_number();
// Her skrives en linje til konsollen.
println!("Det tilfældige tal er: {}", random_number);
}
// Funktion der genererer et tilfældigt tal mellem 1 og 10.
fn generate_random_number() -> i32 {
// Opretter en ny tilfældig nummergenerator.
let mut rng = rand::thread_rng();
// Genererer et tilfældigt tal mellem 1 og 10
// Der skrives ikke '1..10', men i stedet '1..11', fordi den øvre grænse, 11, ikke er inkluderet
let random_number = rng.gen_range(1..11);
// Returnerer det tilfældige tal.
return random_number;
}
Se også
Redox (styresystem) - skrevet i Rust
Referencer
Links
https://rust-lang.org - Rusts officielle hjemmeside
https://doc.rust-lang.org/stable/book/ - En guide til Rust
Programmeringssprog | danish | 0.684868 |
Pony/builtin-ArrayPairs-.txt |
ArrayPairs[A: A, B: Array[A] #read]¶
[Source]
class ref ArrayPairs[A: A, B: Array[A] #read] is
Iterator[(USize val , B->A)] ref
Implements¶
Iterator[(USize val , B->A)] ref
Constructors¶
create¶
[Source]
new ref create(
array: B)
: ArrayPairs[A, B] ref^
Parameters¶
array: B
Returns¶
ArrayPairs[A, B] ref^
Public Functions¶
has_next¶
[Source]
fun box has_next()
: Bool val
Returns¶
Bool val
next¶
[Source]
fun ref next()
: (USize val , B->A) ?
Returns¶
(USize val , B->A) ?
| pony | 2923943 | https://sv.wikipedia.org/wiki/Agyrta%20albisparsa | Agyrta albisparsa | Agyrta albisparsa är en fjärilsart som beskrevs av George Francis Hampson 1898. Agyrta albisparsa ingår i släktet Agyrta och familjen björnspinnare. Inga underarter finns listade i Catalogue of Life.
Källor
Björnspinnare
albisparsa | swedish | 1.003074 |
Pony/object-capabilities.txt | # Object Capabilities
Pony's capabilities-secure type system is based on the object-capability model. That sounds complicated, but really it's elegant and simple. The core idea is this:
> A capability is an unforgeable token that (a) designates an object and (b) gives the program the authority to perform a specific set of actions on that object.
So what's that token? It's an address. A pointer. A reference. It's just... an object.
## How is that unforgeable?
Since Pony has no pointer arithmetic and is both type-safe and memory-safe, object references can't be "invented" (i.e. forged) by the program. You can only get one by constructing an object or being passed an object.
__What about the C-FFI?__ Using the C-FFI can break this guarantee. We'll talk about the __C-FFI trust boundary__ later, and how to control it.
## What about global variables?
They're bad! Because you can get them without either constructing them or being passed them.
Global variables are a form of what is called _ambient authority_. Another form of ambient authority is unfettered access to the file system.
Pony has no global variables and no global functions. That doesn't mean all ambient authority is magically gone - we still need to be careful about the file system, for example. Having no global variables is necessary, but not sufficient, to eliminate ambient authority.
## How does this help?
Instead of having permissions lists, access control lists, or other forms of security, the object-capabilities model means that if you have a reference to an object, you can do things with that object. Simple and effective.
There's a great paper on how the object-capability model works, and it's pretty easy reading:
[Capability Myths Demolished](http://srl.cs.jhu.edu/pubs/SRL2003-02.pdf)
## Capabilities and concurrency
The object-capability model on its own does not address concurrency. It makes clear _what_ will happen if there is simultaneous access to an object, but it does not prescribe a single method of controlling this.
Combining capabilities with the actor-model is a good start, and has been done before in languages such as [E](http://erights.org/) and Joule.
Pony does this and also uses a system of _reference capabilities_ in the type system.
| pony | 13776 | https://da.wikipedia.org/wiki/Standard%20ML | Standard ML | Standard ML (SML) er et funktionsorienteret programmeringssprog som understøtter moduler, statisk typetjek og typeinferens. Sproget er populært til udvikling af compilere, forskning omkring programmeringssprog og udvikling af systemer til automatisk bevisførelse.
SML er en moderne dialekt af ML som blev brugt i bevisførelsesystemet LCF. Sproget udmærker sig blandt programmeringssprog med en formel specifikation som indeholder en operationel semantik (The Definition of Standard ML fra 1990, revideret i 1997), hvilket betyder at alle operationer i sproget har en formelt defineret betydning.
Sproget
Et Standard ML-program består af en række erklæringer som indeholder udtryk som enten er funktioner, værdier eller sammensatte udtryk som kan reduceres. Standard ML er et funktionsorienteret programmeringssprog med nogle imperative træk. Den primære abstraktion som benyttes er altså funktioner. For eksempel kan fakultetsfunktionen beskrives rekursivt således:
fun fakultet n =
if n = 0 then 1 else n * fakultet (n-1)
En Standard ML-compiler kan således udlede at fakultet må være en funktion som tager et heltal som argument og returnerer et heltal (typen int → int), helt uden at disse typer angives eksplicit. Typeinferensen foregår ved hjælp af Hindley-Milner-algoritmen og gør at programmer i praksis kan udtrykkes kortere.
Samme funktion kan udtrykkes ved hjælp af mønstergenkendelse som vist i følgende eksempel:
fun fakultet 0 = 1
| fakultet n = n * fakultet (n-1)
Mønstergenkendelsen fungerer således at man ikke betragter funktionsargumentet som navnet på én parameter, men et generelt mønster som skal passe med inputværdien. Mønstre prøves fra det øverste mønster og ned, så rækkefølgen har en betydning. Hvis mønstre har variable komponenter (for eksempel n), bliver disse bundet så man kan henvise til dem i den funktionskrop som hører til mønsteret (adskilt med tegnet =).
Typer
De primitive indbyggede typer i Standard ML er: int, real, char, string, bool. Hertil findes en række prædefinerede algebraiske typer og nogle indbyggede, sammensatte typer: tupler og lister. Tupler kan indeholde en fast mængde af værdier med forskellige typer, mens lister kan indeholde vilkårligt mange værdier af én type. For eksempel:
val land = ("Danmark", 5564219, "Der er et yndigt land...")
val sorteret = [1,1,2,3,5,8,13,21,34,55,89]
Foruden en række indbyggede typer, kan man lave synonymer (også kaldet aliaser) til eksisterende typer. For eksempel kan man definere et koordinat som to kommatal, eller en omkreds som et kommatal. Tegnet * i typerne nedenfor er udtryk for den indbyggede sammensatte tupel-type:
type koordinat = real * real
type omkreds = real
Efterfølgende kan man angive typen koordinat i stedet for real * real. Her er ikke tale om en konvertering af værdier.
Foruden synonymer til eksisterende typer er det også muligt at lave nye algebraiske typer. Det er nyttigt til at modellere en række ting. For eksempel kan man beskrive geometriske former i planet:
datatype form = Cirkel of koordinat * omkreds
| Rektangel of koordinat * koordinat
| Trekant of koordinat * koordinat * koordinat
Eller binære træer:
datatype tree = Leaf
| Node of trae * int * trae
Eller køretøjer:
type hjul = int
type gear = int
type tophastighed = int
type hestekraefter = int
datatype koretoj = Bil of tophastighed * hestekraefter
| Tank of tophastighed * hestekraefter
| Cykel of hjul * gear
Det er efterfølgende muligt at konstruere funktioner som behandler disse typer ved hjælp af mønstergenkendelse:
fun antal_elementer Leaf = 0
| antal_elementer (Node (venstre, n, hojre)) =
1 + antal_elementer(venstre) + antal_elementer(hojre)
Det er værd at bemærke at algebraiske datatyper kan være rekursivt definerede, og funktioner som arbejder på disse er derfor ofte også rekursive. Det er også interessant at bemærke hvordan mønstergenkendelse og typeinferens fungerer: Alle tomme træer bliver grebet af første mønster mens ikke-tomme træer bliver matchet således at deres obligatoriske tre parametre (et venstre-træ, en værdi og et højre-træ) får navne som kan bruges i funktionskroppen.
fun miljovenlig (Cykel _) = true
| miljovenlig (_) = false
Man kan også udelade dele af en struktur ved at give dem det særlige variabelnavn _.
Højereordensfunktioner
Funktioner i Standard ML har såkaldt førsteklassestatus, hvilket vil sige at alle funktioner kan betragtes som værdier på lige fod med almindelige værdier som sandhedsværdier, tal, lister og tekst. En konsekvens ved dette er at funktioner kan tage andre funktioner som argument. Det er også muligt at erklære en funktion som ikke har et navn, men blot er en værdi (en såkaldt closure, lambda-udtryk eller anonym funktion).
Følgende er et eksempel som definerer plus som en funktion der tager en 2-tuple som input og returnerer summen af dens første- og andenkomponent:
val plus = (fn (x,y) => x+y)
En funktion kaldes "af højere orden" hvis den tager imod funktioner som argument eller returnerer funktioner som værdi. En strengere definition kræver at begge er tilfældet. Følgende er et eksempel på en funktion, K, som tager et argument x som input og returnerer en funktion, som tager et argument y som input, smider y væk og returnerer x; funktionen er skrevet på tre måder som alle er ækvivalente og gyldige:
fun K x y = x
fun K x = (fn y => x)
val K = (fn x => (fn y => x))
Følgende funktion, fikspunkt, tager imod en funktion f og en startværdi x og begynder at regne f(x), f(f(x)), f(f(f(x))) osv. indtil den finder et punkt hvor det ikke gør nogen forskel om man tilføjer en ekstra anvendelse af funktionen:
fun fikspunkt (f, x) =
if f x = f (f x)
then x
else fikspunkt (f, f x)
Man kan sige at K og fikspunkt er højereordensfunktioner.
Undtagelser
Standard ML understøtter undtagelser ved brugen af to nøgleord: raise og handle. Man kan desuden definere sine egne undtagelser ved exception, der har en syntaks meget lignende den for abstrakte datatyper. Der findes en række indbyggede undtagelser: Empty, Div, Fail, Domain m.fl.
fun max [] = raise Empty
| max [x] = x
| max (x::y::xs) =
if x > y
then max (x::xs)
else max (y::xs)
Moduler
Afsnit mangler.
Implementeringer
MLTon er en optimerende compiler til hele programmer. Den producerer meget effektiv kode sammenlignet med andre Standard ML-compilere.
Standard ML of New Jersey (forkortet SML/NJ) er en compiler med tilhørende værktøjer, biblioteker og interaktiv fortolker.
Poly/ML er en compiler som producerer effektiv kode og understøtter hardware med flere kerner (igennem POSIX-tråde).
Moscow ML er en compiler baseret på CAML Light-runtime-miljøet og understøtter moduler såvel som en stor del af SML Basis-biblioteket.
HaMLet er en SML-fortolker som forsøger at være en tilgængelig og præcis referenceimplementation.
ML Kit tilføjer en spildopsamler og regionsbaseret hukommelseshåndtering, sigtet mod realtidsapplikationer.
SML.NET oversætter til Microsofts Common Language Runtime (CLR) og har udvidelser som muliggør linkning til andre .NET-kode.
SML2c er en batch-compiler og oversætter kun erklæringer på modulniveau (dvs. signaturer, strukturer og funktorer) til C. Den er baseret på SML/NJ 0.67, men understøtter ikke SML/NJ's debugging og profiling. Programmer som kun består af moduler, og som virker i SML/NJ, kan oversættes med sml2c uden ændringer.
Poplog-systemet implementerer en version af Standard ML samtidigt med Common Lisp og Prolog og tillader sammenblandingen af disse sprog.
SML# er en konservativ udvidelse til Standard ML som tilføjer polymorfi på record-typer og evnen til at arbejde sammen med C-kode.
Alice: en fortolker til Standard ML som tilføjer doven evaluering, samtidighed (trådprogrammering og distribuerede beregninger via RPC) og constraintprogrammering.
Disse systemer er alle open source og frit tilgængelige. De fleste er implementeret i Standard ML. Der findes ikke længere kommercielle Standard ML-implementeringer, men et firma kaldet Harlequin producerede engang en kommerciel IDE og compiler til Standard ML under navnet MLWorks. Firmaet eksisterer ikke længere.
Se også
Funktionsprogrammering
Rekursion
Haskell (programmeringssprog)
OCaml (programmeringssprog)
Noter
Eksterne henvisninger
StandardML.dk
Programmeringssprog | danish | 0.674769 |
Pony/src-collections-hashable-.txt |
hashable.pony
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123use @memcmp[I32](dst: Pointer[None] tag, src: Pointer[None] tag, len: USize)
use @ponyint_hash_block[USize](ptr: Pointer[None] tag, size: USize)
use @ponyint_hash_block64[U64](ptr: Pointer[None] tag, size: USize)
interface Hashable
"""
Anything with a hash method is hashable.
"""
fun hash(): USize
interface Hashable64
"""
A version of Hashable that returns 64-bit hashes on every platform.
"""
fun hash64(): U64
interface val HashFunction[A]
"""
A pluggable hash function.
"""
new val create()
"""
Data structures create instances internally. Use a primitive if possible.
"""
fun hash(x: box->A!): USize
"""
Calculate the hash of some type. This is an alias of the type parameter to
allow data structures to hash things without consuming them.
"""
fun eq(x: box->A!, y: box->A!): Bool
"""
Determine equality between two keys with the same hash. This is done with
viewpoint adapted aliases to allow data structures to determine equality
in a box fun without consuming keys.
"""
interface val HashFunction64[A]
"""
A pluggable hash function with 64-bit hashes.
"""
new val create()
"""
Data structures create instances internally. Use a primitive if possible.
"""
fun hash64(x: box->A!): U64
"""
Calculate the hash of some type. This is an alias of the type parameter to
allow data structures to hash things without consuming them.
"""
fun eq(x: box->A!, y: box->A!): Bool
"""
Determine equality between two keys with the same hash. This is done with
viewpoint adapted aliases to allow data structures to determine equality
in a box fun without consuming keys.
"""
primitive HashEq[A: (Hashable #read & Equatable[A] #read)] is HashFunction[A]
fun hash(x: box->A): USize =>
"""
Use the hash function from the type parameter.
"""
x.hash()
fun eq(x: box->A, y: box->A): Bool =>
"""
Use the structural equality function from the type parameter.
"""
x == y
primitive HashEq64[A: (Hashable64 #read & Equatable[A] #read)] is
HashFunction64[A]
fun hash64(x: box->A): U64 =>
"""
Use the hash function from the type parameter.
"""
x.hash64()
fun eq(x: box->A, y: box->A): Bool =>
"""
Use the structural equality function from the type parameter.
"""
x == y
primitive HashIs[A] is (HashFunction[A] & HashFunction64[A])
fun hash(x: box->A!): USize =>
"""
Hash the identity rather than the contents.
"""
(digestof x).hash()
fun hash64(x: box->A!): U64 =>
"""
Hash the identity rather than the contents.
"""
(digestof x).hash64()
fun eq(x: box->A!, y: box->A!): Bool =>
"""
Determine equality by identity rather than structurally.
"""
x is y
primitive HashByteSeq is
(HashFunction[ByteSeq box] & HashFunction64[ByteSeq box])
"""
Hash and equality functions for arbitrary ByteSeq.
"""
fun hash(x: ByteSeq box): USize =>
@ponyint_hash_block(x.cpointer(), x.size())
fun hash64(x: ByteSeq box): U64 =>
@ponyint_hash_block64(x.cpointer(), x.size())
fun eq(x: ByteSeq box, y: ByteSeq box): Bool =>
if x.size() == y.size() then
@memcmp(x.cpointer(), y.cpointer(), x.size()) == 0
else
false
end
| pony | 139417 | https://no.wikipedia.org/wiki/HS | HS | HS, Hs, hS og hs kan bety:
HS
Hjemmestyrkene
Tidligere forkortelse for det videregående utdanningsprogrammet Helse- og sosialfag
Forkortelse for Hill Size, bakkestørrelse i en hoppbakke
Høyres studenter
Det harmoniserte system for beskrivelse og koding av varer, internasjonal klassifisering av varer
Hs
Kjemisk symbol for grunnstoffet hassium (atomnr. 108)
hS
hs | norwegian_bokmål | 1.087574 |
Pony/cli-CommandSpec-.txt |
CommandSpec¶
[Source]
CommandSpec describes the specification of a parent or leaf command. Each
command has the following attributes:
a name: a simple string token that identifies the command.
a description: used in the syntax message.
a map of options: the valid options for this command.
an optional help option+command name for help parsing
one of:
a Map of child commands.
an Array of arguments.
class ref CommandSpec
Constructors¶
parent¶
[Source]
Creates a command spec that can accept options and child commands, but not
arguments.
new ref parent(
name': String val,
descr': String val = "",
options': Array[OptionSpec val] box = call,
commands': Array[CommandSpec ref] box = call)
: CommandSpec ref^ ?
Parameters¶
name': String val
descr': String val = ""
options': Array[OptionSpec val] box = call
commands': Array[CommandSpec ref] box = call
Returns¶
CommandSpec ref^ ?
leaf¶
[Source]
Creates a command spec that can accept options and arguments, but not child
commands.
new ref leaf(
name': String val,
descr': String val = "",
options': Array[OptionSpec val] box = call,
args': Array[ArgSpec val] box = call)
: CommandSpec ref^ ?
Parameters¶
name': String val
descr': String val = ""
options': Array[OptionSpec val] box = call
args': Array[ArgSpec val] box = call
Returns¶
CommandSpec ref^ ?
Public Functions¶
add_command¶
[Source]
Adds an additional child command to this parent command.
fun ref add_command(
cmd: CommandSpec box)
: None val ?
Parameters¶
cmd: CommandSpec box
Returns¶
None val ?
add_help¶
[Source]
Adds a standard help option and, optionally command, to a root command.
fun ref add_help(
hname: String val = "help",
descr': String val = "")
: None val ?
Parameters¶
hname: String val = "help"
descr': String val = ""
Returns¶
None val ?
name¶
[Source]
Returns the name of this command.
fun box name()
: String val
Returns¶
String val
descr¶
[Source]
Returns the description for this command.
fun box descr()
: String val
Returns¶
String val
options¶
[Source]
Returns a map by name of the named options of this command.
fun box options()
: HashMap[String val, OptionSpec val, HashEq[String val] val] box
Returns¶
HashMap[String val, OptionSpec val, HashEq[String val] val] box
commands¶
[Source]
Returns a map by name of the child commands of this command.
fun box commands()
: HashMap[String val, CommandSpec box, HashEq[String val] val] box
Returns¶
HashMap[String val, CommandSpec box, HashEq[String val] val] box
args¶
[Source]
Returns an array of the positional arguments of this command.
fun box args()
: Array[ArgSpec val] box
Returns¶
Array[ArgSpec val] box
is_leaf¶
[Source]
fun box is_leaf()
: Bool val
Returns¶
Bool val
is_parent¶
[Source]
fun box is_parent()
: Bool val
Returns¶
Bool val
help_name¶
[Source]
Returns the name of the help command, which defaults to "help".
fun box help_name()
: String val
Returns¶
String val
help_string¶
[Source]
Returns a formated help string for this command and all of its arguments.
fun box help_string()
: String val
Returns¶
String val
| pony | 1758088 | https://sv.wikipedia.org/wiki/Arthrobotrys%20perpasta | Arthrobotrys perpasta | Arthrobotrys perpasta är en svampart som först beskrevs av R.C. Cooke, och fick sitt nu gällande namn av Jarow. 1970. Arthrobotrys perpasta ingår i släktet Arthrobotrys och familjen vaxskålar. Inga underarter finns listade i Catalogue of Life.
Källor
Vaxskålar
perpasta | swedish | 1.236915 |
Pony/debug--index-.txt |
Debug package¶
Provides facilities to create output to either STDOUT or STDERR that will
only appear when the platform is debug configured. To create a binary with
debug configured, pass the -d flag to ponyc when compiling e.g.:
ponyc -d
Example code¶
use "debug"
actor Main
new create(env: Env) =>
Debug.out("This will only be seen when configured for debug info")
env.out.print("This will always be seen")
Public Types¶
primitive Debug
primitive DebugErr
primitive DebugOut
type DebugStream
| pony | 1425331 | https://sv.wikipedia.org/wiki/Debug | Debug | debug är ett kommando i DOS, MS-DOS, OS/2 och Microsoft Windows (endast x86 versioner, inte x64) vilket programmet debug.exe (eller DEBUG.COM i äldre DOS-versioner) använder sig av. Debug kan användas som en assembler, Disassemblator, eller program för hexadecimal dump som tillåter användaren att interaktivt undersöka datorminnets innehåll (i assembler, hexadecimal eller ASCII), göra ändringar, och selektivt exekvera COM-fil, EXE och andra typer av filer. Det har också flera kommandon som används för att nå en viss disksektor, minnesmappad I/O port och minnesadresser. MS-DOS Debug är skriven för 16-bitars processer och är därför begränsad till 16-bitars datorprogram. FreeDOS Debug har en "DEBUGX"-version som också stödjer 32-bitars DPMI-programs.
Bakgrund
Traditionellt har alla datorer och operativsystem inkluderat en underhållsfunktion, som används för att undersöka om ett program arbetar korrekt. Debug skrevs av Tim Paterson för att tjäna detta syfte för QDOS. När Paterson började arbeta för Microsoft i början av 1980-talet tog han programmet med sig. Debug var en del av DOS 1.00 och har varit inkluderat i MS-DOS och Microsoft Windows. MS-DOS Debug har flera begränsningar:
Det kan bara läsa 16-bit register och inte 32-bit (extended) register.
När kommandot "n" används för att namnge filer lagras filnamnet offset DS:5D till DS:67 vilket betyder att programmet endast kan spara filer i FAT 8.3 filnamnsformat.
MS-DOS Debug kan bara läsa konventionellt minne, vilket är de första 640 kB i en IBM PC.
Kloner av Debug för 32-bitar, som FreeDOS Debug, har skrivits.
Syntax
debug [[Drive:][Path] FileName [parameters]]
När Debug körs utan någon parameter visas Debug-prompten, "-". Användaren kan då ange ett av flera kommandon med en eller två bokstäver, inklusive "a" för att gå in i assembler mode, "d" för att gör en hexadecimal dump, "t" för att spåra (trace) och "u" för att disassemblera (unassemble) ett program i minnet.
Debug kan också användas som "debug script" interpretator med följande syntax.
debug < FileName
En script-fil kan innehålla Debug-kommandon och assemblerinstruktioner. Denna metod kan användas för att skapa eller editera binärfiler från batchfiler.
Se även
Lista på DOS-kommandon
Edlin är ett annat DOS-verktyg som har skrivits av Tim Paterson.
SoftICE är en modern avlusare som har ärvt sin syntax från Debug
debug tutorial: http://www.armory.com/~rstevew/Public/Tutor/Debug/debug-manual.html
Referenser
Noter
Externa länkar
A Guide to DEBUG
Information about the debug command
Computer Debug Routines / Machine Code
, FreeDOS Debug
Programspråk
MS-DOS | swedish | 0.839882 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.