32,383 karma · joined Jan 3, 2008 (18y ago) · 8,295 submissions
comment 3y ago · link · parent
Edit: actually this should work even without mixed replace.
comment 3y ago · link · parent
comment 3y ago · link · parent
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].
comment 3y ago · link · parent
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.
comment 3y ago · link · parent
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
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
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
> 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
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
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
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
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
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
comment 3y ago · link · parent
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.