HNHacker News
TopNewBestAskShowJobs

duck2

137 karma · joined September 29, 2016

quack hack duck2.tech
submissionscomments
duck2··on Photorealistic Path Tracer
The path tracer is impressive, doing it in a month's worth of work is impressive too :) I took a ray tracing course in second grade, and had to leave everything else and write ray tracers during the term.

And, as an item of nostalgia, here is some of my glossy mirror code:

  if(matl->t == M_GLOSSMIRROR){
      double θ0 = acos(cosθ), Δθ = M_PI * matl->rough / 2, lθ, dθ = 2*Δθ/ray->w, dφ = 2*dθ, θ, φ;
      lθ = (θ0 - Δθ) < 0 ? 0 : ((θ0 + Δθ) < M_PI ? (θ0 - Δθ) : (M_PI - 2*Δθ));
      θ = lθ + (p+RAND1)*dθ; φ = -2*Δθ + (q+RAND1)*dφ;
      v4 z = hit->n, x = norv4(subv4(ray->p, scv4(dotv4(ray->p, z), z))), y = crv4(x, z);
      ...
duck2··on The Bitter Truth About Olives (2016)
My grandma has an olive grove. When I last visited her, she offered me a jug of cured olive. I told her I find cured olives still bitter. She seemed very surprised and said she can't taste anything but olives recently. Maybe she leaves them a little bitter, because the bitterness is very "tasteable".

I find it interesting how olive is praised in places it's planted. It's not just my grandma who adores olive. If you chat with anyone from her town for enough time, they will surely bring the subject to olives, cured olives or olive oil.

What's even more weird is all abrahamic religions mention olive in their books.

duck2··on Do I really need to get out the soldering-iron again?
Two 9V batteries and four op-amps for a low-current output buffer seems like overkill. does anyone know about a better way to go about it?
duck2··on Compiler basics: Lisp to Assembly
The article is about "compiler basics", but it never mentions PLs are parsed according to context-free grammars, let alone giving one. Just throws a bunch of code and says "yeah this'll parse it".
duck2··on Show HN: Ultimate Plumber – a tool for writing Linux pipes with live preview
A rare sight, another user of Acme on HN!

You know it probably, but there is also a mouse chord for piping selected text into a command. (2-1)

duck2··on Why Use an FPGA Instead of a CPU or GPU?
I recently installed Altera Quartus on Debian for a school project. It kept crashing after 2 seconds.

First result on google says quartus uses its own libcurl which is broken and you should copy the OS libcurl to /opt/altera/quartus/lin64/lib/whatever. Lots of issues like this.

duck2··on Tanium is facing employee unrest and an executive exodus
why downvote? this is just some anecdotal data provided. no strong claims, no offensive phrases.
duck2··on The Linux Foundation: Not a Friend of Desktop Linux, the GPL, or Openness
I think there are dwm.exe replacements for Windows. See bblean[0].

[0]: http://bb4win.sourceforge.net/bblean/

duck2··on The Linux Foundation: Not a Friend of Desktop Linux, the GPL, or Openness
The tone of the article is very disturbing. I would think not supporting the GPL is a deadly sin if I did not know about open source licenses.

Furthermore, as it is mentioned, one person's article does not automatically determine the foundation's stance, especially if they "quietly removed" it.

Are there FSF snipers waiting around for anyone pointing out that their license is viral and restrictive?

duck2··on Open Source Needs FPGAs; FPGAs Need an On-Ramp
Xilinx ISE does give the notion of raw concrete.
duck2··on The Mandelwat Set
Recently I was fiddling with Julia sets. I find the HTML5 canvas quite comfortable to work with, and after implementing the renderer as a WebGL shader, it was a snappy update/refresh/get feedback loop.

Javascript is a nice hacking tool if you keep it in the browser.

duck2··on Principles for C programming
You can just use stdint types. Or is it really better to typedef a CUTE_INT?
duck2··on Principles for C programming
There is quite a lot of GNU code written in C.

However, since gnu is a political umbrella project which does not necessarily value code quality, we see a lot of unnecessary complexity arising from the focus on creating working "free" software and not minding the quality much.

Anyone who ever touched GNU autotools will confirm that the bloat issue is real. No need to be a diehard C head.

duck2··on What happened to Python?
The cases are different.

It was the original maintainers who forked MariaDB off MySQL over a concern for software openness, which sounds like a good reason to fork.

A python2.7 fork will have no reason other than "We don't want to use the new version of the language". I doubt if any Linux distros would replace their python2.7 package with the fork, even after the EOL of 2.7.

duck2··on What happened to Python?
The thing here is you cannot use the name Python with the fork. Think about Iceweasel but without Debian's community.

The new Python fork would have none of Python's fame and it would need some push to solve the chicken-egg problem. Why fork and maintain a huge code base when nobody will use it?

duck2··on Using Vim as a Python IDE
That looks very doable in acme[0].

[0]: https://research.swtch.com/acme

duck2··on Tim Cook assures employees that Apple is committed to the Mac
I have surfed through distros, desktop environments and window managers for nearly a year.

My equillibrium point is suckless.org's dwm[0] with all defaults except using Terminus as font and Super(windows) instead of Alt key. ~6 months, no irritation, no configuration change.

Tiling window managers which have extensive configuration options are useful as tinkering material, but not actual working environments. If you want a tiling window manager not for eye appeal and beauty but for simplicity and ease of use, look at r/unixporn/ and use whatever they are not using.

[0]: http://dwm.suckless.org/

duck2··on I am not a self-made man
s/flawed/sociopathic/
duck2··on Show HN: Ndm – Npm Desktop Manager
Next: Nwm- Npm window manager based on Electron. Works on Mac and sometimes Ubuntu.
duck2··on Configuring a High Interactivity SSH HoneyPot
> It is likely with these tell-tale signs and strange configuration not many hackers will stumble across the host, and if they do they’ll probably quit our right away.

This got me thinking about setting all my hostnames to "honeypot" and randomly printing fake HonSSH logs in all SSH connections.

Security by... mimicking?

duck2··on JEP 295: Ahead-of-Time Compilation

    functional, oop
Do these have any intersection except Scala?
duck2··on You might not need JavaScript
In this demo yes, however I have seen CSS image sliders with buttons which happily sit on the back button.
duck2··on You might not need JavaScript
The issue with CSS sliders is that they mess with the browser history.

I expect my back button to open the previous page, not to move an image slider.

duck2··on “I just want to run a container”
I don't see why systemd is at the core of all those graphs. Why do we need that particular program to run containers? Or does systemd mean, in this context, "any daemon-controlling process"?
duck2··on Alpine Linux 3.4.4 released
Well I did not know dash is debian almquist shell, thanks.

However the Wikipedia page says the standard login shell is still bash for Debian and Ubuntu, while Alpine uses ash all around.

duck2··on Introduction to 9front
If only I could get it to drive one of my three NICs...

Then the only remaining concern would be running JavaScript. mothra is nice but god-browsers are teh standard now.

I have always seen playing with boot.ini and aux/vga easier than messing with xorg.conf. Switching from something keyboard-driven like i3 or dwm, rio would cause some upset but it does not take much time getting used to- come on, you just click and drag. I also find acme a lot more convenient than vim or emacs and regularly use it on Linux via plan9port.

duck2··on Alpine Linux 3.4.4 released
I tried Alpine as my desktop around 4 months ago, but the documentation felt very insufficient. Just to install Firefox I had to change my repository URLs, and this wasn't mentioned anywhere, I only found out when I searched for the Firefox package to see where it is- "testing".

Furthermore the built-in Lynx does not have HTTPS support, so you cannot read "How to get regular stuff working"[0] before magically switching to the testing repository and installing Firefox. Not to mention that article is essential if you want to compile Lynx with HTTPS enabled. (the gcc pkg is not dependent on build-base and just doing apk install gcc won't result in a working gcc)

Having said that, the choices of OpenRC over systemd, busybox ash over [insert bloated shell here] and musl-libc over glibc are remarkable. Also xorg-base-install(or something like that) and similar scripts are very useful and definitely helped me get going.

0: https://wiki.alpinelinux.org/wiki/How_to_get_regular_stuff_w...

← PreviousPage 2 of 2