Hacker Newsnew | past | comments | ask | show | jobs | submit | jll29's commentslogin

I think it has become EASIER: for instance, since C++23 Rust-like move semantics can be used, which provides the compiler with extra information that can be leveraged for the generation of better code.

Or take constexpr - it permits to move computations to compile time that are complex and in older versions either had to be done at runtime, or an ugly workaround had to be used (e.g. assigning a mysterious literal pre-computed in another run or by hand).


> C++23 Rust-like move semantics can be used

What C++23 feature allows that?


I loved writing Pascal and Modula-2 at the time, and using both for a while sure made me a better programmer. Pascal was an excellent educational tool, but for a decade had enormous business impact, too.

Most criticized things regarding Pascal e.g. https://www.cs.virginia.edu/~evans/cs655/readings/bwk-on-pas... were already fixed by extension or coukd be fixed easily.

Its slight verbosity - somewhere between C and COBOL - arguably was a pro rather than a con.

Today, Ada and Julia seem to be the langages alive that resemble Pascal the most.


Ada is still a thing (just not on HN). If this is your thing, check out Modula-3 for a serious 'what might have been' fix.

The critics were always disingenuous , ignoring that Modula-2 came out already in 1978, designed for systems programming and fixing Pascal initial flaws.

Also most of those extensions ended up in ISO Extended Pascal revision, also usually ignored in such criticism.


Italians need to make more babies - or there's going to be a serious pizza baker shortage by 2030!

(It follows straight from the general population decrease.)


Yes: you can classify a test file by topic with gzip as follows:

  gzip -9 sports.txt   testfile.txt

  gzip -9 politics.txt testfile.txt

  gzip -9 business.txt testfile.txt
(ass. sports.txt politics.txt and business.txt are text docs pertaining from the sports, politics and business domains, respectively, and have equal size)

The test file belongs to the topic with the smallest size *.gz file.

Witten's group at Waikato uni were perhaps the first to work on this.

Also check out the Hutter prize if you are interested in this.


Back in the day - maybe two decades ago - I implemented language detection like this.

I seeded gzip compressors’ dictionaries with Wikipedia articles in different languages.

I would then try to use said dictionaries on any random text, and the one that was best able to compress it, was the correct language.

Absolutely totally not the best approach, but very fast and super simple to implement.


Or maybe make a list of the most used 1000 words in each language. And see which list has the most occurrences.

That requires you to decide what a "word" is, which is not trivial (if you think that ignoring punctuation gets you to a clean "letters surrounded by spaces" you will get lots of issues with various Asian languages)

Also some languages have a lot of prefixes and suffixes on their verbs or even nouns, which dilutes your list of 1000 words by just adding the same common words over and over again with different suffixes designating grammatical tense, grammatical gender, etc.

The gzip version sounds more general and more obviously correct


Instead of deciding on words, maybe you can break them up into smaller, subword parts – let's call them "quantums". And these quantums can be the units the quantumizer works on to operate on inputs and outputs. We can then use them to build Expansive Dictionary Models, or EDMs. I suppose we'd need a software library to mak working on this easier, think something speedy, fast, hot, like fire: we can call it PHPFlame...

I'm guessing this is an allusion to reinventing something that already exists, but do you mind explaining what that is to me, since I don't know?

It is describing essentially how tokenisation is done for LLMs (Large Language Model → Expansive Dictionary Model).

You mean Quantumnisation ;)

I suspect they're talking about LLM tokens.

Even German has issues with "letters surrounded by spaces". They love to smash words together to get one giant word.

https://www.youtube.com/watch?v=m8niIHChc1Y


Byte Pair Encoding [1] will be different for different languages. Application of the per-language BPEs to the input text will produce encodings with different lengths.

[1] https://en.wikipedia.org/wiki/Byte-pair_encoding

It naturally takes care of common prefixes and suffixes.

It is easy and fast to apply using radix tree or with finite automata. Even without radix tree, it is possible to have processing speed in the range of hundredths of thousands of bytes per second.


You can just use 2-grams of Unicode code points.

Very much agree. Character bigrams will solve this perfectly with tiny amounts of training data (like a couple KB).

See: Fast Static Symbol Table: https://github.com/duckdb/duckdb/pull/4366

FSST is based on a fixed size (255 items) dictionary of high frequency variable length strings/substrings (learned from the corpus) encoded as one byte.


Just collect common bi- and trigrams and a naive bayesian classifier.

Sounds like the best approach. :)

There are some deep connections between machine learning, compression, and cryptography with information theory as a common thread.

Also, I’ve never seen “ass.” Used to shorten “aside” — I typically use N.B. but perhaps only for important ones.


For anyone wanting an introductory text for information theory & that explores some of these connections & applications, it's worth checking out the late David MacKay's 2003 textbook Information Theory, Inference & Learning Algorithms https://www.inference.org.uk/itila/

The "ass." more likely stands for "assuming".

Yeah, I read it as "assuming" too.

3Blue1Brown has a good video about this: https://www.youtube.com/watch?v=l6DKRf-fAAM

Nitpick: Doing it exactly like this is flawed because you let the compressibility of your references taint the result; what you would prefer is the compressed size of testfile given sports.txt/... as a dictionary without accounting for the compressed size of that, no?

Really interesting approach though.


You're right, you should subtract off the compressed sizes of the respective reference files before comparing. (This suffices if we assume that later input data does not influence the compression of earlier input data, which is true except for certain unusual conditions like a repeated substring at the end of the reference data that also appears at the beginning of the test data.)

aka Normalized compression distance (NCD). Its close cousin: Normalized Google distance (NGD) is also super interesting!

https://en.wikipedia.org/wiki/Normalized_compression_distanc...


We used a similar technique for a class project (N decades ago) to test this:

https://en.wikipedia.org/wiki/Baconian_theory_of_Shakespeare...

By looking at mutual information from different authors on the same topic vs same author on different topics. As I recall, it convincingly disproved the hypothesis.


You might also want the topic files to be compressed against each other to get a baseline matrix and then multiply any results by the inverse, assuming equal priors on the topics.

I seem to remember it being shown for character recognition via JBIG. Maybe in Managing Gigabytes?

There would be some overlap with business sports analogies - eg team huddle.

we were doing this in Qualcomm 20 years ago

Is pigz faster?

Two of my former colleagues (both Reuters journalists) were murdered by U.S. soldiers: https://www.youtube.com/watch?reload=9&v=zYTxuW2vmzk

Then all the civilians that took care of their bodies were also killed, including children.

Then the Department of Defense then denied existing video coverage of the event (personal comm., Tom Glocer, J.D., former CEO and attorney, Reuters).

-> So homicide, mult. war crimes and lying.

I'll be eternally grateful to Manning and Assange for letting the truth come to light, and to all whistleblowers driven by their conscience and idealism.

But the most disturbing thing about this all is the dirty laughter of that helicopter crew. Seeing that video makes one ashamed to belong to the human species.


That was not a part of the cables released by Manning.

The "Collateral Murder" video of the unlawful killing of journalists was part of the archive that Wikileaks published that's been attributed to Chelsea Manning. All available evidence supports this was part of the material. Chelsea's leak was the contents of the shared drive, not just diplomatic cables.

The release of the diplomatic cables themselves gravely harmed U.S. interests and is alleged to have led to the deaths of CIA collaborators.


Was this ArXiv pre-print published anywhere (i.e., with proper peer review)?

no, it would not make it through peer review in its current form

I disagree with downvoting the parent; I did not interpret their post as advocating neglect or euthanasia or anything else of a nasty kind.

There is a point to be made that fewer and fewer people are ready to die - eventually.

However, it arguably is the natural course of things, and the only thing more certain than taxes. I'm not saying this because I cannot imagine a world in which death was switched off. Instead, I would argue that it is also a GOOD thing that death exists, as it makes one's lifetime more precious knowing your days are counted (it's also good not to know how many of them you have left). There is space made for new generations, and their different (hopefully eventually better) ideas.


Seems like you're thinking of "extra care" as some sort of life extension, while the GP thinks it means things like help showering and cooking, and the GGP is ambiguous and could believe anything.

The inevitability of death is a philosophical question. I read the GP and maybe the GGP as talking about the more practical question of whether it's moral to let broke old people die from bedsores and starvation or whether we pay for nurses.


The Japanese fail to produce enough children.

The country will either have to change or it will disappear soon.

Most European countries have the same issue, but it is less visible due to immigration, which Japan does not have.


The population of Japan is projected to be 64 million in 2100. In 1930, the population of Japan was 64 million. Did it not exist back then?

To be fair you'd need to consider how the percentage of young people looked in 1930 for that to be a meaningful comparison to today

You should only be comparing the working age population or maybe even the ratio between that and retirees since absolute population is a deceitful metric.

Japan can easily operate with 60-80 million people in a country slightly smaller than California. And expand again in the future why not?

This. You CAN recover from an economic decline, you can recover from a demographic decline like what Japan is experiencing, but you CAN'T recover from demographic replacement, which is what the EU is experiencing.

I just think there’s something qualitatively different between 64 million twenty-somethings and 64 million eighty-somethings.

>The Japanese fail to produce enough children.

Yes, and? What will those "missing" children do in a stagnant economy except contribute to watering down already low wages and increasing pressure on housing?

>The country will either have to change or it will disappear soon.

Massive doomerist over-exaggeration. Japan will be fine. Not an imperialist world super-power, but the Japanese people will be OK, better than 80% of the world's population.

>Most European countries have the same issue, but it is less visible due to immigration, which Japan does not have.

Yes and long term European countries will be worse off than Japan, due to the ethnic and cultural replacement and racial clashes and crime caused by their immigration policies. Japanese travel to Europe on vacation a lot, saw what imigration looks like, and don't want that. They'd rather stay a stagnant/shrinking but homogenous, safe and peaceful nation, rather than have a growing population of foreigners that replaces them and causes crime.

What Americans/westerners fail to understand is that a nation's success, stability and long term future is more than its GDP and population number that must grow to the moon at all cost just to enrich the top 10% of asset holders while everyone else fights for the scraps, but it's the people and culture that made it great to begin with, not a faceless, borderless economic zone of corporations and workers. Nations that decline economically/demographically can always rebounce back(see post-WW2), but economic zones not so much, as when they fail, the corporations and migrants that came purely for economic reason, just move to the next economic zone, like locusts, since they have no ancestral ethnic and cultural roots tying them to that land incentivizing them to stick around through thick and thin and rebuild it.


I don't know of anything that is working yet, but I know some people working on it (intentionally vague).

Roman law, on which the legal systems of Germany, most of Europe, Turkey etc. are based relies more heavily on statutes than Anglo-American case law, but cases do play a role there, too. That's why a practically useful system also needs to have access to court decisions, commentary etc. - and while the statues are in the public domain, a lot of the other knowledge is owned by specialist publishers (such as: C.H. Beck, Nomos, Mohr Siebeck, De Gruyter, Otto Schmidt, C.F. Müller, Manz, Verlag Österreich, Schulthess, Stämpfli, Dalloz, LexisNexis, Lefebvre Dalloz, Giuffrè Francis Lefebvre, CEDAM, Giappichelli, Il Mulino, Aranzadi, Tirant lo Blanch, Marcial Pons, Dykinson, Tecnos, Lefebvre, Almedina, Gestlegal, AAFDL, Kluwer, Boom juridisch, Wolters Kluwer, Larcier-Intersentia, Anthemis, Sakkoulas, Nomiki Bibliothiki, Universul Juridic, Hamangiu).

Internationally, legal systems appear to undergo a sort of convergence, which means statutes increasingly matter in the U.S. and cases increasingly matter in European law (according to a law partner friend).


You could say the Salvatorian Clause in contracts is like exception handling: a "catch (all)": even if some clauses in this contract are illegal, the remaining contract stays in place.

Logically, this actually doesn't make sense strictly speaking because the sentence creates a paradox: doesn't it make clear whether it includes itself or not, and each reading ends up in trouble. There is a "tradition" in law around the world to accept the only benign reading of such clauses, which I always found funny given that in all other ways lawyers adopt the most adversarial mindset imaginable.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: