• Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Social Media
    •   @Wings3dOfficial
    •   @Wings3dOfficial
    •   Wings3dOfficial
    •   Wings3dOfficial
  • Register
  • Login
  • Website
  • Search
  • Member List
  • Help
  • Old Forum
  • Register
  • Login
Wings 3D Development Forum Wings 3D Off Topic v
« Previous 1 … 4 5 6 7 8 … 10 Next »
Wings clone in C++

 
  • 0 Vote(s) - 0 Average
Wings clone in C++

Pages (3): « Previous 1 2 3 Next »
Arg Arg
Offline

Member

Posts: 54
Threads: 11
Joined: Dec 2013
#11
01-18-2015, 10:17 AM
@GG
that are very good news to hear...
so it would be no problem to code
the QUAD-EDGE DATA STRUCTURE
in ERLANG... maybe C/C++ would not
fit for the job.

The Quad-Edge Struct is a child of
Winged-Struct and the mesh manipulation
is faster and more complex operations
can be done easily.


http://en.m.wikipedia.org/wiki/Quad-edge

http://www.cs.cmu.edu/afs/andrew/scs/cs/...dedge.html

PDF:
https://www.google.de/url?sa=t&source=we...fTEF8TC-ZA

ok... so it is no problem to do that in erlang?
why not extend wings with the quad-edge-data-structure?
seems to be no need for C/C++?
ggaliens
Offline

Erlang Hacker
Posts: 954
Threads: 143
Joined: Nov 2012
#12
01-18-2015, 04:09 PM (This post was last modified: 01-18-2015, 04:24 PM by ggaliens.)
Nemyax ... this is really easy for me to field .... "No less suited than Erlang is. It's a general-purpose programming language, and a mesh is a data structure. So how is it not suited?"

Erlang to me ... is a fundemental match for polygon processing for TWO reasons ...
1) Language fundemental pattern matching syntax.
2) Degree to which hash, list, and set are fundemental to the languages.

My opinion rendered above is not complete. The fundemental MATCH is nuanced but extremely clear if say you are a Mathematician and Programmer by trade. Wings3D is using its strengths to ask questions of the mesh that are not so quickly answered in other languages.

The math of MESHES is really discrete and finite math ... if you took GOOD solid courses at a university that studied Topology, functions, sets, GROUPS, etc ... You would use a sweet language like ISETL or Erlang or LISP with maybe something built on top of LISP. You WOULD NOT USE C++.
nemyax
Offline

Member

Posts: 128
Threads: 14
Joined: Nov 2012
#13
01-18-2015, 05:05 PM
ggaliens
SideFX knows how to handle mind-boggling graphs and multiple types of geometry definition, all in C++. I think whether you can do something or other with a language as large as C++ is a matter of how good you are with it.
ggaliens
Offline

Erlang Hacker
Posts: 954
Threads: 143
Joined: Nov 2012
#14
01-18-2015, 07:30 PM
Sure ... you can catch a fly with chop-sticks also.

But I'd just use a fly-swatter myself.

Nothing wrong with a language like C++ for hardening parts of a well defined system. But as far as designing a system that is fundamentally wanting to be handled by a lists,sets, tuple based language without the shackles of being strongly typed ... man ... just no comparison at all.

Wings defers to native code (think C/C++) in a number of places where it should ... like compositing things for screen and of course interfacing to existing libraries. Use of jpeg libs, etc.

Use a tool where it excels. Use Erlang and Functional programming to design a great mesh processor ... oh ... that happened 30 years ago with LISP and then 15 years ago with Erlang. OK !
nemyax
Offline

Member

Posts: 128
Threads: 14
Joined: Nov 2012
#15
01-18-2015, 09:11 PM
(01-18-2015, 07:30 PM)ggaliens Wrote: But as far as designing a system that is fundamentally wanting to be handled by a lists,sets, tuple based language without the shackles of being strongly typed ... man ... just no comparison at all.
I remember Bjorn mentioning that if he had to start over, he'd probably go with Haskell. Now that one has even stronger typing than C++ =)
ggaliens
Offline

Erlang Hacker
Posts: 954
Threads: 143
Joined: Nov 2012
#16
01-19-2015, 02:35 AM (This post was last modified: 01-19-2015, 02:37 AM by ggaliens.)
Really ... are you sure ? (From wikipedia site on strong typing)

Code:
Languages with static type systems differ in the extent to which users are required to manually state the types used in their program. Some languages, such as C, require that every variable be declared with a type. Other languages, such as Haskell, use the Hindley-Milner method to infer all types based on a global analysis. Other languages, such as C# and C++, lie somewhere in between; some types can be inferred based on local information, while others must be specified. Some programmers use the term weakly typed to refer to languages with type inference, often without realizing that the type information is present but implicit.
nemyax
Offline

Member

Posts: 128
Threads: 14
Joined: Nov 2012
#17
01-19-2015, 04:26 AM
From what I've read about Haskell, there's advanced type inference, but no implicit type conversion. For example, you can't pass an Int to a function that is :: Float -> a. You have to convert.
ggaliens
Offline

Erlang Hacker
Posts: 954
Threads: 143
Joined: Nov 2012
#18
01-19-2015, 05:10 PM
That's OK ... In Erlang ... Wings3D uses GUARDS wherever they feel like to maybe a function declaration "More Strongly Typed". I like that ... that's the onus is on the user here in Erlang (mo' freedom man).

I have started using a lot more guards as well ... it does make debugging easier for me. But ... it's not crammed down my throat to need to do it for every function.
nemyax
Offline

Member

Posts: 128
Threads: 14
Joined: Nov 2012
#19
01-20-2015, 08:02 AM
(01-19-2015, 05:10 PM)ggaliens Wrote: mo' freedom man
Yay, more badmatches at runtime! =)
ggaliens
Offline

Erlang Hacker
Posts: 954
Threads: 143
Joined: Nov 2012
#20
01-20-2015, 03:15 PM
It's not a bad match nemyax ... it's a reminder to the future coder ... to use the function properly.

But again ... it is done as much as is needed. Maybe guard 1 of 3 parameters for clarity. Maybe 2, maybe none. Freedom.

All the bugs happen at runtime. Bad match is as easy as any to debug. Leaving the guard off may allow the crash dump to be longer.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): « Previous 1 2 3 Next »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D - Powered by MyBB

Linear Mode
Threaded Mode