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

praising 'loop' in the same post as describing lisp as 'elegant' shakes head


Some people seem to like it, and be very effective using it.

The problem is it's a walled garden, with its own quirky syntax; nothing that happens inside of loop is applicable outside, and the other way around.


My opinion of LOOP started to change when I read (the much maligned) "Land of Lisp" and went over that "periodic" diagram in TFA. Seeing the elements of LOOP broken down like that went a long way to get me to overcome my original aversion to it.


Who is maligning Land of Lisp?



Huh, didn't realize that beach didn't like it so strongly. Still, hardly "much maligned"... My impression was that most people enjoyed it, even though it definitely has some weaknesses and could (especially now 15 years later) use a second edition, if for no other reason than to move off CLISP to SBCL. This seems supported by its high reviews on Amazon and GoodReads. (Of course overall I liked it too, and we got the best music video about lisp out of it.) FWIW my own criticisms were largely style-based: too much of it felt like Scheme code rather than Lisp code, even outside of emphasizing/educating about the more primitive features, with lots of things like inner functions, recursion where looping would have IMO been clearer, and so much use of raw car/cdr/caadr/caddr/whatdr instead of more clearly structured structs or classes or just helper functions called intuitive things like get-foo. (The book Calendrical Calculations: The Ultimate Edition uses lists for all its data structures but helpfully creates many functions to both construct and access their parts. e.g. generic dates are a (year month day) list, but the definition and exclusive use of standard-year, standard-month, and standard-day for getting at them would let one refactor it into a class. There are also functions like gregorian-date, julian-date, and egyptian-date that have exactly the same implementation (making a list of the 3 passed params) but serve as 'typed' list constructors, and indeed could be refactored into something that carried along type information without changing other code.)


I like LoL alright too. I was only maybe a year or so into CL when I read it, so I didn't really notice a lot of what it's criticized for. On the one hand, I'm a little sad that I see it bagged on so much (that link from beach's site, IRC, reddit) since I felt I got decent enough value out of it, but OTOH it's good and healthy to point out problems.

The abstractions used in Calendrical Calculations sound good - and echo what I've seen elsewhere - so, based on your comment I'm now more likely to read it, so thank you for that.



Thank you, I'll check it out!


I feel bad for people who haven't discovered ITERATE yet.


I'll never understand the love for iterate. Look at these comparisons: https://github.com/sabracrolleton/sabracrolleton.github.io/b... For almost all of them, it's the same guy, just more parens. Nothing to love/hate for one or the other, it's just preference, though one is built-in.


The big plus for me is that the ad-hoc if/when/do are removed in favour of the standard operators, without the horrible then/else/end/and dance.

Then you got all the life-improving goodies (in-{sequence,string,file,stream}, index-of-*, previous, etc...) that really add up to something.


Looks more lispy because the parens. Plus it's extendable unlike LOOP, so you can make it work with your own data types. And a few other nice features like being able to collect into a vector or other sequence, not just lists.


ITERATE still breaks when you use `count` inside it, the built-in CL function. If they ever address that problem I'll get back to use it but having a time bomb in my programs isn't something I like.

Trivial example of breakage:

  (iter (for i from 1 to 10)
    (print (count i some-sequence)))


Breaks how? I'm on my phone, not a computer right now and can't test, but that should call the CL function - ITERATE uses `counting` for that particular operation to avoid conflicts; see https://iterate.common-lisp.dev/doc/Gathering-Clauses.html

Or is the documentation wrong?


Apparently this is a quicklisp problem, they haven't updated the release since 2021 when it was still broken.


I just grabbed the latest ITERATE source off of its gitlab repository, and, yeah, that bit is still giving an error:

      Iterate, in (COUNT I SOME-SEQUENCE): Missing value for SOME-SEQUENCE keyword
as well as

    WARNING:
       COUNT appears to be used as an ITERATE clause keyword, in this sexpression: (COUNT I SOME-SEQUENCE).
       This use is now deprecated and will cease to be supported in a future version. Please use the alternative keyword COUNTING instead. If you intended COUNT to be interpreted as a function call, instead of an ITERATE clause, you must find an alternative way of calling it, at present, perhaps by using FUNCALL or APPLY.
Have to use

    (iter (for i from 1 to 10)
        (print (funcall #'count i some-sequence)))

Guess the documentation /is/ wrong (for now, until the code finishes catching up)


Well, some-sequence was obviously an example, you'd have to fill it in with an actual sequence. Put in '(1 2 3) instead or assign something to it.

But yeah, that's still not something I intend to use if they make you work around what should be plain Common Lisp.


I had a some-sequence variable defined.

(Using a literal list or vector gives a different error)


It's been marked as deprecated for some time, but still needs manual removal as of now: https://gitlab.common-lisp.net/iterate/iterate/-/blob/master... (removing https://gitlab.common-lisp.net/iterate/iterate/-/blob/master... should work, I think).

Still better than the loop abomination, IMO.


I made a loop macro using the C preprocessor, for the Awk language.

I had to rub my own eyes to believe that such a thing is possible.

It comes with over twenty useful clauses. Clauses are programmer-definable.

Clauses can combine in parallel or nested/cross-product iteration.

https://www.kylheku.com/cgit/cppawk/about/


I dunno, '700 AU' gelled for me instantly, '15 times the distance to pluto' doesn't even make sense given pluto's orbit isn't anywhere near circular.


It makes even less sense for Earth because Earth's orbit is near-circular, whereas Planet 9's hypothesized orbit is highly eccentric, more so than Pluto.

Most people don't know off-hand that Pluto is ~40-50AU from the sun, so 700AU is hard to conceptualize.


They're all horrible to conceptualize because people don't commonly deal with how far even something like the Earth to the Sun is, I don't think there is any winning answer here - at least an AU is consistently defined and maybe slightly more likely to be familiar, but it's still just about as crap to be honest.

Side note: Apart from AU already being defined as average distance and not current distance, the distance referenced is how far out the proposed object is now, not its general orbital parameters. At that orbital distance 23 years of motion isn't going to be much change in distance even if it's in a hyperbolic orbit.


My point was not about intuiting the distance, it's about what the solar system looks like qualitatively, as a cartoon with orbits drawn around the sun. Most people have no idea if 700AU is closer than Pluto, a little further than Pluto, or much further than Pluto. 15x the distance of Pluto is much more direct.


What's the benefit of communicating something is 15x the distance of Pluto if people are expected to have at least a ~15x error in how far away Pluto is supposed to be? At that point it's all nonsense, nothing is relevant anymore. Might as well say something useful for those who do have a clue about the solar system.

Hell, it's been nearly 2 decades since Pluto was itself planet 9. Just bringing the name up in a discussion about planets is going to cause more confusion.


15 time further than the furthest once-planet is fairly intuitive to say really freaking far; you don’t need to know how far pluto is, just that it’s the furthest.


> Might as well say something useful for those who do have a clue about the solar system.

The source we are discussing is space.com, a website which frequently mentions Star Wars and whose stated mission is to "transport our visitors across the solar system and beyond through accessible, comprehensive coverage of the latest news and discoveries." My comment was about communicating this research in a way that better fits "most readers" of space.com. If you think qualitative orrery models are beneath you and want to exclude those people, then you are not the target audience. Just go read the actual paper.


700 AU is 4 light days.

Or four days travel at the speed of light, to an outside observer. Or instantaneous for anyone travelling at the speed of light.


Thank you. When I want to know astronomical distances, I use the speed of light to get a sense. Moon? One second. Sun? Eight minutes.

Time units are more approachable than distances I will never cross.


When you put it this way it depresses me (). It just illustrates just how unimaginably big space is, considering something that might be considered part of our own star's solar system can be four freaking light days away. We'll never get out of our solar system will we?

() Not really, I'm using artistic hyperbole.


The most distant Voyager probe is about 167 AU out, or one light day, and it’s been travelling for 48 years.

If we are going to get anywhere in space it’s looking like we’re going to need some kind of technological leap. Would be wild to see that happen this lifetime.


To give perspective to 700AU: the nearest star is ~270 kAU i.e. the object is at ~0.26% (close to the Sun)

https://imagine.gsfc.nasa.gov/features/cosmic/nearest_star_i...


> Most people don't know off-hand that Pluto is ~40-50AU

~30-50AU if you are referring to the range of orbital distance.


No, I was referring to the range of my recollection when I read Wikipedia earlier this morning while writing the parent comment :)


And Neptune orbits at 30 AU with very low eccentricity, "of course."

https://xkcd.com/2501/


I was just thinking of this XKCD comic specifically.

Most people won't even have the slightest idea what 1 AU is. Most people know less about most topics (including space) than the original ChatGPT (3.5) did — probably only people who at least started a degree with a space sciences module are likely to know more than 3.5, and I expect plenty of space.com readers to be enthusiastic amateurs rather than professionals.

That said, I do I expect the average reader of space.com to know what an astronomical unit is, but even so I don't expect them to know the average orbital distance of Pluto.

But is even that assumption my quartz?


I don’t think the vast majority of people will have a good sense of how far away the standard gas giants and pluto are from the sun in terms of AU.


The length of 2.1 trillion Olympic swimming pools.

Or 698 trillion bananas.


It helps if you picture Planet 9 orbiting on the surface of a sphere with the surface area of 6.6349344e+18 Waleses.


I only understand American football fields :-<


On its own it’s a bit of a useless number. You’d have to know how many AU Pluto is to understand context.

But if you got “15x further than Pluto” you have context without needing to know any other trivia-style numbers.


AU is not exactly a trivia style number. It’s one of the most standard units of measuring distance between different bodies in space.

Also it’s not like distance to Pluto is a meaningful number either since it’s extremely variable . AU at least is fixed


New horizons launched 9.5 years before it reached Pluto, and your average reader who has an interest in Planet 9 will likely know it took New Horizons about that long.

15x means no one alive today will see a mission that reaches the planet, and that's more accessible for most readers per above.


New horizons is hardly the fastest possible probe over the next 30 years.

(9.5 * 15 / 3 = 47.5) + 30 years = 77.7 so some teenagers could live to see a probe reach it even without hypothetical life extension technology.


1 hour at Warp 4


Original formula or Next Generation formula?


ToS, but as it turns out I believe it works for both.


Ahem, cite your sources? At low warp we’re generally BLASTING by stars!


700AU = 105 billion km (approx)

Warp 4 = 109 billion km/hr

Per https://i.imgur.com/Su1RB.jpeg

https://memory-alpha.fandom.com/wiki/Warp_factor also lists values in a couple charts that check out.


Are we there yet?


That's likely something related to USB legacy support being on or off.

A lot of modern BIOS/EFI also allow a hybrid setting that enables legacy support until the OS takes over, which can sometimes be better too.


ITYM Lilililililililililili....


The amount of software available for linux vs the BSDs tells me that the distro model has not hurt linux. If a homogenous software stack from a single centralised set of software was beneficial, it would be more likely that porting to linux from a BSD codebase would be the norm, rather than the other way around.


The web was only 3 years old when altavista burst on the scene.

So the window of there being 'no search engine to find what you were looking for on the web' was tiny.


Ironically, replacing multi-million dollar aircraft that 'fell into the sea' is part of what keeps the american GDP so high.


and keeps world trade safe and economy rolling, without the world paying for it.


to be fair to linux, elf was bolted on after a few years, the original linux used a variant of coff without shared library support.


the odd thing is, at some point I ended up with `hash -R` as muscle memory that I always type before I correct it to a lower case r, and I'm not sure why, I can't remember any shell that uses `-R`.


> it is not just communist countries that nationalised things. Much of Europe did up to the 1970s, lots of Asian democracies did.

I suspect you're about to have your eyes opened to just how the american right feels about pre-neoliberal europe and asia.


I already knew, but rapid downvotes on HN which is relatively rational surprised me.

There was a lovely radio interview of Neil Kinnock (former leader of the British Labour Party) many years ago in which he described the reactions of some Americans to him being a socialist (and not the British equivalent of the Democrats). One woman said "You can't be socialists, you're too nice".


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

Search: