Page 30 of 30 FirstFirst ... 20282930
Results 1,161 to 1,199 of 1199

Thread: Computer Science and Math and Stuff

  1. #1161
    ^^vv<><>BASTART
    Posts
    7,770
    Quote Originally Posted by Reverend Jones View Post
    What about 0⁰?
    I personally feel 1 is the most right answer, but tbh I hadn't seen the complex analysis stuff which suggests other things. So, neat article, thanks for sharing.

  2. #1162
    Thanks. It's definitely intriguing.

    I will certainly grant you that there doesn't seem to be any shortcut to learning logarithms and exponentials, though. I searched for a "proof without words", but unless you start to do something fancy with trigonometry and Euler's formula, I'm not sure there are any shortcuts to understanding.

  3. #1163
    Admiral of Awesome
    Posts
    16,863
    It might help motivate learning, at least, if you forced the class fo use a slide rule

  4. #1164
    Oh wow, that's probably just it. Slide rules are "analog computers" that you can directly experience, so you are basically learning what the logarithm "is" in the process of using one.

  5. #1165
    Even more interesting: slide rules can serve as a tactile aid to understanding not just logarithms, but ANY monotonic function (even ones that are only piecewise continuous).

    There's even a professor at UCSD who has apparently written up a paper that formalizes the mathematics of slide rules.

  6. #1166
    In addition to its overwhelming practical success as the engineer’s calculating tool, the slide rule is also an interesting theoretical object in its own right, whose mathematics is worthy of study. We have presented some of the mathematical foundations of the slide rule, culminating in a Mathematical Principle of the Slide Rule that allows one to determine what calculations become possible as a result of the simple geometrical addition of line lengths and the construction of scales based on one-dimensional graphs.

    Upon further study, one can only marvel at the wide variety of calculations made possible by the slide rule, a simple mechanical device of few moving parts, manipulated by the hand, but powered by the mind.
    .

  7. #1167
    ^^vv<><>BASTART
    Posts
    7,770
    Related rates problems are possibly the easiest type of calculus problem which people struggle with. Which is interesting since the *setup* seems to be the hard part.

  8. #1168
    Zulenglashernbracker
    Posts
    5,883
    I think I'm going to withdraw from graduate school for a few years after this spring term. My advisor is toxic and actively bad for my mental health, I'm too late in the game to switch to a functioning group (nor do I feel capable of rolling the dice again), and I feel burnt out on academia. I can return to my program within a few years without re-applying, so assuming I don't get too comfortable at whatever job(s) I end up with, I should be able to come back easily. I thought that having a good project to show my advisor, that he seems happy with, would allow us to have a functioning relationship wherein we do productive science together, but he's retracted his funding offer which was contingent on my finishing my thesis by the end of October (which I did, for the most part) without any sort of explanation to me. I have funding lined up for the spring contingent on him sticking around to be a formal advisor but work with an experimental group, but he is set on divorcing himself from any work that I do and refuses to let me continue working under other funding but remain as an advisor.

    He refuses to communicate with me, lashes out when he begins to think he might be wrong in our meetings, never offered any direction on my research in four years, and has been repeatedly saying "You need to impress me," without offering any guidance as to what would "impress" him enough to "justify my being a student of his." At this point, especially with the project I'm writing up now, I've done enough to show that I can work at the appropriate level, and yet he refuses to try to engage with me as a productive use of his time.
    I had a blog. It sucked.

  9. #1169
    Likes Kittens. Eats Fluffies
    Posts
    11,733
    Sounds pretty ****, dude. Sorry to hear that. A break sounds like a good idea if it's a viable thing to do. You say you can't switch to a functioning group this late in the game; would that change after a hiatus?

    Good luck!

  10. #1170
    Zulenglashernbracker
    Posts
    5,883
    that's my hope. 4 years in with only a single paper to show requires a lot of explanation (which I can give, but the context is a ****ty personal story). walking away with the master's, working for a few years, and trying to do something different is probably easier to explain: grad school didn't work the first time around, I worked, and I'm ready to return and finish it.
    I had a blog. It sucked.

  11. #1171
    Admiral of Awesome
    Posts
    16,863
    https://www.phoronix.com/scan.php?pa...0-bisect&num=1

    Spectre: the gift that keeps giving

  12. #1172
    Admiral of Awesome
    Posts
    16,863
    I was reading through some C++20 proposal stuff and I started thinking back to my compilers course in university.

    Compilers courses really suck.

    Let me be clear: compilers courses notoriously suck. Every student who takes a compiler course knows they suck. Instructors keep hearing the same complaint every year and the answer seems to be warning students about the difficulty of the course, as if that were the extent of the problems.

    Basically, this is my realization: CS instructors have no clue what theyíre doing. Compilers courses have nothing to do with compilers! They are actually something much closer to Applied Formal Languages, totally divorced from the pertinent topics of modern compiler development.

    The standard curriculum pisses away the first 10 weeks on parser generators, pays perhaps a week of lip service to code generation (always for some synthetic stack machine designed to make the task trivial), and the capstone project is something like a stripped down Pascal interpreter written in Bison.

    Nobody uses ****in Bison or anything else anymore. Every single non joke compiler has a hand written recursive descent parser. Because theyíre fast enough. Because theyíre easy to maintain. Because they compose. Because they give good error messages. Because they can parse any formal language. Because because because. Parser generators are super cool and people are making amazing new parser generators every year, but as far as the development tool industry is concerned they are dead.

    What should a compiler course cover? Well, um, how about the meat and potatoes of actual compiler development? We donít use stack machines, we use register machines. How do you get away calling yourself a compiler course if you donít cover something as universally important as register allocation? What about SSA representation? Modern compilers need to do semantic analysis, so whereís the material on flow analysis, modern type systems, SAT solvers and **** like that? Why not teach code generation for a real CPU? X86 is too hard, but what about MIPS? Why isnít the final project just, like, straight-up using LLVM, so your compiler might actually be useful once youíre done it?

    idgi. Itís like profs start on page one of the dragon book and recite it until they run out of time, without one second of actual thought.
    Last edited by Jon`C; 11-17-2018 at 10:17 PM.

  13. #1173
    ^^vv<><>BASTART
    Posts
    7,770
    Quote Originally Posted by Jon`C View Post
    idgi. It’s like profs start on page one of the dragon book and recite it until they run out of time, without one second of actual thought.
    .

    Yup.
    Last edited by Reid; 11-17-2018 at 10:48 PM.

  14. #1174
    I'd be interested to see how well this well-known book lives up to its title in your opinion (especially since ML is supposed to be so well suited to writing compilers in).

    Name:  compiler.png
Views: 94
Size:  100.7 KB

  15. #1175
    Hmm. Though recursive descent is mentioned reasonably early on, I still see stuff on something they are calling "ML-yacc" later on. So maybe still dated.

  16. #1176
    Admiral of Awesome
    Posts
    16,863
    Quote Originally Posted by Reverend Jones View Post
    I'd be interested to see how well this well-known book lives up to its title in your opinion (especially since ML is supposed to be so well suited to writing compilers in).

    Name:  compiler.png
Views: 94
Size:  100.7 KB
    Iíve never read that book and I havenít read the second link, but given ML is a domain specific language over algebraic types I think itís pretty obvious why ML is good for writing compilers (at least up till the mid end).

    Of course, it doesnít matter whether you learn LALR in ML or C, the algorithm doesnít change. The only difference is the pure mechanical difficulty of writing your course project, which somehow magically becomes rote, even trivial once you use a language that is suited to the task (how odd; itís almost like writing a language frontend isnít very difficult). Which suggests that maybe a compiler course shouldnít be wasting all of its time talking about it.

    That does remind me of something, though. A former employer once bought a nimble startup competitor to flesh out their static analysis offering. It turned out Ocaml was really the secret to their success - they could write new checkers or overhaul their engine in a fraction of the time as a C++ one. From what I gathered all of the acquihires ended up quitting, because management threw away their code because they liked C++ better.

    *shrug*
    Last edited by Jon`C; 11-18-2018 at 12:00 AM.

  17. #1177
    This also comes to mind (just posting for the two diagrams).

  18. #1178
    I just remembered seeing a course on compilers that I think might alleviate most of the problems that Jon`C has mentioned: Niklaus Wirth's Compiler Construction

    In particular, he gets to recursive descent parsers almost right away, on page 18:

    Regular languages are subject to the restriction that no nested structures can be expressed. Nested structures can be expressed with the aid of recursion only (see Chapter 2). A finite state machine therefore cannot suffice for the recognition of sentences of context free languages. We will nevertheless try to derive a parser program for the third example in Chapter 2, by using the methods explained in Chapter 3. Wherever the method will fail - and it must fail - lies the clue for a possible generalization. It is indeed surprising how small the necessary additional programming effort turns out to be.
    And then later, he targets a very simple RISC machine, which he defines for the purpose of the course.

    And actually, in another course, he shows you the complete source code for a tiny operating system written in Oberon. He has even implemented the entire system on an FPGA.
    Last edited by Reverend Jones; 11-18-2018 at 10:39 PM.

  19. #1179
    I think Wirth has succeeded in making the entire system simple because he designed the entire system, from language (Oberon), to compiler, to operating system, to RISC architecture, to FPGA implementation. Every piece of the system tries to be as simple as it can be, given the freedom to design said simple parts at the same time.

    Also, I heard somewhere that Wirth's test for adding an optimization to the compiler was to see first whether or not the optimization didn't actually increase the compilation time of the compiler itself. As a result, the compiler (and language) are both fast and also implemented in very few LOC.
    Last edited by Reverend Jones; 11-18-2018 at 10:39 PM.

  20. #1180
    On the other hand, I have never seen a course webpage that actually uses this stuff. It's a complete system, but one that seems to exist in isolation from the rest of the world.

  21. #1181
    Admiral of Awesome
    Posts
    16,863
    Quote Originally Posted by Reverend Jones View Post
    On the other hand, I have never seen a course webpage that actually uses this stuff. It's a complete system, but one that seems to exist in isolation from the rest of the world.
    Profs honor Wirth by using a Pascal variant for the course project. Oh, did I say honor
    him? I mean insult him, by brazenly ignoring everything he says while using him as an excuse to subject their students to a language that is cryptic and irrelevant.

  22. #1182
    Apparently, Stanford offers a "compiler" class to undergrads that doesn't even talk about parsing at all, doesn't require it as a prerequisite, and goes directly to dataflow, register allocation, and even SMT solvers, using compilers for machine learning applications (CUDA) as a motivating application.

    This seems much better, and students can learn about all the formal language theory stuff in basic "theory of computation" course.

    Not sure where an actual modern compiler course would fit in to this scheme though. Maybe just read the LLVM tutorial for making a toy language using recursive descent. I don't know how hard writing an unoptimized compiler using LLVM really is, but if it just amounts to learning a few techniques and making use of some classes provided by LLVM, then by comparison the traditional university compiler course seems rather reductionist indeed.
    Last edited by Reverend Jones; 11-19-2018 at 02:44 AM.

  23. #1183
    Quote Originally Posted by Reverend Jones View Post
    I don't know how hard writing an unoptimized compiler using LLVM really is
    wait, what am I saying. The whole point of LLVM is that you get this (optimization) pretty easily too.

  24. #1184

  25. #1185
    Admiral of Awesome
    Posts
    16,863
    In other news, earlier today the Australian government decided that nobody should buy Atlassian products anymore.

  26. #1186

  27. #1187
    Admiral of Awesome
    Posts
    16,863
    Now, keep in mind that Atlassian is an Australian company that sells closed-source software development tools. Almost every software company in the world uses something from Atlassian, even just JIRA Helpdesk running locally.

    The question you need to start asking today isnít whether the Australian government has ordered Atlassian to add backdoors into their products. Atlassian is the most successful Australian software company and a major cloud service provider. That order has been signed and the government goon is sitting in their lobby right now, waiting for the senate to pass the bill. So that isnít the question. The question you need to ask is how long it will take China or another IP disrespecting state actor to hack the backdoor.

  28. #1188
    ^^vv<><>BASTART
    Posts
    7,770
    Why are politicians so irreparably stupid when it comes to software?

  29. #1189
    Admiral of Awesome
    Posts
    16,863
    Quote Originally Posted by Reid View Post
    Why are politicians so irreparably stupid when it comes to software?
    Is that a rhetorical question?


    Politicians, like the wealthy, are superficial and atavistic. They're dealing with software the same way they've dealt with all new things: how do we own it, how do we use it to enrich and empower ourselves. They've never needed to understand anything before, and they can't be convinced that this time is different.

  30. #1190
    Admiral of Awesome
    Posts
    16,863
    Businesses are ****ing terrible at software, and they make the ****.

  31. #1191
    ^^vv<><>BASTART
    Posts
    7,770
    https://www.faception.com/

    Using machine learning to bring phrenology to the 21st century!

  32. #1192
    Admiral of Awesome
    Posts
    16,863
    Probably In-Q-Tel

  33. #1193
    Likes Kittens. Eats Fluffies
    Posts
    11,733
    We develop proprietary classifiers, each describing a certain personality type or trait such as an Extrovert, a person with High IQ, Professional Poker Player or a threats
    I'm a Low-IQ Introvert, but I'd still like to think of myself as a Threats.

  34. #1194
    Likes Kittens. Eats Fluffies
    Posts
    11,733
    Gawd, it gets better. I can find out whether any of my employees are High-IQ Professional Poker Player Terrorists.

  35. #1195
    Admiral of Awesome
    Posts
    16,863
    Apparently itís a private company headquartered in Tel Aviv. Which is collecting photographs of people. And classifying them as threats.

  36. #1196
    ^^vv<><>BASTART
    Posts
    7,770
    Quote Originally Posted by Jon`C View Post
    Apparently it’s a private company headquartered in Tel Aviv. Which is collecting photographs of people. And classifying them as threats.
    Arab-looking + angry = terrorist

  37. #1197
    Likes Kittens. Eats Fluffies
    Posts
    11,733
    If you have nothing to be angry about, you have nothing to fear.

  38. #1198
    always angry

  39. #1199
    Quote Originally Posted by saberopus View Post
    If you have nothing to be angry about, you have nothing to fear.
    This is absolutely true, since it's simply the contrapositive of the Yoda Lemma.
    Last edited by Reverend Jones; 12-11-2018 at 01:01 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •