HNHacker News
TopNewBestAskShowJobs

jw1224

1,959 karma · joined March 20, 2017

submissionscomments
jw1224··on Rider is now free for non-commercial use
I’m a PhpStorm user so not familiar with Rider specifically, but in my experience JetBrains IDEs are exactly that: Integrated Development Environments. Whereas VSCode is more of a code editor first and foremost.

There’s tons of overlap between the two, and for casual development VSCode will usually be fine. But as a professional I rely on IDEA to make a living, and it rarely lets me down.

95% of everything I could ever need comes out-of-the-box, so I don’t need to go plugin hunting (though there is a broad range of IDEA plugins too). In fact the IDEA plugins are cross-compatible, so plugins for Rider will work in PhpStorm, PyCharm, Rubymine, etc.

The refactoring is outstanding, and leaps beyond what VSCode can do it. Basically it just understands my code like a real developer would. Not just simply checking syntax, but understanding project structure, naming conventions, coding styles, and more.

PhpStorm gives me access to a full debugger, with inline breakpoints and execution step controls. “Find Usages” is incredibly thorough and even understands dynamic symbol names in many cases.

Also I get a full MySQL and Redis client, right there in the UI. I can click on strings which refer to column names in my code, and they’ll appear in the DB panel instantly.

At the end of the day these are power-user features, but I’m glad to have them and feel significantly more productive in a JetBrains IDE. Embracing static analysis and a full IDE was probably the single most beneficial upgrade to my skills and career.

jw1224··on setBigTimeout
Unlike setTimeout, requestAnimationFrame callbacks are automatically skipped if the browser viewport is minimized or no longer visible. You wouldn’t want to miss the frame that matters!
jw1224··on OpenAI is set to lose $5B this year
I would assume Apple purchased dedicated hardware capacity at their own expense, which lets them run isolated instances of OpenAI’s models “free”. It would make no sense otherwise!
jw1224··on ULID: Like UUID but Sortable (2019)
> But with ULID or UUIDv7, this "benefit" is gone to some degree because timestamp is included

Including the timestamp only tells someone the time the UUID was generated. Unlike incrementing numeric IDs (which can simply be subtracted from one another to measure a change in database records), there’s no way to meaningfully count change over time.

> any incremental id can be transformed ("encrypted") to arbitary different format (which hides the real id)

Easier said than done… You then have the overhead of encrypting/decrypting every client-facing ID before querying the database. You’ll also need to code workarounds in many frameworks, to bypass conventions where they expect keys in URL paths (for example).

> Also UUID is usually much larger: Waste of db/index space, degraded performance

With older UUIDs, sure, but sorted ones (like ULIDs) have consistent prefixes, allowing for very efficient indexing and querying with a binary tree search.

jw1224··on Running PHP fast at the edge with WebAssembly
This seems like a misunderstanding, WebAssembly has nothing to do with PHP’s internal performance mechanisms. WASM is a compilation target, this means you can take code which needs to be compiled (like PHP’s core binary), and compile it to be run in a browser.

PHP in WASM means developers can run actual, real, native PHP code in the user’s browser, without the user needing to have PHP installed locally, or nginx, etc…

jw1224··on Running PHP fast at the edge with WebAssembly
The “edge” in this case is the browser (from a pure WASM standpoint, though I see these guys also offer a hosted serverless version too).

For most general-purpose applications, there’s no point to WASM. But some apps may run specific functions which take a long time (e.g. bulk/batch processing), and being able to execute those tasks securely on the client side provides immediate feedback and better UX.

That’s just one use case. Another is that WASM makes PHP portable, in the sense it can run in any web browser without the need for a back-end server. Lots of potential opportunities for distributing software which runs completely locally.

jw1224··on Running PHP fast at the edge with WebAssembly
Getting WordPress running in WASM was a huge milestone. It was one of the first big PHP/WASM achievements, but was never the end goal, just a proof-of-concept. The target market for this tech is not WordPress bloggers.
jw1224··on Psion 5mx Emulator
This is amazing, what a great project. Psion has a special place in my heart!

My grandfather gifted 12-year-old me his 3c, when he upgraded to a BlackBerry.

I used OPL [1] on that Psion to write my first ever line of code.

Here I am now, a professional software engineer, 20 years later. Who’d have thought it :)

[1] https://en.m.wikipedia.org/wiki/Open_Programming_Language

jw1224··on Oink: An API for PHP in a single file
From the docs:

> Although any valid PHP code can be contained within a namespace, only four types of code are affected by namespaces: classes, interfaces, functions and constants.

jw1224··on Oink: An API for PHP in a single file
After 15 years of PHP this is the first and only time I’ve ever seen someone actually use the “global” keyword. And to hijack $data, of all the variables you could choose…

> This library prioritizes development speed and simplicity over everything else, including best practices and standards.

Oh. At least we were warned!

jw1224··on Days Since Incident (2022)
There is literally one happening right now: https://www.youtube.com/live/LmqYgnsmSSA?si=b9jBEFDLE7QHry2_
jw1224··on (Unsuccessfully) Fine-tuning GPT to play "Connections"
> This result - poor Chat GPT performance - surprises me. I thought pattern detection and set forming was something that Chat GPT could do well

I would speculate it’s struggling because of the linear nature of its output, and the red-herring words which crossover between categories.

Because the model can’t “look ahead”, it starts spitting out valid combinations, but without being able to anticipate that committing to a certain combination early on will lead to a mistake later.

I expect if you asked it to correct its output in a followup message, it could do so without much difficulty.

jw1224··on Penrose – Create diagrams by typing notation in plain text
How do I see the notation? The diagrams sure look beautiful, but I must be missing something obvious… Thanks!
jw1224··on Wikifunctions
This was my first impression as well. Huge untapped possibilities with a project like this...
jw1224··on Wikifunctions
This is brilliant! It serves as a single source of truth, builds on first principles, and acts like a universal test case.

Just as each Wikipedia article is about one "thing", each Wikifunction performs one job. Once you know a Wikifunction works reliably, you know every other Wikifunction which depends on it can theoretically trust its output.

This project seems really exciting, especially in the context of AI. Very cool and I hope to see it flourish.

jw1224··on Mtn Dew Raid Q&A [pdf]
And thanks to Sony (patent US8246454B2), this might as well be real…

https://patentimages.storage.googleapis.com/b4/2e/a1/779dd8d...

jw1224··on Ask HN: Show me your half baked project
This seems very comprehensive, thanks for sharing :) I'm working on something similar myself which involves running untrusted user-provided JavaScript... It's a little scary but I'll definitely be taking a closer look into Firecracker. Cheers!
jw1224··on Ask HN: Show me your half baked project
Thanks! Yes, it's intentionally sparse on details for the moment. I only threw the holding page up yesterday, as I was finally ready to get it running somewhere besides localhost. This is the first time I've shared it but a proper landing page is on the way!

To whet your appetite, it's a visual programming tool which aims to be easy enough for non-coders to use. Users can stack pure function calls together into increasingly powerful workflows, many of which are augmented by AI, then run them on-demand or via an API call.

Macrocosm is being designed to encourage playful exploration and creative discovery. I've been building in my spare time over the past 6 months, excited to launch very soon!

jw1224··on Ask HN: Show me your half baked project
Perhaps this is a silly question but why would you want to mock a UUID?!
jw1224··on Ask HN: Show me your half baked project
This is really cool! How did you solve the sandboxing?
jw1224··on Ask HN: Show me your half baked project
https://macroco.sm

It’s functional programming for creative thought processes.

I’m excited to launch this very soon, and hope you’ll check it out. Thanks!

jw1224··on Ask HN: Tips for Solopreneur?
This was a helpful and really informative comment. Thank you!
jw1224··on Queueing Theory: An introduction for software development
You're totally right and I agree too :) I forgot Deques (and DS) were via PECL.

It's a poor example to give in relation to the article's real-world cases. Nonetheless, it is relevant to queue theory, and knowledge of how, why, and when these data structures can be more optimal than simple arrays has helped me more broadly in the past.

A much more real-world example would be Laravel Horizon, which uses Redis queues to build scalable distributed systems very easily. The last time I set it up I think it took me 5 minutes at most... https://laravel.com/docs/10.x/horizon

jw1224··on Queueing Theory: An introduction for software development
> I enjoy knowing a little bit of queue theory because it is a subject where not only can you gain an advantage in many areas but few people will be able to figure out why

Yes! I’ve been building web applications for 15 years, but queuing systems were rarely discussed with any importance. I only picked up on it in the past few years, but since then, I consider it one of the most commercially-beneficial ways to scale and grow most kinds of software.

When it comes to scaling, it seems like 90% of the advice just focusses on RDMS, optimising indexes, etc. Database theory is vitally important to understand, but I now consider queue theory essential knowledge for modern application developers too.

Case in point: over the years I’ve reviewed thousands of PHP projects, articles, blogs, and other resources in the ecosystem. There are more guides to scaling Nginx or optimising MariaDB than I could ever need.

But I simply never see any discussion or usage of the low-level queue features offered by the language, like Deques: https://www.php.net/manual/en/class.ds-deque.php

I appreciate these have niche use cases, but a background queue handler builds on this kind of understanding, and is general purpose.

Knowledge of queue theory directly helped me scale my own projects, in ways I couldn’t have imagined otherwise.

jw1224··on GPT-4 is not getting worse
Definitely an API fault, but that library issue is the only place anyone's discussing it so far. OpenAI support were no help, I waited several weeks and they just sent back an autoreply linking to their docs.
jw1224··on GPT-4 is not getting worse
I've tried making manual requests without an SDK, exactly the same thing happens. Even when you don't use streaming (wait for the full response), it still occurs.

Whilst the bug is API-specific, there's no other way to report this, and that issue is the only place I've found anyone discussing this.

I contacted OpenAI support about it, waited several weeks, and just got a generic useless autoreply back.

jw1224··on GPT-4 is not getting worse
I lost countless hours debugging this, finally I came to the conclusion it must be unintentional because:

  1. It's undocumented. None of the regular rate limit responses are returned.
  2. You're charged for the full generation length. So if the output takes 10 minutes to generate, that's what you'll pay for (despite only getting half back).
  3. It defeats the point of the larger context limit models. Why offer a 32K model if it fails after ~6K tokens?
  4. The server response doesn't include any error codes or message, it simply terminates unexpectedly. Hit any of the actual rate limits, and you get told about it.
I'd expect to be able to generate output until the model reaches its context limit, or a stop sequence is detected, or I hit an actual documented rate limit.

We're paying for these requests in full. We should get the full response back!

jw1224··on GPT-4 is not getting worse
> Unless training included line-level skips

Yes, of course — GPT-4 was trained on all common character sequences, including linebreaks and other invisible characters.

You can see how it works here: https://platform.openai.com/tokenizer

Nonetheless it doesn't need to have seen examples of line-level counting before. The "concept-level associations" you mentioned are an emergent property of the model, it forms its own concept-level associations as a result of being trained on such a massive dataset. It's what enables it to output original content which has never been seen before.

jw1224··on GPT-4 is not getting worse
I think it's just some networking misconfiguration they haven't noticed. I can't see them intentionally trying to prevent DoS this way, that's what API key rate limits are for (it would be a very expensive and slow DoS otherwise!).
jw1224··on GPT-4 is not getting worse
Your question:

  > How does chat-gpt actually get this right? 
Your answer:

  > its output is purely probabilistic, based on existing corpus of text
Because GPT was trained on existing text, some of which included numbers and counting, it's learnt the natural ordering of most common/everyday numbers.

For larger or more complex numbers, it's learnt the patterns behind how they're constructed linguistically, which allows it to output a written count in sequence.

This same pattern recognition doesn't work anywhere near as well for actual numerals (e.g. "47600", instead of "forty seven thousand six hundred"), as the tokenizer tends to break long numerals apart (e.g. into ["476", "00"]).

← PreviousPage 2 of 11Next →