HNHacker News
TopNewBestAskShowJobs

DemocracyFTW

161 karma · joined January 10, 2021

submissionscomments
DemocracyFTW··on Chemicals used in packaging may play role in 100k US deaths a year – study
If that was meant as a counter-argument, it's not. Because it's not about 'wax paper', its about '"wax" paper', as you correctly write.
DemocracyFTW··on By 2500 earth could be alien to humans
> Global cities should simply be built up into the stratosphere by decriminalizing construction, anything else is a policy failure.

Physics, anyone?

DemocracyFTW··on By 2500 earth could be alien to humans
> When did a building in Tokio crumble from an earthquake last time?

Not exactly Tokyo, but nearby Touhoku region suffered devastatingly with entire cities being levelled a mere ten years or so ago.

DemocracyFTW··on One painful meeting with Steve Jobs
Christ what an asshole.
DemocracyFTW··on Facebook is nearing a reputational point of no return
(off to buy domain names efbe.com, effbee.com, ...)
DemocracyFTW··on JavaScript Restrictor
Don't know why this comment got downvoted b/c it's a valid concern. 8 out of 10 websites do this wrong in my experience. It's an avoidable nuisance.
DemocracyFTW··on JavaScript Restrictor
works for me except the last paragraph with abilitools Text Zoom to increase font sizes https://chrome.google.com/webstore/detail/text-zoom-to-incre...
DemocracyFTW··on Python 3.11
This is a solved problem. The community provides a handy system overview[^1] that should be good enough for most cases.

[^1]: https://xkcd.com/1987/

DemocracyFTW··on Paradoxical Compression with VDF
> Paradoxical compression is mathematically impossible. This repository contains a description of how to nonetheless achieve it, as well as a demo implementation.

That's AWESOME show me!

> Of course I am slightly cheating here

mkay... :-(

DemocracyFTW··on Show HN: Dependently typed language for proofs that you can implement in one day
You say "Nixon is a President" but also "President Nixon".
DemocracyFTW··on The Subtext 10 Programming Language
> Subtext is both a PL and a DB

to me this is really the desirable core idea

DemocracyFTW··on Was Germany’s 19th century industrial expansion due to an absence of copyright?
> You don't choose. It's decided for you

I does sound great I must say. I've also found those Gammas are quite happy people on average. Some people call them 'cogs' but those are haters and deltas.

DemocracyFTW··on Currying in JavaScript
> The Y combinator is not generally useful for instance

I wish I had been told that before trying to understand and actually use it. I once wrote a JS benchmark based on Rosetta code to compute Fibonacci numbers. Not only is the Y combinator code convoluted and quite hard to understand, it's also between 1e5...2e5 times slower than a plain iterative implementation.

Somehow I find it ironic to post such a result here.

DemocracyFTW··on Currying in JavaScript
そう言う事ですね〜ッ。は〜い
DemocracyFTW··on Currying in JavaScript
To be sure, the example they give is the worst they could possibly find. I man, to keep out the current date is a laudable goal for a useful log function. But to make the current date a constant is OMG. This could even be useful in a limited form when you want to issue a bunch of messages that should all point to the same moment, but even then, saying `now = Date.now(); log now, ...; log now, ...` is so much simpler and clearer.

Also you totally do not need to be able to call `f( a, b ,c )` as `f( a )( b )( c )`, rather, you should avoid the latter for reasons of clarity, simplicity, and performance. You'd be just producing anonymous single-use throwaway functions for no good reason at all. You do not want to curry when you can just `g = ( a, c ) => f( a, 'xy', c );`. This is simpler, clearer, more flexible, and more to the point. Where this is not enough, just use a class. Everyone talks about inheritance, but where classes shine is that you can bind a multitude of functionality (implemented in methods) to a single set of configuration data (`this`) (and mutable state where called for).

DemocracyFTW··on Women are nearly half of new gun buyers, study finds
A Country where people are haters of people will die.

A country where people are looking for excuses to own people killers (aka 'pacifiers') will die.

I have not read any of the apologies in this thread, I refuse to do so, and I stand by my word, guns are bad.

You have a good day.

DemocracyFTW··on Outdated Answers: accepted answer is now unpinned on Stack Overflow
I think those are just fake, right. I mean 'fake Internet points'. Whatcha gonna do with those?
DemocracyFTW··on Fortran Web Framework
I disagree with literally all you said. Modules in the browser used not to exist until very recently. NodeJS/npm is a very decent ecosystem. It's not perfect, it's software. NodeJS explicitly strove to keep its standard library small unlike e.g. Python whose stdlib is also a huge legacy.
DemocracyFTW··on It's Time for Operating Systems to Rediscover Hardware
I frequently have this problem and I'm always aghast that no OS that I'm aware of has a good method to restrict resource usage to ensure the user can still perform essential tasks like terminate a problematic process. Instead, the machine just grinds to a halt and all you can do is sit and wait or else train your finger on the power switch.
DemocracyFTW··on Challenges students face when learning to work with relational databases and SQL
Postgres gives you named views, named schemas, and transactions that undo even table and view creations, so that's what I use to implement an iterative dev cycle.
DemocracyFTW··on Challenges students face when learning to work with relational databases and SQL
This is what I thought would be a good tip when I first learned about CTEs. Turns out I use them sparingly and much prefer to create views to represent steps of data refinement. The benefit of doing it this way is that I can inspect intermediate results. Often I use *.sql files for this so I can keep the SQL formulations for later; also, as long as stuff is still experimental / under development, I start out with `begin transaction;` because then I'm guaranteed I do not permanently change anything in the DB I'm working on and also I can repeat all steps without having to care about `create or replace view ...`.

Oh and lest I forget you can't just re-use a CTE in another query. But you can of course re-use a view. Also given what another user here remarked, Postgres might internally treat (and optimize) CTEs like views, so to me that makes views superior to CTEs in more or less all respects.

DemocracyFTW··on Database internals are becoming less important than developer experience
> You don't notice the data loss

Wait, is that a feature or a bug?

DemocracyFTW··on Does Oil Come from Dinosaurs?
That's because a shell isn't a crustacean, it's a mollusc.
DemocracyFTW··on In Praise of PostgreSQL
you can write your own table-valued, aggregate and window functions when you use better-sqlite3 (see https://github.com/JoshuaWise/better-sqlite3/blob/master/doc...; see Database#function(), Database#aggregate(), Database#table()) in JavaScript.
DemocracyFTW··on Mathematicians solve decades-old classification problem
This literally begs the question whether the prescriptive approach is to be preferred over the descriptive one.
DemocracyFTW··on Why you should learn SQL
I for one am in theory very interested in graph DBs, but in practice I yet have to see how do implement a solutions for my particular set of data (and my ideas about the data) in a graph DB without it becoming a huge ball of spaghetti.

If you're so enthusiastic about graph DBs that's good for you; as for me I enjoy having named rectangular sets of data (i.e. tables and views) consisting of smaller entities (columns / fields) that follow formally described rules (types, domains, check constraints, foreign keys and higher-order invariants). I do have a number of gripes about SQL but right now I feel quite happy about having achieved a reasonable way to integrate an RDBMS (SQLite) into my application environment (NodeJS) where I can fluently switch between formulating solutions in SQL or in JS with few restrictions.

Programming means you have to constantly keep a number of balls in the air, all the time. Having my data in handy tables is a big boon and not something I currently can expect a graph DB to do for me.

DemocracyFTW··on Problems with Python
to the author's credit, he does describe himself as a "Opinionated software engineer" /s
DemocracyFTW··on Inserting a billion rows in SQLite under a minute
I tried using tmpfs to create and exercise a file-based SQLite DB, and it performed significantly worse than a RAM-based DB (opened with an empty string or ':memory:').
DemocracyFTW··on Warp: Fast, Rust-based terminal (waiting list)
For one thing it's easy to build a bash line or even a NodeJS script that produces a lot of output that is dominated by the terminal's capability to render. When you benchmark it against the same thing but with a `foo > /tmp/foo.txt` redirection into a file, you'll notice that on bad terminals, it's several times or even orders of magnitudes faster than rendering to the screen. Many, many terminal emulators I have tried in the past did look sleek at first sight but then failed miserably a simple `cat manylines.txt` test.
DemocracyFTW··on The State of Python Packaging in 2021 – Bastian Venthur's Blog
This page, or series of pages—The State of Python Packaging in $YEAR—should have no reason to exist in the first place. But things being as they are, https://xkcd.com/1987/ is as relevant as ever. Compare what's going in the Python ecosystem with how e.g. `npm` works in NodeJS. You can hate NodeJS and npm all day long and point out a not-so-small number of problems and gotchas in the details, it's still lightyears ahead of anything Python has to offer in terms of reliability and simplicity. And it's not only Python's packaging system, it's the entire module import system that is a boat load of overcomplicated c**p. In NodeJS, when you want the contents of a module that lives at `/path/to/module.js`, you say `const x = require( '/path/to/module.js' )`. There's some amount of additional computation going on there in order to resolve relative and underspecified paths and to keep a cache of loaded modules, but other than that, the module contents are basically loaded, then `eval()`ed, that's it.

In Python, when you want to import a module from a path, you have to:

    def module_from_path( name, path ):
      import importlib
      import importlib.util
      spec                      = importlib.util.spec_from_file_location( name, path )
      module                    = importlib.util.module_from_spec( spec )
      sys.modules[ spec.name ]  = module
      spec.loader.exec_module( module )
      return importlib.import_module( name )

wat?
← PreviousPage 4 of 6Next →