• Register
• TOS
• Privacy
• @NeoGAF
• Like

cpp_is_king
Banned
(09-01-2017, 09:57 PM)

Originally Posted by Koren

The think is, I don't see where they add the offset, and if you want a number in the [-2^31 .. 2^31-1) range, you should create one in the [0 .. 2^32-1) range, no?

But don't bother, I'll take my time with the assembly tomorrow, after a good sleep :) I shouldn't try to understad half a dozen pages of assembly just with two dozen lines.

The assembly was from GCC, and the source code I was using was from clang. So it could be different. In the clang version they add the offset at the end. But in all honesty, adding the offset is the only way to skirt around the signed overflow problem I think, so I'd be surprised if GCC doesn't do it. That said, I haven't looked more closely at the assembly yet either. It's probably easier to just look at the GCC Source code.
megarockexe
Member
(09-02-2017, 09:44 PM)
Hey, question about Windows 10's SmartScreen and distributing programs built in Visual Studio. Can that SmartScreen block be bypassed for users? I don't think anything I've downloaded from anywhere else gives me that pop up, but if I send a program I created to someone, then they'll see that screen and it could be annoying. Is there something I have to do to make it pass SmartScreen?
Chainsawkitten
Member
(09-03-2017, 11:24 AM)

Originally Posted by megarockexe

Hey, question about Windows 10's SmartScreen and distributing programs built in Visual Studio. Can that SmartScreen block be bypassed for users? I don't think anything I've downloaded from anywhere else gives me that pop up, but if I send a program I created to someone, then they'll see that screen and it could be annoying. Is there something I have to do to make it pass SmartScreen?

https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx

Alternatively distribute it in a zip. Then the program didn't come from the Internet but was created by whatever application was used to extract it.
Two Words
Member
(09-03-2017, 10:13 PM)
Our group recently got assigned our senior design project. We are working with company to make an AR iPhone application for mapping data created in their product desktop application into real space using ARKit. We're likely going to be working in Swift. Xamarin is still an option for us to consider. Any recommendations on learning iPhone app development and AR development? We're kinda hoping that ARKit handles a lot of the AR work for us.
Koren
Member
(09-03-2017, 10:57 PM)

Originally Posted by Chainsawkitten

Alternatively distribute it in a zip. Then the program didn't come from the Internet but was created by whatever application was used to extract it.

Good to know... But doesn't it defeat the "purpose"? And why downloaded apps aren't "created" by the browser?
Chainsawkitten
Member
(09-03-2017, 11:19 PM)

Originally Posted by Koren

Good to know... But doesn't it defeat the "purpose"? And why downloaded apps aren't "created" by the browser?

The Internet browser has to mark the file, which the common browsers all do. https://textslashplain.com/2016/04/0...rk-of-the-web/

7-zip or similar could do the same if they wanted to implement it. According to that website it looks like Windows explorer's built in archiving tool as well as many others do, so maybe the zip advice is years out of date.
Koren
Member
(09-03-2017, 11:36 PM)
Really interesting... Thanks for sharing all this.
Sectorseven
Member
(09-04-2017, 06:26 PM)
What is the difference between an integrated development environment (IDE) and an integrated scripting environment (ISE)?
Two Words
Member
(09-04-2017, 08:17 PM)

Originally Posted by Sectorseven

What is the difference between an integrated development environment (IDE) and an integrated scripting environment (ISE)?

integrated compiler vs integrated interpreter?
peakish
Member
(09-04-2017, 08:37 PM)
@cpp and koren: Thanks a lot for your comments and discussion! I'm sorry for not responding earlier. I kind of read "disassemble the code", said to myself "well shit" and wanted to come back to the issue once I had some time to look into it. Never dove into that aspect of coding before, although I knew it should happen sooner or later... anyway, I haven't really had time to do it so I didn't return to comment.

Honestly a lot of your discussion is over my head but (think) I get the gist of it. Still though, just changing to generating with uint32_t (and others) don't give me any speedups at all - but I think this is due to some templating gone wrong in my stupid code. I'll hopefully get around to writing a proper benchmark (ie. not time) for my calls later this week.
Koren
Member
(09-04-2017, 10:04 PM)
Well, it was interesting... I hope you'll be able to optimize your code, but feel free to discuss it more...

Originally Posted by Two Words

integrated compiler vs integrated interpreter?

I'd say it's fuzzier, and depend on whether the language is considered programming language or scripting language...

I don't think I've seen ISE for Python, and while it's somehow compiled to some extend, I'd put it in the interpreter side...
peakish
Member
(09-04-2017, 10:51 PM)

Originally Posted by Koren

Well, it was interesting... I hope you'll be able to optimize your code, but feel free to discuss it more...

I'll post my results when I get them. I'm probably spending a lot more than than I should on a simple lab program but I like doing things to the best of my ability ... plus, it's good learning.
cpp_is_king
Banned
(09-04-2017, 11:06 PM)

Originally Posted by peakish

I'll post my results when I get them. I'm probably spending a lot more than than I should on a simple lab program but I like doing things to the best of my ability ... plus, it's good learning.

Try constructing the generator with INT_MIN and INT_MAX for the min and max values.
Spoiled Milk
Banned
(09-05-2017, 01:41 AM)
GaimeGuy
Volunteer Deputy Campaign Director, Obama for America '16
(09-08-2017, 03:06 AM)
Fucking eclipse.

So, I have a code branch for a GIT repository SCP'd over to my cygwin directory at

It's imported into my eclipse workspace as a C++ project called BranchName

Consider the following code:

BranchName/woof/alpha/source/Foo.h

Code:

#ifndef FOO_H
#define FOO_H

// Non-MyTeam API headers
#include "beta.h"

namespace myteam
{
namespace alpha
{

class Foo
{
public:

static Foo& getInstance();
void  someFunction(beta::Operation_t op);

private:

Foo();
~Foo();
Foo(const Foo& copyArg);
Foo& operator=(const Foo& rhs);

static Foo*  m_pFooInst;
};  // class

} // end namespace alpha
} // end namespace myteam

#endif /* FOO_H_ */
Now, in C:\Documents\DevIncludes\ProjectAPIs\branchname\ are a bunch of external APIs for the project.

In file C:\Documents\DevIncludes\ProjectAPIs\branchname\woof\beta\source\beta.h:

Code:

#ifndef BETA_H_INCLUDED
#define BETA_H_INCLUDED

namespace beta
{

enum Operation_t {
NONE = 0,
UPDATE = 2,
DELETE = 3};

const Operation_t NOOP = NONE;

} // end namespace beta

#endif /* BETA_H_INCLUDED*/
Now, I have C:\Documents\DevIncludes\ProjectAPIs\branchname\woof\beta\source as an includes directory for the project (right click on BranchName in C/C++ Projects in Eclipse, go to Properties, then C/C++ General -> Paths and Symbols, Includes Tab, directory listed under Include Paths).

So, then, why the hell is it that next to this line in Foo.h:

Code:

    void  someFunction(beta::Operation_t op);
Eclipse is placing a marker with the folowing text:

Type 'beta::Operation_t' could not be resolved

WTF ECLIPSE INDEXER?!

I tried deleting the pbom for the index, I tried freshening all files, nothing works.

I can Mouse over the "beta.h" in the following line:

Code:

#include "beta.h"
and press F3, and the Eclipse IDE will open the beta.h file from the includes directory.

Yet, it can not see the symbol. At all.

It's like the CDT indexer and parser aren't finding it, but the outline view is.
Member
(09-12-2017, 04:47 PM)
hey you all...so something crazy happened. I had an intelligence test from my country and now my country will pay for a two year education in application development. I won't get a salary, but they'll pay for all the classes and my train tickets. Luckily my wife has a job and I'm able to partake. I got the news yesterday and I'm still processing it.

So, I've no former programming knowledge..and all I know is that parts of the curriculum is Java with a OCPJP certificate at the end as well as MySQL, PHP and OOP Web-development.

now, it starts in 4 weeks and I'd like to prepare. How could I prepare best for this? I'd like to look into Java and MySQL. For SQL I found learnSQLthehardway. would it be worth it for me? anyone every bought the book?

Any other sources, ideas what I should prepare or any help at all would be great. I'm freakishly frightened o.o".
esmith08734
Member
(09-15-2017, 03:48 AM)

Originally Posted by Sesuadra

hey you all...so something crazy happened. I had an intelligence test from my country and now my country will pay for a two year education in application development. I won't get a salary, but they'll pay for all the classes and my train tickets. Luckily my wife has a job and I'm able to partake. I got the news yesterday and I'm still processing it.

So, I've no former programming knowledge..and all I know is that parts of the curriculum is Java with a OCPJP certificate at the end as well as MySQL, PHP and OOP Web-development.

now, it starts in 4 weeks and I'd like to prepare. How could I prepare best for this? I'd like to look into Java and MySQL. For SQL I found learnSQLthehardway. would it be worth it for me? anyone every bought the book?

Any other sources, ideas what I should prepare or any help at all would be great. I'm freakishly frightened o.o".

Congratulations. Sounds exciting. Syntax books are kind of a waste, IMO. Everything syntax related is one search away. I would use books to pick up design patterns, methods of refactoring, and things like that.

For Java stuff, codingbat and hacker rank are great resources for problem solving. I used Udemy and YouTube to learn syntax. Tbh, general SQL is easy and can be reviewed in a couple of days, if not shorter. I am not sure how much you'll need to learn, tho.

Just ask questions. Literally no stupid ones. Sometimes it's just hard to explain things so there's a language barrier - not necessarily traditional.

I am learning with you - I am aspiring to be a good Java developer and a useful developer overall so we can leverage each other.

Have fun.
esmith08734
Member
(09-16-2017, 12:49 AM)
Starting a new desktop application in Java. Going to finally make a good to-do list. Slamming post-its on my monitor is not efficient anymore, lol.
Spoiled Milk
Banned
(09-16-2017, 12:50 AM)

Originally Posted by esmith08734

Starting a new desktop application in Java. Going to finally make a good to-do list. Slamming post-its on my monitor is not efficient anymore, lol.

You... did that?
cpp_is_king
Banned
(09-16-2017, 12:51 AM)
My post-it note was "uninstall JRE from my computer". Made good on that shit years ago.
Kansoku
(09-16-2017, 12:59 AM)

Originally Posted by esmith08734

Starting a new desktop application in Java. Going to finally make a good to-do list. Slamming post-its on my monitor is not efficient anymore, lol.

Have you heard of Kotlin? I wouldn't start a new Java project after discovering it. Better everything + full interop with Java, so best of both worlds.
upandaway
Member
(09-16-2017, 10:56 AM)

Originally Posted by esmith08734

Starting a new desktop application in Java. Going to finally make a good to-do list. Slamming post-its on my monitor is not efficient anymore, lol.

The most talented and experienced software engineer I know uses the monitor post-its. He has 3 monitors and I can't even see the bezel. I guess it's possible to make it work
Koren
Member
(09-16-2017, 11:35 AM)

Originally Posted by Spoiled Milk

You... did that?

I know a lot of developers that do it.

I use a paper notebook myself if I know I'll always develop at home, and only use digital solutions if I have to move with the project (so that I can add it in the mercurial repo)
esmith08734
Member
(09-16-2017, 08:51 PM)

Originally Posted by Kansoku

Have you heard of Kotlin? I wouldn't start a new Java project after discovering it. Better everything + full interop with Java, so best of both worlds.

I've heard of Kotlin, haven't sat down to learn it, however. I should probably get to it, I have heard great things about it.
Brawly Likes to Brawl
Member
(09-16-2017, 09:13 PM)
I made a new friend recently who's majoring in Elec. Engineering but thinking about switching to CS. I figured it would help if he did some research on the field first before diving in.

I'm fairly new to CS myself, so I was wondering if you guys knew any good resources detailing what you should know to get into Programming. English is his second language(he's from China), so I'm going to need material that isn't too difficult for a transfer student to understand.
The Last Wizard
Member
(09-17-2017, 02:08 AM)
This is correct, right?

slope = (y1 - y2) / (x1 - x2);
vypek
Member
(09-17-2017, 02:15 AM)
Yes
Spoiled Milk
Banned
(09-17-2017, 02:25 AM)
Yes but I usually see it written as (y2 - y1) / (x2 - x1).
Makai
Member
(09-17-2017, 02:26 AM)
Everyone is right 🐻
The Last Wizard
Member
(09-17-2017, 02:57 AM)
Gotcha, thanks all.
Munti
Member
(09-17-2017, 10:40 PM)
I can attend a paid course and will probably take a Java course where I'll be prepared to do an OCA-exam. I know the basics of Python, SQL and web development. So I hope this will not be redundant.

Is Java still a language that is being widely used?
Jokab
Member
(09-17-2017, 10:55 PM)

Originally Posted by Munti

I can attend a paid course and will probably take a Java course where I'll be prepared to do an OCA-exam. I know the basics of Python, SQL and web development. So I hope this will not be redundant.

Is Java still a language that is being widely used?

It's around the third most used language in the world after Javascript and SQL pretty much. So yeah.
Koren
Member
(09-17-2017, 11:30 PM)

Originally Posted by Munti

I can attend a paid course and will probably take a Java course

You have my sympathy...

Yes, it's still really useful, unfortunately...
fixuis
Member
(09-18-2017, 12:46 AM)
What are your guys opinions on python? Is it worth learning if you want to be a software engineer? Good place to start with? what if someone wants to do QA automation with the likes of selenium..worth it then? also SQL, is it worth learning? Thanks guys!
esmith08734
Member
(09-18-2017, 01:44 AM)

Originally Posted by fixuis

What are your guys opinions on python? Is it worth learning if you want to be a software engineer? Good place to start with? what if someone wants to do QA automation with the likes of selenium..worth it then? also SQL, is it worth learning? Thanks guys!

SQL is definitely always good to know. It's relatively easy to learn - at least the things most devs use, too.
Randolph Freelander
Member
(09-18-2017, 02:54 AM)

Originally Posted by fixuis

What are your guys opinions on python? Is it worth learning if you want to be a software engineer? Good place to start with? what if someone wants to do QA automation with the likes of selenium..worth it then? also SQL, is it worth learning? Thanks guys!

SQL is dirt simple but the real thing you want to learn is database design, normalization, etc. If you're ever going to work as a developer of business applications, in particular, you're going to interact with data up to and including the design of how that data is stored. You don't want to treat it like a spreadsheet.
Slo
Call 911!
(09-18-2017, 03:09 AM)
If we're going to consider SQL as a programming language, then we should also consider the verbiage used to order food at the McDonalds drive through as a new natural language too.
Somnid
Member
(09-18-2017, 05:33 AM)

Originally Posted by fixuis

What are your guys opinions on python? Is it worth learning if you want to be a software engineer? Good place to start with? what if someone wants to do QA automation with the likes of selenium..worth it then? also SQL, is it worth learning? Thanks guys!

Python is a decent first language. Overall, javascript seems to fill that general typeless get stuff done quick niche a bit better but all the best machine learning libraries are built for Python and that's something that anyone getting into software engineering now should be looking at. Modern browser automation is all javascript, there's little reason to start with the older selenium-based testing until you encounter it on the job.

SQL is highly useful as you will encounter it everywhere you need structured data. It's super simple though, you'll only need a couple of basics for setting up tables, retrieving data, updating and deleting with joins. If you need more than that it's either some nasty legacy thing or you are doing something very wrong. Keep it minimal.
fixuis
Member
(09-18-2017, 06:17 AM)
Thnks guys!
Zoe
(09-18-2017, 06:26 AM)

Originally Posted by Somnid

SQL is highly useful as you will encounter it everywhere you need structured data. It's super simple though, you'll only need a couple of basics for setting up tables, retrieving data, updating and deleting with joins. If you need more than that it's either some nasty legacy thing or you are doing something very wrong. Keep it minimal.

I wouldn't consider complex queries a "nasty legacy thing" or doing it wrong.
Koren
Member
(09-18-2017, 09:48 AM)

Originally Posted by fixuis

What are your guys opinions on python?
Is it worth learning if you want to be a software engineer?

Great language for prototyping, testing, scripting, scientific work (not number crunching but plotting and the like, even if it does decent number crunching via numpy/scipy and the like) and programming competitions. Wonderful standard library and a lot of 3rd party modules.

Decent first language because of the advantages, but using references for everything can feel strange at first when you use mutable types. I would still use ADA as a first programming language if I had time, but ADA practical use is far, far lower than Python.

Overall, I think knowing Python is really useful, and decent enough as a first language. Still, do you a service: go directly Python3k (even if it may be slightly easier to find Python (2.x) documentation online).

Originally Posted by fixuis

The official Python tutorial is good.

Originally Posted by fixuis

also SQL, is it worth learning?

Always, at least at a basic level. And it's only an afternoon work to learn the basics. After that, it's a matter of practice.

BTW, to practice SQL, you can access an interesting online database about geographic/political data at
http://www.semwebtech.org/sqlfrontend

You can enter requests and see the result. It's handy when you learn.
Munti
Member
(09-18-2017, 09:52 AM)

Originally Posted by Jokab

It's around the third most used language in the world after Javascript and SQL pretty much. So yeah.

Originally Posted by Koren

You have my sympathy...

Yes, it's still really useful, unfortunately...

Thanks! Looks like it isn't very well-liked though ��.

Although I could also attend a course about web-development/-publishing. But because I already know the basics about HTML+CSS, PHP, Javascript and responsive webdesign, I think it is more worth to learn a proper programming language deeply for once. Am I correct with this mindset? Have the feeling that self-study is good enough to learn more in web-development.
Koren
Member
(09-18-2017, 10:15 AM)

Originally Posted by Munti

Thanks! Looks like it isn't very well-liked though ��.

If you're not familiar with coders yet, there's an everlasting war between languages (down to this thread tittle ;) ). When you learn plently of them, you're bound to love or hate some of them. It can sometimes change over the years, too.

There's probably as many people that hate Java as people that love it. And people joke about it all day long ;) Don't pay too much attention to that.

Originally Posted by Munti

I think it is more worth to learn a proper programming language deeply for once.

I'd say it's always a good idea.

Originally Posted by Munti

Have the feeling that self-study is good enough to learn more in web-development.

With online ressources now, I think it's even more doable now than ever. In any case, programming is learned by practice, not by courses, so code, code and code ;)
Mystic Theurge
Member
(09-18-2017, 12:41 PM)

Originally Posted by fixuis

What are your guys opinions on python? Is it worth learning if you want to be a software engineer? Good place to start with? what if someone wants to do QA automation with the likes of selenium..worth it then? also SQL, is it worth learning? Thanks guys!

There are Selenium bindings for pretty much all the common languages. If you want to get into QA automation, I would become proficient in your language of choice, then learn how to use Selenium on top of it.

Also look into Cucumber.
BriareosGAF
Member
(09-18-2017, 01:25 PM)

Originally Posted by Spoiled Milk

Pouring out a 40 for the memories of my SPARCstation 20.
entremet
Member
(09-18-2017, 04:56 PM)
Did you guys see this?

https://www.w3.org/blog/wpwg/2017/09...ndation-track/

Pretty cool. I wonder if this would be under PCI?
cpp_is_king
Banned
(09-18-2017, 05:24 PM)

Originally Posted by entremet

Did you guys see this?

https://www.w3.org/blog/wpwg/2017/09...ndation-track/

Pretty cool. I wonder if this would be under PCI?

PCI has very little to do the communications between the card holder and the merchant. It almost entirely determines protocols for how the merchant handles your data once it gets it.

The only exception is (I believe) that it requires all card information to be encrypted during transmission. But this is so basic that there's no way it isn't covered by tge api.

So this should definitely be covered by PCI
Koren
Member
(09-19-2017, 12:19 AM)
You know you're too old when you see "PCI" and you think "the thing that killed the ISA bus, unfortunately"...

(really, ISA was the last time you could easily create your own PC hardware in direct connection with the motherboard... Now, you can still do it via USB, but it's harder, and nowhere near as fun)
cpp_is_king
Banned
(09-19-2017, 12:29 AM)
In other more exciting news, CppCon in 1 week! I can hardly contain my excitement.
Mike M
Nick N
(09-20-2017, 07:47 PM)
I have a challenge I need to complete for a job interview where I need to look up weather within a 750 mile radius and allow the user to book a flight to the nearest city with sunny weather.

I've been poking around the Openweathermap API, and it can return weather for cities in a radius around a given coordinate point, but it tops out at 50 locations, so that's no good for a 750 mile radius.

I'm having a bitch of a time finding *anything* what would just return weather from a given radius around a given coordinate. Anyone have any ideas? My only other idea is to fake it and just hit the API for multiple points, but that is horribly inefficient.