HNHacker News
TopNewBestAskShowJobs

daotoad

908 karma · joined November 8, 2016

submissionscomments
daotoad··on Is Perl 6 Being Renamed?
https://en.wikipedia.org/wiki/Perl_5_version_history

New features have been coming out with yearly releases since 2010's release of version 5.12.

But by 2010, many people already thought Perl5 was dead because Perl6 still hadn't shipped.

The really interesting stuff is actually happening on CPAN, with great extensions like:

* Type::Tiny https://metacpan.org/pod/Type::Tiny

* Kavorka https://metacpan.org/pod/Kavorka

* Moo https://metacpan.org/pod/Moo

* the Test2 suite of unit testing tools https://metacpan.org/pod/Test2::Suite

(edited for clarity, hn formatting is a pain)

daotoad··on Is Perl 6 Being Renamed?
Add to these multiple dispatch and support for literate programming.

There's also a nice interface for writing command line utilities that takes advantage of the above.

See my Christmas themed 2018 Perl6 Advent Calendar article on the topic: https://perl6advent.wordpress.com/2018/12/16/day-17-checking...

daotoad··on Is Perl 6 Being Renamed?
1. Absolutely my experience. NPM is pain.

2. Whether you go positional or use an options hash, you still need to carefully unpack your args at the top of the subroutine. And do it consistently. There are a ton of libraries to help with this, too.

The most important thing is to pick a house style and do it everywhere that doesn't need to be different.

daotoad··on Hiring Is Broken: What Do Developers Say About Technical Interviews?
The key thing is that you filter out anyone you aren't willing to risk paying $800 or more to do the testing before asking them to commit to the extra time.

This is pretty onerous, but it should be pretty damn good at rejecting bad candidates.

I do wonder how many good or great candidates you lose with this method, though.

daotoad··on You've heard of “yes men”. Now learn about “no men” (2011)
Every company really, really, really....really needs someone like that.

Imagine how much better the Star Wars prequels could have been if only Lucasfilm had a strong No Person to stop them from doing stupid shit.

daotoad··on Why is modern web development so complicated?
Web development sucks precisely because we use a document markup language, a document styling language, and an interaction scripting language to build applications. It was bad enough when we just used this mess to make user interfaces.

If you've ever written or worked on a classical desktop application, you'll know what I mean. Since (at least) the 90s there have been visual UI builders and geometry management tools that allowed you to easily define a responsive user interface and connect widget events with calls to back end code. With the advent of CSS Grid and Flexbox, we finally have two decent geometry management tools--it only took 20 years. Except I can't use them yet, I have to support terrible old browsers (like IE7) that are embedded in customer applications.

We've been involved in reinventing a pretty, zero-config version of X-Windows, and we're only about 60% of the way done. How much further would we be if we didn't insist on building it in a hopped up word-processor?

daotoad··on Programmers: Before you turn 40, get a plan B (2009)
Shouldn't that be "Plans B"?

I believe "plan b" is a head first compound noun, and should pluralize like "hangers on", "mothers in law", or "attorneys general".

But I could be wrong. The plural form doesn't get much usage.

daotoad··on Programmers: Before you turn 40, get a plan B (2009)
This is why you need to have Senior and Principal engineering roles. As a programmer or operations engineer you should be able to choose between a management or engineering track for advancement.

The managers work as an interface between the management hierarchy and the individual contributors.

The top engineers work across teams to steer technical solutions and provide cross team focus and continuity. Your principal engineers are charged with breaking down the silos and sharing and setting technical standards and encouraging the reuse of existing services and systems.

Tech managers and team leads don't have time to do the technical leadership and work properly with business. Workplaces without this structure invariably fail to have well articulated, cross team technical decision making capabilities. Everything winds up fragmented and reimplemented.

daotoad··on Dwindling CPAN Releases
Based on your comments, here are some things you might find interesting:

Recent Perl versions have function signatures.

Have you tried the Test2 test suite? It’s a tremendous improvement over the previous system.

Type::Tiny is an amazing library that provides a rather nice type system.

daotoad··on An F-22 Raptor’s Crumbling Radar Absorbent Skin
Got their what?
daotoad··on The New Dropbox Sucks
Supposedly decomposable, flushable wipes are neither.

https://www.bloomberg.com/news/features/2019-03-15/what-s-a-...

daotoad··on Observable’s Not JavaScript
No need to assume malice, other human foibles like attribution bias and hubris nicely explain the horrific idea of calling your language/tool/project 'Observable'.

I, for one, am irritated by the name and hope they either change it or that the project fades. Things are confusing enough without this kind of nonsense. Yes, I get that each cell in a spreadsheet is observing its neigbors. Yes, it's nice that you can "observe" your code auto updating. Yes it's nice that people are trying to improve upon spreadsheets as a programming model. Don't be purposely obtuse right out of the gate by naming your project after a widely used pattern, tool or technique. Call it Cells or Panopticon or something. Please.

In other news, check out my new web framework, called MVC.

daotoad··on Angular v8.0
Funny thing is, if you look at projects like AngularMaterial, they don't follow to the Angular styleguide by a country mile.

The nice thing is that the automation tools are being made progressively easier to customize. That means that it is easier to define your own standard and support it with standard tooling.

daotoad··on Angular v8.0
If you want a redux implementation you can either use NgRx (http://ngrx.io) or use the real thing with Angular Redux (https://github.com/angular-redux/platform).
daotoad··on Amadine – Vector graphics software for Mac
When pedants attack: Weary = Extremely tired, exhausted. Wary = Fearful or nervous about, having trepidation.

Example: I am weary from investing so much time and effort in Apple's platform. Being so deeply invested, I am wary of further investments until I can diversify.

This is confusing as hell because "wear" sounds the same as "ware" and weary is a real word and will not upset your spellchecker. Of course "weary" sounds different than "wear", with the first sylable rhyming with ear. Thanks English.

Anyhow, misuse of words like this reduces the impact of your communication. I hope this explanation can help you be a bit more effective in expressing yourself.

daotoad··on Microsoft is going to ship a full Linux kernel in Windows 10
World domination achieved.
daotoad··on A Conspiracy to Kill IE6
If you worked on web software at that time, 50% of the work was making something that worked in every other browser, then the next 50% was making it work in IE6 without breaking everything else. The arrival of IE8, while it was less awful than IE6, made things worse because many of the hacks used to make things IE6 friendly, worked with IE8, so the collection of stupid CSS hacks one had to memorize grew even more complex.

IE6 was a browser of the same era as Netscape 4, when it was common and unsurprising for a CSS error or a malformed bit of HTML to crash the browser.

daotoad··on Freelancer.com stole from me and ruined my life
For US businesses, US labor laws should be the minimum standard for hiring workers overseas.

The biggest companies will just form overseas business units and employ now "local" people in order to avoid these restrictions. Addressing this sort abuse while keeping the flow of capital reasonably free is a bit more of a challenge.

daotoad··on I Sell Onions on the Internet
Walla Wallas are better, IMHO. But I grew up in the Walla Walla Valley, so my tastes were probably influenced a bit.

Here's an article that attempts to answer your question, and goes into great detail:

https://www.oregonlive.com/foodday/2012/07/which_sweet_onion...

TLDR: Vidalia is milder. Walla Walla has a more complex flavor profile.

daotoad··on Ask HN: What is your money-making side project outside programming?
For most things scanning works pretty poorly. IME, you are better off you use some calipers and a free to use tool like Fusion 360 or TinkerCAD, or a really free tool like OpenSCAD to generate the model.
daotoad··on Facebook showed me my data is everywhere and I have absolute no control over it
Exactly. Here's an example of the type of law you are talking about.

I live in a all party consent state, so if you want to record a conversation with me, legally, you need to have my consent.

Some states are one party consent states. You can record any conversation you want.

Across state lines, federal law requires only consent of one of the parties. But that doesn't resolve anything. Courts in different states handle cross-border complaints differently, some enforce their local all party standard, others demure to the other jurisdiction's one party laws.

daotoad··on A Conversation with Language Creators: Guido, James, Anders and Larry [video]
Types as documentation is one of the things I like best about Perl6 types. Perl6 has the concept of a `subset` of a type. Let's say I want to write a function that takes a name which must be only one line of text, and a positive integer as arguments.

In Perl6 I can document those requirements in the subroutine signature:

  sub foo( Str $name where *.lines == 1, Int $count where * > 0 ) {
      say "Name is $name with count $count";
  }
Or if I want to name the concepts and reuse them, I can say:

  subset LegalName of Str where *.lines == 1;
  subset PositiveInteger of Int where * > 0;

  sub bar( LegalName $name, PositiveInteger $count ) { foo( $name, $count) }
You can use these subsets for multiple dispatch as well:

  # Print a single line argument.
  multi sub print-it( Str:D $it where *.lines == 1 ) {
    say $it;
  }

  # Print a multiline string as a single line
  multi sub print-it( Str:D $it ) {
    say $it.lines.join('');
  }

  # Handle anything that we didn't expect
  multi sub print-it( Any $it ) {
    Failure.new( "it was unprintable", $it.gist );
  }
IME, this makes it easy to write self documenting code.
daotoad··on A Conversation with Language Creators: Guido, James, Anders and Larry [video]
The important thing is that Larry say language developers get lazy because of IDEs, not programmers using the language.

A powerful IDE that automatically looks up documentation and guides you through writing a bunch of boilerplate lets a language designer skimp on figuring out ways to let you avoid writing the boilerplate in the first place.

Code generation in the IDE is a poor substitute for a well designed interface.

daotoad··on Curing the Vulnerable Parser: Design Patterns for Secure Input Handling (2017) [pdf]
Injection is the #1 class of bug in the OWASP top 10 for 2017.

https://www.owasp.org/index.php/Top_10-2017_A1-Injection

Is there any escape?

daotoad··on 5-MeO-DMT Associated with Improvements in Depression, Anxiety
This is why either having a good grounding in meditation techniques and having a guide on hand during a trip is a very important precaution to take for safe experiences. An experienced guide could have helped you break out of the negative experience. If you had better conscious awareness of your mental state, you could have recognized the slide into a bad state and prevented it.

The flashbacks you were experiencing were very real traumatic flashbacks, like what a victim of violence would experience.

The promising results that psychologists are having with psychedelic drugs all centers around having a trained operator guiding the experience to get a desired effect. It's not just a matter of dropping acid and you immediately see GOD and fix your PTSD.

daotoad··on Fearless Concurrency: Clojure, Rust, Pony, Erlang and Dart
It's too bad Perl6's interesting approaches to concurrency aren't mentioned here. Supporting concurrency and parallelism were key points in the design of Perl6, and in the multi-paradigmatic way of Perl, it provides a variety of tools.

Jonathan Worthington can write and speak about this topic far better than I can so I refer you to his talk and slides:

1. http://www.jnthn.net/papers/2018-conc-par-8-ways.pdf 2.C https://www.youtube.com/watch?v=l2fSbOPeSQs

daotoad··on Coding Intentionally in Bash Grains
My fingers hate that and I always, always get it wrong. Always.

Fortunately the error messages are very good.

daotoad··on Coding Intentionally in Bash Grains
Kebab (or train) case (foo-bar) is actually really nice to type and easy enough to read once you get used to it. It's nicer than using underscores because you don't have to keep chording the shift and minus keys.

As to mixing variable names up with subtraction, you put spaces in your math formulas? someVar-anotherVar*thirdVar is pretty unpleasant to read, so not being able to do that is not much of a problem.

Perl6's relationship to sigils (like $) is a bit weird at first, but is very consistent and "fits lightly under your hands" in practice. Suffice to say, sigils indicate context and constrain the type of data you can put in a container. If you want to refer directly to a value, you use a sigil-less variable:

  my \the-great-answer = 42;
See the docs on varibles if you want more information: https://docs.perl6.org/language/variables
daotoad··on Coding Intentionally in Bash Grains
The code presented in the article doesn't communicate the problem. It communicates a clever optimization that will break if the spec changes at all.

This code should be readable enough to give you an idea what is happening and how to change it.

  my $board-depth = 8;
  my $board-width = 8;
  
  my $squares = $board-depth * $board-width;
  my @grains-per-square = ( 1 .. $squares ).map({ 2 ** ($_-1) })
  
  say [+] @grains-per-square;
Which if you read Perl6 says number of squares, and in each one put 2^n-1 grains, then add them all up.

Hint: `[]` is the reduction metaoperator, it lets you specify an operator to use when reducing a list. [+] means "add it up".

It finishes basically instantly, and while Perl6 has gotten a lot faster, it is not a fast language (yet?). So no need to optimize this.

I mean you write the code and then marketing will have a poorly specified variation like "double only the odd ones".

If you implemented this as `2^64-1` then you are starting from scratch.

For the above the map only needs a tweak:

  map({ $_ %% 2 ?? $_ :: 2**(n-1) })
Or whatever it turns out that marketing meant.

In the article, I didn't see informational intentionality, I saw premature optimization and obfuscation.

daotoad··on Meta Programming in JavaScript with Proxies
`rcvr` is clearly Resistor Capacitor Viewer. Duh. And clearly `rec` is Recovery.

The Story of Bunny Showers:

I worked on a code base where we had, in one class, seemingly endless variations on the spelling of "business hours". There were variables named `bsns_hrs`, `business_hours`, ` business_hrs`. Furthermore, in the object's (horrible, messy, overlarge, mutable as fsck) internal state, there were elements labeled with `busnessHours`, `bsnsHours`, 'business-hours`, 'bnshrs`. And so on.

My habbit when reading code like this is to map each spelling to a phonetically similar word or phrase. So `business_hrs` becomes "business hers" and `bnshrs` becomes "bunny showers". And so forth. It makes it easier to rationalize about what is happening, especially if, like me, you move your lips when you read.

I have ever since called this issue of inconsistent spelling in code the "bunny showers" problem, owing both to the well-known fecundity of rabbits and the hellish proliferation of inconsistent names in that fabled codebase.

← PreviousPage 9 of 11Next →