Domain: snu.ac.kr
Stories and comments across the archive that link to snu.ac.kr.
Comments · 22
-
Re:I miss GOTO...there I said it
Suit yourself, but I'll take Knuth over Dijkstra: http://pplab.snu.ac.kr/courses/adv_pl05/papers/p261-knuth.pdf.
-
Re:I miss GOTO...there I said it
[citations needed]
Citations won't be found, because the explanation is incorrect. There is no technical issue with compilers implementing 'goto' so long as the destination is in the same lexical scope (C has this limitation). Nor is it worth considering execution context at the level of the CPU, as any high-level loop or branch instruction must be translated into one of a limited number of conditional or non-conditional, relative or absolute jumps. Ultimately whether you use 'goto' or some other control construct you are attempting to express the same programmatic flow, and the compiled instruction stream will be sufficiently similar that it's not worth splitting hairs over.
The reason 'goto' is "considered harmful" is because structured programming theorizes that any computable function can be expressed by combining simpler programs using sequence, selection and iteration; and this provides the opportunity for a constructive approach to program correctness. Dijkstra argues that we are cognitively limited and can benefit from code that is structured so that we can tell at any point where we are and where we have come from (a gross paraphrasing of what Dijkstra calls "coordinates"). But "[t]he unbridled use of the go to statement has as an immediate consequence that it becomes terribly hard to find a meaningful set of coordinates in which to describe the process progress". In other words careless use of 'goto' makes it hard to reason about your code.
Knuth contended that one could created structured programs with 'goto' statements, and provided examples of how 'goto' make the program more elegant.
It is important to realise that the claimed advantages of structured programming are undone by the use of break, continue, or exception handling. There are limited forms of goto, and using them prevents proofs of correctness (under the assumptions of structured programming; other techniques may be available) and reasoning using Dijkstra's "coordinates".
-
Re:Focussing on the normal bit
So they fed an LCS with some sample data? OK, par-for-the-course. I'm far more interested in how they generated those '1 million' pre-labelled test images in the first place.
I read the paper; it was clever. They used a standard motion capture setup with their actor(s) going through several hundred different movements. Since their algorithm is stateless, they could analyze the motion and produce many distinct poses from each movement. Each pose was then "retargeted" (a well known technique in animation; example) onto many different 3D models of people of varying height, body type, etc., before finally being rendered into a perfectly labeled depth map.
They went through several iterations of this process:
- Train their algorithm on this huge data set
- Notice that it doesn't work so well in some situations
- Have their mo-cap actor(s) produce additional data to cover those situations
- Process the new mo-cap data into however many thousands of additional training poses
- GOTO 10
-
Re:One word..
So, where's your example?
Structured Programming with go to Statements (Donald Knuth) (Note: PDF file).
Linus et al. on the use of goto statements in the Linux kernel
-
Re:It's okay to teach them FORTRAN
So how am I supposed to do error handling in a low level language that doesn't have any explicit exception handling mechanisms, like C? Also, how do I accomplish the same code using only while loops and flag variables without involving code duplication and a whole bunch of flag variables that I have to set, check, and reset, and also doesn't have a big performance cost and make it an unreadable mess. An example of such a use would be in a deeply nested loop 3+ levels deep that I'd want to break out to the outer most loop. On that note, do you have issues with people who use break, continue statements, or any other forms of flow control in the program, and follow goofy rules like the one entry, one exit philosophy? This is the impression I'm getting from you.
Any tool within the language can be abused. As long as the intent is clear and justified and there's no other better choice, I see no issues with using a goto or any of its variants in other languages (call/cc comes to mind) in when needed. That being said of course, there are richer flow control constructs in higher level languages that don't necessitate the need for goto as much anymore, possibly not at except in extreme circumstances.
Also, this is a great read from Knuth himself who shows ways you can use goto to improve code readability and make it easier to express ideas and correctness without unnecessarily tying your hands behind your back: Structured Programming with Goto statements. Food for thought. -
Re:Regardless of whatever code in it is faulty
But why use it you do not have too?
Computer science books and even my highschool basic programming class mentioned its not proper programming to use a GOTO. Is there any computer science professor that supports GOTO statements in programs?
GOTOs are not inherently bad. At some level, they're unavoidable. (Have you ever programmed in assembly language?)
As for CS professors, Donald Knuth uses and defends GOTO statements:
http://pplab.snu.ac.kr/courses/adv_pl05/papers/p261-knuth.pdf
(His code comments often make reference to why he uses GOTOS. For example, in his implementation of the classic Adventure game, he writes: "By the way, if you don't like |goto| statements, don't read this. (And don't read any other programs that simulate multistate systems.)" In http://www-cs-faculty.stanford.edu/~knuth/programs/15puzzle-korf1.w, he writes: "as a full professor with tenure, I don't have to worry about being fired when I use |goto| statements.")
Not every programmer is good and a good programmer will refrain from making the program harder to read or more difficult to debug when jr programmers modify it later.
GOTOs by their very nature encourage bad programming as much as pointers do.
Pointers encourage bad programming? No offense, but do you have any real programming experience beyond your "highschool basic programming class"?
-
throw is a goto
Thou shalt not use the GoTo, for such disrespects the Prophet of Programming Dijkstra,
Dijkstra's 's prophecy was taken out of context, and it needs to be read along with things such as "Structured Programming with go to Statements" by the living prophet Knuth. Notice that in whatever language you use, the looping structures (be they "while", "for", or tail recursion) are ultimately translated into GOTO. So are exceptions that you throw or raise.
-
Re:Another fashionable addition for PHP:
Goto's are useful. Labels are useful. Yes they can lead to problems, but so do things like pointers, dynamic typing, operator overloading, namespaces and automatic memory management. But they can also solve problems that are otherwise intractable, which is what the GP was trying to tell you. Dismissing them just because E. Djisktra said so is not really good enough.
If you want an argument from authority, or just a good read, here's Donald Knuth on Structured Programming with GOTO Statements. You need to read that paper before you can have a proper opinion on the GOTO statement. Otherwise you're just adhering to dogma.
-
Re:Java sucks
I want a GPL'd latte
:-(
No need, latte is already distributed under a BSD license, which is GPL compatible. -
Java is already fragmented
Java is already fragmented. The result of open sourcing Java will actually be consolidation, i.e. killing of competing VMs. And a huge open source test suite will greatly benefit all surviving JVMs, which is a good thing.
How can you not see this?
Javas problem is not that it might get fragmented, the problem is that it IS fragmented. Do something about it! Let Java free! -
Re:But what about Windows?
Not sure how they did it but the installer said something along the lines of "Sun JRE not detected" and offered to install it for me, wouldn't let me continue if I did not. Don't reall exactly which JVM I was trying to use at the time, perhaps it was LaTTE?
From LaTTe homepage:- No AWT or Swing
- Not Java 2 (only supports 1.1).
- No bytecode verifier.
- Lacks JNI support.
- Incomplete class library.
- No support for JAR or compressed ZIP archives.
No wonder the installer refused to continue. In fact, it's a small miracle that LaTTe (a result of a research project, apparently) was able to start it in the first place, as it seems to implement only a small subset of Java 1.1 features rendering it totally unusable for running anything real - even when Java 1.1 was the latest release. Java 1.2 was released eight years ago.
I've never quite understood why people seem to think that open sourcing Java would magically solve all the problems. For example, memory usage and relatively slow GUI performance seem to be one of the major gripes. Does someone really think that a bunch of open source coders who have never seen the sources before would be able to improve it in any reasonable time if the engineers at Sun cannot?
And how many (smart) OS coders would actually care?
However, fixing the relatively small bugs and annoyances in the standard Java libraries is certainly something that could be done by the 'community', as Sun seems to be notoriously slow in fixing some of the bugs..
-
Use NNTP Please
I hope most Slashdot readers are using NNTP by now (not NTP) to use their music, movies, software, pr0n, etc. etc.
You will help out your ISP by only using downstream bandwidth. You can also usually max-out your connection speed. A CD can take only 15-20 minutes to download.
Further, your troubles with the RIAA/MPAA/Homeland Security are likely to be limited to when you, say, post on a heavily visited site about your activity but forget to post anonymously.
For the best binary newsreader (to download files) from USENET, I reccomend Power Grab -- small, fast, free, and doesn't fiddle around with your registry.
You will probably need to subscribe to a USENET service as well; I reccomend easynews or if you plan to download more than 20 GB per month than Giganews. -
Re:Why?
The panel did check the dog. This is an excerpt from the panel's findings as posted on Seoul National University's website http://www.snu.ac.kr/engsnu/
3. Verity of the cloned dog, Snuppy
We also carried out DNA fingerprinting analyses on the cloned dog Snuppy whose generation has been published in Nature in 2005 (Lee BC, Kim MK, Jang G, Oh HJ, Yuda F, et al. 2005. Dogs cloned from adult somatic cells. Nature 436: 641). We obtained somatic tissue from the egg donor, blood samples from Snuppy, from Tie, the dog that provided somatic cells, and from the surrogate mother and engaged three independent test centers for the analyses. Results from analyses of 27 markers that allow distinguishing amongst extremely-inbred animals and of mitochondrial DNA sequencing indicate that Snuppy is a somatic cell clone of Tie. -
Re:I failed a coding test because of this guy
Yeah, that is BS! Especially when you have Donald Knuth, Brian Kernighan and Ken Thompson on record in defense of goto when it's warranted. References: Knuth's "Structured Programming with GOTO" (link appears dead), Kernighan, and Ken Thompson: "If you want to go somewhere, goto is the best way to get there."
And then there was the famous "'GOTO Considered Harmful' Considered Harmful" by Frank Rubin, and a a decent section in Steve McConnell's Code Complete that takes an even-handed view.
Anyway, swinging carefully back on topic, it sounds like Mr. Goto's work is at the instruction level, not the C or Fortran or even really at the algorithmic level (except maybe tricks like tiling). I program in the embedded space, where getting as close to 100% efficiency is a continual challenge. I wonder if any of his techniques scale down...
--Joe -
Human Interface
Neal Stephenson (writing as "Stephen Bury") described a drone politician controlled that way. And some say that this is already standard political practice
-
Re:with open source, everyone can see you're dumb
No your mistaken Anonymous cowards who don't want to have credto answer for the things they post do that.
People willing to say "I said this, based upon infoprmation I've learned" agree. Science has said that the Little Ice age was a global event.
Uni of Southern California/A>
Uni of Korea
Sindh Agriculture University
Over 100 peer reviewed articles on the little ice age in North America.
How European centric to thing that the LIttle Ice age only effected one small area of the US. -
Re:Receive message by secret via vibration!
Get a modern phone and write some Java code to do this. And yes, you can control the vibration using these API's.
-
Re:Here's some evidence
When did Allende suspend elections, as claimed in your first and third points?
A list of Allende's constitutional violations was prepared by the Chilean Chamber of Deputies in August of 1973, and can be read here. Here is a report on Allende's abuses from the September 15, 1973 issue of The Economist, while a more modern take can be found here.
You'll find a good paper on the history of constitutional law in Chile here (.doc format, sorry), which details in passing some of how the Constitutional review process broke down early in Allende's rule, as Allende overruled and/or repeatedly refused to enforce laws passed by the legislature.
Incidentally, one of the best primary documents on Allende's abandonment of the Chilean constitution is the open letter which the Supreme Court of Chile wrote to the New York Times after they were forcibly dissolved by Allende. I haven't yet found this on the web, but I'll keep looking. Any good history of the era reproduces it, as well.
You also claim the CIA had no knowledge of their contacts' illegal actions, ostensibly including that of Manuel Contreras and the DINA assassins of Letelier and Moffitt, and demand evidence of this knowledge. May I ask what sort of evidence would satisfy you that they knew?
Kind of an odd question, really, since so far you've provided no evidence at all. In either case, I've already mentioned or linked to the known archives of Chile-related material, none of which (as far as I can tell) provide such evidence.
Even such knowledge, however, would be a far cry from evidence of US involvement in Pinochet's rise to power, however, no?
Finally, you claim that pressure from the Reagan adminstration forced Pinochet to step down, and that this is an "uncontested fact". Yet the Reagan administration were selling helicopters to Pinochet's regime, all the while they were supposedly "pressuring" for elections. http://www.hrw.org/reports/1989/WR89/Chile.htm
What confuses you about the idea of providing aid coupled to demands for reform? The fact is that Reagan aided Chile and demanded elections, and the result was elections, while Carter had cut ties to Chile and demanded elections, which resulted in nothing at all.
In other words, the result of Reagan's pressure was the stable democracy that Chile is today. And you propose that what, exactly, would have been a better course of action? Invasion?
It's more logical to conclude that Pinochet was planning to step down, and the US was simply applying the same sort of "pressure" that Israel currently enjoys from the US, meaning mild, periodic press releases requesting the client state to do the decent thing. The Republicans put Pinochet there, should we congratulate them for asking him to step down years later, all the while suppressing documents on US involvement, all the while turning a blind eye to the torture and murder of tens of thousands, including that of US citizens?
As you have yet to provide any evidence that the US `put Pinochet there', you have no grounds to base further claims on this allegation. When you have demonstrated that this wild conspiracy theory is true, then you may rationally theorize about `what it tells us', and not before...
And while we're at it, perhaps you can provide a source for your claims of `tens of thousands' killed under Pinochet's rule? Most credible reports which I've seen put the number of deaths at around 1,000 or 2,000, and even the site remember-chile.org which you link to
-
Structured Programming with Go To Statementsreally like assembly _because_ of the preference of the jmp statements. I always look for it in higher-level languages, too, as one actually even can produce structured code with jmp/goto statements, if you're a bit careful. The linux kernel includes several occurences of goto, if I may cite this, in order to make the code more readable.
In fact Knuth wrote an article under the title Structured Programming with Go To Statements
:-)Regards,
Marc -
LPABO and LPAKO
LPABO and LPAKO are public domain Linear Programming packages
from the Seoul National University. LPABO
uses an interior-point method, while LPAKO uses the simplex method.
I've looked at several other free LP solvers, and this package looks like it is fairly fast and
robust.
I wasn't able to find a license for these packages. Maybe you could ask the author about releasing their software under the GPL or another Free Software license? -
Re:Still Needs a lot of Systems workwell, if we want nanorobotics (and I'm sure that I do), we need some computers to power them. would you like to try to stick a pentium in my nanorobot that's the size of a blood cell?
probably the best solution to the heat dissipation problem is reversible computing. I looked on google and found some links:
- Zyvex has a bit on the subject
- a group who say they've made a reversible-architecture CPU
- Mike's BibTeX file. I have no idea who the guy is, but there are some papers on the concept.
Lea
-
Any Gene Transfer Problem/Headache?
Sorry, if this topic posted already, but I could not find any.
I've heard the bacteria exchange their genes in extreme environment through sex pili as you can see here. IMHO, if we have lots of genetically engineered bacteria, the possibility that the modified gene go wild among lots of *other* bacteria goes high. This is one of my nightmare.
Now the bacteria supposed to be applied in very hash environment. Hence the higher possibility. Hence the higher danger. Right(or not)?
Does Anyone has the knowledge/experience of this issue?
Please return me my sleeps or, at least, a reasonable reason of my sleepless nights!