• Log InLog In
  • Register
Liquid`
Team Liquid Liquipedia
EST 13:54
CET 19:54
KST 03:54
  • 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
TL.net Map Contest #21: Winners10Intel X Team Liquid Seoul event: Showmatches and Meet the Pros10[ASL20] Finals Preview: Arrival13TL.net Map Contest #21: Voting12[ASL20] Ro4 Preview: Descent11
Community News
StarCraft, SC2, HotS, WC3, Returning to Blizzcon!44$5,000+ WardiTV 2025 Championship7[BSL21] RO32 Group Stage4Weekly Cups (Oct 26-Nov 2): Liquid, Clem, Solar win; LAN in Philly2Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win10
StarCraft 2
General
Mech is the composition that needs teleportation t StarCraft, SC2, HotS, WC3, Returning to Blizzcon! RotterdaM "Serral is the GOAT, and it's not close" TL.net Map Contest #21: Winners Weekly Cups (Oct 20-26): MaxPax, Clem, Creator win
Tourneys
Sparkling Tuna Cup - Weekly Open Tournament Constellation Cup - Main Event - Stellar Fest $5,000+ WardiTV 2025 Championship Merivale 8 Open - LAN - Stellar Fest Sea Duckling Open (Global, Bronze-Diamond)
Strategy
Custom Maps
Map Editor closed ?
External Content
Mutation # 499 Chilling Adaptation Mutation # 498 Wheel of Misfortune|Cradle of Death Mutation # 497 Battle Haredened Mutation # 496 Endless Infection
Brood War
General
FlaSh on: Biggest Problem With SnOw's Playstyle BW General Discussion BGH Auto Balance -> http://bghmmr.eu/ Where's CardinalAllin/Jukado the mapmaker? [ASL20] Ask the mapmakers — Drop your questions
Tourneys
[ASL20] Grand Finals [BSL21] RO32 Group A - Saturday 21:00 CET [Megathread] Daily Proleagues [BSL21] RO32 Group B - Sunday 21:00 CET
Strategy
Current Meta PvZ map balance How to stay on top of macro? Soma's 9 hatch build from ASL Game 2
Other Games
General Games
Stormgate/Frost Giant Megathread Nintendo Switch Thread Path of Exile Should offensive tower rushing be viable in RTS games? Dawn of War IV
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
Deck construction bug Heroes of StarCraft mini-set
TL Mafia
TL Mafia Community Thread SPIRED by.ASL Mafia {211640}
Community
General
US Politics Mega-thread The Games Industry And ATVI Russo-Ukrainian War Thread Things Aren’t Peaceful in Palestine YouTube Thread
Fan Clubs
White-Ra Fan Club The herO Fan Club!
Media & Entertainment
[Manga] One Piece Anime Discussion Thread Movie Discussion! Korean Music Discussion Series you have seen recently...
Sports
Formula 1 Discussion 2024 - 2026 Football Thread NBA General Discussion MLB/Baseball 2023 TeamLiquid Health and Fitness Initiative For 2023
World Cup 2022
Tech Support
SC2 Client Relocalization [Change SC2 Language] Linksys AE2500 USB WIFI keeps disconnecting Computer Build, Upgrade & Buying Resource Thread
TL Community
The Automated Ban List Recent Gifted Posts
Blogs
Learning my new SC2 hotkey…
Hildegard
Coffee x Performance in Espo…
TrAiDoS
Saturation point
Uldridge
DnB/metal remix FFO Mick Go…
ImbaTosS
Reality "theory" prov…
perfectspheres
Our Last Hope in th…
KrillinFromwales
Customize Sidebar...

Website Feedback

Closed Threads



Active: 1638 users

The Big Programming Thread - Page 646

Forum Index > General Forum
Post a Reply
Prev 1 644 645 646 647 648 1032 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
Spain18112 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
Poland17421 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
Spain18112 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
Poland17421 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
Poland17421 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
Poland17421 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
Poland17421 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
Poland17421 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
3830 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
3830 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 1032 Next
Please log in or register to reply.
Live Events Refresh
IPSL
18:00
Ro24 Group F
JDConan vs WIZARD
WolFix vs Cross
Liquipedia
LAN Event
15:00
Stellar Fest: Day 3
Clem vs Zoun
ComeBackTV 1340
UrsaTVCanada675
IndyStarCraft 345
EnkiAlexander 75
LiquipediaDiscussion
[ Submit Event ]
Live Streams
Refresh
StarCraft 2
IndyStarCraft 345
BRAT_OK 103
Railgan 56
ProTech56
StarCraft: Brood War
Backho 53
scan(afreeca) 16
Dota 2
qojqva3073
Dendi1282
Super Smash Bros
hungrybox380
Heroes of the Storm
Khaldor515
Other Games
gofns7794
FrodaN1329
Grubby1186
B2W.Neo764
ceh9377
Liquid`VortiX313
Hui .161
Sick154
mouzStarbuck115
ToD102
ArmadaUGS88
Mew2King77
Organizations
Other Games
gamesdonequick736
StarCraft 2
Blizzard YouTube
StarCraft: Brood War
BSLTrovo
sctven
[ Show 18 non-featured ]
StarCraft 2
• Adnapsc2 22
• davetesta13
• Kozan
• AfreecaTV YouTube
• sooper7s
• intothetv
• IndyKCrew
• LaughNgamezSOOP
• Migwel
StarCraft: Brood War
• Michael_bg 10
• Pr0nogo 7
• STPLYoutube
• ZZZeroYoutube
• BSLYoutube
Dota 2
• WagamamaTV572
• Ler84
League of Legends
• Nemesis3477
• Shiphtur976
Upcoming Events
BSL 21
1h 7m
spx vs rasowy
HBO vs KameZerg
Cross vs Razz
dxtr13 vs ZZZero
OSC
4h 7m
OSC
14h 7m
Wardi Open
17h 7m
Wardi Open
21h 7m
Replay Cast
1d 4h
WardiTV Korean Royale
1d 17h
Replay Cast
2 days
Kung Fu Cup
2 days
Classic vs Solar
herO vs Cure
Reynor vs GuMiho
ByuN vs ShoWTimE
Tenacious Turtle Tussle
3 days
[ Show More ]
The PondCast
3 days
RSL Revival
3 days
Solar vs Zoun
MaxPax vs Bunny
Kung Fu Cup
3 days
WardiTV Korean Royale
3 days
Replay Cast
4 days
RSL Revival
4 days
Classic vs Creator
Cure vs TriGGeR
Kung Fu Cup
4 days
CranKy Ducklings
5 days
RSL Revival
5 days
herO vs Gerald
ByuN vs SHIN
Kung Fu Cup
5 days
BSL 21
6 days
Tarson vs Julia
Doodle vs OldBoy
eOnzErG vs WolFix
StRyKeR vs Aeternum
Sparkling Tuna Cup
6 days
RSL Revival
6 days
Reynor vs sOs
Maru vs Ryung
Kung Fu Cup
6 days
WardiTV Korean Royale
6 days
Liquipedia Results

Completed

Proleague 2025-11-07
SC4ALL: StarCraft II
Eternal Conflict S1

Ongoing

C-Race Season 1
IPSL Winter 2025-26
KCM Race Survival 2025 Season 4
SOOP Univ League 2025
YSL S2
BSL Season 21
Stellar Fest: Constellation Cup
IEM Chengdu 2025
PGL Masters Bucharest 2025
Thunderpick World Champ.
CS Asia Championships 2025
ESL Pro League S22
StarSeries Fall 2025
FISSURE Playground #2
BLAST Open Fall 2025
BLAST Open Fall Qual

Upcoming

SLON Tour Season 2
BSL 21 Non-Korean Championship
Acropolis #4
IPSL Spring 2026
HSC XXVIII
RSL Offline Finals
WardiTV 2025
RSL Revival: Season 3
META Madness #9
BLAST Bounty Winter 2026: Closed Qualifier
eXTREMESLAND 2025
ESL Impact League Season 8
SL Budapest Major 2025
BLAST Rivals Fall 2025
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.