HNHacker News
TopNewBestAskShowJobs

an_ko

1,673 karma · joined May 4, 2015

https://github.com/anko
submissionscomments
an_ko··on Why I Went Furniture-Free (2019)
> We have tables and art and a stove and fridge and cupboards and bookshelves. [...] So not furniture-free at all, but it's true about the chairs.

Clickbaity title eh? So it's like a traditional Japanese house.

That said, I've heard the same arguments that it's part of why the elderly in Japan are generally pretty mobile: sitting on the floor and getting back up many times a day for your whole life helps retain basic joint and muscle fitness.

an_ko··on Ask HN: Ideas for scaling and monetizing a web game with chaotic usage?
Just throwing ideas around:

I feel like streamers paying for usage beyond a certain threshold of simultaneous players might solve both problems.

That way they could play it for free capping out at fewer players (number chosen to still perform ok while your autoscaler catches up) and if it's fun, pay to include all their viewers next time. Then you could afford to increase your reserve capacity accordingly.

Depends on the game, but if the usage pattern seems too "one-shot" for a subscription to be appealing, could sell in the form of advance bookings, so you could prepare for large crowds ahead of time.

an_ko··on I'd like to review your README
I've written this tool to test example code in markdown documents using user-specified shell commands: https://github.com/anko/txm I have had great success using it in my own projects, so perhaps others might find it useful too.
an_ko··on Show HN: Pay to Play Social Media
Interesting experiment! What type of content do you expect to attract? How do you foresee users behaving in response to the incentives set up?

My gut reaction is a worry that because people in general tend to upvote things they already know and agree with, giving extra value to upvotes might create even more bias toward boring conformity. I imagine it would deter users with different interests or opinions from participating, since they wouldn't want to spend money just to risk being ignored or shown the door.

I think successful communities fight such stagnation by being focused and moderated; people join because they care about the topic the community discusses rather than the people in it, and trust moderators to trim upvote-farming relatable memes, over-discussed subjects, and interpersonal drama, to keep the spotlight on topical discussion. Anything else tends to lead to 4chan /b/.

an_ko··on Calendso: An open source Calendly alternative
Clearly you can get it here. :) Post a "Show HN"?
an_ko··on Online dating isn’t easy – especially when you’re asexual (2018)
I think of it differently:

Basically anything can be a source of identity. When someone says something matters to them, I see no point in doubting it, because I have no way to disprove that. The only evidence is in their mind, so the best I can do is to trust their observation of it. Doubting them would imply I knew them better than they know themselves, which would be at best silly, at worst insulting, and certainly unproductive. So when someone tells me they identify as $X, acceptance is rational.

I don't think sciency-sounding vocabulary convinces any rational person of scientific authority. As you say, flat-earthers do it, and yet everyone agrees they're full of shit. Latin is just a language.

an_ko··on A Mathematical Keyboard Layout (2018)
A stricter version of this (which I prefer) is baked into latest Firefox: Tick Enable HTTPS-Only Mode in all windows at the bottom of about:preferences#privacy. It upgrades to HTTPS whenever available, and otherwise shows you a warning that you're about to load an unsecured HTTP site.
an_ko··on Supreme Court sides with Facebook in narrowing the federal robocall ban
I keep getting email from PayPal about their terms and conditions changing. I have a PayPal account, which I can't delete, because to delete it, I'd have to log in, but when I enter my details (which I know are correct; I use a password manager), I get a generic error message. Trying the password recovery procedure with my username gives me the same generic error message. I've emailed customer support twice, but they don't seem to be staffed by humans, because both times I got the same "you should use the password recovery procedure" template response, even though I explained it doesn't work.

I've created a filter to send them to trash, but it just feels so very sad.

an_ko··on Zshelf: Z-Library books downloader for reMarkable tablet
I'm uninformed, as I'm into neither piracy nor libraries. What are the differences between the two from an author's financial perspective? My initial impression is that they sound equivalent; both are used to get your book for free, by people who don't want to buy it.
an_ko··on Functorio
> Merging an empty belt with any other belt, makes no difference.

I know the intended meaning was that it makes no difference to the result belt's type, but in-game it does have the important difference of putting all material from the input belt onto just 1 side of the output belt, halving throughput.

If in this image https://bartoszmilewski.files.wordpress.com/2020/11/unit.png the incoming belt had both sides filled, both would go onto only one side of the outgoing belt, possibly causing some stalling.

Do type systems exist that include a notion of "throughput" or "capacity" like this?

an_ko··on FIDO2 security key company releases hardware that's open source and uses Rust
Linux was designed on a whim by a college student.
an_ko··on EU privacy agency urges more safeguards to curb U.S. tech giants
I see the same. Maybe I'm getting confused by the wording and layout.

I interpreted the "Reject All"/"Confirm My Choices" buttons at the bottom to belong only to the "Manage Consent Preferences" section. The "Information Our Partners Collect" part above it is a separate section, with a separate "Accept All" button, and an opt-out link in the text, so I figured the final "Reject All" might only reject the second section. Because why else would they have separate sections with separate buttons?

Either way, none of this inspires confidence that they have my interests in mind.

an_ko··on EU privacy agency urges more safeguards to curb U.S. tech giants
In what I imagine is a brilliant twist of irony (I can't read the article), all I see when I open this page is a consent form to be tracked, with a link buried in text to opt out, which brings me to a page that requires me to fill in all of my personal details in order to opt out.

Apparently in order not to track me reading their web page, Reuters requires (among others) my full name, residency, date of birth, street address, and telephone number.

an_ko··on Fuzz me wrong – How QuickCheck destroyed my favourite theory
Don't be too hard on yourself. It's not stupidity but unfamiliarity. Haskell's roots are pretty distinct from most other popular programming languages, so it's normal if your existing notions from unrelated programming languages don't translate. Like if the article were written in Finnish.
an_ko··on Change your MAC address with a shell script (2019)
They make supercomputers, which are typically the size of a large room. It's quite unlikely you'll see one connecting to your free wifi.
an_ko··on An SF artist created a fake company that fooled thousands
I remember Rob Rhinehart's satirical writings having a similar style. Start a little strange but reasonable, and slide gradually into absolute insanity. Like the classic "High Frequency Dating" https://web.archive.org/web/20160126071435/http://robrhineha... Made even better by being CEO of Soylent, because it means so many anti-weird-startup people come in angry with weapons drawn and miss the joke, just like with this verified badge stunt.
an_ko··on Ask HN: What is a product you wish was sold in your country but isnt?
I think the main reason those exist in Japan is the special tax category for small vehicles: https://en.m.wikipedia.org/wiki/Vehicle_size_class#Japan In Germany such legislation would probably be opposed by the local automotive industry, who would be behind overseas competitors in this space.
an_ko··on I spent eleven years working on this Line Rider track
(Not the author, but I've played Line Rider a lot a long time ago.) The character isn't directly controllable. They're affected by gravity, and collision with user-drawn lines. You can also draw "boost" lines that accelerate the character when touching, and "decoration" lines that don't interact with the character.
an_ko··on Echo/printf to write images in 5 LoC with zero libraries or headersnetpbm
I've used GIMP as a game level editor this way. Draw your level, save it as PPM, and parse it into tiles in your game. The file is dead easy to parse. For a "real game" you might want to use Tiled or another actual map editor, but for little fun things this is light and Unixy and reliable.
an_ko··on Eslisp – An S-expression syntax for ECMAScript/JavaScript, with Lisp-like macros
It unfortunately can't do it in that direction, at least yet.

It would be quite difficult in the general case to keep JavaScript formatted the same after it's been munged into S-expressions and converted back again. It would work the same, just look different. And the comments would disappear!

However, there has been some work into making a spec for a JS Concrete Syntax Tree (as opposed to Abstract Syntax Tree) which would retain whitespace, comments, and other such concrete "junk" that an AST typically abstracts out. https://github.com/estree/estree/issues/41; https://github.com/cst/cst It would be super cool to turn up at work in a JS shop armed with Emacs, and writing JavaScript at lightning speed using macros and structural editing, without anyone noticing.

It's a good idea. I'll make a note of it.

an_ko··on Eslisp – An S-expression syntax for ECMAScript/JavaScript, with Lisp-like macros
[ To save readers a search, LIPS is at https://github.com/jcubic/lips ]

I'm happy that eslisp has inspired other language ideas. LIPS is cool. The auto-resolving Promise feature is a great idea that's only really possible when you implement the language as an interpreter like you have. Generated code for that would be a mess...

I agree about the (. console log) thing. Such a common operation should be easy to type. I only did it this way to avoid adding any more syntax to the language, because I thought I could solve that problem later by making the syntax configurable by users.

...which I haven't really done well yet. Eslisp has a system called _transform macros_, one of which is https://github.com/anko/eslisp-propertify which turns `console.log` atoms into `(. console log)`, making the syntax legal. The transform macro system is really awkward to use and limited in functionality. I'm working in private on replacing the whole parser with one that user macros could modify, based on https://github.com/anko/partser. Parser combinators are the future!

an_ko··on Eslisp – An S-expression syntax for ECMAScript/JavaScript, with Lisp-like macros
Wisp is neat, and was an inspiration for eslisp. Wisp introduces a lot of syntax, and abstractions to pretend it's on a lisp runtime, which make it harder to learn, and makes it less obvious what happened when stuff breaks. And you can't invoke the compiler inside macros. Those are the things I've tried to improve in eslisp.

Finding traction for a new language is difficult. It requires quite a large mass of work, documentation, and polish, before people view it as stable enough to invest their time in.

For now, I'm happy even if eslisp is viewed as a convoluted experiment. If it dies, perhaps like I found Wisp and had ideas, someone will find this and have ideas. Projects die, progress continues.

an_ko··on Eslisp – An S-expression syntax for ECMAScript/JavaScript, with Lisp-like macros
I've tried really hard with eslisp to defy Greenspun's Tenth, and to do justice to the Lisp tradition. The macros in eslisp are actual macros with scope and proper hygiene. They can perform arbitrary computation, and can arbitrarily modify the AST. You can even access the macro table during compilation to completely gut the language from the inside if you want.

So I guess the goal is to be a purpose-designed, fairly well specified, only somewhat buggy, slower-but-not-debilitatingly-so implementation of 80% of Common Lisp. :)

an_ko··on Eslisp – An S-expression syntax for ECMAScript/JavaScript, with Lisp-like macros
I named it "block" because the structure it generates is literally called a Block in the ECMAScript spec https://www.ecma-international.org/ecma-262/5.1/#sec-12.1. I wanted to make the correspondence as familiar as possible to JS programmers.

You're probably right I should have called function expressions fn. You can alias it with (macro fn lambda) though if you prefer that.

First I hear of Lumen! What a coincidence that they started at the same time. It seems their language is an "overlay" entirely separate from both Lua and JS which only runs at compile-time, kind of like Lua is to Terra http://terralang.org/. I think that means Lumen can't load macros from JavaScript modules at compile-time like eslisp can, but I'm not sure. I'll do some reading. Thanks for the link.

an_ko··on Eslisp – An S-expression syntax for ECMAScript/JavaScript, with Lisp-like macros
Fully agree. Parenscript is a great "compatibility layer" if you already know Common Lisp.
an_ko··on Eslisp – An S-expression syntax for ECMAScript/JavaScript, with Lisp-like macros
You can use "function" too.

There are 2 because JavaScript has 2 different structures for making functions; function expressions (which I chose "lambda" for) and function declarations (which I chose "function" for). See https://github.com/anko/eslisp/blob/master/doc/basics-refere... for examples.

Function declarations are statements, and you need to provide a name for the function.

Function expressions are expressions, and the name is optional.

In practice they often end up being interchangeable, but I just wanted to make sure any JavaScript is definitely representable.

an_ko··on Eslisp – An S-expression syntax for ECMAScript/JavaScript, with Lisp-like macros
During compile-time, it doesn't care. So you can use "illegal" characters for the names of macros.

  (macro what? (function () (return '(a b c))))
  (what?)
That compiles just fine to the JavaScript code

  a(b, c);
It does try to validate identifier names during code generation though (using the esvalid module), so if you give it

  (? 1 2)
then it will error with

  [Error] Identifier `name` member must be a valid IdentifierName
  At line 1, offset 1:

  (? 1 2)
(In a terminal, the offending character is highlighted.)
an_ko··on Eslisp – An S-expression syntax for ECMAScript/JavaScript, with Lisp-like macros
OH HI INTERNET. Author here. I just woke up. I will eat breakfast, then fix the package (issue #58 I see you) and answer questions.

Edit: Is fixed.

an_ko··on Whitespace, the Language
I and a few other students once cornered him to ask if he's the same Edwin Brady who wrote whitespace. He said no, it must be some other Edwin Brady. We returned later, with better evidence. He said "Ok, yes, it was me. But in my defense, I was drunk at the time." :)
an_ko··on I built an app to fix my depression
To everyone but them, this comment is noise. Please reply to their comments, not at top-level.
← PreviousPage 4 of 9Next →