Hacker Newsnew | past | comments | ask | show | jobs | submit | xthetrfd's commentslogin

How many users does your app have? Do you make any revenue?


You can bookmark this instead: https://github.com/j0be/PowerDeleteSuite

Much easier


This blog post is not very informative. How did they prompt GPT4 to explain the neuron's behavior?


It's explained more in the "read paper" link, where they provide the actual prompts:

https://openaipublic.blob.core.windows.net/neuron-explainer/...


One area where fish is excellent is IMO interactive shell scripting. No more case..esac and friends. Fish adopts a python-like syntax that makes it ridiculously easy to write loops fast in the terminal.


So I read this and thought "wow, indentation would be so stupid to manage in a terminal... even typing python into python's repl is brutal" but then I looked up the syntax for a for loop in fish and it is exactly the same as the syntax in bash except it uses the word "end" instead of "done" and doesn't have "do"... what am I missing?


It's an absolute godsend. Scripting in it feels really intuitive compared to POSIX shells. I find it such a shame that we probably won't get rid of POSIX shells for at least a couple more decades... if that.


Well, oilshell has been positioning itself as an upgrade path forward.


You can have real Python scripting with xonsh. It combines Python ness and shellness very nicely.

I agree that fish is a sweet middle ground spot.


You can use the swipe functionality of the gboard even with the open source android keyboard provided you are rooted. It's just a library file that you have to install.


I wish we had the option to use web apps instead for native apps for everything. As much as I hate modern web, I can't deny that not only are web apps cross platform, they also offer better privacy.


Well if you find it let me know. Also normal wheel scrolling


I've thrown away half a day trying to figure out how to get the scroll wheel to behave. No cigar. It still scrolls one line at a time in a terminal, and two pages at a time in firefox.


Try severely reducing the value of mousewheel.default.delta_multiplier_y in your Firefox about:config.


Thanks! Never realised there could be a per-program setting to fiddle with!


Most programs don't have internal settings for this, but Firefox does things its own way--and tends to break regularly because of it.

Also try reducing mousewheel.min_line_scroll_amount if changing the other setting doesn't help. Try a value of 16.


Is there a number you suggest?


Firefox' scroll behavior seems to be non-deterministic on Linux, so there doesn't appear to be a universal answer.

The default is 100, which seems to work fine most of the time, but for the OP's issue, reducing it by a factor of ten might be a good starting point.


I agree with you. I mostly just read the title and then the comments, especially if I know a thing or two about the subject.

Partially off topic but I personally use the FOSS android app "Materialistic" to access HN. It offers a much better comment navigation experience than ynewscombinator.


ASGI is meant to be used to enable asynchronous Python code. I guess there are many I/O bound server applications that can benefit from it.


It depends on the workload and app for sure, but in my experience, most of my services make a bunch of outgoing calls, usually HTTP, to different services, often in a single operation. Being able to do these in parallel, on the side, or via fork/join was pretty handy. For a simple Flask app that fronts a single db, sure, stick with wsgi, but I don't run into many apps like that anymore.



All of the high performing results are running with servers written in C/C++ tho.

I think if we have a more performant ASGI server / event loop, the results might be different.


I believe that some recent Python version has added (optional) type annotation support. I haven't ever used it though.


> I believe that some recent Python version has added (optional) type annotation support.

Annotation support was added in 3.0, which isn't really a recent version of Python, having been released about 11.5 years ago.

Also, mypy, while it can use Python 3.x annotations, also supports static checking of Python 2.x code using type comments.


> Annotation support was added in 3.0

However, support for type annotations, specifically, wasn’t added until Python 3.5 (via PEP 484).


What PEP 484 was standardize the use of annotations as type annotations and provide ancillary out-of-the-box support for type hinting via annotations, particularly the typing module.

Mypy was actually using python 3.x annotation for type annotations before PEP 484 standardized them brought the stdlib typing module, but with PEP 484 there was a common, language-defined standard baseline for mypy and other efforts.


It's super-easy to use! More flexible than Java, but (so far as I can tell) just as powerful in terms of catching errors.


You can even benefit from it without bothering with the type annotations (though they make it more effective).

https://google.github.io/pytype/


Maybe your IDE experience is different than mine, but a typed function will gladly accepted an untyped var without complaining, and during runtime could care less.


> but a typed function will gladly accepted an untyped var without complaining

this can be made prohibited by MyPy's --strict flag [1], and enforced with a mypy git pre-commit hook locally, and with a MyPy CI job.

[1] https://mypy.readthedocs.io/en/stable/command_line.html#cmdo...


That's a mypy setting


There is type inference in all of the Python type checkers, it's not necessarily an "untyped" var because it lacks an annotation.

Running a type checker in Python is a way to avoid runtime type errors, just like in compiled languages, but without a performance benefit.


Type annotations aren’t equivalent to this check, though, because they’re not enforced at runtime.


Why should type annotation be enforced at run time? In statically typed languages there is no type checking at run time, your type system already proved the type of variable.


Because Python’s type annotations don’t prove anything. That’s why, for example, they can’t be used to increase the performance of the interpreter.


> That’s why, for example, they can’t be used to increase the performance of the interpreter.

They can (as in - there's API for that, the rest is up to a community effort) improve performance of a final program, if type-annotated code is passed through Cython with ``annotation_typing=True`` flag:

http://docs.cython.org/en/latest/src/tutorial/pure.html#stat...

https://github.com/cython/cython/issues/1672#issuecomment-29...


It’s not enforced at all, and only serves to provide development feedback.


The annotations are a language syntax feature than the runtime doesn't enforce. There are a number of separate static typecheckers, such as mypy, that do allow AOT static verification (which is, after all, all languages like Haskell have; runtime enforcement of types that have been statically verified in advance isn't super common or necessary.)


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: