Author Topic: Gems & other stuff ...  (Read 21710 times)

0 Members and 1 Guest are viewing this topic.

JohnK

  • Administrator
  • Seagull
  • Posts: 10669
Re: Gems ...
« Reply #30 on: September 08, 2023, 02:57:25 PM »
I've never seen this thread. ...some of these are really funny.
TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2159
  • class keyThumper<T>:ILazy<T>
Re: Gems ...
« Reply #31 on: September 18, 2023, 10:34:12 PM »
This is one of those descriptions that you just know you'll be disapointed if you click it.

I s'pose I could read it while I wait for the jug to boil for a cup of tea  . . .  what else could I do in 3 minutes ??

 . . . but, exhaustive ? really ?


Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 8859
  • AKA Daniel
Re: Gems ...
« Reply #32 on: September 19, 2023, 12:22:28 AM »
This is one of those descriptions that you just know you'll be disapointed if you click it.

I s'pose I could read it while I wait for the jug to boil for a cup of tea  . . .  what else could I do in 3 minutes ??

 . . . but, exhaustive ? really ?

If you were in the US, with a 110v kettle, you could read it twice

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2159
  • class keyThumper<T>:ILazy<T>
Re: Gems ...
« Reply #33 on: October 07, 2023, 07:02:24 PM »
Quote from:  Gill Cleeren

using just regular variables won't get us to the moon and back

Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2159
  • class keyThumper<T>:ILazy<T>
Re: Gems ...
« Reply #34 on: December 12, 2023, 06:08:49 PM »

Quote from: me
I really like the idea of sunny day scenarios when designing exception handling.
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2159
  • class keyThumper<T>:ILazy<T>
Re: Gems ...
« Reply #35 on: December 15, 2023, 12:06:32 AM »
From the docs :

Only the first 2048 characters of Microsoft C++ identifiers are significant.
Names for user-defined types are "decorated" by the compiler to preserve type information.
The resultant name, including the type information, cannot be longer than 2048 characters.

Technically, there isn't one in C# (an identifier length )
- the CLI does not impose any limit, neither does the C# specification.
However, in practice, the C# compiler does impose a limit of 511 characters per name.
If you declare something with 511 characters you are fine, 512 and you will get an "Identifier to long" error.


I really don't know what to make of the distinction . . . but the 2048 number caught my attention while reading some C++ docs.

Both figures are huge, imagine using 6.3  80 character lines to name a C# identifier.

You'd sure need intellisense.

. . . . I have trouble pronouncing and remembering even the simple 12 character names :)

Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

JohnK

  • Administrator
  • Seagull
  • Posts: 10669
Re: Gems & other stuff ...
« Reply #36 on: December 15, 2023, 12:37:20 PM »
That's huge!

Nice error message though; I could see myself in that situation asking why I needed to cast my int identifier to long.

TheSwamp.org (serving the CAD community since 2003)
Member location map - Add yourself

Donate to TheSwamp.org

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2159
  • class keyThumper<T>:ILazy<T>
Re: Gems & other stuff ...
« Reply #37 on: December 16, 2023, 05:22:42 PM »
Quote from:  swiss army proverb
“When the terrain disagrees with
the map, trust the terrain.”

Bjarne, Stroustrup. Programming: Principles and Practice Using C++ (p. 1  of 1274).

Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2159
  • class keyThumper<T>:ILazy<T>
Re: Gems & other stuff ...
« Reply #38 on: December 16, 2023, 09:40:17 PM »
Quote
We try not to exaggerate the importance of a programming technique or a language feature, but please don’t underestimate a simple statement like “This is often useful.” If we quietly emphasize that something is important, we mean that you’ll sooner or later waste days if you don’t master it. Our use of humor is more limited than we would have preferred, but experience shows that people’s ideas of what is funny differ dramatically and that a failed attempt at humor can be confusing.

Bjarne, Stroustrup. Programming: Principles and Practice Using C++ (p. 4).

I've found some humor confounding, especially when run through mrs Google's translator.
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2159
  • class keyThumper<T>:ILazy<T>
Re: Gems & other stuff ...
« Reply #39 on: December 19, 2023, 07:40:03 PM »
I think this is the cleanest set of definitions I've ever come across :

Quote from: Bjarne

• A type defines a set of possible values and a set of operations (for an object).
• An object is some memory that holds a value of a given type.
• A value is a set of bits in memory interpreted according to a type.
• A variable is a named object.
• A declaration is a statement that gives a name to an object.
• A definition is a declaration that sets aside memory for an object.

Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2159
  • class keyThumper<T>:ILazy<T>
Re: Gems & other stuff ...
« Reply #40 on: December 28, 2023, 08:16:47 PM »
Quote from: Zoran Horvat 'making your c# code more Object-oriented' . attaining Extensibility @ Pluralsight

The only thing left to do to make this piece of code perfect is to entirely delete it.


Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2159
  • class keyThumper<T>:ILazy<T>
Re: Gems & other stuff ...
« Reply #41 on: December 29, 2023, 10:01:14 PM »
I've gotta admire a man who loved words :)

Quote
In the words of Samuel Johnson, author of the English dictionary in 1755, I have committed “a few wild blunders, and risible absurdities, from which no work of such multiplicity is free.”

quote from:
Price, Mark J.. C# 12 and .NET 8 – Modern Cross-Platform Development Fundamentals: Start building websites and services with ASP.NET Core 8, Blazor, and EF Core 8 (p. 3). Packt Publishing. Kindle Edition.



Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2159
  • class keyThumper<T>:ILazy<T>
Re: Gems & other stuff ...
« Reply #42 on: December 30, 2023, 09:48:35 PM »
Quote from: Price, Mark J.
Programming languages have many similarities to human languages, except that in programming languages, you can make up your own words, just like Dr. Seuss!
In a book written by Dr. Seuss in 1950, If I Ran the Zoo, he states this:

Quote from: Dr. Seuss
“And then, just to show them, I’ll sail to Ka-Troo And Bring Back an It-Kutch, a Preep, and a Proo, A Nerkle, a Nerd, and a Seersucker, too!”
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.

MickD

  • King Gator
  • Posts: 3666
  • (x-in)->[process]->(y-out) ... simples!
Re: Gems & other stuff ...
« Reply #43 on: December 31, 2023, 12:20:45 AM »
finally!
something to replace foo bar and baz :D
"Programming is really just the mundane aspect of expressing a solution to a problem."
- John Carmack

"Short cuts make long delays,' argued Pippin.”
- J.R.R. Tolkien

kdub_nz

  • Mesozoic keyThumper
  • SuperMod
  • Water Moccasin
  • Posts: 2159
  • class keyThumper<T>:ILazy<T>
Re: Gems & other stuff ...
« Reply #44 on: December 31, 2023, 01:49:08 AM »
Yeah   :wink:
Preep, Proo and Nerkle has a ring to it  :-)

. . . a bit of a tongue twister though . . 
Called Kerry in my other life
Retired; but they dragged me back in !

I live at UTC + 13.00

---
some people complain about loading the dishwasher.
Sometimes the question is more important than the answer.