346 karma · joined Apr 3, 2009 (17y ago) · 154 submissions
comment 12y ago · link · parent
In order to get precision in checking, a lot of computation needs to be done so the compiler relaxes the precision when facing large disjunctions (networks) of constraints.
Dynamic checks are inserted as necessary but a system that relaxes when things get hairy can't guarantee that it will find all errors at compile time.
The idea is similar to Soft Typing of Cartwright and others, but they were thinking of an interactive system, some kind of programmer's aid. If I recall they ran into problems giving reasonable error messages.
comment 12y ago · link · parent
Would such a language be viable? Or is it absolutely necessary to catch all possible type errors. In the past, tools like lint have been considered useful, although lint is not at all the kind of type system that I envision, namely a system that is in practice catching all the errors that ML catches -- it just doesn't (and cannot) guarantee it catches them.
The restrictive nature of static type systems today is legendary, but I wonder sometimes whether people realize how restrictive they are. If you can't make your idea work with functors or typeclasses, chances are good there's no way to get it to compile and you have to write functions in longhand.
comment 12y ago · link · parent
My bet is even Smalltalk programmers don't think of eggs as knowing how to scramble themselves; but eggs do have an API, a behavior, that makes them distinct from other kinds of objects and at the same time shares characteristics with other objects, such as weight and dimensions.
I can assemble a list of eggs, elephants, and cars, and write "take the sum of the weights of all the objects". Although these objects are of different kind, they share a common characteristic that would be exploited naturally by any language user. Exploiting multiple "views of a thing" is a feature of English ("natural language") and to my mind is a feature of any successful "generic programming" computer language.
Processes communicating by asynchronous message passing is a better simulation of the familiar world; but that vision is not realized by Smalltalk, wherein messages are passed synchronously. What we want from language is the ability to write powerful sentences and have them mean something to the machine -- as long as the computer and human agree on the meaning. The better part of this power comes from a sophisticated treatment of type and generic operators.
comment 12y ago · link · parent
We've reached a point in time where there is a wider consensus regarding the importance of stateless programming, option types, code re-use, and the productive people are not complaining anymore and instead are doing something about it. There are many new or recent PL projects ongoing, where people are designing new languages.
In the mean time, for those people who roll their eyes at missing GUIs or support for email addresses -- it seems to me they've identified an opportunity.
There is a rich set of choices out there and the hard thing (for people who aren't designing their own language) is shopping. Those people who can make effective decisions and exercise good judgement are going to have an advantage, whereas other people who expect others to deliver popular platforms into their hands for free, will remain below average.
comment 12y ago · link · parent
My position is that it's the language's job to allow expression of ideas and not its job to police or disallow bad sentences. I think such a thing [EDIT: disallowing bad sentences] is impossible and leads to COBOL-like languages. (Compilers can have options for coding standards, like "house rules" but I don't think it's the language's role.)
comment 12y ago · link · parent
Besides sharing or "abstracting" the pieces of hardware that the app wants to control -- as VMWare or a hypervisor might do -- the operating system has one additional important role, which is to function as an agent for the user.
The apps, written by various persons, are running on a computer that belongs to the user. The operating system keeps control of the computer -- the user's computer -- in the user's hands, and keeps it from being "taken over" by the apps.
This role or function of the operating system can certainly be subsumed by a programming language / environment like Smalltalk or Java, but the idea of an operating system has a purpose that directly reflects the different interests, goals, or priorities of distinct entities interacting inside the machine.
Usually the master control program is seen as being against the users, but I'm casting it as a good guy. I think that the promise of the operating system is that it can be a good guy (for the user), even if real examples tend to fail at that job.
comment 12y ago · link · parent
If you know the stepper motor specs you can calculate the resolution. Most motors are 1.8 degrees per step and most controllers use 16 micro steps. If the GT2 pulley is 10 mm diameter, that gives 0.01 mm per micro-step.
If the machine is not rigid and precise then you won't get full capability but 0.01 mm is very good and may be more than needed given the capabilities of the plastic, and the layering process.
comment 12y ago · link · parent
Check out Misumi's catalog, and you can always roll the dice on shady-Chinese-company knock-offs (Robotdigg). Look up aluminum t extrusions for framing, or use sheet or square tube. Or buy a frame from tens of vendors who sell kits and parts for the Prusa Mendel. I don't like the swing-set Prusa, and I don't like threaded rods. But there's also the fine Makergear M2 for inspiration.
Electronics and software are also commoditized.
Good kits if you don't want to design your own:
Printrbot Simple Metal Rigidbot (I don't know if they are using the best parts) many other quality kits
Interesting robots:
Reprap Wally, designed by Dennis Brown & Nick Seward.
3d printers are one area where it is the Wild West, you can go as deep as you want in one week, and learn almost everything except software details. All the hardware is nearly standardized, and right out there to look at and study.
comment 12y ago · link · parent
I wonder if G.S. feels unable to police itself, or maybe they feel the aluminum story is not a problem, or that what they did was harmless. I don't know what they think about what they do. I can't really blame below average people for cheating -- they're not good enough to win playing by the same rules as everyone else.
But if I'm to draw a circle around the corrupt people should I draw it around a piece of G.S., or around the whole company. It seems like the scandals keep happening, and that market manipulation such as laddering and hoarding are considered by the financial industry as another way to make money.
If the financial industry isn't greased entirely on deception, then I'd like to know what percentage is deceptive and what percentage is figuring out a hedge plan for e.g. BMW's exchange rate risk. I can see how billions can be made one way, but I don't see how billions can be made the other way.
comment 13y ago · link · parent
If anyone wants to make splendid coffee, and doesn't fear learning a significant new art I'd suggest roasting your own beans. You can do it with a heat gun or an air corn popper, modified. It's not simple and it's a bit of a fire hazard, but you can get satisfying results blasting some hot air at beans in a pot. Roasting can be more fun and aromatic than making coffee. It is amazing.
For a brewer you could get a sock pot aka woodneck (or just the sock without the pot -- or just muslin cloth if you want to make your own); or, a ceramic cilio-freiling cone, or an inexpensive melitta plastic cone. Both sock & cone are considered pour over methods but they taste different.
For a grinder there are too many choices to pick just one, and the good ones are expensive. For the grinder it may be safer to avoid mass-market products, just because it's too easy to make a mistake and buy an inadequate product.
[Edit: there is another effective trick to get better at brewing. Coffee brewing competitions. It is surprising how effective these are at improving the art. Watching videos of what the contestants are doing is one important tool for improvement.]
comment 13y ago · link · parent
It's 10" high, which is unexpectedly compact. It seems like the designers have chosen a shape to maximize use of space. I'm sure it isn't the only way to go but it's a wonderful next step.
Again Apple has shown us what we want when we thought we just wanted "more".
comment 13y ago · link · parent
The letter that Engtech linked to puts the responsibility where it ultimately needs to rest. The PR folks are letting the other parts of the company down, and if that's because of hiring mistakes or because the culture doesn't do an effective job reminding PR critters not to lie too much, either way it's the executives who made a mistake.
Electronic Arts has become a hated entity, just hated, and part of that I think comes from the controversy-making of the news machine. But part of it comes from nearly unexplainable statements, by people who I guess just learned the wrong life lessons, people who are clearly hiring mistakes.
comment 14y ago · link · parent
But, it is difficult to throw out a bad tool when there appears to be no alternative that delivers its benefits. When that happens, when a tool is devised that delivers what OOP delivers without the problems -- such as the diamond problem, or the problem of having to decide "where" to put functions, or the problem of generic functions of more than one argument -- then at that time those very problems will become much easier for everyone to acknowledge.
The same thing will happen to classes and synchronous message passing, that happened to inheritance. In that case it took a while but an alternative came in the form of interface subtyping or predicate based subtyping, and then it was easy to see that inheritance was more trouble than it was worth.
comment 14y ago · link · parent
From there on, the cpu is executing an instruction that calls out explicit register numbers. The stack counter is kept with the decoder at the very start of the pipeline. This "register number decoder" needs to run sequentially, and it needs to run a faster cycle time than the rest of the cpu.
comment 14y ago · link · parent
So to scale by pi, we multiply by 355, then divide by 113.
comment 14y ago · link · parent
I believe Colin [EDIT: I meant Jon McLoone, the author of the article. Sorry Colin!] is counting only full digit matches. It is this metric that is useless.
comment 14y ago · link · parent
In my work, I found that the lack of syntactic marking for arguments of function calls is a devastating drawback. Coming back to my own function definitions a week after writing them, I spent minutes unpuzzling the code. I could use every trick and write the function in the most elegant way, using combinators in the style of Factor, and that made it worse. But writing it out with local bindings also didn't help. As soon as you write a nested expression, you start to lose the sense of which values are being passed where.
gcd n1 n2 n2 0 = if n1 else n2 n1 n2 mod gcd
gcd zero if else "mod" plus swap gcd
factorial 1 interval product
I was designing a Forth-like functional language with generic functions, and for a long time I felt that the lack of markings didn't matter. I thought that one could understand the code "well enough" without knowing exactly where the arguments were going. There is something to this argument, and there's a lot we can do to make code say what it does. But sometimes the author just had to implement something, and technicalities arose, and when you go to read it, the code doesn't "read" and you have to bring your own intelligence to figure out what it does -- it won't tell you. In these cases, explicit argument marking is indispensable.
In Forth-like languages, simple things are wonderful and elegant. There is no other shorter way to write than point-free. And, writing with combinators is satisfying, and it can make the "essence of the function" more evident. But unless you severely constrain your style to ultra short definitions, avoid nested expressions, and use local variables profusely, you're constructing puzzles for yourself.
It's almost like the concatenative style is too optimal. You have to back up a step in beauty in order to get a practical tool.
146.
Ask HN: Exploiting the "group buy" to finance new products
1 points · by tailrecursion · 15y ago · 2 comments