Massassi Forums Logo

This is the static archive of the Massassi Forums. The forums are closed indefinitely. Thanks for all the memories!

You can also download Super Old Archived Message Boards from when Massassi first started.

"View" counts are as of the day the forums were archived, and will no longer increase.

ForumsDiscussion Forum → Computer Science and Math and Stuff
1234567891011121314151617181920212223242526272829303132333435
Computer Science and Math and Stuff
2018-11-01, 11:08 PM #1161
Originally posted by Reverend Jones:
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.
2018-11-01, 11:22 PM #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.
2018-11-03, 4:22 PM #1163
It might help motivate learning, at least, if you forced the class fo use a slide rule
2018-11-03, 7:14 PM #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.
2018-11-03, 7:55 PM #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.
2018-11-03, 8:04 PM #1166
Quote:
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.


.
2018-11-07, 3:14 PM #1167
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.
2018-11-13, 8:43 AM #1168
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.
2018-11-13, 9:00 AM #1169
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!
2018-11-13, 9:45 AM #1170
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.
2018-11-17, 10:54 AM #1171
https://www.phoronix.com/scan.php?page=article&item=linux-420-bisect&num=1

Spectre: the gift that keeps giving
2018-11-17, 7:14 PM #1172
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.
2018-11-17, 7:45 PM #1173
Originally posted by Jon`C:
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.
2018-11-17, 8:08 PM #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).

2018-11-17, 8:28 PM #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.
2018-11-17, 8:57 PM #1176
Originally posted by Reverend Jones:
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).



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*
2018-11-17, 9:21 PM #1177
This also comes to mind (just posting for the two diagrams).
2018-11-18, 7:18 PM #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:

Quote:
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.
2018-11-18, 7:22 PM #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.
2018-11-18, 7:23 PM #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.
2018-11-18, 8:42 PM #1181
Originally posted by Reverend Jones:
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.
2018-11-18, 11:41 PM #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.
2018-11-18, 11:49 PM #1183
Originally posted by Reverend Jones:
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.
2018-11-28, 11:18 PM #1184
https://www.theatlantic.com/education/archive/2018/11/anxiety-depression-mental-health-graduate-school/576769/

:)
2018-12-06, 7:06 AM #1185
In other news, earlier today the Australian government decided that nobody should buy Atlassian products anymore.
2018-12-06, 9:05 AM #1186
https://mobile.twitter.com/alfiedotwtf/status/1070047303275175936
2018-12-06, 9:16 AM #1187
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.
2018-12-06, 10:09 AM #1188
Why are politicians so irreparably stupid when it comes to software?
2018-12-06, 10:58 AM #1189
Originally posted by Reid:
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.
2018-12-06, 11:00 AM #1190
Businesses are ****ing terrible at software, and they make the ****.
2018-12-10, 11:56 AM #1191
https://www.faception.com/

Using machine learning to bring phrenology to the 21st century!
2018-12-10, 12:03 PM #1192
Probably In-Q-Tel
2018-12-10, 12:08 PM #1193
Quote:
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.
2018-12-10, 12:11 PM #1194
Gawd, it gets better. I can find out whether any of my employees are High-IQ Professional Poker Player Terrorists.
2018-12-10, 12:15 PM #1195
Apparently it’s a private company headquartered in Tel Aviv. Which is collecting photographs of people. And classifying them as threats.
2018-12-10, 3:24 PM #1196
Originally posted by Jon`C:
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
2018-12-10, 5:58 PM #1197
If you have nothing to be angry about, you have nothing to fear.
2018-12-10, 9:53 PM #1198
always angry
2018-12-10, 9:56 PM #1199
Originally posted by saberopus:
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.
2018-12-18, 12:28 PM #1200
Libertarian techbro hand-wringing about patent trolls makes me positively turgid.

What was that? Oh, a non-practicing entity? Someone who makes money from something just because they own it, even though they did nothing to create that property and don’t do any of the real work to use that property? And you have a problem with that? Huh weird
1234567891011121314151617181920212223242526272829303132333435

↑ Up to the top!