|
Gerry Schmitz wrote: Visio has electrical engineering shape templates: semiconductors; tubes; IC's; etc.
Yes, I did my own library with Visio. But then, is it possible to export the symbols to be usable in Unity? That is, the shapes cannot be images.
|
|
|
|
|
You can use "images" in unity. They're just another "asset".
The point is, if you're trying to "model" a circuit, Visio is an option.
Your "requirements" are rather vague as to what you want to "automate" in relation to what you may already have (or not have).
(You had to build 2D circuits in BioShock to get into a safe, for example. Just animated "squares". )
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
modified 15-Apr-18 14:16pm.
|
|
|
|
|
Hi,
What I want to do is simple (at least in concept ).
I would like to have a background (canvas) where I could draw lines only ( I just need lines), just like in any drawing program, but the lines will be only either horizontal or vertical.
In visio, for example, you can have objects and connect them with lines to their vertices. This is a very important feature to me and that I would like to have.
Based on my requirements I have narrowed down the development to be done either in Visual C# or C++ and Qt.
What do you think ?
Best regards,
Pedro
|
|
|
|
|
I would use C# because I know C# (and WPF).
WPF has a Canvas control for absolute positioning.
WPF can create lines that can be rotated.
Sounds like you're ready to go.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
By the end I guess I will use PyQt since it is cross-platforms.
Many thanks,
Pedro
|
|
|
|
|
C is "cross platform" too; if that's your only criteria.
If there's a compiler / interpreter, it's "cross platform".
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
When I design software I like to set it up to be able to work with meaning in code. How do you work with meaning in code? To get the discussion started, here are some definitions for the word 'Meaning' as defined by various organizations:
Meaning Definition 1- Oxford 1
- what is meant by a word, text, concept, or action.
- Cambridge UK1/US2
- The meaning of something is what it expresses or represents.
- Dictionary.com 1
- what is intended to be, or actually is, expressed or indicated; signification; import.
- Wiktionary 1
- The symbolic value of something.
Meaning Definition 2 - Cambridge US1/UK2
- importance or value.
- Free Dictionary 1b
- Something that is conveyed or intended, especially by language; sense or significance.
- Collins BR3
- the inner, symbolic, or true interpretation, value, or message.
- Dictionary.com 2
- the end, purpose, or significance of something.
- Wiktionary 2
- The significance of a thing.
The first group is focused on the simpler definition. The second group is the deeper definition. I am interested in your experiences in dealing with meaning in code for either.
|
|
|
|
|
jonrgrover wrote:
The first group is focused on the simpler definition. The second group is the deeper definition. Semantics. What is meant by a word determines its value.
jonrgrover wrote: I am interested in your experiences in dealing with meaning in code for either. I ignore Cambridge and Oxford, as they are academics.
jonrgrover wrote: How do you work with meaning in code? Code does not explain my intentions, only my actions. It does not convey meaning, it conveys what is happening, and sometimes why I made those decisions.
Comments aren't meant to be a spec; they're meant to explain what the code does.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
Wow almost 8 years and this is your first post, and what a post it is!
To me the question makes no sense, code is written to achieve a goal/requirement not to have "meaning". When I code I'm focused on 2 things getting the result I am expecting and doing it in the most elegant way I know how.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Lewis Carroll said it all: Quote: “Then you should say what you mean,” the March Hare went on.
“I do,” Alice hastily replied; “at least—at least I mean what I say—that’s the same thing, you know.”
“Not the same thing a bit!” said the Hatter. “Why, you might just as well say that ‘I see what I eat’ is the same thing as ‘I eat what I see’!”
“You might just as well say,” added the March Hare, “that ‘I like what I get’ is the same thing as ‘I get what I like’!”
“You might just as well say,” added the Dormouse, which seemed to be talking in his sleep, “that ‘I breathe when I sleep’ is the same thing as ‘I sleep when I breathe’!”
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
I get what you "mean".
I've transitioned to using mostly "getters"; instead of coding logic "inline".
e.g. if ( zone.IsRunning ) {}
where IsRunning (for example) is a PROPERTY:
bool IsRunning { get { return this.Status > Zone.Status.Idle && this.Status != Zone.Status.Paused && ... }};
This can be extended to "last", "first", etc. by wrapping SIMPLE queries in a "getter".
The code then takes on the "flavor" of the original "english-like" spec. It then becomes easier to "validate" the two against each other; assuming the spec was reasonably structured to start with.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
I have this problem, but before I tell you the problem I need to tell you what my goal is. I'm building an application where there is a main form(I'm using c# and winforms) and a bunch of mini tool forms that go along with the main one. I understand there are frameworks already like this, but I want to create my own. I would like the tool forms to be able to dock to the main form based off of percentages(unless there are other ideas) so that when you scale the main form the tool windows change with it. The tool forms should also be reshape-able inside the main form, and therefore should have an affect on the other forms in the layout.
Another necessity is that you can save the current "workspace" and load it from a file. So, whichever method I choose has to be able to call a finished loadWorkspaceFromFile(); and saveWorkspaceToFile(); on the main form.
Right now I have all the tool forms as separate forms, and I want to keep it that way. I've messed around with windows tracking other windows in my application, and I think the speed and performance is fine, so I wouldn't want to go to a resize-able panel system.
I know my way around c# I'm just looking for some insight and inspiration on how to go about solving this algorithmic problem. Any help is greatly appreciated. Thanks in advance for your time, Carson
|
|
|
|
|
You can do all of that with standard .NET classes.
|
|
|
|
|
new Human("Carson"); wrote: and therefore should have an affect on the other forms in the layout.
You are going to need to define that requirement more.
If I drop two boxes in a window and resize one of them the other should not change shape.
|
|
|
|
|
In WPF you have a dock attribute, I'm not sure it is in winforms but I think it should be. That will not solve you resizing issue but may give you some pointers.
As for saving a layout that is simply trapping the onclose() event and recording the tool forms positions within the form. I write that information to the users app data folder.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Visual Studio IDE like Dock Container[^]
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
"If you just follow the bacon Eddy, wherever it leads you, then you won't have to think about politics." -- Some Bell.
|
|
|
|
|
new Human("Carson"); wrote: The tool forms should also be reshape-able inside the main form, and therefore should have an affect on the other forms in the layout.
... Right now I have all the tool forms as separate forms, and I want to keep it that way. First, do not put a WinForm inside another WinForm by adding it to the other Form's Controls collection. While it's possible, it's a needlessly "heavy" choice, and you can use a Panel to implement the same functionality.
The question you need to answer is whether you want these tool windows inside the Main Form, or outside: if outside, you can set the 'Owner property of the tool form to the Main Form, which will keep the tool form always above the Main Form.
For Panels in the Form, you can use 'Dock and 'Anchor properties to simulate docking and dynamic re-size; you can easily make a Panel re-sizable at run-time with very little effort.
However, if your goal is to allow the run-time user to change the tool form docking, that's a major effort, and I suggest you download and study the code of the open-source DockPanel Suite: [^]. Note that this project is not being actively maintained.developed.
«... thank the gods that they have made you superior to those events which they have not placed within your own control, rendered you accountable for that only which is within you own control For what, then, have they made you responsible? For that which is alone in your own power—a right use of things as they appear.» Discourses of Epictetus Book I:12
|
|
|
|
|
Hi!
TLDR:
I want a programming language that fulfills the following requirements:
Musthaves:
1) can compile to small executables that run as fast as C++ (maybe ideally the language transpiles to C++)
2) static typesystem (for speed and cleanness, a C++-like template system is also cool)
3) not a hell of torture and despair to program in
4) free
5) big standard (math) library or c++ bindings
6) compiles on all platforms
Nicetohaves:
- scripting and stepping through the code while debugging
- designed for matrix operations like matlab or julia (so I can write A*B instead of matrixMultiply(A, B))
- usable GPU bindings
- nice graphics and plots would be nice but I'm fine doing that in three.js and communicating via socket
Where famous things fail:
c++: point 3!!
python: point 1, 2
matlab: point 1, 2, 4
octave: point 1, 2
julia: point 1 (such a shame!!! it seemed so perfect!)
Things I did not try yet but might checkout: Go, cython and Felix
I appreciate if you could share any experiences with those and why they might suck for my purposes. And I happily take suggestions if you know the perfect thing for me!
The long story:
I am an engineer and the main things I program are mathematical algorithms (often involving a lot of spacial transformation and trajectory planning and such) and games. Over the years I have tried many programming languages. I started in VB and then moved to C++ at some point. I often go back to C++ when I need the performance but it's just such a pain to develop in it... Just the thing with the h and cpp files which entails that I have to write everything twice is ultra annoying. I know the IDE can assist me but I just want lean code. At university I learned matlab. Developing in matlab is orders of magnitude more pleasant, lemmetellya... However, I can only distribute my code to people who have a matlab license. Which does not include myself anymore. I heard numpy and python are alternatives, so I tried them. They are nice to work with but the code runs terribly slow.
During yet another fed-up-with-all-this look through the internet, I stumbled upon Julia. Julia seemed to have it all. I binge-read the documentation and loved so many aspects about it! UTF-8 source code so you can write a cross for cross product and a dot for dot product! Greek variable names! Scripting and compiling capabilities! Nested for-loops that can be escaped with a single break (so there is actually no reason to use goto anymore ), matrix operations and functions with multiple return parameters are nice! Arbitrary precision built in! Everything seemed too good to be true! But then, when I wanted to create a stand-alone executable, it created 50 dll files with 200MB in sum for a helloworld program. That's just not cool. I hope the developers tackle this last thing, then it might really become my home language.
So I went back to C++ yet again. This time I tried to nicen it up as much as I could. The Lazy C++ project took the h/cpp pain away. But I didn't want to stop there. I wrote my own pre-pre-processor that does many search-n-replaces with the files that I write and turns them into lzz code (which is then turned into h and cpp). For instance:
func divide maps (int x, int y) to [int q; int r] sothat
return {x/y, x%y};
endf which is translated into:
struct divide_result{int q; int r;};
divide_result divide(int x, int y){
return {x/y, x%y};
} or
for i from 0 to 9 do
loop
And many things like that. And I'm happy with it, I like the syntax much more than the brackety C++ gibberish. And a lot of typing redundancy is gone. However... I found that - surprisingly - no IDE supports syntax highlighting, code folding and all that for my own code. If the compiler finds an error, I have to check where it is in C++ and then find that place in my code. This extra step becomes annoying over time. Also, my transpiler is far from intelligent and there are many pitfalls that it does happily run into, not telling me what's wrong because it just does regex replaces. And writing a proper parser is just too much work. And also, I feel like I stumble into every pitfall that c++ offers, resulting in much more debugging than in any other language. I know that good practice can avoid much of that but therefore one has to know all the good practices and that takes... well.. a lot of practice.
So. Before I continue my everlasting pilgrimage in search of the perfect programing language, I seek advice in you, dear internet, for I cannot be the only one who has embarked on this quest of disappointment and pain!
Guide me!
|
|
|
|
|
|
|
Back in the 60s or 70s I would agree.
|
|
|
|
|
Nope.
All the compiler optimizations designed since the 1979s are applied to FORTRAN compilers so that FORTRAN remains the fastest language for implementing mathematical algorithms.
Plus, since memory is statically allocated at compile time, there is no runtime memory allocation and deallocation or garbage collection for FORTRAN.
|
|
|
|
|
One uses "spec machines" that have the horse power to tackle VR, face recognition, tracking (i.e. math and games).
Then it's just a question of whose SDK and peripherals you prefer: MS; HP; Oculus Rift.
Cobbling things together; starting with the "fastest and bestest" software (without the "bestest" hardware and SDK) is a guess.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
Thanks for the responses! And sorry for being so unspecific in the title... But by fast I address both performance of the compiled code and development time. I would like to have a programming language that is less complicated and error-prone than c++ without sacrificing too much runtime performance. It must be possible! It must!
|
|
|
|
|
I would take a look at Rust if I were you. Once you get used to it, it's very pleasant to use.
This space for rent
|
|
|
|
|