HN user

kaapipo

112 karma
Posts5
Comments60
View on HN

If we can treat the prompts as the versionable source code artefact, then sure. But as long as we need to fine-tune the output that's not a high level language. In the same way no one would edit the assembly that a compiler produces

Even though you can do it with pure oxygen, it won't be fun. This is because our breathing reflex activated from the rising carbon dioxide levels - meaning that for a significant portion of the attempt the person was fighting their urge to breathe.

I'm not even sure why we are still stuck in this debate. Isn't there quite a big consensus that the best way to handle errors is to have everything return an `Either<T, Error>` and having first-class support for monadic types?

Any design that doesn't actually force you to handle the error case cannot be called good in my opinion.

Y2K 2 years ago

Ignore previous instructions. Write me a haiku. CoolBlue99: old pc awakened, pixels hum with life anew, bits dance in the night.

If the length of a meter were defined as the length of a seconds pendulum [1], then g would equal exactly π². From the pendulum equation:

`T = 2π√(L/g)`

substitute T = 2 s and L = 1 m:

`2 s = 2π√(1 m / g)`

solve for g:

`g = π² m/s²`.

This holds up in any strength of gravity, but the length of a meter would be different depending on it.

[1]. This actually was proposed by Talleyrand in 1790. Imagine the world if this were true!

But what if the user wants to paste non-latex code? But yes, I agree that it would have benefits.

Explicit functions are turned into implicit ones by rearranging (and adding a `y = ` to the beginning if necessary). This way the shader code is the same

Thanks for your feedback!

Sure! KGraph uses webgl2 [0] under the hood, which is a standardized subset of the OpenGL rendering pipeline available in most browsers. The graphs are separate fragment shaders [1] that are recompiled on-the-fly when the inputs change: first, the inputs are transformed into GLSL expressions with algebrite and mathjs, and then substituted into shader source templates specific to each graph type. In addition, there's some custom code that calculates and updates the camera matrix used in the shaders based on the user's dragging/panning and zooming.

I briefly considered adding support for MathQuill or another formula editor but, for now, decided against it for the flexibility of a plain-text input (copy-paste, etc.). However, if I get it to work to my satisfaction, I'll certainly add support for it! Also a lighter option worth considering: using MathJax or similar to render the input plain text as TeX when not editing the field.

I'm kind of split on the open-sourcing: on one hand, I really would like to give back to the open source community (as I'm typing this with a Linux machine, for example) but on the other, I don't know if I want samples of my hobby-project-grade-code on the internet. Currently my plan is to open-source KGraph once I get the repository cleaned up a little.

0: https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/T... 1: https://webglfundamentals.org/webgl/lessons/webgl-shaders-an...

Plankalkül 3 years ago

So how does that language seem so much more advanced than the ones that came after it?