132 karma · joined Nov 4, 2014 (12y ago) · 56 submissions
comment 5mo ago · link · parent
- OpenCL interop (e.g. https://thi.ng/raymarchcl, https://thi.ng/simplecl)
- GLSL (e.g. https://thi.ng/shader-ast)
- C11 (e.g. https://github.com/thi-ng/c-thing, https://thi.ng/synstack)
- Zig (https://github.com/thi-ng/zig-thing)
- WASM (https://thi.ng/wasm-api)
- Forth (https://thi.ng/charlie)
There are infrastructure packages to simplify creation of ad hoc DSLs, their transpilation or interpretation, but also interop with WASM (so far mostly geared towards & tested with Zig), for example:
In general, thi.ng projects range from super high level computational design concepts to low-level primitives like memory allocators and memory/data layout management (e.g. https://thi.ng/tinyalloc, https://thi.ng/malloc, https://thi.ng/simd, https://thi.ng/soa) and a huge spectrum of other things in between...
comment 5mo ago · link · parent
comment 5mo ago · link · parent
From a technical POV, the main reasons I started looking at other languages (Go, C11, TypeScript) back in 2015/16 were: Better performance and less effort required for working with low-level primitives & APIs. I also got more interested again in embedded development (wrote a long blog post about it[1]). The final decision was when I started using thi.ng for a large 5 year computational design tool/project at Nike...
Many of the language features introduced with ES6 (esp. generators, iterables, spread operator, Map/Set, Promises), suddenly made Clojure/ClojureScript feel much more clunky and I felt I can have a lot more fine grained control and performance with much less ceremony/effort, once I implemented (and usually also vastly extended!) some of the key Clojure features/datatypes myself... Working with modern Web APIs (WebGL, WebAudio, WASM, async/await etc.) all became so much easier...
The literate programming (LP) approach I used initially (between 2011-2016) was using the "standard" Emacs OrgMode Babel setup which I found an incredible amplifier for my work[2][3]. Emacs was widely used among the Clojure community back then, but LP itself as an approach _was_ unusual, still is, and scared people off...
[1] https://medium.com/@thi.ng/the-jacob-s-ladder-of-coding-4b12... [2] https://www.reddit.com/r/emacs/comments/9w8i2g/comment/ec7xv... [3] https://www.reddit.com/r/Clojure/comments/9deyxe/comment/e69...
comment 6y ago · link · parent
- https://www.reddit.com/r/emacs/comments/9w8i2g/orgmode_liter... - https://www.reddit.com/r/Clojure/comments/9deyxe/thinggeom_a...
The main feedback re: LP style was the additional layer of indirection and unfamiliarity with the idea of code blocks within an .org file. Also obviously the dependency on Emacs for a decent editing experience of these files didn't help either, even though I always thought for Clojure this was less of an issue (at least back then). With more popular IDEs available by now, I'd say it'd be even harder to convince people to contribute in that style...
The only practical advice re: community building I can provide is trying to be there for new users, providing answers/guidance/examples/infrastructure, a space to exchange ideas (i.e. our Discord). That's especially important if other things like extensive documentation/tutorials are still missing. Doing this isn't always easy and there're periods when I'll have to disconnect, but I'm super grateful that we now are starting to have more people helping out on that front, even though the community is still rather small...
Thanks for the notespace link, will it check out asap...
comment 6y ago · link · parent
comment 6y ago · link · parent
Comparisons with tools like Processing/OF aren't right or fair either, because they focus on a much smaller feature range and then rely on external plugins to expand scope. thi.ng projects have a bias (in terms of percentage of sub-projects) towards data structures, geometry and graphics, but, at large, ALSO cover the "full stack" (arrrgh!!) via tools for: baremetal programming (e.g. on Cortex M4/7 ARM devices), functional & reactive programming, data processing (transducers, datastructures, querying), there're several DSLs & general DSL tooling for creating new ones (parser generators, interpreters, transpilers, VMs), audio/DSP (signal generators, oscillators, filters), file format support (importers, exporters) to UI (for web, desktop, in multiple languages)... Also don't forget most of these libraries are independent. So I'm genuinely, genuinely wondering how one would distill this into a traditional landing page setup? Also, how this is comparable to say P5? It isn't, not even close!
What this discussion has brought out and confirmed again (to me, at least) is the commodification of ideas and the explicit expectation of ideas packaged into easily consumed products. Products, which can be consumed and need to provide a quick sale, regardless of conceptual depth (or breadth in this case)... it's a little sad to see! By that logic I'd need to create 250 websites... and there also somewhat are already: Most projects have their own URL (e.g. http://thi.ng/transducers, http://thi.ng/morphogen etc.)
I'm really not trying to be defensive (even if it might come across as such, merely trying to provide more subtlety & context to some of the comments). I'm thankful & there's a lot of food for thought how to approach the next phase of development, but I'm honestly surprised by some of the comments (esp. from this crowd)
comment 6y ago · link · parent
My sense from some of your above argumentation and issues re: word choices, is that there's somewhat of an implicit expectation of the uniform format of SV-stylee startup landing pages and JS libraries: snappy big letter bullet list of selling points, 5-line code examples and a big fat get started button...
People with such expectations really haven't been the audience so far and likely never will be. Can I/we do a better job to demonstrate use cases and help guiding people discovering relevant projects for their use cases? Yes, definitely, but bandwidth issue, function over time. Though, it's very likely the following will remain an unmovable truth (as explained on the thi.ng/umbrella readme):
> This project is NOT a framework, provides no turn-key, one-size-fits-all approach and instead encourages a mix & match philosophy for various key aspects of application design.
There're many (likely experienced) developers who do very much appreciate such an approach, just as there will be developers for which this means a no-go zone. I think this is fine.
(...and again, I sincerely thank you for your feedback - food for thought!)
comment 6y ago · link · parent
There're ~100 examples for thi.ng/umbrella alone, all commented, all linked from the readme's of each package used. Additionally, I've spent a lot of time this year adding more readmes, docstrings (again with examples), create diagrams etc. I completely get your comments/position, but I'm also really wondering if any of this work is just wasted effort if no one actually reads/looks at that stuff... and that then makes it even harder for me to prioritize.
FWIW I will also start streaming again in December, focusing on smaller projects/examples than previously. Maybe that format will work better for newcomers.
Obviously, there's no desire from my end to be overly cryptic about what you can do with these projects, but whereas P5, OF etc at their core all have a fairly narrow scope (DSLs for OpenGL API and some data wrangling sugar) and only gain their incredible flexibility through various addons and sheer community size, thi.ng simply has no core and that is the hardest thing to "sell" to people, even though IMHO it's also one of it's most unique aspects...
thi.ng is an ecosystem (as others have put it), not following the standard main pillar/silo + plugin architectures...
comment 6y ago · link · parent
First paragraph, second sentence:
"Not a framework, nor bound to any specific use case, environment or even language, it's a vast and mature set of complementing code libraries, which has organically grown to approx. 250 sub-projects"
As for the topic search: The search box says "search by topic" (fuzzy search) - the tags in the tag cloud are all clickable. Is that really not obvious (even though it's also mentioned in the text)? Click on "typescript" to only show typescript projects etc.
As for the example projects. This is also explained in the text. This work is ongoing. There're another 150 or so projects to be added (just my own). For community submissions there is & will be: http://awesome.thi.ng/ (currently just linking to the submission form)
comment 6y ago · link · parent
I partially stopped with the Clojure work because of lack of community/support, perf & workflow issues and changing interests (e.g. got back into C/Forth/STM32). Before that, I've tried for 4-5 years to encourage more people adopting CLJ/CLJS and to provide tools for graphics, data viz, digital fabrication etc. to make the language more appealing/useful for these folks. In hindsight it seems I gave up a year too early... Still, I find the TS monorepo workflow much more suitable for myself (and for the project), since large scale refactoring without types often has been a complete nightmare in Clojure (also using Literate Programming/org-mode made it even harder in these case). Plus, trying to write performant cross-environment code (for realtime graphics) in CLJC has been a quite painful/hairy experience. Still, as I said before, I do have very fond memories of the 6-7 years spent with the language & community. It's been partially commercial suicide (at the time), but an huge and important learning experience and I'm happy that (in the end) quite a few people found (and still do find) those tools useful...
comment 6y ago · link · parent
From this comment and others it seems maybe not many people are familiar with the meaning of the term: Design through/by computational means, incl. procedural, generative, evolutionary approaches...
Having said this, these libraries are closer to general purpose computing, but there's somewhat of a bias in terms of topics and data structures towards geometry, graphics, data transformations, visualization etc.
comment 6y ago · link · parent
- manifold - something taking many forms - polyglot - https://en.wikipedia.org/wiki/Polyglot_(computing)
I'm pretty sensitive to marketing BS/buzzwords myself, but unlike the usual "blazing fast" and similar hypephrases, the above two words actually are 100% correct use of the terms (IMHO)
See my other reply above re:scope and projects written in: TypeScript, Clojure/script, C, OpenCL, GLSL, VEX, Java, Forth - if this is not polyglot, then what is?
comment 6y ago · link · parent
1. thi.ng is definitely not a framework - it is a collection of 260 largely independent libraries & projects built around them 2. Because of #1, there cannot be a single "start here". I was hoping that the interactive tag cloud would make this obvious and also fulfil that "start here" role: Users choose a tag/topic of interest and get a list of relevant projects, each with a readme (and often a list of examples)
To give an example of the problem: Say you're interested in building UIs. There're currently ~20 different projects related to that (of which only a few are related to each other, the rest independent), some are DOM based, some use canvas, others are for OpenGL, Java, Clojure, even others are for baremetal ARM devices. Where's the "start here"? An even larger number of packages are dealing with/providing data structures? What funnel should/could these have?
140 of the ~260 projects are part of the thi.ng/umbrella monorepo and written in TypeScript. These are somewhat more cohesive (in terms of style, approach & infrastructure), but still definitely not a framework. Then, there's also the issue that "monorepo" has multiple interpretations too by now:
1. a large (more or less) single-purpose project consisting of multiple packages/sub-projects 2. a google-style monolithic repository providing a common source of truth for thousands of projects (not all related)
thi.ng/umbrella is somewhere between #1 & #2. thi.ng at large is definitely a #2...
I'd really be interested in hearing how others would approach this from an UX POV, since it is seemingly different to the vast majority of open source offerings, especially in that wider field of "creative computing" (which itself IMHO is a too limiting term for thi.ng - there's a much stronger focus on topics outside what's covered by P5, OF, Cinder, OPENRNDR etc.)
20.
Show HN: Thi.ng – open-source building blocks for computational design
107 points · by toxmeister · 6y ago · 41 comments
21.
1D and 2D convolutions, functional, branchless, cellular automata (Pt.3)(medium.com ↗)
5 points · by toxmeister · 7y ago · discuss
22.
A 5k-word deep look under the bonnet of thi.ng/transducers(medium.com ↗)
3 points · by toxmeister · 7y ago · discuss
comment 7y ago · link · parent
1) ta_free() is only O(n) if block compaction is enabled, else it's O(1), i.e. a simple cons of the freed block addr to the free list (https://github.com/thi-ng/tinyalloc/blob/master/tinyalloc.c#...)
2) there's no hardcoded alignment (it's configurable via TA_ALIGN macro) and I'm confused about your other comment about not aligning the right address in general. that's a wrong observation and i think you misunderstood the diagram in the readme.
3) it's clearly stated in the readme that this is largely meant for memory constrained situations (or where not large numbers of blocks, realloc or multithreading is needed/available) and so it's not meant to be a replacement for dlmalloc / jemalloc caliber allocators etc. i needed something small & lightweight and it did it's job very well in several production projects on the ARM STM32 platform (where I have upto around 8MB managed). I also found it very useful for some ongoing JS/WASM interop projects (i.e. there's JS version here: https://github.com/thi-ng/umbrella/blob/master/packages/mall...)
comment 8y ago · link · parent
AFAIK this actually is only a directive and not a law just yet. As a directive it will be down to the individual governments to decide how it will be implemented. The final vote will be in Jan 2019.
comment 8y ago · link · parent
Isn't also a large appeal of working with components to compose UIs in a more abstracted manner, with different semantics? The hiccup format doesn't use anything alien to web developers and is (objectively!) less noisy in terms of punctuation to express the same concepts. And array manipulation in JS is (again objectively!) easier than manipulating the same kind of data in some <template> DOM. Hdom's syntax is arguably also less tainted by HTML, and that makes sense and was desired, precisely because it is NOT only aimed at the browser DOM, which is just one target (the default). Since the syntax is just `[tag, attribs, ...body]` it's sufficiently general to work equally well for many other use cases not aimed a browser DOM, e.g.
- Server-side rendering
- Static site generation
- WebGL UIs, shader definitions, entire scenes
- Tagged data interchange format between different apps (on top of JSON)
- 3D printing (use as interim format before generating final G-code)
- ...
Lastly, from your new examples given, in my mind, it seems your project is simply aimed at not just somewhat different use cases (albeit there are of course large overlaps), but also a somewhat different audience. Note, I'm not saying that hdom is worse or better than lit-html, it's simply based on a (quite) different philosophy. So please don't compare apples with pears!
comment 8y ago · link · parent
From a quick glance at the docs, though it seems to me there're a lot of other differences in approach (apart from the syntactic differences), especially WRT state. I will have to study these further before being able to comment properly...
Just one more note about XML vs. JS syntax to describe elements. As I said earlier, am sure there's ton of people who prefer the familiar way, but objectively, do you really find hdom's approach less readable? Honest question!
// lit-html
list = html`<ul>${items.map((i) => html`<li>${i}</li>`)}</ul>`
// hdom
list = ["ul", items.map((i) => ["li", i])]comment 8y ago · link · parent
It all depends what one wants to do with a browser, doesn't it? For some of my projects the browser is merely a sandbox for delivering design tools and I really don't care about the HTML aspects of it at all.
For other projects, I only care about HTML generation and use hdom's sister library to generate static HTML from the same components:
https://github.com/thi-ng/umbrella/tree/master/packages/hicc...
If a user has JS disabled in the browser, fine. If not, then the browser app can hydrate the static HTML and add interactive features and cause cancer :)