HNHacker News
TopNewBestAskShowJobs

madflame991

640 karma · joined October 7, 2014

submissionscomments
madflame991··on Making any integer with four 2s
Here are some values that are (understandably) not listed on the blog. They happen only due to the limited precision of floating point formats.

  128              = √(2 / √√(√2 - (2 / √2)))
  8192             = √√(2 / ((√2 * √2) - 2))
  16384            = (2 / √√(√2 - (2 / √2)))
  67108864         = √(2 / ((√2 * √2) - 2))
  134217728        = (2 / √(√2 - (2 / √2)))
  4503599627370496 = (2 / ((√2 * √2) - 2))
  9007199254740992 = (2 / (√2 - (2 / √2)))
  6369051672525773 = (√2 / (√2 - (2 / √2)))
I found these by accident a long time ago but kept them because they do "work". Try to input one expression in the lil box in https://www.wolframalpha.com/?source=nav and they will quickly evaluate to these values; the charade goes away after you press Enter and get the (mathematically) correct answer.

My old solvers from what feels like a previous life: https://madflame991.blogspot.com/2013/02/four-fours.html https://madflame991.blogspot.com/2013/02/return-of-four-four...

That was fun

madflame991··on Bouncing Beholder, my winning JS1K entry (2012)
I can't recommend "return true to win" (https://alf.nu/ReturnTrue) enough to learn how to golf JS. I think it's more accessible to learn one 10-20 char snippet at a time than a big project like a 1k submission.
madflame991··on Bit Vectors and my first steps into assembly
In certain conditions gcc will actually generate instructions that use this same bitvector described: https://godbolt.org/z/6Gfjv6PGd (notice the funny 130159 value in there)

The only thing I did was to adjust the range of characters so that the bitvector fits 64 bits. Sadly, I do not this it would work for the author's bigger range.

madflame991··on Oldest known wild bird lays egg at 74
> They mate for life.

Not really; see https://news.mit.edu/2022/divorce-albatross-shy-males-0913 and https://oceanconservancy.org/blog/2020/02/13/albatross-reall...

madflame991··on Show HN: I made a digital circuit drawing and simulation game
I tried the demo and I liked it!

I would prefer if I could pick a color in a faster way than switching to the color picker or using the palette: maybe middle click or Ctrl + left-click (gimp does that). It would reduce the mouse travel quite a bit; sometimes I happen to have the exact color I want next to my cursor.

I would also suggest putting the trailer on Steam. All I see is images in the steam carousel thing; I think the trailer being in the carousel would help.

madflame991··on Are We Anti-Cheat Yet?
I've been playing the same 2 games for many years and I think I got pretty good at them and I've used multiple accounts - under your assumption I look like a cheater.
madflame991··on Ask HN: Weirdest Computer Architecture?
> but isn't the "general" architecture of most of our computers "von neumann"!?

That's something I was also curious about and it turns out Arduinos use the Harvard architecture. You might say Arduinos are not really "computers" but after a bit of googling I found an Apple II emulator running on an Arduino and, well, an Apple II is generally accepted to be a computer :)

madflame991··on Don't Spy EU
What would prevent me from walking around the street or in semi-public places recording non-stop on my phone? Heck, I could have a few phones in my pockets!
madflame991··on Walking the World: Bucharest
I was thinking the same; they have a map of their route and I see they went through Rahova, Ferentari and they somehow missed Zetari and the cemeteries there on their way to Anghel Nutu; those areas are actually the worst off of the entire city - quite a coincidence :/

I’ve been almost daily through these areas for years; used to actually live on str Anghel Nutu; finding this on HN on christmas day is a bit surreal. I come here for tech articles mainly

madflame991··on Extraterrestrial Civilizations: Problems of Interstellar Communication (1971)
I'm always a bit skeptical about physics because whatever models we find and celebrate now will have to be adjusted at some point in the future. I wonder if there's any way of knowing that something is indeed impossible or if our model of something is final and set in stone.

I'm happy there are at least some universal constants like absolute zero or the max possible temp or planck length.

And as for anything FTL, I hear it breaks the rules of causality and that seems to be a big no-no and is indeed impossible.

madflame991··on “Zero fucks given” in other languages
I've never heard about the frostbitten onion before and I am Romanian as well - maybe it's particular to some regions?

"It hurts in my dick" is just a more vulgar way of saying "it hurts in my ass" (the ass would be a place you wouldn't care if you hurt or not); more vulgar because "pula" (erect penis) is more vulgar than ass.

The next level of not giving a fuck after that is "it doesn't even hurt in my ass" which I find amusing - to which someone can reply "well, when it's gonna hurt you'll realise how bad it is" in the sense that "you will wake up someday and regret it".

The least vulgar variant is "it hurts in my elbow" - elbows being usually bumped into things and not hurting much (unless you hit that special spot where the nerve lies)

madflame991··on Power imbalances and sex
Related and on topic: https://www.youtube.com/watch?v=h0RqK00b7Q4

Sexual Economics: A Model of Heterosexual Behavior by Dr. Kathleen Vohs

madflame991··on MicroStudio now supports microScript, Python, JavaScript and Lua
I'm going to ask a different question: so what if it doesn't handle it? Some of the hardware resources would be spent on dynamic shenanigans instead of the actual game content. In contrast a game running on the same hardware but implemented in C++ would be able to handle/offer more of the content of the game.

But then again 5 years ago hardware was worse; 10 years ago even worse; 20 etc etc. Games had less content but there were still good games, as good as modern ones. Game enjoyability doesn't depend that much on the scale of its content. If a dynamic language pulls the resources down to what they were 5-10 years ago you can still make enjoyable games.

madflame991··on WebAssembly and Back Again: Fine-Grained Sandboxing in Firefox 95
> having a trusted compiler could (eventually) massively increase performance by removing processes entirely (no more virtual memory! no more TLB flushes and misses! less task switch overhead!) and eliminating the kernel/user mode separation

I saw a talk a while ago that was advocating for the same thing, except this was about JS and not webassembly. I can't find it tho - I remember it being related to the WAT js talk; It also mentioned that it would eliminate rings on the cpu (and simplify cpus) and context switches which would make execution faster; they were citing some MS research on the matter - damn I really wanna find the talk now...

Edit: https://www.destroyallsoftware.com/talks/the-birth-and-death...

thanks BoppreH

MS research: "Hardware-based isolation incurs nontrivial performance costs (up to 25-33%) and complicates system implementations" (virtual memory and protection rings); I think MS knows what they're talking about here

madflame991··on The greatest resume I've ever seen
Tangential-ish:

I used to live in a place where we had gas resources and gas stoves. Gas pipes would be painted yellow to stand out and people always had some sort of respect and caution around them - you don't mess with gas pipes - I learned that as a kid. At the slightest whif of gas people would light up a match or a lighter and run it along the pipe to check for leaks - I always thought this is what "smoke testing" meant (altho there would't be any smoke). I still don't know if this is safe or would even work or it's just something people did and keep doing... and I have no gas pipes around me anymore.

madflame991··on Building apps in minutes, not months
I come back to this article every now and then http://www.loper-os.org/?p=861
madflame991··on Stockfish 14
How do you figure out they're using an engine? Are there obvious human moves and AI moves?
madflame991··on Why are people suckers for the Myers-Briggs, Zodiac signs?
Yes - for whatever reason we really like to get our own label and wear it with pride. I would be very curious to find out if we actually try to fit into this newfound label if we knew about it from an early age. When I was young members of my family told me what sun/zodiac sign I am and kept explaining my behavior from that perspective - I actually enjoyed it and believed in it and (annoyingly enough) I now fit the description; wish I knew if this is pure coincidence or something I managed to embed within myself - there must be some studies out there on this issue
madflame991··on Hackers breach Electronic Arts, stealing game source code and tools
Was thinking the same - companies are extremely protective of their source code. How many games out there truly have unique/interesting/hard tech in them? I can think of Spore; I can think of a handful of rendering engines, maybe Stalker, Wow of course but not many more than that
madflame991··on Windows 95 – How Does It Look Today?
You don't need an fpu at all to draw those bezels do you?!
madflame991··on Cambridge Bitcoin Electricity Consumption Index
That would depend on how much heat the computations/mining itself generates - has to be some - and the total effort to make graphics cards or other hardware for a lot of clients that would not really exist if crypto wouldn't be a thing
madflame991··on An additional non-backtracking RegExp engine
Now I'm genuinely curious: I want to see the fancy features used when writing a regex for floating point numbers :)
madflame991··on More challenging projects every programmer should try
I do not understand this reasoning and divide between student and post-student for lack of a better word. I have math/cs education, have worked both in startups and big companies, in the front-end, rendering and ai in the (“serious”) game industry. I have always worked on exactly these sort of educational projects on my own and it’s a complete joy: git client from scratch - yep, useless, but extremely educational, jit for befunge - same, etc etc. I am extremely happy people still engage and do “useless”stuff and HN is for me a big inspiration in that sense.
madflame991··on Wild Horses Can’t be Broken: Zebra Domestication Attempts (2014)
The catch is that friendly foxes don't look that foxy anymore; friendly zebras might lose their stripes at which point they kinda look like donkeys
madflame991··on Ask HN: What are the best MOOCs you've taken?
None at all. Automata are used to turn a program from its textual form into some manageable data structure that something else will consume (actual interpreter/optimizer/compiler). At some point in the course (in the racket part) you will be asked to implement an interpreter for MUPL (made-up programming language), but the programs are directly written as a data structure - so no need to parse; in racket both data and code look exactly the same - it'll be a breeze.

I think the only requirements for this course is some plain procedural language (C/Pascal).

madflame991··on Ask HN: What are the best MOOCs you've taken?
> It changed the way I learn any new programming language.

I can say the same and I can offer my reasons: until this course I saw every language like a little island; after this course I understood that programs are just a collection of features: various typing systems, static/dynamic scoping, lazy/eager evaluation, etc. It's a ton easier to learn a new language by identifying these features than by looking at a language as a big blob. This also made me realize that languages are not little disjoint island - they're overlapping a lot instead.

The course was the way I got into racket and other lisps and this allowed me to read SICP. Since then I've been doing all sorts of toy interpreters/transpilers for fun and it allowed me to get an idea of what's happening behind the scenes in real languages. For example, I used to think that closures are magical, but after implementing them as part of the course they were a piece of cake afterwards. You will get a profound satisfaction when you implement call/cc yourself and suddenly you understand how try/catch or generators work.

madflame991··on Maybe you don't need Rust and WASM to speed up your JS
> WASM isn't about performance. It is about writing applications in any language and importing those applications into an island in a web page.

You don't really need wasm for that, do you? Anything compiles to JS nowadays and you'd actually get easier access to the DOM and GC and support for source maps (are those working for wasm yet?)

madflame991··on How to write a CHIP-8 interpreter
CHIP-8 is by far the easiest emulator project you can start with, but be wary - chances are it won't work perfectly from the get go and you'll end up writing an assembler, disassembler and debugger. There are tons of documentation and implementations out there to help you out.

I wrote one[1] some time ago and it's very rewarding to pop in random games and see how badly they perform on your faulty/incomplete "machine" (ex: tetrominoes not dropping in tetris because the hardware timer was not implemented).

[1]: http://adrianton3.github.io/chip8/src/assembler/assembler.ht...

madflame991··on Amazon Sumerian: A way to create VR, AR, and 3D experiences
I'm one of the original devs of Create and yes, they are the same except for the name/logo.
madflame991··on Is software development really a dead-end job after age 35-40?
Why would JS be less long-term-valuable? It's only 4 years younger than linux, it's more common than linux and has a much larger community (especially compared to the linux kernel driver one). I don't see either going anywhere in the next 20 years.
Page 1 of 2Next →