[HN Gopher] Hacker News now runs on top of Common Lisp
___________________________________________________________________
Hacker News now runs on top of Common Lisp
Author : Tomte
Score : 386 points
Date : 2025-05-26 16:37 UTC (6 hours ago)
(HTM) web link (lisp-journey.gitlab.io)
(TXT) w3m dump (lisp-journey.gitlab.io)
| rcarmo wrote:
| Hmmm. Does that mean we'll get dark mode now?
| rwmj wrote:
| Can't you use tampermonkey or a similar tool that lets you
| apply your own stylesheet?
| quotemstr wrote:
| The OP isn't really asking for a "dark mode" like a literal
| reading of his comment might suggest. He's asking for an
| officially supported dark mode that evolves with the site and
| doesn't break random functionality one day. It's easy to use
| Stylist or TamperMonkey to make a dark mode that works at one
| instant of time. It's much harder to maintain one
| indefinitely in the face of constant changes made by
| developers not concerned with breaking your work, which they
| probably don't even know about.
| SoftTalker wrote:
| I think there was a vision early in the evolution of the
| web that user-supplied stylesheets would be a lot more
| commonly used than they turned out to be.
|
| Things like colors, contrast levels, font sizes, are often
| matters of personal preference, and the browser (in theory)
| is the common place to manage those. Each site should not
| have to reinvent this feature.
| johnisgood wrote:
| It is possible to have this feature built-in to the
| browser. I am surprised it has not been implemented yet
| (?).
| altairprime wrote:
| There was a Chrome experiment for it when I looked last
| year; it worked well in some cases and was just as bad at
| Google Sheets as every other generic darkmode solution.
| randallsquared wrote:
| Browsers used to commonly support user stylesheets.
| Chrome removed it a long time ago, and I'm not sure what
| the status of that is in Firefox now. The issue is that
| there's no single common use case for them, and if there
| were, it would be simpler to build it in. But maintaining
| that level of flexibility has a continuing cost...
| johnisgood wrote:
| I am referring to the fact that there are more or less
| simple algorithms you can use to determine the dark
| version of colors, or rather, perceptually darker
| variants (e.g. APCA). The browser could make the contrast
| threshold configurable.
| SoftTalker wrote:
| Firefox appears to support a light and dark mode, custom
| foreground and background colors, and setting a default
| font face and size. Nothing like full user stylesheet
| support, at least not without extensions.
| vinceguidry wrote:
| > Each site should not have to reinvent this feature.
|
| This would send me into peals of laughter if I weren't
| already crying. The time to make this argument was 30
| years ago, when the web wasn't fragmenting into a billion
| different pieces. The browser can make exactly zero
| assumptions about any given site, so it could never be a
| place where user preferences about them could be
| actionable. Downvoters should get work as web developers
| sometime. You really want the browser making assumptions
| about your web design?
|
| All it can do is pass a header and let the website do
| what it will with it.
| galaxyLogic wrote:
| User-style-sheets sound great in theory, but CSS is
| Cascading Style Sheets which means it would be very easy
| for users to break functionality of web-sites. For
| instance make the cascade cascade so that the text-color
| is same as background color on some widget on some
| website and you might be missing a button.
|
| A user's custom style-sheet might be good for one web-
| site, but not for every website.
|
| The original web was much about self-expression of
| developer-users, but now the web is all about apps, which
| must not break because a user might want to use different
| colors.
|
| And why should you need to customize colors? I can
| understand that different users need larger fonts which
| you can do by zooming in the browser. Colors should be
| good to go if the website is well-styled to begin with.
| zzo38computer wrote:
| > Colors should be good to go if the website is well-
| styled to begin with.
|
| What if it is not well-styled? Or, maybe some people
| think it is and others disagree and want something else.
| The end user should need to customize fonts (not only
| larger, but also if you want smaller fonts; I more often
| find the fonts on a web page are too big and want smaller
| fonts; however, also you might prefer a specific font
| typeface and not only the font size), colours (also for
| many reasons, including using a monochrome display or
| printer that the web page author might not have been
| aware of), animations (e.g. to disable them), margins,
| etc.
| quotemstr wrote:
| > User-style-sheets sound great in theory, but CSS is
| Cascading Style Sheets which means it would be very easy
| for users to break functionality of web-sites. For
| instance make the cascade cascade so that the text-color
| is same as background color on some widget on some
| website and you might be missing a button.
|
| Pretty sure AI-driven style derivation will finally
| deliver the dream of custom stylesheets in a robust and
| automatic way.
| zzo38computer wrote:
| I think that being able to make user stylesheets based
| not only on HTML but also on ARIA attributes and on
| existing CSS commands, might be helpful, to compensate
| for the problems. User settings could also be used to
| e.g. override (and/or disable) the meaning of specific
| CSS commands in the styles specified in the document, and
| to override the results of media queries. It could also
| perhaps help to make the rendering more efficient if
| inefficient commands are disabled by the user (I often
| find it slow due to inefficient use of CSS commands).
| quotemstr wrote:
| > ARIA attributes
|
| That works today. No problem.
| [role="button"] { cursor: pointer; }
|
| > on existing CSS commands
|
| Not sure what you mean. Between the new selector
| combinators and attribute selectors, you can do a ton.
| You also have style-based container queries, which are
| probably close to what you want.
| rcarmo wrote:
| None of those extensions work in app-embedded browsers.
| rcarmo wrote:
| I don't read HN in normal browsers. If you read the RSS feed
| and click through, for instance, it's instant white flash
| from the embedded browser in the RSS reader, which cannot be
| customized but honors dark mode.
| abdullahkhalids wrote:
| Which RSS reader do you use?
| dang wrote:
| https://news.ycombinator.com/item?id=23199062
| rcarmo wrote:
| That thread is 5 years old, and nothing really came out of
| it.
|
| The genius solution in there is probably this one:
| @media (prefers-color-scheme:dark){body{filter:invert(1) hue-
| rotate(180deg)}}
|
| ...which you can try by doing this in the browser console:
| const styleElement = document.createElement('style');
| styleElement.type = 'text/css';
| styleElement.textContent = "@media (prefers-color-scheme:
| dark) { html { filter: invert(1) hue-rotate(180deg); } }";
| document.head.appendChild(styleElement);
|
| But I get that there are a lot of opinions. Just try one, put
| up a vote over a week, do it over 4-6 weeks, settle on the
| one that has the best feedback...
| brudgers wrote:
| _That thread is 5 years old_
|
| This might be what we are up against:
|
| https://norvig.com/21-days.html
|
| https://paulgraham.com/hundred.html
| yyx wrote:
| uBlock origin filter: ! Hacker News dark mode
| news.ycombinator.com##html:style(filter:invert(90%) hue-
| rotate(180deg))
| news.ycombinator.com##body:style(background: white)
| rcarmo wrote:
| Does not work in embedded browsers in RSS readers. We need a
| proper site CSS, not client-side patches.
| wvenable wrote:
| Sounds like you need to write a CSS translating proxy
| server.
| cess11 wrote:
| There is an API somewhere, could wrap that with whatever you
| feel like.
| satiric wrote:
| Considering Hacker News thinks font-size:9pt is acceptable for
| body text in 2025, don't hold your breath.
| krior wrote:
| whats wrong with that?
| satiric wrote:
| It's too damn small. Firefox automatically scales it up to
| 12px (as does Chrome I think), and even then I zoom in to
| 130% to get the font to 15.6px.
|
| On the home page the text that tells you who the poster is,
| how many upvotes and comments, etc, is gray text on a gray
| background, at 7pt font. Again, Firefox and Chrome scale
| this up to 9.33pt, which again, is too small for me to read
| comfortably on a 24 inch desktop monitor without zoom.
|
| (I accept that 120% would be fine; that brings up the main
| font size to 14.4pt. Wikipedia seems to use 14pt and that's
| totally fine for me. But still, neither me nor the browser
| should have to scale up the website.)
|
| Even at 130% zoom, on the home page I can see 20 posts at
| once. I understand complaints that reddit went too far in
| the other direction, but that doesn't mean they should
| throw accessibility out the window for this site.
| Tijdreiziger wrote:
| I use the awesome "Dark Reader" browser extension, which gives
| you dark mode on any website.
| justsomehnguy wrote:
| Ask your browser for the reading mode
| mdaniel wrote:
| sbcl is a workhorse. I wonder if the Racket folks didn't consider
| the Arc under production workloads general purpose enough to fix.
| I actually don't know of any other projects that use Racket in
| anger
|
| I'll always have a soft spot in my heart for Armed Bear because
| that JVM library ecosystem is enormous
| https://github.com/armedbear/abcl
| dang wrote:
| The Racket folks have always been most helpful and never turned
| down a request to fix anything.
| mdaniel wrote:
| Apologies that may have come across as more accusative than I
| intended. I was just surprised that whatever missing(?)
| feature or behavior that would cause one to move off of
| Racket wouldn't be of interest to other Racket users
| brobdingnagians wrote:
| My assumption is that creating a compiler and runtime to
| match sbcl isn't in scope for racket, so it wouldn't be
| polite to request racket to do so :) there were probably
| other benefits of similar orthogonal features, where racket
| users don't necessarily need it, but another
| language/runtime already has it because that's where people
| who need that go
| BoingBoomTschak wrote:
| Isn't Racket using the (also) very fast Chez Scheme
| underneath?
| cess11 wrote:
| SBCL is disgustingly performant, and while Racket is fine
| for most applications you'll still notice sometimes that
| it's executed on a VM and hasn't prioritised speed to the
| same degree.
| lemming wrote:
| Chez compiles, I think, its not a VM. It's not as fast as
| SBCL of course, but it's not interpreted.
| reikonomusha wrote:
| In addition, Common Lisp provides standardized ways to
| get fast code: OPTIMIZE policy, type annotations, stack
| allocations, disassemblies, etc. This is all there before
| you get to SBCL's specific tools for optimization and
| profiling.
| varbhat wrote:
| So, Hacker News was not rewritten in Common Lisp. Instead they
| reimplemented the Arc Runtime in Common Lisp.
| quotemstr wrote:
| And that's the sort of thing Lisp excels in
| westurner wrote:
| There are probably Markdown libraries for Arc by now?
|
| Though, Reddit eventually realized that javascript: URLs - in
| Markdown - were an XSS risk.
| Aurornis wrote:
| > Much of the HN codebase consists of anti-abuse measures that
| would stop working if people knew about them.
|
| We've all heard about how "security through obscurity" isn't real
| security, but so many simple anti-abuse measures are very
| effective as long as their exact mechanism isn't revealed.
|
| HN's downvote and flagging mechanisms make for quick cleanup of
| anything that gets through, without putting undue fatigue on the
| users.
| quotemstr wrote:
| Things called "security" that don't follow Kerckhoffs's
| principle aren't security. There are a lot of things adjacent
| to security, like spam prevention, that sometimes get dumped
| into the same bucket, but they're not really the same.
|
| Security measures uphold invariants: absent cryptosystem breaks
| and implementation bugs, nobody is forging a TLS certificate. I
| need the private key to credibility present my certificate to
| the public. Hard guarantee, assuming my assumptions hold.
|
| Likewise, if my OS is designed so sandboxed apps can't steal my
| browser cookies, that's a hard guarantee, modulo bugs. There's
| an invariant one can specify formally --- and it holds even if
| the OS source code leaks.
|
| Abuse prevention? DDoS avoidance? Content moderation? EDR?
| Fuzzy. Best effort. Difficult to verify. That these things are
| sometimes called security products doesn't erase the
| distinction between them and systems that make firm guarantees
| about upholding formal invariants.
|
| HN abuse prevention belongs to the security-adjacent but not
| real security category. HN's password hashing scheme would fall
| under the other category.
| tptacek wrote:
| This is simply not true. At the highest levels, security is
| about distributing costs between attackers and defenders,
| with defenders having the goal of raising costs past a
| threshold where attacks are no longer reasonable expenses for
| any plausible attacker. Obfuscation, done well, can certainly
| play a role in that. The Blu-ray BD+ scheme is a great case
| study on this.
| quotemstr wrote:
| A definition can't be right or wrong. We're using different
| definitions of the word "security". What would you call the
| rigorous invariant-based conceptualization I call
| "security"?
| tptacek wrote:
| Incoherent.
| tredre3 wrote:
| > We've all heard about how "security through obscurity" isn't
| real security
|
| This is something that programmers enjoy repeating but it has
| never been true in the real world.
| krior wrote:
| it does not apply to the "real" world, but the digital one
| codr7 wrote:
| Definitely makes more sense than Racket imo, Common Lisp is a lot
| more pragmatic and SBCL is like magic.
| anthk wrote:
| Good, sbcl it's great for CL. And now with current CLX from
| QuickLisp (the one with daily releases, I can't remember it's
| name) MCClim runs snappy even under Intel n270 ATom machines.
| Under ECL it almost runs snappy, but the performance gain it's
| astronomical. From a really laggy UI to instant rendering.
|
| EDIT: UltraLisp for QuickLisp.
| quotemstr wrote:
| Is QuickLisp entering the 1990s and enabling TLS yet?
| atgreen wrote:
| Check out ocicl! https://github.com/ocicl/ocicl
| quotemstr wrote:
| That looks awesome. Hope it gets traction!
| dhqgekt wrote:
| When we will get to see the code of clarc? I hope that there is
| no "business logic" relevant to running HN in the language
| implementation, is there?
| javawizard wrote:
| That's addressed in the article. There absolutely is:
|
| > Much of the HN codebase consists of anti-abuse measures that
| would stop working if people knew about them. Unfortunately.
| separating out the secret parts would by now be a lot of work.
| The time to do it will be if and when we eventually release the
| alternative Arc implementations we've been working on.
| dhqgekt wrote:
| I am asking about the core language implementation. No need
| to publish the whole source code of HN, just the part of
| source code of clarc.. You do not have "anti-abuse measures"
| in the language implementation and runtime, do you? Is it
| that hard to seperate a language implementation and code
| written in the language?
| dang wrote:
| You're right. The Clarc code and the rest of the HN
| codebase are separate. (Well, mostly. Almost entirely.)
|
| More here: https://news.ycombinator.com/item?id=44099560.
| dang wrote:
| I think the (anonymous? I can't find a name) author of the OP
| slipped slightly at the end of that otherwise-impeccable
| sequence of quotes. That last comment
| (https://news.ycombinator.com/item?id=21546438) was
| responding to a question about open-sourcing the entire HN
| codebase, not just the Arc implementation.
|
| Open-sourcing HN wouldn't work because of the anti-abuse
| stuff, etc. But open-sourcing the Arc implementation (i.e.
| Clarc) would be much easier. The way to do it would be to
| port the original Arc release (http://arclanguage.org/) to
| Clarc. It includes a sample application which is an early
| version of HN, scrubbed of anything HN- or YC-specific.
| sctb wrote:
| > The way to do it would be to port the original Arc
| release (http://arclanguage.org/) to Clarc.
|
| If you're looking for volunteers... :)
| vindarel wrote:
| I edited the post to add this clarification, thank you.
|
| Vincent (my full name appears in linked projects ;) )
| dang wrote:
| Ah thanks! I was impressed with how you reconstructed the
| history there.
| AndrewKemendo wrote:
| > Much of the HN codebase consists of anti-abuse measures that
| would stop working if people knew about them. Unfortunately.
| separating out the secret parts would by now be a lot of work
|
| The business logic in encoded into the original structure, making
| migration to anything different effectively impossible - without
| some massive redesign.
|
| This, I think more than any response, indicates why the
| philosophy of "it's working don't touch it" will always win and
| new features" requests will be rejected.
|
| HN didn't depaginate based on user desires, it was based on
| internal tooling making that feature available within the context
| of the HN overall structure.
|
| HN has zero financial or structural incentive to do anything but
| change as little as possible. That's why this place, unique in
| the internet at this point unfortunately has lasted.
|
| HN is not *trying* to grow, it's trying to do as little as
| possible while staying alive; so by default, it's more coherent
| to maintain because its structure isn't built for it and changing
| the structure would break the encoded rituals (anti-abuse
| measures).
|
| Something to think about when you're trying to solve for many
| problems like "legacy code" "scaling needs" etc... it all comes
| back to baseline incentives
| exe34 wrote:
| Honestly I don't understand why more things aren't like this. I
| don't need a revamped landing page for my
| GP/council/department/directorate/organisation/etc - just
| finish the previous version with the features that were
| promised. I don't need another half-assed version that will
| also be abandoned at 40-50%.
| packetlost wrote:
| Man, I wish GUIs in general were like this. Not that I don't
| want progress, but some interactions (especially in basic OS
| stuff) really doesn't need to be redone every 5 years.
| dang wrote:
| It's trying to grow in the sense that we want new users.
| Otherwise it will get stale. I fear that's already happening.
| mdaniel wrote:
| I mean this in the spirit of genuine curiosity: what
| staleness risk is there given the massive breadth of
| experience the existing userbase already has?
| dang wrote:
| We need a healthy influx of younger users in addition to
| retaining older ones.
| jgrahamc wrote:
| As someone who runs a website based on the Arc code that was
| opened sourced... I'd love to be able to use Clarc.
| g8oz wrote:
| what is the site?
| jgrahamc wrote:
| https://twostopbits.com
|
| I use the HN Arc code, but the site is about retro computing
| and gaming.
| justsomehnguy wrote:
| Damn you, you reminded me [again] of the delightful days of
| FeedDemon _ing_
|
| Maybe I should find a way to have APOD every day again.
| zoogeny wrote:
| Hacker News is a perfect example of the "Worse is better" mantra
| applied to social engineering. I mean, slashdot had more features
| and functionality in the late 1990s.
|
| What makes HN work is the tight focus and heavy moderation.
| dang wrote:
| Finally a Lisp system wins the worse-is-better crown!
| keeganpoppen wrote:
| oh man... this comment is just so, so incredibly apt.
| dotancohen wrote:
| It's also by the guy who mods here.
| 90s_dev wrote:
| "Incidentally, very few people grasp the amount of effort
| Daniel Gackle expends running HN now, and what an amazing job
| he does." -Paul Graham,
| https://x.com/paulg/status/1282055086433284103
| 90s_dev wrote:
| My comment definitely has more points than the two above
| it, but it's lower, even though that pattern isn't true
| with my other comments. Probably because Daniel manually
| demoted it as part of his manual/automatic hybrid
| moderation tooling, and probably for the sake of being
| humble about the amount of work he does for HN. Which I
| think is an interesting example of my other comment's point
| about how dang probably moderates HN. I'd be curious
| whether I'm very far off with this Daniel.
| oblio wrote:
| Well, Facebook is PHP so...
| dx4100 wrote:
| Any idea of how much of their code is still primarily PHP?
| Curious myself.
| lokar wrote:
| Well "hack", but the same idea
| loeg wrote:
| The entire website is still a PHP-like derivative
| language (with an optimizing compiler, etc). Backend
| services are largely C++.
| kqr wrote:
| For context, "worse is better" refers to Gabriel's
| observation that products with simple implementations and
| complicated interfaces tend to achieve adoption faster than
| products with complex implementations and elegant interfaces.
|
| One of the original motivating examples were Unix-like
| systems (simple implementation, few correctness guarantees in
| interfaces) vs. Lisp-based systems (often well specified
| interfaces, but with complicated implementations as the
| cost.)
| seanmcdirmid wrote:
| I think Richard Gabriel attributes it to Jamie Zawinski?
| paxcoder wrote:
| Yay
| 90s_dev wrote:
| You're the outlier and for good reason.
| nickpeterson wrote:
| Also the lack of needing to make money helps a lot.
| mike_hearn wrote:
| I'd say that's the main thing. People hate ads, HN uses
| unobtrusive text ads. The moderation isn't that a competitive
| advantage, IMO. Slashdot's was better, mostly because it had
| measures to stop moderation abuse whereas HN seemingly
| doesn't. It's just a plain old up/down system with the added
| filip of a "super down" button, for those who are really
| committed to banning their opponents. I read with showdead
| turned on because perfectly reasonable comments are so often
| greyed out or dead. That used to happen much less on Slashdot
| because there were far fewer people with moderation rights
| and the bad ones got filtered out via metamod.
|
| Maybe now it's been ported to Common Lisp it'll be easier to
| add features.
| oblio wrote:
| > "super down" button
|
| The flag button?
| palmotea wrote:
| > IMO. Slashdot's was better, mostly because it had
| measures to stop moderation abuse whereas HN seemingly
| doesn't.
|
| Really? IIRC, Slashdot's moderation was garbage, remember
| penis-bird, GNAA, goatse?
| philwelch wrote:
| Most of that was downmodded and hidden by default though.
| pram wrote:
| You just reminded me of the beautifully rendered, colored
| penisbird ascii art dipshits would spam on IRC lol
| mousethatroared wrote:
| "HN uses unobtrusive text ads"
|
| HN has ads? I've been on some 2011 and I have never seen
| them...
| dang wrote:
| https://news.ycombinator.com/newsfaq.html#jobads
|
| https://news.ycombinator.com/newsfaq.html#yc
| aziaziazi wrote:
| Also, self promotion in comments - often as "shameless
| plug" - like in any other platform that let you write
| public text:
|
| https://hn.algolia.com/?dateRange=all&page=0&prefix=true&
| que...
| tedunangst wrote:
| You didn't notice they were ads.
| jazzyjackson wrote:
| Usually it's just "so and so is hiring" (not to be
| confused with the who wants to be hired threads) weaved
| in to look like just another submission
| johnisgood wrote:
| HN may have less features, but do we even need them? I do not
| think it makes it worse because of that. You could call it
| minimalistic, which puts it into a more positive light. :)
|
| Edit: or as someone else who has phrased it better: "less is
| more".
| dotancohen wrote:
| I think that the classical phrasing is "less is more".
|
| At least, that's how my bash pager has it in the manpage.
| johnisgood wrote:
| You are right!
| jrockway wrote:
| I liked the "friends" and "foes" system that Slashdot had,
| though I would say generally the "foes" here just get banned
| which is convenient.
|
| I also thought Slashdot's moderation system was kind of fun.
| I am not sure it was _useful_ but I enjoyed the annotations
| (+5 Funny when serious, +5 Insightful when inciteful, etc.)
| Meta-moderation was also neat?
| KerrAvon wrote:
| In practice, the Slashdot moderation system was
| ridiculously easy to game. You could adjust your viewpoints
| to subtly praise Linux and denigrate Windows and be assured
| of a higher rating.
| vid wrote:
| Because people agreed with you? Why is that a problem?
| ksec wrote:
| Dark Mode. And Follow User would be two feature I have been
| using for years with other tools.
| jedberg wrote:
| Follow user is antithetical to the idea of HN -- content
| should be upvoted because of what it says, not who said it.
|
| But I agree dark mode would be nice.
| lo_zamoyski wrote:
| The "tech progressive" mindset cannot comprehend the idea
| that something cannot be improved or shouldn't be "enhanced".
| It is too close to the abyss.
| EasyMark wrote:
| I want a pickup truck that is designed like HN. The slate may
| be the answer
| cgio wrote:
| A minimalist pickup truck could be a bicycle. Depends on
| whether you really need a truck at all.
| raverbashing wrote:
| Honestly it's not "worse"
|
| But I think HN built on what Reddit got right (at least old
| reddit) and also on a context of more online/faster
| interactions as opposed to Slashdot that brought some of the
| old forums structure and on a context of slower and more
| meaningful (ahem, for the most part) interactions. Hence why
| moderation was more precise, upvotes had color and you still
| had things like user signatures
|
| In a way, users and posts on HN are "cattle", not pets ;)
| throwawaymaths wrote:
| your comment assumes that features and functionality are a good
| thing. "worse is better" does not apply here.
|
| "worse is better" is people putting up with footguns like this
| in python, because it's percieved easier to find a python job:
| def fun(a = []):
|
| HN is very much "less is better", not "worse is better".
| zoogeny wrote:
| I'm not sure what you mean? The literal quote from the
| Wikipedia article on "worse is better" is:
|
| > It refers to the argument that software quality does not
| necessarily increase with functionality: that there is a
| point where less functionality ("worse") is a preferable
| option ("better") in terms of practicality and usability.
|
| For that reason, I think I am applying the term precisely as
| it was defined.
|
| The irony of my comment, which dang picked up, is that the
| original idea was a criticism _against_ Lisp, suggesting that
| the bloat of features was a part of the reason its adoption
| had lagged behind languages like C.
|
| 1. https://en.wikipedia.org/wiki/Worse_is_better
| 90s_dev wrote:
| You're both saying the same thing: fewer features = higher
| quality.
|
| Swiss army knives are not as good at being screwdrivers as
| screwdrivers are.
| throwawaymaths wrote:
| huh. til i actually thought "worse is better" is more
| recent than that but it stems from an era where feature
| count was the measure of quality. how times have changed!!
| thanks!
| 7thaccount wrote:
| I've written Python for 14 years and have never seen code
| like that. It certainly isn't a perfect language, but this
| doesn't look like a common concern.
|
| People write a lot of Python, because the language is easy to
| get into for a lot of non computer-science folks (e.g.,
| engineers and scientists) and the ecosystem is massive with
| libraries for so many important things. It isn't as
| conceptually pure as lisp, but most probably don't care.
| tredre3 wrote:
| It's a common need to have an empty array be the default
| value to an argument. In any programming language, really.
| I don't know what to make of the fact that you've never
| seen that in the wild.
|
| Maybe you were blessed with colleagues, for the past 14
| years, that all know about how dangerous it is to do it in
| Python so they use workarounds? That doesn't negate the
| fact that it's a concern, though, does it?
| dannymi wrote:
| There's always tension between language simplicity (and
| thus cognitive load of the programmers) and features.
| Compare Scheme with Common Lisp.
|
| The idea in Python is:
|
| 1. Statements are executed line by line in order
| (statement by statement).
|
| 2. One of the statements is "def", which executes a
| definition.
|
| 3. Whatever arguments you have are strictly evaluated.
| For example f(g(h([]))), it evaluates [] (yielding a new
| empty list), then evaluates h([]) (always, no matter
| whether g uses it), then evaluates g(...), then evaluates
| f(...).
|
| So if you have
|
| def foo(x = []): ...
|
| that immediately defines
|
| foo = (lambda x = []: ...)
|
| For that, it has to immediately evaluate [] (like it
| always does anywhere!). So how is this not exactly what
| it should do?
|
| Some people complain about the following:
| class A: x = 3 y = x + 2
|
| That now, x is a class variable (NOT an instance
| variable). And so is y. And the latter's value is 5. It
| doesn't try to second-guess whether you maybe mean any
| later value of x. No. The value of y is 5.
|
| For example: a = A() assert
| a.__class__.x == 3 assert a.x == 3
| a.__class__.x = 10 b = A() assert b.x ==
| 10
|
| succeeds.
|
| But it just evaluates each line in the class definition
| statement by statement when defining the class. Simple!
|
| Complicating the Python evaluation model (that's in
| effect what you are implying) is not worth doing. And in
| any case, changing the _evaluation model_ of the world 's
| most used programming language (and in production in all
| countries of the world) in 2025 or any later date is a no
| go right there.
|
| If you want a complicated (more featureful) evaluation
| model, just use C++ or Ruby. Sometimes they are the right
| choice.
| 9dev wrote:
| That's a very academic viewpoint. People initialize
| variables with defaults, and sometimes, that default
| needs to be an empty list. They are just holding it
| wrong, right?
| greiskul wrote:
| > foo = (lambda x = []: ...)
|
| > For that, it has to immediately evaluate [] (like it
| always does anywhere!). So how is this not exactly what
| it should do?
|
| It has a lambda there. In many programming languages, and
| the way human beings read this, say that "when there is a
| lambda, whatever is inside is evaluated only when you
| call it". Python evaluating default arguments at
| definition time is a clear footgun that leads to many
| bugs.
|
| Now, there is no way of fixing it now, without probably
| causing other bugs and years of backwards compatibility
| problems. But it is good that people are aware that it is
| an error in design, so new programming languages don't
| fall into the same error.
|
| For an equivalent error that did get fixed, many Lisps
| used to have dynamic scoping for variables instead of
| lexical scoping. It was people critizing that decision
| that lead to pretty much all modern programming languages
| to use lexical scoping, including python.
| bsder wrote:
| > I've written Python for 14 years and have never seen code
| like that.
|
| Exactly because it's a footgun that _everybody_ hits very
| early. I think the Python linters even flag this.
|
| The fact that default arguments in Python get set to "None"
| is precisely because of this.
| Spivak wrote:
| Python made a choice to have default _values_ instead of
| default expressions and it comes with positive and negative
| trade-offs. In languages like Ruby with default expressions
| you get the footgun the other way where calling a function
| with a default parameter can trigger side effects. This kind
| of function is fine in Python because it 's unidiomatic to
| mutate your parameters, you do obj.mutate() not mutate(obj).
|
| So while it's a footgun you will be writing some weird code
| to actually trigger it.
| smokel wrote:
| The ugliness scares most people away, or at least it doesn't
| accidentally lure them in.
| encom wrote:
| HN is like 4chan, but house-broken.
| drweevil wrote:
| I find aesthetically pleasing, tbh.
| Aurornis wrote:
| > and heavy moderation.
|
| I don't think there is heavy moderation in the traditional
| sense. It's primarily user-driven, aside from obvious abusive
| behavior. The downvote and flagging mechanisms do the heavy
| lifting.
|
| The heuristics that detect a high ratio of arguments to upvotes
| (as far as I can tell) can be frustrating at times, but they
| also do a good job of driving ragebait off the front page
| quickly.
|
| The moderators are also very good at rescuing overlooked
| stories and putting them in the second chance pool for users to
| consider again, which feels infinitely better than moderators
| forcing things to the front page.
|
| It also seems that some times moderators will undo some of the
| actions that push a story off the front page if it's relevant.
| I've seen flagged stories come back from the dead or flame war
| comment sections get a section chance at the front page with a
| moderator note at the top.
|
| Back in the Slashdot days I remember people rotating through
| multiple accounts for no reason other than to increase their
| chances of having one of them with randomly granted moderation
| points so they could use them as weapons in arguments. Felt
| like a different era.
| 90s_dev wrote:
| > I don't think there is heavy moderation in the traditional
| sense.
|
| It seems to be a combination of manual and automated
| moderation (mostly by dang but he has more help now), using
| the kind of over/under-engineered custom tools you'd expect
| from technophiles. I've wondered a lot about the kind of
| programming logic he and the others coded up that make HN as
| curious as it is, and I have half a mind to make a little
| forum (yet another HN clone, but not really) purely for the
| sake of trying to implement how I think their moderation
| probably works. If I went through with this, I'd have it
| solely be for Show HN style project sharing/discussion.
| mdaniel wrote:
| > (mostly by dang but he has more help now)
|
| https://news.ycombinator.com/item?id=43558671 for those who
| missed it
| 90s_dev wrote:
| Matt's right, guys.
| 90s_dev wrote:
| I'm pretty much decided on making the Show HN clone even if
| nobody uses it. Because I know it's a good idea and I
| believe in it:
|
| * For every N=round(10) years software experience, you can
| click submit N _10 times.
|
| * You _must* provide a link and year proving your earliest
| project or employoment.
|
| * Max 256 submissions per day _for everyone total_.
|
| Should be a fun experiment. Email me if you want an early
| invite.
| ted_dunning wrote:
| How do people with experience that predates the internet
| prove that?
| 90s_dev wrote:
| They'll find a way.
| smt88 wrote:
| HN is heavily moderated by humans. They've discussed it
| before. They're machine-assisted, but heavily involved day-
| to-day.
| baq wrote:
| I'm still missing being able to read only +5 insightful
| comments after 20 years.
|
| I'd expect Slashdot's point systems and meta moderation to make
| a comeback in the LLM slop world we live in currently, but
| nobody knows about it anymore. Steam kinda rediscovered it in
| their reviews, perhaps even was inspired by it (I hope...)
| Tijdreiziger wrote:
| Dutch tech news website Tweakers.net basically has this.
| Comments are moderated on a scale from -1 to +3, and then you
| can choose to expand only +2 and up.
| spockz wrote:
| I have it set to 2 by default which helps but can also be
| annoying on fresh posts as unmoderated posts are also
| hidden. And then if there is a +2 post it totally only
| makes sense in the context of the tree so now I'm manually
| unfolding the parent comments.
|
| All of this to say that one feature brings in a whole set
| of additional complications. Less is more.
| busymom0 wrote:
| Can you explain how that works? I visited the site but
| don't understand their language.
| andai wrote:
| _Perfection is achieved, not when there is nothing more to add,
| but when there is nothing left to take away._ --Antoine de
| Saint-Exupery
| donnachangstein wrote:
| The genius of Slashdot's moderation system is that it forced
| you to be fastidious with how your limited mod points were
| allocated, only using them on posts that really deserved them.
|
| As opposed to tearing through a thread and downvoting any and
| everything you disagree with.
|
| Slashdot encouraged more positive moderation, unless you were
| obviously trolling.
|
| The meta-moderators kept any moderation abuse in check.
|
| It's sad to see we have devolved from this model, and
| conversations have become far more toxic and polarized as a
| direct result of it. (Dissenting opinions are quickly hidden,
| and those that reinforce existing norms bubble to the top.)
|
| I believe HN papers over these problems by relying on a lot of
| manual hand-moderation and curation which sounds very labor
| intensive, whereas Slashdot was deliberately hands-off and left
| the power to the people.
| perching_aix wrote:
| How are you determining the causative relationship?
| bawolff wrote:
| I remember slashdot being full of "M$ is teh evill111!!" and
| other childish nonsense. At the end of the day what matters
| is the results, and i much prefer the discusions on hn than
| /.
| MetaWhirledPeas wrote:
| For HN, replace M$ with Musk and you'll still see
| parallels. Although to be fair HN is much more even-keeled
| than most commenting systems, like Ars and Electrek.
|
| Slashdot is struggling a bit these days. The lower the
| comment count, the worse the moderation, so it's a bit of a
| snowball effect. The UI could use some help; there are many
| who don't want it to change at all, but it would be nice if
| an alternate UI were available, hitting the same API.
| andsoitis wrote:
| To lakonizein esti philosophein
|
| To be spartan is to philosophize.
| thaumasiotes wrote:
| I'm curious why lakonizein needs to be nominalized and
| philosophein doesn't.
| whyowhy3484939 wrote:
| The heavy, thick irony of these people running their own
| platform on as little technology as possible and depending
| heavily on human input.
|
| It's like they know somewhere deep inside that "mo tech" is not
| helping anyone.
| dang wrote:
| There's a less cynical interpretation of that which is not so
| far from the case.
| akomtu wrote:
| HN's dry text-only design is what repels most of the problems.
| Mods only polish it a bit.
| gchamonlive wrote:
| Maybe it's an effect of not having to compete with other
| outlets.
| chairmansteve wrote:
| Slashdot sold out to Conde Nast. That killed it. It was very
| well designed.
| jgalt212 wrote:
| I think HN has some pretty sophisticated automated and human-
| in-the-loop moderation features that few other sites possess,
| or throw as much resources at. Because HN is not ad-supported
| it does not fall victim to tragedy of the commons.
| peepeepoopoo130 wrote:
| HN's moderation is good like StackOverflow's moderation was
| good.
| brundolf wrote:
| > [Clarc] is much faster and also will easily let HN run on
| multiple cores
|
| This was all running on a single core??
| quotemstr wrote:
| Modern CPUs are stupid fast when you use them the right way.
| You can take scale-up surprisingly far before being forced to
| scale out, even when that scale out is something as modest as
| running on multiple cores.
| thatwasunusual wrote:
| Based on context, you are insinuating that a discussion board
| like HN _can_ be hard on the CPU alone? If so, how? My guess
| would be _also_ be that the CPU would have little to do by
| itself, but that I/O would take the brunt?
| grg0 wrote:
| Negotiating TLS handshakes is one way. But I'd imagine the
| rest is largely IO-bound like you said.
|
| It still puts into perspective what a big pile of dogshit
| consumer software has become that stuff like this comes as
| a surprise. Also, the last time I checked, Let's Encrypt
| also ran on a single system. As did the Diablo 2 server (I
| love reading about these anecdotes.)
|
| For every incremental change in HW performance, there is an
| order-of-magnitude regression in SW performance.
| bawolff wrote:
| Servers can also serve small text files out of memory
| incredibly fast.
| toomuchtodo wrote:
| https://news.ycombinator.com/item?id=30067997
|
| https://news.ycombinator.com/item?id=5229548
|
| https://news.ycombinator.com/item?id=28478379
|
| https://news.ycombinator.com/item?id=27452276
| haiku2077 wrote:
| Modern CPUs are crazy fast. 4chan was serving 4 million users
| with a single server, a ten year old version of PHP and like
| 10000 lines of spaghetti code. If you do even basic code
| quality, profiling and optimization you can serve a huge number
| of users with a fraction of a CPU core.
|
| I/O tends to be the bottleneck (disk IOPS and throughput,
| network connections, IOPS and throughput). HN only serves text
| so that's mostly an easy problem.
| bakugo wrote:
| 4chan is a special case, because all of its content pages are
| static HTML files being served by nginx that are rewritten on
| the server every time someone makes a post. There's nothing
| dynamic, everyone is served the exact same page, which makes
| it much easier to scale.
| mschuster91 wrote:
| ... which, again, shows just how much power you can get out
| of a 10 year old server if you're not being a sucker for
| the "latest and greatest" resume-driven-development crap.
|
| Just look at New Reddit, it's an insane GraphQL
| abomination.
| agumonkey wrote:
| Here goes all your software engineering classes. So bare
| it's hilarious
| donnachangstein wrote:
| It's not a special case at all. 20 years ago this was
| standard architecture (hell, HN still caches static
| versions of pages for logged-out users).
|
| No, what changed is the industry devolved into over-
| reliance on mountains of 'frameworks' and other garbage
| that no one person fully understands how it all works.
|
| Things have gotten worse, not better.
| pmdr wrote:
| The "this won't scale" dogma pushed by cloud providers
| via frameworks has actually scared people into believing
| they really need a lot more resources than they actually
| do to display information on the web.
|
| It's really dumbfounding that most devs fell for it even
| as raw computing power has gotten drastically cheaper.
| haiku2077 wrote:
| I was having a conversation with some younger devs about
| hosting websites for our photography hobbies. One was
| convinced hosting the photos on your own domain would
| bankrupt you in bandwidth costs. It's wild.
| actuallyalys wrote:
| Static HTML and caching aren't special cases by any
| means, but a message board where literally nothing
| changes between users certainly seems like a special
| case, even twenty years ago. You don't need that in order
| to make a site run fast, of course, but that limitation
| certainly simplifies things.
| bawolff wrote:
| I wouldn't call that a special case, just using a good tool
| for the job.
| haiku2077 wrote:
| I worked at at company near the top of https://en.wikipedia
| .org/wiki/List_of_the_largest_software_c... for a while. It
| was extremely common that web services only used about
| 1/20th of a CPU core's timeshare. These were dynamic web
| services/APIs. (We did have to allocate more CPU than that
| in practice to improve I/O latency, but that was to let the
| CPU idle to be ready to quickly react to incoming network
| traffic.)
|
| This was many years ago on hardware several times slower
| than the current generation of servers.
| JW_00000 wrote:
| I was going to reply that this is pretty common for web apps,
| e.g. NodeJS or many Python applications also do not use multi-
| threading, instead just spawning separate processes that run in
| parallel. But apparently, HN ran as 1 process on 1 core on 1
| machine (https://news.ycombinator.com/item?id=5229548) O_O
| galaxyLogic wrote:
| I think NodeJS apps typically rely on JavaScript event-loop
| instead of starting new processes all the time.
|
| Spawning new processes for every user is possible but would
| probabaly be less scalable than even thread-switching.
| watermelon0 wrote:
| NodeJS apps usually use multiple processes, since JS event
| loop is limited to a single core. However, this means that
| you cannot share data and connection pools between them.
| jay-barronville wrote:
| > I think NodeJS apps typically rely on JavaScript event-
| loop instead of starting new processes all the time.
|
| > Spawning new processes for every user is possible but
| would probabaly be less scalable than even thread-
| switching.
|
| I'd just like to note/clarify that there is, in fact,
| multi-threading happening under the hood when running
| Node.js. libuv, the underlying library used for creating
| and managing the event loops, also creates and maintains
| thread pools that are used for some concurrent and
| parallelizable tasks. The fact that JavaScript (V8 in the
| case of Node.js) and the main event loop are single-
| threaded doesn't mean that multi-threading isn't involved.
| This is a common source of confusion.
| sgarland wrote:
| Every time a dev discovers how tremendously bloated and slow
| modern software is, an angel gets its wings.
| dang wrote:
| > Arc was implemented on top of Racket
|
| Originally on MzScheme, then later PLT Scheme. It was ported to
| Racket by the great kogir, IIRC.
| kragen wrote:
| Aren't MzScheme, PLT Scheme, and Racket the same thing?
| dang wrote:
| Yes, but for me each name denotes the thing as it was when it
| was called that.
|
| (This conversation has turned unexpectedly ontological!)
| altairprime wrote:
| Welcome to HN :)
| rurban wrote:
| They were all based on MzScheme, yes. But nowadays Racket
| runs on the fastest scheme, chez.
|
| HN runs now on SBCL, which is much faster and also multi-
| threaded.
| sctb wrote:
| I think MzScheme is just the core (non-GUI) part of PLT Scheme,
| which was renamed to Racket.
|
| Also, I believe pg started implementing Arc on Scheme48 based
| on mailing list activity at the time. I've always been curious
| about the switch to PLT!
| neilv wrote:
| That might've been more a reflection on PLT than on Scheme48
| (which also had some really smart people on it).
|
| As some point, when I was writing a lot of basic ecosystem
| code that I tested on many Scheme implementations, PLT Scheme
| (including MzScheme, DrScheme, and a few other big pieces),
| by Matthias Felleisen and grad students at Rice, appeared to
| be getting more resources and making more progress than most.
|
| So I moved to be PLT-first rather than portable-Scheme-first,
| and a bunch of other people did, too.
|
| After Matthias moved to Northeastern, and students graduated
| on to their own well-deserved professorships and other roles,
| some of them continued to contribute to what was soon called
| Racket (rather than PLT Scheme). With Matthew Flatt still
| doing highly-skilled and highly-productive systems
| programming on the core.
|
| Eventually, no matter how good their intentions and how solid
| their platform for production work, the research-programs-
| first mindset of Racket started to be a barrier to commercial
| uptake. They should've brought in at least one of the
| prolific non-professor Racketeers into the hooded circle of
| elders a lot sooner, and listened to that person.
|
| One of the weaknesses of Racket for some purposes was lack of
| easy multi-core. The Racket "Places" concept
| (implementation?) didn't really solve it. You can work around
| it creatively, as I did for important production (e.g., the
| familiar Web interview load-balancing across application
| servers, and also offloading some tasks to distinct host
| processes on the same server), but using host multi-core more
| easily is much nicer.
|
| As a language, I've used both Racket and CL professionally,
| and I prefer a certain style of Racket. But CL also has more
| than its share of top programmers, and CL also has some very
| powerful and solid tools, including strengths over Racket.
| agumonkey wrote:
| Are we iterating over all lisp implementations ? A strange
| variant of the ship of Theseus
| oblio wrote:
| Next up, the end goal: Emacs Lisp.
| dang wrote:
| Yes and dynamically scoped.
| pdpi wrote:
| Lisp of Theseus does have a certain ring to it.
| nickpeterson wrote:
| Random question, how big is hacker news? It's plain text so I'd
| imagine it's reasonably compact?
| brudgers wrote:
| <back of napkin>
|
| Based on the current id, about 45,000,000 items.
|
| Assuming 1KB per item, about 45GB.
|
| So with code and OS, probably it would fit on a $10 thumb drive
| without compression.
|
| </back of napkin>
|
| If I am within a couple of orders of magnitude, it is hard for
| me to see a benefit from compression.
| johnisgood wrote:
| > Much of the HN codebase consists of anti-abuse measures that
| would stop working if people knew about them. Unfortunately.
| separating out the secret parts would by now be a lot of work.
| The time to do it will be if and when we eventually release the
| alternative Arc implementations we've been working on.
|
| Is this a case where security through obscurity is good, or bad?
| Legit question. I am curious to read the responses it may prompt.
|
| I found this though:
| https://news.ycombinator.com/item?id=27457350
|
| > There are a lot of anti-abuse features, for example, that need
| to stay secret (yes we know, 'security by obscurity' etc., but
| nobody knows how to secure an internet forum from abuse, so we do
| what we know how to do). It would be a lot of work to disentangle
| those features from the backbone of the code.
|
| The question still stands for curiosity!
| electroly wrote:
| Abuse of this sort isn't a security issue in the network sense.
| i.e. the security of Hacker News is not imperiled by people
| creating spam accounts, but nonetheless we want to stop that.
| dang wrote:
| The OP got everything right except that bit. This is a reason
| for not open-sourcing HN (the application), but it doesn't
| relate to open-sourcing Clarc (the language implementation). We
| could do that without revealing any anti-abuse stuff.
|
| More at https://news.ycombinator.com/item?id=44099560.
| kayodelycaon wrote:
| Obscurity is extremely good at filtering out low to medium
| skilled griefers. It won't stop anyone who is highly motivated,
| but it will slow them down significantly.
|
| Hacker News is small enough that obscurity would give
| moderators enough time to detect bad actors and update rules if
| necessary.
| johnisgood wrote:
| Is HN really that small, considering "HN hug of death"? If it
| really is small, then hey, we may have already talked! :)
| kayodelycaon wrote:
| Hacker News is a single forum with a tiny attack surface.
|
| Literally any e-commerce site has larger and more critical
| infrastructure to protect.
| qingcharles wrote:
| There are forks of what I assume is the scrubbed HN codebase,
| e.g. https://github.com/jgrahamc/twostopbits
| brudgers wrote:
| _Is this a case where security through obscurity is good, or
| bad? Legit question. I am curious to read the responses it may
| prompt._
|
| To me; philosophically; and to a first approximation, all
| security is through obscurity.
|
| For example encryption works for Alice so long as Bob can't see
| the key...
|
| ... or parking the Porsche in the garage, reduces the
| likelihood someone knows there is a Porsche and reduces the
| likelihood they know what challenges exist inside the garage.
| Now put a tall hedge and a fence around it and the average
| passerby has to stop and think "there's probably a garage
| behind that barrier."
|
| To put it another way, out of sight has a positive correlation
| to out of mind.
|
| Yes of course a determined well funded Bob suggests obscurity
| with Bob's determination and budget. If Bob is willing to use a
| five dollar wrench, Alice might tell Bob the key.
| wvenable wrote:
| This likely isn't so much "security through obscurity" because
| it's not really about security in the traditional sense but
| instead about anti-griefing measures.
| Fraterkes wrote:
| Look, I like the way HN looks but there aren't many sites that
| essentially look like bare html but still struggle with
| displaying more than 300 comments.
| mdp2021 wrote:
| What do you mean? With the current internals, a 300 posts HN
| page would weigh ~500kb; different ones will hardly be more
| compact. Where is the <<struggle>>?
| gtirloni wrote:
| I assume it's worth it to keep it in Arc and not rewrite in
| something more widely available, is that so?
| dang wrote:
| https://news.ycombinator.com/item?id=23483715
| Xeoncross wrote:
| The article makes it sounds like Dang also helps with the
| codebase. There must be others, but Dang is the one I've seen for
| years at this point.
|
| I've beeing a part of many online communities as both a member
| and moderator. However, Hackernews is the community that I've
| been apart of for the longest and the one that brings me the most
| joy.
|
| Dang, is there anything random people like me can do for you? Can
| I at least buy you a coffee or something?
| someperson wrote:
| Keep in mind Hacker News (formerly Startup News) is effectively
| a loss-leading advertising arm of Y Combinator, which at this
| point is one of the most successful investment firms in the
| world.
|
| And HN founder and original author Paul Graham is (at least on
| paper) billionaire, not merely the decamillionare he used to
| be.
|
| Though it's still good for it to be a self-funding project even
| if that means accepting donations.
| ksec wrote:
| > Initially called Startup News or occasionally News.YC., it
| became known by its current name on August 14, 2007.[4]
|
| Oh I have been on HN since 2008 and didn't know that.
| dang wrote:
| https://news.ycombinator.com/hackernews.html
| bwilliams18 wrote:
| Is there a canonical definition of hacker as described in
| this post and (at it's best) this community? I always
| feel strong gravitation to this term, but also feel
| nervous about embracing it because of it's criminal
| connotations in common parlance.
| kosolam wrote:
| Is this open source software that I can run my own hacker news as
| well?
| Tistel wrote:
| Is it still Paul Graham/Robert Morris working on it? Skimmed the
| article but did not see a ref.
|
| need to check out what it adds to CL: http://arclanguage.org/
| dang wrote:
| Alas, they moved on long ago.
___________________________________________________________________
(page generated 2025-05-26 23:00 UTC)