News for hackers. Stuff that matters.
Re:HyperTerm – JS/HTML/CSS Terminal by teamhappy on Friday July 15, 2016 @01:24PM (#12102509)
Trivial apps depending on 14+ million lines of code is not a good thing.

Edit: @michaelmior I think you know what I mean.

Re:HyperTerm – JS/HTML/CSS Terminal by michaelmior on Friday July 15, 2016 @01:26PM (#12102527)
I think a good terminal emulator is far from trivial.

Edit: I'm not sure I do know what you mean. I agree that building trivial apps in Electron probably doesn't make sense. But my terminal emulator is something I spend most of my day using. If building that on top of 14 million lines of C++ gives me a better piece of software, I'm all for it.

Re:HyperTerm – JS/HTML/CSS Terminal by Jtsummers on Friday July 15, 2016 @01:49PM (#12102679)
https://www.openhub.net/p/putty

Perhaps not as feature comlpete, and not my daily use terminal emulator, but it's only 110k lines of code. And it's not just a terminal emulator, that's just one thing it does in that 110k lines of code.

EDIT: I was going to look up others but I'm distracted by other obligations. My point being: Terminal Emulators aren't actually that complex.

Re:HyperTerm – JS/HTML/CSS Terminal by destructionator on Friday July 15, 2016 @07:10PM (#12104374)
I wrote a terminal emulator <https://github.com/adamdruppe/terminal-emulator> and use it daily so it is good enough for me at least... clocks in at ~15k lines (including the gui helper lib).

The biggest complexity is dealing with legacy terminals... and you can really just target the handful of xterm features programs actually use and get something working without a huge amount of code.

Re:HyperTerm – JS/HTML/CSS Terminal by alaroldai on Friday July 15, 2016 @01:53PM (#12102704)
Does it though? iTerm2 is the most feature-rich terminal I've ever used, and even then it's several orders of magnitude smaller then Electron (cloc says it's around 111K lines of Objective-C, with around 38K more lines split across Python and C++).
Re:HyperTerm – JS/HTML/CSS Terminal by michaelmior on Friday July 15, 2016 @02:05PM (#12102771)
Maybe it's not better. That wasn't really my point though. I'm just saying that LOC is a fairly useless metric for evaluating software. Especially from an end user perspective.
Re:HyperTerm – JS/HTML/CSS Terminal by tomc1985 on Friday July 15, 2016 @11:19PM (#12105096)
How so? It affects load time, understandability, binary size, dependency payload...

I personally hate the load times. Node apps always seem to need to think for a second or too. Sublime Text v VSCode is pretty bad. Sublime Text v Atom is even worse.

When you're moving fast and in your flow, it gets to be really annoying.

Re:HyperTerm – JS/HTML/CSS Terminal by michaelmior on Saturday July 16, 2016 @01:13AM (#12105323)
I was talking more about how it affects end users. Understandability of the code and dependencies are irrelevant in this case. Load time is important, but LOC is only a proxy for that metric. It's not totally unreasonable to imagine a well-written app with twice the code start faster than a poorly written one.
Re:HyperTerm – JS/HTML/CSS Terminal by themartorana on Friday July 15, 2016 @02:38PM (#12102953)
I agree with you, with regards to the end user caring or not, but there aren't many tech-unsavvy people using terminal emulators on the regular. So when Putty and iTerm2 both weigh in between 100-200k LOC and this is in the 14m LOC space, it's difficult to not make the presumption that that's a lot for a terminal emulator.
Re:HyperTerm – JS/HTML/CSS Terminal by teamhappy on Friday July 15, 2016 @03:21PM (#12103225)
> I'm just saying that LOC is a fairly useless metric for evaluating software.

That's just not true.

Most open-source people want to be able to read, audit, fix, and (if it comes to it) maintain other people's code. 14+ million lines of code make this virtually impossible. (To be fair: Electron-based apps aren't the best example for the point I'm trying to make.)

Rate of change is another very useful metric.

Re:HyperTerm – JS/HTML/CSS Terminal by e12e on Saturday July 16, 2016 @12:39AM (#12105263)

  git clone git://git.suckless.org/st
  cloc --quiet st
  http://cloc.sourceforge.net v 1.60
  T=0.09s
  (45.8 files/s, 56588.2 lines/s)
  ------------------------------------
  Language   files blank comment code
  ------------------------------------
  C            1      497  253    3654
  C/C++ Header 2       40  124     313
  make         1       13    2      45
  ------------------------------------
  SUM:         4      550  379    4012
  ------------------------------------
[ed: Actually, this get even more extreme for the terminal I actually use everyday, sakura[1]:

  apt-get source sakura
  (cloc sakura)
Gives a total of 2490 lines of code, of which 2380 are C, the rest is CMake, make and Bourne Shell... that is cheating of course, as sakura uses libvte: which clocks in at ~45K lines of C - and a total of ~103K loc all together. Still a far cry from millions of lines of code...

[1] https://bugs.launchpad.net/sakura ]

Re:HyperTerm – JS/HTML/CSS Terminal by michaelmior on Saturday July 16, 2016 @01:02AM (#12105305)
Sure. I wasn't arguing that millions of lines of code are necessary for a terminal. Thanks for the pointer to Sakura though! I quite like it and I might have to give it a try :)
Re:HyperTerm – JS/HTML/CSS Terminal by sgrove on Friday July 15, 2016 @01:36PM (#12102590)
I agree, but I'd take it a step further - the 15+ million Lo(memory-unsafe!)C for the unix kernel other (all?) trivial apps sits on is also not a good thing.
Re:HyperTerm – JS/HTML/CSS Terminal by teamhappy on Friday July 15, 2016 @01:49PM (#12102683)
I agree with your larger point (I think) but for what it's worth: Most of those 15+ million lines are drivers you don't use.
Re:HyperTerm – JS/HTML/CSS Terminal by jahewson on Friday July 15, 2016 @01:32PM (#12102571)
How many lines is the JDK? or .NET, or libcpp?
Re:HyperTerm – JS/HTML/CSS Terminal by teamhappy on Friday July 15, 2016 @01:46PM (#12102665)
LLVM: 1.5 million (I assume libc++ is less than 500k)

OpenJDK: 6.8 million

.NET: 10.5 million

Source: https://www.openhub.net/