Better HN
topnewbestaskshowjobs
Log inSign up

ComputerGuru

32,383 karma · joined Jan 3, 2008 (18y ago) · 8,295 submissions

mqudsi on most sites.
Submissions

comment 3y ago · link · parent

I mentioned multipart/x-mixed-replace above and I think it can work here instead of CSS. You never reload the chat history page, just put that in an iframe and use a separate iframe with a form that submits your newest reply.

Edit: actually this should work even without mixed replace.

comment 3y ago · link · parent

There’s also multipart/x-mixed-replace for rendering only the latest update (replacing previous content) but iirc Chrome dropped support for that when content type is HTML [0].

[0]: https://news.ycombinator.com/item?id=7349266

comment 3y ago · link · parent

That's correct. For my own library (see sibling comment above) I started off with a single `require()` entry point that can be used to load a dependency, load a dependency and invoke a callback, or asynchronously load a dependency (e.g. return a promise) but then changed it to two separate functions (everyone's favorite `require()` plus an async version very cleverly named `requireAsync()`).

comment 3y ago · link · parent

> Adding promises later would be challenging and leave technical debt.

I wrote an "aio loader" many years ago that can load (in the browser) AMD/CommonJS/node or just "include this script in your html" dependencies that asynchronously loads dependencies (and their own dependencies) with support for use via plain `require()` without callbacks, `require(foo, foo => {})` callback support, and even dynamic async loading (`var App = await requireAsync("foo")`).

I never published it publicly (it's just ticking away on our production sites) but I was motivated to push it to GitHub just now [0].

[0]: https://github.com/mqudsi/loader

comment 3y ago · link · parent

I get what you are trying to say but I have experience with both web and native tooling. This isn’t a valid comparison. Moreover, llvm isn’t one tool, it’s modular, fairly well-architectured, and can be compiled with or without any of a million different features.

comment 3y ago · link · parent

I would hope that data can’t be just copied to a USB. I would like to believe it is destroyed automatically except with an override authorization code from a couple of managers but I know better.

comment 3y ago · link · parent

Your first point is absolutely spot-on but I am curious as to how much treeshaking was on the minds of masses at the time. The tooling of that era didn't really have any good support for tree shaking even for non-AMD includes and it was quite experimental tech (as in, I don't think it was a decision making factor for the majority of the tools on the scene).

The second point actually isn't strictly valid. I've written my own "all-in-one" async custom loader [0] that can require() CommonJS/AMD includes, regular "add a script tag" includes w/out any exports, or even css stylesheets all asynchronously, with asynchronous dependency trees for each async dependency in turn. You can define in the HTML source code a "source map" that maps each dependency name to a specific URL, so that you don't need knowledge of the filesystem tree to load dependencies.

Ideally, this source map can be generated via the tooling you use to compile the code (e.g. `tsc` is aware of the path to each dependency) but I haven't written my own tool to generate the require path to url map.

[0]: https://github.com/mqudsi/loader

comment 3y ago · link · parent

I'm not sure either, but it's HN :)

Native attachments support was personally a big thing for me (inline images or gifs.. not so much) but what I meant to say is that I think the ecosystem could have survived without it if that were the only issue - just look at how long Reddit went without any sort of image or video upload support. Ultimately and "at some point," attachment support would have "just happened" naturally. I just really think multi-presence w/ history and the lack of a good web or mobile client was the bigger deal. Unlike attachments which you can just staple on to the UI and squint at it the right way, these were actual, fundamental issues that required a rearchitecture (or even rewrite) of existing servers and clients, and despite how obvious their importance was (at least to some of us) the mainstream client/server options didn't really relish the idea or jump on board.

I still vividly remember being locked out of a hacker space maybe seven years ago and needing to figure out how to get on the irc from my iPhone. I scoured the app store looking for a good (free) client for this one-time need I had and found nothing. I searched online and found a really shady, insecure, and ad-infested website that would open an IRC connection in the backend and then stream the text to your browser in an interface intended for desktop use. The interface was neigh impossible to use on a phone, all the UI bits were overlaid atop of one another, text wrapping was broken, etc.

I was able to use this to post on the IRC channel and get someone to let me in, but every time I changed tabs or my phone timed out and turned off, the connection would be severed and I would have to start again.. and ask "sorry did anyone reply to my earlier message, I am logging in from a web frontend and was forced to refresh, I might have missed your reply if you did."

comment 3y ago · link · parent

Approaching this from the lens of an interested observer with experience with other projects working on non-LLVM backends for their languages, I'm just struck by the amount of hubris in the linked proposal.

If it weren't for the author, I'd have dismissed the whole thing as a low-effort GitHub issue by a Zig newbie. The underestimation of the work involved, the backhanded dismissal of all the work that has gone into LLVM, the "obviously we can do it cheaper, faster, better" confidence/machoism that exudes from each sentence or claim.. I'm disappointed.

I've had nothing but respect for Andrew's work in the past so I'm going to extend him some grace and the benefit of the doubt and say that maybe it was just written in haste or on a whim without paying attention to how it came across. But it's not something that inspires me with confidence or lends me to give the proposal itself more of a chance.

comment 3y ago · link · parent

It's beautiful but from decades of experience in app development, I moved away about 10 years ago from using images as icons to insisting that all icons be vector files.

But hiring an Adobe Illustrator expert to professionally recreate the icon as a layered SVG wouldn't cost much. Well done!

comment 3y ago · link · parent

The app can write (or modify) the yaml template file on first run. That's how I discovered the configuration file in the first place, with the app prompting me to open the directory and copy config.yaml.template to config.yaml and customize.

comment 3y ago · link · parent

Maybe/at least append an rng value to the end?

comment 3y ago · link · parent

From another comment:

> We use https://crates.io/crates/irc under the hood which is compliant with RFC 2812, IRCv3.1, IRCv3.2.

comment 3y ago · link · parent

All the open source Discord rooms I'm in, absolutely no one uses the voice chat and I didn't even know there was a screen sharing option. The ratio of users to admins is probably 10,000:1 so ease of admin isn't really an issue (see also reddit where mod tools suck). There are plenty of visually appealing clients (e.g. this one!).

I personally think persistent message history (XMPP botched that rollout terribly) - which goes hand-in-hand with multipresence - and the extreme dearth of any - let alone actually good and usable - IRC (or XMPP) mobile clients (esp. on iOS) was the real reason they lost mainstream use.

Multipresence is more than just a checkbox; doing it correctly involves actually setting up a SSO system with actual first-party user account support (not just relegating it as a stateful detail of the underlying IRC library you are using). IMHO actual account integration would have bound users more loyally to IRC and would have created more of a "network effect".

Inline attachments, emoji reactions, etc are all just icing on the cake.

comment 3y ago · link · parent

> I think we can assume it won't be as efficient has hand written code

Actually, surprisingly, not necessarily the case!

If you'll refer to the discussion in https://github.com/dafny-lang/dafny/issues/601 and in https://github.com/dafny-lang/dafny/issues/547, Dafny can statically prove that certain compiler branches are not possible and will never be taken (such as out-of-bounds on index access, logical assumptions about whether a value is greater than or less than some other value, etc). This lets you code in the assumptions (__assume in C++ or unreachable_unchecked() under rust) in the generated production code that will then allow the compiler to optimize the codegen using this information.

(Caveat: I just heard of Dafny today. Definitely not an expert!)

comment 3y ago · link · parent

From our helpless perspective, the Fed might as well be.

comment 3y ago · link · parent

Thanks for the link. I had issues with the WaPo article, but that tongue-in-cheek joke with dead-pan delivery wasn't one of them. Fortunately another commenter called it out as a joke as well.

comment 3y ago · link · parent

The post missed something very important! The whole time I was reading I was thinking to myself “good luck keeping your code error-free after you’re done transcoding from Dafny to the language you actually use in-prod” but…

The language (Dafny): https://github.com/dafny-lang/dafny

Dafny is a verification-ready programming language. As you type in your program, Dafny's verifier constantly looks over your shoulder, flags any errors, shows you counterexamples, and congratulates you when your code matches your specifications. When you're done, Dafny can compile your code to C#, Go, Python, Java, or JavaScript (more to come!), so it can integrate with your existing workflow.

comment 3y ago · link · parent

More reporting, for a more pedestrian overview:

In a major discovery, scientists say space-time churns like a choppy sea

https://www.washingtonpost.com/science/2023/06/28/gravitatio...

(Archived: https://archive.is/AmRvg)

comment 3y ago · link · parent

I mean they are inextricably linked cofactors, but given that the observed increase volatility is measured as the absolute value (can be in either direction, i.e. ±) I would venture to say that at least some of it is regardless of Fed (re)action.

However, I would also posit that it just doesn't matter since the feds will continue (as they've said and shown) to take action so long as the inflation rate isn't at their target rate, so cofactor A automatically implies cofactor B and we just have to deal with that fallout.

comment 3y ago · link · parent

Matrices explain what a function does “literally” (it’s basically a mathematical equivalent to the function itself) but not the why. Comments are probably still needed.

comment 3y ago · link · parent

But that’s what the article is really about. It shows how there is an intrinsic link between the rate of inflation and the volatility of that rate YoY.

comment 3y ago · link · parent

Thanks for sharing. Curious if you know the answer: what’s the difference between a “pictogram” and an “icon” in the components? I looked at a few and it seemed arbitrary?

comment 3y ago · link · parent

This doesn’t add any more value to the conversation than Reddit’s “but will it run Crysis?” comments.

comment 3y ago · link · parent

Hardly. Autovectorization is rarely performed as a percentage of all the cases where it’s theoretically possible, not reliably done (no guarantees - even if it AVs today, the same code may not AV tomorrow), and not something you want your actual hot path to rely on. AV is nice for “incidental” speedups to general code. No serious library touting SIMD acceleration will consider AV sufficient for the core hot loop.

comment 3y ago · link · parent

Thanks for the thoughtful reply!

I don’t think there’s ever effectively “no such rule” but only “(expected) immunity from consequences of said rule” which is subtly different.

comment 3y ago · link · parent

No one said the park wasn’t private property either, conditionally open to the public just like HN ;)

comment 3y ago · link · parent

> Police/fire/ambulances are there for emergencies, their drivers have better training (theoretically) in safe driving, and the vehicles bring attention to themselves.

By this logic, it’s ok for a police officer to drive through the park’s green on his way to work, with no emergency.

comment 3y ago · link · parent

> No vehicles in the park is a rule for the people that use the park

Says who? So I can park my car in the park and take the train so long as I don’t “use” the park? Or drive through it on my way to work?

1
575859
277