News for hackers. Stuff that matters.
Re:Sourcehut welcomes Bitbucket refugees by viach on Friday August 23, 2019 @06:30AM (#20776108)
They violently break all the recent frontend best practices. Where is the React or Vie, SPA architecture, tons of JS?

There should be a federal law prohibiting making fast and simple UIs so that nobody will have concerns that the UI frameworks war leads us to great future.

Re:Sourcehut welcomes Bitbucket refugees by Waterluvian on Friday August 23, 2019 @10:26AM (#20777969)
To be fair, not having any of those technologies is just a side effect of deciding to make a dead simple, spartan UI (which isn't a bad thing).

You can get away with very fast, very maintainable front-end code that doesn't need any special frameworks when you say no to modern tastes and features. More websites should really consider doing so.

One of the things that breaks my heart just a little is visiting these sites that load in 30ms and thinking that the Internet of 2019 could be largely like this and how amazing that would feel. Sure, there's lots of complex features we cherish having online, but those could all be hidden behind the main pages that are dead simple. Makes me think about how google.com is the gateway to a massive conglomerate of capability, web apps, features, etc. but the main page itself loads almost instantly.

Re:Sourcehut welcomes Bitbucket refugees by ken on Friday August 23, 2019 @03:57PM (#20781942)
> To be fair, not having any of those technologies is just a side effect of deciding to make a dead simple, spartan UI (which isn't a bad thing).

That's also why google.com was originally so simple, in stark contrast to their competitors of the day.

Re:Sourcehut welcomes Bitbucket refugees by einpoklum on Friday August 23, 2019 @11:08AM (#20778395)
And it would kill them to write a decent CSS file?
Re:Sourcehut welcomes Bitbucket refugees by lazyjones on Friday August 23, 2019 @07:21AM (#20776347)
I love the design and wish a sufficiently large part of the web looked like this... Incidentally, it's a bit like HN.
Re:Sourcehut welcomes Bitbucket refugees by nannal on Friday August 23, 2019 @08:19AM (#20776724)
Their page was done in 114ms.

Where are the PBs of javascript, the YBs of uncompressed images in 128x320 res?

Clearly they've messed up their CDN and we're missing content.

Re:Sourcehut welcomes Bitbucket refugees by notus on Friday August 23, 2019 @09:53AM (#20777604)
All that really matters is the entry point size in modern application. I built an admin console for our company in react and it's downloaded and rendered in 220ms. People can make performant SPA's they just choose not to.
Re:Sourcehut welcomes Bitbucket refugees by majewsky on Friday August 23, 2019 @10:16AM (#20777846)
> for our company

Is that in a single location? If so, then it's not really impressive. A good website loads fast even when the client is on the other side of the globe.

Re:Sourcehut welcomes Bitbucket refugees by notus on Friday August 23, 2019 @11:38AM (#20778695)
It goes out to all the cloudfront edge locations so that generally isn't an issue. That being said anything under 300ms is not going to be very noticeable to most people.
Re:Sourcehut welcomes Bitbucket refugees by rhizome on Friday August 23, 2019 @04:09PM (#20782055)
Contemporary fancysites might pull up a skeleton in that time, but it'll (often) take multiple seconds for every div to be populated and third-party request to return, juggling the page the whole time.

"Initial request to clickability" is definitely longer than it used to be.

Re:Sourcehut welcomes Bitbucket refugees by mkane848 on Friday August 23, 2019 @10:07AM (#20777756)
Same, but users think it's ugly and doesn't look "right" or "modern" :/
Re:Sourcehut welcomes Bitbucket refugees by lazyjones on Friday August 23, 2019 @12:17PM (#20779102)
Lesson learnt: don't listen to all users, have confidence in some of your decisions...
Re:Sourcehut welcomes Bitbucket refugees by mkane848 on Friday August 30, 2019 @02:37PM (#20841277)
Haha who do you think makes the final call? Executives (i.e. users) or the IT Department?
Re:Sourcehut welcomes Bitbucket refugees by Crinus on Friday August 23, 2019 @10:52AM (#20778225)
Which users?
Re:Sourcehut welcomes Bitbucket refugees by giancarlostoro on Friday August 23, 2019 @12:01PM (#20778937)
The ones that usually flock to platforms. Course then you have classic reddit and 4chan which had pretty simple designs.
Re:Sourcehut welcomes Bitbucket refugees by lasagnaphil on Saturday August 24, 2019 @02:15AM (#20785577)
I changed back to old Reddit recently, and hell yeah the site is a lot more usable. The new version often had severe lag when loading comments, but I don’t have this anymore.
Re:Sourcehut welcomes Bitbucket refugees by giancarlostoro on Saturday August 24, 2019 @12:11PM (#20787954)
Its an unecessary single page abomination. Reddit will always be popular it doesnt need a new design. The best part was that different communities could style their subs.

I also remember when you could register without an email.

Re:Sourcehut welcomes Bitbucket refugees by vnorilo on Friday August 23, 2019 @06:39AM (#20776156)
There’s not even any analytics or trackers. The shame!
Re:Sourcehut welcomes Bitbucket refugees by rutthenut on Friday August 23, 2019 @08:45AM (#20776905)
Re:Sourcehut welcomes Bitbucket refugees by yk on Friday August 23, 2019 @08:21AM (#20776742)
Perhaps one could use greasemonkey to inject Google analytics into arbitrary sites. (And load some font, and perhaps have a 20 second timeout somewhere.)
Re:Sourcehut welcomes Bitbucket refugees by pbhjpbhj on Friday August 23, 2019 @08:24AM (#20776764)
Reverse-reader view! Isn't there a bookmarklet that Geocities-ifies pages somewhere, same idea.
Re:Sourcehut welcomes Bitbucket refugees by buildzr on Friday August 23, 2019 @09:42AM (#20777485)
Don't forget Facebook like buttons, those really need to be front and center on every page.
Re:Sourcehut welcomes Bitbucket refugees by bald42 on Friday August 23, 2019 @09:53AM (#20777608)
No worries the snakeoil antivirus suites already does that for you ;-)
Re:Sourcehut welcomes Bitbucket refugees by panpanna on Friday August 23, 2019 @07:00AM (#20776244)
And no non-standard fonts on some random CDN.

My eyes are bleeding

Re:Sourcehut welcomes Bitbucket refugees by dreamcompiler on Friday August 23, 2019 @08:18AM (#20776717)
OMG! A web server serving raw HTML! The horror!
Re:Sourcehut welcomes Bitbucket refugees by progval on Friday August 23, 2019 @11:04AM (#20778356)
Excuse-me but you're supposed to call that Server-Side Rendering now.
Re:Sourcehut welcomes Bitbucket refugees by dreamcompiler on Friday August 23, 2019 @12:01PM (#20778939)
My bad.
Re:Sourcehut welcomes Bitbucket refugees by sunflowerdeath on Friday August 23, 2019 @11:59AM (#20778917)
The interface does not seem fast and simple to me, it's more like primitive and unfinished. Using minimalistic SPA library, like, for example, Preact, adding some feedback for stuff like form validating and data loading would make ux more smooth. I dont want to say that SPAs are best for everybody, but I can't agree that they are always evil.
Re:Sourcehut welcomes Bitbucket refugees by panpanna on Friday August 23, 2019 @06:57AM (#20776234)
Monthly operational costs: $783

Maybe there is a relation?

Re:Sourcehut welcomes Bitbucket refugees by viach on Friday August 23, 2019 @06:59AM (#20776241)
Are you going to say there is not even a distributed no-SQL cluster behind this? Well, I can understand the UI part, but there are limits...
Re:Sourcehut welcomes Bitbucket refugees by panpanna on Friday August 23, 2019 @07:13AM (#20776302)
Local config for static stuff and postgres yes-SQL.

I assume it doesn't scale extremely easily but seems to work good enough for now.

Re:Sourcehut welcomes Bitbucket refugees by cryptonector on Friday August 23, 2019 @06:01PM (#20783126)
YesSQL. Perfect. I'm going to steal that.

YesSQL scales just fine to enterprises like VCS repo hosting. All you have to do is shard correctly (along the lines where you least need the power of SQL, preferably).

Re:Sourcehut welcomes Bitbucket refugees by t0astbread on Friday August 23, 2019 @12:00PM (#20778924)
I guess this boils down to the classic: No approach is universally better.

You can write a client-side application and distribute it through some CDN (like Netlify) and have no administration duties or server cost. However, your app will end up not working without JS (and your tech stack could possibly be a mess, depending on your choices). Or you can generate pages on the server which requires you to have, well, a server.

Both approaches have benefits and drawbacks.

Re:Sourcehut welcomes Bitbucket refugees by juped on Friday August 23, 2019 @04:04PM (#20782002)
Are you calling this high or low, and are you snarking or praising?

We're in way too deep here.

Re:Sourcehut welcomes Bitbucket refugees by NKCSS on Friday August 23, 2019 @08:18AM (#20776720)
Where did you get that from?
Re:Sourcehut welcomes Bitbucket refugees by dsissitka on Friday August 23, 2019 @08:32AM (#20776816)
Not sure about that figure but there's https://lists.sr.ht/~sircmpwn/sr.ht-discuss/%3CBVRVZEWYB30Q..... Looks like their monthly expenses were around $1,200 going in to Q2.
Re:Sourcehut welcomes Bitbucket refugees by majewsky on Friday August 23, 2019 @10:17AM (#20777868)
And that's for an offering including a CI build farm. Not just a website.
Re:Sourcehut welcomes Bitbucket refugees by panpanna on Friday August 23, 2019 @12:00PM (#20778928)
I just took 640+129/3

Anyway, few hundred dollars added or subtracted doesn't really change the point. This is a fairly cheap operation given what it provides.

Re:Sourcehut welcomes Bitbucket refugees by clarkevans on Friday August 23, 2019 @07:23AM (#20776358)
I'm sorry, sarcasm is not the best way to communicate an important point here at Hacker News. I appreciate the attempt at humor, but, it's not funny.
Re:Sourcehut welcomes Bitbucket refugees by omarhaneef on Friday August 23, 2019 @08:26AM (#20776773)
Before people downvote Clarkevans, please consider that this itself might be sarcasm and this is some new form of meta humor.
Re:Sourcehut welcomes Bitbucket refugees by gilbetron on Friday August 23, 2019 @10:48AM (#20778188)
The downvotes are sarcastic as well.
Re:Sourcehut welcomes Bitbucket refugees by vinceguidry on Friday August 23, 2019 @08:24AM (#20776760)
HN is often accused of being humorless but it's not true. The community simply has higher standards. Deadpan is your baseline, build from there.
Re:Sourcehut welcomes Bitbucket refugees by danharaj on Friday August 23, 2019 @08:11AM (#20776664)
Don't be so bloodless. :^)
Re:Sourcehut welcomes Bitbucket refugees by soggybutter on Friday August 23, 2019 @08:40AM (#20776875)
The downvotes on this sadden me greatly.
Re:Sourcehut welcomes Bitbucket refugees by cosmojg on Friday August 23, 2019 @11:21AM (#20778538)
Don't worry, they're sarcastic downvotes. ;)
Re:Sourcehut welcomes Bitbucket refugees by agumonkey on Friday August 23, 2019 @09:03AM (#20777056)
What a healthy dose of sarcasm on top of a healthy dose of gui layer.
Re:Sourcehut welcomes Bitbucket refugees by root_axis on Friday August 23, 2019 @09:05AM (#20777083)
Insightful and hilarious sarcasm delivering a unique perspective!
Re:Sourcehut welcomes Bitbucket refugees by EGreg on Friday August 23, 2019 @10:50AM (#20778211)
You know, libertarians often watch train wrecks and wonder how people can so clearly report problems and commiserate but the obvious solutions never seem to come up.

Refugees... from a third party service... because things changed since they began there

Some other third party service welcomes them, but has bad front end...

SOLUTION:

1. Mercurial and Git are decentralized! They have been designed to be so. Make your back end decentralized also. Why rely on a centralized site?

2. We used to run front-end programs on our computers! What a concept. We thought desktop computers were far better than mainframes and “fat” clients were far better than “thin” ones. Now we are all back to mainframes.

3. End to end encryption! I mean wow half of all humanity has their accounts in an epic database of 3-4 billion people from many breaches. All their private information is now out there. And you trust GitHub, Facebook or whoever to host your group’s private data?

MaidSAFE, MetaMask and other projects do 1,2,3. You should be in control of your keychains. We have plenty of desktop apps for managing eg git. Why let GitHub do it?

At the very least, run GitLab on your own in-house servers. But there are other alternatives.

And frankly, think about the speed and environmental impact of shipping all those bits to Google where you are “renting” Google Docs / Drive software to collaborate on something. You can have a lightning fast network in the Brazilian Favelas or a village in Namibia. Dating sites, ZocDoc, OpenTable, GrubHub can all be local open source apps running on local mesh networks. But nooo, we need project loon to send our signal to california in order to talk to our neighbor or coordinate dinner plans. And in Kashmir, etc. the government can simply turn off our internet and suddenly BAM — can’t even stock drugs locally for people??

https://www.nytimes.com/2019/08/14/technology/india-kashmir-...

Re:Sourcehut welcomes Bitbucket refugees by juped on Friday August 23, 2019 @02:28PM (#20780857)
You're replying to a sarcastic comment which is actually intended to praise Sourcehut's good frontend, hope that helps.

Further, it's a completely open source product which strongly encourages self-hosting; the main reason to subscribe to the hosted instance is to give money to the dev.

Re:Sourcehut welcomes Bitbucket refugees by The_Tick on Friday August 23, 2019 @02:17PM (#20780697)
For #1, yes it's decentralized but when running a team of people having a central clone is ideal. Yea I get it you can push and pull all day long but in reality people want to have a centralized location.

The big appeal for moving to mercurial for us was better merging than svn. Our team worked a certain way already, the tool handle this workflow and that's one of the reasons we chose mercurial. Decentralized was just nice for full backups in a lot of ways.

Re:Sourcehut welcomes Bitbucket refugees by hmnom on Friday August 23, 2019 @08:16AM (#20776705)
It's written in Python so as soon as they have enough users it will be as slow as any webpage with tons of JS. Thankfully, that CPU load won't be on the client side... so it's still an improvement
Re:Sourcehut welcomes Bitbucket refugees by kdmccormick on Friday August 23, 2019 @08:44AM (#20776902)
I recommend you relax your convictions about Python performance a bit.

Server-side bottlenecks are more often than not database reads/writes and other IO. And the few CPU-intensive operations can be delegated to libraries written in C.

Pure Python is slow for CPU-intensive tasks, but that doesn't mean that a Python webserver is necessarily slow.

Re:Sourcehut welcomes Bitbucket refugees by hmnom on Friday August 23, 2019 @08:50AM (#20776951)
So what you're saying is that the author of Sourcehat is expected to rewrite Flask, Jinja2, etc in C?

As an example, https://git.sr.ht/~sircmpwn/git.sr.ht/tree/master/gitsrht takes 600-800 ms to generate, and it's probably heavily cached already. What will happen when they get more users? The site will be unbearably slow, unless the guy starts spending thousands in servers.

Re:Sourcehut welcomes Bitbucket refugees by kdmccormick on Friday August 23, 2019 @08:57AM (#20777012)
I imagine that the CPU-intensive parts of Flask and Jinja2 are already written in C. Much of Python's standard library is.

800ms is a reasonable response time, and if they scale up according to their userbase, they will hopefully maintain that time.

(Also, we don't know how much of that 800ms is Python vs. IO)

Re:Sourcehut welcomes Bitbucket refugees by hmnom on Friday August 23, 2019 @09:00AM (#20777030)
https://github.com/pallets/flask

https://github.com/pallets/jinja

0% C

Also 800 ms is NOT a reasonable response time to generate what basically is a bunch of text, that is absurd, but I guess this is the baseline in 2019.

I trust all IO is cached. The author can confirm it. This is just how slow Python is.

Re:Sourcehut welcomes Bitbucket refugees by ignaloidas on Friday August 23, 2019 @02:29PM (#20780859)
Almost none of the IO of that page is cached actually[0]. The only thing I'm sure that is cached is the templates themselves. I'm pretty sure that neither git lookups, nor DB accesses are cached, where you can save time. And mind you, this is served from a single data center in USA, and the latency can already eat up a lot of that. I in Europe have 300ms ping to it, so it might be that you are simply far away from the physical location.

[0] https://git.sr.ht/~sircmpwn/git.sr.ht/tree/master/gitsrht/bl...

Re:Sourcehut welcomes Bitbucket refugees by wyldfire on Friday August 23, 2019 @10:17AM (#20777873)
Switching to PyPy is likely to improve the overall performance if it's not database or I/O bound.
Re:Sourcehut welcomes Bitbucket refugees by cik on Friday August 23, 2019 @09:20AM (#20777231)
This. There are also several optimized versions of python, other that stock, allowing you to increase performance based on your needs. I've shipped with many of them over the years.
Re:Sourcehut welcomes Bitbucket refugees by sirn on Friday August 23, 2019 @08:50AM (#20776945)
I used to run an image board written in Python with around 15m PV/month on a Pentium 4 machine in 2004 or so. The first bottleneck I found was the database. Some query optimization and caching fixed it very quickly. It goes a really long way until Python become a bottleneck, of which can also be fixed relatively easily (image processing in my case, which is fixed by moving the whole thing to a worker).
Re:Sourcehut welcomes Bitbucket refugees by kees99 on Friday August 23, 2019 @08:28AM (#20776791)
Are you sure? Looks like static pre-generated page to me:

  $ curl -s https://sourcehut.org/|egrep 'meta.*gen'
  <meta name="generator" content="Hugo 0.57.2" />
[0] https://gohugo.io/
Re:Sourcehut welcomes Bitbucket refugees by psychrometer on Friday August 23, 2019 @08:39AM (#20776869)
Re:Sourcehut welcomes Bitbucket refugees by helb on Friday August 23, 2019 @08:40AM (#20776873)
The website/blog (https://sourcehut.org) is static, the Sourcehut app itself (https://sr.ht) is Python-based.

https://git.sr.ht/~sircmpwn/?search=sr.ht

Re:Sourcehut welcomes Bitbucket refugees by bluedino on Friday August 23, 2019 @09:52AM (#20777596)
Python isn't slow. Running a lot of Python is slow.
Re:Sourcehut welcomes Bitbucket refugees by stjohnswarts on Friday August 23, 2019 @11:10PM (#20784981)
If it shards well and you have the capital to buy hardware, there's nothing wrong with using python