Looking at this 'virtual' text editor the text looks pretty smooth, until you get really close. Would it be possible to import typefaces as paths, and antialias them? How do native apps do this, while also using hardware acceleration? Also, native apps can access sub-pixels for antialiasing, which I don't think is possible in a WebGL context. I've seen OpenGL GUIs before, but I wonder what limits them compared to nat…
Show HN: Primrose – a text editor that runs in a WebGL texture
81–90 of 105 posts
Re: Show HN: Primrose – a text editor that runs in a WebGL texture
#82Earlier quoted context omitted.
I'm the same way, so I can relate to your pain. I've had this happen before with Chrome/Chromium with hundreds of tabs. I now use Firefox for two reasons: One, the UI is better than Chrome/Chromium with hundreds of tabs active, and two I now simply periodically clear out long term tabs when I no longer have an immediate need for them by bookmarking them. My friends think I'm insane by keeping so many tabs open. Maybe…
Wow, you really get it. You really hit the nail of the head about bookmarks. They are almost always completely forgotten. Tabs, however, are constantly groomed and sifted through and pruned. If I could have my way, I would take Safari with all it's nice features like sexy tab scrolling and tab view (these are major assets to the tab junkie) and reshape it into something entirely tab based. Instead of bookmarks, you w…
Re: Show HN: Primrose – a text editor that runs in a WebGL texture
#83So here's why this is particularly awesome in my head. I am a digital nomad, and basically travel with a backpack's worth of stuff, developing off my 13"MBA. The thing I miss the most about my old office is having a nice monitor. The thing I miss most about having a home is my 3-monitor desktop setup. Both things I had to give up because they don't fit in my backpack and because I can't easily procure them wherever I…
>But if I can pack an Oculus Rift headset into my pack, I dunno, a year from now. I suspect it'll take longer than that for the resolution to get high enough to be usable for fine-detail tasks like professional coding.
Coding does not require high resolution displays. You can code on a 80 character wide terminal with fonts of 8x8 pixels. I have. I still use bitmap fonts today (terminus). And let me remind you that blind people code as well. Visible text is just an abstraction, other ones are possible.
Re: Show HN: Primrose – a text editor that runs in a WebGL texture
#84Earlier quoted context omitted.
Would love to hear more about your project.
Thanks. You can see it at https://github.com/shurcooL/Conception-go#screenshot , but it's less than 10% finished at this point. Everything you see is rendered in OpenGL. The text editing component has syntax and diff highlighting support. It's written in Go, but I'm planning to have it running in the browser by compiling Go to JS and using OpenGL bindings with two backends: WebGL and OpenGL. In terms of usability, it…
Yeah, I have written everything so far in plain JavaScript. I've been considering something else, but all of the available options seem a tad... monolithic.
If I'm going to not-javascript, then I think the answer is to go to something that is completely type safe and static, instead. I'd really like to be able to write-once-and-run-desktop-and-browser. I used to do C++, and now there is Emscripten, but I'd really rather not get back into C++ again. Go looked interesting, and there seems to already be a fair amount of work towards transpiling to JS. Rust looks particularly interesting, especially with the lack of implicit garbage collector, but from the little I've read, it seems Emscripten doesn't work that well with it.
Re: Show HN: Primrose – a text editor that runs in a WebGL texture
#85Earlier quoted context omitted.
Actually, I'm hoping to be able to experiment with code layout ideas that do not strictly adhere to a window. 2D elements tend to not map well to 3D spaces. One of the problems with the text-in-a-texture method that I've done here is that there is no relief of depth to the text, and relief is actually an important part of how we make sense out of objects in 3D space. It's fine on a 2D screen because the context is so…
I believe the reason is that graphical (2d) notations are harder to communicate and therefore not standardized. If they are standardized, they are usually very application specific and not really general enough. For example lambda calculus has a nice graphical representation as string diagrams, since it corresponds to calculations in a cartesian closed category. Typed lambda calculus has a similar representation, but…
I don't see what you mean about Magma. This is what I've found for Magma: http://www.math.harvard.edu/computing/magma/. It looks like Pascal with Python list comprehensions and sets as a first-class type.
Source code in most languages is a one-dimensional construct. Every source file in the project could be concatenated, the newline characters removed, and it would still compile to the same program (assuming the right ordering, barring white-space significant languages, etc.).
Is that because we are linear? Is that because our computers are linear? I don't think we're ever going to get away from written language as the abstraction of source code. Most (all?) people think in words. But how that language is presented might change. Literal lines and connectors between code elements has sucked in 2D because it just gets too dense for 2D space. Is that because linear things "want" to stay linear? Or is it because we have had to deal with 2D interfaces and it's easier to work in N-1 dimensions when using an N-dimensional interface?
And while I think I've seen attempts at this in 3D, then we have the other issue of 3D interfaces being terrible on 2D IO devices. Never have the two been put together.
But I think that's going to change very soon. A lot more people are experimenting with this sort of stuff these days. Good-enough stereo displays are accessible to everyone (slap your phone in the cardboard box you ordered a set of $5 lenses in). Language design is more accessible to everyone. Editor development is, too (I couldn't imagine doing this project 5 years ago, and even 3 years ago it would have been a very poor experience). There is just a culmination of different technologies that make it possible for just about anyone to hack on all of this stuff.
Somehow, there seems to be a lot of discouragement lately to do so, but that's a different story entirely. I'll just leave it at saying, I hate the phrase, "don't reinvent the wheel".
Re: Show HN: Primrose – a text editor that runs in a WebGL texture
#86Earlier quoted context omitted.
Holy crap, great idea! Imagine if adding a "monitor" (virtually speaking, of course) to your setup was no more difficult than splitting a Vim window... that would be pretty rad. An Oculus Rift is much less expensive than your typical multi-monitor setup too, FWIW.
Finally, a virtual reality so immersive it can simulate a room full of teletypes.
Re: Show HN: Primrose – a text editor that runs in a WebGL texture
#87Earlier quoted context omitted.
Actually, I'm hoping to be able to experiment with code layout ideas that do not strictly adhere to a window. 2D elements tend to not map well to 3D spaces. One of the problems with the text-in-a-texture method that I've done here is that there is no relief of depth to the text, and relief is actually an important part of how we make sense out of objects in 3D space. It's fine on a 2D screen because the context is so…
> Like, why do we still use plain text in flat files for source code Information density. Images and graphs are exceptions to the general rule that text can contain a lot more information on one page than graphics can.
Re: Show HN: Primrose – a text editor that runs in a WebGL texture
#88Earlier quoted context omitted.
I believe the reason is that graphical (2d) notations are harder to communicate and therefore not standardized. If they are standardized, they are usually very application specific and not really general enough. For example lambda calculus has a nice graphical representation as string diagrams, since it corresponds to calculations in a cartesian closed category. Typed lambda calculus has a similar representation, but…
My wife chimes in here and says, "don't even talk to me about LabVIEW". She's apparently not happy with it right now, haha. I don't see what you mean about Magma. This is what I've found for Magma: http://www.math.harvard.edu/computing/magma/ . It looks like Pascal with Python list comprehensions and sets as a first-class type. Source code in most languages is a one-dimensional construct. Every source file in the pro…
I still think that a graphical language for this is worth exploring, because it already happens to be the way domain experts think, which is presumably why most of the successful commercial software is targeted at them. See for example: http://math.ucr.edu/home/baez/networks/ for an overview of how all those things tie together.
Regarding Magma here is a PDF, which contains a summary of the theoretical foundations:
http://sage.math.washington.edu/people/cannon/magma-the-lang...
Essentially it is a language that can do type checked symbolic reasoning, whereas for example Mathematica is for the most part untyped. Page 11 explains the steps necessary to extend the system (you have to write a C-library, so that is less then ideal). The reason I bring this up is because relations between symbolic expressions (for example equations) are really something that lives in a higher dimensional space, see for example the Associahedron (http://en.wikipedia.org/wiki/Associahedron). In a 2-dimensional language ordinary programs would be graphs and metaprogramming would be surfaces between graphs. As long as you have only a 2 dimensional surface available, that kind representation probably would not work, but I believe as a conceptual idea it is rather helpful.
I agree with you, that the moment convenient augmented reality hits, we will hopefully see different variations of program representations emerge. Especially complicated concurrent systems would probably benefit from it, since they don't have a sequential control flow.
Re: Show HN: Primrose – a text editor that runs in a WebGL texture
#89Earlier quoted context omitted.
Because I cycle through a lot of tabs. Yes, some of them I leave up for months to pick away at, but others I finish in just a day. It's much easier to close tabs than to edit my bookmarks constantly. And losing those tabs isn't an issue because Safari can be made to reopen those tabs each session, even after unexpected shutdown or whatever. But then this happened. I need to write something that will back up my tabs.
I'm the same way, so I can relate to your pain. I've had this happen before with Chrome/Chromium with hundreds of tabs. I now use Firefox for two reasons: One, the UI is better than Chrome/Chromium with hundreds of tabs active, and two I now simply periodically clear out long term tabs when I no longer have an immediate need for them by bookmarking them. My friends think I'm insane by keeping so many tabs open. Maybe…
The tabs are also "soft-loaded" meaning that you have to click on them to load the content, so you can find the offending tab and kill it to prevent crash from happening again.
Re: Show HN: Primrose – a text editor that runs in a WebGL texture
#90Earlier quoted context omitted.
Because I cycle through a lot of tabs. Yes, some of them I leave up for months to pick away at, but others I finish in just a day. It's much easier to close tabs than to edit my bookmarks constantly. And losing those tabs isn't an issue because Safari can be made to reopen those tabs each session, even after unexpected shutdown or whatever. But then this happened. I need to write something that will back up my tabs.
I'm the same way, so I can relate to your pain. I've had this happen before with Chrome/Chromium with hundreds of tabs. I now use Firefox for two reasons: One, the UI is better than Chrome/Chromium with hundreds of tabs active, and two I now simply periodically clear out long term tabs when I no longer have an immediate need for them by bookmarking them. My friends think I'm insane by keeping so many tabs open. Maybe…