winget install --id=RandyHollines.Objeck -e
Objeck is a 64-bit object-oriented and functional programming language designed to be fast, intuitive, and lightweight.
Objeck is a 64-bit object-oriented and functional programming language designed to be fast, intuitive, and lightweight. It supports cross-platform development for Linux, macOS, and Windows, including Docker and Raspberry Pi environments.
Key Features:
Audience & Benefit: Ideal for developers seeking a flexible and lightweight language for object-oriented or functional programming across multiple platforms. Objeck’s intuitive design, portability, and robust API support enable efficient development of scalable applications while maintaining clean and maintainable code.
Objeck can be installed via winget.
Another programming language
v2025.8.0
v2025.7.1
gpt-4o-realtime-preview-2025-06-03
preview (done)v2025.7.0
Hash->Dict(..)
, Map->Dict(..)
and Vector->Zip(..)
to collectionsv2025.6.3
for
loops# hello world
class Hello {
function : Main(args : String[]) ~ Nil {
"Hello World" → PrintLine();
"Καλημέρα κόσμε" → PrintLine();
"こんにちは 世界" → PrintLine();
}
}
# openai realtime api
response := Realtime->Respond("How many James Bond movies have been made?", "gpt-4o-realtime-preview-2025-06-03", token);
if(response <> Nil & response->GetFirst() <> Nil & response->GetSecond() <> Nil) {
# get text
text := response->GetFirst();
text_size := text->Size();
"text: size={$text_size}, text='{$text}'"->PrintLine();
# get audio
audio := response->GetSecond();
audio_bytes := audio->Get();
audio_bytes_size := audio_bytes->Size();
"audio: size={$audio_bytes_size}"->PrintLine();
# play audio
"---\nplaying..."->PrintLine();
Mixer->PlayPcm(audio_bytes, 22050, AudioFormat->SDL_AUDIO_S16LSB, 1);
};
# gemini generate w/ schema
content := Content->New("user")->AddPart(TextPart->New("What are the top 5 cities average snowfall in the Eastern US by city for the past 5 years?"));
# set schema
schema_def := ParameterType->New(["year", "name", "inches"], true);
schema_def->AddProp("year", ParameterType->New(ParameterType->Type->STRING));
schema_def->AddProp("name", ParameterType->New(ParameterType->Type->STRING));
schema_def->AddProp("inches", ParameterType->New(ParameterType->Type->INTEGER));
resp_schema := Pair->New("application/json", schema_def);
# make query
candidates := Model->GenerateContent("models/gemini-2.5-flash-preview-05-20", content, resp_schema, EndPoint->GetApiKey());
if(candidates <> Nil & <>candidates->IsEmpty()) {
Data.JSON.JsonElement->Decode(candidates->First()->GetAllText()->Trim())->PrintLine();
};
# openai image identification
bytes := System.IO.Filesystem.FileReader->ReadBinaryFile("../gemini/thirteen.png");
bytes->Size()->PrintLine();
image := API.OpenAI.ImageQuery->New("What number is this?", bytes, API.OpenAI.ImageQuery->MimeType->PNG);
file_query := Collection.Pair->New("user", image);
response := Response->Respond("gpt-4o-mini", file_query, token);
if(response = Nil) {
Response->GetLastError()->ErrorLine();
return;
};
Data.JSON.JsonElement->Decode(response->GetText())->PrintLine();
class Triangle from Shape {
New() {
Parent();
}
}
class Triangle from Shape implements Color {
New() {
Parent();
}
method : public : GetRgb() ~ Int {
return 0xadd8e6;
}
}
interface Color {
method : virtual : public : GetRgb() ~ Int;
}
value := "Hello World!";
value->Size()->PrintLine();
interface Greetings {
method : virtual : public : SayHi() ~ Nil;
}
class Hello {
function : Main(args : String[]) ~ Nil {
hey := Base->New() implements Greetings {
New() {}
method : public : SayHi() ~ Nil {
"Hey..."->PrintLine();
}
};
}
klass := "Hello World!"->GetClass();
klass->GetName()->PrintLine();
klass->GetMethodNumber()->PrintLine();
value := Class->Instance("System.String")->As(String);
value += "510";
value->PrintLine();
map := Collection.Map->New();
map->Insert(415, "San Francisco");
map->Insert(510, "Oakland");
map->Insert(408, "Sunnyvale");
map->ToString()->PrintLine();
list := Collection.List->New();
list->AddBack(17);
list->AddFront(4);
(list->Back() + list->Front())->PrintLine();
use function Int;
class Test {
function : Main(args : String[]) ~ Nil {
Abs(-256)->Sqrt()->PrintLine();
}
}
serializer := System.IO.Serializer->New();
serializer->Write(map);
serializer->Write("Fin.");
bytes := serializer->Serialize();
bytes->Size()->PrintLine();
funcs := Vector->New()>;
each(i : 10) {
funcs->AddBack(FuncRef->New(\() ~ IntRef : ()
=> i->Factorial() * funcs->Size()));
};
each(i : funcs) {
value := funcs->Get(i);
func := value->Get();
func()->Get()->PrintLine();
};
@f : static : (Int) ~ Int;
@g : static : (Int) ~ Int;
function : Main(args : String[]) ~ Nil {
compose := Composer(F(Int) ~ Int, G(Int) ~ Int);
compose(13)->PrintLine();
}
function : F(a : Int) ~ Int {
return a + 14;
}
function : G(a : Int) ~ Int {
return a + 15;
}
function : native : Compose(x : Int) ~ Int {
return @f(@g(x));
}
function : Composer(f : (Int) ~ Int, g : (Int) ~ Int) ~ (Int) ~ Int {
@f := f;
@g := g;
return Compose(Int) ~ Int;
}
"Καλημέρα κόσμε"->PrintLine();
content := Sytem.IO.Filesystem.FileReader->ReadFile(filename);
content->Size()->PrintLine();
Sytem.IO.Filesystem.File->Size(filename)->PrintLine();
socket->WriteString("GET / HTTP/1.1\nHost:google.com\nUser Agent: Mozilla/5.0 (compatible)\nConnection: Close\n\n");
line := socket->ReadString();
while(line <> Nil & line->Size() > 0) {
line->PrintLine();
line := socket->ReadString();
};
socket->Close();
pipe := System.IO.Pipe->New("foobar", Pipe->Mode->CREATE);
if(pipe->Connect()) {
pipe->ReadLine()->PrintLine();
pipe->WriteString("Hi Ya!");
pipe->Close();
};
class CaculateThread from Thread {
...
@inc_mutex : static : ThreadMutex;
New() {
@inc_mutex := ThreadMutex->New("inc_mutex");
}
method : public : Run(param : System.Base) ~ Nil {
Compute();
}
method : native : Compute() ~ Nil {
y : Int;
while(true) {
critical(@inc_mutex) {
y := @current_line;
@current_line+=1;
};
...
};
}
}
yesterday := System.Time.Date->New();
yesterday->AddDays(-1);
yesterday->ToString()->PrintLine();