alexknauth
2020-5-18 16:41:40

I wish every language, whether functional or imperative, had expression-based loops similar to for/list and for/fold , which make equally as much sense functional as imperative.


laurent.orseau
2020-5-18 16:42:45

I wish every language was Racket.


massung
2020-5-18 16:46:52

Not to spill the kool-aid, but sometimes I wish Racket was a bit more CL-y. For example, I can’t stand that functions like take and drop raise exceptions when attempting to take/drop too many items instead of just gracefully working with what’s there.


alexknauth
2020-5-18 16:48:42

I especially don’t like the answers that try to say “Loops don’t make sense in a pure functional program.” Loops do make sense in a pure-functional program, as long as they’re expression-based and not statement-based / effect-based. List comprehensions, for/list, for/fold, named-let, etc. are all loops that make perfect sense functionally


laurent.orseau
2020-5-18 16:49:22

Absolutely. I do very much like my named let loops though. So flexible.


laurent.orseau
2020-5-18 16:49:36

(like cross-recursion)


laurent.orseau
2020-5-18 16:50:01

(or passing the continuation to another function)


soegaard2
2020-5-18 18:11:59

I am working on the typography (css) on my math project. Any advice?


jaz
2020-5-18 18:15:35

I am absolutely not an expert, but I’d be interested in comparing this to a version that uses a sans-serif face for both of the heading levels.


soegaard2
2020-5-18 18:17:38

Sans serif for the “1. Geometri” ? Let’s try that.


soegaard2
2020-5-18 18:20:15

This is sans serif for everything:


soegaard2
2020-5-18 18:20:58

Except the math where I don’t have a choice (MathJax 3 only has one font).


jaz
2020-5-18 18:21:59

I was thinking that the body text would stay serif. But, again, I have no idea what I’m talking about.


massung
2020-5-18 18:22:12

Looks nice. Obviously a personal preference for serif vs. sans tho


soegaard2
2020-5-18 18:23:20

@jaz It was by accident the body went sans serif :slightly_smiling_face: I’ll try to make a “sans serif headers” with “serif body” version.


soegaard2
2020-5-18 18:27:12

massung
2020-5-18 18:28:52

Not sure what you want thoughts on (just CSS, math, anything)? But some random thoughts…

• More spacing between headings and body text might be helpful • Adding “fig 1, 2, …” to the images and then referencing them in the text may be useful if the same figures are used multiple times. For example, T = 1/2 * h^2 * a references ‘a’, but the figure immediately next to it has “A” at a vertex and not a side/length. It’s obviously referencing another figure on the page, but it’s not [immediately] clear which one? • Maybe a personal preference, but it’s easier to read a/2 instead of 1/2 * a. You also won’t need parens as often (e.g. a+b+c / 2). • Is it possible to add extra padding/whitespace between = in the equations? Especially with the 1/2 ’s in there, the lines bleed a bit for those with less-than-awesome eyesight. :slightly_smiling_face:


massung
2020-5-18 18:29:39

But seriously, it looks nice. The background color is perfect and contrasts quite well. The figures to the side is wonderful. Good spacing between text and equations and figures.


soegaard2
2020-5-18 18:30:37

Thanks for the feedback. It’s just the thing I need.


massung
2020-5-18 18:32:46

One last thought, given that you have the T = ... = ... = ... in there, which shows equality. If you also have places showing simplification, be sure to do those on new lines. For example: T = ... = ... simplified = ... even more simplified = ... answer!


soegaard2
2020-5-18 18:34:09

I’ll experiment with more spacing.


soegaard2
2020-5-18 18:34:42

The “Is it possible to add extra padding/whitespace between = in the equations?” - is this due to the png? (I need to click twice on the image in Slack to get a 100% image)


soegaard2
2020-5-18 18:35:29

But do you mean space on each side of = or a different = with more vertical space between the lines in = ?


massung
2020-5-18 18:36:16

Oh. At 100% it’s definitely more legible. I meant more horizontal padding. e.g. from A=B to A = B.


massung
2020-5-18 18:36:23

But I don’t know how much control you have over the math rendering.


soegaard2
2020-5-18 18:36:53

That’s certainly doable. I am using racket-cas to convert math as s-expression into TeX, so that’s an easy change.


jaz
2020-5-18 18:37:55

I think I prefer your original version :)


soegaard2
2020-5-18 18:37:58

I agree with the a/2 and do that as default. Here it just happen to be the area of a triangle, which verbally (at least in Danish) is “half height times base” so I want the formula to read the same.


soegaard2
2020-5-18 18:38:25

That’s a result too :-)


massung
2020-5-18 18:38:37

+1. Also, cool to learn that was Danish. I had no idea (was guessing Finnish). :slightly_smiling_face:


soegaard2
2020-5-18 18:39:20

Different language lineage :slightly_smiling_face:


massung
2020-5-18 18:39:43

I know English and Russian. After that, I’m guessing. :smile:


soegaard2
2020-5-18 18:40:56

Half a year ago I binge watched: https://www.youtube.com/user/NativLang


massung
2020-5-18 18:42:30

I’ll definitely give that watch. Thanks! I love learning the etymology of words, slang, and phrases in different languages. If that gets into it, I’ll binge it as well, I think.


massung
2020-5-18 18:42:55

I also love how language is influenced by culture.


soegaard2
2020-5-18 18:46:36

For fun I have attempted to learn some French. I then noticed that quite a few words in english have two versions: one “french” and one “normal”.



soegaard2
2020-5-18 18:50:36

Were the “serif” body better than the “sans serif” body?


massung
2020-5-18 18:54:15

I personally prefer sans serif only because it’s less noise on the page. But that’s always going to be a personal preference, I think.


soegaard2
2020-5-18 18:57:20

Originally I chose “serif” to make it look “book like” and also to get the body font and math font to match - but looking at again - I am not so sure.


gknauth
2020-5-18 19:38:33

Maybe you could make it a user preference? “Hey, don’t like how it looks? Suit yourself! Here are some parameters.”


gknauth
2020-5-18 19:39:48

I think I heard long ago that the sans serif was better on the web, or maybe on mobile devices.


gknauth
2020-5-18 19:42:07

Maybe we you hover over “fig 1” you get a little preview of the figure. Then if you hold down the shift key you see the whole figure, if you release the shift key it goes back to the preview so you can see the text that mentioned fig 1.


soegaard2
2020-5-18 19:42:43

I learned that too back in the day. Reading up on it - it seems the reasoning was that serifs were terrible on screens with low resolution. Now most screens have high resolution (maybe mobiles are the exception?), so serifs aren’t in bad standing anymore.


soegaard2
2020-5-18 19:43:19

I still use sans serif for Keynote/PowerPoints for the same reason.


soegaard2
2020-5-18 20:10:38

Just found this page. The font used in the body might be a good compromise.

http://chalkdustmagazine.com/blog/is-there-a-perfect-maths-font/