Recent submissions

Comment · 8 years ago
If the intention is to prevent the user from going back to previous question, it would be better to change the behaviour of the request and make t client side rather than highnacking the back button like most slide show websites do.

Edit: I couldn’t even spam back to get out, it would go back and then pull me forward to next question. I had to just change the URL back to HN.

Comment · 8 years ago
Indeed. Additionally, not take anything away from the Ruby counter part, the Python project is amazing and we use it in production. I really prefer the endpoint and viewmethod declaration methods in Falcon over Flask

    # In this example, I use blueprint plugin
    @bp.route('/', methods=['PUT'])
    def create_resource():
        return
vs

    class Resource(...):
        def on_put(self, request, response):
            return
Mirror:
https://pastebin.com/50W8TJV2

Flask's hooking logic [1] is nice but I much prefer Falcon's middleware logic [2]. This then ties into the fact that Flask's design requires working with `g` [3] (essentially a global object) where as the middleware design leads us to bake in data in the request object. The example blow demonstrates how middleware definition works and how "adding data" per request works in both of these frameworks.

    # Flask; assuume `app` exists
    from flask import g
    @app.before_request
    def before_request():
        g.some_variable = 'foobar'
vs

    class ExampleComponent(object):
        def process_request(self, req, resp):
            req.some_variable = 'foobar'
Mirror: https://pastebin.com/Z3yGCfzF

Additionally, Falcon middleware API also exposes `process_resource` which is similar to above but also allows us to _pass_ arguments to the routed resource instance.

[1] http://flask.pocoo.org/docs/1.0/api/#flask.Flask.before_requ...

[2] https://falcon.readthedocs.io/en/stable/api/middleware.html

[3] http://flask.pocoo.org/docs/1.0/appcontext/#storing-data

Edit: Formatting

Comment · 8 years ago
Pardon my ignorance on this. I am not sure if the easing of scroll motion is scrolljacking.

> Scrolljacking basically means we replace native scrolling (what you’re used to) with targeted scrolling: when the user initiates a scroll, either with their mouse or keyboard, scrolljacking takes them to an exact vertical point on the screen (for example, the top of the next content container)

They aren't targeting your scrolling to specific areas on the page, just adding an ease in/out. It happens natively on iOS actually.

Edit: I do agree that it might hinder accessibility, just dont think the term applies as it does in other cases here.

Comment · 8 years ago
Looks very cool. Will give this a try when I get home tonight, looking forward to see if I can help with anything as well. Note that Links in the Contribute Section are broken.

  http://sterlicht.alwaysdata.net/transcrypt.org/docs/html/special_facilities.html#inserting-literal-javascript-pragma-js-and-include

  vs
  transcrypt.org/docs/html/special_facilities.html#inserting-literal-javascript-pragma-js-and-include
Comment · 8 years ago
I think I made this comment on this thread instead of another. However, groking the code, you'd likely simply need to assume windows users have Python or use something like PyInstaller.
Comment · 8 years ago
Drats, any plans on a Windows version without the requirement of WSL?
Comment · 8 years ago
You can also use a list comprehension like so.

>>> sum([x['moons'] for x in target['system']['planets']])

Comment · 8 years ago
Is that compatible with the editor OP is talking about? To clarify, that’s what above feedback was for. I don’t understand why people downvote comments without even knowing the context of the conversation.
Comment · 8 years ago
Hey xconverge. Just an update, I reinstalled the plugin and configured it to work with neovim and am very happy with the results.

Thanks for contributing to the VS Code ecosystem.

Comment · 8 years ago
Thanks for a response. I just installed it and do think that it is missing a few features that are important to me (as in, these are my opinions):

1. Syntax (missing for Elixir)

2. Shortcuts (even preferences shortcut is missing)

3. Easier configuration API; I think currently, you give us the "entire React app", rather get something simple.

I have the application downloaded; assuming you have autoupdates. I will keep an eye out; excited to see where this goes.

Comment · 8 years ago
Looks great. Two questions:

1. I wonder though why you/team didn't opt for extending the vim emulation - via a plugin - on VS Code. Did the exposed API limit you from doing so? Edit: Having used the extensions of VSCode, I am wondering if that is the case.

2. Does it support installation of sublime/atom/vscode plugins?

Comment · 8 years ago
Noted. Didn’t know that was the case. Fle some reason, I imagined that it being open source would have meant a lot of outside involvement.
Comment · 8 years ago
I agree but I'd generalize this to Android. It is an open source system after all.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton