Duke4.net Forums: What languages do you use? - Duke4.net Forums

Jump to content

  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic

What languages do you use?

User is offline   Hank 

#31

View PostKawa, on 02 April 2017 - 01:26 PM, said:

Hand-written in C instead of C++, despite compiling to perfectly valid C++ objects. Like this. Explorer is written in plain C, as is the set of COM components it uses to display the contents of drives and special folders (My Computer, Fonts...), yet a COM component is by definition a C++ object.

Got it.

View PostKawa, on 02 April 2017 - 01:26 PM, said:

Also, if endl is only redundant to \n most of the time, and the only difference is that it also flushes, you might as well use \n all the time and flush when you (or the system) want to.

Yep.
From the core
http://en.cppreferen...p/io/manip/endl
0

User is offline   Psycho87 

#32

Yeah, not a fan of C++. And I loathe object oriented programming.

This video by Eskil Steenberg is pretty good and I agree with a lot of it:
https://www.youtube....h?v=443UNeGrFoM
0

#33

I usually stick to English, but I'm pretty fluent in Sarcasm.
2

User is offline   TerminX 

  • el fundador

  #34

Currently, EDuke32 is written in C++, but we're using almost strictly just the subset of C++ that aligns with C. C++ constructs are welcome, but it's down to whether they're really necessary or are going to actually be a benefit long term. This is mostly due to the fact that I hate most C++ syntax; I agree with whoever it was in this thread who said reading it gives them a headache. It's a bunch of extra bullshit symbols added on top of C, but unlike C it's very difficult to just naturally infer most of the meaning of the stuff specific to C++.
2

User is offline   MetHy 

#35

I used to learn Turbo Pascal as a kid... but then I was too busy playing games.

So I don't really know anything about programming but I've started learning 6502 Assembly a couple of months ago, but in an empirical non linear kind of way. I'm working on NES romhacks and I learn what I need/have to learn to understand or solve a situation or a problem at hand.

This post has been edited by MetHy: 04 April 2017 - 12:24 AM

0

User is offline   Kawa 

#36

View PostTerminX, on 03 April 2017 - 08:55 PM, said:

I agree with whoever it was in this thread who said reading it gives them a headache.
Twas I.
0

User is offline   Sangman 

#37

I code in C# and Javascript/TypeScript for work. Evidently I disagree with people saying that it's a garbage language :blink:
1

#38

View PostTerminX, on 03 April 2017 - 08:55 PM, said:

Currently, EDuke32 is written in C++, but we're using almost strictly just the subset of C++ that aligns with C. C++ constructs are welcome, but it's down to whether they're really necessary or are going to actually be a benefit long term. This is mostly due to the fact that I hate most C++ syntax; I agree with whoever it was in this thread who said reading it gives them a headache. It's a bunch of extra bullshit symbols added on top of C, but unlike C it's very difficult to just naturally infer most of the meaning of the stuff specific to C++.

I prefer object orientated programming, it makes things a lot more organized. So I would disagree that eduke32 would not benefit from OOP :blink:.
0

User is offline   Kawa 

#39

Eeeegh...

Alan Kay said:

Actually I made up the term "object-oriented", and I can tell you I did not have C++ in mind.

0

User is offline   Hendricks266 

  • Weaponized Autism

  #40

View Posticecoldduke, on 04 April 2017 - 02:09 PM, said:

I prefer object orientated programming, it makes things a lot more organized. So I would disagree that eduke32 would not benefit from OOP :blink:.

Where did he say anything about OOP? I suspect he is talking more about references using the same symbol as the address-of operator (&), poor uses of operator overloading (such as << and >> in the STL's iostream). Then C++11 came along with rvalue references (&&), lambda expressions, and more.

We already use OOP constructs if you look at systems like osd.cpp, just not (yet) using C++'s syntactical sugar.
0

User is offline   Kawa 

#41

Regarding OOP in plain C, I'm reminded of Wolfenstein 3D. Prefixed functions with a struct pointer matching that prefix as their first argument sure sounds like C++ class methods and their implicit hidden *this to me...
0

User is offline   Micky C 

  • Honored Donor

#42

View PostMicky C, on 31 March 2017 - 06:07 PM, said:

I've been using the PyCharm IDE and it's fantastic. It seems to be continuously scanning your code and pointing out areas where it thinks things don't look right, which is great for a newbie like me. The only downside is drains the macbook battery like a mother f*cker. Somehow got only 1.5 hours out of what usually lasts ~7 Posted Image



View PostMark., on 31 March 2017 - 06:23 PM, said:

battery drain was those porno vids running in the backround. :blink: The audio output chip draws a lot of power during those loud moans and grunts.


It turned out that when I was pressing a certain button that I thought restarted the script, actually created a brand new instance of the script running, creating multiple cases running simultaneously.

Or as Mark would say, I tried to open a porn vid in a new tab but it wouldn't load so I clicked it a few more times, only to have 10 tabs of the same video running Posted Image

This post has been edited by Micky C: 04 April 2017 - 11:18 PM

2

User is offline   Forge 

  • Speaker of the Outhouse

#43

01101110 01100101 01110010 01100100 01110011
0

User is offline   LkMax 

#44

View Posticecoldduke, on 31 March 2017 - 06:54 AM, said:

I strongly disagree that its not your problem that most of the world hates Fortran, Pascal and for that matter Python

Whaaat. I might be a relatively inexperienced programmer but I can't see how the world hates python when a lot of people, big names included, use it extensively? Google uses it, Battlefield 2 used it somewhat, Civilization IV had most of it's code programmed in python, Blender 3D (one of the most used modelling softwares) supports it, and so on and so forth. Besides, it's the easiest language I've ever used, and easier means more accessible, which usually means wilder acceptance for non-experts. It's also perfect for quick prototyping and I've used it to run scripts that I've made on the spot for one-use porpuses. Granted, it might lose in performance compared to C and lower level languages but so does most (or should I say all?) OOPLs and it has its place and utility.

View PostNever Forgotten, on 03 April 2017 - 08:17 PM, said:

I usually stick to English, but I'm pretty fluent in Sarcasm.

I'm surprised it took this long for someone to make this joke. :-P
0

#45

View PostLkMax, on 05 April 2017 - 05:57 PM, said:

Google uses it, Battlefield 2 used it somewhat, Civilization IV had most of it's code programmed in python, Blender 3D (one of the most used modelling softwares) supports it, and so on and so forth.

The games you mentioned are quite old and there is a reason why the new Civ game and new battlefields don't use python anymore :blink:. As I mentioned before, there is a place for Python in a google environment because it does work decently well for automation scripts. Blender and Maya for the life of me I can't understand why they choose Python(I guess it was better then mel script?). I know a lot of academics like Python and I'm somewhat convinced thats the reason why its being used for more things then just automation.
0

User is offline   Hank 

#46

My take on Python. :blink:

Posted Image

p.s. Blender uses Python but you can write your modules in C/C++.
0

User is offline   Hendricks266 

  • Weaponized Autism

  #47

If you're too locked into the C-inspired mindset (including C++, Java, C#) I can see how Python might seem too fast and loose. Indeed, its strengths are for smaller projects rather than bigger ones.
1

User is offline   Mark 

#48

I didn't know there were so many novice to experienced programmers on the forum. There is an open source program I use all the time called Misfit Model 3D. What I would like added is for the program to open in full window mode. I have no idea if you have to modify the source code or just the program's exe file to accomplish this. If someone is interested in trying give me a shout in a PM. I've been using the program for years and suffered through having to drag the window to the center of the screen and click the open to full window icon in the corner every single one of the 1,000 times I've used the program.

This post has been edited by Mark.: 06 April 2017 - 10:58 AM

0

User is offline   Hendricks266 

  • Weaponized Autism

  #49

Would it work to make a shortcut and set it to open maximized in Properties? This includes the shortcut in the Start Menu.

Posted Image
1

User is offline   Mark 

#50

Me and Hendricks sitting in a tree. K I S S I N G :blink:
Now if its not too much trouble could you go back in time and tell me this about 5 years ago. Thanks.

I checked a bunch more shortcuts and they all say normal window and they all open up maximized by default. I guess the programmer for Misfit didn't do that.

This post has been edited by Mark.: 06 April 2017 - 11:38 AM

0

User is offline   Micky C 

  • Honored Donor

#51

Looks like we have a few people familiar with Python here... I'm trying to do what should be an extremely simple task and for the life of me can't find a good way of doing it.

I have a 3D array representing a volume of values (i.e the position in the array represents the physical location). All I want to do is plot the surface of this volume like in the image seen below. None of the methods I've come across seem intended to do exactly this. Does anyone have any ideas?

Posted Image
0

User is offline   Hendricks266 

  • Weaponized Autism

  #52

I'm familiar with the language, but it sounds like you're using domain-specific libraries based on how far removed from a language feature your request is. I can systematically decompose the problem into:
1. Iterate over the three faces you want to show
2. Perform the perspective projection of each element's 3D coordinates to a 2D point in screen / image space
3. Write the value of that element to the 2D coordinates you found
1

#53

View PostMicky C, on 06 April 2017 - 04:21 PM, said:

None of the methods I've come across seem intended to do exactly this. Does anyone have any ideas?

*Trolls on in* - Use a better language :blink:.

This post has been edited by icecoldduke: 06 April 2017 - 04:51 PM

1

User is offline   Micky C 

  • Honored Donor

#54

View PostHendricks266, on 06 April 2017 - 04:48 PM, said:

I'm familiar with the language, but it sounds like you're using domain-specific libraries based on how far removed from a language feature your request is. I can systematically decompose the problem into:
1. Iterate over the three faces you want to show
2. Perform the perspective projection of each element's 3D coordinates to a 2D point in screen / image space
3. Write the value of that element to the 2D coordinates you found


I didn't expect it to be in the core language, but there are supposed to be a heap of libraries to help with plotting. The closest thing I've found seems to theoretically plot slices in the 3 axes in 3D space but so far it's not quite working how I want it.


View Posticecoldduke, on 06 April 2017 - 04:51 PM, said:

*Trolls on in* - Use a better language :blink:.



Oh, I suppose you can do this right out of the box with C++? :blink:
1

User is offline   Hendricks266 

  • Weaponized Autism

  #55

View Posticecoldduke, on 06 April 2017 - 04:51 PM, said:

*Trolls on in* - Use a better language :blink:.

Does C# have built-in faculties for 3D graphics math?

EDIT: Ninja'd!

View PostMicky C, on 06 April 2017 - 04:55 PM, said:

I didn't expect it to be in the core language, but there are supposed to be a heap of libraries to help with plotting. The closest thing I've found seems to theoretically plot slices in the 3 axes in 3D space but so far it's not quite working how I want it.

That sounds like it could work if you render the three slices separately and could disable the axes (and maybe background) for all but one of the images, then superimpose the other two yourself.
0

#56

View PostHendricks266, on 06 April 2017 - 04:56 PM, said:

Does C# have built-in faculties for 3D graphics math?

EDIT: Ninja'd!

It would be nice if C# included some built in vector math libraries.

This post has been edited by icecoldduke: 07 April 2017 - 06:46 AM

0

User is offline   Kawa 

#57

View Posticecoldduke, on 07 April 2017 - 06:44 AM, said:

It would be nice if C# included some built in vector math libraries.

1. C# actually pretty much has no "built-in" library. There's a core library (with the System namespace) that's available to most if not all .Net languages, itself written mostly in C#.
2. XNA has Vector classes you can use/steal.
0

#58

View PostKawa, on 07 April 2017 - 11:08 AM, said:

1. C# actually pretty much has no "built-in" library. There's a core library (with the System namespace) that's available to most if not all .Net languages, itself written mostly in C#.
2. XNA has Vector classes you can use/steal.

1. Semantics, you know what I meant :blink:.
2. I use Math.NET personally, I would never touch any part of XNA. It would still be nice if some kind of vector math library was part of the core .NET implementation.

This post has been edited by icecoldduke: 07 April 2017 - 11:32 AM

0

User is offline   Kawa 

#59

I like to just have my own set of .cs files that I can include in whatever project I need. I wrote my own JSON library like that, something to read PCX files and extract raw color and pixel data from any applicable Bitmap object, Motorola integer reading and writing, variable length quantities, fuzzy logic, saturated integers... I even have a PNG chunk manipulation system, and not a single extra DLL file in sight.

Maybe I'll make a Kawa.Tools.Vectors module this weekend.
0

User is offline   Micky C 

  • Honored Donor

#60

Well I seem to have found a solution of sorts to my block plotting issue, by plotting the slices in 3D space. However for no reason I can see, the slices don't contain the last index of each dimension. So each slice plotted is a grid of (n-1)*(n-1) when the data used as input is n*n.
0

Share this topic:


  • 3 Pages +
  • 1
  • 2
  • 3
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options