Our server costs ~$56 per month to run. Please consider donating or becoming a Patron to help keep the site running. Help us gain new members by following us on Twitter and liking our page on Facebook!
Current time: April 20, 2024, 4:03 am

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Custom error message for stack overflow in C++
#41
RE: Custom error message for stack overflow in C++
(September 16, 2021 at 2:16 pm)FlatAssembler Wrote: What do you guys here think about using `?:` in lvalues, that is, on the left-hand-side of the assignment operator? I have added support for that to my programming language: https://flatassembler.github.io/AEC_spec...l_operator

I don't like using a ternary operator in an lvalue.  It makes the code hard to read, and I rarely encounter a situation where it would be useful.
Reply
#42
RE: Custom error message for stack overflow in C++
(September 16, 2021 at 2:22 pm)HappySkeptic Wrote:
(September 16, 2021 at 2:16 pm)FlatAssembler Wrote: What do you guys here think about using `?:` in lvalues, that is, on the left-hand-side of the assignment operator? I have added support for that to my programming language: https://flatassembler.github.io/AEC_spec...l_operator

I don't like using a ternary operator in an lvalue.  It makes the code hard to read, and I rarely encounter a situation where it would be useful.

I don't know if it makes code significantly harder to read than ternary operators in expressions do. Do you think it does? Ternary operators in expressions, if used improperly, can make the code significantly harder to read, but that is not a reason for a language not to support them.

By the way, what do you think about what I wrote today in the introduction to the documentation for my programming language:
https://flatassembler.github.io/AEC_spec...troduction Wrote:I have also always been interested in languages, both natural and artificial (such as programming languages), and making a programming language will certainly give me a lot better insight into how programming languages really work. That is not quite true for natural languages: if you try to make your own constructed language to be spoken by humans (similar to Esperanto), and you do not know about consecutio temporum, you will most likely not specify how consecutio temporum is supposed to work in your language and you will probably not even realize your grammar has a hole in its specification (you will assume it is understood by itself it will be done the same way as in your native language, thinking, like I used to think before learning about consecutio temporum in English, that the way tenses are put together in complex sentences in your native language is based on logic, rather than that the rules for that are essentially-arbitrary). But it is true that making a programming language gives you a special insight into how programming languages, and computers in general, work. Especially if you are writing everything yourself (like I am doing), rather than using frameworks for tokenizing, parsing and compiling.
Reply
#43
RE: Custom error message for stack overflow in C++
That website make me want to burn my eyes out with battery acid.
Why is it so?
~Julius Sumner Miller
Reply
#44
RE: Custom error message for stack overflow in C++
Modern compilers impose no penalty for terniary operators in lvals. So long as it's implemented intelligently, it's just a matter of taste.
[Image: extraordinarywoo-sig.jpg]
Reply
#45
RE: Custom error message for stack overflow in C++
(September 16, 2021 at 6:38 pm)Angrboda Wrote: Modern compilers impose no penalty for terniary operators in lvals.  So long as it's implemented intelligently, it's just a matter of taste.

Well, here is how I implemented it: https://github.com/FlatAssembler/AECforW...r.cpp#L861

(September 16, 2021 at 6:13 pm)Spongebob Wrote: That website make me want to burn my eyes out with battery acid.

Well, here is the CSS: https://github.com/FlatAssembler/AECforW...n.html#L14
Maybe you can fork me on GitHub to improve it?
Reply
#46
RE: Custom error message for stack overflow in C++
[quote pid='2062233' dateline='1631832331']

(September 16, 2021 at 6:13 pm)Spongebob Wrote: That website make me want to burn my eyes out with battery acid.

Well, here is the CSS: https://github.com/FlatAssembler/AECforW...n.html#L14
Maybe you can fork me on GitHub to improve it?
[/quote]

I'm not that well acquainted with CSS or github to be proficient.  But you should put code aside for a moment and consider the aesthetics of your site.  Presentation is NOT over rated.  Just look at any well designed website and compare it to yours.  I tried browsing your site for a while but the poor organization, design, colors, just everything was totally off-putting, like walking through one of those funhouse tunnels that makes you think you're spinning.  Content is your message, but presentation is your language (oh, that ties back to your original question, how cool Cool ).  Even if you're trying to tell me something really important but you're creaming it and using crazy adjectives, I'm not likely to get the message.

Just a comment on your content.  On the pseudoscience page, you have a gigantic text box filled with information with god-awful spacing, punctuation and grammar, but since English is not your 1st language, I guess that's an excuse?  I can't be too critical because I can only speak English and a smattering of Spanish.  But having accurate grammar is key to communicating, I can tell you that.  You start off pretty well, but then you spin out of control trying to explain what pseudo science is and why it is so widespread.  I see some meaningful information here and a lot that is misleading.  While I applaud your effort, I suggest that you could improve the message quite a bit.

Next, you have this little animated insert on the right side of the text box that demonstrates the Pythagorean theorem.  Cute, but underneath you have this text:
Quote:Do you know how, for example, the mathematicians know the Pythagorean Theorem is correct? In school, we aren't taught how scientists know what they know.
I understand you were educated in Croatia.  Perhaps they don't teach you this in Croatia; they do in the US.  Maybe not so well in grade school but much more so in college.  Whenever a scientific theory is taught, the experiments that support it are part of the lesson.  But again, this is all part of having a well targeted message.  You need to have a well defined point and use only examples that communicate that point.  If you have multiple points, then you are going to have to break it up into chapters or segments.  5,000 words on a single point is too much.
To summarize: your website needs improvement in design, grammar, basic writing skills.
Why is it so?
~Julius Sumner Miller
Reply
#47
RE: Custom error message for stack overflow in C++
(September 16, 2021 at 6:38 pm)Angrboda Wrote: Modern compilers impose no penalty for terniary operators in lvals.  So long as it's implemented intelligently, it's just a matter of taste.

This.

Profile your code then worry about optimizations later. I for one appreciate the terseness of ternary operators.
Reply
#48
RE: Custom error message for stack overflow in C++
Spongebob Wrote:I'm not that well acquainted with CSS or github to be proficient.
Well, neither am I. I don't know much CSS either. And, to be honest, I am not sure if I would know how to merge a pull request on GitHub either.
Spongebob Wrote:Presentation is NOT over rated.
Really? Then how come firms for which almost nobody has heard often dominate the market? ARM does not do a lot of advertizing: it does not need to because facts that they are the best speak for themselves.
Advertizing is done by companies such as Intel and AMD, who, instead of meaningfully improving their processors, keep increasing the frequencies their processors work at and gaslighting people into thinking computers become faster because of that (when, for the vast majority of computer tasks, they are not a bottleneck, not to mention higher frequency does not necessarily mean more instructions per second on CISC architectures). Or by Kodak, who keeps increasing the resolution of their cameras pretending it increases image quality, when the evidence does not support that (higher resolution, above certain threshold, simply means more bad pixels, actually decreasing the image quality).
I'd say advertizing plays a role, but not nearly as much as people think it does. And it will definitely not help you get away with an inferior product forever. Kodak went bankrupt, Intel and AMD are significantly losing market share now that Apple has switched to ARM processors...
Spongebob Wrote:On the pseudoscience page, you have a gigantic text box filled with information with god-awful spacing, punctuation and grammar
I am not sure what you mean. How is spacing awful? How is punctuation awful? Now, for grammar, well, it is possible, I have not checked with somebody who speaks English well.
Spongebob Wrote:But having accurate grammar is key to communicating, I can tell you that.
Sure. But if you are unwilling to say something just because you are not sure it is grammatical, grammar is getting in the way, rather than helping the communication.
And how would you recommend me to improve my English? I mean, I have studied quite a bit of linguistics, I have also published some papers about it. If that is not enough, what is?
Spongebob Wrote:I see some meaningful information here and a lot that is misleading.
What do you think is misleading there? I think it is a lot less misleading than what is taught about history of science in schools.
Spongebob Wrote:Whenever a scientific theory is taught, the experiments that support it are part of the lesson.
Sometimes they are, but that is not nearly enough. If you teach only success stories from the history of science, and no stories of failure (which there are by at least an order of magnitude more), students get a heavily distorted picture of what was really going on.

By the way, I have also added multi-line strings to my programming language: https://flatassembler.github.io/AEC_spec...ne_strings
Reply
#49
RE: Custom error message for stack overflow in C++
@FlatAssembler  I'm not going to address much of what you posted because a lot of it was way off course.  You're reading way too much into what I said.  I just said that when you create a website that is, presumably, intended to communicate ideas and persuade people, making it easy and comfortable to read and navigate is a GOOD thing.  I don't know what your skillset it is regarding HTML markup, but this website reminds me of some I saw 25 years ago when the technology was relatively new and there was little concept of what constitutes a well designed web page.  Most of those are gone now, but you can get an idea from this page.  It points out a few do's and don'ts of web design.

I could list everything I don't like, but the easiest way is for you to review well designed sites and take the best practices from them.  Consider the Science based medicine website.  This is a website with highly technical content, similar to yours, with the intent to inform/persuade.  Notice how the articles use well constructed sentences and have actual spaces between paragraphs.  The navigation doesn't take up half the page and there are no distracting objects luring your eye from the text.  Graphical content is spliced into the text field to make it flow and read comfortably and has specific relevance to the subject, and graphics are all of high quality as well.  It's also heavy with links and sources to supporting references.  It doesn't matter who you are, you cannot be the expert in everything you write, so you must show where your ideas and opinions come from.  In fact, that's a common hallmark of pseudoscience, someone promoting themselves as an absolute authority and slamming everyone else as a deceiver.

Quote:Sure. But if you are unwilling to say something just because you are not sure it is grammatical, grammar is getting in the way, rather than helping the communication.

That's a strange way of looking at it.  Think of it this way, no matter what you say, if I can't understand it or if it's too confusing, your message is lost.  If not for the fact that I encountered you on this forum and you invited me to take a look at your website, I probably wouldn't have read more than two sentences.

Quote:And how would you recommend me to improve my English? I mean, I have studied quite a bit of linguistics, I have also published some papers about it. If that is not enough, what is?

That's a difficult question to answer.  You're basically asking how to become a better writer.  I suppose the obvious suggestions would be to take a creative writing class, study really good writers, read tons of books on the subject.  I can suggest a few.  Linguistics and writing skills are not the same thing.  Learning language structure means you understand how to complete full sentences.  Being a good writer is about communication, and linguistics is just one tool in your box.


Quote:What do you think is misleading there? I think it is a lot less misleading than what is taught about history of science in schools.
I don't know what schools you are referring to, but this likely isn't about something you learn in school anyway.  Here's one example I noticed:

Pseudosciences are widespread because of the way people react to nonsense: they ascribe the apparent incoherence to their own lack of knowledge.

I don't know where you got this idea but something about it is not quite right.  For one thing, there are lots of reasons why pseudoscience is so prolific.  Capitalism, poor education, politics, tribalism, fear and religion are all part of the problem.  Our federal agencies try to regulate medical treatments, but because many people distrust the government, they feel the government is withholding "real" treatments while promoting treatments that do nothing but line the pockets of pharmaceutical executives.  And I haven't even scratched the surface.  There are dense books explaining why pseudoscience is such a problem.  You simply can't adequately explain it in one sentence, so I wouldn't even try.  You can, however, demonstrate in just a sentence or two how complex and deeply rooted the problem is, as I just did.


Quote:Sometimes they are, but that is not nearly enough. If you teach only success stories from the history of science, and no stories of failure (which there are by at least an order of magnitude more), students get a heavily distorted picture of what was really going on.

Well, sure but that's not what you said.  You said the background behind scientific concepts aren't taught; in fact they are, at least here they are.  And many scientific dead ends are also taught.  Some of them have to be because those mistakes eventually led to real breakthroughs.  A great example is Big Bang Theory vs Fred Hoyle's steady state theory.  One thing that wasn't taught when I was in school or college is anything about pseudoscience.  I would like to see that improved.

I also have one question regarding your assertions about a digital universe.  If the universe really is a giant computer and we are all part of an elaborate simulation in that computer, why wouldn't that negate the importance of ethical concerns like being a vegetarian or libertarian or even a good person?
Why is it so?
~Julius Sumner Miller
Reply
#50
RE: Custom error message for stack overflow in C++
Spongebob Wrote:I don't know what your skillset it is regarding HTML markup
Well, I do not know a lot about HTML either. I do know the basics, but not nuts and bolts. Similar to how much I know CSS. I think I know JavaScript quite a bit better, but I do not know the details that are required to get a job.
Spongebob Wrote:In fact, that's a common hallmark of pseudoscience, someone promoting themselves as an absolute authority and slamming everyone else as a deceiver.
I think the vast majority of people consider people I mention as deceiver as real deceivers, or at the very least misled people. The vast majority of people think anti-vaxxers, as well as people who are denying saturated fat causes heart disease and people who are denying sugar causes type-2-diabetes, to be very misled at best. Most people also consider Flat-Earthers to be insane or not serious. Conspiracy theorists as well are not well-regarded.
OK, I suppose most people would consider Murray Rothbard to be a pseudoscientist rather than a good social scientist, but I didn't imply his social science theories were true, I just implied his idea that government collecting useless statistics causes many pseudosciences may be true.
Spongebob Wrote:I suppose the obvious suggestions would be to take a creative writing class
What is that? Never heard of that.
Spongebob Wrote:study really good writers
Like whom?
Spongebob Wrote:read tons of books on the subject
Well, that would be a lot of effort. Anyway, which would you recommend me? I have this perception that the study of what constitutes a good writing is full of pseudoscience, but I could be wrong.
Spongebob Wrote:I don't know where you got this idea but something about it is not quite right.
It is demostrably right. Computers can generate tweets about global warming denial that many people would claim are plausible.
Spongebob Wrote:Capitalism
What do you mean?
Spongebob Wrote:poor education
Arguably so, however, more education of poor quality may be counter-productive. Like I have said on my Libertarianism page:
https://flatassembler.github.io/libertarianism Wrote:And I think people making such arguments shows the failure (or success, if the real purpose of our education system is actually indoctrination) of our education system. It is easy to make people fight a hypothetical-at-best danger that is tribal warfare with governments if they do not see the real danger that are genocidal or vastly incompetent but intrusive governments. People saying stuff like that are probably thinking "Well, it is better to risk having a Holocaust once in a century than to risk having tribal warfare every day.", not realizing Holocaust was not the only major government-made tragedy of the 20th century, or even the biggest one. And people say stuff like that not only about politics.
Spongebob Wrote:politics
Arguably so, and I mentioned that multiple times.
Spongebob Wrote:but because many people distrust the government
Rightly so. Governments have a horrible track record of spreading pseudo-science.
Spongebob Wrote:And many scientific dead ends are also taught.
Like? I do not remember any scientific dead ends being taught at school.
Spongebob Wrote:we are all part of an elaborate simulation in that computer
That is not at all what Digital Physics is about. It is more like rejection of metaphysics. And an attempt to deal with Zeno's paradoxes.
https://flatassembler.github.io/Simulation.html Wrote:Digital physics doesn't suppose it's likely that our universe is simulated by some giant computer in some alien civilization, it simply supposes that the fundamental laws of nature are such that they could, in principle, be simulated by an enough-powerful computer. A perhaps better summary would be that the universe itself is a giant computer (not a "computer simulation").
Spongebob Wrote:libertarian
https://flatassembler.github.io/Simulation Wrote:Free will is entirely explicable using the computational complexity. Every system with enough computational complexity can be said to have free will. And since free will is so-to-say an illusion, laws make little sense, and punishing people who break the law with prisons makes even less sense. Which is one reason why I am a libertarian.
Reply



Possibly Related Threads...
Thread Author Replies Views Last Post
  What is the most absurd error message a program you have made was outputting? FlatAssembler 38 3834 June 14, 2023 at 8:01 am
Last Post: FlatAssembler
  Error 502 bad gateway for Rational Responders Brian37 13 1283 April 23, 2022 at 4:17 pm
Last Post: BrianSoddingBoru4
  How Do I Send an SMS message From UK mobile to a US one ReptilianPeon 11 1777 July 9, 2018 at 5:17 pm
Last Post: bennyboy
  HELPPPPP Blue screen error just now!!! Edwardo Piet 114 9800 November 10, 2015 at 2:26 am
Last Post: Aractus
  Disk read error. Creed of Heresy 12 4039 July 27, 2012 at 9:19 am
Last Post: Tiberius
  Video Error: Grey circle with a white exclaimation mark inside. Reforged 5 3740 July 5, 2012 at 1:19 am
Last Post: Reforged



Users browsing this thread: 1 Guest(s)