Hacks of Life

hacksoflife.blogspot.com · Personal blog · on HN since 2010

Hacks of Life is a game and graphics developer's blog on OpenGL, GPUs, performance, compilers, and software design practices.

What HN saysCommenters recommend it for practical OpenGL insights and link posts on LuaJIT integration and why inheritance of implementation is bad.
22HN people shared it
6linked it in comments
27stories submitted
574story points
2 years agolast shared
2010people per year2026

Most-shared posts

  1. 1
    Solve Less General Problems
    2 people · 196 points · first shared 2018 · 82 comments on HN
  2. 2
    When To Rewrite
    2 people · 2 points · first shared 2010 · discussion on HN
  3. 3
    Homepage
    2 people · first shared 2013
  4. 4
    The Four Horsemen of the Performance Apocalypse
    1 people · 98 points · first shared 2015 · 17 comments on HN
  5. 5
    When Not to Serialize
    1 people · 69 points · first shared 2018 · 19 comments on HN
  6. 6
    The Dangers of Super Smart Compilers
    1 people · 55 points · first shared 2015 · 52 comments on HN
  7. 7
    Source Control for Art Assets Must Exist
    1 people · 41 points · first shared 2015 · 36 comments on HN
  8. 8
    Making SoA Tollerable
    1 people · 35 points · first shared 2021 · 8 comments on HN
  9. 9
    Underestanding PowerVR GPUs via Metal
    1 people · 28 points · first shared 2015 · discussion on HN
  10. 10
    What OOP Isn't
    1 people · 20 points · first shared 2010 · 18 comments on HN
  11. 11
    Solve Less General Problems
    1 people · 4 points · first shared 2018 · discussion on HN
  12. 12
    Why Your C++ Should Be Simple
    1 people · 3 points · first shared 2017 · discussion on HN
  13. 13
    Understanding PowerVR GPUs via Metal
    1 people · 3 points · first shared 2015 · discussion on HN
  14. 14
    High Performance Code Is Designed, Not Optimized
    1 people · 3 points · first shared 2015 · discussion on HN
  15. 15
    Second. Worst. Lock. Ever
    1 people · 2 points · first shared 2020 · discussion on HN

What HN people wrote when they linked it

krackers · 2025-02-19
The developer's blog is really cool, has lots of neat practical opengl insights and stuff https://hacksoflife.blogspot.com/
flohofwoe · 2015-04-07
Unfortunately dynamic buffer updates is one of the tricky parts to do right in OpenGL since you need to assume what the driver does under the hood, and the best technique depends on what GL version you're targeting, and what GL extensions are available. I found this blog post very useful: http://hacksoflife.blogspot.de/2012/04/beyond-glmapbuffer.html If you can afford to target bleeding edge OpenGL, the AZDO slides contain the current state of the art (there's a whole section about dynamic buffer updates somewhere in there): http://www.slideshare.net/CassEveritt/approaching-zero-driver-overhead… On WebGL, the established tricks like buffer orphaning don't work, and direct mapping isn't available. It seems best to simply do a bufferSubData and not care about double buffering etc (https://groups.google.com/forum/#!searchin/webgl-dev-list/floooh/webgl…
smhx · 2014-06-23
my biggest annoyance with LuaJIT is the lack of 64-bit addressing, and there's no easy fix for this. Mike Pall said he'd fix it in LuaJIT 3.0 (with an overhaul of the GC), whenever that'll be. http://hacksoflife.blogspot.com/2012/12/integrating-luajit-with-x-plan… Edit: to clarify, this does not mean torch cant use more than 2GB, but native lua allocations cant be more than 2GB, so ffi-based or C based allocations (which is how torch tensors are allocated) have no such limits.
gnubardt · 2010-12-10
he did link to another post he'd written elaborating on the subject http://hacksoflife.blogspot.com/2007/01/inheritance-of-implementation-…
sillysaurus3 · 2017-05-01
I hooked up LuaJIT to emacs for fun. Emacs recently released a new module system where you can build DLLs that are loaded dynamically: http://diobla.info/blog-archive/modules-tut.html Getting LuaJIT to work on 64-bit OS X required building a custom emacs with linker flags -pagezero_size 10000 -image_base 100000000. This is unfortunate since obviously users will not take the time to build an emacs with custom linker flags. But more generally, this is an issue any time you want to embed LuaJIT in an application plugin rather than the application itself. There's a bunch of scattered info about the issue: https://gist.github.com/nddrylliog/8722197 http://hacksoflife.blogspot.fr/2012/12/integrating-luajit-with-x-plane… https://en.blog.nic.cz/2015/08/12/embedding-luajit-in-30-minutes-or-so… http://luajit.org/install.html I was hoping there might be a way of sidestepping the issue somehow. If anyone has any ideas, it would be appreciated. LuaJIT has some nice speed improvements compared to standard Lua, but more importantly it has a pretty amazing FFI library. The C declaration parser in particular is valuable. (Yes, I know it's pointless to hook LuaJIT to emacs. It's mostly a "just because" project.)

Keyboard shortcuts

/Search
j kNext / previous blog
EnterOpen selected blog
vVisit the blog site
fFollow / unfollow
lSwitch grid / list view
dSwitch dark mode
g hHome
g pTop posts
g tTopics
g fFollowing
g lLiked
g yHistory
g qFAQ
EscBack / close