Ask HN: What's the most productive development environment you've used? - <AUTHOR> And what do you attribute that environment's productivity to? <comment><USER2> For me it's either been emacs with a lisp (SBCL or Clojure), or C# with Visual Studio. In both cases the reasons were similar -- deep editor integration with the language. Having an editor that understands how the language works and is structured makes refactoring and navigation much simpler, and makes it faster for me to author code.

That being said, most of the major editors are pretty great today. There's great support for all the top 10 languages in multiple editors, so if you want to write Go in VS Code, or Elixir in Atom, or Python in vim, you're probably going to have a good time (or at least the editor will do quite a lot for you). It's a great time to be a software developer!

<comment><USER3> Something that makes a big difference to me with Emacs and a Lisp relative to other languages and editors is that everything works by communicating to a running process.

Need to look up function args or a docstring? It doesn't have a separate thing that statically analyzes the code. It _asks the running process_. Want to see what an updated function outputs? It can _use the state of the running process_. Trying out some other change? It doesn't have to reload anything, lose or persist state, etc... it just updates the running process and you go from there. Want that running process to be on a remote server? An Android device? A page running in a web browser? Your powerful desktop while you work from a small laptop while lying in your hammock? No problem.

I don't understand why this hasn't caught on to the same degree with other languages. Most of them have REPLs and introspection tools, so they _could_ behave this way.

<comment><USER4> [http://brackets.io/](http://brackets.io/) has a live view for basic html and css.

There's a package for the nodejs ecosystem called "nodemon" [https://github.com/remy/nodemon](https://github.com/remy/nodemon)

That restarts the webserver on filechanges automatically.

The former is very basic and I don't really use it, but nodemon is quite nifty.

<comment><USER3> Reload-on-change is a relatively common feature. While a lot of modern web programming frameworks and libraries don't rely heavily on in-memory state, this is very much a different experience from having your editor constantly communicating with a live process.

</comment></comment></comment></comment><comment> T-A Delphi 3.0 (it went downhill after that). You could slap together a GUI quickly in the form editor, wire it up to your code (i.e. fill out the auto- generated event handlers) and compile in seconds (on a 1990s PC!).

There was a large selection of add-on GUI widgets and non-visual components, free and commercial, you could make your own and you could even modify the core Visual Component Library (the source was included).

If you needed to talk to other applications via COM, or directly to the OS, or load C/C++ libraries, it was easy. And you could do all that in one integrated IDE, instead of having to learn and orchestrate a jumbled mess of different tools.

It also didn't hurt that by targeting Windows only back then, you had something like 90% of the potential market covered.

It was bliss while it lasted.

<comment><USER5> I still use Delphi XE10 regularly, and it still is the most productive environment imho, (though object pascal is showing its age).

Second choice - Swift and Appcode, Swift is the most productive language I have used so far - all the static type checking but also it feels like a dynamically typed language.

</comment></comment><comment><USER6> For c# visual studio .NET in 2012 (I really haven't used it since) with its refactoring tools was pretty quick and its compilation system with integrated error checking in the text editor. It was really productive.

When I switched over to JavaScript I miss that a lot. Of course JavaScript just doesn't lean itself that well to automatic refactoring and the build process is significantly more complex too, so you only get local syntax checking usually in the editor.

And then eventually VS.NET got auto-help where it would should you documentation in a side window if you typed in a function or hovered over one. That was nice when using APIs you were not familiar with.

You could actually find all references/usages and be sure it was actually correct. I could click on an include and it would actually open the file no matter what and if it was referencing a DLL/Assembly it would immediate give me a decompile/documentation link.

The downside of the visual studio approach was the lack of text-based configuration. I spend hours adjusting settings in project files. (This was addressed via CMake when dealing with C++ but I do not think there was an equivalent for C# that I was aware of that the time.)

</comment><comment><USER7> Vim + tmux + NERDTree + a bunch of other plugins to handle code completion, gutters, etc.

Add a 34-inch ultrawide monitor (Dell has been best with color accuracy for me) to the mix and a nice keyboard, makes all the difference in the world!

<comment><USER8> Would you mind sharing what plugins your using? I've tried combining and setting up yourcompleteme, ale and one or two others I can't recall, but it never work as flawlessly as say vs code or pycharm in terms of completion, suggestions and quick doc viewing. Are you using vim or neovim?

<comment><USER9> I use neovim with deoplete as the completion engine and all the plugins to deoplete required for my work (python, JavaScript, Go). There's a number of other useful plugins, but that alone get me pretty close to IDE level completion.

</comment></comment></comment><comment><USER10> Visual FoxPro. By a long mile.

I never need to install a package system, use VM, install a database engine or anything like that.

Maybe the most was download some components from some site (I remenber was a large forum back them).

Integrate REPL, form builder, report builder, rdbms, database builder, query builder, menu builder...

\-----

Second best was Delphi 3/7.

<comment><USER11> What do you use now?

<comment><USER10> Now is a mix. Python, Swift, .NET/F#, Postgres, Sql Server, Firebird, etc......

</comment></comment></comment><comment><USER12> Python with PyCharm, especially when working with Django. It has a great understanding of whole toolkit and knows what to do and how to help you go faster.

From integrated testing, database source viewer up to working with remote interpreters, basically everything is included to make you focus on work without leaving the IDE.

The same goes when doing JavaScript, I'll go straight to WebStorm.

Need to mention my go to OS is ArchLinux with the latest KDE on top of it. If I have to use Windows, then I'll fire up an Arch Linux VM and live with a SSH session.

</comment><comment><USER13> Arch Linux, i3, vscode with vim bindings, Firefox with Vimium.

Optimized for not using your mouse. It's not so much about literally saving you time since typing is only small portion of your day, but being able to express yourself with less effort goes a long way in keeping you from feeling mentally drained

<comment><USER14> Is there a simple way in vscode to pass selection of text to external tool like sort or python script, like vim can do? I tried but didn't find anything simple...

</comment></comment><comment><USER15> Turbo Pascal in 1983-84. The first IDE is ever saw, compiler, linker, editor and debugger ran in memory on a PC/XT with 640K RAM. I still have the impression today that it could build faster than I could think, but of course the expectation of software was much less than today.

<comment><USER5> This always gets me shaking my head - things that turbo pascal is smaller than [http://prog21.dadgum.com/116.html](http://prog21.dadgum.com/116.html). Turbo pascal was a marvel of its time

</comment></comment><comment><USER16> TypeScript, VSCode, Relay, GraphQL, Jest, React/React Native - a lot of modular tools which combine into a really safe and fast development environment for web/iOS.

Feedback is close to instant, tools are all open for improvements and the people running these projects are accessible.

</comment><comment><USER17> DataGrip by Jetbrains

I have yet to encounter a better SQL IDE. In particular, it has fantastic auto complete and it has drivers for pretty much every database under the sun right out of the box.

<comment><USER18> Agreed, also the DB tooling in the jet rain IDEs basically is datagrip it just use a different UI, the underlying layer is near identical, enough that I have IntelliJ 'projects' that just open a DB connection.

</comment></comment><comment><USER19> Unity3d: you can run a game in it and adjust everything live, including scripts. Also I've yet to see a UI framework as flexible as UGUI that is based on Unity's ECS architecture.

</comment><comment><USER20> Terminal + vim + window manager that supports multiple workspaces.

<comment><USER21> This. I use non-composited Marco as my wm and several terminals and gvim instances.

Switching workspaces and windows is super fast, and have vim configured with shortcuts to switch between buffers.

</comment></comment><comment><USER22> I'm using macOS at work and Linux at home. (quite disappointed about macOS ecosystem and performance..)

I don't install any service on my machine and just run everything using Docker. (You can actually even run games using Docker (plz don't try it on macOS. Linux? Sure!)

I use VIM keybindings in all text-editors and IDEs that I'm using.

For desktop/window management, I use Xmonad (a tiling window manager). Which means I can organize all the open window(s), move them around, resize them, manage multiple workspace, and screens, all using keyboard.

For terminal, I'm using fish-shell which is very powerful and highly customizable and friendly shell with a lot of aliases and functions to keep me productive. and also use Tmux only when needed.

I use Vimium extension in Firefox (it is also available for Chrome) which allow me to use VIM keybindings in browser including navigation, selecting text, clicking on links, and some extra macros to do even more and all of that with VIM keybindings that I use everywhere.

And finally, I have my dotfiles on Github which means I can setup my work environment on any machine in 5minutes.

I use VScode, Intellija, and VIM (SublimeText way less than before because of VSCode) And it depends on what project I have to work with.

Mostly because it is easier for instance to enable VIM keybindings in VSCode when I'm writing JS/Typescript comparing to setting up VIM and achieving same level of productivity. So I choose to stick to VIM keybindings and not VIM itself most of the time.

</comment><comment><USER23> Visual Lisp: Elegant and simple language, great graphical debugger with stepper (as in Visual Basic), great compiler, safe.

No other Lisp or other IDE's come close, but I never worked on a lisp machine, which should have about the same features. I never warmed up to Smalltalk enough to use it productively.

Visual Basic had a macro recorder feature (my lisp didn't have this, only emacs) and a similarily great IDE, but their language ecosystem is just horrible. You can easily write a fast and safe multithreaded server, but using their libraries just sucks. .NET got that better, but still not comparable.

PHP Komodo was great, but still. It was PHP. Horrible libraries.

Emacs+magit+c-mode+flycheck... or Visual C++ for my usual work is fine, but also very limited compared to better integrated systems. Haven't setup LSP yet though. This should improve things by a wide margin.

I also had a nice MultiEdit Pro integration with all my tools and docs, which was better than my current Emacs setup. But that was decades ago, on DOS.

Graphical development env's like Matlab Controldesk Simulink was nice, but not really productive. You constantly click in and out of nested blocks, connect dots and follow long lines, which is similar to counting parens manually with lisp. It sucks.

</comment><comment><USER24> Unix Systems. Linux, BSDs, Sun/Solaris

</comment><comment><USER25> -2011 eclipse (Java): seriosly good auto completion without the warts of vb. Code navigation and keyboard support were also top notch.

-2011 - 2017 netbeans (Java and PHP): more stable and feature rich than eclipse. Still excellent code navigation and refactoring like eclipse.

-2017 - VS Code (Angular and. Typescript, occasionally Java): fast, lightweight and still does most of the things I need. Improving every month. Extendable to edit any mainstream language it seems.

Things I have left behind after spending serious time with it:

\- Sublime (was a paying customer but VS Code us now so much better I won't pay for another release)

\- IntelliJ (has had both personal and company license but after a few months I fell back to eclipse/Netbeans)

\- Visual Studio. (I like C#, find it better than Java but the IDE just doesn't cut it for someone who has been spoiled with Java tooling.)

</comment><comment><USER26> Spring boot/maven/intelli j baby!! Everything is set up just to work. No funny business, nothing complicated, just an endlessly extensible easy environment. Intelli j has plugins for everything. The darkula theme is easy on the eyes too.

</comment><comment><USER27> Visual Basic Classic. It had an intuitive GUI builder, and database access built-in. This combined with a very good IDE and included documentation made for a very fast and effective development environment.

</comment><comment><USER28> For work, I have a Mac with chunkwm as the tiling manager to give it nearly an i3 feel. It's surprising how far tiling has come on that platform.

Linux I'm using XMonad, although I'll most likely switch to i3 next time I tweak my dev setup.

I use neovim for most of my work, although I need to switch to atom with nuclide on occasion to debug code. I have bindings like the recommendation from the tmux navigator that enables me to move between panes with Ctrl+hjkl. Variety of other plugins for hack, python, JavaScript, Java, etc.

</comment><comment><USER29> Perl development with Visual SlickEdit on linux, by 2006-2007.

i attribute to the fact that the language is extremely expressive, full of ready-to-use CPAN modules and VSE was/is compiled natively to the Operating System, from a nicely written codebase. So the IDE was actually helping me, instead of keeping me frustrated waiting _many seconds_ for each context menu ( cof, eclipse, cof ). But it lacked ( by then ) on plugins for many other tasks on many other languages.

</comment><comment><USER30> For me it used to be Visual Studio + ReSharper, but last month I switched to Rider and it's been amazing. It's like VS + ReSharper without the performance issues.

<comment><USER31> I think I'm about the only person left that doesn't like IntelliJ software. I can't even stand resharper. And their Java tooling, which everyone else loves more than their own children, sucks more than anything else of theirs.

I just don't get it.

</comment></comment><comment><USER18> IntelliJ I swear by (and occasionally at) it.

Having decent quality tooling across python, phi, JavaScript, typescript, SQL and Java as well as all the database featured for MySQL and Postgres is a huge win for me.

There are probably better tools for each domain but not as heavily integrated or consistent.

It's a resource hog but I don't care, it's so good I'd spec an extra 8Gb of RAM if it needed it (it's not that bad tbh in a world with electron at least).

</comment><comment><USER32> I really like vscode with it's built-in terminal right now. It's a good balance for me of a nice modern IDE (intellisense, lint, fmt on save, etc.) and a classic Unix shell that I've been using for 20 years. Ctrl+click on grep -n results (or anything that looks like a relative path of the current open folder) opens the file/line in the editor.

</comment><comment><USER33> IntelliJ. It has some great keyboard shortcuts for refactoring code, allows searching by symbol names, and has a wide selection of plugins. Surprisingly it's quite a consistent experience when editing across different languages, such as Java/Objective-C, which leads to less mental overhead with the tools (at least in my experience)

</comment><comment><USER34> Visual Studio 6, when you could drag and drop your UI, double click elements to code what they do, and all of the generated code was human readable. I'm not sure we'll ever get a development environment designed to put together software that quickly again with all of our modern expectations for design, mobile friendliness, etc.

<comment><USER35> Well, you can still do that in Visual Studio 2017 with Windows Forms. Remember when when they tried to do the same with Web Forms? What a disaster. I suspect this may have been the reason they moved to declarative UI like WPF but I personally don't buy that approach. Then again, I work on conversational interfaces now where there literally is no UI at all except a textbox and a send button..

<comment><USER31> The drag & drop web stuff they had worked fine if you didn't need anything that it couldn't provide.

<comment><USER35> Yeah like 'basic web functionality'. Unless you're happy with a full page refresh every time you click literally anything, And please don't suggest the UpdatePanel as a solution..

</comment></comment></comment></comment><comment><USER36> VBA first and in second place jupyter.

Everything I've ever been employed to do has pretty much been throwing data around, there's no substitute for being able to iterate and view dataframes interactively.

I've used Visual Studio/pycharm for my coding coding but if I had to choose between no IDE and no data-repl I'd go no IDE every time.

</comment><comment><USER37> I'd have to say PhpStorm. It makes web dev really super easy. I used to hate IDEs but now I love it so much that I use it for writing one off scripts too. Also laragon with Laravel is just amazing.

Laragon makes it super easy to configure the environment (out of the box support for wamp, git, node, ngrok, you name it..)

</comment><comment><USER38> \- Vim + the right ser of plugins. IDEs are nice and I appreciate IntelliSense in VSCode, but too much automation can be a problem when you really need to understand how you're piecing together things,

</comment><comment><USER39> IntelliJ with IdeaVim and some key remapping. Deep language awareness and integration. With IdeaVim, world class text manipulation. I feed it large RAM, about 12 gigs.

</comment><comment><USER40> Turbo Pascal was great.

</comment><comment><USER41> tmux + NeoVim for Python development. Switched from regular Vim after discovered NeoVim has much better Python support and a smarter terminal.

<comment><USER42> Can you expand on this a bit? I've been writing Python in vim using some plugins-- mainly jedi-vim, YouCompleteMe, ctrlp, and SimpylFold. What does NeoVim do better?

</comment></comment><comment><USER43> It's hard to really measure productivity. For most things I'll use tmux + vim. For Java I'll use IntelliJ with the VIM plugin

</comment><comment><USER44> i3wm + sakura + Atom ... that later is a love hate situation, amazingly extensible and customisable, performance is stupidly slow, lots of memory leaks in plugins, but the plugins are too damn useful - One day someone will make a fast open source replacement, or I will invest in vim.

</comment><comment><USER45> notepad2 gives me the highest ratio betwen my code and the environment around. I tried all others, but i keep coming back here (since always).

As a platform, WSL is a huge productivity boost for me

Also nodejs replace now 10+ y of custom created php helpers (as api wrappers mostly)

</comment><comment><USER46> Various virtual image based Smalltalk systems. VisualWorks, Squeak, Pharo, etc.

</comment><comment><USER47> VB6

<comment><USER27> I agree. VB6, Delphi and similar development environments are unmatched at quickly creating desktop applications. Is there anything similar to create web apps?

</comment></comment><comment><USER48> TMux + vim + YCM at google where everything was set up properly

</comment><comment><USER49> Lispworks.

</comment><comment><USER50> tmux + emacs + emacsclient.

Keyboard shortcuts and extensibility are the keys to success.

</comment><comment><USER51> PowerBuilder - by Sybase

</comment><comment><USER52> Xcode and Swift.

</comment><comment><USER53> Rstudio.

</comment><comment><USER54> vim + bash

</comment><comment><USER55> For those mentioning tools from the 80's and 90's: It cannot be ignored the tremendous impact on productivity that the creation of Git and Mercurial have had.</comment>


Solving the Monkey and coconuts problem - <AUTHOR> http://paddy3118.blogspot.com/2015/05/solving-monkey-and-coconuts-problem.html

<comment><USER2> I've been trying to solve this problem since 1975. I just glanced at the linked page, yes it is indeed the same problem, but I don't want to know the answer, I want to solve it myself.

I'm pretty sure I know how it's done now, but I haven't had the headspace to deal with it yet.

<comment><AUTHOR> Oh my blog isn't giving an analytical solution, if that is what you want to do, it is simulating the problem to find a solution.

(The video _does_ do an analytical solution though).

<comment><USER2> Here is a related problem. I think it's related anyway:

WITHOUT USING A CALCULATOR!

How many chocolate chips must one mix into the dough used to bake one hundred thousand chocolate chip cookies, such that ninety-eight percent of the cookies contain at least two chips?

I don't recall the precise numerical answer but I do know how it's done; I solved that problem in a final exam at Caltech in less than fifteen minutes.</comment></comment></comment>


How we ported LaTeX to the iPad - <AUTHOR> http://texpadapp.com/2012/09/19/latex-ported-to-ipad/

<comment><USER2> The most clueless TeX related piece I have read since their previous one. For example, kpathsea is a library that TeX engines call, so no forking is done to "grab search paths from the Kpathsea system". And the bright future for C implementation didn't happen when TeX WEB code was hand converted into much more readable C code 8 years ago (<http://metatex.org/>), not to mention the existence of an actively maintained, extended TeX engine written in C (<http://www.luatex.org/>), wait, this is GPL "encumbered" so it does not count. Did I mention that XeTeX does not "skip the DVI step" at all, but it actually _does_ fork an external binary to convert its 'extended' DVI into PDF.

<comment><USER3> I also loved the GPL ``encumbered'' bit. But they are trying to sell a (binary only) app for iOS, so I can see how it's inconvenient to them if other people don't give them all rights to their code.

TeX, while maybe not pretty, has stood the test of time remarkably well. I find it somewhat low of the article to bash the technology it uses (WEB, DVI) just because they are not the newest and hippest.

<comment><USER4> _I also loved the GPL ``encumbered'' bit. But they are trying to sell a (binary only) app for iOS, so I can see how it's inconvenient to them if other people don't give them all rights to their code._

As far as I know, Apple won't allow GPL software on iPad/iOS, they ban it on the App Store. So it isn't this company trying to get around the GPL, it's Apple.

<comment><USER5> Apple doesn't care. GPL backers like the FSF are who enforce GPL'd software not being in the App Store. They feel that the GPL is incompatible with Apple's distribution mechanisms, since it's impossible to "distribute" a modified version of the app to iOS devices without going through the App Store. But if a group decided to upload their GPL app, Apple isn't going to check, and won't kick the app out of the store on GPL grounds.

The VLC example mentioned below in fact _supports_ this: Apple was absolutely fine with it being in the store until Rémi Denis-Courmont filed a copyright violation with Apple _asking_ them to take down the version that had been posted there. Apple didn't take initiative to remove it themselves.

<comment><USER6> _> GPL backers like the FSF are who enforce GPL'd software not being in the App Store. They feel that the GPL is incompatible with Apple's distribution mechanisms, since it's impossible to "distribute" a modified version of the app to iOS devices without going through the App Store. But if a group decided to upload their GPL app, Apple isn't going to check, and won't kick the app out of the store on GPL grounds._

What if someone sold an iOS app that could be downloaded from the iTunes App Store that "contained" the source code? (Actually, it would detect whichever app started it and would download the source on demand.) Combine this with a free app and service that lets people use on-air provisioning to get modified versions of apps?

<comment><USER4> You don't need to include the source code to be in compliance with the GPL. You can easily have it downloadable from your website. You only need to provide it for about 3 years (IIRC). You can just have a note in your 'About' screen: "This is GPL software, go to <http://www.example.com> to get the source". That should suffice.

</comment></comment></comment></comment></comment></comment><comment><USER7> So where is the source? Also I am fuzzy on whether or not this is a license violation:

[TeX] This program is copyright (C) 1982 by D. E. Knuth; all rights are reserved. Copying of this file is authorized only if (1) you are D. E. Knuth, or if (2) you make absolutely no changes to your copy. (The WEB system provides for alterations via an auxiliary file; the master file should stay intact.) See Appendix H of the WEB manual for hints on how to install this program. And see Appendix A of the TRIP manual for details about how to validate it. TeX is a trademark of the American Mathematical Society.

I know they are altering the translation not the WEB source but that is still the Tex program.

<comment><USER2> AFAIK, the only requirement to comply with TeX license is to not name a the modified program TeX. This wouldn't be the first proprietary version of TeX.

</comment></comment><comment><USER8> Very interesting, but does anyone here feel like this would be useful to them? For example, in my limited experience with LaTeX I've also needed to generate graphs (via Graphviz or R). Even if there existed apps for these, I'm under the impression that the iPad has no user-accessible filesystem, nor allows iPad apps to talk to each other. Please correct me if this is mistaken.

<comment><USER9> I can offer one data point: I run a browser-based LaTeX editor (<http://www.writelatex.com>) and currently 2% of visits come from iPads. 6% come from a mobile device of any kind. I'm not sure how many of those actually try to do any serious writing, though.

</comment></comment><comment><USER10> You had me until "we have begun work on refactoring TeX's translated C sources into C++"

<comment><USER11> Why? I know it's popular to not like C++ now but it really is far more maintanable for a large project than C - best example is how GCC are moving to C++ for the compiler source.

</comment></comment><comment><USER12> I'd like to see a TeX -> MathML program come about. With web publishing, the standard A4 page approach isn't optimal anymore; further, MathML just seems so cool (even if it's still really in it's beta or alpha stages). I know TeX has so many things you can do with it, but this article brings up a great point: with people moving a large majority of their work to diminutive tablets, a 4GB TeXLive distribution probably won't work.

<comment><USER3> The simple answer to that seems to be to _not_ move to working on tablets. For LaTeX editing, I can't see any advantage that a tablet would offer over a notebook, and there are a lot of disadvantages.

<comment><USER12> An article that appeared at the same time on HN's front page points out some of the benefits:

[http://yieldthought.com/post/31857050698/ipad- linode-1-year-...](http://yieldthought.com/post/31857050698/ipad- linode-1-year-later)

<comment><USER3> He does not compare the tablet with a notebook for the use case of interest here, writing TeX documents (or something similar), and the disadvantes for notebooks that he gives would seem to prevent you from working with a tablet too (e.g., using a remote server for compilation will also help with the battery life of a netbook, and you may even be able to swap the battery).

The major problem in writing TeX on a tablet seems to be the keyboard: It takes away screen space (which is already hard to come by, since ideally you would have the source and the compiled output displayed side-by-side), is much less convenient to use than a physical keyboard, and (usually) makes it more difficult to get to special characters which are really important for TeX: \, {, }, [, ], and so on.

I can see how it could be usable for copy-editing, but for longer writing a notebook beats a tablet any day.

</comment></comment></comment></comment><comment><USER13> Previously: <http://vallettaventures.com/2012/08/27/tex-notebook/>

<comment><USER14> Developer of TeX Notebook here, now TeX Writer(first native LaTeX compiler on iPad).

That post is no longer true. I wrote the full story here:

<http://litchie.com/blog/?p=419>

</comment></comment><comment><USER15> It's great they did it, knowing how frustrated they were in the last blog post. That I don't really understand what's going on only makes the achievement larger in my eyes. Would be awesome if this led to a faster tex version that can be used by Desktop applications too, like Texmaker etc.

</comment><comment><USER16> I was almost going to buy that app, but it looks like their modified tex engine isn't open source.

I'm not quite sure why this irks me so much. I'm not likely to mess with tex source, but it'd be nice to share what was shared with you.

</comment><comment><USER17> I wanted to try the demo, but I'm not sure what to do with it. I loaded up my resume, but since typesetting is disabled, what exactly am I "demoing" other than an input field?

</comment><comment><USER18> I really hope that this Bataan death march of porting LaTeX to the iPad is the final word on whether or not literate programming is a worthwhile endeavor.

<comment><USER19> It doesn't have to do with literate programming per se.

It has to do with a very widespread and powerful legacy system (with extreme requirements for backwards-compatability and portability) that happened to be written decades ago in, basically, Pascal.

Furthermore, the people doing this port don't seem to have total command of the tex infrastructure. This has held them back.

For instance, they didn't know what kpathsea was until well after they started their port ("As best we could tell kpathsea is a library to find fonts and scripts in the sprawling TeX distribution...", from [http://texpadapp.com/2011/12/10/price-of-amessy-latex-not- fo...](http://texpadapp.com/2011/12/10/price-of-amessy-latex-not-for-ipad/)).

kpathsea is a basic library that anyone who has tweaked TeX configurations would know about. It has a certain syntax for subdirectory searching that you have to learn, as well as a utility command (kpsewhich) that you run quite a lot to debug "file-not-found" problems.</comment></comment>


What Happens When They Find a World War II Bomb Down the Street - <AUTHOR> https://www.atlasobscura.com/articles/ww2-bombs-berlin <comment><USER2> The city I live in (Dortmund) recently defused three WW2 bombs. The level or organization and coordination they managed was really impressive. Everyone living in the overlapping potential blast zones of the bombs, 1km in diameter each, had to be evacuated - more than 14,000 people in total.

The city also evacuated two hospitals, two homes for the elderly and a couple of hotels. Those on the ICUs of the hospitals that could not be moved stayed there and the ICUs were guarded by stacked freight containers.

The police made sure everyone left (in all buildings) and fined and extracted anyone resisting the evacuation.

I happen to live a couple of meters outside of the zone and was thus allowed to stay.

Seeing those abandoned streets which felt like they were just left in a hurry produced a really eerie mood, reminding me of The Walking Dead or similar scenarios.</comment>


Angry comments about the TSA's body scanners - <AUTHOR> http://www.motherjones.com/mojo/2013/05/14-angriest-comments-public-input-airport-body-scanners

<comment><AUTHOR> You can submit your own comments (angry or otherwise) at <http://www.regulations.gov/#!docketDetail;D=TSA-2013-0004></comment>


Young Global Leaders, who should be nominated? (World Economic Forum) - <AUTHOR> http://nomination.younggloballeaders.org/nominationform.aspx

<comment><AUTHOR> Past members from the tech world include Marissa Mayer, Sheryl Sandberg, Sergey Brin, Peter Thiel, Elon Musk, and Larry Page. [http://en.wikipedia.org/wiki/List_of_Young_Global_Leaders](http://en.wikipedia.org/wiki/List_of_Young_Global_Leaders)</comment>


The Fed now owns Walmart debt - <AUTHOR> https://www.cnn.com/2020/06/29/investing/premarket-stocks-trading/index.html <comment><USER2> The correct title should be "The Fed now owns Walmart debt", not "Walmart's debt". Walmart has more than $60BN long term debt outstanding. The Fed has bought exactly $8,668,097.01 of that. You can find the actual amounts the Fed has bought for different issuers at

[https://www.federalreserve.gov/monetarypolicy/smccf.htm](https://www.federalreserve.gov/monetarypolicy/smccf.htm)

<comment><USER3> Notwithstanding the relatively small amount purchased, the question remains still: is this something the federal reserve should be engaged in in the first place? And what are the long term consequences of even the _perception_ of such behavior?

<comment><USER4> If the alternative is the Fed lending that money to banks who would then cut a profit on it, lending it again to private companies while assuming very little risk, I'd rather have the Fed buy the bonds directly without a middleman.

Of course, that's not the only alternative. But as far as injecting liquidity into the economy, I'd rather see the government having agency into deciding where to inject it rather than letting for-profit companies who don't have the best interests of the economy at heart do it on its behalf. Same should have happened for the covid helicopter money: letting banks allocate public funds was a mistake. Public funds, public decisions.

<comment><USER5> How about direct cash payments to consumers instead of involving any private enterprise.

<comment><USER6> Direct payments to consumers is a 100% loss on those funds. Buying Walmart (or other corporate debt) means the Fed gets the money back when those firms pay down that debt. So very very different.

<comment><USER7> A loss for whom? It is all taxpayer money. Does it matter if the Fed makes a profit or if the money is refunded back to the public? It is the equivalent of a stock dividend.

<comment><USER8> A bit of a nit. Treasury money is taxpayer money. Fed money is ... not. It's seigniorage.

But the point of this subthread remains; corporate loans are expected to be paid back (less some loss reserve, but plus some credit spread), whilst direct payments to individuals are not.

[Edit: should speak of corporate bonds, not loans, for precision. There is a big difference though for this thread it's minor.]

<comment><USER7> Any profit from the Fed goes back to the Treasury and seigniorage is basically a tax on all USD holders through inflation so it is largely a distinction without a difference. It is our money. Giving it back to us isn't a "loss".

<comment><USER5> Exactly right. But I'd even take it a step further, if we use that money to create material things like infrastructure (rather than endless financial instruments) is that really a loss? The dollar could cease to hold any value and we'd still have bridges and roads afterwards.

<comment><USER7> I might not have said it in that comment, but I totally agree with you. It is one thing to talk about the efficiency of government spending, but it is almost always stupid for us to talk about government programs or projects in terms of profits and losses.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER9> "The Fed has bought a relatively small amount of Walmart's investment-grade bonds" would be a less alarmist way of saying that.

<comment><USER10> Your point makes sense when talking about this action by the Fed when looking at it as a standalone action, but a lot of people, including myself, might think the raised state of alarm is justified given that this is a situation where the Fed is essentially investing in/bailing out individual companies. One of the huge issues with this is that it puts the Fed in a position to be choosing winners and losers, which is very much against the idea of operating in a free market economy.

</comment></comment><comment><USER11> The largest grift in US history is taking place while we're failing on the entire point of these programs: to prevent unnecessary deaths and suffering.

We're going to end up with a huge amount of debt, a financial crisis, and the most deaths of any industrialized country at the end of this.

<comment><USER12> > We're going to end up with a huge amount of debt, a financial crisis, and > the most deaths of any industrialized country at the end of this.

What industrialized country has a higher population than US? Do you not get how proportions work or something?

EDIT: And if you think this phenomena of central banks buying debt is somehow unique to the USA ... I mean ... the media is actively trying to prevent people from having a balanced picture of the world ... so it is not a surprise ... but yes ... you should try inform yourself of the reality. Almost every industrialized nation and non industrialised nation is doing similar things.

<comment><USER5> Most doesn't just have to refer to absolute quantity, it can also refer to a relative measure. Either way, it's a shit load of dead people, not sure what your point is.

<comment><USER12> Industrialized countries with more deaths per capita than USA: Belgium (2.1 more) UK (1.6 times more) Spain (1.5 times more) Italy (1.43 times more) Sweden (1.3 times more) France (1.1 times more).

Yes it is a shitload of deaths. Lets talk about it being more than every other industrialised nation in proportion when that actually happens.

</comment></comment></comment></comment><comment><USER13> > This crisis is expected to be severe but short, lowering the risk of > propping up inefficient "zombie" firms that should be allowed to fail. That > may not be the case next time around.

I can't tell if the author is referring to the ongoing state of the economy here, but this is claimed so nonchalantly. I wonder if this reflects a majority view of those with an economics/finance background. From my point of view it seems we're nowhere near out of the woods yet with COVID-19 and its continuing impact on the economy. How long should a large number of businesses remain closed and a large number of individuals remain unemployed before we're back in a crisis again?

</comment><comment><USER14> Privatize the profit, socialize the debt.

<comment><USER15> I hate that too, especially when it's megacorps.

however I'd like to introduce two points of discussion:

[https://www.foxbusiness.com/economy/fed-bought-debt-from- wal...](https://www.foxbusiness.com/economy/fed-bought-debt-from-walmart- mcdonalds-berkshire-hathaway-and-microsoft-as-part-of-coronavirus-response)

first, Walmart is not the most outrageous of the list. coca cola is much worse. For all it's shortcomings, Walmart has a lot of domestic employees, around 1.5 millions. If the money from the fed directly went into welfare for these workers, it would have covered a couple months top, so it becomes a question of efficiency: if restructuring the debt buys a year or so before bankruptcy, it's still a net gain, under the assumption that being unemployed now would be much worse than being unemployed in 10 months after the current crisis is over.

second, Walmart effectively is the American version of social welfare. It's the kind of job almost anyone can get to get back on their feet. It's not too big too fail, nobody should be, but it's also not so bad a company to have around.

<comment><USER16> _if restructuring the debt buys a year or so before bankruptcy_

Walmart is currently worth, _checks notes_ , 336 Billion dollars. It is one of the most valuable companies in the world.

It is in no danger of going bankrupt.

<comment><USER17> yes, they should sell equity if necessary, not expect cheap debt from the government.

shareholders especially need to feel the downsides of risky decisions too, otherwise it distorts pricing mechanisms and imbalances the proper allocation of capital across the economy.

<comment><USER16> They haven't expected cheap debt from the government. Large corporations routinely cary debt to finance short term cashflow needs. Right now Walmart has about 60B worth. The FED, as part of a large program of corporate debt purchases, has bought a grand total of about 9 million dollars worth of this. That's .015%.

Whatever gave you the idea that Walmart had this expectation is wrong.

<comment><USER17> ah, sorry, i misread it as $9B, which would have been a significant portion of their outstanding debt.

<comment><USER16> Those 3 fewer zeros do make a bit of a difference. ;-)

</comment></comment></comment></comment></comment></comment></comment><comment><USER18> This is only interesting if you are an issuer, or a corporate debt trader.

This should only become interesting if any corporate debt the Fed owns defaults, and the Fed becomes a shareholder.

For now, what this article wrote, is not the interesting part of this phenomenom.

<comment><USER19> Asof EOD friday from about 1145 trackable CUSIPs in firna trace underlying HYG, there's 20 of them either in default or companies that have applied for bankruptcy protection. A lot more have be rolled out from HYG though.

<comment><USER18> nice, yeah thats something I find interesting too but the Fed's junk bond ETF purchasing has already been active. this article is about its investment grade primary and secondary market corporate credit facility, which was authorized with the CARES Act but took till June to get started.

<comment><USER19> Yeah, nothing in default yet from EOD friday in LQD. Of about 2272 CUSIPS in LQD then, 58 are rated BB, Baa1 392, Baa2 406, Baa3 251. I expect that it will happen soon that at least a few of these go into default.

<comment><USER18> Unless they directly issue to the fed and use the proceeds to pay off prior debt

This is very commonplace in corporate credit, aside from issuing directly to the federal reserve, which has offered verbatim to be the sole investor!

Free money!

I read the whole CARES Act and found this extra large bailout to be the biggest market distortion and thought it should have more air time than PPP or unemployment insurance boosts

<comment><USER19> > Unless they directly issue to the fed and use the proceeds to pay off prior > debt

True, it could happen, but it would take away from the profits banks and secondary market participants get from issuing it directly them selling the debt to treasury dept leveraging fed bucks :P

<comment><USER18> haha thats also happening, the fed is operating two new programs

Check it out

Primary Market Corporate Credit Facility

Secondary Market Corporate Credit Facility

[https://www.federalreserve.gov/monetarypolicy/pmccf.htm](https://www.federalreserve.gov/monetarypolicy/pmccf.htm)

[https://www.federalreserve.gov/monetarypolicy/smccf.htm](https://www.federalreserve.gov/monetarypolicy/smccf.htm)

<comment><USER19> Yup, i've been following the alphabet soup of insolvency for a while[0]

[0] [https://wolfstreet.com/wp-content/uploads/2020/07/US-Fed- Bal...](https://wolfstreet.com/wp-content/uploads/2020/07/US-Fed-Balance- sheet-2020-07-02-SPV-.png)

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER20> > The action by the Federal Reserve has been lauded by investors for easing > conditions in credit markets after they rapidly deteriorated in March, > avoiding a potentially catastrophic corporate cash crunch that could have > triggered a wave of bankruptcies.

I wonder why BKR is in the list, it does seem to have a strong balance sheet and no need for a credit lifeline like say PM that does have for example negative equity.

<comment> nappy-doo I assume you mean BRK. If that's the case, BRK borrows at a very cheap rate (in the case the bonds purchased, their coupon is 4%, which is kinda high for BRK).

BRK borrows for a couple of reasons, but chief among them are that sometimes it's better to write bonds (for tax reasons), than it is to use cash. At 4%, I can see that being the case.

<comment><USER20> right makes sense - noob here

</comment></comment></comment><comment><USER21> This is probably not the correct way to ask this, but does the 'investment' of the fed into a company verify its stability, or is the investment force the gov to ensure it's solvency?

</comment><comment><USER22> Why does Walmart have so much debt?

<comment><USER23> It's at war with Amazon, and it's able to produce an ROI which exceeds the cost of borrowing anyway.

</comment></comment><comment><USER24> Could this be a big move towards the harvest box?

</comment><comment><USER25> The more they interfere the worse it will be one day. Kicking the can of the inevitable meltdown. The first mistake was allowing banks to be "too big to fail". The second mistake was bailing them out.

Buying corporate debt is simply another piece of the mistake puzzle. This making the entire system more and more fragile.

At a certain point you either believe in capitalism and free markets or you admit that you like a special type of socialism.

</comment><comment><USER26> Do they get a seat on the board?

<comment><USER16> Equity holders vote on board seats, not debt holders.

<comment><USER26> It's not unheard of for creditors to get a seat on the board when a company is in trouble.

</comment></comment></comment><comment> ur-whale The first mistake was allowing the federal reserve to exist.

Here's Jefferson on the topic [1]:

"And I sincerely believe, with you, that banking establishments are more dangerous than standing armies; and that the principle of spending money to be paid by posterity, under the name of funding, is but swindling futurity on a large scale."

[1] [https://web.archive.org/web/20150711012438/http://memory.loc...](https://web.archive.org/web/20150711012438/http://memory.loc.gov/cgi- bin/query/r?ammem/mtj:@field\(DOCID+@lit\(tj110172\)))

</comment><comment><USER27> I feel we are no longer getting our money's worth from our taxes.

We are taxed at almost an effective rate of 40%. This includes federal, state, and sales taxes.

Then, the other 40% goes to rent, or mortgages.

And you have to make due with your remaining 20% to pay for your medical expenses, food, gasoline, car, entertainment, etc. And god forbid, if you have to pay to help your aging parents, which is an added burden on your remaining 20%.

What will it take to get the attention of these Washington elites, that we, the people, are getting fleeced for our money?

Meanwhile, all this low interest rates, are going to do one thing, which is to further increase asset prices. Namely, housing prices, and stock prices.

</comment><comment><USER28> The unstated assumption underlying all of this intervention is that interest rates must not be allowed to go up. There is _not_ a lack of investors willing to buy bonds - there is a lack of investors willing to buy bonds _at the ridiculously low interest rates the Fed has forced over the past two decades_. We should currently be experiencing a cyclic market correction where stock yields go down and bond rates go up. But the government is insisting that this shall not happen, as it would make politicians and fiscally irresponsible CEOs look bad. Savers and non-politically-connected small businesses lose out via monetary supply inflation, and are left with nowhere to go besides staying in the stock market bubble or hedging into gold in case this bubble finally pops.

<comment><USER16> Inflation? What inflation?

[https://fred.stlouisfed.org/series/FPCPITOTLZGUSA](https://fred.stlouisfed.org/series/FPCPITOTLZGUSA)

This is a yearly graph, but if you look at the month by month data you'll see that inflation has actually been _negative_ recently.

<comment><USER28> I explicitly said "monetary supply inflation" to avoid a reply with that disingenuous chart. The overt price inflation is occurring in assets, preventing the majority of people from achieving financial stability instead of assorted monthly rents to service debt. In general, we would expect consumer prices to trend downwards reflecting technological progress, increasing productivity, and offshoring. The Fed's policy is to erase that distributed progress, contributing to our growing divide between the rich and the poor.</comment></comment></comment>


Ask HN: How do you deal with people? - <AUTHOR> I'm talking about the average joe. How do you deal with them? I try to avoid contact to them as much as possible, but you're often forced to interact with them. What is your way of making the inter-personal stuff for both as pleasant as possible? <comment><USER2> I don't know where you come from and what your background is, but where I live, contact to the (average) people is not that bad. It turns out that my inner emotional state has the most impact on my ability on interacting with people. If I'm in a good mood, I can be charming, curious and cheerful. If I'm irritated... not so much. So I suggest to first keep yourself in a good mood. In my case, sleep is my most important mood factor. Second, you can try a bunch of tricks like smiling, genuinely listening, asking curious questions. Humor and irony can help to ease the conversation, sarcasm to round somebody. I think your basic idea to make it for both as pleasant as possible, is on the right track. It just needs a little training in both introspective and empathy. Also, instead to indulge yourself in avoidance behavior, try to open up and confront yourself with people. It won't get better without practice.

</comment><comment><USER3> Wow, are you better than them?

Try giving the book "how to win friends and influence people" a read. And maybe find some humility or try living with the less privileged.

<comment><AUTHOR> Know of that book, don't think highly about it because I don't want to befriend said people. I act humane all the time.

</comment></comment><comment><USER4> It depends on your reason for interacting with them; what are you trying to gain from the conversation? Are you being pressured by friends? Is it work related? Are you trying to solicit something from them? Do you want them to like you or hate you? The most efficient approach would be to optimize for the desired outcome of your encounter.

<comment><AUTHOR> I'm talking about career related stuff. You can't go up the hill without interacting with various persons.

<comment><USER4> Like another comment on this thread, I'd have to recommend Dale Carnegie's "How to Win Friends and Influence People." In a business setting, it can be used to manipulate people into liking you so that you can further your own cause. I don't think it's possible to go up the hill when people find you unfriendly, so ultimately you'll need to appear amiable and that's where the book comes in handy.</comment></comment></comment>


Bacteria use viruses to differentiate themselves from their competitors - <AUTHOR> https://www.upi.com/Science_News/2019/04/16/Bacteria-use-viruses-to-differentiate-themselves-from-their-competitors/6421555441033/ <comment><USER2> Could we engineer viruses to inject information into our brains? if I wanted to learn a new skill like React, what if all I needed to do was infect my self with the React virus</comment>


Stanford d.school Design Methods : The Bootcamp Bootleg [pdf] - <AUTHOR> http://dschool.stanford.edu/wp-content/uploads/2011/03/BootcampBootleg2010v2SLIM.pdf

<comment><USER2> I went to their bootcamp a few weeks ago, it was one of the most fun, inspiring and valuable Saturday I've spent in a while.

Cheers to them for organizing this (for free!), and I hope they do it again (and if they do and you're in the Bay Area, you should jump on the opportunity!).

<comment><USER3> $9500 for a 3 day class? (<http://www.gsb.stanford.edu/exed/dtbc/>)

Was it worth the money you paid?

<comment><USER4> They organised a free one for members of the public to attend. Definitely worth the price. :)

<comment><USER5> which price? Free or $9500?

<comment><USER6> As they say in Thailand, same same but different.

</comment></comment></comment></comment></comment><comment><AUTHOR> Brilliant design, thoughtful processes and an incredible toolset for designers. It is really indispensable. I think anyone who wants to build things for people should keep a printed copy with him.

In fact, it is encouraged to add to, modify and share it. People with a unique design process/tool should send it along to firstname.lastname@example.com

</comment><comment><USER7> \--- Stoke activities help teams loosen up and become mentally and physically active. Use stoke activities when energy is wavering, to wake up in the morning, to launch a meeting, or before a brainstorm.

Sounds like a nightmare. Sounds like BA bollocks too.

</comment><comment><USER8> I find this PDF very useful in my ideation and brainstorming process.</comment>


Mark Zuckerberg Can Still Fix This Mess - <AUTHOR> https://www.nytimes.com/2018/04/07/opinion/sunday/zuckerberg-facebook-privacy-congress.html <comment><USER2> What's so bizarre to me about this whole ongoing story is the complete lack of perspective and common sense.

You give facebook all your information willingly and for free - and then people are surprised when facebook sells the information? Facebook's business is not to protect your information.. its to sell your information to advertisers. You're paying to use their platform to connect with your "friends" by giving up your rights to whatever they can scrape off your phone.

This is not a surprise.

Mr. Zuckerberg will appear before the panel and promise data-security changes but at the end of the day facebook is still a business for advertisers wanting your shopping lists, contacts, interests, and personal profile to sell you stuff. The only thing that will change will be facebook's vetting process so only "friendly" corporations like walmart and BP have access to everything Cambridge Analytica had.

<comment><USER3> The nuance you're missing here is that advertisers can only ask Facebook to show to such and such from high level categories. Gay Male 18-35, San Francisco, into dogs, for example. That's it. Facebook will then bill that advertiser based on how many people see that ad.

The advertiser has no idea who you are or even if they got your attention to the ad they just paid for.

<comment><USER4> That's only true until someone clicks on the ad. Then the advertiser gets to put a cookie in that browser that says "the ad Facebook only shows to gay 18-35 SF dog owners got clicked in this browser."

</comment></comment></comment><comment><USER5> > _Facebook does contribute to efforts to improve our digital lives, including > one on youth education at the center I co-founded._

Why isn't this disclosed at the top of the article?

<comment><USER6> You can safely assume that any pro Facebook editorials are being written by those with vested interests. This is true for most companies in the media/advertising sphere. It's always been more incestuous than the general public is led to believe.</comment></comment>


Hong Kong protesters occupy airport amid fears of escalating violence - La-ang https://www.washingtonpost.com/world/hong-kong-protesters-occupy-airport-taking-message-to-visitors/2019/07/26/f4b2ea62-af6b-11e9-9411-a608f9d0c2d3_story.html <comment><AUTHOR> Don't resubmit posts that you know are going to get flagged.

<comment> La-ang A post must be flagged for a valid reason. If not, I will keep posting articles related to the same topic until one explains why it is flagged. My analysis is that it's a crackdown on free speech on a sensitive subject. But this is HN, I respect content and all I do is report stories as displayed by Bloomberg, the NY Times etc . I am curious to know who flagged and for what reason.

<comment><USER2> It's not tech or startup related. If the protesters hacked the airport it would be relevant.

<comment> La-ang Untrue. I see articles from Nature on evolution, cells and embryos upvoted. How is that startup related? Please explain

<comment><USER3> The difference is that those articles you've mentioned are not pushing a political agenda. You are pushing a political agenda. Not only is this not HN's use-case, but there is nothing here to discuss that hasn't already been discussed to death. What kind of intellectually stimulating discussion do you think will arise from a submission like this?

If you really want mass exposure for your political crusade, there's Reddit for that. You'll receive 1000x the eyeballs, all the accolades, upvotes and Reddit Gold that you desire along with a nice echo-chamber of predictably inane comments.

<comment> La-ang You're only argumenting your own ideas here. What mass exposure are you talking about and eyeballs? I posted an update on a subject of the hour. Also, the main article I posted was derived from Bloomberg, and Bloomberg has no political agenda in Chinese affairs. Secondly, I have no political agenda in posting about the state of Hong Kong's affairs. You should be mindful of your words and claims that have no substantial grounds. My reposting was not a political push but a trigger to see why the flagging is not stopping. Dang has explained it already and I completely get his point, and agree to stop posting on it. You on the other hand, should refrain from emotionally arguing your points.

Regards,

<comment><USER3> Apologies if my assumptions were wrong. I should have said "the articles you are submitting are pushing a political agenda". Being emotional has nothing to do with it. When I see five identical articles pushing the same political agenda, submitted by the same user at the same time (and more within the past week), one can only assume that the user has a political agenda.

You could have easily just messaged the moderators to ask why your submissions were flagged instead of spamming the board and risking your account getting banned. As far as Bloomberg not having an agenda, please recall the as-of-yet unretracted and unproven Supermicro story.

<comment> La-ang I do not speak for Bloomberg, solely the article. And maybe you're right, but I'm more of a brute force attack individual, although I love Nmap..

</comment></comment></comment></comment></comment></comment></comment></comment><comment><USER4> Please stop.

[https://news.ycombinator.com/item?id=20536240](https://news.ycombinator.com/item?id=20536240) is egregious and will cause an account to lose submission privileges here.

<comment> La-ang A post must be flagged for a valid reason. If not, I will keep posting articles related to the same topic until one explains why it is flagged. My analysis is that it's a crackdown on free speech on a sensitive subject. But this is HN, I respect content and all I do is report stories as displayed by Bloomberg, the NY Times etc . I am curious to know who flagged and for what reason.

<comment><USER4> Users flag articles. We don't always know why they flag them, but in this case I'd guess that it's a combination of the topic having been covered a great deal already and the articles not adding significant new information ([https://hn.algolia.com/?query=by:dang%20%22significant%20new...](https://hn.algolia.com/?query=by:dang%20%22significant%20new%20information%22&sort=byDate&dateRange=all&type=comment&storyText=false&prefix=false&page=0)). That means there isn't much intellectual curiosity in them, and intellectual curiosity is the purpose of this site.

Political articles are a borderline area for HN. There is inevitably some political overlap in what gets posted here. At the same time, if we don't do anything to contain them, political topics and battles and flamewars will take over the site completely. We moderate the site to prevent this from happening. One criterion we apply about political topics is whether the thread will merely be a repetition of what has been discussed before or whether there is a chance that the community can have a curiosity-inspired conversation about it. If a discussion turns into a flamewar or is extremely likely to, we are particularly likely to downweight it, because flamewars are the #1 thing that destroy this site and community.

There's more explanation at [https://news.ycombinator.com/item?id=20013092](https://news.ycombinator.com/item?id=20013092) and [https://hn.algolia.com/?query=by:dang%20overlap&sort=byDate&...](https://hn.algolia.com/?query=by:dang%20overlap&sort=byDate&dateRange=all&type=comment&storyText=false&prefix&page=0) if you or anyone want it.

<comment> La-ang Understood. I see your point and will not post on the topic again until something worth the intellectual curiosity arises.

Regards</comment></comment></comment></comment>


F-35 Jets Have Back-Door Software - <AUTHOR> http://newspapair.com/news/article/64

<comment><USER2> I don't believe that "officials had underestimated the time and effort required to develop and integrate the F-35's software, which is an order of magnitude more complicated than code found on board the Air Force's F-22 Raptor." supports the hypothesis that there is a backdoor. By that logic, the A380 is full of French-German backdoors.</comment>


Brexit: call for collaboration - <AUTHOR> https://www.matchilling.com/brexit-call-for-collaboration/ <comment><USER2> Thank you for sharing this! It's nice to see Prolog used for such tasks, which are a good fit for a logic programming language.

I have one small suggestion that I hope you find useful: Currently, the code is rather _imperative_ : It contains lots of side-effects that have immediate consequences which cannot be easily reasoned about. You can use Prolog this way. However, you forfeit its most interesting advantages if you use it as an imperative language instead of a declarative one.

A major attraction of Prolog is that it allows you to _declaratively_ describe what holds. Therefore, I recommend to aim for _declarative_ descriptions of situations, and limit side-effects to a few isolated areas of your program.

Here is an example: In brexit.pl, you currently have the following:

        notice_persons_at(Place) :-
                person_at(X, Place),
                write('Apparently '),
                write(X),
                writeln(' is here, that is your'),
                writeln('chance for a quick chat. Type "\e[1mtalk.\e[0m" to start'),
                writeln('start the conversation').

Consider formulating this declaratively, for example as follows:

        notice_persons_at(Place) -->
                { person_at(X, Place) },
                ['Apparently ',X,' is here, that is your ',
                 'chance for a quick chat. Type ', bold(talk), 'to start',
                 ' the conversation'].

I am using a Prolog definite clause grammar (DCG) to _describe_ the output that is expected to occur at this place. Since I am decoupling this description from the actual side-effect of _emitting_ the output, I have won a lot of convenience, flexibility and versatility. You see that this description is shorter and can be used not only for actually emitting the output, but also to easily _test_ whether the program (still) behaves as intended.

In addition, it allows you to later switch to a different way of outputting this text altogether. For example, at one point, you may want to convert this into a web-based application: In that case, the output should no longer be emitted on the system terminal, but sent as HTML snippets to the client.

Thus, I recommend to first focus on a clear _declarative_ description of everything that should occur in your program, formulated as a DCG or via a domain-specific language you may want to design for this specific task of implementing a text-based game. Later, you can flexibly _interpret_ this language in any way you want!

The same goes for the uses of assert/1 and rectract/1 that are currently sprinkled through your code: This imperative style prevents you from using the predicates in all directions. If you use a more declarative formulation, you will be able to use the code in much more flexible ways. A declarative way to express state changes is to think in terms of _relations_ between states. Think about it this way: There is an initial state, and a user's actions relate any given state to a new state. Thus, state changes can be modeled as relations between states, and you will be able to use such predicates _in reverse_ and also in the _most general_ way!</comment>


State of the Lua Ecosystem (2013) - <AUTHOR> https://speakerdeck.com/catwell/state-of-the-lua-ecosystem <comment><AUTHOR> To get conversations started..

Lapis[1] on Openresty[2] is one of the most simplest, documented, and performant full web framework stack out there, yet almost no one knows it.

Hello World Open[3] - 2.5k teams, only 17 ( < 0.7% ) teams used Lua. This is an open competition, which means people can use their favorite language instead of Java, and less than 1% uses Lua.

The lua community really need to start doing something about this.

1\. [http://leafo.net/lapis/](http://leafo.net/lapis/) 2\. [http://openresty.org/](http://openresty.org/) 3\. [https://helloworldopen.com/teams](https://helloworldopen.com/teams)

<comment><USER3> > The lua community really need to start doing something about this.

Why? A small community has advantages, too.

<comment> loup-vaillant Could you name three?

<comment><USER4> \- Can make backward-incompatible changes (see: Javascript, Python)

\- Less trolls & nasty people in general.

\- All the advantages of a niche language (I got my current job because no one else in my country knows Lua :P).

<comment><USER5> Advantage 1 is the main reason why today's Lua is not as complex as today's JavaScript, despite Lua being older.

<comment><USER6> It also significantly helped that Lua's main users could easily use an older implementation if something they depended on/didn't feel like fixing was removed. In contrast, breaking backwards compatibility for Javascript would be unthinkable.

OTOH, there is real fragmentation between 5.1 and 5.2, so not even Lua is immune to the downsides of breaking backwards compatibility.

</comment></comment></comment></comment></comment></comment><comment><USER7> To me, the fundamental problem is that Lua is designed to be an embedded extension language. But the vast majority of the publicly available extension modules are provided as shared libraries. If you have embedded Lua in your application, you are forced to use dynamic linking to use those modules. And if you use an OS that doesn't gracefully support dynamic linking (like uClinux on some platforms), you are screwed.

A second problem is that those modules tend to be kitchen sinks. For instance if you want UDP networking, and pick one of half-dozen modules that provide that, nearly all of them also provide other things you don't need. Why do people choose Lua? Small footprint, often. Why then provide bloated modules?

In other words, the module ecosystem only addresses one use case of Lua - <USER2> an extensible scripting language - and misses all of the others. And the end result is that it actually has Zero utility for most Lua users.

<comment><USER5> A lot of modules are pure Lua. They may depend on a few critical C libraries though. But with just LuaSocket, LuaFileSystem and maybe LPEG you can use most modules.

There are several ways to build those critical Lua modules statically, one being [https://github.com/stevedonovan/luabuild](https://github.com/stevedonovan/luabuild) Even without those, it is not very hard to modify the makefiles to build statically.

About the bloat: this is certainly true for some modules and not others. As I said in the talk, everybody uses Lua differently and nobody will use _all_ the modules and tools available, but there is still some amount of code that can be shared.

I mean: you could say exactly the same thing about C, and it still has a lot of libraries.

<comment><USER8> the Lua interpreter is so small and simple that if you really needed libraries and couldnt' dynamically link them in you could easily compile them into the lua interpreter and push the module onto the global table :/. It's really not hard.

</comment></comment></comment><comment><AUTHOR> Video:

[http://2013.capitoledulibre.org/conferences/lua- workshop/sta...](http://2013.capitoledulibre.org/conferences/lua- workshop/state-of-the-lua-ecosystem.html)

<comment><USER9> Thanks for sharing. I love Lua. First worked with it about 10 years ago. Still saddens me that it hasn't seen more widespread adoption.

</comment></comment><comment> vertex-four I think that most here are entirely missing the point of Lua. "The Lua ecosystem" isn't a thing that makes sense. Lua isn't a standalone language - it's an extension language, and is specifically popular because it doesn't have much in the way of a standard library or built-in assumptions about its environment.

If you can't make any assumptions about the environment, you can't have an ecosystem, because everybody's doing something slightly different. Some might be running every Lua script in a separate environment, some might have every Lua script bundled into the same environment, some might be running Lua on a separate thread so blocking is fine, some might integrate Lua into their application's event loop library. How are you supposed to build a library that serves even some reasonable amount of the userbase's use cases?

<comment><USER6> It goes beyond that, though. One of Lua's goals is to be implemented in 100% portable C, to the extent that it has no platform-specific #ifdef's (no #ifdef's at all, actually). This means that to use a lot of incredibly basic functionality supported on all relevant operating systems (like, as mentioned in another comment, _changing directories_ ), you need (for vanilla lua and luajit on platforms that don't support the ffi) a C library dependency, or a wrapper script (for luajit on the other platforms). This is pretty silly; any user of a platform without a filesystem would surely know that chdir would not be supported.

Beyond that kind of indefensible omission, there is much ecosystem fragmentation and duplicated effort that could be solved by standardizing tools like a package manager without _requiring_ you to install it on embedded targets.

<comment><USER5> This "indefensible omission" is solved by using LuaFileSystem. Not having it in the core language is not such a problem. Another example is sleep(), which is not portable. You can find a sleep function in libraries like LuaSocket and luaposix.

Fragmentation, however, _is_ a problem. The Lua authors have often refused to "bless" (term used by the community when discussing this) libraries. Roberto Ierusalimschy even said during a Q&A he'd rather "bless" a group of people to do it instead of him.

The problem is, as several people said in this thread, that it is very hard to write a library that fits every use case. Even something almost "standard" like LuaSocket is not used by everybody.

Some people in the community (including me) are trying to reduce the fragmentation. The authors of the two main ways to manage "packages" (LuaRocks and LuaDist) are working together, etc. But I think we will never manage to standardize on One True Library for everything.

<comment><USER10> The os.execute function does all this. os.execute("timeout "..seconds) for example. More complicated for file system operations, but it's possible.

This is significantly less than optimal though.

<comment><USER5> And not portable (or safe, for things like path manipulation). But sure, you can still use os in small scripts.

</comment></comment></comment></comment></comment><comment><USER11> Lack of userland packages isn't necessarily a bad thing. A well-documented, complete standard library (like in Go, for example) takes precedence over community IMHO.

Even as a Node.js dev, I don't understand the obsession with creating userland modules, and the value in modularity. Yes, a large library of modules correlate with community involvement, but it does not necessarily mean quality.

<comment><USER6> Lua's designers purposefully try to keep the language's standard library vanishingly small to reduce portability issues and the footprint for embedded targets. So for Lua, if no one makes user libraries, you don't have _any_ libraries.

<comment><USER12> The minimalistic core language is OK if the authors don't want to maintain more. What I miss is some incarnation of the language that would still be more convenient than Perl or Python (by being a single executable) but have enough "basic libraries" inside. The last time I investigated I failed to find something like that.

Once you have Lua with the tons of the packages in different files with the package managers and stuff you lose the benefit of having a small-size-of-the- executable language. I understand that the language author doesn't want to be a part of that.

<comment><USER13> Have you tried [http://luapower.com/](http://luapower.com/)

<comment><USER6> I don't like luapower's approach to package management. Basically it stuffs the contents of packages in the base of a single directory:

      luapower/lib.lua
      luapower/additional-files-for-lib/stuff.lua

Instead of completely encapsulating each package in its own directory:

      luapower/lib/lib.lua
      luapower/lib/stuff.lua

So instead of being able to just cd to luapower and git clone repo, you need to use a silly wrapper script that overlays the repos with each other. All of this presumably because the author wanted to type `require "lib.lua"' instead of `require "lib/lib.lua"'

<comment><USER12> I like it, I'd like even one step more, of making a ZIP of all of the packages. I never modified in place any Perl or Python module, and I don't expect I'd do it with Lua, so having a small portable file set of just a few self sufficient files I could copy to the another machine is my real wish.

<comment><USER6> But it's arguably easier to package the other way I described, just stick all of the relevant directories into a zip file, instead of needing to manually pick out the "lib.lua" files from the base directory. Literally the only benefit of this approach is saving a few characters on require statements.

For anyone interested in creating a new language, make your equivalent of `require "lib_directory"' do the equivalent of `require "lib_directory/init.lua"' or `require "libname_directory/libname.lua"' so we don't have this issue.

<comment><USER12> Do you actually do that manually? Why isn't there a script for that? It should be a part of the automated process. Much better doing it once as an automatic step than writing everywhere in your sources:

somethingbig/somethingbig

every time you use somethingbig. And that step should also zip the modules, I believe.

The behavior of require, as I'd like it:

require X first looks in the directory X, for module X. If there is no such, it opens modules.zip and reads module X from there. If internally in the ZIP there were a subdir for every module, I don't care, as long as I don't have to type that fact every time.

modules.zip would be constructed automatically. Whoever wants to tweak some specific module can unpack it in the separate directory.

<comment><USER6> Having reread the Lua manual, `require "lib"' can easily be made to execute `require "luapower/lib/lib.lua"' by adding "luapower/?/?.lua" to LUA_PATH. This is the way the standard /usr/local/lua libraries are require'd. Now I cannot think of a single explanation for why luapower works the way it does.

<comment><USER12> I'd prefer modifying require to not need a new entry to the ENV var for every used module. It is a huge waste of ENV.

<comment><USER6> [http://www.lua.org/pil/8.1.html](http://www.lua.org/pil/8.1.html)

> To determine its path, require first checks the global variable LUA_PATH. If > the value of LUA_PATH is a string, that string is the path. Otherwise, > require checks the environment variable LUA_PATH.

Even if you needed to modify an environment variable, I still think that would be preferable to creating yet another package manager and fracturing the Lua userbase further.

<comment><USER12> As a user, I want to "just use it" and the binary to "know" where the stuff of the module is without me having to hold its hand. Specifically, I don't want to know about LUA_PATH unless to use it to point to the single dir where I put my own modules.

<comment><USER6> Your concern doesn't make any sense. Any package manager _has_ to modify LUA_PATH in order for require to work with it in that way (unless it installs libs in /usr/local/lua, which requires admin privileges and isn't portable to Windows). luapower surely does this already, adding "luapower/?/?.lua" to the path instead of "luapower/?.lua" is a one-line difference. It's completely tangential to the criticism I gave.

</comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment></comment><comment><USER14> So, LuaRocks contains just 330 packages and doesn't look like the best package manager for Lua (and they also have a terrible website as for me).

If a community here wants to make things better - let's meet somehow and discuss it.

Then if, say, each of 5 Lua developers converts 1 package per day in their free time then in about three months the whole list of packages will be converted.

Anybody?

<comment><USER5> Speaker here, funny this got picked up by HN over a year after my talk.

Why makes you think LuaRocks is not the best package manager for Lua? As far as I can tell, it is.

Things have changed since last year, too! My suggestion of slide 40 ("programmatic releases for LuaRocks") has been implemented by merging with MoonRocks, which is now the official source for packages.

This has accelerated the rate of packaging: as of today there are over 500 packages available.

That being said, if you want to make things better there sure are _lot_ of things that could be done. If you want to contribute the best place to reach the community is probably the lua-l mailing list and the more specific luarocks-developers mailing list.

<comment><USER14> Oh, thanks for a prompt response! I personally got stuck with LuaRocks and cross-compilation for our MIPS board. Probably it was lack of documentation or lack of my knowledge. So instead I manually crafted most of the packages we needed either from scratch or by writing custom makefiles for existing ones (that was more than a year ago).

The whole idea of rockspec looks very nice to me and I totally support it.

But can I keep a global aka system rocktree and a per-project local trees? (Pardon my ignorance, I really don't know that). Per-project trees make deployment a lot easier.

Also, why can't "luarocks" or "moonrocks" be a single executable/script? Isn't it easier to get user just a download link instead of: "download it here, unpack, configure, make build, make install, now use it to install moonrocks"? (Also, I'm not saying that it's a very complex procedure, I know most people can do it easily, but that leaves an impression that the LuaRocks project is not very user-friendly).

<comment><USER5> Note: I am not the author of LuaRocks ([https://news.ycombinator.com/user?id=hisham_hm](https://news.ycombinator.com/user?id=hisham_hm) is), just a user.

Regarding distribution, what OS are you talking about? LuaRocks is available in Homebrew for OS X and as a package in most Linux distributions. Windows build looks a bit more painful but I don't have experience with that OS.

Regarding per project trees, there is no such thing as what exists in Python with virtualenv, but you can certainly do this:

        $ mkdir my_project
        $ cd my_project
        $ mkdir rocks
        $ luarocks-5.2 --tree="./rocks" install haricot

This will install the latest version of Haricot and all its dependencies (in this case LuaSocket) in the local tree regardless of whether you have them system-wide. Note that you can change this behavior ([http://luarocks.org/en/Dependencies](http://luarocks.org/en/Dependencies)) but the default dependency mode is "one".

</comment></comment></comment></comment><comment><USER15> Luarocks is a clunky package manager. But its biggest crime is that packages are neither signed nor are they transported over https.

[http://luarocks.org/en/Documentation](http://luarocks.org/en/Documentation)

That said, _some_ of moonrocks goes over http, [https://rocks.moonscript.org/](https://rocks.moonscript.org/)

The only excusable way for packages to go over http is if they were signed and the signing chain is secure.

<comment><USER5> There is basically only one person working on LuaRocks. He is also a PhD student and the maintainer of htop. Given this I think anything is "excusable".

Package signing is an important feature to have but it requires resources to set up. If you want to help: [http://luarocks.org/en/Mailing_list](http://luarocks.org/en/Mailing_list) :)

<comment><AUTHOR> Wow, didn't know he also authored htop.

After visiting his site[1], discovered gobolinux[2] too!

1\. [http://hisham.hm/](http://hisham.hm/)

2\. [http://www.gobolinux.org/](http://www.gobolinux.org/)

</comment></comment></comment><comment><USER14> How does LuaRocks implement the cross-compilation? Lua is widely used on embedded platforms, so I wonder how easy it will be to just take a random module from the LuaRocks and build/deploy it for some MIPS or ARM board?

<comment><USER5> Pure Lua modules do not need to be cross-compiled.

Simple C-based modules using the "builting" build back-end will probably work well with cross-compilation just by setting a few variables (CC, LD, CFLAGS...).

More complex modules will use the "make" or "cmake" back-ends and you will need to pass specific options to their build systems, which LuaRocks can do.

See [http://luarocks.org/en/Config_file_format](http://luarocks.org/en/Config_file_format) for more information.

<comment><USER14> Thanks! Config file looks like a powerful way to customize builds. But am I right saying that I will have two configs (for host and target) and I will have to pass --force-config option to toggle them?

<comment><USER5> No, you can use environment variables to choose at runtime (first paragraph of [http://luarocks.org/en/Config_file_format](http://luarocks.org/en/Config_file_format))</comment></comment></comment></comment>