Hacker Newsnew | past | comments | ask | show | jobs | submit | Theodores's commentslogin

I happen to need the inspo, some of the decorative details 'need' the SVG treatment.

The tools we have shape our graphic design and sometimes a look back through history, when they had different tools, provides a rich seam of inspiration. Thanks for the post!


As a connoisseur of SVG, I like the approach, the results, the use of Zint and WASM. That said, there are a few opportunities.

The version string isn't needed these days, nor the XML header or the doctype.

The code/url/page title can go in the SVG title, to make it show on mouseover.

The id=barcode is also superfluous. Since id codes should be unique, this could be a problem when many QR codes exist on a page.

The background rectangle does not need x=0, y=0 since that is implied.

The 'hard coding' of the black and white is what you want to avoid any dark mode issues, however, I would still use currentColor and transparent rather than black, just to put myself in a world of dark/light mode pain, fixed in CSS.


This is super cool, thank you!

The SVG is actually generated by Zint itself, only lightly patched in the wrapper. Zint is a pretty old barcode generator (not meant disrespectfully, quite the opposite actually), it's quite possible that some of its decisions when rendering to SVG are out of date or very conservative. The use of id/global namespace does feel like a potential pain point though, which I will take up with the upstream project.


You have given me the encouragement I needed...

Recently I put some 8-bit graphics in SVG using lines and stroke dash arrays. I also got them animated, in a space efficient way, by keeping the lines that do not change from frame to frame. (I now have Maria and Willy from 'Jet Set Willy' for the wait after a form is submitted, plus a few Space Invaders. I am resisting the urge to do Pac-Man ghosts, but I will invent a need for them...)

Since an SVG can be a mystery box full of CSS, SMIL, Javascript and 'foreign object' imports, I am tempted to give it a go, so that a CSS variable is passed to the depths of the shadow DOM in a URL fragment or query string, to magically return either a barcode or a QR code.

This will take a little while, but I am keen to give it a go. In some ways, SVG is like 'Duplo LEGO' with the Libre Barcode as a font more like 'LEGO Technik', requiring vastly more skill.

Just because you can doesn't mean that you should, plus there are many barcode libraries that I know well, so why reinvent the wheel?

The typical barcode library usually comes with fluff, formats and libraries that I don't need. Hence 'qr.svg#upc-number' with it just being one file has appeal.

I am not yet up to speed on the latest AI toys, however, given the problem space is well defined, could I just ask AI chat bot to churn out the code for this in a matter of seconds, for it to encapsulate the logic in an SVG? Would it know how to specify 'crisp edges' and what the deal is with aspect ratio?

Similarly, could I also ask the AI nicely to create my own barcode font?

These seem manageable problems for todays trillion-dollar wonder tech, it is not as if I am asking for a cure for cancer or anything hard, yet I lack confidence in an AI solution, and feel I might as well work it out myself, given my goal is learning SVG rather than prompting.

My lack of confidence is the AI solution is due to the scarcity of people writing online about doing cool things with CSS variables, URL fragments and code in SVG. A Google search does not show 'stroke dash array' things for QR codes and online QR code generators create lots of fully fledged rect-angles, that lack the space efficiency or human-readability of my prefered approach, even if gzip doesn't care.

Sorry for bringing AI into everything, I just have my doubts that the new toys are that capable when it comes to novel solutions.


Sometimes I look at dystopian futures from literature and wonder what the problem is.

I suspect some might prefer 1984 for the stability, some might prefer Brave New World for the Soma and some might prefer Wall-E because life looks good with B+L.


The helmet business is amazing, and proof that one is born every minute. It deserves to be shown how many logical fallacies there are. Top of the list is anecdotal evidence, everyone with a mouth can tell you about someone that had their life saved by magic styrofoam.

There is a grain of truth to the anecdotal claims. But, even then, this is very much an imagined grain of truth. What makes it fun is if you work for a specialist bicycle shop or up the chain, distributing thousands of helmets. With customer interaction at the showroom level, fitting hundreds of helmets, then selling gazillions at B2B, the question has to be asked, where are the broken ones, the one sent back for money off, as a replacement discount?

Indoctrination into the polystyrene club is also very easy. Customer buys new bicycle, customer gets upsold a helmet, as an easy win. The far more practical high vis jacket costs $5 and you make no profit on that, whereas the $50+ polystyrene is just money for the taking.

The testing was originally to a SNELL standard, but the helmets were too heavy. So manufacturers switched to the lame self-test consumer testing, 'trust us bro'. This became the new benchmark, anything aiming at SNELL or other meaningful test just did not survive the market.

Hence I keep it simple. If cycling for conspicuous leisure purposes (fitness, racing, stunts) then get the helmet and make sure the straps are tight. You will need it for organised events so you might as well get used to wearing it.

If not cycling for conspicuous leisure purposes, but merely for transport, whether that be the commute or errands, then you don't need a helmet. Get the lights, mudguards and high vis instead.

I am learning the counter-logical-fallacies, so I can counter the life saved anecdote with quality nonsense that has the same logical fallacies. For example, "I know a true Scotsman that has been cycling every day for fifty years without a helmet. Once he got hit by a car and his life was saved because he was not wearing an ill-fitting helmet, he would have been strangled by the straps had he been wearing a helmet, plus the driver would have given him less room, so the accident would have been far worse."

I digress, as for the article, the helmet is excellent for conspicuous leisure cycling. Now give me your money!


Of course, wearing a helmet is a choice and many get on just fine without it. I've come off my bike enough times where my helmet prevented a nasty bump to the head to wear one, but I suspect I'd have survived just fine without it. I view my helmet as insurance against my own incompetence - slipping on a wet manhole cover for example. For context I ride thousands of km a year for transport, but have done much riding as a conspicuous leisure activity too. I just wear a helmet and I'm not really bothered by it.

Ah, but it is new to Claude. Claude has main character vibes, so it is always about Claude. Isn't he clever?

Claude can stay in his own lane, I want to know how I can use this during development to simulate uploading photos, so Chrome only is okay for my purposes. But I want to know how to do it, not how much better Claude is than me, forever able to do anything I can do but better.


> But I want to know how to do it, not how much better Claude is than me, forever able to do anything I can do but better.

So tell the clanker to explain to you in detail about how the system works? It's a piece of code that does what you tell it to, treat it as so.


Well, at least he wasn't in the Ep*tein files!

There seems to be some top twenty that rank highly, probably in part due to them being in the files that can't be named!


Context matters, and a big country house in England is not the same thing as a McMansion, unless it is an American inspired newbuild, and plenty exist.

In former times the servants lived in the top floors and worked in the basement floors of a city town house, with 'mews' nearby for the horses. A land owning family with servants was more like a 'small village' than a big house.

The big country house and the estate generally was built from the profits of slavery, so it was 'slavery all the way down', with the English 'slaves' called servants.

Every chunk of stone had to get there by train, canal or by horse power. Irish 'navvies' did the work, so another category of slaves.

Upkeep on these properties was a never ending task, so there was also a requirement for untold amount of handymen, gardeners and the rest of it. Just think of the lawn, which was beyond what the common man could dream of, most peasants did not have gardens as every inch of whatever land they had would be growing crops. The lawn, was a display that the landowner had that much land that he didn't need to have crops on it. With no lawnmowers or RoundUp, a lawn was quite a challenge, whereas today it is just an easy cop out, since RoundUp kills everything that is not a grass.

The whole point of America was 'no kings'. So why the McMansions is probably due to the lack of a class structure, since, if everyone (white male, northern European) is supposed to be equal, the only way to flex status is with a big truck and a McMansion with extra toys. Nobody is getting a medal from the king with a peerage in the House of Lords, are they?

Also, before WW1, in England there was a tradition of craftsmanship. All the guys that could do beautiful work in stone, wood and topiary died in WW1, taking their craft with them. This was not a problem as mechanisation meant that machines could make a lot of this stuff.

In today's world a very large townhouse or a OG English mansion is not going to work as a home. There is too much to clean, heat and maintain, plus, it actually is like a prison being that isolated. The scores of servants made sure these places were hives of activity, and viable as a community of sorts.

The McMansion is a very different beast. They are not good.

As for the article, it is useful in the context of the dreaded ballroom. Clearly there is a proportions issue. But look at the White House and how that works, with lots of people calling the place home and work. The original English Mansion was more like that, not just this stupidly vast space for two people to 'live' in.


My home town was famous for the red cloth that the British Army used to wear. This same red cloth was the main 'trade cloth' for the East India company and native peoples, the world over, just wanted it. The East India company wasn't paying for stuff in silver, the red cloth was worth more than that.

As for why my home town dominated the red cloth trade, well, there are reasons. The 14th century plague is part of the story as that is when sheep took over the land. Thanks to the British weather, the sheep developed a hard wearing wool which was perfect for the armies of the world and for clothing the slaves of the world.

Then geology came into play, with an abundance of Fuller's Earth, important for getting the wool clean. Coupled with that were teasels, necessary for processing the wool. Even the water comes into it, since the Industrial Revolution started with water wheel power.

Eventually competition came from Yorkshire for this particular broadcloth. Many aeons later, WW1 came along and charging into battle with red tunics became somewhat fatal. That was it for the product.

Sure, this particular red is one of the billions of colours out there, so it is of no surprise that it is omitted, however, the history is awesome, but you need someone that knows their history to tell the story.

LLMs lack passion and the ability to interpret varying sources in the way that a historian can. Notionally there is depth of knowledge with LLMs, since everything ever written is known, but then there is no depth of knowledge. You read, and read and read, to learn very little.

We have an interesting 'just because you can, doesn't mean you should' aspect of LLMs. I appreciate that, superficially, this website looks awesome, but who is it for?

As a HN person, I need P3 OKLCH colours and I have an expectation that the colour in question will stay on the page, at least as a sticky header. I would also expect a 3D-modelling style 'sphere', showing the specular highlight, diffuse and ambient lighting to be showing how the colour works. I appreciate that my art friends have no idea what I am on about here, so what do they get?

Here is an example from the pre-LLM days:

https://uk.winsornewton.com/blogs/articles/winsor-blue

Anyone British that has an artist's studio and a brush will have many, many Winsor and Newton colours, they are a major brand and truly storied, at least in the UK. Clearly they put some effort into 'evergreen content' by writing up their various colours.

As for whom they are writing for, they have customers! They didn't pay people to write blog articles just because they could, they did it because they should. They have product to shift.

I am sure they did a little bit of keyword stuffing with their blog articles, as was the fashion, and all of it is 'marketing', but still, it is much better writing than anything LLM.

Getting back to 'should' and 'could', the crux of the matter is if you have something of value. True value, according to some economics people, is a product of human labour, with machines not really cutting it, unless you count the human effort needed to design, make, maintain and calibrate the machine.

It is a bit of a controversial opinion, however, I think the only value of doing things the LLM way is just that, you can prove that you can do things the LLM way. This is legitimate in a job marketplace that demands AI with everything. But, once that novelty has worn off?

We will see what survives the test of time. Maybe Winsor and Newton will sack their content creators and just get an LLM to churn out blog articles. But, would any of that have any value?

Nope.

Would any of it survive the test of time?

Nope.

An added aspect to LLM use is criticism. Humans deserve respect and you can't just go around dissing the hard work of others because that just is not nice. But, use an LLM and you can basically say 'that is a load of rubbish because you cheated'. Painful.

That aside, you do have something that could be really good. But you can't leave the reader underwhelmed or else they won't be back or signing up for more. Writing original content is hard. If I had to write an essay for school homework on my hometown's special red colour, it would take me all week to do research. Even then I would have barely scraped the surface. Writing a compelling essay would also require skill at writing, plus I would need someone else to proof-read, edit and fact check for me.

For the next colour I would be back to square one, and if this colour took me far from the history and culture of my home town, I might be way off the mark with assumptions made. Note that Winsor and Newton would not hire me, if writing that slow, unless I was a 'distinguished fellow' at some art place of note.


Too easy. In the UK there are far more torturous roundabouts, for example, Five Ways in Birmingham, notable because you have to inch forward up a hill, always in traffic, typically with a manual gearbox, to finally get to the roundabout where the three lanes of traffic seems to already be doing 50 mph, meaning that you have to channel your drag racing skills to just get on there, without slipping backwards, damaging the clutch or coming a cropper.

London has some specials too, including the traffic around Hyde Park Corner, which is like a roundabout in vacuum form. Should so much as a square foot of tarmac become vacant then it will magically suck in four taxis, two double decker buses and a dozen UberEats delivery guys, making any progress tough.

Chiswick roundabout, where the M4 motorway, gateway to the West, begins is also not for those lacking testicular fortitude, my mum got stuck going round and round that one, we weren't quite dizzy by the time we got off, but it was getting that way.

All is nothing though. You have got to do France, Arc de Triomphe. Cobblestones, many, many lanes, every car with dents in it and priority given to those entering the roundabout rather than those on it already. No American in an American vehicle would be able to make it through that one!


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: