Better HN
topnewbestaskshowjobs
Log inSign up

LeftHandPath

1,023 karma · joined Sep 5, 2019 (7y ago) · 298 submissions

The name is based on a Gilfoyle quote from Silicon Valley.
Submissions

comment 1y ago · link · parent

1: Actually, that's not true! I use Leptos in their "islands" mode for server side rendering. The entire page is sent as an HTML response, and there is little/no "hydration". The WASM file ONLY includes interactive "islands" that are explicitly marked with the #[island] attribute [0]. In other words, the server binary is handling most of the rendering, similar to if I used a templating tool like Askama or Tera.

2: Leptos is generally slower than vanilla JS, I believe for that reason, but comparable to major JS frameworks [1, 2].

[0]: https://book.leptos.dev/islands.html

[1]: https://krausest.github.io/js-framework-benchmark/current.ht...

[2]: https://leptos.dev/

comment 1y ago · link · parent

I liked the Leptos JSX syntax and I feel like Dioxus is addressing a different problem. Dioxus specifically markets itself as a tool for universal app development. I looked at it, Perseus, Askama + JS, etc, but ultimately thought Leptos seemed like the best to dive in with.

For charts and plots -- I was thinking about the same thing today, actually! I've usually done those manually with SVG and JS. I was wanting a framework, and spent 30 minutes or so today looking at tools to use R diagrams on the web [0]. Also thought a little bit about making my own library. There are existing libraries like Plotters that should plug and play with Leptos just fine [1], but I haven't tried any yet.

[0]: https://m-clark.github.io/webR/visualization.html

[1]: https://docs.rs/plotters/latest/plotters/

comment 1y ago · link · parent

The only hitch was figuring out how to get server side includes not to break the WASM compilation (the solution was adding #[cfg] and #[cfg_attr] guards around the diesel use and derive rules). Other than that, it just worked - it’s so damn easy!

I always thought WASM would be difficult to use. With Leptos, it’s easier than JavaScript.

comment 1y ago · link · parent

I’ve always loved Haskell as well, although the most I did with it was writing a small language interpreter for a CS class.

It’s amazing how much better major languages could be. They’re slowly getting better - I started out using PHP 5 at work, and the improvements since then (eg PHP 8.4) are HUGE. I’ve used modern C++ extensively as well.

I love Rust more than either.

If you like Ruby, Loco RS is really neat as a(n immature) Ruby on Rails replacement.

comment 1y ago · link · parent

I've enjoyed what I've done with Axum thus far. I ultimately opted to use Leptos on top of it, so I don't really use it directly at this point. But it's neat.

For a long time, I used PHP and JS/TS for web projects. Now I'm using Rust with Axum/Tokio/Tower/Hyper (web server), Leptos (SSR using "Islands" flag, which also allows WASM generation for front end; JSX-like syntax), and Diesel (ORM and query builder that expects you define your schema using raw SQL). (I also leapt from DB2, MySQL and MariaDB to PostgreSQL)

It's heaven.

comment 1y ago · link · parent

They built their phishing emails using data scraped from public profiles. Fascinating.

I have to wonder if, in the near future, we're going to have a much higher perceived cost for online social media usage. Problems we're already seeing:

- AI turning clothed photos into the opposite [0]

- AI mimicking a person's voice, given enough reference material [1]

- Scammers impersonating software engineers in job interviews, after viewing their LinkedIn or GitHub profiles [2]

- Fraudsters using hacked GitHub accounts to trick other developers into downloading/cloning malicious arbitrary code [3]

- AI training on publicly-available text, photo, and video, to the surprise of content creators (but arguably fair use) [4]

- AI spamming github issues to try to claim bug bounties [5]

All of this probably sounds like a "well, duh" to some of the more privacy and security savvy here, but I still think it has created a notable shift from the tech-optimism that ran from 2012-2018 or so. These problems all existed then, too, but with less frequency. Now, it's a full-pressure firehose.

[0]: https://www.wsj.com/politics/policy/teen-deepfake-ai-nudes-b...

[1]: https://www.fcc.gov/consumers/guides/deep-fake-audio-and-vid...

[2]: https://connortumbleson.com/2022/09/19/someone-is-pretending...

[3]: https://it.ucsf.edu/aug-2023-impersonation-attacks-target-gi...

[4]: https://creativecommons.org/2023/02/17/fair-use-training-gen...

[5]: https://daniel.haxx.se/blog/2024/01/02/the-i-in-llm-stands-f...

comment 1y ago · link · parent

Wow. The fog example is fantastic.

...Reminds me of how I ruined my old wallet, hiking thirty miles on a foggy day in Algonquin Provincial Park.

comment 1y ago · link · parent

I've been spending about ~10 hours a day on a startup idea I had recently, but if that falls through, I'll be in touch

comment 1y ago · link · parent

It’s worth noting that a lot of rust frameworks have code generators and the like that emit a lot of lines quickly.

I’m working on a web app with Axum, Diesel (type-safety on my Postgres stuff), and Leptos (in “islands” mode, allows me to write my server side HTML using JSX-like syntax within Rust, and client side WASM). It’s actually incredible how much it can accomplish with a relatively simple file tree.

I originally started with Loco, which is rails-like. It spits out something like 80 files every time you make a scaffold. It felt exactly like what you describe — too much code to do something that should be simple.

comment 1y ago · link · parent

Dear, this is a dangerous bit of information to discover. Incredibly tempted to spend wayyy too much time making an SVG of the ISS and animating it based on this.

comment 1y ago · link · parent

When I started writing code, I was using NotePad++ and tracking versions by... file name suffixes. And occasionally writing stuff on paper by hand, for the hell of it. It was awful. Discovering Git about a month into my programming career was, of course, a game changer.

The first IDE I used was Zend Studio [0], because I was writing a PHP application for the IBM i Series, and Zend pushed their IDE along with their licensed server [1]. (Note that in modern times, with IBM OSS for PASE, PHP for the IBM i can be sourced from e.g. Seiden Group for free). Zend Studio is eclipse based, and terrible - their modern landing page advertises PHP 7.1 support. About a month into using it (this would be sometime circa 2018), IIRC, the whole thing broke while I was tinkering with basic appearance preferences, and the application would no longer open. Instead of fixing it, I asked my manager if we could buy a PHPStorm license, since I kept seeing it mentioned in blogs and tutorials and it sounded nicer.

PHPStorm was an absolute game-changer. It was the first time I experienced the miracle of modern language servers. Go to definition? Holy shit! It can see errors before I test the code?! IT CAN HELP ME SPOT ERRORS IN MY JAVASCRIPT?

My PHPStorm license was probably the single highest ROI expense my company ever took on my behalf. That led to all sorts of rabbit-hole learning, like setting up gulp with babel and sass and autoprefixer back when we were supporting all the way back to IE10 on our websites.

When I went back to school for a BS CS, I downloaded CLion expecting as-good support for C++ (our curriculum's language) as PHPStorm had for PHP. I was a little disappointed, but from what I hear CLion is much better now (with the Nova engine). On another note, JetBrains threatened to suspend my account when they saw me using an educational CLion license on the same account as my corporate PHPStorm license... Explained my way out of it (as I was using the licenses correctly / following EULA) but it was a sour moment, especially considering they recommended people join all of their licenses (personal & professional) under one account [2].

Regarding CoPilot: I haven't used it and probably won't, unless they add truthiness to LLMs. I've found that actually typing my code is rarely the bottleneck, and sparing myself from typing is the "value add" most coding LLMs offer.

[0]: https://www.zend.com/products/zend-studio

[1]: https://www.zend.com/products/zend-server/ibmi

[2]: https://sales.jetbrains.com/hc/en-gb/articles/208460135-Can-...

comment 1y ago · link · parent

I started my life as a dev with PHP, learning it on the job to set up a custom Wordpress theme with plugins for special datatypes (eg STCs).

When I was 21, they offered to pay for my tuition so I went back for a CoE degree (later switching to CS). The moment I touched C++ - on my very first day in their “intro to programming” class - I fell in love. The type system, debugging, and ecosystem was fantastic compared to PHP 7 that I was using at the time. With my manager's permission, I went back to some of our existing intranet apps and built a C++-based API for them that our PHP would call over a web-socket, so that I could leverage the type system (and performance). Those systems are still in daily use, company wide. Maintenance hasn't been a problem. And that’s despite running in a really weird environment (IBM Pase for i).

Now, after using Rust and Axum, I'd vastly prefer the Rust ecosystem for creating that type of API. But C++ deserves credit. It really is a great language, especially if you’re coming from web languages like (non-TS) JavaScript or PHP.

comment 1y ago · link · parent

I think they use sectioned hashes for that sort of thing. They certainly do for eg ISIS videos, see https://blogs.microsoft.com/on-the-issues/2017/12/04/faceboo...

comment 1y ago · link · parent

Earlier this year, I was at ground zero of the Super Bowl parade shooting. I didn’t ever dream about it, but I spent the following 3-4 days constantly replaying it in my head in my waking hours.

Later in the year I moved to Florida, just in time for Helene and Milton. I didn’t spend much time thinking about either of them (aside from during prep and cleanup and volunteering a few weeks after). But I had frequent dreams of catastrophic storms and floods.

Different stressors affect people (even myself) differently. Thankfully I’ve never had a major/long-term problem, but I know my reactions to major life stressors never seemed to have any rhyme or reason.

I can imagine many people might’ve been through a few things that made them confident they’d be alright with the job, only to find out dealing with that stuff 8 hours a day, 40 hours a week is a whole different ball game.

75.

Haskell: Solving Large Perfect Numbers Quickly with Miller-Rabin(gist.github.com ↗)

2 points · by LeftHandPath · 1y ago · discuss

comment 1y ago · link · parent

Would you / do you still use them? I like their branding more than PorkBun.

comment 1y ago · link · parent

Hahaha not at all, great catch. Sometimes my gray matter just totally craps out... like thinking of "changing order of magnitude" as "adding 1 extra digit".

Reminds me of the time my research director pulled me aside for defining CPU as "core processing unit" instead of "central processing unit" in a paper!

comment 1y ago · link · parent

Research is product development. Successful companies treat it with respect.

> Because in product development, there can be short-sighted industry decisions based on quarterly returns. I've also seen a constant need to justify outcomes based on KPIs etc, and constantly justifying your work, etc.

I have seen this as well. It's extremely common (especially among publicly-owned companies) and frustrating. But it's not ubiquitous. Consider LM's Skunkworks or Apple's quiet development of the iPhone, and compare it to companies that finish a product and then focus on cutting costs / nickel-and-diming their customers.

comment 1y ago · link · parent

That's very useful, I missed that when I read through the article.

If the logical qubit can have double the lifetime of any physical qubit, that's massive. Recall IBM's chips, with t-times of ~400microseconds. Doubling that would change the order of magnitude.

It still won't be enough to do much in the near term - like other commenters say, this seems to be a proof of concept - but the concept is very promising.

The first company to get there and make their systems easy to use could see a similar run up in value to NVIDIA after ChatGPT3. IBM seems to be the strongest in the space overall, for now.

comment 1y ago · link · parent

I did quantum computing research in university. We did meaningful work and published meaningful research.

Around 50% of our time was spent working in Overleaf making small improvements to old projects so that we could submit to some new journal or call-for-papers. We were always doing peer review or getting peer reviewed. We were working with a lot of 3rd-party tools (e.g. FPGAs, IBM Q, etc). And our team was constantly churning due to people getting their degrees and leaving, people getting too busy with coursework, and people deciding they just weren't interested anymore.

Compare that to the corporate labs: They have a fully proprietary ecosystem. The people who developed that ecosystem are often the ones doing research on/with it. They aren't taking time off of their ideas to handle peer-review processes. They aren't taking time off to handle unrelated coursework. Their researchers don't graduate and start looking for professor positions at other universities.

It's not surprising in the slightest that the corporate labs do better. They're more focused and better suited for long-term research.

comment 1y ago · link · parent

Re: AI, it's a long way off still. The big limitation to anything quantum is always going to be decoherence and t-time [0]. To do anything with ML, you'll need whole circuit (more complex than shor's) just to initialize the data on the quantum device; the algorithms to do this are complex (exponential) [1]. So, you have to run a very expensive data-initialization circuit, and only then can you start to run your ML circuit. All of this needs to be done within the machine's t-time limit. If you exceed that limit, then the measured state of a qubit will have more to do with outside-world interactions than interactions with your quantum gates.

Google's willow chip has t-times of about 60-100mu.s. That's not an impressive figure -- in 2022, IBM announced their Eagle chip with t-times of around 400mu.s [2]. Google's angle here would be the error correction (EC).

The following portion from Google's announcement seems most important:

> With 105 qubits, Willow now has best-in-class performance across the two system benchmarks discussed above: quantum error correction and random circuit sampling. Such algorithmic benchmarks are the best way to measure overall chip performance. Other more specific performance metrics are also important; for example, our T1 times, which measure how long qubits can retain an excitation — the key quantum computational resource — are now approaching 100 µs (microseconds). This is an impressive ~5x improvement over our previous generation of chips.

Again, as they lead with, their focus here is on error correction. I'm not sure how their results compare to competitors, but it sounds like they consider that to be the biggest win of the project. The RCS metric is interesting, but RCS has no (known) practical applications (though it is a common benchmark). Their T-times are an improvement over older Google chips, but not industry-leading.

I'm curious if EC can mitigate the sub-par decoherence times.

[0]: https://www.science.org/doi/abs/10.1126/science.270.5242.163...

[1]: https://dl.acm.org/doi/abs/10.5555/3511065.3511068

[2]: https://www.ibm.com/quantum/blog/eagle-quantum-processor-per...

comment 1y ago · link · parent

Wow. Evidence is the sort of thing I've been dreaming of for a long time. Awesome work!

comment 1y ago · link · parent

In the latter part of high school, and in my early years in college as a computer engineer, I found physics and the philosophy of it really interesting. I remember the first time, in 9th grade, that our teacher showed us how to predict the bounce-height of a ball using some basic algebra. I was immediately in love with physics, and it was the first time that I realized math could be fun.

In my senior year, AP Physics C: E&M would become one of my favorite courses of my entire scholastic career (largely thanks to my teacher). While Calc 3 wasn't required for the AP test, he introduced the concepts so that he could properly walk us through the history of the field from the perspective of its founders, up to and concluding with Maxwell's equations. We read a lot of the original papers that introduced certain operators and equations, including works from Newton, Leibniz, Heaviside, Maxwell, Einstein, and Dirac. Ironically, I failed the AP exam (2/5) but had a very easy time with Calc III, linear algebra, and diff eq in college thanks to that course.

I really miss the feeling of wonder and astonishment I had when I was first exposed to these concepts -- it's been long enough that my memory of them is fuzzy now, but I don't get the same satisfaction from re-reading them.

comment 1y ago · link · parent

I recall having to implement A* to search a nxn character grid in my AI course a few years ago. It took me close to a full day to wrap my head around the concepts, get used to python (we usually worked in C++), and actually implement the algorithm. Nowadays, an LLM can spit out a working implementation in seconds.

I think that's a big part of the issue with tests like Hackerrank - LLMs have been trained on a lot of the DSAs that those questions try to hit. Whereas, if you ask an LLM for a truly novel solution, it's much more likely to spit out a garbled mess. For example, earlier today, Google's search AI gave me this nonsense example of how to fix a dangling participle:

> To correct a dangling participle, you can revise the sentence to give the dangling modifier a noun to modify. For example, you can change the sentence "Walking through the kitchen, the smoke alarm was going off" to "Speeding down the hallway, he saw the door come into view".

LLMs have effectively made it impossible to test candidates for crystalline intelligence (e.g. remembering how to write specific DSAs quickly) remotely. Maybe the best solution would be to measure fluid intelligence instead, or front-load on personality/culture assessments and only rigorously assess coding ability in-person towards the end of the interview cycle.

comment 1y ago · link · parent

Yes. See the Uniform Code of Military Justice (UCMJ): https://en.wikipedia.org/wiki/Uniform_Code_of_Military_Justi...

comment 1y ago · link · parent

Agreed. I lean towards thinking I would've wound up further behind if I skipped one or more grades, due to the social aspect. Especially given how often I moved.

Keeping the regular pace also allowed me to do a lot more extracurriculars. I started helping with quantum computing research in my freshman year of college and joined a bunch of clubs.

comment 1y ago · link · parent

That's interesting. My parents were told, in SC and FL, to have me skip a grade or two (not six!), but refused due to the social burden they expected it to put on me.

I'm not entirely happy with where I am at 26. I wonder if I'd be further ahead - or behind - if I had skipped forward.

comment 2y ago · link · parent

Interesting that most of the top comments are talking about wastefulness.

I think that's part of why everyone went to flat design - Windows Vista and glass effects looked great, but they were expensive to compute! Flat designs are aesthetically controversial, and can be more difficult to use than skeuomorphic ones, especially for older users [0][1].

Considering that realism can aid in usability, I think it's totally valid to use effects like this on the web.

[0]: https://www.tandfonline.com/doi/abs/10.1080/0144929X.2020.18...

[1]: https://www.sciencedirect.com/science/article/abs/pii/S01419...

comment 2y ago · link · parent

I went to look at array accessor overloading today and saw “Property Hooks” in the sidebar (under “Classes and Objects”).

I didn’t know what they were, so I clicked. I was bewildered that I had never run into them before, used them in my own code, or seen them used by others. Come to find out they’ve only been around for about a day!

Reminds me of some of the lovely expressibility and syntactic sugar that’s pulled me to other languages lately. Glad to see it make its way into PHP.

12345
10