HN user

harshavr

92 karma

interested in new ideas on design of programming languages

Posts3
Comments40
View on HN

I am no expert on this, but if you assume the cosmological principle which states that our universe is roughly isotropic, there is a natural set of observers called comoving observers who are at rest with respect to the expansion of the universe. One can define a universal time using the clocks of these observers. Presumably, this is what gives meaning to statements like the universe is 14 billion years old.

Not to minimize the importance of teaching, but the content is important too. Instead of the content consisting of memorizing and performing algorithms, hoping for students to discover meaningful patterns/concepts/insights or rely on teachers to provide them, maybe the content should be doing this explicitly. One topic in the high school syllabus which actually does this is Euclidean geometry, where everything is coherently derived from basic principles as opposed to a grabbag of techniques. Maybe, one could present arithmetic in the same way, not focussing on the how to do calculations but the patterns in these calculations and a few basic principles too discover/prove them. Alternatively, one could focus on applications of mathematical techniques in toy versions of real world problems.

Arithmetic algorithms still have value - for the insight they give on arithmetic and because following a complex algorithm is itself a skill with value.

But there is no need, as we do now, to insist on performing them so many times, or to do them very quickly in exams.

The main problem with this new approach, I feel, is that it makes learning mathematics harder. Building richer conceptual models which is necessary for both applications or theory is more interesting and meaningful, but also more difficult than following prescribed algorithms. It is harder to test in an exam, and where testable the problems are much harder.

This issue of algorithms vs conceptual understanding, is important at the undergrad level too. Eric Mazur has a nice video about this where he also talks about his way of testing conceptual understanding by asking very simple but illuminating questions - http://www.youtube.com/watch?v=WwslBPj8GgI

Levels of Infinity 15 years ago

Nice explanation, though I dont see how this leads you into becoming a formalist at the end. That countable models exist for the set theoretic universe, seems like part of the phenonmena of infinite structures having perfect reflections in subsets. This is, of course, much more breathtaking than the more usual facts like the natural numbers having the same cardinality as even numbers since cardinality is transcended and the whole universe collapses into a countable set.

Isn't this a property of the implementation rather than the language, though? Couldn't you have a compiler option to keep the type tags attached to the bits, sacrificing some of the speed benefits of static typing but keeping the primary advantage of proofs/testing?

If there is a real need, wont scraping toools with easy interfaces be developed by competitors to allow a user to get personal data out while migrating? Its the user's data after all. Lock-in due to the usefulness of friend info might still be significant, though.

Some banks display a customer preselected image after the user name & before entering a password. This seems to be a good solution to phishing if one keeps the username private. Otherwise a site could give you the option of using two part passwords.

Before you arrive at a judgement of the paradigm itself be sure that you know some of the standard ways to solve problems in the field.

Some basic things which i didn't knew in the begining :

Fast persistent data structures - Coming from imperative langs, one might be hesitant to write functions which take a million elt vector, modify it and return a new vector. It is important to know that any good implementation of functional data structures will allow you to do this in constant time & speed. (independent of the size of the data structure).

Editor combinators : If you arent aware of this & are modifying a data structure with several levels of nesting, imperative assignment will seem much more convenient, ie dont translate foo.bar[8]=3, into something of this pattern barNew = editVector(foo.bar, 8, 3), fooNew=editMap(foo, "bar", barNew). It gets worse with more levels. Instead, use an editor-combinator library which will allow to you specify the path within the data-structure and a new value just as in the imperative case.

Things to know which are not strictly FP related, but nevertheless very useful - pattern matching simplifies definitions a lot, typeclasses are usually more convenient than class hierarchies.

Someone has already pointed out advice on libraries, (Clojure or any using any popular language in a functional way).

The main thing which motivates all of this - composability. It is hard to combine procedures with side effects into compound procedures because one needs to keep track of whether the component procedures are interfering with each other. FP eliminates this friction in composition.

Can you clarify? I thought that keeping separate streams of side effects is not possible when one stream influences the other. The logging process depends on what actions happen in the IO sequence though not the other way around. Are you talking about keeping the normal IO actions in one monad, logging actions in another & then composing the two into an outer IO monad?

Since you can use gconftool shell command to get & set key values, it seems consistent with the unix philosophy. It is actually easier to use in a script than to parse a text file. For tree level operations, one can use the standard directory commmands like mv, cp inside the ~/.gconf directory. gconf-edit is a tool you use only if you want to. One could actually write a simple emacs mode for doing the same thing.

If I remember correctly, there was a more tricky problem in implementing monads without the type system - sometimes which monad is chosen for an expression, depends not just on the arguments, but the expected type of the result. Ex : "return 3" might be [3] or an IO action with result 3. The compiler decides this based on the surrounding context. In dynamical languages one would have to manually specify which kind of 'return' you mean.

This surrounding context inference feature, which is useful for type classes other than monads, has the unusual consequence that you need to specify more typeinfo in a dynamic language.

B) should be disincentive to save using money, not a general disincentive to save itself. One could make investments in any other commodity whose value relative to other commodities stays constant or increases.

It is a somewhat unusual tax, in that your tax rate is based on what proportion of your assets are in dollars. Does someone know what the rate per year on dollar assets is and how to calculate it? You would need to know how much money the Fed prints in a year. Do they publish it or was that what auditing the fed was about?

Also for A), banks probably factor in inflation while setting the interest rate for a loan. So, the relevant variable, i guess, is unexpected inflation rather than the value of inflation itself. The debtor benefits only when the loan market makes low estimates.

Portrait of a Noob 17 years ago

The first part seems to be motivating something like a macro system for comments. What if one abbreviated compound situations using a single word or a phrase along with a separate file with expansions of the abbreviations into more detail. So, one can comment at a more abstract level and still be understandable (using say, a tool which displays the expansion when hovering over the abbreviation, or a separate window with expansions of all the abbrevs used nearby). Ideally, of course, the abstraction would be captured in the code itself, and the expansion would be the comment before the function or the macro defining the abstraction. So this system will be useful only when there are abstractions in comments which are not reflected in the code.

I wonder if there is a special advantage for geoenginnering solutions like carbon sequestration where instead of perturbing a complex system and using technology to individually manage all the negative consequences, we use technology directly on the variable we are influencing. It frees us from calculating all the consequences.

Burn Baby Burn 17 years ago

1 is a real issue right now. But, this will change. Once there are enough users, students/philantropists/governments might pool up money to pay good universites/professors to put up videos & other material for free online. There is scope for a website which would keep track of requests & payments for a particular course.

As a grad student in math, i would say that determination still plays a important role. For me, there have often been periods where you lose motivation and dont see why you are doing what you are doing, and then sometimes there are moments of clarity. (someone aptly compared this to mountain climbing). I imagine this happens in lots of other fields,(music, to pick a random example) where there is a prequisite of learning lots of arbitary things before understanding/creativity happens. Determination, is what you might need to to go through these phases.

The user of the web app has a model and a desired result in mind and somehow needs to communicate this intention to the system. Viewed this way, it is clear that there must be a language in which this communication happens. Of course, we call this the interface. A user interface can be thought of as very high-level, very domain-specific language.

Here's an attempt at distinguishing a truly quantum effect: can the same thing happen in a universe with classical physical laws and also keeping the other relevant variables fixed?(the latter part is important because the classical universe is, of course, turing complete).

Also, there is a similar programming qn. Suppose you have a program P running on a machine Q, and the api for a machine C is implemented on Q, so that programs for C can be run on Q. How do we actually figure out if P is really a C program running on Q?

I find these links very useful. HN seems to be serving a broader role than news,(another instance is the askhn posts). About non-shortage of online course material, this is very much true. Still, the 'aggregation' part remains - a way for users to post study notes that they find useful or interesting and then to discuss them.

Has anyone here installed a lisp machine emulator on a linux pc? I am wondering where to get the source from. The unlambda page, which according to google hosts the code, seems to be down.

Is it necessary for the agent managing the subscriptions to be the same as the agent providing you internet services? Maybe you can have a webapp which provides an easy interface to both users and website owners. Website owners provide usage info & bills, and users see all charge details in one place. Something like what credit card companies do but also managing any extra details specific to websites.

I was attracted to this viewpoint, especially as it makes serialization/deserialization easy. But there are good reasons behind using objects (and their dual, abstract data types). Because many times, you don't want some parts of your program to know about the internal fields your datatype has, as the implentation can keep changing all the time.

ML which uses ADTs solves this problem nicely. You can just write a module containing the map which implements two different signatures, one signature with the restricted set of fns, and another signature which will expose the map. Regular modules will import the restricted signature, while serialization or database interaction modules can import the map signature.

I like PLT scheme's unit system which comes from ML. It is better in two ways, units & signatures are first class values. And, you can use the powerful macro system to get rid of any repeated syntax pattern involved in exposing a map in two different ways.

I dont think the debate was as much between intuitionism and formalism as it was between intuitionists and people who thought infinite objects are really real. In particular, intuitionists dont object to "A or not A" for finite sets.

In many cases theories become simpler not more complicated with constructive foundations for mathematics, (for instance, synthetic differential geometry is a much more elegant way of doing geometry). Modern categorical foundations for mathematics, using topos theory, has intuitionistic logic as its natural language.

It is exactly constructive foundations of mathematics which is related to foundations of programming languages, and this in many cases is formalized via the Curry-Howard correspondence which takes programs to proofs and vice versa.

Identity as a person is much more widely present than identity in terms of religion, programming language, economic stance, nationalism or culture, Imagine someone makes a critical statement about your personal character, The way we respond to it is obviously different from a generic statement. Whether or not, one tries to look at the statement as it is, there is usually also a powerful psychological response which is triggered and this will too often also be the basis for action. As one forms various identities, conversations about these new topics will lead to the same response.

The interesting question is how is this 'minimizing of identity' to be done? One idea i've heard is the following, Usually this psychological response happens in the background, the unconscious so to speak, Instead one can be try to be aware of it, not just abstractly but live. Watching a reflexive response and its influence on action at the same time as it happens.

Does Gödel Matter? 18 years ago

Isn't this broader than the limitations of first order logic? After Turing we know that no matter what formal system of axioms and rules of inference one choses(as long as these can be mechanically done) then there will be some true statements the system wont be able to see. (does the nth turing machine stop?, does a particular diophantine eqn have integer solutions?)

Self-fulfilling rumours which trigger bank runs can be a distributed phenomena, no one person needs to engineer it. It just needs to start somehow.

More importantly, it is possible that most people are wrong on some particular question about a market. If so, a sudden discovery of the truth by the mainstream might lead to a desertion of this market.