Windows 10's new Edge with Chromium browser preview builds drop today - <AUTHOR> https://www.windowscentral.com/microsoft-releases-first-chromium-edge-previews-windows-10 <comment><AUTHOR> A Powerpoint presentation outlining technical details including the 60 or so Google features removed/or changed. [https://onedrive.live.com/view.aspx?resid=40AD2A59FD334E8C!4...](https://onedrive.live.com/view.aspx?resid=40AD2A59FD334E8C!400130&ithint=file%2cpptx&authkey=!ADAerq8JH6E4yRA) (enable speaker notes for aditional details)

</comment><comment><USER2> I don't get why this wasn't done for the Edge V1 rather than making a whole new browser. I felt like this was the clear choice back then.

</comment><comment><USER3> I'm writing this on the Dev version right now, and it feels great so far!

The reading list is not implemented in this build, but I hope they add it back...

<comment><USER4> I have a lot of doubts on... any Edge features actually surviving into this Chrome reskin. They've decided not to implement eBook support, which yes, meant they couldn't sell eBooks anymore, but also effectively removed native EPUB support from Windows entirely, which was a pretty nice feature to have.

<comment><USER5> Edge's EPUB and PDF tools were available as a separate app call "Reader" in Windows 8 (mostly just for choice of workflow it seemed, but also maybe because it wasn't certain that Edge was going to "own" them), which was discontinued in Windows 10 when Edge took full ownership. I very much hope that if the Edge team can't/doesn't re-embed the PDF and EPUB views into Chromium-based Edge, at the very least they could give us a new version of "Reader", because it is so handy to have an inbox EPUB and PDF application in Windows.

<comment><USER4> Did Reader do EPUBs? I thought it was just for PDFs, which I presume the new Edge will support (as Chrome does).

<comment><USER5> I remember it supporting EPUBs, but memory may be faulty here. In my defense, Reader survived longer than I think most people realized because it stopped being a default installed app pretty quickly (I think 8.1 did that, IIRC), and it still ran in Windows 10 for quite some time (if you had previously installed it) before it was shutdown for good. It may have been during that weird period on Windows 10 before it was entirely shutdown.

That said, the core point still remains that hopefully even if Edge doesn't continue to support EPUBs they might spin it out into an app.

<comment><USER4> If they had any intention of doing that, they wouldn't have decided to refund everyone's eBooks they ever purchased since they started selling them. That's a move that only makes sense if they are completely removing the functionality.

<comment><USER5> Not necessarily? Groove shutdown all of its online services in March but Microsoft is planning to leave it as the inbox offline player for the time being (even if it is just a sad shell of what it once was and dedicates a bunch of real estate to remind you that everybody else moved on to Spotify). The Ebook Store used an online service for DRM, plus all the various Store services themselves. It's certainly plausible they might shutdown all the online services and still provide an "offline only" non-DRM reading app.

Rebuilding Edge's Reading View _is_ on the Focus Areas list for Edge-Chromium, so depending on how the EPUB system was built maybe that's just included in the Reading View rebuild. Certainly, if people provide it as feedback that it is something that people want, I expect they will consider what they can do. It even sounds like it may be the sort of thing that _this_ Microsoft could also make an open source Chromium extension and let Chrome users have access to it as well.

<comment><USER4> The reason Microsoft's online music service shut down, was because it had recurring licensing costs that weren't sustainable based on the amount of business it did. The eBook model is much closer to how apps are sold, it cost them near nothing, and as it is integrated with the Windows Store platform which remains for selling apps. They have no need to shut down their eBook service, if not for the fact that they are eliminating the only way to read their eBooks.

Bear in mind, even when they shut down music, they didn't buy back everyone's music, because people could play their MP3s still with the desktop player or even alternative music players, whereas Microsoft's EPUBs use at the least their own licensing system, since they changed the file format to MSEPUB and have a separate license file for each. The only player is Edge, and Edge as it has been is going away.

While we don't know the extent of Microsoft's eBook sales to begin with, a full refund since the launch of service is generally the sort of thing you don't do unless there's no other option. If they had intention to continue eBook support, they'd surely have chosen to fast track EPUB support in Edgium instead.

<comment><USER5> (For what it matters, in March Groove also shutdown their OneDrive support because something about the OneDrive API was changing. Presumably no recurring license costs involved there, just old fashioned tech debt when using cloud services.)

DRM is literally all about licensing costs. Even if they were licensing the DRM tech from themselves, that was a licensing cost on the books, and it is entirely possible that that overhead was enough to close the licensing servers. That's before you get into whatever details of whatever contracts they were using to license the books from the various publishers.

Continuing to support DRM-free EPUB in someway or another is entirely orthogonal to continuing to run DRM license servers. It's very clear they no longer intend to run the license servers. It remains to be seen if they have interest in DRM-free EPUB viewing.

Also, Edge isn't going away soon and Edge doesn't seem to be related to the store shutdown, it seems to be license/cost-related. The previews for Chromium-based Edge are out now, but the switchover isn't expected for months or years from now. I'd be hugely surprised if the switchover deadline is any closer than Windows 20H1. There's no need to fast track EPUB support in Chromium-based Edge because Chromium-based Edge doesn't itself appear to be on a fast track for Windows.</comment></comment></comment></comment></comment></comment></comment></comment></comment>


Feynman explains why school textbooks are bad - <AUTHOR> http://www.textbookleague.org/103feyn.htm

<comment><USER2> I read this and found it fascinating...

But I think Feynman might have been incorrect in regard to number bases:

"Translating from one base to another is an _utterly useless_ thing."

I use number bases (base 2 and base 16) every day.

</comment><comment><USER3> If this is new to you, ask yourself this question :

Why haven't I read "Surely You're Joking, Mr. Feynman!" ?</comment>


The Myth of the Unlimited Vacation Policy - <AUTHOR> https://medium.com/the-rime-of-the-digital-mariner/the-myth-of-the-unlimited-vacation-policy-7fbdb5f02770#.hxed4covd <comment><USER2> Indeed. It's a means of weaponising ambiguity into guilt. Everyone knows it's not unlimited, because you can't take 3 months off. But because there's no boundary, the real limit has to be found by stressfully, riskily probing it. Then there's plenty of room for favouritism in who's actually allowed to take the time off.

See "Tyranny of Structurelessness", etc, etc.

</comment><comment> finance-geek Some of the nefarious reasons in the article and comments may well be true -- but there is a simple accounting reason for "unlimited" vacation policies -- companies do not need to pay workers for accrued vacation days un-taken.

In some states and countries, use-it-or-lose-it policies are not legal, so employees always accrue the days, often carrying them from year to year. It is a bit unfair since the employee leaving hits the company with a big payout (though the payout is just payout that should have happened long ago.) On the other hand it is very fair, as i've been stuck in some companies where my boss would not let me take vacation, so the payout was the least they could do.

<comment><USER3> _" It is a bit unfair since the employee leaving hits the company with a big payout"_

Paying out for unused vacation days is the only fair thing to do. After all, the company got all those unused vacation days as extra work days.

<comment> finance-geek I noted it was unfair because when the employees leave, the cash-out happens at the employee's final salary (which may be larger (even 2x!) the salary at the time of accrual)

</comment></comment></comment><comment><USER4> At a previous company with a "no vacation policy" policy, I found I was more liberal with my odd Friday off to go skiing, and more likely to work remotely one or more days on my actual vacation.

Today, with a normal PTO accrual system, I find myself very aware that a day of vacation costs me $500 in lost paid out PTO. That makes a semi spontaneous Friday on the mountain more expensive than I'm comfortable with. It means that when I'm bored over the year end holidays at my in-laws home I don't do any work even if I feel like it because I don't want to waste my limited PTO.

Honestly, I'd rather ski more and have semi-working vacations. Not all the time, but often.

<comment><USER5> "Today, with a normal PTO accrual system, I find myself very aware that a day of vacation costs me $500 in lost paid out PTO."

If you have a cap on how much you can accrue, which is pretty typical [1], that's not true. Once you hit the cap, you'd still lose the days; thus, they are a sunk cost.

The only days that cost you are any days that would be paid out at the end of your employment, and even _that_ really only matters if you're going to roll from one job into another in less than the number of days you were paid out at the end, otherwise it's still just a rearrangement of a constant number of paid days and unpaid days.

Good news: You probably don't need to conceive of paid vacation days as being "changed" against you.

Not wasting your limited PTO remains a concern, of course, but as with so many other things "unlimited" isn't truly on the table either, so....

[1]: I hear tell of rumors that accrued vacation time is somehow taxed at year's end in the US, but I've never quite heard someone lay out the accounting and tax details. If you know them I'd be interested to hear it.

<comment><USER4> > If you have a cap on how much you can accrue, which is pretty typical [1], > that's not true. Once you hit the cap, you'd still lose the days; thus, they > are a sunk cost.

It's not a sunk cost at all. It's only a sunk cost once you hit the cap.

In the current SF engineering culture the average tenure at a company is around 18 months. Most caps are about the same timeframe.

Leaving and cashing out PTO is a very common occurrence. Getting acquired also results in PTO being cashed out.

>The only days that cost you are any days that would be paid out at the end of your employment, and even that really only matters if you're going to roll from one job into another in less than the number of days you were paid out at the end, otherwise it's still just a rearrangement of a constant number of paid days and unpaid days.

The paid out PTO is a "sunk windfall". Every day you choose not to work between jobs costs you regardless of whether you had any PTO paid out.

</comment></comment></comment><comment><USER6> Like unlimited free food/snacks, a ping pong table, nap rooms, and many other "unbelievable" office amenities, the unlimited vacation policy seems cynically designed to keep you in the office as long as humanly possible.

</comment><comment><USER7> Obviously this is just anecdotal, but I work for a company with an unlimited vacation policy, and I've actually enjoyed it. I probably average 4 weeks of vacation per year, which is what I had in my previous (non-unlimited) job. But, now if I want to take more vacation one year and less vacation another year, I don't have to worry about whether my plans fit into whatever arbitrary limitations my employer might impose.

I've also never had a vacation request denied, and nobody has ever given me any crap about taking too much time off, although not everyone does take as much vacation as I do.

I'm sure there are companies and situations where "unlimited vacation" does end up translating to "no vacation", but I feel like a lot of the complaints about unlimited policies stem from people who are overly insecure about their careers. If you do good work and are a valuable asset to your employer, nobody is realistically going to fire you for taking an extra week off now and then.

</comment><comment><USER8> I think it stems from the limit imposed by the number of days elsewhere; since the days don't carry forward (or if they do, not all of them), you HAVE to use them, which creates incentive to take vacations or you miss out.

And just like anything else unlimited, having it available without pressure to use it is kind of like a gym pass, you COULD go, but do you really want that hassle just yet?

<comment><USER9> Supposedly "unlimited" vacation with an annual required contiguous minimum can work. "Must take at least two weeks off sabbatical at least once a year." I would imagine you have to be careful to keep that "required minimum" from feeling more like a punishment than a necessary pressure release valve, as with any "mandatory fun" requirement.

</comment></comment><comment><USER10> Unlimited with a minimum would be better since you'd have a lower bound and everyone would get at least a sane amount off.

In the UK though we get good mandatory holiday days for FT employed.</comment>


Oculus Quest - <AUTHOR> https://www.theverge.com/2018/9/26/17906298/oculus-quest-santa-cruz-standalone-vr-headset-price-shipping <comment><USER2> I'm fine with VR for a while. We're not there yet.</comment>


Show HN: ACME Let's Encrypt client – binary releases, works like 'make' - <AUTHOR> https://github.com/hlandau/acme <comment><USER2> I've converted several projects over to Caddy[1] and been very happy with it. Caddy is a web server with Let's Encrypt integration built in. Your config can be as simple as:

      example.com {
        root path/to/root
      }

And Let's Encrypt will automatically be used. It's amazingly simple.

I wonder if in the future we'll see things like mod_acme that automate Let's Encrypt into other servers.

[1] [https://caddyserver.com/](https://caddyserver.com/)

<comment><USER3> Let's keep things orthogonal. I don't want to be "forced" into using one particular webserver just because it supports one feature better than another.

<comment><USER2> Sure, Caddy is pluginable, so it is orthogonal, LE just happens to be baked in and easy to use. I wasn't forced to use it, it has several compelling features (like git integration with GitHub webhooks [1]) and LE was one of them.

Presumably we'll start seeing tighter integration with other web servers, why can't there be a mod_le that automatically downloads certs from LE? And why wouldn't you want that?

[1] [https://caddyserver.com/docs/git](https://caddyserver.com/docs/git)

</comment></comment></comment><comment><USER4> Shouldn't something called Acme work more like mk than make?

Good work and good ideas though. I haven't looked at the Python client, but it seems like there may be some valid points here.

</comment><comment><USER5> I'm a bit confused about the "non-root support" \-- the (somewhat lengthy) setup manual absolutely seems to require root to set up users and directories in the root filesystem.

In contrast, the official client can absolutely work without having root access. You can install it locally (pip install --user letsencrypt) and change all working directories to paths your user can write to using a configuration file.

<comment><USER6> Some people don't want to run a client as root because they don't want to increase their attack surface or don't trust the software to that extent. The purpose of the non-root manual is to allow people to take understandable steps as root to enable the client to operate not as root.

It should be possible to use the client without having root access, by passing --state (and perhaps --hooks) to use a state directory you control.

<comment><USER5> Ah, cool - I will try it then.

My motivation for not requiring root is shared hosting: I have a regular user witch access to an Apache webroot directory. They didn't fully automate Let's Encrypt, but they provide a script which installs certificates for the central webserver. So I have to download and run any ACME client myself to get my certificates.

</comment></comment></comment><comment><USER7> I wouldn't use pre-compiled binaries when it comes to certificates...

I would read the source code and compile ($ go build) it.

<comment><USER8> Agreed; trusting a binary distribution for what is a security measure seems a bit weird...

<comment><USER9> It depends a lot on the source of the binaries.

</comment></comment></comment><comment><USER10> I'm curious - why is the LISTEN option only useful in development?

<comment><USER11> It takes over port 80/443.

<comment><USER10> Oh, now I understand. I wonder why Let's Encrypt/ACME servers aren't able to make the verification requests on some other port.

<comment><USER12> Control over a nonstandard port on a server doesn't necessarily mean that you control the web server on :80 and :443 of that host. For example, a nonprivileged user can listen on :8443 and get a cert.

<comment><USER10> Well, there are ports that require root to bind to that aren't 80 or 443. That being said, I guess it's relevant here that Let's Encrypt only supports certs for HTTP use cases.

<comment><USER13> Which leaves the question which one to occupy instead. There was the suggestion on the mailing list of officially getting an acme-port reserved, but I don't remember if there was any follow-up.

<comment><USER6> The problem is not all systems are *nix. Windows doesn't enforce the <1024 port restriction. The advantage of using port 443 I suppose is that it's so commonly used it'll probably (maybe) be tied up with one service or another when it comes to any important host. I guess. But really it's all guesswork and hope when it comes to deciding how to validate host control.

</comment></comment></comment></comment></comment></comment></comment><comment><USER14> The official let's encrypt client will happily not modify your configuration, too. I don't understand why being distributed as a binary is important.

</comment><comment><USER15> I don't understand. What is the purpose of this tool?

</comment><comment><USER16> 'Supports any web server

does this work with azure ASP.NET?

<comment><USER6> I'm not familiar with Azure. But assuming you're running ASP.NET on Windows, no. Windows support is explicitly not an objective of this client; I designed it to fit well in a UNIX system. There are probably issues with filesystem transactionality, with regard to the state directory format, and suchlike, which would be hard to port.</comment></comment>


An audio format for creative DJing - <AUTHOR> http://www.stems-music.com/

<comment><USER2> Why define a new AAC subvariant and not use an existing (and actually unencumbered) multitrack stem format like mogg that's been around for for a decade now?

<comment><USER3> So that the files are playable in any audio player that supports MP4.

<comment><USER2> Actually you mean exactly one player: iPod/iPhone. To play nicely with apple, you have to fork over the $2.50/copy. Ah well.

(Almost everything else currently using stems is mogg-based given the per-unit royalties for MP4 software support)

<comment><USER4> AAC is played by many devices, it's not an Apple standard, and the licensing fees are less than MP3.

<comment><USER2> Apple is one of the few vendors that supports AAC in exclusion of other formats (and, eg, ALAC in exclusion of FLAC, etc). And no, actually, AAC's declared licensing is considerably more expensive than mp3 (partly because AAC is a bundle of quite a few different codecs that share the same name).

</comment></comment></comment></comment></comment><comment><USER5> According to that description, the format contains 4 separate tracks that together make up the song. How did you settle on 4 tracks?

<comment><USER6> Most tracks can be split up into four distinct components: drums, bass, melody, and vocals. Of course, they could have taken it a step further, by splitting a track up into its individual instruments, but I doubt that would be very usable in a live performance setting (although some performers actually do go this route, usually relying on software such as Ableton Live for this purpose).

The four channels are also quite similar to the EQ section of a DJ mixer which generally controls three frequency ranges (low, mid and high). EQ-ing is heavily used to mix songs together, so by sticking to a similar interface, DJ's can easily pick up this format.

<comment><USER7> I'm more of a "for fun" DJ (occasional parties, events, but mostly just my basement) but I'm tempted to try mapping the 4 stem tracks to the 4 knobs on my basic controller (gain, high, mid, low) in Traktor since it apparently supports the format. Probably not something I'd want to have permanently enabled but an easy way to play around with it. I guess if I wanted to map a key to toggle between EQ and stem track levels it might work.

</comment></comment></comment><comment><USER8> 1\. Why oh why is 'there are 4 tracks' hard-coded into the format? What a perverse limitation. I understand there has to be a limit if you want hardware players to mix in real-time but 4 seems too low and Stem v2 will probably be needed next year to get round this.

2\. This seems like a wasted opportunity in terms of adding extra features that wouldn't complicate implementation terribly much. Tracks could allow time offsets and repeats - you've then got a loop-friendly pseudo-tracker file format at very little extra cost.

<comment><USER9> 1\. When you DJ, your main resource is attention — and while I have experience with Ableton live sets, trying to juggle more than 4 channels of a track that you sometimes heard once or twice before is not a very good idea, tbh. Also, Stems format was created by NI after they already succesfully creates Remix Packs format, and in my experience, 4 channels that Remix Packs have is quite a good balance — not to say that all NI Traktor gear is created for 4 channels in mind.

2\. Once again, extra features not only complicate implementation, but also user experience. What exactly would you be able to do with time offsets and repeats that you can't do with Traktor's deck looping and loop recorder already?

<comment><USER10> > trying to juggle more than 4 channels of a track

sounds more like a tooling problem, stems should be able to be grouped by type with little effort (e.g., all the drumish things visually represented as one fake stem)

<comment><USER9> First of all — no, it's an attention problem. I've used APC40 in a live performance once, but in live perfomance (where you play your own music in more or less pre-determined fashion), unlike the DJ set (where you play other people's music, changing the playlist dynamically according to the crowd), it's easier to manage. Apart from monitoring the crowd, searching the next track, marking it and pre-listening (because unless it's in the hundred or two hundreds of tracks you know by heart, you may not know what's the best point cue it it and how), playing with FX, letting the photographer park his backpack under your table, answering to some random question by the manager, you also should have some amount of your attention on reserve, so that when some unforeseeable shit happens, you won't butcher up the mix and people stay entertained.

Regardless, if you already want to group the "drummish" stems, then why would you want to deal with the separately in the first place?

</comment></comment></comment></comment><comment><USER11> I get it that NI is mostly pushing this for the "creative DJ" market but I wish it was 8+ tracks and they got majors onboard to release stems of older music.

There are a bunch of leaked multitracks on the internet, everything from Metallica to Stevie Wonder and Michael Jackson - and they're really interesting to listen to and play with.

The original multitrack tapes are fast becoming degraded and lost so would be fantastic if there was commercial motive to archive/digitise them.

<comment><USER6> NI's products such as the S8, D2, F1 and X1 are mostly targeted at DJs playing electronic music, particularly house and techno. Genres where there's a lot of room for live experimentation with many different layers, due to the easily quantisable nature of the music. I doubt they had Stevie Wonder and Metallica in mind while developing this ;)

For production purposes you'd probably want a lossless file format anyway.

</comment></comment><comment><USER12> This looks awesome. Ever since I've been DJing, this separation of components is what I have been wanting to play with.

</comment><comment><USER13> The 4-track limitation is stupid. Splitting a track into drums, bass, vocals, and melody instruments is definitely useful for a lot of purposes, but it's limiting for real in-depth remixing. Why not make it unlimited?

<comment><USER14> The 4-track limit means you can build a hardware DJ controller that supports stems. It also means your software doesn't have to have a crazy unlimited- track interface. 4 tracks is the sweetspot where you can actually build usable products around this for live performance.

Clarification: When I say build hardware, I mean design a usable hardware interface for mixing 4 stems. I don't have to guess what audio is on what track. Imagine what a nightmare it would be if every stem had a different number of tracks and you were trying to DJ live with them.</comment></comment>


GNU Awk 5.0 - <AUTHOR> http://lists.gnu.org/archive/html/info-gnu/2019-04/msg00002.html <comment><USER2> In 2016 I fuzzed awk and found a bunch of segfaults. Sadly it seems still not fixed:

          $ ./bin/gawk -V | head -n 1
          GNU Awk 5.0.0, API: 2.0

          $ ./bin/gawk 'for (i = ) in steve kemp rocks'
          gawk: cmd. line:1: for (i = ) in steve kemp rocks
          gawk: cmd. line:1: ^ syntax error
          gawk: cmd. line:1: for (i = ) in steve kemp rocks
          gawk: cmd. line:1:          ^ syntax error
          gawk: cmd. line:1: fatal error: internal error
          Aborted (core dumped)

I'll have to forward bugs from the Debian-tracker to the maintainers directly I guess.

<comment><USER3> Did you try to contact directly Alfred, Peter or Brian? :)

<comment><USER2> I reported to the Debian bug-tracker where I assumed it would either be forwarded upstream, or be searched by the project authors:

[https://bugs.debian.org/816277](https://bugs.debian.org/816277)

I appreciate that most of the time reporting directly is the right thing to do, but often there is a good relationship between packager and developer and things flow well in both directions.

I guess I should make sure I chase old reports and reroute if they seem to be orphaned/ignored/overlooked.

<comment><USER4> From [https://www.gnu.org/software/gawk/](https://www.gnu.org/software/gawk/): "Bug reports and feature suggestions for gawk should be sent to bug- email@example.com."

Maybe try sending an email? I agree that reporting to the Debian packager often works, but in this case it's possible they just have too many things to triage appropriately.

<comment><USER2> Dropped a mail there now, thanks.

Edit: Too late I see it was already reported before the release and apparently wasn't regarded as significant:

[http://lists.gnu.org/archive/html/bug- gawk/2019-04/msg00015....](http://lists.gnu.org/archive/html/bug- gawk/2019-04/msg00015.html)

I guess that means no fix.

</comment></comment></comment></comment></comment><comment><USER5> Congratulations and thank you! Namespaces are a big help for me personally.

From the GNU Awk 5 manual: A qualified name consists of a two simple identifiers joined by a double colon (::). The left-hand identifier represents the namespace and the right-hand identifier is the variable within it.

Namespaces are a big help for writing libraries, especially for clients with systems (e.g. banking, government, education, medical) where awk code is fine yet other kinds of languages (e.g. python, go, perl) are not available and/or require management audit practices.

<comment><USER6> Why would awk not require audit and code management practices vs those other languages in a controlled environment?

<comment><USER7> I took it to mean that getting support for those languages would require management audit practices i.e. "why are we installing a new package on all of our servers?". In that case, awk would be better since the gnutils are much more likely to already be installed and in use. The resulting awk code would still probably fall under code management.

<comment><USER8> Go, you mentioned, does not require package to be installed. It compiles to a single, native binary.

<comment><USER9> If the place you worked at was backwards enough you may not be able to install a Go compiler on your desktop. Anything is possible when the people making the rules are disconnected enough from the people getting the work done.

<comment><USER10> This. If I want anything installed it requires survey from IT and Legal and can take months.

If it is Java or C# and already in-use, it is pretty simple. If I wanted to install a Go compiler, it could get complicated. Not having Admin rights really slows down an organization. Especially if you're someone who likes to use multiple technologies (right tool for the right job). IT hates that. Note that I don't write production tools, just things to get my job done quicker (automation scripts, data analysis...etc).

<comment><USER11> always assumed all those organizations stayed in the 90s

not figuratively

</comment></comment></comment></comment></comment></comment></comment><comment><USER12> I remember the days when I was working in a data company and one of the product check tools was a 2000 line GNU awk script with some korn shell in the mix. It was both scary and awesome at the same time..

</comment><comment><USER13> I wonder if the new namespaces functionality will break compatibility for users. I guess I always assumed gawk was feature-complete, or at least a mature enough tool that I wouldn't expect compatibility breaks.

        11. Namespaces have been implemented! See the manual.  One consequence of this
            is that files included with -i, read with -f, and command line program
            segments must all be self-contained syntactic units. E.g., you can no
            longer do something like this:

                gawk -e 'BEGIN {' -e 'print "hello" }'

</comment><comment><USER14> It's not entirely clear, but I believe that some of these changes, namely namespacing, may impact compatibility with POSIX awk[1] (as shipped on BSD, macOS, etc. al.). Historically, GNU awk has been a strict superset of "standard" awk. I for one am concerned that this may impact portability of awk based scripts between platforms using gawk and other implementations.

It could be that I have missed a detail and this isn't really the case; I also certainly don't want to discourage progress, but there is something to be said for being able to write an awk program once and be confident it will work on any POSIX-ish system, rather than only those with a GNU userland.

1 - [http://pubs.opengroup.org/onlinepubs/9699919799.2018edition/](http://pubs.opengroup.org/onlinepubs/9699919799.2018edition/)

</comment><comment><USER15> Amazing how long gawk has been around, and still with the same maintainers.

My port of gawk to MacOS in 1990/91 was my first active involvement in open source. I was rather crushed when told that my patches would not get accepted, because RMS at the time had a Fatwa against accepting MacOS code in GNU projects, and, though the gawk maintainers were quite civil about it, it was clear that they would not go against RMS' wishes.

Shortly afterward I discovered perl, so I never did all that much awk, and when a few years ago, I decided a 5 line awk script was the most elegant way to solve a configuration problem, my coworkers vetoed the plan.

</comment><comment><USER16> Does anyone know a good awk tutorial or book?

I kind of skipped over it in my journey into the world of Unix... I usually either (bash shell scripting, tools like cut and grep + pipes and redirection) or use python.

<comment><USER17> [https://news.ycombinator.com/item?id=13451454](https://news.ycombinator.com/item?id=13451454)

The Aho and Kernighan book is amazing.

<comment><USER18> I have a rule of thumb that I'll buy and read any book which Kernighan is an author of regardless of subject. He's more or less the gold standard of technical writing for me.

</comment></comment></comment><comment><USER19> Assuming the syntax is $name::spaces it could look like Awk borrowed something from Perl, which is a funny full circle.

</comment><comment><USER20> Congrats! Long live {,g}awk !

</comment><comment><USER21> _Differences from gawk 4.2.1 are not available; they would be too large._

That's my kind of changelog. I, too like to live dangerously.

</comment><comment><USER22> > Bug reports should be sent to address@hidden

Will do.

</comment><comment><USER23> Release notes are a bit weird. It's like an author is shy of actual major changes: NAMESPACES and hides them behind mentions of c99 compliance and test infrastructure :-/

<comment><USER24> Arnold Robbins is a busy dude. He maintains awk, bash, gnu grep and several other must have packages.

A _little_ slack would be nice.

<comment><USER25> Actually, Chet Ramey maintains GNU Bash, and Jim Meyering maintains GNU Grep. As far as I can tell, Arnold Robbins "just" maintains GNU awk. Don't get me wrong, I don't want to trivialize this at all, just correct the record.

<comment><USER26> Also, if one person really did maintain all those things and was overworked, my reaction wouldn't be "Wow, you do so much!" but "Why haven't you found other people to help out so you're not overworked?" All this software is too important to be left to people who don't have time for them.

<comment><USER27> > "Why haven't you found other people to help out so you're not overworked?"

Sadly it does not rain maintainers everywhere, especially when the role does not pay.</comment></comment></comment></comment></comment>


Show HN: Republics.us - Integrate your Internet - <AUTHOR>

This is a side project I have been working on while at college to help make it easier to have my favorite web apps, rss feeds, videos, and search engine wherever I go and whatever computer is available.
Right now, I am just looking for feedback on the concept, bugs, etc. I also will apologize for it is still being a little buggy so be gentle and it prefers Webkit browsers.
Also, I am about to graduate in three weeks in a major I don't  care for(Business Administration). So am asking for advice on if I get nowhere on this, could this site help me get a job being a web programmer so I don't have to look for a non-tech job?
http://www.republics.us/ <comment><USER2> My opinion is as it stands, the site needs a lot of work. It doesn't convey what the motivation / advantages of your web app. With the actual functionality being very much in the early stages you really need to give a stronger message out about the concept itself. You may have great ideas to take the app further, but at the moment a visitor has no way of knowing. The design is somewhat bizarre - it looks like it would be better formatted for a television screen rather than web / mobile browser. I do like the idea of the sidebar with icons in a web app. But you really need to refine your project if you want to make something of it.

As far as helping you to become a web programmer, it would probably only help in so far as you actually have something up and running which to some extent proves you have some rudimentary skills. You may do better to contribute to an open source project, or carry out another project in which you clearly solve a specific problem.

</comment><comment><AUTHOR> <http://www.republics.us></comment>


Why I Like Ruby, Part 2: Blocks - <AUTHOR> http://blog.wekeroad.com/thoughts/why-i-like-ruby-blocks

<comment><AUTHOR> I too love Ruby and their blocks, but I do have to disagree with Rob's statement that C#'s "block" syntax is "obtuse." Certainly it was in the days of straight-up delegates, but the additions of Func<T>, Action, and anonymous methods have really cleaned that up and made it nice and easy to use. Also, I'm not entirely certain what Rob meant by calling LINQ a "Tinker-Toy syntax".

C# example of blocks (loosely based upon Rob's examples):

      //the action argument is the C# version of a block
      // - by specifying Action<Artist> I'm stating that the block
      // - will take 1 parameter, of type Artist
      public void ParseKey(XDocument doc,
                           string elName,
                           Action<Artist> block)
      {
        //using XLinq instead of Nokogiri... *jealous*
        foreach(var node in doc.Elements(elName))
        {
          var artist = new Artist{
            Name = node.Element("Name").Value,
            ArtistId = (int)node.Element("ArtistId").Value
          };
          block(artist);
        }
      }

      //called by:
      public void Main()
      {
        var doc = XDocument.Load("..\db\artists.xml");
        ParseKey(doc, "Artist", artist=>{
          //this is an anonymous method, the equiv
          // of a Ruby block. "artist=>" is the equiv
          // of |artist|
          Db.Save(artist);
          Console.WriteLine(artist.Name);
        });
      }

Certainly it is a bit cleaner in Ruby by way of:

1) Nokogiri is super awesome.

2) Ruby's dynamicness means we don't have to have type ceremony everywhere.

That said, they're pretty equivalent in terms of functionality and expressiveness to me.

<comment><USER4> The "Tinker toy" reference was with respect to anonymouse delegates:

var thing () => {//code}

I think Anders is going to run out of symbols soon :).

The code you write here is fine - but you're tying Artist to the ParseKey method - which is the point of doing the block in the first place (to free that up). This might not look obtuse to you - but it's a lot more code than I have :).

Also - please don't forget the tie-in with method_missing; the reason it's nice is you're freeing your calling code from understanding the parser - <USER2> I don't think you can do here...

<comment><AUTHOR> While the lambda pointer is certainly not the prettiest thing in the world, "x=> { CODE }" isn't all that different from "do |x| CODE end". You might prefer one over the other - and perhaps the Ruby one is easier to learn if you learn it first - but I don't think there is a big difference.

On the other hand, you're certainly right that the code I wrote is longer than yours. You are also correct that it ties itself to the Artist class, but that was because I was only exercising the use of C#'s version of blocks - <USER3> dynamic awesomesauce like method_missing. Method_missing is also possible to do in C# with .Net 4, as I'm sure you know.

A more complete rewrite of your example might be along the lines of:

      //have to inherit from DynamicObject to get special dynamic treatment
      public class DynamicXmlElement : DynamicObject
      {
        private XElement _element;

        public DynamicXmlElement(XElement element)
        {
          _element = element;
        }

        //C# 4 equiv of method_missing
        public override bool TryGetMember(GetMemberBinder binder, out object result)
        {
          if(_element.Element(binder.Name) == null)
            return false;
          result = _element(binder.Name).Value;
          return true;
        }
      }

      //changed this to use Action<dynamic>
      public void ParseKey(XDocument doc, string elName, Action<dynamic> block)
      {
        foreach(var node in doc.Elements(elName))
          block(new DynamicXmlElement(node));
      }

      public void Main()
      {
        var doc = XDocument.Load("..\db\music.xml");

        ParseKey(doc, "Artist", artist=>{
          Db.SaveArtist(artist.ArtistId, artist.Name);
          Console.WriteLine(artist.Name);
        });

        ParseKey(doc, "Genre", genre=>{
          Db.SaveGenre(genre.GenreId, genre.Name);
          Console.WriteLine(genre.Name);
        });
      }

That said, yes, you can do this with less work/ceremony in Ruby as you've shown. I'm a big fan of Ruby and I'm glad you're showing MS devs what makes it so cool. I just don't want anyone to get the impression that some of these basic things are things that simply cannot be done in C#.

<comment><USER4> Unfortunately no matter how many times I write that "you can do this in [LANGUAGE]" - people don't see that part :). It's no the doing of it - it's the doing of it well. Cleanly and expressively - that's what I like about Ruby.

You have to see in the code you write here...</comment></comment></comment></comment>


I've Screwed My Kid's Identity - <AUTHOR> http://www.rossp.org/blog/2013/apr/09/identity/

<comment><USER2> I believe security as we know it will be different in 10 years time, and that your request will be granted.

However your post brought up a very thought-provoking point in my opinion:

I was intrigued by your point that today's parents are publishing details of tomorrow's adults. I have friends that are sharing pictures of their children, embarrassing stories of their children, and personal details of their children's lives. 20 years ago, parents shared that kind of by word of mouth to other friends, or showed pictures at a family get-together. The spread of that kind of information would usually die when reaching the intended recipient. Now with the Internet, that information lives on and spreads much further, and is accessible to strangers for who knows how many years. How can the adults of tomorrow expect a right to privacy when they can't even control what is being shared about them today?

My baby pictures live in a drawer in my parent's house (and on my hard drive just in case the originals accidentally get destroyed). I want my family and descendants to be able to have those pictures, not the whole world. Today's children (tomorrow's adults) aren't getting that option when their parents post their pictures and stories online.

It will probably be about 10 years before I start having children, and I will do my best to keep their lives private. Though with my friends having children today, how can I ask them not to share stories and pictures of their children without seeming insensitive? I certainly can't make the argument as a fellow parent. I can try to convince politely that they are destroying any notion of privacy for their children.

The world is only going to get more interesting as technology gets more advanced, and as humanity grows up with the technology.

</comment><comment><USER3> Post author here - I'm about to go dark for the day but I'd love to hear how you're dealing with this both as site builders and as parents.</comment>


Trading algorithm shows how mass shootings, politics boost gun shares - <AUTHOR> http://www.reuters.com/article/us-usa-guns-funds-idUSKCN0VE1TQ <comment><USER2> I've noticed this effect personally. I've never owned a gun and have no practical use for one, though I've enjoyed target-shooting the handful of times I've tried it. I have no interest in hunting and I live in a nice safe city, not some war zone; having a gun in the house would make me less safe, not more. And yet, whenever the topic of gun control comes up in the news, I find myself musing about the idea of buying one - solely because it might become impossible to do so in the future.

It's easy to understand why people who live in rural areas, or who are emotionally invested in the cowboy-shootout myth or the uprising-against-the- government myth or one of the other American gun myths, might respond to the latest mass-shooting news cycle by going out and buying more guns.</comment>


Spacewar – Fanatic Life and Symbolic Death Among the Computer Bums (1972) - <AUTHOR> http://www.wheels.org/spacewar/stone/rolling_stone.html

<comment><USER2> This has Alan Kay _and_ Steve Russell, _and_ uses 'hacker' right, _and_ predicts that the ARPAnet will kill both newspapers and the music industry. Talk about a lost classic!

<comment><USER3> Not to mention a real, live, bona fide use of the word dis- Establishmentarianism(1) in the wild. Golden.

 _(1) Historical perspective: If you happened to be a theater major, hung out with such, or even did sound and lights for some rinky-dink drama club in the 90s like me, you heard this word ad nauseam spoken by people who had no earthly clue what it meant. For bonus points, they often stuck another "anti" to the front of it._

<comment><USER4> I'm not sure that this article is using the word (1) in the 'canonical' way either, so don't be too critical of your rinky-dink drama friends. They're just modifying the language to suit their ends, just like everyone else!

 _(1) the word describes a political position regarding the relationship of the UK government and the established church there. Therefore the antidisestablishmentarians were campaigners against those campaigning for disestablishing the Church of England_

</comment></comment></comment><comment><USER5> For those that are interested, you can play a javascript version of original PDP-1 spacewar! here:

<http://spacewar.oversigma.com/html5/>

According to the excellent wikipedia article ( <http://en.wikipedia.org/wiki/Spacewar>! ) there is only one PDP-1 which is currently operational, and yes it does play spacewar!</comment>


How to Write Fast Code - <AUTHOR> http://asserttrue.blogspot.com/2009/03/how-to-write-fast-code.html

<comment><USER2> I'm glad to see people talking about one of the four stages of optimization:

1\. Do we have to optimize this? Time is never free, and opportunity cost in terms of engineering effort is usually very significant.

2\. Can we do less work? (this article)

3\. What's the bottleneck? CPU, FP, memory bandwidth, lock contention?

4\. How do we squeeze out better performance? Assembly, loop unrolling, etc.

I usually cringe when I hear about people talking about #4, as very few of them have asked #1, #2, or #3 yet.

And usually, you just hear people talking about doing what the compiler's already doing (writing it in assembly? /The compiler already does that/), usually doing a pretty reasonable job at high optimization levels. They just exchange maintainability for the warm fuzzy feeling that they've been as macho as needed.

<comment><USER3> Profile, Profile, Profile!

Use the 80-20 rule. 80% of your code's time is spent in 20% of the code.

Optimizing without good profiling is like painting a portrait blindfolded.

Pre-optimizing by coding your system to be "fast" before you get to profile it is like starting to paint a portrait before your model is even sitting.

When Kent Beck came in to optimize the Chrysler C3 payroll system, he discovered that one of the biggest time-sinks in the system was _string concatenation_!

It's also useless to optimize before you have a system that runs correctly. Kent also asked how he could validate the C3 system so he could optimize it. He was told it wasn't even producing correct results yet. He replied: "In that case I can make it run _really_ fast!"

<comment><USER4> one of my very favorite quotes of all times:

 _What are the facts? Again and again and again---what are the facts? Shun wishful thinking, ignore divine revelation, forget what "the stars fortell," avoid opinion, care not what the neighbors think, never mind the unguessable "verdict of history"---what are the facts, and to how many decimal places? You pilot always into an unknown future; facts are your single clue. Get the facts!_

                     - lazarus long

<comment><USER5> Nice. :) Clearly, I am a fan!

</comment></comment></comment></comment><comment><USER6> I'm personally fascinated by the notion that efficiency and transformation seem to be intertwined. Hard problems can sometimes seem simple with a slight transformation in either the problem description or the data. Even the article is suggesting that to write fast code, transform your perspective of the problem. Do less. There seems to be something fundamental here.

<comment><USER4> and hence Xerox-PARC slogan "point of view is worth 80 iq points"

</comment></comment><comment><USER7> This is the kind of advice that points at something so obvious that you really never thought about it and feel silly once someone points it out :)

<comment><USER8> Unfortunately, this advice falls into a very common category: Simple, obvious in hindsight, and completely wrong.

Modern CPUs do not "execute a fixed number of instructions per second"; even leaving aside the fact that certain instructions are faster than others, factors such as the order in which you access memory locations and the predictability of branches can easily result in a tenfold difference in performance.

In many cases, code can be made faster by executing _more_ instructions; I recently dealt with some code where changing a (theoretically) O(N) algorithm to an O(N log N) algorithm and increasing the number of operations by a factor of 10 nevertheless resulted in the code running twice as fast. Now, this was an extreme case -- the code went from accessing completely random memory locations to accessing completely sequential memory locations -- but it demonstrates the importance of memory access patterns.

<comment><USER9> The punchline, "To go fast, do less", is certainly not _completely_ wrong. Sure, there may be exceptions here and there, but in general, this is good advice (and if you know enough to know when it's bad advice, you probably didn't need it anyways).

If you're using a higher-level language like Python or Ruby, worrying about things like locality should be pretty low on your performance checklist.

<comment><USER8> _If you're using a higher-level language like Python or Ruby, worrying about things like locality should be pretty low on your performance checklist._

If you're using Python or Ruby for CPU-intensive applications, you probably don't have a performance checklist.

<comment><USER9> If you think that this advice applies only to CPU-intensive applications, you're missing the point. Unfocus your programmer brain and look past the fact that he said anything about some processor being able to perform a fixed number of instructions per second, and absorb the larger message: to go fast, do less. This could include IO, this could include retabulating some statistic just when it's needed instead of on every insertion, this could include handling special cases ahead outside of a loop body, etc. CPU-level optimization should usually be one of the very last things you care about (and yes, this depends, and again, if you already know the exceptions, you don't need this advice).

And Python and Ruby both have excellent C bindings, you can rewrite CPU- intensive portions of your application pretty much anytime you need to.

<comment><USER8> _And Python and Ruby both have excellent C bindings, you can rewrite CPU- intensive portions of your application pretty much anytime you need to._

Of course. But at that point you're writing your CPU-intensive code in C, not in Python or Ruby. Saying "Python and Ruby are fast because they can call C code" makes no more sense than saying "Humans are really good at arithmetic because they can use calculators".

<comment><USER9> I didn't say "Python and Ruby are fast because they can call C code". I responded to your claim that people using Python or Ruby for their applications don't have performance checklists, which is bullshit - part of that checklist (towards the bottom, hopefully) is _refactor important bits to C_.

</comment></comment></comment></comment></comment></comment></comment><comment><USER10> Isn't the old adage: "the fastest code is the one you never run?"

<comment><USER11> Or the one ezra touts: "No code is faster than no code."

</comment></comment><comment><USER12> It's an unbelievably simple statement that is applicable to many different situations, not just computer related stuff.

For example, right now I'm detailing some design principles for a project I'm working on.

I realise there is a limited amount of time to be able to complete the project effectively and to make it look decent, so in the process I've come to make some hard choices.

I've found the trying to be creative with less is working out well so far and in the end it should pay off.

</comment><comment><USER13> Off-topic maybe, but: "How to Write Code Fast", now can someone point me to literature for _that_? Highly appreciated!

<comment><USER14> Try the UNSW YouTube lectures with Richard Buckland, one of them mentions "problem solving" through abstraction, targeting and planning; and may well be what you're looking for. <http://www.youtube.com/watch?v=q1I7WKncE64>

</comment></comment><comment><USER15> Or split your workload up so it can be run on 200 cores in an instant. Not to advertise, but I'm not affiliated with Nvidia - <http://www.nvidia.co.uk/page/tesla_deskside.html>

</comment><comment><USER16> "no code is faster than no code" (comes from yehuda katz afair)

</comment><comment><USER17> I get the feeling that "John" is a literary device for the alter-ego of the author.

</comment><comment><USER18> no code is faster then no code.</comment>


One-Third of Sun-Like Stars Have Earth-Like Planets In Habitable Zone - <AUTHOR> http://www.technologyreview.com/blog/arxiv/27198/ <comment><USER2> This is great. I have no doubt that there is life elsewhere in the Universe. It just makes sense. Any thoughts? Am I overstating the probability of life?</comment>


Executing an array as a function - <AUTHOR> http://kahlonel.io/executing-array-as-a-function/ <comment><USER2> That can be done easier. You don't (or at least, you didn't back in 1984) even have to write a function:

      short main[] = {
        277, 04735, -4129, 25, 0, 477, 1019, 0xbef, 0, 12800,
        -113, 21119, 0x52d7, -1006, -7151, 0, 0x4bc, 020004,
        14880, 10541, 2056, 04010, 4548, 3044, -6716, 0x9,
        4407, 6, 5568, 1, -30460, 0, 0x9, 5570, 512, -30419,
        0x7e82, 0760, 6, 0, 4, 02400, 15, 0, 4, 1280, 4, 0,
        4, 0, 0, 0, 0x8, 0, 4, 0, ',', 0, 12, 0, 4, 0, '#',
        0, 020, 0, 4, 0, 30, 0, 026, 0, 0x6176, 120, 25712,
        'p', 072163, 'r', 29303, 29801, 'e'
      };

(example is for Vax-11 or pdp-11, and courtesy of [http://www.ioccc.org/1984/mullender/mullender.c](http://www.ioccc.org/1984/mullender/mullender.c))

<comment><USER3> Would not have worked on the PDP 11/45, which had separate address spaces for code and data.

</comment></comment><comment><USER4> Very similar, here's main() as an array

[http://jroweboy.github.io/c/asm/2015/01/26/when-is-main- not-...](http://jroweboy.github.io/c/asm/2015/01/26/when-is-main-not-a- function.html)

</comment><comment><USER5> Good find. I'll suggest "shellcode" as a name for this trick

<comment><USER6> Or less exploity "dlopen".

Sure, dlopen does tons of more stuff behind the scenes, but ultimately it is about loading bunch of bytes into memory and executing those as functions.

<comment><USER7> > Sure, dlopen does tons of more stuff behind the scenes, but ultimately it is > about loading bunch of bytes into memory and executing those as functions.

That's pretty much mprotect, though. dlopen _mostly_ does the other things, and it does a lot.

</comment></comment></comment><comment><USER8> I once (ab)used this approach to express x86 assembly directly in C++: [https://github.com/mattbierner/Template- Assembly](https://github.com/mattbierner/Template-Assembly) The library uses standard C++ syntax to build up complex templated types that represent the assembly code. These types are then passed through a simple templated "assembler" at compile time, which spits out a c string of machine code which you can invoke at runtime.

Now if only someone would write a compiletime C compiler in C++ templates...

</comment><comment><USER9> _> There was a section in the paper where a function apparently ran machine code placed somewhere in data memory._

I have some home computer books from the late 70s/early 80s that use this trick extensively.

On the era where home computers had only slow BASIC interpreters and no assemblers (or compilers), the usual way for speed up was to type in a long sequence of numbers (or characters) that were actually a machine language program.

So you have a line like:

1000 DATA 100,32,65,12,44,32,52,11,255,12,55,22

and on and on, which hold a sequence of bytes (the machine language program)

and later, READ statements would read each byte (of the machine language code) and POKE them into memory, that is, write it into a specific address of the RAM...

... later you CALL to that specific address, which basically instructs the BASIC interpreter to "jump" to the machine language code at that location.

<comment><USER10> It's not quite the same trick since this was a fairly standard use of DATA and you control the exact absolute location of the code. There are also no address space protections of any kind.

</comment></comment><comment><USER11> I prototyped this sort of thing for an 8051 based project I was working on where we had more RAM and external EEPROM space than we really needed, but were regularly having to go back and grovel through the code looking for optimizations to make things fit in code memory.

The important thing to know is that 8051s have separate CODE and RAM address spaces. (Actually the RAM is divided up into multiple flavors too: direct, indirect, external and bit addressable.)

It turned out it wasn't worth the overhead. The interpreter and ancillary bits took up too much space and slowed things to a crawl. It was generally easier to rewrite sections of the code in a way that made the compiler and optimizer happy. By various techniques I managed to reduce the footprint of the system code by at least fourfold after a number of refactorings. The application kept needing new features, so it always barely fit in 16 code address space (some of which was already consumed by the bootloader).

</comment><comment><USER12> > -fno-stack-protector

Enough said.

<comment><USER13> From the article:

 _Remember in our scenario, we need the file to compile with a gcc on a 64 bit system, without any special modifcations to the compiler flags, so that means there is no special compile flags, nor can we include any custom linking steps and we want to use GCC inline AT &T syntax._

Edit: whoops, that was from a link to a similar thing in the comments. I apparently missed the real article, which I'm off to read now.

</comment></comment><comment><USER14> I wonder if the same trick is possible in Go. For starters, you can inspect the guts of a function pointer (and dump them to a []byte, and re-execute the function elsewhere): [https://play.golang.org/p/kpSps1GC3e](https://play.golang.org/p/kpSps1GC3e)

This is a bit different from constructing the function "from scratch," though. I tried to inspect the guts of the function body itself, but was met with lots of segfaults.

<comment><USER15> It is possible, but Go functions are not C functions: [https://golang.org/s/go11func](https://golang.org/s/go11func)

<comment><USER14> neat resource, thanks

</comment></comment></comment><comment><USER3> The executable bit is turned on for writable data space pages?

x86 will allow this if the OS does. There have been many CPUs which don't allow it, such as PowerPC, which had separate instruction and data caches. After loading code, the loader had to make the pages executable and cause a cache flush before the code could run.

<comment><AUTHOR> Yes, both gcc flags "-fno-stack-protector" and "-zexecstack" allow the stack data to be executable. The stack is protected by default.

</comment></comment><comment><USER16> One of the reasons to love Postscript:

       [ (Hello World) /print cvx ] cvx exec

Of course, procedures are just shorthand for executable arrays, so

       { (Hello World) print } exec

does the same. Oh did someone say "C"/machine code? Never mind ;-)

</comment><comment><USER17> Unless you are developing an exploit, such code should almost never be used in production system. Most modern operating systems will prevent execution from data buffers or stack. By having such "tricks" in your code you are opening yourself to buffer overflow exploits.

</comment><comment><USER18> I guess this is fine if he is new to this. But playing around with buffer overflows and injecting a payload ( with a healthy dose of NOPs ) and having that open a app ( maybe even a shell ) would be far better.

</comment><comment><USER19> What exceptionally new technique that we totally didn't know from like.... the '80s. Welcome to shellcoding kiddo. -.-

</comment><comment><USER20> Sure you can do this, but (other than in the context of shellcode), why?

</comment><comment><USER21> Its literally called shellcode

<comment><USER22> It's also called jit. In this case a static jit.</comment></comment>


Buggy technology is indistinguishable from malware - <AUTHOR> https://maxhodak.com/nonfiction/2020/09/13/buggy-technology-malware.html <comment> amw-zero This is a personal obsession of mine. I don't subscribe at all to the philosophy of "just build and ship it and let the users give feedback on any bugs." I think that's totally a misunderstanding of agile - agile assumes that your code was working before shipping. This idea that code can never actually fully work and bugs are fine is frustratingly cavalier. How can we sell products that don't do what they claim to?

Beyond the philosophical, software correctness is a deeply interesting problem with many different angles of attack. The most recent ray of hope for me has been learning TLA+. It answers so many questions about the complexity of software, and has such a relentlessly elegant design that simplifies so many aspects of understanding software. Software behavior is a sequence of states - nothing more.

When we write code, we're attempting to encode all possible state sequences, the number of which can be astronomical, as this article references. But it's quantifiably large - we can know the exact size of the state space. Software is not some metaphysical phenomenon that is beyond mastery.

It can be built to work correctly, it just requires a desire to move beyond the current tools that we have which are focused on easy construction. We've focused all of our energy on just enabling the construction of any software in the past 60 years - we need to now move on to enabling correct software.</comment>


Windows Terminal Preview v0.3 Release - <AUTHOR> https://devblogs.microsoft.com/commandline/windows-terminal-preview-v0-3-release/ <comment><USER2> Wow! They are REALLY excited about this!

« The Terminal is now DRAGGABLE FROM ANYWHERE ON THE TITLE BAR!!! »

<comment><USER3> It seems like a no-brainer, but it was a very visible annoyance on the previous version.</comment></comment>


Show HN: Create Youtube playlists from Your Facebook wall posts - <AUTHOR> http://wallplaylist.com/

<comment><USER2> Oh sweet, I can recover my 500+ videos from my old Facebook account that I deactivated.

Only problem is the Create Playlist functionality doesn't work for me nor does it list out any existing playlist either.

"Could not create new playlist."

<comment><AUTHOR> Hi, you're talking about connection to Youtube?

</comment></comment><comment><USER3> Awesome! I've been wishing for something like this for a long time.

Features I would appreciate:

\- filtering out videos not tagged as "music"

\- links to the facebook wall post

<comment> w-ll Yes, I was surprised there wasn't even a timestamp.

</comment></comment><comment><USER4> Great! This is more fun that I expected. It's like a video shoebox for the things I thought were funny for a minute.</comment>


Show HN: Bacán, THE weekly selection of startups from South America - <AUTHOR> http://www.bacan.lat/ <comment><AUTHOR> With Bacán, receive every week, in your mailbox, a selection of promising start-ups from South America. Don't miss a chance to be among the first ones to receive this newsletter, sign up now!</comment>


Show HN: Pitch to a network of investors (demo day as a service) - <AUTHOR> https://www.investorintelligence.io/pitch-room <comment><AUTHOR> its a new feature of a product we pushed a month ago</comment>


We've Found the Real Bastard Operator from Hell - <AUTHOR> http://www.theregister.co.uk/2016/04/29/it_helpdesk_creates_oh_hold_hell/ <comment><USER2> This is luxury compared to being placed on hold by Telstra...</comment>


Ask HN: Why Aren't Political Views/Affiliations a Protected Class? - <AUTHOR> <comment><USER2> The fundamental legal basis for protected classes derives from the text and history of particular clauses in the constitution. For example, racial protections obviously derive from the 13th, 14th, and 15th Amendments. Protections for sex derive most directly from the 19th Amendment giving women the right to vote, which has been deemed to have reshaped other clauses to put protections against sex discrimination nearly on par with those against racial discrimination. Crucially, these clauses themselves identify particular classes like race and sex, and the history of the passage of the associated amendments provides insight into the contours of those classifications.

Relatively late in the legal evolution of civil rights jurisprudence the Commerce Clause was interpreted to not only expand pre-existing anti- discrimination powers, but to provide an independent source of power to ban discrimination. This is why Congress has the power to regulate discrimination against the disabled, for example. Nonetheless, the further away from the plain text and history of the Constitution, the more tenuous Congressional powers become. So, yes, Federal laws against disability and age discrimination have the least constitutional support and are also commonly construed the most narrowly.

Just as important, all of those textual sources grant affirmative powers to the Congress. For example, section 5 of the 14th Amendment says, "The Congress shall have power to enforce, by appropriate legislation, the provisions of this article." The 19th Amendment says, "Congress shall have power to enforce this article by appropriate legislation."

Remember, the Federal government only has enumerated powers. Nowhere is political affiliation directly discussed in the Constitution in a context that would permit it to distinguish political affiliation as a cognizable type of class, and certainly not in a context granting Congress affirmative powers to differentiate based on such class. Political affiliation would best fit with the Free Speech clause of the First Amendment, which the Federal government has powers to enforce through the so-called incorporation doctrine of the 14th Amendment. But Free Speech jurisprudence is concerned with content of speech, not classes of people, unless we're discussing journalists as a class.

Freedom of Association doesn't fit because, similar to Freedom of Speech, it doesn't imply the power to differentiate by association, per se; that is, it doesn't imply the power to recognize group A and group B and give group A special protections. Quite the contrary, it implies the _inability_ to differentiate among them.

The Commerce Clause doesn't work. As broad as the Commerce Clause has been interpreted, political affiliation is perhaps one of the last remaining areas that isn't construed to directly implicate commerce.

Basically, the reason political affiliation isn't normally a cognizable class is because there's no direct nor even indirect source of authority that grants the federal government the power to regulate in such a manner. Plus, there's a whole host of reasons why permitting the government to differentiate people based on political affiliation would harm more fundamental prohibitions against discrimination.

EDIT: Regarding the question of gay marriage, note that Kennedy's opinion doesn't make homosexuals a protected class. Rather, the basis of that opinion is that the government lacks any power to differentiate between homosexuals and heterosexuals when granting marriage licenses. That said, there's a liberal vein of jurisprudence that construes LGBTQ discrimination as a form of sex discrimination.

</comment><comment><USER3> Why would they be?

I'm not being smart - this is the genuine way to approach the problem. At some point you started with no protected classes and if there was a reason that was _considered_ good enough by enough people, then the list was extended. So if a group in society/legislative branch thinks there's a reason to make the change, the onus is on them to justify it and convince enough people to join that opinion.

So if you want a genuine discussion on the topic, you should start with a strong argument about why these views _should_ be a protected class.

</comment><comment><USER4> Most protected classes are attributes that a person has no control over - age, race, sex. Political views do not fall in that category.

The big exception to that that I can think of is religion. One could debate why that's a protected class and whether it should be. But in the US freedom of religion is part of our founding myth and enshrined in our constitution, which probably has something to do with it.

</comment><comment><USER5> It is quite the question. Especially given that political ideology has a higher heritability than other protected classes: homosexuality and religion.

</comment><comment><USER6> Part of being part of a protected class is that you are protected from retaliation for complaining about being discriminated against. Not sure that political views would fit here.

<comment><USER7> Why not? It works with religion, and religion is as changeable as political views. Yet we somehow pretend as if political views are a free choice, made by an informed citizen.

</comment></comment><comment><USER8> Can we please leave generic political discussions off HN?

</comment><comment><USER9> I don't understand the question

</comment><comment><USER10> All of them?

<comment><USER7> I'd say yes, but for practical reasons those that the (overwhelming) majority holds probably don't need protection.</comment></comment>


Mark Cuban Invest in Yourself  - <AUTHOR> http://www.trendslate.com/2011/12/11/mark-cuban-invest-in-yourself/ <comment><USER2> OK... so as one of those people with a fair amount of spare cash lying around and no debt, I still can't quite grok this "invest in yourself" idea. Clearly I'm not about to start swallowing Ben Franklins.

I'm just a jaded programmer who is frankly terrified of the brutal startup culture, with no intention of being a founder (can't handle the high pressure and emotional roller coasters) or employee (not a fan of grueling schedules for minuscule hope of a payout). I'm also a couple of years out of grad school and have no interest in going further down that rabbit hole, so don't try selling "education" as an investment vehicle to me either.

The only area where I have a good idea of how to invest in myself is to improve my physical fitness. Still, that's mostly an investment of time and effort, not money.

What am I to do? Maybe it's time I just check out of the working world and wander for a while.

<comment><USER3> What's your passion? Do that.

<comment><USER2> Ha! If only it were that easy. I've spent most of my life being a goody two shoes, only doing what other people told me to do and never really exercising any individual free will. Passion? What passion?

I'm aware of the irony of reading what more people, this time strangers on the internet, are telling me to do. I doubt I'll see the answer in a web browser.

For the time being I'm simply trying to do something I've never done before every week. It doesn't have to be drastic, maybe something like trying out a new recipe or taking a photo of a different neighborhood or going for a moonlight run at 3am. Sort of a "throw lots of things at the wall and see what sticks" approach.

<comment><USER4> i took a look at your past comments. i'm getting a little personal but i hope you don't mind. you have the financial resources and seem like a mature person, you should move out.

think of it like an investment in learning the skills to be fully independent. it'll also build self confidence and trust in your faculties.

separating yourself from the social conditioning of your parents will give you the breathing room to develop your own intrinsic goals and interests.

<comment><USER5> This is probably the best advice in the whole thread. Nothing could be a better investment in yourself then living on your own. I for one didn't realize how much parents take care of for you. Once I moved out on my own I really got a sink or swim feeling, and that was the jolt I needed.

</comment></comment></comment></comment></comment><comment><USER6> He's recommending if you have a $100k in savings, you should invest in startup tech companies and not public equities which is somewhere between ridiculous and stupid to dangerous. I like Cuban usually but this is terrible advice. If he meant you have an extra $100k to play with that you don't mind losing, then maybe this advice is ok.

<comment><USER7> Maybe they could invest in another country (though, of course, you need to know some people you can trust in said country!).

Here in Uruguay, you could get 10 startups started with 100k. I guess the same in India and other countries.

</comment></comment><comment><USER8> Required reading for young people: <http://tynan.com/youngpeople>

</comment><comment><USER9> Reminds me of the Benjamin Franklin quote:

"If a man empties his purse into his head, no man can take it away from him. An investment in knowledge always pays the best interest."

</comment><comment><USER10> dont take what he said just literally, he meant to say dont limit yourself to tradition, people do stuff that other people admire so you can do the stuff yourself, if you try harder..

</comment><comment><USER11> Huge believer in investing in yourself or a company you start/own. It gives you the highest leverage with least risk, in the general case. Even for folks that cannot or should not or do not want to start/own a company, they should at least self-invest in things like health, fitness, education, skills, socializing, peace of mind, etc.

</comment><comment><USER12> Funny, I was searching for yourself.com !

I will not pass the Turing test today.</comment>


A lean approach to knowledge management - <AUTHOR> http://www.slideshare.net/mdomans/a-lean-primer-on-knowledge-management

<comment><USER2> These slides are so sparse, it's really difficult to catch even the main point.</comment>


IonDB: A key-value store for microcontroller and IoT applications - <AUTHOR> https://github.com/iondbproject/iondb <comment><AUTHOR> Full disclosure: I am one of the authors of this work.

There was some interest in my other research, LittleD ([https://news.ycombinator.com/item?id=10621337](https://news.ycombinator.com/item?id=10621337)), and IonDB has been another focus for a few years in the lab I work in. I thought IonDB might be interesting to this community as well.

Again, feel free to ask questions.

</comment><comment><USER2> I would suggest renaming the IONIZE, NEUTRALIZE functions (macros?) to something more boring but descriptive like wrap_key, unwrap_key.

</comment><comment><USER3> The funny thing is I was about to reply to you on the LittleD thread to tell you about this. Then... I saw the submitters name. Nevermind lol.</comment>


Yelp: Local Economic Impact Report - <AUTHOR> https://www.yelpeconomicaverage.com/business-closures-update-sep-2020.html <comment><AUTHOR> "In the wake of COVID-19 cases increasing and local restrictions continuing to change in many states we're seeing both permanent and temporary closures rise across the nation, with 60% of those closed businesses not reopening (97,966 permanently closed)."</comment>


Typesafe Neural Networks in Haskell with Dependent Types - <AUTHOR> https://blog.jle.im/entry/practical-dependent-types-in-haskell-1.html <comment><USER2> I didn't read this closely, but are those dependent types or just type-level integer literals? Can you use variables and/or arithmetic operations on the type index? If you can't instantiate the type with non-literals, then these aren't dependent types. Dependent types are types that _depend_ on (i.e., the type constructors are functions of) actual _values_ of the language, not types that are parameterized by other _types_ (even if the syntax allows naming a type '42', which just _looks_ like a value).

<comment><USER3> GHC Haskell type-level Integer literals can constructed from non-literal just fine :)

[https://hackage.haskell.org/package/base-188.8.131.52/docs/GHC- Ty...](https://hackage.haskell.org/package/base-22.214.171.124/docs/GHC- TypeLits.html#v:someNatVal)

There are type-level operators as well for arithmetic, but in my experience it's a bit less pleasant than working with Peano Nats.

<comment><USER2> And can you say that a type is indexed by, say, an even number? How do you prove that?

<comment><USER3> With TypeLits, idk if that's possible without some cheating. But that's because (as the module name implies) these are type literals and mostly focused on having Integers that can go from type to term and vice-versa.

I can definitely do that with Singleton peano Nats pretty easily. I'll end up with a function of type

      SNat n -> Maybe (IsEven n)

Where IsEven n is some structural proof of even-ness

      data IsEven (n :: Nat) where
        ZEven :: IsEven Z
        SEven :: forall (n ::Nat). IsEven n -> IsEven (S (S n))

I wrote this on my phone, but I'm sure it's possible and kinda easy to work with at that.

</comment></comment></comment></comment><comment><USER4> Yet another step in the direction of bringing typed functional programming and machine learning together. Nice!

</comment><comment><USER5> Very good example and motivation for dependent types.

However, I think it makes strange assumptions on its readership. For example:

 _> If you're a non-Haskell programmer, this might all seem perfectly fine and normal, and you probably have only a slightly elevated heart rate. If you are a Haskell programmer, you are most likely already having heart attacks._

Well, for a non-Haskell programmer, the Haskell code snippets make very few sense, simply because they are not used to the syntax. And those non-Haskell programmers who are used to the ML-syntax are programming in SML, OCaml or F#, which all have a similar type system to Haskell's, and hence do get "elevated heart rate".

If this article is really meant to be readable by non-Haskell programmers, the example code snippets should also be provided in a more mainstream language with static types, such as C++, Java or perhaps JavaScript+TypeScript.

<comment><USER6> >Well, for a non-Haskell programmer, the Haskell code snippets make very few sense, simply because they are not used to the syntax

I didn't take that remark to be anything about the syntax, but rather how unsafe the code is, since we are dealing with matrices that have assumptions on their dimensions, essentially leaving the bugs for runtime — he follows this up with several bullet points explaining why the heart attack :)

<comment><USER5> _> I didn't take that remark to be anything about the syntax_

Exactly that's the problem: The author is ignoring the syntax issue, that is, the fact that the vast majority of non-Haskell programmers won't be able to make much sense of the the code examples.

</comment></comment></comment><comment><USER7> The next hoop to jump through would be to specify tape based autograd in a type system. The type system would not only have to specify the dimensions of the matrices, but the sequence of operations as well (in order to reverse them and perform the correct backprop sequence without relying on the runtime).

</comment><comment><USER8> Slightly ignorant comment from a Haskell n00b - how does Agda play into this?</comment>


Classroom Technology Doesn't Make the Grade - <AUTHOR> https://www.bloomberg.com/opinion/articles/2019-09-25/classroom-computers-little-benefit-seen-in-test-scores-for-cost <comment><USER2> Schools are built by good teachers technology and other innovations comes next.

Also most schools make mistake like OLPC, giving emphasis on technological advances not on content and teaching. Many schools focus on technology still trying to fit old content and methodology instead of looking at good old methodology with a new way of delivery and create some new one's along the way.

Also in general teaching is not seen as lucrative career, so many deserving people who understand the content and technology and how to apply it effectively don't take teaching as career.

Technology can be a great enabler if deployed and used correctly. But it's not a magic wand which will automatically transform the learning just by waving it.

Also technology is a dual edged sword given modern social media and online content, so instead of learning it might make students waste more time on unnecessary things.

Learning requires focus and concentration and I think sometimes traditional teaching methods might be more effective, so probably need a hybrid approach to deploying technology for learning and education.</comment>