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

You can see all the details at: https://github.com/mratsim/constantine , but to answer your "how" question briefly here, something Nim shares with most (all?) "systems programming languages" is "easy" integration with assembly languages -- whatever the backend for "most" compiled code is (whatever that "most" even is - weighted by any number of measures of static source size or dynamic instruction counts). Of course, hand-rolled assembly can cost you a lot in portability/effort to port to new platforms/etc.

The entire concept of the "performance of a PLang" in terms of the run-time of programs written "mostly in it" is rather seriously under-specified, TBH. This is (or should be) uncontentious in spite of the slew of articles with titles like the one for this thread.


Exactly, Constantine generates assembly output and links that into normal Nim objects (e.g. C). That can then used in Nim or in Rust, Go, etc.

From its "Why Nim" in the readme:

- Assembly support either inline or a simple {.compile: "myasm.S".} away

- No GC if no GC-ed types are used (automatic memory management is set at the type level and optimized for latency/soft-realtime by default and can be totally deactivated).

- Procedural macros working directly on AST to create generic curve configuration, derive constants write a size-independent inline assembly code generator


I think this was written in 1994 for this conference https://seclists.org/interesting-people/1994/Mar/64 , but I'm not 100% sure. It refers to "last summer's coup in the Soviet Union" which may also date it. Maybe it should have a (1994) in the title. Or, I don't know, maybe it's from even earlier? Some of the other pieces have nice dates at the bottom, like the Declaration of Independence for Cyberspace a bit over 30 years ago. EDIT: @karel-3d elsethread seems to think this one is (1998).


It would presumably be the August 1991 coup if it were the Soviet Union, as it was one of the factors leading to the USSR dissolving at the end of the year. The Autumn 1993 coup was in the Russian Federation (and the geriatric plotters in the Kremlin kinda won that one). So 1992?


That's what I thought, too, but the top of the article says "For the Conference on HyperNetworking, Oita, Japan" which was in '94. So, I thought maybe "last summer" was internally even off by a couple years? I'm really not sure, but someone around these parts probably knows. Worth mentioning that also in the early 90s people did refer to the Russian Federation as the Soviet Union sometimes as a shortening of "the former Soviet Union".

The estimate of "The Internet" connecting 800,000 computers is probably also pretty surgically date-identifying (at least to isolate 1992 to 1998 given how fast it was growing at the time, though estimation error might cause a little trouble!). For example, https://web.mit.edu/people/mkgray/net/internet-growth-summar... also suggests 1994 (although that estimate was 0.6 million) while 1992 would be more like 200,000 although as per my scare quotes (and that MIT link) "The Internet" was also a somewhat vague term at the time. And by 1998 it was surely over 10 million which makes the @karel-3d quite likely incorrect, although who knows - maybe that's when the EFF first put it up on their web site?

EDIT: I mostly think it matters since observations that might have seemed quite prescient in 1992 (like also-Mormon Orson Scott Card's even more prescient ideas in 1985 Ender's Game with Locke & Demosthenes political chat personas based on 1980s BBS/UUCP network activity) were very much things everyone was saying by 1998.


FWIW, Claude followed a similar trail and honed in on Spring 1992:

Three internal anchors line up tightly on 1992:

- EFF's age. Barlow writes that EFF, "after almost two years of operation," now thinks of itself as building "the united Mind of Humanity." EFF was founded July 10, 1990, so "almost two years" puts the writing at roughly spring/early summer 1992.

- "Last summer's coup in the Soviet Union." The August 1991 Moscow coup. Read naturally, "last summer" was written sometime between fall 1991 and the end of summer 1992.

- Internet size. Barlow says the Internet "connects some 800,000 (mostly UNIX) computers." Per RFC 1296, the host count was 727,000 in January 1992 and reached ~992,000 by July 1992. 800,000 sits squarely in spring 1992.

He also doesn't mention Mosaic, which launched in January 1993 — by 1993 it was almost a reflex in Barlow's writing — which is weak supporting evidence that this predates that release.

https://pastebin.com/LFdWS2SQ


I just put the title to Google and pattern-matched 1998. I am sorry, as I was probably wrong, it seems it's earlier.

edit: earliest web archive crawl is from 1996

https://web.archive.org/web/19961220120042/https://www.eff.o...

so you are probably right with 1994


That shortly after the fall of the Soviet Union, it wouldn't surprise me if people still used the old name even if it isn't technically correct.


Evidence for 1992:

> After a disorienting visit from the FBI in May of 1990, I wrote a rant called Crime and Puzzlement, which led to my establishing with Mitch Kapor (who had previously founded Lotus Development Company) an organization called the Electronic Frontier Foundation.

> Now, after almost two years of operation...


Several bibliographic references put the article to 1993 or 1992. The Soviet coup quote would confirm 1992. There was more than one HyperNetwork Conference in Oita, the first one was in 1990. Maybe it was annual or biannual.


I am unfamiliar with the history of the piece. Many things are possible. He may have "mostly wrote" it in 1992 and then "polished it" for a 1994 Oita conference, but was somewhat sloppy in internally updating everything date-dependent like the coup part. People also can be very flowery/metaphorical about using the word "coup". Not sure if they even have attendee/speaker lists online for those Oita conferences anymore, but that might also help if he wasn't at all of them. Bitrot / entropy can corrupt the digital world as well as the physical, just with more checksums if the referents still exist. ;-)


I found a source that confirms the 1992 or 1993 date: https://people.well.com/user/hlr/vcbook/vcbook7.html

“Two years later [after the first conference in 1990], I was invited back, along with John Barlow […].” “[…] which explains why I was invited to Oita in 1990, and why Barlow, Johansen, and Johnson-Lenz were invited to join me there in 1993.”

While 1992 vs. 1993 is still ambiguous (either 1993 is a typo, or the invitation was two-and-something years later), the text confirms that there was a second HyperNetwork conference in Oita in either 1992 or 1993, and that Barlow was invited to it.

EDIT: Another source: https://www.eff.org/pages/complete-acm-columns-collection

“Will Japan Jack In? For the October, 1992 Electronic Frontier column in Communications of the ACM by John Perry Barlow […] At a conference on globally networked computing in Oita Prefecture in February, I was astonished to hear a number of Japanese corporate officials […] proclaim enthusiastically the potential of the "Hypernetwork"[…].”

This would imply that there was a Hypernetwork-related conference in Oita in February 1992 that Barlow attended.


Ah. Good searching! So, maybe the 800,000 computers was "in DNS but un-pingable IP hosts" (dial-up was a big then then) or maybe included non-IP "networked" hosts or who knows.. Anyway, I agree that your finds make it more likely to be 1992/3 than 1994. Thanks!


In fact, to support your point, it is perhaps questionable from first principles if 3 dimensions not 4 is right. Leaving out tetra chromats and the (partially) color blind, normal human light perception is 1 kind of rod and 3 kinds of cones (i.e. 4 photo receptors, plus some light sensitive ganglia that don't seem to participate in vision, but diurnal regulation).

So, sure, this "4th dimension" (for normals) might be as simple as "candelas" - truly orthogonal, but one does hear an awful lot about "ambient" or "candela contrastive" (a term I just made up) kinds of effects. (EDIT: e.g. in color calibration of projectors in dark rooms vs. living rooms, for example, but I'm sure there are many.) I am just one person, but it feels like candela brightness matters for color perception. So, maybe luminous intensity is not actually exactly orthogonal. Maybe this is all covered in the 1931 CIE documents, though.


To support your point, it's also used in basically every shared library / DLL system. While usually used "for code", a "shared pure data library" has many applications. There are also 3rd party tools to make this convenient from many PLangs like HDF5, https://github.com/c-blake/nio with its FileArray for Nim, Apache Arrow, etc.

Unmentioned so far is that defaults for max live memory maps are usually much higher than defaults for max open files. So, if you are careful about closing files after mapping, you can usually get more "range" before having to move from OS/distro defaults. (E.g. for `program foo*`-style work where you want to keep the foo open for some reason, like binding them to many read-only NumPy array variables.)


As @SkiFire correctly observes[^1], off-by-1 problems are more fundamental than 0-based or 1-based indices, but the latter still vary enough that some kind of discrimination is needed.

For many years (decades?) now, I've been using "index" for 0-based and "number" for 1-based as in "column index" for a C/Python style [ix] vs. "column number" for a shell/awk/etc. style $1 $2. Not sure this is the best terminology, but it is nice to have something consistent. E.g., "offset" for 0-based indices means "off" and even the letter "o" in some case becomes "the zero of some range". So, "offset" might be better than "index" for 0-based.

[^1]: https://news.ycombinator.com/item?id=47100056


Ha! I also use `line_number = line_index + 1` convention!


:-)

If it helps anyone explain the SkiFire point any better, I like to analogize it to an I-bar cursor vs. a block cursor for text entry. An I-bar is unambiguously "between characters" while a block cursor is not. So, there are questions that arise for block cursors that basically never arise for I-bar cursors. When just looking at an integer like 2 or 3, there is no cursor at all. So, we must instead rely on names/conventions/assumptions with their attendant issues.

To be clear, I liked the SkiFire explanation, but having multiple ways to describe/think about a problem is usually helpful.


Ordinal is nice because it explicitly starts at 1.


Nit pick: only in few human languages the ordinal numbers start at 1.

In most modern languages, the ordinal numbers start at 2. In most old languages, and also in English, the ordinal numbers start at 3.

The reason for this is the fact that ordinal numbers have been created only recently, a few thousand years ago.

Before that time, there were special words only for certain positions of a sequence, i.e. for the first and for the last element and sometimes also for a few elements adjacent to those.

In English, "first", "second" and "last", are not ordinal numbers, but they are used for the same purpose as ordinal numbers, though more accurately is to say that the ordinal numbers are used for the same purpose with these words, as the ordinal numbers were added later.

The ancient Indo-European languages had a special word for the other element of a pair, i.e. the one that is not the first element of a pair. This word was used for what is now named "second". In late Latin, the original word that meant "the other of a pair" has been replaced with a word meaning "the following", which has been eventually also taken by English through French in the form of "second".


Meta nit pick: You are conflating linguist's jargon with mathematician's jargon.

In much the same way as physicists co-opted common words (e.g. "work" and "energy") to mean very specific things in technical contexts, both linguists and mathematicians gave "ordinal" a specific meaning in their respective domains. These meanings are similar but different, and your nit pick is mistakenly asserting that one of these has priority over the other.

"Ordinal" in linguistics is a word for a class of words. The words being classified may be old, but the use of "ordinal" to denote them is a comparatively modern coinage, roughly contemporary with the mathematicians usage. Both come from non-technical language describing putting things in an "orderly" row (c.f. cognates such as "public order", "court order", etc.) which did not carry the load you are trying to place on them.


There is “zeroth” though as an ordinal humeral, which was already used long before computers came around, as for example in “the zeroth power of a number” (according to Merriam-Webster). So it’s still not quite unambiguous. :)


Not true in general, ordinal numbers start at 0: https://en.wikipedia.org/wiki/Ordinal_number


I don't use D.. I find Nim helps with even lower ceremony. That said, it's hard for me to understand how "getting into gcc" is failure. The list of such PLangs is very short. People can be very parochial, though. They probably mean pretty shallow things (just one example, but something like "failed to convert me, personally", or "jobs I'd like to apply for", or etc.).

Maybe people should instead talk about how they use D or what they'd like to see added to D? In an attempt to be the change one wants to see, I'd say named arguments are a real win and there seem to be some stalled proposals for that in D last I checked.


D has named regular arguments and optional regular arguments. It has optional template arguments but not named template arguments.


This can very clearly be said about C++ as well, which may have started out as C With Classes but became very kitchen sinky. Most things that get used accrete a lot of features over time, though.

FWIW, I think "standing out" due to paradigm commitment is mostly downstream of "xyz-purity => fewer ways to do things => have to think/work more within the constraints given". This then begs various other important questions, of course.. E.g., do said constraints actually buy users things of value overcoming their costs, and if so for what user subpopulations? Most adoption is just hype-driven, though. Not claiming you said otherwise, but I also don't think the kind of standing out you're talking about correlates so well to marketing. E.g., browsers marketed Javascript (which few praised for its PLang properties in early versions).


Yeah. I've been doing this for almost 10 years now. It's not APE/cosmopolitan (which also "kinda works" with Nim but has many lowest common denominator platform support issues, e.g. posix_fallocate). However, it does let you have very cross-Linux portable binaries. Maybe beyond Linux.

Some might appreciate a concrete instance of this advice inline here. For `foo.nim`, you can just add a `foo.nim.cfg`:

    @if gcc:
      gcc.exe       = "musl-gcc"
      gcc.linkerexe = "musl-gcc"
      passL         = "-static -s" @end
There is also a "NimScript" syntax you could use a `foo.nims`:

    if defined gcc:  # nim.cfg runs faster than NimScript
      switch "gcc.exe"      , "musl-gcc"
      switch "gcc.linkerexe", "musl-gcc"
      switch "passL"        , "-static -s"


DNA researchers developed a parallel format for gzip they call "bgzip" ( https://learngenomics.dev/docs/genomic-file-formats/compress... ) that makes data seem less trapped behind a decompression perf wall. Zstd is still a bit faster (but < ~2X) and also gets better compression ratios (https://forum.nim-lang.org/t/5103#32269)


Besides `ar` as a sibiling observed, you might also be thinking of pixz - https://github.com/vasi/pixz , but really any archive format (cpio, etc.) can, in principle, just put a stake in the ground to have its last file be any kind of binary / whatever index file directory like Zip. Or it could hog a special name like .__META_INF__ instead.


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

Search: