Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror

Comment: Re:give this one a pass (Score 1) 138

by HiThere (#48907503) Attached to: How Do We Know the Timeline of the Universe?

Well....sort of. The CMB is modified by galaxies that are too faint to see, though I don't know by how much. It's filtered by intervening dust clouds moving WRT both us and the "origin of the signals". Etc. I normally assume that this is taken account of as best we can, but it's not unmodified signal. If you look at the raw (uncorrected) observations, I don't know how much noise is present, but clearly that are signals too weak to be recognized even though detected.

OTOH, I am not a cosmologist. But I do recognize that error bars are important, and that they tend to get left out of popular articles.

Comment: Re:Advantages are gone. (Score 1) 455

by HiThere (#48907027) Attached to: Ask Slashdot: Is Pascal Underrated?

Yes. There are numerous reasons to "not fight city hall". But that doesn't mean you can't do it for a good enough reason. E.g., I use tab spacing at the start of Python lines. This causes formatting problems if I use idle, but to me its worth the cost. And I've occasionally had reasons to use a length terminated string in C...though I usually also zero terminate it. (IIRC the reason was that I needed to include 0 valued bytes in the string.)

Similarly you can use zero delimited strings in Pascal, but you need to write the support routines that you would need, and since current Pascal has a string type that isn't limited to 255 chars it they would appear to be rarely needed.

Comment: Re:Discussion is outdated (Score 1) 455

by HiThere (#48906969) Attached to: Ask Slashdot: Is Pascal Underrated?

No.
Python is an open source project. Ruby is an open source project. Squeak is an open source project. D is an open source project. Racket (scheme) is an open source project. ALL have decent language documentation. And that was just a list off the top of my head. Being an open source project is not an excuse for lousy documentation.

Comment: Re:Early fragmentation (Score 1) 455

by HiThere (#48901055) Attached to: Ask Slashdot: Is Pascal Underrated?

Did you ever try to run C on the Apple ][? UCSD Pascal was available, and worked well. C required an add on z-80 chip, and it was still a subset implementation. (Check out "Lifeboat C", though I think that was a later, and more capable version.)

So the situation is more complicated than you are assuming. I didn't get a full C compiler until AFTER I had gotten an 8086...which means probably that the IBM PC was already around.

Comment: Re:Advantages are gone. (Score 1) 455

by HiThere (#48900041) Attached to: Ask Slashdot: Is Pascal Underrated?

Sorry, but the length defined strings are optional, though common in Pascal. UCSD (and other early) Pascals usually buit that into the language, but I believe that now it's a part of a standard library, and alternates can be defined (though probably not with the same name). I'm not sure why you consider Pascal data structures more "well defined" than C structs.

P.S.: Strings in C can also be handled with a length byte. The zero terminated strings are purely a library convention, and can be overridden.

FWIW fpc Pascal has a string type in it's library that uses a length value longer than a byte.

Comment: Re:a great first language to learn (Score 1) 455

by HiThere (#48899997) Attached to: Ask Slashdot: Is Pascal Underrated?

FWIW, there's nothing intrinsically wrong with Pascal...or less than with C or C++. Java is worse, hobbled by 16-bit unicode, a horrible decision, which was justifiable at the time the decision was made. (Unicode should be either utf-8 or utf-32 [UCS-4]. I generally prefer utf-8, but that requires more complex library support.)

OTOH, the only real advantage of Pascal is fast compile times, and optimal execution times (which can easily be matched in C).

So, yes, its underrated, but there's probably no good reason to change to it.

Comment: Re:Discussion is outdated (Score 2) 455

by HiThere (#48899931) Attached to: Ask Slashdot: Is Pascal Underrated?

From my point of view, the problem is lack of documentation. I *think* that fpc Pascal can not properly handle utf8 strings, and determine the general character class of individual characters (something that Java struggles with), but the documentation is so bad that I'm not sure. And I didn't bother to test because I couldn't find any good samples to start from. Lazarus has a lot of good press, so i can accept that it is a powerful GUI development tool, but that's not what I'm doing.

FWIW, I've got a long series of desires for my programming language, and no language that I'm aware of satisfies all of them. But if its a lot different from languages that I already know, then I'm less willing to invest time learning. Pascal should have a clear bonus here, as I used to program in Object Pascall on the Mac II, but the documentation is so bad that I've tried radically different languages (e.g., Racket Scheme) and passed over fpc. (Mind you, a few years ago it was missing some needed features, but now I think that it has all the features I need, probably, but I can't be sure.)

Comment: Re:This guy hasn't done his research. (Score 1) 637

by HiThere (#48877901) Attached to: Justified: Visual Basic Over Python For an Intro To Programming

References are essentially the same as pointers anyway for what matters here.

I think this is why we are disagreeing. I don't consider them the same. (Reference in Python doesn't mean the same as reference in C++. Those are, indeed, essentially pointers.)

Using Python references does, indeed, enable a high level understanding, but it doesn't facilitate a low level understanding. And I consider hash tables (dicts) much more important than priority queues...which, of course, is why Python has them built-in.

Comment: Re:This guy hasn't done his research. (Score 1) 637

by HiThere (#48872173) Attached to: Justified: Visual Basic Over Python For an Intro To Programming

Well, no. Pickle doesn't solve this, as it requires the entire file to be one image. Shelve is closer, but still doesn't fit my needs. I need to stick data structs into a database, and what I settled on as the best option available is a combination of rexpr and ast.literal_eval. But that *does* mean converting everything into text to save it. (Pickle allows untrusted data arbitrary execution, whereas ast.literal_eval just reconstitutes forms that are built-in and are safe, or at least that's what the docs say.)

Comment: Re:This guy hasn't done his research. (Score 1) 637

by HiThere (#48872121) Attached to: Justified: Visual Basic Over Python For an Intro To Programming

Python doesn't implement its data structures in Python, though there is usually a Python implementation with the same interface...but which is a LOT slower. But Python doesn't have pointers. (References are close, but not really the same.) So Python isn't a good choice for implementing data structures as a teaching environment. I haven't looked into how Smalltalk implements them, but I suspect its basically the same approach. The advantage of references is that they allow garbage collection to be efficient, but the concept is sufficiently different from pointers that it prevents actual understanding at a low level.

OTOH, I'm not sure how a pointer language should handle memory allocation and release in an introductory course. (I started with assembler and FORTRAN IV, so I don't have the correct perspective.)

The best book on programming for the layman is "Alice in Wonderland"; but that's because it's the best book on anything for the layman.

Working...