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

Any recommendation for a prettifier / SQL linter?


I'm curious about this for DuckDB [1]. In the last couple months or so I've been using DuckDB as a one-step solution to all problems I solve. In fact my development environment rarely requires anything other than Python and DuckDB (and some Rust if native code is necessary). DuckDB is an insanely fast and featureful analytic db. It'd be nice to have a linter, formatter etc specifically for DuckDB.

There is sqlfluff etc but I'm curious what people use.

[1] DuckDB SQL dialect is very close to Postgres, it's compatible in many ways but has some extra QOL features related to analytics, and lacks a few features like `vacuum full`;


Since you're using python, have you looked into sqlglot? I think it has some pretty-print options.

https://github.com/tobymao/sqlglot


sqlfluff is better than https://github.com/darold/pgFormatter , but it can get confused at times.


IDEA if you want to use it for other things (or any other JetBrains IDE). Nothing comes close feature-wise.

If you don't:

- https://www.depesz.com/2022/09/21/prettify-sql-queries-from-...

- https://gitlab.com/depesz/pg-sql-prettyprinter

Or https://paste.depesz.com for one-off use.


i think the idea sql prettifier is pretty silly sometimes. it really likes indenting stuff to make sure things are aligned, which often results in dozens of whitespaces


It makes it easy to distinguish null vs not null columns and other similar things, so I personally don't mind.


It's more about queries like (dummy example)

    RETURN CASE
               WHEN a = 1 THEN 1
               ELSE 2
        END;
where it insists on aligning WHEN past CASE. I think it would be perfectly reasonable to indent WHEN and ELSE 4 spaces less, for example. Similar things happen with nested conditions like (a or (b and c)) all getting pushed to the right


prettier plugin sql, or pg_format


+1, strongly. Anybody selling meditation as a silver bullet is deluded or selling something.


I unplugged my AirGradient a couple days ago. It's quite the useless piece.

The CO2 sensor does not read CO2 levels, and recalibrates automagically. I have completely wacky readings from it, from 200ppm to 2000ppm.

The VOC sensor also apparently does not read VOC levels, see discussion here: https://forum.airgradient.com/t/measurement-values-for-the-a....

All in all, I'm frustrated I fell for the regular free advertising they get on HN.


Achim from AirGradient here.

I'm often personally going on Zoom call with customers to make sure they get 100% out of the monitor and address these types of questions. Please send me a note through our support form and I'm happy to help [1]. Please make a note in the support ticket to this link so that it will get assigned right to me.

Now regarding the CO2 sensor. We use the SenseAir S8 which is one of the best NDIR sensors out there. If you do not like the auto calibration, you can now switch this off in the dashboard or change the automatic baseline calibration to longer periods. To do this, go to Place Settings, General Place Settings.

In case you still have these wild swings, contact our support with your sensor ID and we will have a look.

Regarding VOC, this has also recently addressed and you can now change the learning gain offset to make it more behave like an absolute sensor. We clearly describe the behavior of the VOC sensor on our website and this is actually the behavior of all newer generations of VOC sensors. We use the Sensirion SGP41 which is regarded one of the best ones.

Now, you are free to call it a "useless piece" but I'd appreciate if we keep the discussion fact based. As far as I know, there is no other air quality monitor in the same price range that is substantially better than ours.

Measuring air quality pollutants is not as simple as measuring temperature so there are inherent shortcoming in some of them. It is part of our mission to educate people on these. This is why we published for example the air quality cheatsheet. [2]

[1] https://www.airgradient.com/support/

[2] https://www.airgradient.com/documents/infographics/AQ-Monito...


I bought a pair of sensors based on the HN mentions, and so far I'm pretty happy. I was mainly interested in their PM sensor, which isn't on your list of complaints, and works quite well.

I discovered my rangehood, which doesn't have an outdoor exhaust, is even more useless than I had imagined. I bought a HEPA filter for my kitchen to run while I'm cooking (a Blueair based on other HN comments) and based on the PM sensor readings of the AirGradient the HEPA filter is quite effective.

I did have to configure the CO₂ sensor recalibration period to keep the numbers sensible. It wasn't so easy to set different recalibration periods for the indoor and outdoor sensors, but with some curl commands, I was able to get things configured to my liking. I do appreciate that, in principle, I can edit the firmware to my liking in the future.


What's with the weird 'i' in "tıtle"?


Probably used a Cyrillic keyboard.


ı is not a Cyrillic letter, it's a letter for the Latin alphabet that is most commonly used in Turkish.


It exists in non-modern Russian and modern languages - such as Ukrainian - Cyrillic alphabets in various forms, sometimes with top and bottom horizontal strokes, sometimes just like this.


edit: none of this seem to be true, big-ass pickup trucks are just not popular in Europe.

Isn't it for Australia only? Are those models even sold there? I know F150 are not sold in Europe because (I think) they're not road legal, because they're monstrous killing machine.


From alcohol, I love:

- drinking it: I really enjoy the feeling of just ingesting beer, wine or spirits, especially with friends or family

- having a nice buzz from it.

However, those two things are, for me, incompatible. If I start drinking a little bit, I usually don't stop until I'm way beyond the "nice buzz". As the joke goes, "one beer is not enough, two beers are just enough, three beers really aren't enough".

Having something that would allow me to keep drinking without jeopardizing my body, my mind, and the day after would be a huge game changer.


Sounds like maybe the "alcohol free"/"0.0%" beer (not really 100% alcohol free) is something you should try. Tastes and looks like beer, but doesn't come with the buzz (which is the thing that your brain hooks into and uses to tell you it isn't enough yet).


> Tastes and looks like beer

I have tried almost every major non-alcoholic beer in the U.S., and none of them truly taste exactly like beer.


There’s a brand I’ve seen in stores called “Athletic” and it’s nearly indistinguishable


> I have tried almost every major non-alcoholic beer in the U.S., and none of them truly taste exactly like beer.

Agreed, but if you drink them exclusively for a few weeks, your taste buds and brain will reframe around them, and it'll cease to be a problem. I did this with Brewdog's Punk AF, and after 2 weeks on that, most non-alcoholic beers triggered my brain's "I'm drinking beer!" response.

It's a lot of work for overpriced soft drinks, and isn't for everyone.

Also, I'm back to drinking real beer again anyway.


They are improving all the time.

Some are really good. If you like german weissbeer then Franziskaner Alkoholfrei is more or less indistiguishable to me.

There are other good ones too.


Over in the UK I think Adnams Ghost Ship 0.5% is the best one commonly available that I’ve had. Most of them are far too sweet.


Microdosing psilocybin (shrooms) is amazing at letting me go out and just have 1-2 beers while still giving the slight affect of a nice anxiety-free buzz. I'm what I'd call a nervous drinker. I'm ADHD and sitting still can be rough for me, so at bars I tend to drink a lot very fast because the only fidgeting I can do without looking strange is .. cup to face over and over.

Obviously not something everyone wants to do or can do, it's legal for me, but it's great for basically taking my interest in alcohol away after a beer or two. Microdosing is usually 1/10th or less what a "normal" light dose would be (going with 1-2g dose here, so 0.1/0.2). No weird/visual/hallucination effects or anything like that.

You just feel a bit lighter and relaxed. Been a big game changer for me since I go out all the time. A bunch of my service industry friends and I do it and they've all started drinking significantly less.

Naltrexone is great too but it's probably easier to get someone to microdose than ask their doctor for that which is unfortunate. You won't get a buzz with that, you'll just get bored of drinking by your 2nd beer and move on to doing other things which can also be nice at times.


Try alternating between water and beer. You’ll drink half as much, and at a better pace.


Workday may be bad, but it has nothing on Taleo.


I personally love teams. I don't particularly like my job, and Teams is so buggy that I can blame it for all the miscommunication.

Example: I've not responded to a message. Is it because I was away for 2 hours, or is because Teams shat the bed again? You'll never know!

It also makes my severely limited, monitored and controlled work laptop even more sluggish to the point that it takes a whole minute to simply start a shell, and 10 seconds to run any command on it (before the command actually runs). When coding, any keystroke takes a second to register. Is my productivity shit because I hate my job, or because my laptop is a dumpster fire in large part because of Teams? You'll never know!


A bit late, but maybe someone will read this. I live in Toronto and installed a heat pump this year. We've been through the worst of Winter, I believe, and although the cost ramps up on the coldest days, the heat pump worked perfectly at -15C (it claims a COP of 2 at that temperature). I watch the auxiliary circuit, that is triggered if the heat pump fails to heat to the required temperature, and it never ran for the whole season. Yes, Winter can still get a lot worse and a lot cooler, but my house also has insulation and there is no scenario where I will freeze to death.

In terms of cost, it's a lot cheaper than gas + electricity (it evens-out on the coolest days, and is cheaper otherwise). It will not amortize the cost of the heat pump itself for a while, but that's a cost I'm happy to eat right now.


Why not consider non-intellectual work? Woodworking is a humbling and gratifying experience when it comes to "working harder for things and making incremental progress".


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: