hlpl 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
hlpl-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 Human Life Programming Language
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
hlpl-0.1.0/MANIFEST.in ADDED
@@ -0,0 +1,2 @@
1
+ include README.md LICENSE
2
+ recursive-include hlpl *.py
hlpl-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,61 @@
1
+ Metadata-Version: 2.4
2
+ Name: hlpl
3
+ Version: 0.1.0
4
+ Summary: Human Life Programming Language - Build dynamic digital characters and living environments
5
+ Author: HLPL Project
6
+ License: MIT
7
+ Keywords: hlpl,simulation,e-character,e-city,robotics
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Requires-Python: >=3.8
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: pillow>=9.0
15
+ Requires-Dist: numpy>=1.21
16
+ Dynamic: license-file
17
+
18
+ # HLPL: Human Life Programming Language
19
+
20
+ **HLPL** (Human Life Programming Language) is a specialized programming language developed to build dynamic digital characters and simulate their living environments.
21
+
22
+ ---
23
+
24
+ ## 🌍 Environment & Nature Simulation
25
+ Simulating an environment involves digitally constructing cities, villages, and natural elements (such as trees, mountains, clouds, sky, and earth).
26
+
27
+ * **How it works:** HLPL takes static data (like images) from a real-world environment and transforms it into a dynamic, real-time view.
28
+ * **The Result:** The perspective changes seamlessly based on position and time—just as it would in the real world—effectively transforming static captures into interactive **e-cities**.
29
+
30
+ ## 👥 Character Simulation
31
+ HLPL allows you to create digital characters—including humans, animals, plants, and even inanimate objects—complete with lifelike interactions and emotional logic. Character creation consists of two main pillars:
32
+
33
+ 1. **Appearance Cloning:** HLPL takes static images of a subject and converts them into a dynamic asset that shifts smoothly across all angles, mirroring how a real-world camera perspective changes.
34
+ 2. **Mind Cloning:** Developers write HLPL code based on the behavioral patterns, memory, and personality of the real-life subject.
35
+
36
+ Combining appearance and mind into a single codebase results in an **e-character** that can be revived and hosted on the internet.
37
+
38
+ ## 🤖 Robotics Integration
39
+ Characters created with HLPL can be deployed into physical robotics, resulting in highly lifelike creatures.
40
+
41
+ * **Complexity Scaling:** The larger and more comprehensive the character code, the more human-like the robot becomes.
42
+ * **The Horizon of Realism:** By writing extensive code that covers a vast range of real-life possibilities, you can create a simulation so precise that an average human cannot distinguish the robot from a real person. This advanced tier involves simulating realistic skin, weight dynamics, and nuanced movement styles, requiring a robust technological foundation.
43
+
44
+ ## đź’Ľ Use Cases & Applications
45
+ * **Professional Roles:** HLPL characters can serve as digital teachers, business receptionists, or fill any role requiring guidance and leadership.
46
+ * **Physical Automation:** They can be deployed into hardware to perform physical labor, though this requires significant manufacturing capital.
47
+ * **Scale Flexibility:** HLPL can simulate a single isolated living entity or scale up to model an entire society of distinct characters interacting within a shared environment.
48
+
49
+ ## 📦 Data Structure & File Formats
50
+ The project organizes its assets using highly structured compressed packages:
51
+
52
+ | Asset Type | Package Format | Contents |
53
+ | :--- | :--- | :--- |
54
+ | **Character** | `.zip` file | Contains character blueprints, animations, movement paths, localized settings, and behavioral HLPL code. |
55
+ | **City / Village** | `.zip` file | Contains comprehensive environmental imagery (buildings, houses, terrain, mountains) mapped to specific geographical coordinates and viewing directions. |
56
+
57
+
58
+ ## PyPI Install
59
+ ```bash
60
+ pip install hlpl
61
+ ```
hlpl-0.1.0/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # HLPL: Human Life Programming Language
2
+
3
+ **HLPL** (Human Life Programming Language) is a specialized programming language developed to build dynamic digital characters and simulate their living environments.
4
+
5
+ ---
6
+
7
+ ## 🌍 Environment & Nature Simulation
8
+ Simulating an environment involves digitally constructing cities, villages, and natural elements (such as trees, mountains, clouds, sky, and earth).
9
+
10
+ * **How it works:** HLPL takes static data (like images) from a real-world environment and transforms it into a dynamic, real-time view.
11
+ * **The Result:** The perspective changes seamlessly based on position and time—just as it would in the real world—effectively transforming static captures into interactive **e-cities**.
12
+
13
+ ## 👥 Character Simulation
14
+ HLPL allows you to create digital characters—including humans, animals, plants, and even inanimate objects—complete with lifelike interactions and emotional logic. Character creation consists of two main pillars:
15
+
16
+ 1. **Appearance Cloning:** HLPL takes static images of a subject and converts them into a dynamic asset that shifts smoothly across all angles, mirroring how a real-world camera perspective changes.
17
+ 2. **Mind Cloning:** Developers write HLPL code based on the behavioral patterns, memory, and personality of the real-life subject.
18
+
19
+ Combining appearance and mind into a single codebase results in an **e-character** that can be revived and hosted on the internet.
20
+
21
+ ## 🤖 Robotics Integration
22
+ Characters created with HLPL can be deployed into physical robotics, resulting in highly lifelike creatures.
23
+
24
+ * **Complexity Scaling:** The larger and more comprehensive the character code, the more human-like the robot becomes.
25
+ * **The Horizon of Realism:** By writing extensive code that covers a vast range of real-life possibilities, you can create a simulation so precise that an average human cannot distinguish the robot from a real person. This advanced tier involves simulating realistic skin, weight dynamics, and nuanced movement styles, requiring a robust technological foundation.
26
+
27
+ ## đź’Ľ Use Cases & Applications
28
+ * **Professional Roles:** HLPL characters can serve as digital teachers, business receptionists, or fill any role requiring guidance and leadership.
29
+ * **Physical Automation:** They can be deployed into hardware to perform physical labor, though this requires significant manufacturing capital.
30
+ * **Scale Flexibility:** HLPL can simulate a single isolated living entity or scale up to model an entire society of distinct characters interacting within a shared environment.
31
+
32
+ ## 📦 Data Structure & File Formats
33
+ The project organizes its assets using highly structured compressed packages:
34
+
35
+ | Asset Type | Package Format | Contents |
36
+ | :--- | :--- | :--- |
37
+ | **Character** | `.zip` file | Contains character blueprints, animations, movement paths, localized settings, and behavioral HLPL code. |
38
+ | **City / Village** | `.zip` file | Contains comprehensive environmental imagery (buildings, houses, terrain, mountains) mapped to specific geographical coordinates and viewing directions. |
39
+
40
+
41
+ ## PyPI Install
42
+ ```bash
43
+ pip install hlpl
44
+ ```
@@ -0,0 +1,6 @@
1
+ __version__="0.1.0"
2
+ from .character.e_character import ECharacter
3
+ from .environment.e_city import ECity
4
+ from .core.world import World
5
+ from .core.parser import HLPLParser
6
+ from .robotics.deploy import RobotDeploy
@@ -0,0 +1 @@
1
+ from .e_character import ECharacter
@@ -0,0 +1,31 @@
1
+
2
+ from dataclasses import dataclass
3
+ from typing import Optional, Tuple
4
+ from ..core.parser import HLPLParser, HLPLMind
5
+ @dataclass
6
+ class Appearance:
7
+ source: str; dynamic_angles: bool=True; model_path: Optional[str]=None
8
+ def clone_from_static(self):
9
+ print(f"[HLPL::Appearance] Cloning appearance from {self.source} -> dynamic asset"); self.model_path=f"dynamic://{self.source}"
10
+ @dataclass
11
+ class Mind:
12
+ code: str=""; parsed: Optional[HLPLMind]=None
13
+ def compile(self):
14
+ parser=HLPLParser(); self.parsed=parser.parse(self.code); return self.parsed
15
+ class ECharacter:
16
+ def __init__(self, name: str, appearance_source: str, personality_code: str="", role: str="citizen"):
17
+ self.name=name; self.appearance=Appearance(source=appearance_source); self.mind=Mind(code=personality_code)
18
+ self.role=role; self.position: Tuple[float,float,float]=(0,0,0); self.world=None
19
+ self.appearance.clone_from_static(); self.mind.compile()
20
+ def update(self, dt: float, global_time: float): pass
21
+ def export_zip(self, out_path: str):
22
+ import zipfile, json
23
+ with zipfile.ZipFile(out_path,'w') as z:
24
+ z.writestr("character.json", json.dumps({
25
+ "name":self.name,"role":self.role,"appearance_source":self.appearance.source,
26
+ "traits":self.mind.parsed.traits if self.mind.parsed else {},
27
+ "memories":self.mind.parsed.memories if self.mind.parsed else {},
28
+ "behaviors":self.mind.parsed.behaviors if self.mind.parsed else {}
29
+ }, indent=2))
30
+ z.writestr("mind.hlpl", self.mind.code)
31
+ return out_path
File without changes
@@ -0,0 +1,26 @@
1
+
2
+ import re
3
+ from dataclasses import dataclass, field
4
+ from typing import Dict, Any
5
+ @dataclass
6
+ class HLPLMind:
7
+ traits: Dict[str, Any]=field(default_factory=dict)
8
+ memories: Dict[str, Any]=field(default_factory=dict)
9
+ behaviors: Dict[str, Any]=field(default_factory=dict)
10
+ raw_code: str=""
11
+ class HLPLParser:
12
+ TRAIT_RE=re.compile(r"trait\s+(\w+):\s*(.+)")
13
+ MEMORY_RE=re.compile(r"memory\s+(\w+):\s*(.+)")
14
+ BEHAVIOR_RE=re.compile(r"behavior\s+(\w+):\s*(.+)")
15
+ def parse(self, code: str)->HLPLMind:
16
+ mind=HLPLMind(raw_code=code)
17
+ for line in code.splitlines():
18
+ line=line.strip()
19
+ if not line or line.startswith("#"): continue
20
+ m=self.TRAIT_RE.match(line)
21
+ if m: mind.traits[m.group(1)]=m.group(2).strip(); continue
22
+ m=self.MEMORY_RE.match(line)
23
+ if m: mind.memories[m.group(1)]=m.group(2).strip(); continue
24
+ m=self.BEHAVIOR_RE.match(line)
25
+ if m: mind.behaviors[m.group(1)]=m.group(2).strip()
26
+ return mind
@@ -0,0 +1,23 @@
1
+
2
+ from typing import List
3
+ from ..environment.e_city import ECity
4
+ from ..character.e_character import ECharacter
5
+ class World:
6
+ def __init__(self, environment: ECity, name: str="world"):
7
+ self.name=name; self.environment=environment; self.characters: List[ECharacter]=[]; self.time=0.0
8
+ def spawn(self, character: ECharacter, position=(0,0,0)):
9
+ character.position=position; character.world=self; self.characters.append(character)
10
+ print(f"[HLPL] Spawned {character.name} at {position} in {self.environment.name}"); return character
11
+ def simulate(self, steps=100, dt=0.1):
12
+ print(f"[HLPL] Simulating world '{self.name}' with {len(self.characters)} characters...")
13
+ for _ in range(steps):
14
+ self.time+=dt; self.environment.update(self.time)
15
+ for c in self.characters: c.update(dt, self.time)
16
+ print("[HLPL] Simulation finished.")
17
+ def export_package(self, path: str):
18
+ import zipfile, json; from pathlib import Path
19
+ p=Path(path)
20
+ with zipfile.ZipFile(p,'w') as z:
21
+ meta={"name":self.name,"environment":self.environment.name,"characters":[c.name for c in self.characters],"time":self.time}
22
+ z.writestr("world.json", json.dumps(meta, indent=2))
23
+ print(f"[HLPL] Exported world package to {path}")
@@ -0,0 +1 @@
1
+ from .e_city import ECity
@@ -0,0 +1,19 @@
1
+
2
+ import json, zipfile
3
+ from dataclasses import dataclass
4
+ from typing import Tuple, List, Optional
5
+ @dataclass
6
+ class GeoAnchor:
7
+ lat: float; lon: float; direction_deg: float=0.0
8
+ class ECity:
9
+ def __init__(self, name: str, geo_coords: Tuple[float,float]=(0,0), source_path: Optional[str]=None):
10
+ self.name=name; self.geo_coords=geo_coords; self.source_path=source_path; self.anchors: List[GeoAnchor]=[]; self.is_dynamic=False
11
+ @classmethod
12
+ def from_static_data(cls, source: str, geo_coords: Tuple[float,float], name: str="e-city"):
13
+ print(f"[HLPL::ECity] Ingesting static data from {source} at {geo_coords}")
14
+ city=cls(name=name, geo_coords=geo_coords, source_path=source); city.is_dynamic=True; return city
15
+ def update(self, time: float): pass
16
+ def export_zip(self, out_path: str):
17
+ with zipfile.ZipFile(out_path,'w') as z:
18
+ z.writestr("city.json", json.dumps({"name":self.name,"geo":self.geo_coords}, indent=2))
19
+ return out_path
@@ -0,0 +1 @@
1
+ from .deploy import RobotDeploy
@@ -0,0 +1,14 @@
1
+
2
+ from dataclasses import dataclass
3
+ from ..character.e_character import ECharacter
4
+ @dataclass
5
+ class RealismProfile:
6
+ skin_sim: bool=False; weight_dynamics: bool=False; micro_expressions: bool=False; level: str="basic"
7
+ class RobotDeploy:
8
+ def __init__(self, character: ECharacter, realism: str="advanced"):
9
+ self.character=character; self.realism=RealismProfile(level=realism)
10
+ if realism=="indistinguishable":
11
+ self.realism.skin_sim=True; self.realism.weight_dynamics=True; self.realism.micro_expressions=True
12
+ def deploy(self, hardware_id: str):
13
+ print(f"[HLPL::Robotics] Deploying {self.character.name} to {hardware_id} with realism={self.realism.level}")
14
+ return {"status":"deployed","hardware":hardware_id,"character":self.character.name}
@@ -0,0 +1,61 @@
1
+ Metadata-Version: 2.4
2
+ Name: hlpl
3
+ Version: 0.1.0
4
+ Summary: Human Life Programming Language - Build dynamic digital characters and living environments
5
+ Author: HLPL Project
6
+ License: MIT
7
+ Keywords: hlpl,simulation,e-character,e-city,robotics
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Programming Language :: Python :: 3
11
+ Requires-Python: >=3.8
12
+ Description-Content-Type: text/markdown
13
+ License-File: LICENSE
14
+ Requires-Dist: pillow>=9.0
15
+ Requires-Dist: numpy>=1.21
16
+ Dynamic: license-file
17
+
18
+ # HLPL: Human Life Programming Language
19
+
20
+ **HLPL** (Human Life Programming Language) is a specialized programming language developed to build dynamic digital characters and simulate their living environments.
21
+
22
+ ---
23
+
24
+ ## 🌍 Environment & Nature Simulation
25
+ Simulating an environment involves digitally constructing cities, villages, and natural elements (such as trees, mountains, clouds, sky, and earth).
26
+
27
+ * **How it works:** HLPL takes static data (like images) from a real-world environment and transforms it into a dynamic, real-time view.
28
+ * **The Result:** The perspective changes seamlessly based on position and time—just as it would in the real world—effectively transforming static captures into interactive **e-cities**.
29
+
30
+ ## 👥 Character Simulation
31
+ HLPL allows you to create digital characters—including humans, animals, plants, and even inanimate objects—complete with lifelike interactions and emotional logic. Character creation consists of two main pillars:
32
+
33
+ 1. **Appearance Cloning:** HLPL takes static images of a subject and converts them into a dynamic asset that shifts smoothly across all angles, mirroring how a real-world camera perspective changes.
34
+ 2. **Mind Cloning:** Developers write HLPL code based on the behavioral patterns, memory, and personality of the real-life subject.
35
+
36
+ Combining appearance and mind into a single codebase results in an **e-character** that can be revived and hosted on the internet.
37
+
38
+ ## 🤖 Robotics Integration
39
+ Characters created with HLPL can be deployed into physical robotics, resulting in highly lifelike creatures.
40
+
41
+ * **Complexity Scaling:** The larger and more comprehensive the character code, the more human-like the robot becomes.
42
+ * **The Horizon of Realism:** By writing extensive code that covers a vast range of real-life possibilities, you can create a simulation so precise that an average human cannot distinguish the robot from a real person. This advanced tier involves simulating realistic skin, weight dynamics, and nuanced movement styles, requiring a robust technological foundation.
43
+
44
+ ## đź’Ľ Use Cases & Applications
45
+ * **Professional Roles:** HLPL characters can serve as digital teachers, business receptionists, or fill any role requiring guidance and leadership.
46
+ * **Physical Automation:** They can be deployed into hardware to perform physical labor, though this requires significant manufacturing capital.
47
+ * **Scale Flexibility:** HLPL can simulate a single isolated living entity or scale up to model an entire society of distinct characters interacting within a shared environment.
48
+
49
+ ## 📦 Data Structure & File Formats
50
+ The project organizes its assets using highly structured compressed packages:
51
+
52
+ | Asset Type | Package Format | Contents |
53
+ | :--- | :--- | :--- |
54
+ | **Character** | `.zip` file | Contains character blueprints, animations, movement paths, localized settings, and behavioral HLPL code. |
55
+ | **City / Village** | `.zip` file | Contains comprehensive environmental imagery (buildings, houses, terrain, mountains) mapped to specific geographical coordinates and viewing directions. |
56
+
57
+
58
+ ## PyPI Install
59
+ ```bash
60
+ pip install hlpl
61
+ ```
@@ -0,0 +1,20 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ pyproject.toml
5
+ setup.py
6
+ hlpl/__init__.py
7
+ hlpl.egg-info/PKG-INFO
8
+ hlpl.egg-info/SOURCES.txt
9
+ hlpl.egg-info/dependency_links.txt
10
+ hlpl.egg-info/requires.txt
11
+ hlpl.egg-info/top_level.txt
12
+ hlpl/character/__init__.py
13
+ hlpl/character/e_character.py
14
+ hlpl/core/__init__.py
15
+ hlpl/core/parser.py
16
+ hlpl/core/world.py
17
+ hlpl/environment/__init__.py
18
+ hlpl/environment/e_city.py
19
+ hlpl/robotics/__init__.py
20
+ hlpl/robotics/deploy.py
@@ -0,0 +1,2 @@
1
+ pillow>=9.0
2
+ numpy>=1.21
@@ -0,0 +1 @@
1
+ hlpl
@@ -0,0 +1,17 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "hlpl"
7
+ version = "0.1.0"
8
+ description = "Human Life Programming Language - Build dynamic digital characters and living environments"
9
+ readme = "README.md"
10
+ license = {text = "MIT"}
11
+ authors = [{name = "HLPL Project"}]
12
+ keywords = ["hlpl", "simulation", "e-character", "e-city", "robotics"]
13
+ classifiers = ["Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3"]
14
+ requires-python = ">=3.8"
15
+ dependencies = ["pillow>=9.0", "numpy>=1.21"]
16
+ [tool.setuptools.packages.find]
17
+ include = ["hlpl*"]
hlpl-0.1.0/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
hlpl-0.1.0/setup.py ADDED
@@ -0,0 +1,2 @@
1
+ from setuptools import setup, find_packages
2
+ setup(packages=find_packages())