Better HN
topnewbestaskshowjobs
Log inSign up

doodlesdev

3,169 karma · joined Nov 9, 2020 (6y ago) · 852 submissions

Hi, how's your day?

https://www.doodlesdev.com

Submissions

391.

Everyone Has JavaScript, Right?(kryogenix.org ↗)

4 points · by doodlesdev · 3y ago · discuss

comment 3y ago · link · parent

   > I’ve used Angular, Dart, Backbone, Ember, Elm, React, Vue, Svelte, and a few others I can’t remember anymore. All in production systems, not demo projects. Also some of the “build it once” platforms like Meteor.
That's quite a lot of libraries lol, I guess no one can say you just haven't found the right library

I must admit I've used Hotwire much less than I should've, but I still feel comfortable with full-stack JavaScript (or rather, TypeScript).

You said you migrated back to Turbo, what backend framework do you use? RoR with Hotwire is so nice, but I personally avoid it because of Ruby (not personally a fan), to be fair the same is true for most full-stack frameworks I avoid (such as Django/Python).

comment 3y ago · link · parent

I personally enjoy Svelte.

comment 3y ago · link · parent

   > Finally, we cut to the chase. This is 100% true, and we should be talking about this, because it’s still not settled: do we want web pages or web apps? If both, where is the line? Can you expect something like Slack to work without JavaScript? What about a blog with interactive graphs? Should everything degrade or should some things require JS/WASM?
BINGO. At times, it seems everyone is talking through each other because we are thinking of different things: static pages, dynamic websites, web apps, etc. all require different approaches to development. Honestly, what gets me real mad is when you need to run JavaScript to see a static page, I just can't stand it, one lovely example is the blog post we are talking about which displays awful without running JavaScript, this proves that indeed HTMX is not a panacea, and you can also "hold it wrong" (the blog post in question uses HTMX in the backend).

Overall, I believe most applications do well with a graceful degradation approach similar to what Remix offers and then everyone copied (the idea of using form actions webforms-style for every interactivity, so it works with and without JavaScript). I do agree that things like Slack, Discord, Element, or otherwise things we would call web apps are acceptable to be purely SPAs or not gracefully degrade without it enabled, the biggest problem I have with these is that they exist as web clients in the first place: the world would be a different place if approaches such as wxWidgets has paid off and gotten adopted, imagine how many slow and bloated web apps could've been beautiful and fast native applications. One can dream. I'm not that pessimistic, not yet.

comment 3y ago · link · parent

Hotwire is appropriate (I imagine you're not using actual Turbolinks which has been deprecated) with RoR or whatever stack you want, I agree it's great developer experience (despite Ruby and Rails being painfully slow haha).

I wonder which full-stack JS framework you used that you thought made life harder? One of the things that gets me mad is the idea of putting it all in one single box, as React is indeed very (needlessly) complex and so can be other libraries, but that doesn't mean the paradigm of JavaScript front-to-back is fundamentally flawed.

edit: Something else I should've added to my comment is that the HTMX approach is terrible if you ever need more than just the web-client (i.e. a mobile app, native or otherwise) since you will now have to implement an API anyway, which you could've done in the first place by taking the usual approach to development.

comment 3y ago · link · parent

No it's not. Honestly, the fact that this website displays like shit without JavaScript enabled is ironic considering it uses HTMX.

Please just use the damn full-stack JS frameworks, they make life simpler, just wait for WebAssembly to allow us to have full-stack Rust/Go/whatever frameworks, and then you can abandon JavaScript, otherwise you get the mess of websites like this one where the developer has not written JavaScript, but the website still needs it for me to be able to read a _damn blog post_.

Otherwise, stick with RoR, Django, Laravel, or whatever ticks your fancies, but HTMX just ain't for everyone and everything, it's supposed to be used for hypermedia, not for web apps or anything else, just that: hypermedia.

And no, JavaScript libraries aren't all "complicated" and "full of churn", React is. Stop using React, or otherwise accept the nature of its development, and stop complaining. There are hundreds of different JavaScript libraries and yet every single time I see people bashing on full stack JavaScript they just keep repeating "React" like it's the only library in the world and the only way developers have written code for the last decade.

Also, tangentially related, can we as an industry stop acting like kids and stop following these "trends"? The author talks about a "SPA-craze" but what I've been seeing more and more now is the contrary movement, however it's based on the same idea of a hype cycle, with developers adopting technology because it's cool or whatever and not really considering what are their actual needs and which tools will provide them with that.

Rant over.

397.

List of Open Sourced Fine-Tuned Large Language Models (LLM)(medium.com ↗)

4 points · by doodlesdev · 3y ago · discuss

comment 3y ago · link · parent

Curiosity: Not everyone in Hacker News has the same opinions.

399.

Yuzu – The most popular, open-source, Nintendo Switch emulator(github.com ↗)

2 points · by doodlesdev · 3y ago · discuss

comment 3y ago · link · parent

That's really interesting, indeed I can reproduce this by changing the comment. I also managed to get correct output for this sample by renaming the function.

comment 3y ago · link · parent

The model is way too small, comparing it to Codex feels disingenous. Sure it's 77% smaller, it's also 77% worse. Although, it's a cool project nonetheless.

For instance, even this simple snippet generates wrong inline completions:

   // Only return even numbers bigger than 10 from the array
   const arrayFilter = (array) =>
Replit-code-v1:

   // Only return even numbers bigger than 10 from the array
   const arrayFilter = (array) => {
     return array.filter((item) => item > 10);
   };
Gets it wrong, returns odd numbers.

Codeium:

   // Only return even numbers bigger than 10 from the array
   const arrayFilter = (array) => {
     return array.filter((num) => num > 10 && num % 2 === 0);
   };
ChatGPT (GPT-3.5 Turbo) - Code-only, without the rest of the completion since it's instruction-tuned:

   const arrayFilter = (array) => {
     return array.filter(num => num % 2 === 0 && num > 10);
   }
Not comparable at all. For reference if anyone wants to test I ran this through the HuggingFace space using the default parameters, ChatGPT through chat.openai.com, and Codeium through the VSCodium extension on an empty JavaScript file.

comment 3y ago · link · parent

If you hash before sending anything over the wire then the hash of your password is now your password, meaning that if it leaks it amounts to basically the same as your password leaking. Granted, applications may choose different hashing algorithms, provide their own clientside salts, etc. which would be really nice. To be fair, I believe more systems should be doing this nowadays, it's really weird to have to send your actual password to the website if a hash would suffice. Then the website could store the salted hash of the salted hash of your password in their database.

Programs such as Bitwarden already do this, where you send the hash of your password to the server instead of the password itself, because from the password you derive the decryption key and you never want that reaching the server. You then use that hashed password as the authorization password, but the client uses the actual password to decrypt the delivered password vault.

comment 3y ago · link · parent

   > never got any virus
That you know of...

   > I monitor my running processes frequently
PSA: Search for something called lolbin. Short for "living off the land binaries". Not every malware needs to have it's own process or will be easily identifiable when looking at a process list.

Anyways, you can simply disable feature updates on Windows and keep the security ones until that specific version reaches EOL: https://www.bleepingcomputer.com/news/microsoft/take-control...

404.

Netlify Gotrue – SWT based API for managing users and issuing SWT tokens(github.com ↗)

1 points · by doodlesdev · 3y ago · discuss

comment 3y ago · link · parent

Honestly moving from GitHub to Azure Repos is kind of a braindead move lol, at least if your objective is to get away from Microsoft.

comment 3y ago · link · parent

Yeah an actual substitute to Discord would be matrix.org, not Signal.

407.

Privacyguides.org – The guide to restoring your online privacy(privacyguides.org ↗)

77 points · by doodlesdev · 3y ago · 14 comments

408.

Nextcloud - FOSS alternative to Google Workspace(nextcloud.com ↗)

2 points · by doodlesdev · 3y ago · discuss

409.

Firecracker – Secure and fast microVMs for serverless computing(firecracker-microvm.github.io ↗)

3 points · by doodlesdev · 3y ago · 1 comment

comment 3y ago · link · parent

Vercel (then called Zeit) developed NextJS themselves. I believe swyx meant React when he said "framework", even though one can argue that's technically incorrect it's been commonplace for some time to call it a framework.

comment 3y ago · link · parent

Couldn't they have used CryptMT [0] instead of MT19937 (or whatever mersenne twister implementation they had)? Saying mersenne twister should not be used is a bit misleading as it all depends on the specific implementations and needs of the application.

Anyhow, they could still have used webcrypto through WASM or even through JavaScript (as they can send the data back). This is really not a problem with WASM but moreso with the stupid implementation of this wallet.

edit: According to this PR they were indeed using std::mt19937 [1]. In fact I would go further ahead and say this is a general issue of C++ itself which just does not provide good PRNGs in the stdlib at all, with multiple ways of achieving different (but similarly broken) PRNG results.

[0]: https://en.m.wikipedia.org/wiki/CryptMT

[1]: https://github.com/trustwallet/wallet-core/pull/2240

comment 3y ago · link · parent

It also just happens to be a great portal conductor.

comment 3y ago · link · parent

   > Alright, I've been thinking. When life gives you lemons, don't make lemonade! Make life take the lemons back! Get mad! I don't want your damn lemons; what am I supposed to do with these? Demand to see life's manager! Make life rue the day it thought it could give Cave Johnson lemons! Do you know who I am? I'm the man who's gonna burn your house down... with the lemons! I'm gonna get my engineers to invent a combustible lemon that burns your house down!

comment 3y ago · link · parent

We are talking about different products though, I believe you can have your webpage hosted on Cloudflare Pages or behind Cloudflare CDN without enabling invasive "bot" detection.

comment 3y ago · link · parent

Show that landing gear that can handle an impact at 1km/s, I'm pretty sure there's a lot of nation states out there that would be interested.

comment 3y ago · link · parent

   > Our system thinks you might be a robot!
   We're really sorry about this, but it's getting harder and harder to tell the difference between humans and bots these days.
Yeah, fuck you too. Come on, really, why put this in front of a _blog post_? Is it that hard to keep up with the bot requests when serving a static page?

comment 3y ago · link · parent

Disable JavaScript

comment 3y ago · link · parent

   > Furthermore, simplified metrics frequently distort incentives. If graduation rates are the metric by which funding is determined, then a school might do whatever it takes to bolster them. Although some of these efforts might add value to students’ learning, it’s also possible to game the system in ways that are counterproductive to actual education.
I thought this part of the article particularly interesting. The problem is not just the access to data, but the obsession to optimize the numbers shown. The solution is to understand that:

   whenever a metric becomes a target, it ceases to be a good measure
Which is known as Goodhart's Law [0]. The problem with transparency and any kind of data is that you should be very careful when choosing your metrics and targets, as statistics can be deceiving. Unfortunately, this is probably too complicated to institutionalize in large groups of people who might not get the point, so ultimately a balance has to be chosen between transparency and confidentiality.

In the case of medical records, I believe doctors should have the option to write two notes: One accessible to the patients and the other for medical staff, without the option of sharing it. I fear the consequences of their work being so transparent could ultimately lead to bad communication and in the worst case leading to the wrong treatment.

[0]: https://en.wikipedia.org/wiki/Goodhart's_law

comment 3y ago · link · parent

You clearly never met anyone with BPD.

comment 3y ago · link · parent

Which repo did you look at? The one at [0] seems pretty active, specially for an application that probably doesn't need updates all that often anyways.

[0]: https://github.com/iiab/iiab

1
131415
29