I'm just wanted to know since I have a bit of code in mind I wanted to make, but would be rather complex.
pretty much a object search program instead of a word search program.
You have a picture or group of pictures with the same object in it. lets say a trash can. you select the trash cans image, and the program could do a search for images with objects that look like it.
it would also be able to display useful information on the object or location of the picture, and store any data saved for that search.
so it would pretty much be able to link much more effectively then a word search.
>>15
Stalin is an optimizing compiler mostly used for research, not for every day Scheming. If I remember correctly, it is implements only R4RS.
Chicken is a really good choice, in my opinion. You may also consider trying other implementations to see which fits you best, i.e. Gambit, Racket, Bigloo.
Name:
Anonymous2011-08-22 5:31
>>15
I was actually reading about racket right now. I was thinking of giving it a try.
>>21
Read HtDP and SICP. Both are about general programming/computer science, but use Scheme (specifically Racket for HtDP) as teaching language.
Both are available online, google them.
>>29 making GUI and 3D stuff in C#
Why would anyone do that? Is there suddenly a demand for GUIs and 3D stuff that is too slow to be useful? Man, these kids these days just want to do everything the wrong way. In my day, framerate meant something.
>>29
Racket bundles GUI bindings, colleagues. That's what Dr. Racket is made in.
>>27,28
That's because you believe that computing and programming are about instructing a particular computer what to do. It's not, programs are [b]ABSTRACT BULLSHITE[b] that exist on your mind, and can be expressed in various ways, including programming languages that run in an actual computer.
Starting with a virtual machine is just as valid. Not that learning computer organization won't do you good, but that wasn't what you said either, ``faggot''.
Name:
Anonymous2011-08-23 4:02
you believe that computing and programming are about instructing a particular computer what to do. It's not
No, actually, that is exactly what programming is. The computer you're "instructing" might be abstract, but it's still a computer and you're still instructing it.
Starting with a virtual machine is just as valid
It's valid, but not wise. The idea is to start with as few layers of abstraction as possible. Zeros and ones, then ANDs and ORs, then shifts and adds, then registers and memory, then assembly, then C, and then and only then, an interpreter if you like.
Name:
Anonymous2011-08-23 12:03
No, actually, that is exactly what programming is. The computer you're "instructing" might be abstract, but it's still a computer and you're still instructing it.
Yes... that was about the core of my argument on that point. That's why any random assembly language doesn't have preponderance over say, Scheme.
But let's have an argument here. You think that the way to go is going up from a machine with registers, a stack and RAM and build up to C only. And that will teach a way to program, indeed. But it's not the essence of programming. Holding in your head the whole tower of abstractions down to logic gates is not even useful, unless you are an autistic savant of some sort (and this being /prog/, we can only be sure that you are a plain old autist), but furthermore, it's missing the point!
The point is to create those abstract computers and to be able to reason over them and create more abstract computers on top of it all. That abstract computer may be as simple as the Lambda Calculus or C, or as inscrutable as PHP, but what you will be doing is building up, not down, and thus I believe that it's best to learn of its value and form than to dig down immediately to a concrete machine.
I know that you are partly arguing for starting out with a simple model, but the important lesson is that abstract models can also be simple, even if they seem complicated to implement in C or Pascal or whatever.
If anything, the OP at least won't turn out like those Slashdot automatons that think that actually believe that C is all there is (not claiming that you are one, it's just that it's sad to see those folks just set on one thing they learned 20-30 years ago, or 5, if they are just trying to look old-sk00l).
Name:
Anonymous2011-08-23 12:19
>>35
Top down approach is "programming on paper" and is very distanced and abstracted from realities and limitations of real hardware, its just an academical exercise in CS. It does not teach good habits, its sort of inapplicable higher math research.
Name:
Anonymous2011-08-23 12:22
>>36
Not really what I was arguing for. And the limitations and realities of real hardware don't always have much bearing on what you are doing.
Name:
Anonymous2011-08-23 13:12
I AM THE KING OF FARTS, BOW DOWN AND SMELL MY HEAVENLY ODORS
Name:
Anonymous2011-08-23 13:15
I AM THE KING OF FARTS, BOW DOWN AND SMELL MY HEAVENLY ODORS
Name:
Anonymous2011-08-23 17:58
Obviously abstraction is good. Processors are getting more and more powerful and so programmers now have the choice of using lots of abstraction. It cuts down of programming time and ease of programming.
And just forgetting about the machine completely also allows the programmer to just think about the problem (and it's algorithmic solution) instead of thinking about how to program the problem.
Name:
Anonymous2011-08-23 18:01
I am a grad student with access to hundreds of desktop computers (though Condor / cloud, whatever the fuck). If I wanted the speed, I could easily just use a distributed system instead of fucking around in C/C++ and wasting my time learning how the memory system of my particular computer works.
Name:
Anonymous2011-08-23 18:18
>>35,37
The reason to go "bottom-up" is not to memorize an instruction set or the hardware spec of a particular machine. It is to build knowledge in the most logical order. Starting, instead, with something like Scheme is starting with a black box. The vast majority of what is happening is hidden, and shouldn't be.
Instead, if you start with things like "true and false equals false," there is nothing hidden. We can intuitively understand that concept without having to add a footnote that says "it works this way because the guy who invented Scheme decided that procedures and variables should share a namespace, but the guy who invented Lisp decided that they shouldn't..."
And bottom-up gives you an actual appreciation for the work that the computer is doing, which forces you to be a better programmer because you're aware of time complexity and space complexity at an instinctive level. An integer isn't just some magical concept that can have any number of digits. Instead, it's 32 contiguous true/false flags on some machines, 64 on others, etc... And knowing that, you know when you need to care about things like overflow and when you don't. Starting with an abstract language that hides all of that detail from you only encourages you to be inefficient and handicapped.
>>42
So the reason to go bottom up is to have a simple model for reducing/constructing whatever language you want. Which I addressed in >>37, and I don't feel like repeating here.
As for space/time complexity intuitions... name dropping it and some examples will be enough to achieve that little understanding. It's basically what SICP did, in Scheme.
Name:
Anonymous2011-08-23 19:13
>>43
Quit with the hiring you faggotry. It sounds stupid as hell.
>>48
I think you meant Back to joelonsoftware.com, please.
Name:
Anonymous2011-08-23 21:04
Just learn C, assembly and Common Lisp. Reading SICP somewhere inbetween those should be fine. CL is a very nice language, but I don't know if I could recommend it as someone's first language if you don't know how to set up an implementation and the editor/environment (Emacs+SLIME).
>>50
Learning assembly is stupid. Most CS depts. only have computer organization courses and the assembly used in those courses are usually assembly for computers that are designed for teaching. Ex: PEP/8.
The Warford book is actually a great book. Starts from flip flops and builds up to a whole computer.
Name:
Anonymous2011-08-23 22:28
>>55
Also, 3rd edition is best edition if you're interested. Unfortunately, it never gets to pipelining. You might want to look at Hennessey and Patterson for that.
Name:
Anonymous2011-08-24 0:23
>>53 are usually assembly for computers that are designed for teaching
Unfortunately. Something real-world but simple, like a Z80 or 8051, would've been much better.
PEP/8 PDP/8
lol.
Name:
Anonymous2011-08-24 2:09
>>48
You're right. Honestly, though, what he wrote just made me cringe and I happen to interview and hire people for programming jobs fairly often. I can just imagine the interview...
"Can you give me some pseudocode for a sort algorithm of your choosing?"
"What the fuck do I look like, some kind of nerd who cares how things get sorted? I just throw that shit into my school's super computer and hope for the best. Shit is fast as fuck, dog."
"I see... Do you plan to still have access to your school's super computer while working here?"
>>58 Honestly, though, what he wrote just made me cringe and I happen to interview and hire people for programming jobs fairly often.
Ooh I want stories of the crankiest interviewees you've ever dealt with. Pretty please?
>>59
Define "cranky." You mean like pissed off at the fact that they're being interviewed?
Name:
Anonymous2011-08-24 2:20
Jesus i didn't think this thread would go on...
Oh well.
Got a quick question. so I've been using racket on my computer and to practice I have scheme on my cell which I'm just writing trivial stuff in to help me remember it. So this is just a simple thing I wanted to know.
The chapters in the online guide I've been reading so far is telling me about different codes but doesn't go into alot of detail. so I will use this as a example.
(define a 15)
(define b 20)
(define c (if (< a 10) a (if (> a 12) (* a b) 0))
What is the 0 for at the end? I want to assume its the same idea as return 0; for c++ which pretty much just says "hey I'm done"
>>47
That's part of it but not as important as when I said to build knowledge in the most logical order ... what is happening is hidden, and shouldn't be
You kind of skipped over that.
I'll readily admit that I did not learn bottom-up, entirely. I started with BASIC, back in the day, because that's what everyone else started with. After that, I learned C and what I could do with it was so much more impressive and efficient than what I could do with BASIC. So I immediately wanted to go down to the lowest level, and did, and was frustrated that I hadn't started there in the first place. Now, when I pick up some new language that happens to be built on fifty layers of interpreters/virtual machines/.NET/mixed paradigm/whatever, I can readily see whether it's someone's pet-project garbage or actually adds something clever to programming as a whole.
Starting with Scheme is fine. Start with HTML if you want. I and others who've gone bottom-up just happen to find great peace of mind in never having to be frustrated by the "black box."
Name:
Anonymous2011-08-24 2:32
>>60
No, I meant crazy or just out of the ordinary.
>>61
Use code tags
Also, some newlines might make it a little more clear
Also, you have mismatched parenthesis
(define a 15)
(define b 20)
(define c
(if (< a 10)
a
(if (> a 12)
(* a b)
0
)
)
)
The last zero is the else block for the second if.
>>63
Hmm... I really haven't had any crazy interviewees. I guess the companies did a decent job of screening candidates. I did interview a guy for a position writing BIOS software a long time ago, and the only code he had written was this website where you could upload images and it would add a border and some text. He was so proud of how you could even choose the font and the color. He spent the entire hour doing this demo and I couldn't even get in an actual interview question.
; cfc = convert fahrenheit to celsius
; f = fahrenheit
(define (cfc f)
(* (- f 32 )
(/ 5 9)))
took me a minute to figure out how to get the math problem to work right. I didn't understand that I had to put the * at the start of the code itself. but it makes a lot of sense to me now.
Lisp is one percent inspiration, ninety-nine parentheses matching.
Name:
Anonymous2011-08-24 3:22
>>71 speaking of that. I am actually really enjoying it, I've been reading a boot on physics and I think it would be a good test to try and put the equations into lisp and see how far I get.
>>72
Lisp syntax is nothing to learn from. Learn the other shit like closures, proper scoping, macros and continuations, but for God's sake, never ever praise its fucking syntax.
>>58
Are you shitting me? There is a huge difference between knowing how your code approximately compiles down to and knowing how algorithms and datastructures. You don't have to know shit about computers to know how a sorting algorithm works. How fucking retarded can you get?
You don't have to know shit about computers to know how a sorting algorithm works.
You should know that your computer allows using "arrays" with efficient "compare" and "inplace swap" operations. A different underlying architecture such as distributed computation units operating on immutable data would call for vastly different algorithms.
Of course like a drunkard can't smell his own filth, your narrow-mindness doesn't let you notice that there even exist things that you take for granted.
Name:
Anonymous2011-08-24 10:59
>>76
Haha oh wow. You are a complete faggot. Shit like arrays and knowing the cost of your compare operation is not exactly deep stuff. And of course you do different algorithms for different system. What the fuck is wrong with you?
Not caring about how efficient your algorithm is doesn't imply that you don't know it. So fuck you.
>>77 Not caring about how efficient your algorithm is doesn't imply that you don't know it.
If you don't care how efficient your algorithm is then for you every single algorithm in CS books should be isomorphic to: iterate over all possible solutions (such as permutations of a list), break when found one that satisfies the condition (the list is sorted). Therefore there's nothing to "know" about them.
Can anyone here point this confused young man to /pr/, please? I don't know on which imageboard it's supposed to be.
Name:
Anonymous2011-08-24 12:00
>>78
you still need to describe the problem to the computer. This is basically what functional programming is. Describe the problem, ignore performance.
>>79
First of all, contrary to what homosexual neckbeards would like you to believe, that's declarative and not functional programming. Declarative programming is SQL and Prolog, for example. Functional programming combines the worst of both words: you still have to tell the computer explicitly how to find an answer, then it would execute your algorithm inefficiently.
Secondly, in the vast majority of the cases specifying the desired properties of a solution is trivial to the point of not being worth a mention.
Name:
Anonymous2011-08-24 12:36
>>80
Gawd, does your thick skull not understand the different between caring about performance in terms of seconds, and caring about performance in terms of the order (as in big-o) of the algorithm? You have to realize that it is much easier to code when you can just ignore the underlying machine and just copy what you have written down on paper. Ofcourse you should care about the general system that you program on but caring about whether the machine does in-place swap or not is just a waste of mental effort since they are both O(1) operations.
Mind, I am not denying that performance don't matter (for ex., servers and embedded systems, realtime and I wish, desktop systems) but they don't matter all that much in many fields of computer science. You should really not generalize practices in your little field to what happens in other fields.
In terms of learning, knowing how the machine works is a small part of what compute science is all about. It is mainly about algorithms and datastructures and solving real problems like computer vision, statistical analysis, linguistics and so on. These fields care about how you solve the problem, not about how fast it runs on a computer, especially when you have so much damn processing power lying around everywhere.
If you start out from the machine, students are going to feel frustrated and stuck in the machine, instead of learning about the fucking magic of computer science. The machine is really irrelevant, so programming around the machine is very boring and limiting.
>>81
Computer vision doesn't care about performance, really? I would think that something that is critical for robots to navigate some terrain would be time-sensitive. HIBT?
Name:
Anonymous2011-08-24 18:34
>>82
It a fairly big field. Yes, robots need to be efficient; they are pretty much real time systems. But there are plenty of places in cv where you don't have to care about efficiency. My point was that caring about efficiency should be the last thing you do. Not the first thing; in terms of both leaning computer science and implementing programs.
>>83
No, caring about efficiency should be the first thing you do, at the same time as you're designing the software. Thinking about it as an afterthought just leads to the sort of software we're seeing today --- bloated shit that needs more and more hardware to run.
Today's programmers could learn a thing or two from the demoscene.
>>84
His point is:
1. Design effective algorithms, in terms of time- and space-complexity, trading one of for the other if and when necessary.
2. Write code.
3. Profile.
4. Optimize sections where performance is suboptimal, considering the task at hand.
I hate code bloat as much as the next guy, but this will mostly be addressed by the first step, and when it's not, then you go diving, after you know where to look. Spending 80% of your time writing CUDA SIMD code and cycle-counting for a 'cat' replacement is a waste of time.