Moderators: phlip, Moderators General, Prelates
LakatosIstvan wrote:What I would really like to do is to be able to write programs in pure hexadecimal. You know, go REALLY old-school. How would you recommend doing this on a x86 processor?
EduardoLeon wrote:This is what happens when you program in high-level languages too much before learning a REAL programming language:
http://stackoverflow.com/questions/1654425/how-do-i-convince-a-peer-that-algorithms-are-important
for(int i = 0; i < I; i++)
for(int j = 0; j < J; j++)
do_something(i, j);
for(int n = 0; n < I*J; n)
do_something(n/J, n%J);
Gears wrote:The atheists rioted after the Dutch published a blank cartoon.
EduardoLeon wrote:The first algorithm is NOOOOOOOOT O(n2). It's O(i*j).
Gears wrote:The atheists rioted after the Dutch published a blank cartoon.
EduardoLeon wrote:The first algorithm is NOOOOOOOOT O(n2). It's O(i*j).
Rysto wrote:If you're going to be programming in C or C++, learning assembly has another benefit. This may be different on Windows, but all too often I find that gdb does a terrible job at working out the value of a critical variable(this may be gcc's fault, not gdb's). When that happens, the only recourse is often to look at the disassembly and work it out from that.
Xanthir wrote:EduardoLeon wrote:The first algorithm is NOOOOOOOOT O(n2). It's O(i*j).
That depends on whether the i and j are usefully distinct numbers. If so, then O(i*j) is right. If not, then O(n^2) is correct. Without context, you definitely can't use more than 3 Os in your NOOOOOOOOT.
jroelofs wrote:Have you ever had that happen when you've compiled with "gcc -O0 -g"? I've really only seen gdb bug out over optimized code, usually when multiple variables get assigned to the same register and you are looking for something that isn't really there anymore.
EduardoLeon wrote:Xanthir wrote:EduardoLeon wrote:The first algorithm is NOOOOOOOOT O(n2). It's O(i*j).
That depends on whether the i and j are usefully distinct numbers. If so, then O(i*j) is right. If not, then O(n^2) is correct. Without context, you definitely can't use more than 3 Os in your NOOOOOOOOT.
If j is O(f(i)), then n is O(i*f(i)), and the whole algorithm, being O(i*f(i)), would also be O(n).
Gears wrote:The atheists rioted after the Dutch published a blank cartoon.
EduardoLeon wrote:Yes, but n1 and n2 are not the same thing.
Gears wrote:The atheists rioted after the Dutch published a blank cartoon.
You, sir, name? wrote:EduardoLeon wrote:Yes, but n1 and n2 are not the same thing.
That's exactly the point. But people who do not understand time complexity will not see that distinction. They see "Yay, I found an O(n) algorithm! Now my program will run faster!"
You, sir, name? wrote:EduardoLeon wrote:Yes, but n1 and n2 are not the same thing.
That's exactly the point. But people who do not understand time complexity will not see that distinction. They see "Yay, I found an O(n) algorithm! Now my program will run faster!"
I only recently tried messing with assembly thanks to availability of basic MIPS simulators/emulators (I'd like to really mess around w/ AVR and ARM), and almost always am dealing with ASP (as in VB6), Lua, PHP, Python, or BASH...and I don't get it. The second snippet is far easier to understand, but chances are they that they will both do the same things as well (if they are equivalent), unless you have the binary the compiler made out of it to prove otherwise (and then, it may be close enough that an actual test may be needed).EduardoLeon wrote:This is what happens when you program in high-level languages too much before learning a REAL programming language:
http://stackoverflow.com/questions/1654425/how-do-i-convince-a-peer-that-algorithms-are-important
cerbie wrote:I really don't think, "real languages," has jack shit to do with it. If you can understand your problem, and how your solution works, you should be able to think about it at multiple levels of abstraction, and walk through what it's doing. Then you code it. Then, you may or may not have to repeat some steps.
cerbie wrote:OTOH, I eat quiche and like merge sort.
1. What is a toy language? From your posts that have the word, "toy," in them, the only kind of language that isn't appears to be assembly, and I don't know of any assembly language that has libraries to call.EduardoLeon wrote:cerbie wrote:I really don't think, "real languages," has jack shit to do with it. If you can understand your problem, and how your solution works, you should be able to think about it at multiple levels of abstraction, and walk through what it's doing. Then you code it. Then, you may or may not have to repeat some steps.
If you can't distinguish between atomic instructions and library function calls, which often happens when you use toy languages, then you're being encouraged to write potentially inefficient programs.
littlebuddy wrote:oh gawd i had the best time learning assembly. i used professional assembly language by blum and it was fantastic; bit of a bible thumper though. definitely do it, you won't be sorry.
cerbie wrote:1. What is a toy language? From your posts that have the word, "toy," in them, the only kind of language that isn't appears to be assembly, and I don't know of any assembly language that has libraries to call.
cerbie wrote:2. "If you can't distinguish between atomic instructions and library function calls": I have no Earthly idea what you're trying to say, here. Both instructions and library function calls may be atomic or not atomic. If you don't know you're using a library, how do you to even type the name of the library and function name, or just function name, into your text editor, give it the proper parameters, have it compile, and have it give you the results you wanted?
lulzfish wrote:So what you're saying is that assembly is good for learning because there's no way to just call a library and re-use their code?
I think there is, but I don't know any assembly, so I'm actually not sure.
Not really. It's generally a build script or compiler option to make the code a bit faster loading and/or larger and/or more fragile. Even so, you're still calling a library. All you've done there, 99% of the time, is made it a bit easier for the compiler to do certain optimizations that it can't do with your program and the library as separate binaries. You're still calling a library function, and incurring all the overhead of the actual operations the library is doing.EduardoLeon wrote:cerbie wrote:1. What is a toy language? From your posts that have the word, "toy," in them, the only kind of language that isn't appears to be assembly, and I don't know of any assembly language that has libraries to call.
Actually, I statically link my object files to the OS-specific library that contains the function that dynamically calls what in Windows would be called DLLs. Isn't it awesome?
True, but unless you're using VB (I'll happily code VB6/VBA/ASP again, but I'll badmouth it all the way to the bank, too), your problem should come first. Then you decide how to take care of it based on your needs. Sometimes those needs do include giving up time or memory simplicity or efficiency so that someone else can easily work on your code, as the customer finds out they didn't like the requirements they thought they wanted. You are very expensive, compared to new servers, and workstation upgrades. O(f(g(n)) sounds great, if it works well for the problem, and makes for easy to work on code (depending on actual performance of f and g!). When and if it is too slow, go back and fix it up nicer. You don't have a problem until you code it thinking that it will be fast when n is large, and you also allow for large n--after all, O(f(g(n)) might be faster than an equivalent O(1), for small n.cerbie wrote:2. "If you can't distinguish between atomic instructions and library function calls": I have no Earthly idea what you're trying to say, here. Both instructions and library function calls may be atomic or not atomic. If you don't know you're using a library, how do you to even type the name of the library and function name, or just function name, into your text editor, give it the proper parameters, have it compile, and have it give you the results you wanted?
If you have a library function that implements a O(f(n)) algorithm, and then a program function that calls the library function O(g(n)) times, you can't expect the program function's algorithm to be O(g(n)) unless f(n) is constant. If O(g(f(n))) seems like too much for you, then consider another algorithm. In ordinary words, that means that you shouldn't call a complex library function so much.
My thesis is that having an intuitive understanding of a problem makes it easier to solve than trying to hack together a solution. f(X,Y,Z) -> { Q,W,E, {R,T} } is not something bound by programming language. However, if, "let's make the SQL DB OO, with no natural info, then wrap a memoizing lazy XML queue around standard <imperative language> built-in functions, and it will save us time and make it work really fast," I have a feeling that learning assembly will not save you. You need to know your problem, know your solution to said problem (or admit that you don't, and work from there), and know your tools (or admit that you don't, and learn).My thesis is that these ideas can be more easily learnt if you program in assembly. Other languages reward you so much for hacking a solution that "does the job, period."
cerbie wrote:Still: what makes a language a toy language?
cerbie wrote:Sometimes those needs do include giving up time or memory simplicity or efficiency so that someone else can easily work on your code, as the customer finds out they didn't like the requirements they thought they wanted. You are very expensive, compared to new servers, and workstation upgrades.
cerbie wrote:On my bloody Halloween prop hand, though, even in high level languages, you can do things that are scary, just like in lower-level ones. CakePHP comes to mind. After about 15 minutes looking over some the code, I got frightened, and hope to never use it.
cerbie wrote:However, if, "let's make the SQL DB OO, with no natural info, then wrap a memoizing lazy XML queue around standard <imperative language> built-in functions, and it will save us time and make it work really fast," I have a feeling that learning assembly will not save you.
Disregarding that modern fat CPUs don't even force you to know that...much of what makes something a, "toy," can be quite the feature. You can run, and get the same results, from something on a ARM, Alpha, x86_64, IA64, or whatever else, without writing that code again for it. As long as any performance hit in changing is minor, and does not hurt possible scaling out, it's generally considered better than a tweaked solution based on udnerstanding how one platform's inner workings do their thing.EduardoLeon wrote:cerbie wrote:Still: what makes a language a toy language?
The fact you don't need to understand how the computer computes your programs.
A meager salary is generally reality. For many of us, we aren't told to make our code run as fast as possible, but to get the work done as fast as possible (within reason), and as easy to work on as possible--customers have a habit of not knowing what they want, and then not saying what they actually want when they do know itcerbie wrote:Sometimes those needs do include giving up time or memory simplicity or efficiency so that someone else can easily work on your code, as the customer finds out they didn't like the requirements they thought they wanted. You are very expensive, compared to new servers, and workstation upgrades.
I am often told to make my programs as fast as possible. And I am not very expensive, my salary is meagre.
In the sense of mathematically looking at the problem, no. The problem ends up fairly simple. It's that there is some idea that everything must be done, everything must be integrated, and if what appears an ideal processing or data model isn't well supported, it could be hammered into place, anyway, rather than using the strengths of the supported tools. Also, it seems that there is a plague of people who think IO is free, or is a negligible bottleneck.What can be so complicated about web application frameworks? It can be long, poorly engineered and implemented, but it cannot be complicated. In fact, nothing is actually complicated, unless you are designing heuristics to solve NP-hard problems.cerbie wrote:On my bloody Halloween prop hand, though, even in high level languages, you can do things that are scary, just like in lower-level ones. CakePHP comes to mind. After about 15 minutes looking over some the code, I got frightened, and hope to never use it.
Nor I that you were saying it was. Rather, that knowing some assembly is so far disconnected from many kinds of programming issues, which are very high level, that it won't help. That it is mental laziness, and/or misplaced goals, that makes the slowness and the bloat, rather than insulation from the machine code. However, I would certainly hope that the guys implementing the <imperative language>, networking, and the DB engine, could bootstrap a few computer architecturescerbie wrote:However, if, "let's make the SQL DB OO, with no natural info, then wrap a memoizing lazy XML queue around standard <imperative language> built-in functions, and it will save us time and make it work really fast," I have a feeling that learning assembly will not save you.
The question was not whether assembly is the universal solution, nor my arguments were suggesting that.
cerbie wrote:As long as any performance hit in changing is minor, and does not hurt possible scaling out, it's generally considered better than a tweaked solution based on udnerstanding how one platform's inner workings do their thing.
cerbie wrote:If time to service a request is a real problem, then hardware being cheap or expensive doesn't matter.
cerbie wrote:Also, it seems that there is a plague of people who think IO is free, or is a negligible bottleneck.
cerbie wrote:That it is mental laziness, and/or misplaced goals, that makes the slowness and the bloat, rather than insulation from the machine code.
EduardoLeon wrote:cerbie wrote:As long as any performance hit in changing is minor, and does not hurt possible scaling out, it's generally considered better than a tweaked solution based on udnerstanding how one platform's inner workings do their thing.
It depends on how much you think "minor" should be.cerbie wrote:If time to service a request is a real problem, then hardware being cheap or expensive doesn't matter.I can smell Ruby fanboyism in the air. It smells like the nuts of someone who hasn't had a shower.(On a second thought, I realized I should be more polite.) Really? That's not what the customer I'm working for says.cerbie wrote:Also, it seems that there is a plague of people who think IO is free, or is a negligible bottleneck.
IO is obviously a major bottleneck, taking in consideration the relative speed of peripherals compared to processors and RAM memories. The solution is to perform other tasks while one specific task is "stuck" with IO. This is why a Real Programmer must grok threads and parallelism in general. And, no, the OS takes care of that is not a valid answer.cerbie wrote:That it is mental laziness, and/or misplaced goals, that makes the slowness and the bloat, rather than insulation from the machine code.
Assembly is the best way to get rid of mental laziness.
mov eax,0
xor eax,eax
Earlz wrote:EduardoLeon wrote:cerbie wrote:As long as any performance hit in changing is minor, and does not hurt possible scaling out, it's generally considered better than a tweaked solution based on udnerstanding how one platform's inner workings do their thing.
It depends on how much you think "minor" should be.cerbie wrote:If time to service a request is a real problem, then hardware being cheap or expensive doesn't matter.I can smell Ruby fanboyism in the air. It smells like the nuts of someone who hasn't had a shower.(On a second thought, I realized I should be more polite.) Really? That's not what the customer I'm working for says.cerbie wrote:Also, it seems that there is a plague of people who think IO is free, or is a negligible bottleneck.
IO is obviously a major bottleneck, taking in consideration the relative speed of peripherals compared to processors and RAM memories. The solution is to perform other tasks while one specific task is "stuck" with IO. This is why a Real Programmer must grok threads and parallelism in general. And, no, the OS takes care of that is not a valid answer.cerbie wrote:That it is mental laziness, and/or misplaced goals, that makes the slowness and the bloat, rather than insulation from the machine code.
Assembly is the best way to get rid of mental laziness.
Ruby fanboyism? I'm a fan of Ruby and I like low level programming, whats bad about Ruby? It's an interpreted language, as such it's slower than a (most) compiled language. It's beautiful to code in, but I wouldn't say you should put it in time critical applications, or that you should use it alone(It's apparently easy to extend with C)
Assembly is not the best way to get rid of mental laziness, it's just a way to focus on something else than the real problem.
So while your replacing
- Code: Select all
mov eax,0
with
- Code: Select all
xor eax,eax
I'll be programming on a *real* problem.
Earlz wrote:Ruby fanboyism? I'm a fan of Ruby and I like low level programming, whats bad about Ruby? It's an interpreted language, as such it's slower than a (most) compiled language. It's beautiful to code in, but I wouldn't say you should put it in time critical applications, or that you should use it alone(It's apparently easy to extend with C)
Earlz wrote:Assembly is not the best way to get rid of mental laziness, it's just a way to focus on something else than the real problem.
So while your replacing (...) I'll be programming on a *real* problem.
LakatosIstvan wrote:Now that's just plain mean
It's nice to see what a controversial thread I've started. Who knows what terror I might unleash in the Religious Wars section.
LakatosIstvan wrote:Since we're talking about programming and how to get rid of mental laziness, I'd like to hear some of your opinion on lambda calculus, If learning to use it would turn into a benefit like assembly would?
And that depends on computing/IO power available, and what needs doing. <march> assembly will let you do it faster than C, C will let you do it faster than Java, and currently, Java or Haskell will probably do whatever it is faster than anything else, ATM.EduardoLeon wrote:It depends on how much you think "minor" should be.cerbie wrote:As long as any performance hit in changing is minor, and does not hurt possible scaling out, it's generally considered better than a tweaked solution based on udnerstanding how one platform's inner workings do their thing.
Probably. I don't get what is supposed to be so great or special about it. I don't see why you think it's so bad, either, though. However, how did Ruby even come up? I generally don't think of Ruby when I think of high throughput and/or low latency.cerbie wrote:If time to service a request is a real problem, then hardware being cheap or expensive doesn't matter.I can smell Ruby fanboyism in the air. It smells like the nuts of someone who hasn't had a shower.(On a second thought, I realized I should be more polite.)
So, your customer has an infinite budget and no deadlines?Really? That's not what the customer I'm working for says.
I'm talking about cases like hundreds of HDD accesses (the OS+FS buffers, you know) or network transactions per second, when one or two would suffice, and also significantly reduce CPU/RAM time-wasting. I'm amazed that some of the things I've seen ever worked at all.cerbie wrote:Also, it seems that there is a plague of people who think IO is free, or is a negligible bottleneck.
IO is obviously a major bottleneck, taking in consideration the relative speed of peripherals compared to processors and RAM memories. The solution is to perform other tasks while one specific task is "stuck" with IO. This is why a Real Programmer must grok threads and parallelism in general.
Well, that depends. If you can make generic flexible worker processes/threads, and don't rely on very fast responses from pipes, sockets, etc., the OS pretty much will do it for you (don't expect miracles from Windows, though, even then). The real trick is figuring out what you are doing that can take advantage it enough to be worth implementing it.And, no, the OS takes care of that is not a valid answer.
It's a good way to never get anything high level done, too. For a crappy metaphor, it's lazy to cook with a microwave oven. It's not lazy to cook without worrying about how to craft the knife you are using.cerbie wrote:That it is mental laziness, and/or misplaced goals, that makes the slowness and the bloat, rather than insulation from the machine code.
Assembly is the best way to get rid of mental laziness.
cerbie wrote:Probably. I don't get what is supposed to be so great or special about it. I don't see why you think it's so bad, either, though. However, how did Ruby even come up? I generally don't think of Ruby when I think of high throughput and/or low latency.
cerbie wrote:So, your customer has an infinite budget and no deadlines?
cerbie wrote:I'm talking about cases like hundreds of HDD accesses (the OS+FS buffers, you know) or network transactions per second, when one or two would suffice, and also significantly reduce CPU/RAM time-wasting. I'm amazed that some of the things I've seen ever worked at all.
cerbie wrote:If you're putting an implicit POSIX in front of threads, I have yet to grok them, and have no intentions of trying. IMO, Java got threads right (and you won't find me saying much else friendly about Java).
cerbie wrote:Well, that depends. If you can make generic flexible worker processes/threads, and don't rely on very fast responses from pipes, sockets, etc., the OS pretty much will do it for you (don't expect miracles from Windows, though, even then). The real trick is figuring out what you are doing that can take advantage it enough to be worth implementing it.
cerbie wrote:EduardoLeon wrote:Assembly is the best way to get rid of mental laziness.
It's a good way to never get anything high level done, too. For a crappy metaphor, it's lazy to cook with a microwave oven. It's not lazy to cook without worrying about how to craft the knife you are using.
EduardoLeon wrote:cerbie wrote:Probably. I don't get what is supposed to be so great or special about it. I don't see why you think it's so bad, either, though. However, how did Ruby even come up? I generally don't think of Ruby when I think of high throughput and/or low latency.
Well, in my mind, Ruby programming is an insult. Perhaps if the language's maker(s) tried to make it a bit less human and a bit more strict, it wouldn't suffer from the horrible performance problems that make it so impossible to use for anything big. It's actually a shame, because the platforms made for it are rather nice.cerbie wrote:So, your customer has an infinite budget and no deadlines?
Not actually. They force me to write fast programs using a limited budget, which means that I am cheap. (Perhaps if I worked as a whore I would make more money from my effort.) As for deadlines, well, there is not such a thing as a meaningful deadline here. Consultancy firms promise the impossible and customers don't engage in software development projects if consultancy firms only promise what is possible.cerbie wrote:I'm talking about cases like hundreds of HDD accesses (the OS+FS buffers, you know) or network transactions per second, when one or two would suffice, and also significantly reduce CPU/RAM time-wasting. I'm amazed that some of the things I've seen ever worked at all.
If you are a decent assembly programmer, then you have a solid background to predict and deal with those situations, even if you're not using assembly. Programmers who have never been exposed to assembly usually have to wait until slow response times happen in the test phase.cerbie wrote:If you're putting an implicit POSIX in front of threads, I have yet to grok them, and have no intentions of trying. IMO, Java got threads right (and you won't find me saying much else friendly about Java).
Why? Manually doing threads is awesome! It's particularly exciting in Windows, because its threading system is broken and you have to deal with that fact.cerbie wrote:Well, that depends. If you can make generic flexible worker processes/threads, and don't rely on very fast responses from pipes, sockets, etc., the OS pretty much will do it for you (don't expect miracles from Windows, though, even then). The real trick is figuring out what you are doing that can take advantage it enough to be worth implementing it.
What a pity! Windows is omnipresent here. To make it worse, SQL Server is omnipresent here as well. Linux sysadmins and Oracle DBAs are particularly expensive.cerbie wrote:EduardoLeon wrote:Assembly is the best way to get rid of mental laziness.
It's a good way to never get anything high level done, too. For a crappy metaphor, it's lazy to cook with a microwave oven. It's not lazy to cook without worrying about how to craft the knife you are using.
Yes, it's a crappy metaphor.
Hectamatatortron wrote:We JUST went over how Boron, Arsenic and Silicon mixtures can be used to make transistors in Computer Architecture.
Get out of my head, Earlz.
Gears wrote:The atheists rioted after the Dutch published a blank cartoon.
*shrug* Maybe a follow-on will fix those things. The second mouse gets the cheese.EduardoLeon wrote:cerbie wrote:Probably. I don't get what is supposed to be so great or special about it. I don't see why you think it's so bad, either, though. However, how did Ruby even come up? I generally don't think of Ruby when I think of high throughput and/or low latency.
Well, in my mind, Ruby programming is an insult. Perhaps if the language's maker(s) tried to make it a bit less human and a bit more strict, it wouldn't suffer from the horrible performance problems that make it so impossible to use for anything big. It's actually a shame, because the platforms made for it are rather nice.
My point is that TANSTAAFL. Not everyone wants a fast program, v. a program written in shorter time, v. a program that is easy to maintain, v. pointy-haired bosses wanting things used that contain buzzwordscerbie wrote:So, your customer has an infinite budget and no deadlines?
Not actually. They force me to write fast programs using a limited budget, which means that I am cheap. (Perhaps if I worked as a whore I would make more money from my effort.) As for deadlines, well, there is not such a thing as a meaningful deadline here. Consultancy firms promise the impossible and customers don't engage in software development projects if consultancy firms only promise what is possible.
If you're a decent programmer, learn your tools, and understand your own limitations, you can do that without knowing assembly. I still don't get how assembly has anything to do with that.cerbie wrote:I'm talking about cases like hundreds of HDD accesses (the OS+FS buffers, you know) or network transactions per second, when one or two would suffice, and also significantly reduce CPU/RAM time-wasting. I'm amazed that some of the things I've seen ever worked at all.
If you are a decent assembly programmer, then you have a solid background to predict and deal with those situations, even if you're not using assembly. Programmers who have never been exposed to assembly usually have to wait until slow response times happen in the test phase.
I'd rather be working on my data than fighting the platform (that's one thing I have against both Windows and Java).cerbie wrote:If you're putting an implicit POSIX in front of threads, I have yet to grok them, and have no intentions of trying. IMO, Java got threads right (and you won't find me saying much else friendly about Java).
Why? Manually doing threads is awesome! It's particularly exciting in Windows, because its threading system is broken and you have to deal with that fact.
SQL Server is actually nice, just lacking a bit in DRI. I'd rather use it than MySQL. I don't even want to think about Oracle, though. I went through the, "I should probably learn about Oracle," phase, and basically found it to represent everything I hate in software. I'm itching to professionally work with Postgres, though, especially in a many-server environment.cerbie wrote:Well, that depends. If you can make generic flexible worker processes/threads, and don't rely on very fast responses from pipes, sockets, etc., the OS pretty much will do it for you (don't expect miracles from Windows, though, even then). The real trick is figuring out what you are doing that can take advantage it enough to be worth implementing it.
What a pity! Windows is omnipresent here. To make it worse, SQL Server is omnipresent here as well. Linux sysadmins and Oracle DBAs are particularly expensive.
At least I'm honestcerbie wrote:EduardoLeon wrote:Assembly is the best way to get rid of mental laziness.
It's a good way to never get anything high level done, too. For a crappy metaphor, it's lazy to cook with a microwave oven. It's not lazy to cook without worrying about how to craft the knife you are using.
Yes, it's a crappy metaphor.
Earlz wrote:@ruby
A bit less human readable? Thats the entire point! A language that is natural to program in. (...) Have you ever stopped to think that the great platforms are great because of the language support?
cerbie wrote:*shrug* Maybe a follow-on will fix those things. The second mouse gets the cheese.
Earlz wrote:@deadlines
Most customers can handle if there page requests are 2ms slower, and would be willing to pay you the same amount(for half of your time. You could always implement an assembly CGI and it'll be damn fast, but really? What is the point?)
cerbie wrote:My point is that TANSTAAFL. Not everyone wants a fast program, v. a program written in shorter time, v. a program that is easy to maintain, v. pointy-haired bosses wanting things used that contain buzzwords. (...)
Earlz wrote:@threading
I like how Posix threads work. They seem like home to me... And I would much rather get a seg fault than the fun error of "This object can only be modified by the thread that created it" Come on C#, you can give the programmer a tiny bit more control can't you?
cerbie wrote:I'd rather be working on my data than fighting the platform (that's one thing I have against both Windows and Java).
Earlz wrote:@IO
I don't think assembly will ever help with predicting which SQL queries run the fastest. Disk IO, maybe.. but still I don't think assembly really helps with understanding the latency of IO
cerbie wrote:If you're a decent programmer, learn your tools, and understand your own limitations, you can do that without knowing assembly. I still don't get how assembly has anything to do with that.
cerbie wrote:SQL Server is actually nice, just lacking a bit in DRI. I'd rather use it than MySQL. I don't even want to think about Oracle, though. I went through the, "I should probably learn about Oracle," phase, and basically found it to represent everything I hate in software. I'm itching to professionally work with Postgres, though, especially in a many-server environment.
Earlz wrote:@metaphor
I shouldn't have to understand how the silicon in an OR gate chip works and selectively conducts electricity in order to use an OR operation in a circuit, Nor should I concern myself with the exact mixture of doped silicon and whatever else goes into an OR gate.
Syntactic sugar can be good. It's what it gets turned into upon compilation that can make for problems.EduardoLeon wrote:Earlz wrote:@ruby
A bit less human readable? Thats the entire point! A language that is natural to program in. (...) Have you ever stopped to think that the great platforms are great because of the language support?cerbie wrote:*shrug* Maybe a follow-on will fix those things. The second mouse gets the cheese.
They could start getting rid of features that make the Ruby grammar more difficult to understand, such as "expression if condition", "unless", and other "clever" "syntactic sugar." Or they could throw the whole language out of the window and reuse the concepts invented in the most popular frameworks for it.
If I didn't think that, I'd have called you an idiot, liar, or troll. Windows' handling of threading can piss me off with freaking Python, when the same code does what I think it should, after rebooting into Linux.cerbie wrote:I'd rather be working on my data than fighting the platform (that's one thing I have against both Windows and Java).
I thought everyone could figure out I was joking when I said I liked Windows threads because they were exciting.
The nice thing is that you can basically do this:.NET and Java don't make reality nicer with their "security," they just make new barriers I must get around.
new ThreadManager TM
for NumOfVisibleCores:
new MyWork DoStuff (MyWork extends thread, among other things)
TM.addThread (DoStuff);
...
if WorkNeedsDoing:
t = TM.getWaitingThread ()
if t:
t.run (DoStuff.Copy (whatever)) // this should add a merge request to a queue for some other thread, when done, if sharing data
else
TM.ImWaiting = trueTrue, but being able to not care about your target is often a goal in itself, and a big reason for the success of Python and PHP, in particular (Java tries, but being one of the first, how it sometimes doesn't do it well will let future attempts succeed better). One of the main ideas is that you can worry about the interpreter and peripherals (well, the idea is not to, but reality sets in, and then...), and everything else gets taken care of. I've personally fixed very bad code from people who thought they knew what was going on underneath, and tried to use that false knowledge, rather than see how well recommended methods work. Forward-looking, I'd like to see a yacc-or-similar->generic cross-platform runtime spec->VM layer chain for language implementation building, to replace current interpreters.cerbie wrote:@IO
I don't think assembly will ever help with predicting which SQL queries run the fastest. Disk IO, maybe.. but still I don't think assembly really helps with understanding the latency of IOcerbie wrote:If you're a decent programmer, learn your tools, and understand your own limitations, you can do that without knowing assembly. I still don't get how assembly has anything to do with that.
If you program taking your specific hardware into consideration, your programs can perform better than if you don't.
Was it an RDBMS (Oracle did make one for a bit, IIRC) or an SQL DBMS or a Oracle VM with SQL-compliant tables? SQL Server and MySQL, FI, have no provisions for relational databases, and require you to use sprocs, triggers, application-layer logic, etc., to do the jobs that basic constraints should do, becoming long-term nightmares for data integrity. Oracle makes it easy to get into its guts (not being able to do that should be a feature). That helps make it so scalable, sure, but also gives such DBAs full time jobs, and not in a good way. Postgres has ways to get around that for scaling out, and allows a well-normalized (>=3NF w/ mostly DRI) DB to be partitioned out fairly logically, which is one reason I'd like to be able to work with it in such environments.cerbie wrote:SQL Server is actually nice, just lacking a bit in DRI. I'd rather use it than MySQL. I don't even want to think about Oracle, though. I went through the, "I should probably learn about Oracle," phase, and basically found it to represent everything I hate in software. I'm itching to professionally work with Postgres, though, especially in a many-server environment.
Oracle is the best RDBMS I have used, period. It's powerful, flexible, scalable, etc. I feel sorry for the poor DBA, though; he looks like a nerd who knows nothing about anything else in real life.
cerbie wrote:Syntactic sugar can be good. It's what it gets turned into upon compilation that can make for problems.
cerbie wrote:If I didn't think that, I'd have called you an idiot, liar, or troll. Windows' handling of threading can piss me off with freaking Python, when the same code does what I think it should, after rebooting into Linux.
cerbie wrote:(...) 100 lines in Java is like 5 lines in any language I might really like.
cerbie wrote:True, but being able to not care about your target is often a goal in itself, and a big reason for the success of Python and PHP, in particular (...). One of the main ideas is that you can worry about the interpreter and peripherals (...), and everything else gets taken care of.
cerbie wrote:Was it an RDBMS (Oracle did make one for a bit, IIRC) or an SQL DBMS or a Oracle VM with SQL-compliant tables? SQL Server and MySQL, FI, have no provisions for relational databases, and require you to use sprocs, triggers, application-layer logic, etc., to do the jobs that basic constraints should do, becoming long-term nightmares for data integrity. Oracle makes it easy to get into its guts (not being able to do that should be a feature). That helps make it so scalable, sure, but also gives such DBAs full time jobs, and not in a good way. Postgres has ways to get around that for scaling out, and allows a well-normalized (>=3NF w/ mostly DRI) DB to be partitioned out fairly logically, which is one reason I'd like to be able to work with it in such environments.
You, who can think, define what needs to get done and the computer, which can't think, finds out how?!?!?! Have you ever considered being a manager?!?!?!
((MyEditBoxControl)((ControlListClass)controls)["MyControl"]).Text
int rid=(int)(decimal)SqlCommand.ExecuteScalar();
Users browsing this forum: No registered users and 3 guests