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

Not sure about GCC, but in general there has been a big move away from using parser generators like flex/bison/ANTLR/etc, and towards using handwritten recursive descent parsers. Clang (which is the C/C++ frontend for LLVM) does this, and so does rustc.

I don't know a single mainstream language that uses parser generators. Python used to, and even they have moved.

AFAIK the reason is solely error messages: the customization available with handwritten parsers is just way better for the user.


I'll let you decide whether it counts as "mainstream", but the principal implementation of Nix has a very old school setup using bison and flex:

https://github.com/NixOS/nix/blob/master/src/libexpr/parser....

https://github.com/NixOS/nix/blob/master/src/libexpr/lexer.l


It shows, even as a Nix fan. The errors messages are abysmal

Ruby also used to use Bison, uses its own https://github.com/ruby/lrama these days.

I believe that GCC also moved to a handwritten parser, at least for c++, a couple of decades ago.

You can indeed write custom allocators, and you can read to or write from special addresses. The former will usually, and the latter will always, require some use of `unsafe` in order to declare to the compiler: "I have verified that the rules of ownership and borrowing are respected in this block of code".

I mean that's pretty much just what Quanta does, if you don't like it I'd recommend reading a different publication. It's their whole shtick, simplifying complex news about science/mathematics just enough so that people completely unfamilar can get a general sense of what happened.

I messed around with common lisp for a while a few months ago, and I remember the packaging/dependency situation was by far the most difficult and confusing part. So thanks for writing this article, bookmarked it for the next time I write some CL :)

The idea is interesting but unfortunately the actual articles are riddled with spelling errors, typos, missing words, sentences that cut off before

And so on. Is this a work-in-progress thing not meant for public consumption yet?


I don't think it's pride, more that I don't see the problem that it solves for me. I don't find that git gets in my way at all, and I don't find it confusing. It's a pretty transparent tool that I use every day and hardly notice.

I don't mind other people using jj, but I simply don't feel a need to try it. There's nothing prideful about that, it's just pragmatism.


Pragmatic is using the best tool for the job. Certainly subjectively, and arguably objectively, jj is the better tool in many ways.

My advice is to try it. You should like it, if you're in the majority of folks to give it a sincere shot. If you don't like it, cool. But then my advice changes. jj is probably the future. Adapt or become one of those old-timers who froze their learning in time.


Pragmatic is not bothering to switch to the shiny new thing just because it's shiny and new if your current tool doesn't give you any problems.

This is really over the top and unnecessary.

I got a Dell XPS for work a couple years ago on someone's recommendation... one of my worst-ever decisions.

The touchpad sucks and routinely breaks requiring restarts, constantly having driver issues (and you have to deal with the capital-N Nightmare that is SupportAssist for drivers), graphics card is busted and makes the display driver crash once a month.

Power states are completely broken. Laptop will randomly turn on when it's in my bag and rev up to ten thousand degrees. Laptop will randomly, when on full battery and closed, decide to hard-shutoff leading to a windows recovery boot.

Decides to do BIOS updates when it's at 3% battery in the middle of the night, then when I wake up for work the next morning it has to go through a ten-minute recovery sequence.

Battery is swelling after only a couple years of use, which sometimes causes keys on the keyboard to stop working. In the middle of a slack convo I've had to type "Sorrymyspacebarstoppedworkinggottarestartmycomputer".

BSODs, hard drive corruption, you name it. Never buy Dell. Not that there's many good options out there unless you're willing to drop two week's pay on a Framework - but anything is better than Dell.

EDIT: Another I thought of - sound card is busted and sounds like it has a low pass filter on it. I know it's not a speaker issue because on occasion it magically fixes itself until the next restart.


Power states are completely broken. Laptop will randomly turn on when it's in my bag and rev up to ten thousand degrees.

If it was in sleep - Dell themselves recommend completely switching off a laptop before putting it inside a backpack:

https://www.dell.com/community/en/conversations/xps/faq-mode...

For somebody who has used MacBooks the last 18 years, this is insane.


The laptops waking up in the backpack until the thermal security triggers or the battery is empty is a Microsoft Windows thing.


Ime turning windows laptops off is really hard. You tell them to shutdown and they restart for some reason, and it does not seem to be update related because it happens with laptops completely offline too. So you may think that you have shut them down, close the lid, but actually they reboot and when you get to them again they are dead. This happens with some dell laptops but I do not think it is just them. Not all the time but very randomly.


I haven't found a way to tell Windows 10 to hibernate other than making that the power button action in power options. Maybe because it's a laptop but it starts immediately after hibernating and your have to hold the power button to fully turn it off. This works and skips any forced updates Windows wants to do. It is very janky and I think ms does it to make skipping updates harder.


Apparently "update and shutdown does a restart instead" was very recently finally fixed: https://news.ycombinator.com/item?id=45797934


To shut Windows down, press Win+R to see the Run dialog and then type shutdown /s /t 0


I've seen it on my system 76 (clevo) laptop from 2019 on linux, and on windows on the same hardware. I think its a firmware power state design bug. I have a lenovo from 2012 that never had this problem.


same manufacturer and vintage (maybe 2020?), and same problem.

Not really - my Dell Precision (Ubuntu Certified even) frequently have problems going to sleep. To be fair - technically it doesn't wake up in the backpack - it fails to sleep in the first place. But if you don't pay attention you wont notice the failure so I'd say that's very close to just as bad.


I have never understood why some people want to avoid switching off their computers.

I have stopped using Apple laptops more than 15 years ago and since then I have used only Linux laptops.

I have no idea whether hibernate worked on my laptops, because this is a feature for which I have never felt any need.

I always take care to optimize the boot time on my computers with custom built kernels and carefully selected daemons (and I do not use systemd). For decades, the boot time on my laptops had been of perhaps twenty seconds at most and the biggest delay in starting to use the computers after being powered off is entering a password to unlock them, not the start-up of the OS. Using something like hibernation instead of complete power off would speed up negligibly the process of beginning to work on the computer.


Pop open the lid, be right back to where you were. No amount of boot time optimizations will trump that.


The desk to meeting room use case. Dont know how we survived pre laptop but somehow we did. Meeting room had its own PC I think back then.

Meetings didn't generally require computers back then. We're talking about The Overhead Projector transparencies era.

Yeah, you'd log on with your credentials and then get the files you needed from the network share.

> I have never understood why some people want to avoid switching off their computers

> I always take care to optimize the boot time on my computers with custom built kernels and carefully selected daemons


Sleep is just different from shut down. With an unplugged laptop, after an idle period or by shutting the lid, I'd like the machine to save energy. I haven't always taken the steps to prepare for a shut down, saving open documents. I wouldn't like to wake back up an idle machine to see that my programs had all been closed.

And sometimes I'd like to quickly put a laptop into a bag without waking it up just to shut it down first. If I had a way to transition from sleep to shut down I'd use it, but also... this is where I see that if the sleep state were more perfect (used zero energy, zero unintended wakeups), it would obviate my need to shut down most of the time.


So what you’re saying is that you don’t understand why everyone doesn’t run Linux, use custom built kernels, and choose their daemons carefully?

Or I can just use my M2 MacBook Air where hibernate works properly, wakes instantly, last 12-18 hours on one charge, runs quiet and I can actually use it on my lap without worrying about becoming sterile from the heat…


It's all about trade-offs really.

In this case, a laptop sometimes waking up in a bag vs a constantly and deliberately cripled GUI and keyboard.


The recent-ish Dell XPS I had for work was the worst hardware I've ever had in my entire life, full stop. The touchpad was an abomination. Like, nobody bothered to use it before it shipped. Just completely broken. I also experienced everything else you experienced with regard to power management. That fact that a team of human beings could create something so awful actually made me depressed.

Very happy with my framework when I switched jobs. And my asus zenbook was also great.


I’ve been using a zenbook for about 8 years now. Hardware and battery are still surprisingly solid, although one of the hinges is starting to fail…

Does your job actually give you a Framework? Where do you work?! I’d like to join.


Yep, I had the high end "Developer Edition" a while back and it was a terrible experience. Very hot, build quality was poor, touchpad was small, speakers were terrible. I don't think I could use anything other than a MacBook now.


My last decent PC laptop was a Lenovo Thinkpad T530. That thing was a chunky black brick and felt like it was made from recycled Soviet-era tanks. Super modular, easy to upgrade RAM, drives, etc.

I got practically 10 years out of it. My next machine was a Dell XPS (Infinity Edge) laptop. I ordered it direct from Dell, unboxed it, turned it on and let it run the standard set of Windows updates. Came back an hour later and it was hung in a BSOD state. Rebooted and everything seemed to be working smoothly again but it was... concerning so I left it running overnight. Came back to YET ANOTHER BSOD the next morning and was like F### this.

Immediately RMA and sent it back. If your QC is a hot circle of garbage for a nearly $3000 machine then I have zero faith in your company.


Got a dell xps with the 3 year onsite and accidental damage. Laptop was shit, but after a few repairs, motherboard replacement then complete unit replaced, it is working really well!

Although id probably not get xps again.


Unfortunately same about my XPS, looked promising but turned to shit faster than I'd expect

> it might mean going out of business for ideological reasons

taking a moral stance isn't inherently ideological


That's extremely disappointing. Wayland has gotten a lot better but there are still many, many instances where I have to switch into an X11 session in order to play certain games (especially older ones). I am a huge fan of KDE but this may actually force me to switch to something else :(


These older games don't run fine with Xwayland?


I have a modern one with a mouse-event bug specific to Wayland, that still presents in XWayland windows. Switched to KDE/X11 just to work around it (so, not exactly enthused to see this news item on HN).


Nope. Off the top of my head, I've had serious issues (crashing, visual glitching, extreme lag, etc) running OpenMW and Minecraft on XWayland, both of which were resolved entirely by switching to X11. There have been many others too, those are just at the front of my mind because they were the most recent.

Oh, also Godot has a lot of issues on Wayland at the moment, specifically the Godot editor. I spent a long time trying to figure those out, because if I'm developing I would really rather be in a Wayland session where my DPI stuff works much better, but ultimately I resigned to just running the Godot editor only under an X11 session.


It's depressing how in the modern day you can't criticize capitalism without immediately being told that you must be a supporter of soviet-style authoritarian socialism

There are shades of grey here. Capitalism is a system with many inherent problems. Exploring alternatives is not the same thing as being a Stalinist


This exactly. Capitalist propaganda likes to paint anything other than capitalism as Stalinist authoritarian communism, which should be abhorred as well as capitalism, and just for the same reason: both are coercive, hierarchical, and unfree.


Because every time I encounter such capitalism haters they turn out to be marxists in disguise. Usually pushed and promoted by people that never lived outside of their comfortable capitalist wealth bubble, written on capitalist devices, here, on this very venture capitalist's forum! The hypocrisy boggles the mind, really.

It's like the lack the most basic understanding of economics and they never read any history. I mean, communism has failed everywhere it was tried and there were so many A/B test that plainly show each system's results: North vs South Korea, Eastern Europe before vs after 1990, USA vs USSR, Argentina during the last hundred years, Venezuela before and after Chavez, etc.

Or they push socialism under new names ("democratic") as if it's a new thing, not just a watered down form of communism, with authoritarian communism being the logical end game of socialism - because "at some point you run out of other people's money" and you need force to keep fleecing them. Just like it happened in Venezuela...


Lucky for you, I'm not a Marxist. There is a very large current of people who are socialists but not Marxists, and have spent literally over a century analyzing history, economics, and capitalism itself, without insisting on the coercive hierarchy of Marxism or capitalism. And it has a long history of working in practice, even if in the modern day it tends to be crushed by both Marxist and capitalist forces, because who knew an authoritarian structure could allow you to command huge armies and oppress others?

You seem well aware of authoritarian communism, but generally unaware of libertarian socialism. They are distinct, and the latter has a decades long history of despising the former as much as you do, though for being based on the same primary issue as capitalism: coercive hierarchy.

It all starts with assuming the freedom of human beings, and that the only way to organize a system has nothing to do with efficiency or profit, and everything to do with maintaining that human freedom. It must be based on human freedom, and the concept that no one knows how to run your life better than you do. That no one deserves to be able to force you to do things. Whole systems arise from that fact, that have a long basis in history. As I've said elsewhere, you don't end up with men on the moon or dollar stores, but you do get people who are in control of their own lives.


I've seen mainstream "socialists" (Obama, Sanders, countless Europeans) embracing and sustaining authoritarian communist thugs like Chavez, so...

We've seen here in EU socialist policies cripple our economy to the point we're lagging the USA and we can't even defend ourselves from the blood-hungry psychopath in the east.

> libertarian socialism

Is this a real thing? Any examples of being implemented anywhere? Cause it sounds like a oxymoron to me. Socialism means regulations and confiscation from the productive members of society (taxation). Those must be enforced with the threat of force so less liberty there...

> no one deserves to be able to force you to do things

So I shouldn't be forced to pay my taxes? How would then a socialist government implement its expensive social policies?!


> Is this a real thing? Any examples of being implemented anywhere? Cause it sounds like a oxymoron to me.

Let me catch you up on 150 years of capitalist alternative, theory, critique, and analysis, that answers every single snarky little "gotcha" remark you have: https://theanarchistlibrary.org/library/the-anarchist-faq-ed...

I'm not going to spoon-feed you anymore because you're clearly not interested in a conversation, and are quite happy with the status quo. I hope for your sake you don't end up on the wrong side of capitalism.


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

Search: