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

“Even Jon Skeet cannot parse HTML using regular expressions.”


He meant Chuck Norris.


Jon Skeet is who Chuck Norris calls when confronted with a regex[0]

(Apologies for the Medium link)

[0] https://medium.com/geekculture/the-chuck-norris-of-programmi...


I wish there was a way to just repurpose existing operating system support for CJK language IME for English.


Could you elaborate?

I'm aware of CJK input methods, but it's not immediately clear how/why you could repurpose them for English. Not to mention there are several types.


Using a standard input method editor (IME) was my first thought, too.

You can create a custom user dictionary in any IME, mapping the abbreviations to one or more full words or phrases, either in bulk beforehand, or one by one while you use the system.

During typing, pressing the space bar brings up a list with the substitutes corresponding to the preceding string. You can select with the up/down arrows and insert by pressing space again.

In practice, most of the time you can convert by pressing space twice in quick succession, because either you have a single candidate, or because the default selection, the top candidate is automatically set to your last, or most frequent selection.

If there's no match, you can add a new abbreviation to your dictionary.

You can turn on/off the system by pressing CTRL-space, or some other key combo.


Having to scroll through a list with the arrow keys sounds slower and more flow-breaking than just typing the word.


That's only necessary when you have more than one word abbreviated the same (e.g. "db" could be either "debug" or "database"). Someone here commented that this is a missing feature in OP's solution.


Is there an equivalent to caniuse.com for gauging the level of instruction set extension support on x86 and ARM in the wild?


The Steam Hardware Survey "Other Settings" section lists the prevalence of various extensions among users that have taken the survey:

https://store.steampowered.com/hwsurvey/Steam-Hardware-Softw...

The data set is a mixed bag though. Some types of system are going to be over-represented.


Yes, I've recently heard some mention of this survey being skewed/buggy, which is a pity because I do not know anything better. IIRC Linux systems were underrepresented.


I'm a well constructed system, you could probably get this down to one PostGIS query with some joins and spacial indexes that should run in <100ms.


"web scale"


And we don't even use MongoDB!

https://www.youtube.com/watch?v=b2F-DItXtZs


If Rust was a higher-level language, then I'd say yes, just automatically handle running Futures in parallel, join them when you actually need to resolve the data, and pretend that they look like synchronous functions in the 80% of cases. Though things like `select!` wouldn't make any sense mixing the two.

I continue to find the "function coloring" argument misses the point unless you're arguing from a developer experience perspective. Why should two fundamentally different things look and function the same? Want this the ultimate pitfall of early RPC implementations where everything looks synchronous?

In Rust, a lot of the friction is due to how async functions/futures fundamentally differ in model of execution and how that interplays with the rest of the language. Other languages get to hand-wave a lot of these problems away with a GC. (It certainly could be less of a pain nonetheless.)

- Futures don't execute until polled, can partially execute if something isn't ready (and would block), can partially execute and be arbitrary cancelled and dropped. There is no equivalent in sync functions unless you make them co-routines.

- Since you can "pause" futures if something would block, you need a place to store the function's state for when it's resumed. Now you must be consider if the async function's state is `Send` if the future wants to move to a different thread to continue executing -- which is why you see `pin!` used. Sync functions don't care about this since you always run to completion on the same thread, and the stack is ephemeral.

- Likewise, the `Future` returned by the async function is going to need to encapsulate it's state that it saves. In the general case, this is a compiler generated anonymous struct that changes if any state saved across `.await` changes, hence the opaque `impl Future`. This is why you see `BoxedFuture` a lot to abstract this away at the expense of an allocation. Ideally, the new associated types with lifetimes can avoid this with traits.

So if all functions were co-routines (i.e. functions that can be resumed and re-entered) they would all have the same "color". But all you really did was "lift" all sync functions to be "async" functions with no internal await points.

(IMHO, if the C# team back in the day decided to implement full blown co-routines into the language instead of just `async/await` as a compiler trick, I think many other projects would have followed suit with a more general co-routine solution instead of treating `async/await` as this special thing which is just a specific compiler generated implementation of co-routines.)


Various thoughts:

It seems to me that the fundamental definition of a function/method should be a compile time executed function that generates a syntax tree always (assuming the compiler dog-foods itself or can parse and interpret it). Much like Python has metaclasses or Rust's procedural macros but it's just assumed by default.

It's kind of unfortunate that a language with managed effects & capabilities hasn't gone mainstream. Maybe it doesn't have the right ergonomics yet.


I never can tell if chargebacks are truly a feature or a bug.


This vaguely reminds me of Adobe's ColdFusion except in the browser for better or worse.


I still kills me that (correct me if I'm wrong) the original version of SmallTalk on the Xerox Park Alto had a native arbitrary precision Fraction type.


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

Search: