Live data from Hacker News

REPL Driven Minecraft

juxt.pro

11–15 of 15 posts

Re: REPL Driven Minecraft

#12
post #5
post #2

Nice, I wonder if the open source Minetest can be used instead of Minecraft.

Not really a REPL, but can inject code into a running minetest instance: https://github.com/Quiark/mtrepl/

A Jupyter kernel for Minecraft would be neat: https://jupyter-client.readthedocs.io/en/latest/wrapperkerne... :

> You can re-use IPython’s kernel machinery to easily make new kernels. This is useful for languages that have Python bindings, such as Hy (see Calysto Hy), or languages where the REPL can be controlled in a tty using pexpect, such as bash.

Looks like there's a pytest-minecraft, too: https://pypi.org/project/pytest-minecraft/

/? Minecraft site:pypi.org https://pypi.org/search/?q=minecraft

SensorCraft is just the voxel designer part of Minecraft (like original Minecraft) with Pyglet for OpenGL: https://github.com/AFRL-RY/SensorCraft

Re: REPL Driven Minecraft

#13
post #9

It would be interesting to render the images from the POV of a player in the world onto a large movie screen in game. Then other players could join in, go to the cinema and watch the live stream. Might be fun for game lobbies.

It's been done. See https://m.youtube.com/watch?v=_VBO2WRpBrQ

"Public Minecraft: Pi Edition API Python Library" https://github.com/martinohanlon/mcpi

rendering-minecraft w/ mcpi might do offline / batch rendering? https://pypi.org/project/rendering-minecraft/

Jupyter-cadquery might be worth a look: https://github.com/bernhard-42/jupyter-cadquery :

> View CadQuery objects in JupyterLab or in a standalone viewer for any IDE [w/ pythreejs]

If there's a JS port or WASM build of Minecraft, Minecraft could be rendered in a headless browser?

Re: REPL Driven Minecraft

#14
post #5

Earlier quoted context omitted.

Not really a REPL, but can inject code into a running minetest instance: https://github.com/Quiark/mtrepl/

A Jupyter kernel for Minecraft would be neat: https://jupyter-client.readthedocs.io/en/latest/wrapperkerne... : > You can re-use IPython’s kernel machinery to easily make new kernels. This is useful for languages that have Python bindings, such as Hy (see Calysto Hy), or languages where the REPL can be controlled in a tty using pexpect, such as bash. Looks like there's a pytest-minecraft, too: https://pypi.org/projec…

Awhile back I looked into creating a Jupyter kernel for LDraw / LeoCAD / Bricklayer (SML) to build LEGO creations with code in the input cell of a notebook and render to the output cell, and put together some notes on Jupyter kernels that might be of use for creating a Minecraft / mcpi / SensorCraft Jupyter kernel: https://github.com/westurner/wiki/blob/master/bricklayer.md#...

- [ ] DOC: Jupyter-cadquery & pythreejs inspiration

- [ ] ENH: Minecraft Jupyter kernel (pytest-minecraft?,)

- [ ] ENH: mcpi Jupyter kernel

- [ ] ENH: SensorCraft Jupyter kernel

- [ ] ENH,BLD,DOC: SensorCraft: conda-forge environment.yml (target Mambaforge for ARM64 support, too)

- [ ] ENH,BLD,DOC: SensorCraft: build plaform-specific binary installer(s) with {CPython, all packages from environment.yml, Pyglet & OpenGL, } with e.g. Conda Constructor

- [ ] ENH,BLD,DOC: SensorCraft: reformat tutorials as Jupyter notebooks; for repo2docker, jupyter-book (template w/ repo2docker requirements.txt and/or conda/mamba environment.yml), & jupyter-lite, & VScode (because VSCode works on Win/Mac/Lin/Web and has Jupyter notebook support)

- [ ] ENH,BLD,DOC: SensorCraft: build a jupyter-lite build to run SensorCraft & Python & JupyterLab in WASM in a browser tab with no installation/deployment time cost

- [ ] ENH: SensorCraft: replace Pyglet (OpenGL) with an alternate WebGL/WebGPU implementation

Re: REPL Driven Minecraft

#15
It's only tangentially related, but I just wanted to say that being able to programmatically hack around with the minecraft world via python on the raspberry pi is what first made programming fun for me. I distinctly remember building a binary clock; actually writing code to achieve something I wanted rather than some arbitrary class exercise
Post reply on HN