• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EDT 00:14
CEST 06:14
KST 13:14
  • Home
  • Forum
  • Calendar
  • Streams
  • Liquipedia
  • Features
  • Store
  • EPT
  • TL+
  • StarCraft 2
  • Brood War
  • Smash
  • Heroes
  • Counter-Strike
  • Overwatch
  • Liquibet
  • Fantasy StarCraft
  • TLPD
  • StarCraft 2
  • Brood War
  • Blogs
Forum Sidebar
Events/Features
News
Featured News
[ASL19] Finals Recap: Standing Tall9HomeStory Cup 27 - Info & Preview18Classic wins Code S Season 2 (2025)16Code S RO4 & Finals Preview: herO, Rogue, Classic, GuMiho0TL Team Map Contest #5: Presented by Monster Energy6
Community News
Flash Announces Hiatus From ASL60Weekly Cups (June 23-29): Reynor in world title form?13FEL Cracov 2025 (July 27) - $8000 live event19Esports World Cup 2025 - Final Player Roster16Weekly Cups (June 16-22): Clem strikes back1
StarCraft 2
General
Program: SC2 / XSplit / OBS Scene Switcher Statistics for vetoed/disliked maps The SCII GOAT: A statistical Evaluation Weekly Cups (June 23-29): Reynor in world title form? PiG Sty Festival #5: Playoffs Preview + Groups Recap
Tourneys
FEL Cracov 2025 (July 27) - $8000 live event RSL: Revival, a new crowdfunded tournament series Korean Starcraft League Week 77 Master Swan Open (Global Bronze-Master 2) [GSL 2025] Code S: Season 2 - Semi Finals & Finals
Strategy
How did i lose this ZvP, whats the proper response Simple Questions Simple Answers
Custom Maps
[UMS] Zillion Zerglings
External Content
Mutation # 480 Moths to the Flame Mutation # 479 Worn Out Welcome Mutation # 478 Instant Karma Mutation # 477 Slow and Steady
Brood War
General
Player “Jedi” cheat on CSL ASL20 Preliminary Maps SC uni coach streams logging into betting site Flash Announces Hiatus From ASL BGH Mineral Boosts Tutorial Video
Tourneys
[BSL20] Grand Finals - Sunday 20:00 CET [Megathread] Daily Proleagues Small VOD Thread 2.0 [BSL20] GosuLeague RO16 - Tue & Wed 20:00+CET
Strategy
Simple Questions, Simple Answers I am doing this better than progamers do.
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile What do you want from future RTS games? Beyond All Reason
Dota 2
Official 'what is Dota anymore' discussion
League of Legends
Heroes of the Storm
Simple Questions, Simple Answers Heroes of the Storm 2.0
Hearthstone
Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread Vanilla Mini Mafia
Community
General
US Politics Mega-thread Russo-Ukrainian War Thread Trading/Investing Thread Things Aren’t Peaceful in Palestine The Games Industry And ATVI
Fan Clubs
SKT1 Classic Fan Club! Maru Fan Club
Media & Entertainment
Anime Discussion Thread [Manga] One Piece [\m/] Heavy Metal Thread
Sports
2024 - 2025 Football Thread Formula 1 Discussion NBA General Discussion TeamLiquid Health and Fitness Initiative For 2023 NHL Playoffs 2024
World Cup 2022
Tech Support
Computer Build, Upgrade & Buying Resource Thread
TL Community
Blogs
Culture Clash in Video Games…
TrAiDoS
from making sc maps to makin…
Husyelt
Blog #2
tankgirl
StarCraft improvement
iopq
Trip to the Zoo
micronesia
Customize Sidebar...

Website Feedback

Closed Threads



Active: 507 users

The Big Programming Thread - Page 646

Forum Index > General Forum
Post a Reply
Prev 1 644 645 646 647 648 1031 Next
Thread Rules
1. This is not a "do my homework for me" thread. If you have specific questions, ask, but don't post an assignment or homework problem and expect an exact solution.
2. No recruiting for your cockamamie projects (you won't replace facebook with 3 dudes you found on the internet and $20)
3. If you can't articulate why a language is bad, don't start slinging shit about it. Just remember that nothing is worse than making CSS IE6 compatible.
4. Use [code] tags to format code blocks.
Acrofales
Profile Joined August 2010
Spain17970 Posts
June 29 2015 17:29 GMT
#12901
On June 30 2015 02:13 bangsholt wrote:
Meh - software engineering and computer science has this thing, where if you only work for the 40 hours you're supposed to and request actual overtime payment for your overtime. You're not a real programmer.

I'm very content with not being a real programmer

Eh, while it may also be a bit programmer culture thing, it's mostly a corporate thing. There are programmers in the office who get paid overtime. But the more senior employees get paid by performance. My contract states that I don't get paid overtime. I can get certain bonuses though. In practice, it means that I work whatever hours I have to to get the task done. I would probably get the bonus even if I didn't do that. Most of the people I knew at uni working in big companies have a similar setup. And I have worked in a small company too. There, we were 4 CS specialists (all MSc, so pretty highly educated), and worked til the work was done. It's a lot of fun to be part of something like that, but afterwards you look at the hours worked and the salary earned and realize that it didn't pay off at all.

But I think most companies end up being like that (not that I have much experience outside of CS): you either have a boring monotonous job where you work your 8 hours a day and strictly log overtime. Or you have a job that you can put some creativity and allows you to grow as a person, but anything extra you put in does not earn you more money.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
Last Edited: 2015-06-30 16:08:24
June 30 2015 15:32 GMT
#12902
been working on adding a sweet feature (allthough essentially just a shorthand) to my variant implementation (named abstract, unsafe for anything except my personal use):
transparent function call operators.

ie. if every type abstracted ({ type0, ..., typeN-1 } from abstract<type0, ..., typeN-1> provides a correctly qualified function call operator (qualified part is not 100%) for a given set of arguments ({arg_type0, ..., arg_typeM-1}), and the set of return types ({ return_type0, ..., return_typeN-1 }) has a common type, a function call operator is automatically exposed in the interface that looks ~like:

common_type_t<return_type0, ..., return_typeN-1>
abstract<type0, ..., typeN>::operator()(arg_type0, ..., arg_typeM-1) qualifier;

which does the dispatch to the concrete function call operators.

example:
      set of abstracted types is {cat_t, dog_t, worm_t}
      set of (qualified) argument types is {std::ostream&}
      set of return types is {void, void, void} with common type = void
      operator exposed in abstract<cat_t,dog_t,worm_t>'s interface is void operator()(std::ostream&);

#include<iostream>
#include<seq/seq.hpp>
#include<jeh/abstract.hpp>

using std::cout;

struct
cat_t
{
void
operator()(std::ostream& o)
{ o<<"meow\n"; }
};

struct
dog_t
{
void
operator()(std::ostream& o)
{ o<<"woof\n"; }
};

struct
worm_t
{
void
operator()(std::ostream& o)
{ o<<"squirm\n"; }
};

using animal_t=jeh::abstract<cat_t,dog_t,worm_t>;

int
main()
{
animal_t animal{cat_t{}};
animal(cout);
animal=dog_t{};
animal(cout);
animal=worm_t{};
animal(cout);
}

output:
[jeh@gimli workbench]$ ./workbench 
meow
woof
squirm

very simple polymorphism.

+ Show Spoiler [less simple relevant code] +

...
template<class symbolic,class... arg_t>
struct
functor_exists
{
template<class element,class=void>
struct
is_callable
{ using output=proto<bool,false>; };

template<class element>
struct
is_callable<element,conform<std::result_of_t<jeh::mimic<symbolic,element>(arg_t...)>>>
{ using output=proto<bool,true>; };

constexpr bool
operator()() const
{
return
not
seq::find<
seq::transform<elements,is_callable>,
proto<bool,false>
>();
}
};

template<class symbolic,class... arg_t>
struct
functor_return_type
{
template<class element>
struct
_
{ using output=std::result_of_t<mimic<symbolic,element>(arg_t...)>; };

using output=typename seq::forward<seq::transform<elements,_>,std::common_type>::type;
};

template<class... arg_t>
inline auto
operator()(arg_t&&... arg) const& ->
select_if<
functor_exists<symbolic_t const&,decltype(std::forward<arg_t>(arg))...>{}(),
typename functor_return_type<symbolic_t const&,decltype(std::forward<arg_t>(arg))...>::output
>
{ return deconstruct([&](const auto& value){ return value(std::forward<arg_t>(arg)...); },*this); }

template<class... arg_t>
inline auto
operator()(arg_t&&... arg) & ->
select_if<
functor_exists<symbolic_t&,decltype(std::forward<arg_t>(arg))...>{}(),
typename functor_return_type<symbolic_t&,decltype(std::forward<arg_t>(arg))...>::output
>
{ return deconstruct([&](auto& value){ return value(std::forward<arg_t>(arg)...); },*this); }

template<class... arg_t>
inline auto
operator()(arg_t&&... arg) && ->
select_if<
functor_exists<symbolic_t&&,decltype(std::forward<arg_t>(arg))...>{}(),
typename functor_return_type<symbolic_t&&,decltype(std::forward<arg_t>(arg))...>::output
>
{ return deconstruct([&](auto&& value){ return std::move(value)(std::forward<arg_t>(arg)...); },*this); }
...

conspired against by a confederacy of dunces.
Manit0u
Profile Blog Joined August 2004
Poland17243 Posts
Last Edited: 2015-07-01 02:06:42
July 01 2015 02:04 GMT
#12903
Your code formatting is killing me nunez... [type]<break><indent>[name][args] is freaking hard to follow.

And now, for some fun with PHP (I know you all hate it). Recently I was playing around with the most common and at the same time most obnoxious PHP data structure - an array. Since in PHP any variable can hold any value at any point in time you have to be extra careful with them. Imagine such a simple thing:


$arr = getSomeArray($someArgs);

$something = $arr[0];
$something = $arr[1];


All cool and dandy. Unless something went wrong down the line and instead of an array we get some other value or an array that's shorter than expected - we'll end up fatalling all the time. So we end up putting guards like that:


$arr = getSomeArray($someArgs);

if (is_array($arr)) {
if (isset($arr[0])) {
$something = $arr[0];
}

if (isset($arr[1])) {
$something = $arr[1];
}
}


Tedious. But it can be solved with array shifting, which will give us what we want or null if our array is empty or is not an array at all. We can check that later.


$arr = getSomeArray($someArgs);

$something = array_shift($arr);
$something = array_shift($arr);


Now, the funny thing is, that usually by looking at a code like that you'd expect the first stuff posted ($arr[0], $arr[1]) to change the value of $something. While the last example should in theory assign the same value to $something in both cases. Not so much. By default function arguments in PHP are passed by value, in case of array_shift they're passed by reference so by using array_shift we also change the $arr. While it might not be such a scary thing and if you know how it all works you immediately know that, but it can get very ugly very quickly since you can end up with some nasty code that's hard to read. Imagine this:


$something = array_shift($arr);

/*
Block of code
*/

if (something or other) {
/*
Some more code
*/

$something2 = array_shift($arr);
}


You see that and now you're thinking. OK, I know exactly what's happening here, but did the person who write it also know this? Did that person remember that the array was shifted before shifting it again?

Run into a bug just like that yestedray, when someone forgot about shifting the array beforehand and tried to shift it again. It's freaking annoying when if you want to do multiple shifts you have to add extra comments just to make your intentions clear:


/*
First shift -> get controller object
*/
$controller = array_shift($requestData);

// somewhere down the line

/*
Second shift -> get action name
*/
$action = array_shift($requestData);


I feel so dirty now...
Time is precious. Waste it wisely.
Acrofales
Profile Joined August 2010
Spain17970 Posts
July 01 2015 02:35 GMT
#12904
Thank you for reinforcing my hatred of php. I was on the verge of forgetting how much of a cesspool the language is. I particularly like this page, which aims to show some terrible things of php, but inadvertently ends up showing off some of the horrors of perl as well: http://tnx.nl/php.html

I particularly like how he thinks the following is a good idea:

lc $str cmp lc $str2
Manit0u
Profile Blog Joined August 2004
Poland17243 Posts
July 01 2015 02:48 GMT
#12905
On July 01 2015 11:35 Acrofales wrote:
Thank you for reinforcing my hatred of php. I was on the verge of forgetting how much of a cesspool the language is. I particularly like this page, which aims to show some terrible things of php, but inadvertently ends up showing off some of the horrors of perl as well: http://tnx.nl/php.html

I particularly like how he thinks the following is a good idea:

lc $str cmp lc $str2


Yeah, but I don't really think you should be using a 10-year old stuff to show this things. PHP has evolved pretty much since (but is still terrible). PHP 7 will solve a lot of issues though (like type hinting for ints, strings and such, thank the gods). Still a far way to go and I don't have much faith in Zend with their attitude of "PHP is not designed with programmers in mind" (if this one thing would change the PHP could actually become good as it would require cleaning up the mess, even at the cost of breaking backwards compatibility entirely).
Time is precious. Waste it wisely.
Nesserev
Profile Blog Joined January 2011
Belgium2760 Posts
July 01 2015 05:35 GMT
#12906
--- Nuked ---
Manit0u
Profile Blog Joined August 2004
Poland17243 Posts
July 01 2015 07:33 GMT
#12907
On July 01 2015 14:35 Nesserev wrote:
Any Europeans wanna take a year off and build a robot for EU to show that the Old Western Continent is best?


I wonder what it takes to build one of those robots :|


Besides knowledge? Time and money (with emphasis on money).
Time is precious. Waste it wisely.
nunez
Profile Blog Joined February 2011
Norway4003 Posts
July 01 2015 13:27 GMT
#12908
@manitou
my formatting doesn't jive well with constructors and conversion operators cuz they don't really have a name!
constructors are a bit special though with the member initializer list, but i got no excuse for the sweet, sweet, conversion operators.

i love my c++ typesystem, hard to imagine writing in a language without something similar.
even harder if you can't trust your fellow programmers to be aware of the functionality of the functions they use!
nice read.
conspired against by a confederacy of dunces.
Manit0u
Profile Blog Joined August 2004
Poland17243 Posts
Last Edited: 2015-07-01 22:38:32
July 01 2015 21:32 GMT
#12909
Oh, and if anyone else would like to read up on some of the flaws of PHP I recommend this blog (by the founder and creator of StackOverflow).

You should pay special attention to this link in said blog I like to re-read this from time to time and weep silently in the corner afterwards.
Time is precious. Waste it wisely.
BByte
Profile Joined August 2011
Finland49 Posts
Last Edited: 2015-07-01 22:59:59
July 01 2015 22:58 GMT
#12910
On July 01 2015 11:04 Manit0u wrote:

/*
First shift -> get controller object
*/
$controller = array_shift($requestData);

// somewhere down the line

/*
Second shift -> get action name
*/
$action = array_shift($requestData);



If inline comments are required, the function is often too long anyway. Regardless, in this case I'd use array destructuring. Something like this:


list($controller, $action) = $requestData;



On July 01 2015 11:35 Acrofales wrote:
Thank you for reinforcing my hatred of php. I was on the verge of forgetting how much of a cesspool the language is. I particularly like this page, which aims to show some terrible things of php, but inadvertently ends up showing off some of the horrors of perl as well: http://tnx.nl/php.html


PHP certainly has more than its fair share of warts and worse. I wouldn't even argue with people calling it a terrible language altogether.

Having mutable data structures and functions to manipulate them does not seem like the most pressing problem however, and it's one that exists in many languages. The purpose of the array_shift function is to return the first value in the array and remove it from the array.

It's usually easy enough to avoid mutating data in PHP, though of course it can't be enforced with arrays.

That page is pretty old and doesn't really cover the main problems of modern PHP that well, though native function count / naming / other inconsistencies is still one of the biggest flaws. Even the infamous article PHP: a fractal of bad design (Manit0u posted a link above) is more accurate.

And PHP standard library could certainly use additional data structures, including immutable ones.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2015-07-02 06:32:52
July 02 2015 06:28 GMT
#12911
On June 28 2015 03:17 phar wrote:
Sorry, I mean this (my terminology is probably off):

Fast:

ArrayList<Bar> foo;

for (Bar b : foo) {
something(b);
}


Fast (this is probably what you would also call random access, my fault for using wrong word sorry):

ArrayList<Bar> foo;

Bar b = foo.get(index);


Slow:

ArrayList<Bar> foo;
Bar b;

if (foo.contains(b)) {
something(b);
}



This may be easier if you just post your code, I think we're having a hard time understanding exactly what your issue is because we're just guessing as to what it is you're doing exactly. In particular that high of memory usage seems wrong if your algorithm is supposed to be linaer space (it is linear space, yea? you're not using one of those crazy node^2.4 time / node^2 space complexity algorithms, right?)

20 microseconds for a single access into a HashSet or ImmutableSet still sounds kinda high. Though, for example, if you're using ImmutableSet and on an old version, there are some hilariously degenerate cases where a contains could take ~ms.


+ Show Spoiler +


final List<ArrayList<Integer>> smallerEdges = new ArrayList<ArrayList<Integer>>(graph.numVertices);
final List<HashSet<Integer>> biggerEdges = new ArrayList<HashSet<Integer>>(graph.numVertices);

String strLine = null;
while ((strLine = graph.bufferedReader.readLine()) != null && !strLine.equals("")) {
String parts[] = strLine.split(": ", 2);

final Integer vertex = Integer.parseInt(parts[0]);

final ArrayList<Integer> smallEdges = new ArrayList<Integer>();
final ArrayList<Integer> bigEdges = new ArrayList<Integer>();

if (parts.length > 1) {
StringTokenizer tokenizer = new StringTokenizer(parts[1]);

while (tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken();
final Integer edge = Integer.parseInt(token);
if (edge < vertex) {
smallEdges.add(edge);
} else {
bigEdges.add(edge);
}
}
}

Collections.sort(smallEdges);
Collections.sort(bigEdges);

smallerEdges.add(new ArrayList<Integer>(smallEdges));
biggerEdges.add(new LinkedHashSet<Integer>(bigEdges));
}




// step is 1, initialPosition is 0

for (int i = initialPosition; i < smallerEdges.size(); i += step) {
for (Integer smallVertex : smallerEdges.get(i)) {
for (Integer bigVertex : biggerEdges.get(i)) {
if (biggerEdges.get(smallVertex).contains(bigVertex)) {
triangles.add(new Triangle(smallVertex, i, bigVertex));
}
}
}
}


The algorithm efficiency isn't the problem, the problem is that I'm under-utilizing the cache, so I probably need another algorithm so my accesses are more localized...
There is no one like you in the universe.
Manit0u
Profile Blog Joined August 2004
Poland17243 Posts
July 02 2015 07:43 GMT
#12912
On July 02 2015 15:28 Blisse wrote:
Show nested quote +
On June 28 2015 03:17 phar wrote:
Sorry, I mean this (my terminology is probably off):

Fast:

ArrayList<Bar> foo;

for (Bar b : foo) {
something(b);
}


Fast (this is probably what you would also call random access, my fault for using wrong word sorry):

ArrayList<Bar> foo;

Bar b = foo.get(index);


Slow:

ArrayList<Bar> foo;
Bar b;

if (foo.contains(b)) {
something(b);
}



This may be easier if you just post your code, I think we're having a hard time understanding exactly what your issue is because we're just guessing as to what it is you're doing exactly. In particular that high of memory usage seems wrong if your algorithm is supposed to be linaer space (it is linear space, yea? you're not using one of those crazy node^2.4 time / node^2 space complexity algorithms, right?)

20 microseconds for a single access into a HashSet or ImmutableSet still sounds kinda high. Though, for example, if you're using ImmutableSet and on an old version, there are some hilariously degenerate cases where a contains could take ~ms.


+ Show Spoiler +


final List<ArrayList<Integer>> smallerEdges = new ArrayList<ArrayList<Integer>>(graph.numVertices);
final List<HashSet<Integer>> biggerEdges = new ArrayList<HashSet<Integer>>(graph.numVertices);

String strLine = null;
while ((strLine = graph.bufferedReader.readLine()) != null && !strLine.equals("")) {
String parts[] = strLine.split(": ", 2);

final Integer vertex = Integer.parseInt(parts[0];

final ArrayList<Integer> smallEdges = new ArrayList<Integer>();
final ArrayList<Integer> bigEdges = new ArrayList<Integer>();

if (parts.length > 1) {
StringTokenizer tokenizer = new StringTokenizer(parts[1];

while (tokenizer.hasMoreTokens()) {
String token = tokenizer.nextToken();
final Integer edge = Integer.parseInt(token);
if (edge < vertex) {
smallEdges.add(edge);
} else {
bigEdges.add(edge);
}
}
}

Collections.sort(smallEdges);
Collections.sort(bigEdges);

smallerEdges.add(new ArrayList<Integer>(smallEdges));
biggerEdges.add(new LinkedHashSet<Integer>(bigEdges));
}




// step is 1, initialPosition is 0

for (int i = initialPosition; i < smallerEdges.size(); i += step) {
for (Integer smallVertex : smallerEdges.get(i)) {
for (Integer bigVertex : biggerEdges.get(i)) {
if (biggerEdges.get(smallVertex).contains(bigVertex)) {
triangles.add(new Triangle(smallVertex, i, bigVertex));
}
}
}
}


The algorithm efficiency isn't the problem, the problem is that I'm under-utilizing the cache, so I probably need another algorithm so my accesses are more localized...


Using iterators might help you a bit: http://www.cprogramming.com/tutorial/stl/iterators.html
Time is precious. Waste it wisely.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
July 02 2015 09:13 GMT
#12913
Not really. Foreach loops are backed by Iterators anyways.

The language is Java if that helps.
There is no one like you in the universe.
netherh
Profile Blog Joined November 2011
United Kingdom333 Posts
July 02 2015 15:33 GMT
#12914
On July 02 2015 18:13 Blisse wrote:
Not really. Foreach loops are backed by Iterators anyways.

The language is Java if that helps.


What does your profiler say about what's taking up all the time?
Manit0u
Profile Blog Joined August 2004
Poland17243 Posts
July 02 2015 19:17 GMT
#12915
I can tell you what's taking up all of my time..

Implementing dumb RFID readers and client demanding the system to basically read the user's mind so I'm wasting a ton of time navigating the JavaScript maze of a dozen modal windows and twice that number of ajax calls. Working 10 days a week is not fun
Time is precious. Waste it wisely.
Blisse
Profile Blog Joined July 2010
Canada3710 Posts
Last Edited: 2015-07-03 02:29:11
July 03 2015 02:25 GMT
#12916
On July 03 2015 00:33 netherh wrote:
Show nested quote +
On July 02 2015 18:13 Blisse wrote:
Not really. Foreach loops are backed by Iterators anyways.

The language is Java if that helps.


What does your profiler say about what's taking up all the time?


the nested for loops costs about as much as the contains operations

turns out it was probably the algorithm efficiency, nested for loops are bad. we figured out a more effective solution, i'll share after the deadline passes if y'all are interested because it's actually pretty neat
There is no one like you in the universe.
sabas123
Profile Blog Joined December 2010
Netherlands3122 Posts
July 03 2015 08:50 GMT
#12917
On July 03 2015 11:25 Blisse wrote:
Show nested quote +
On July 03 2015 00:33 netherh wrote:
On July 02 2015 18:13 Blisse wrote:
Not really. Foreach loops are backed by Iterators anyways.

The language is Java if that helps.


What does your profiler say about what's taking up all the time?


the nested for loops costs about as much as the contains operations

turns out it was probably the algorithm efficiency, nested for loops are bad. we figured out a more effective solution, i'll share after the deadline passes if y'all are interested because it's actually pretty neat

You made me curious, so please share it
The harder it becomes, the more you should focus on the basics.
catplanetcatplanet
Profile Blog Joined March 2012
3829 Posts
July 04 2015 15:04 GMT
#12918
i recently finished my first course in c++. having had a few years of programming coursework in high school (basic java and python stuff) so i started with the data structures and algorithms course. it was a good way to start learning the language, but i'm having some problems trying to explore on my own

first of all now that i'm back on my os x laptop i'm sort of corralled into using xcode. for the course i just stuck to beloved vim and i've never really had to use a full ide so maybe that's part of my confusion. a bigger deal is that os x compatibility seems to be an issue for some things

also i don't really get how to learn to download and learn to use libraries and APIs, seeing as my course just involved basic command line tools with the standard library. well say i want to learn a bit about opengl now. luckily the framework is in xcode, so i don't have to download anything. but os x just got 4.1 compatibility with mavericks, and all the tutorials i can find online either assume building on knowledge of older versions or are filled with lots of confuso computo lingo that i am unfortunately not yet familiar with. on the other hand java made it much easier to learn graphics as it had some graphics functionality in the standard API

so i guess my questions are 1) is xcode a bad idea? 2) can you recommend some introductory material for learning simple graphics or user interface or game programming or the like with libraries that would work on mac?

ALSO quick one, good IDE for python or java should I decide to take it easy?

thanks in advance, hope i described my confusion clearly
I think it's finally time to admit it might not be the year of Pet
Cyx.
Profile Joined November 2010
Canada806 Posts
Last Edited: 2015-07-04 22:46:12
July 04 2015 22:43 GMT
#12919
On July 05 2015 00:04 catplanetcatplanet wrote:
first of all now that i'm back on my os x laptop i'm sort of corralled into using xcode. for the course i just stuck to beloved vim and i've never really had to use a full ide so maybe that's part of my confusion. a bigger deal is that os x compatibility seems to be an issue for some things

I've never heard of anyone who really liked xcode. Macs were standard issue at work last summer and everyone used emacs or vim, you can use command line g++ to build simple things and make to build complicated things, if you try hard enough it's still a Unix system at heart with all the good tools :D

On July 05 2015 00:04 catplanetcatplanet wrote:
also i don't really get how to learn to download and learn to use libraries and APIs, seeing as my course just involved basic command line tools with the standard library. well say i want to learn a bit about opengl now. luckily the framework is in xcode, so i don't have to download anything. but os x just got 4.1 compatibility with mavericks, and all the tutorials i can find online either assume building on knowledge of older versions or are filled with lots of confuso computo lingo that i am unfortunately not yet familiar with. on the other hand java made it much easier to learn graphics as it had some graphics functionality in the standard API

http://learnopengl.com/ is a modern OpenGL resource which is nice, and geared towards beginners, I haven't checked it out in a few months but I think I remember pretty good intro lessons where they describe the process of setting up your build environment.

edit: those tutorials use Visual Studio which may not be great for you, but they also describe using CMake to set up your VS projects so you should be able to pretty easily generate a make project instead.

On July 05 2015 00:04 catplanetcatplanet wrote:
ALSO quick one, good IDE for python or java should I decide to take it easy?

thanks in advance, hope i described my confusion clearly

Most of the people I work with who write Python frequently either use https://www.jetbrains.com/pycharm/ or emacs/vim :D
catplanetcatplanet
Profile Blog Joined March 2012
3829 Posts
Last Edited: 2015-07-05 08:08:31
July 05 2015 07:50 GMT
#12920
On July 05 2015 07:43 Cyx. wrote:
Show nested quote +
On July 05 2015 00:04 catplanetcatplanet wrote:
first of all now that i'm back on my os x laptop i'm sort of corralled into using xcode. for the course i just stuck to beloved vim and i've never really had to use a full ide so maybe that's part of my confusion. a bigger deal is that os x compatibility seems to be an issue for some things

I've never heard of anyone who really liked xcode. Macs were standard issue at work last summer and everyone used emacs or vim, you can use command line g++ to build simple things and make to build complicated things, if you try hard enough it's still a Unix system at heart with all the good tools :D

Show nested quote +
On July 05 2015 00:04 catplanetcatplanet wrote:
also i don't really get how to learn to download and learn to use libraries and APIs, seeing as my course just involved basic command line tools with the standard library. well say i want to learn a bit about opengl now. luckily the framework is in xcode, so i don't have to download anything. but os x just got 4.1 compatibility with mavericks, and all the tutorials i can find online either assume building on knowledge of older versions or are filled with lots of confuso computo lingo that i am unfortunately not yet familiar with. on the other hand java made it much easier to learn graphics as it had some graphics functionality in the standard API

http://learnopengl.com/ is a modern OpenGL resource which is nice, and geared towards beginners, I haven't checked it out in a few months but I think I remember pretty good intro lessons where they describe the process of setting up your build environment.

edit: those tutorials use Visual Studio which may not be great for you, but they also describe using CMake to set up your VS projects so you should be able to pretty easily generate a make project instead.

Show nested quote +
On July 05 2015 00:04 catplanetcatplanet wrote:
ALSO quick one, good IDE for python or java should I decide to take it easy?

thanks in advance, hope i described my confusion clearly

Most of the people I work with who write Python frequently either use https://www.jetbrains.com/pycharm/ or emacs/vim :D

thanks so much for the answers and the opengl site! i've successfully built the library and am on my way to finally learning some opengl

one more question, since I had to use cmake to generate files for the IDE (specifically xcode) is there a different way of getting this to work with a command line editor? and what exactly is a make project?

e: upon further research it appears that editing in vim and building with the xcodebuild command might be the way to go. i will try this out later
I think it's finally time to admit it might not be the year of Pet
Prev 1 644 645 646 647 648 1031 Next
Please log in or register to reply.
Live Events Refresh
Next event in 5h 46m
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
RuFF_SC2 195
ROOTCatZ 80
StarCraft: Brood War
Leta 856
Icarus 8
LuMiX 5
Dota 2
NeuroSwarm169
League of Legends
JimRising 826
Heroes of the Storm
Khaldor158
Other Games
summit1g10805
tarik_tv4796
WinterStarcraft300
ViBE192
ProTech42
SortOf0
Organizations
Other Games
BasetradeTV48
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• Berry_CruncH308
• Hupsaiya 89
• davetesta60
• practicex 33
• Kozan
• LaughNgamezSOOP
• sooper7s
• AfreecaTV YouTube
• intothetv
• Migwel
• IndyKCrew
StarCraft: Brood War
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
League of Legends
• Lourlo932
• masondota2791
• Stunt386
Other Games
• Scarra3576
Upcoming Events
RSL Revival
5h 46m
Clem vs Classic
SHIN vs Cure
FEL
7h 46m
WardiTV European League
7h 46m
BSL: ProLeague
13h 46m
Dewalt vs Bonyth
Replay Cast
1d 19h
Sparkling Tuna Cup
2 days
WardiTV European League
2 days
The PondCast
3 days
Replay Cast
3 days
RSL Revival
4 days
[ Show More ]
Replay Cast
4 days
RSL Revival
5 days
FEL
5 days
RSL Revival
6 days
FEL
6 days
FEL
6 days
Liquipedia Results

Completed

BSL 2v2 Season 3
HSC XXVII
Heroes 10 EU

Ongoing

JPL Season 2
BSL Season 20
Acropolis #3
KCM Race Survival 2025 Season 2
CSL 17: 2025 SUMMER
Copa Latinoamericana 4
Championship of Russia 2025
RSL Revival: Season 1
Murky Cup #2
BLAST.tv Austin Major 2025
ESL Impact League Season 7
IEM Dallas 2025
PGL Astana 2025
Asian Champions League '25
BLAST Rivals Spring 2025
MESA Nomadic Masters
CCT Season 2 Global Finals
IEM Melbourne 2025

Upcoming

2025 ACS Season 2: Qualifier
CSLPRO Last Chance 2025
2025 ACS Season 2
CSLPRO Chat StarLAN 3
K-Championship
uThermal 2v2 Main Event
SEL Season 2 Championship
FEL Cracov 2025
Esports World Cup 2025
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual
Esports World Cup 2025
BLAST Bounty Fall 2025
BLAST Bounty Fall Qual
IEM Cologne 2025
FISSURE Playground #1
TLPD

1. ByuN
2. TY
3. Dark
4. Solar
5. Stats
6. Nerchio
7. sOs
8. soO
9. INnoVation
10. Elazer
1. Rain
2. Flash
3. EffOrt
4. Last
5. Bisu
6. Soulkey
7. Mini
8. Sharp
Sidebar Settings...

Advertising | Privacy Policy | Terms Of Use | Contact Us

Original banner artwork: Jim Warren
The contents of this webpage are copyright © 2025 TLnet. All Rights Reserved.