[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/dpt/ - Daily Programming Thread:

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 319
Thread images: 25

File: sicp_anime_girl.png (176KB, 441x421px) Image search: [Google]
sicp_anime_girl.png
176KB, 441x421px
Trying to read edition.

Previous thread: >>61905927

What are you working on /g/?
>>
File: golang.png (124KB, 600x600px) Image search: [Google]
golang.png
124KB, 600x600px
>>61915702
First for Go. Why haven't you learnt Go yet /dpt/?
>>
>>61915718
can you implement map in Go?
>>
>>61915726
Go already has maps built in.
>>
>>61915718
can I implement reduce for a numeric tower while keeping it type safe?
>>
>>61915734
I'm speaking of the higher order function.
>>
>>61915718
It doesn't bring anything new to the table.
>>
>>61915637
this gives me the error "type 'Dictionary' does not provide a call operator"

I mean that something like the following doesn't work as dict.size() returns 0.
Foo::somefunc() {
if (dict.contains(str))
...
}


>>61915647
I think what you've described is the case. I'll have to read about make_unique/make_shared. I tried modifying the code for heap allocation using the new keyword, but attempting to access dict led to segmentation faults then.
>>
>>61915794
actually i misread the code, that compiles fine, but still an empty dictionary from other functions.
>>
>>61915794
Can you link the code that you have? (The relevant bits).
>>
https://github.com/rust-lang/rfcs/pull/2108
I always thought they cared a lot about backwards compatibility and didn't want to break it.
>>
>>61915842
what do you expect from a community that gathered all the rockstar "move fast and break things" crowd? 1.0 is the new 0.1
>>
>>61915718
Working on it. I'm going to be that guy who's doing Scheme in Go for the next couple months.
Seems nobody else has made a Scheme implementation with STM yet, so I might as well try to be the first.
>>61915605
That's not something I'm familiar with doing. The -O3 option is as good as it gets with purely gcc as far as I know, but I could very well be wrong.
Again, barring little tiny extra optimizations you're not going to get much out of this. But if you're just doing this for kicks, go wild, man.
>>
>>61915824

// Dictionary.h
#ifndef SRC_DICTIONARY_H_
#define SRC_DICTIONARY_H_
#include <set>
#include <string>
#endif /* SRC_DICTIONARY_H_ */

class Dictionary {
private:
public:
Dictionary();
std::set<std::string> words;
Dictionary(std::string);
bool contains(std::string const&) const;
};

// Dictionary.cpp
#include <fstream>
#include "Dictionary.h"

Dictionary::Dictionary() {
Dictionary("/usr/share/dict/words");
}

Dictionary::Dictionary(std::string loc) {
std::ifstream input(loc);
for (std::string line; std::getline(input, line);)
words.insert(line);
}

bool Dictionary::contains(std::string const& word) const {
return words.count(word);
}

// Foo.h
#include "Dictionary.h"

#ifndef SRC_Foo_H_
#define SRC_Foo_H_
#include <iostream>
#include <string>
#endif


class Foo {
private:
Dictionary dict;
//void initializeDictionary(std::string);
public:
Foo();
Foo(std::string);
~Foo();
void start();
};

// Foo.cpp
#include "Foo.h"

// Constructor //
Foo::Foo() {
Foo("/usr/share/dict/words");
}

// Constructor //
Foo::Foo(std::string s) : dict(s) {
std::cout << "dict.words.size(): " << dict.words.size() << std::endl;
}

Foo::~Foo() {}

void Foo::start() {
std::string s = "test";
std::cout << "dict.words.size(): " << dict.words.size() << std::endl;
if (dict.contains(s))
std::cout << "found word" << std::endl;
return;
}

// main.cpp
#include "Foo.h"

int main(int argc, char** argv) {
Foo f;
f.start();
}
>>
>>61915982
Dictionary::Dictionary() {
Dictionary("/usr/share/dict/words");
}

There's your problem. It's been a while since I used C++, but switching that to read something like:

Dictionary::Dictionary() : Dictionary("/usr/share/dict/words") {}


should work. Right now you're trying to actually call the not-actually-overloaded call operator, which of course Dictionary doesn't provide. The proper way to call another constructor is what I posted, I think - I didn't actually test this, but it should work.
>>
>>61916032
Does that even work? I'd just use a default parameter personally, it seems clearer that way.
>>
Need algorithm help. I'm programming in C. I have an arbitrary length array (assume it's 1000+ elements) full of numbers, some of the numbers are likely to be duplicates. Whats a fast way I can find all the duplicate numbers (the original numbers can be left alone).

In python I would just add them all to a hashset, and if it failed I would know there is a collision, but I don't know how to do this in C without just looping slowly iteratively through the array comparing every element.
>>
>>61916047
That is the correct way to chain your constructor calls.
>>
>>61916047
It should work (it's the way C++11 onward allows constructors to call other constructors), but you're right, a default parameter would be clearer. Good catch, anon.
>>
>>61916032
This is correct. (pre C++11 even this wasn't valid.).
As a style tip, why not use a default parameter in a single explicit ctor?
(Reformatted a bit but something like this (adjust where applicable):)
class Foo {
public:
explicit Foo(const std::string &);
void start();

private:
Dictionary dict;
};

Foo::Foo(const std::string& s = "/usr/share/dict/words")
: dict(s) {
std::cout << "dict.words.size(): " << dict.words.size() << std::endl;
}
>>
>>61916032
>It's been a while since I used
thanks for the explanation. this works.

the compiler informs me that delegating constructors is permitted only in C++11, which is what I always compile against. if I hadn't/couldn't I would just need to overload the call operator?
>>
>>61916064
do your own homework
>>
>>61916088
No, the call operator is for something completely different. It's a mistake and a misunderstanding.
>>
Do you know any websites with exercises helping to practice object oriented programming (I mean creating classes, methods etc.) in C#?
>>
>>61916088
You probably want to go with what >>61916077 posted for clarity's sake, but to answer your question, nah, that's something completely different. Far as I know default arguments still work in C++03, so if for some reason you'd need to support that, I'd go with the default argument snippet the other guy posted.
>>
>>61916105
search for "oop in C#"
>>
>>61916032
>>61916070
>>61916072
>>61916077
>>61916104
>>61916115

thanks for all the kind help anons :)
>>
>>61916090
It's not homework you insolent retard, I'm rewriting a duplicate file finder in C that I already wrote in python. Next time you crowd a thread with a reply, make sure it's not useless.
>>
         Document doc = Jsoup.connect("http://boards.4chan.org/g/catalog").get();

Element link = doc.select("div#content div#threads").first();

Elements threads = link.getAllElements();

System.out.println(threads.size()); // prints out 1, it needs to be 150


Can anyone help me with this? I'm trying to list all /g/ threads.
Hierarchy is div#content > div#threads >> div.thread > div.threadIcons/div.teaser and one more div with title.
For some reason I can list all elements inside div with the ID "threads".
>>
>>61916064
Sort it and run through the array while checking if the next element in the array is equal to the one you're currently iterating on. Bam, O(n log n) solution.
>>
>>61916160
use the 4chan API

A list of thread IDs, their modification times, and respective pages can be found here:
https://a.4cdn.org/g/threads.json
>>
File: why_c_is_shit.png (154KB, 1354x347px) Image search: [Google]
why_c_is_shit.png
154KB, 1354x347px
C is deprecated and shit. Proof me wrong.
>protip: you can't
>>
>>61916180
Thanks.
>>
>>61916287
Sod off.
>>
>>61916287
>C is deprecated and shit.
>deprecated
There is nothing that has deprecated C.
>shit
Every language is shit, C being shit means nothing.
>>
>>61916287
>C is deprecated and shit
prove you're right with your arguments.

what's that? you can't? so shut the fuck up
>>
The GNU Compiler Collection version 7.2 has been released.

https://gcc.gnu.org/ml/gcc/2017-08/msg00129.html
>>
>>61916325
>C is worth using

You're the one who implicitly makes this affirmative claim. Defend C.
>>
>>61916353
you said
>C is deprecated and shit

prove it. i have all day.
>>
WHY CAN'T I SET UP A CONDITIONAL BREAKPOINT IN GDB WHEN DEBUGGING RUST CODE FOR FUCK'S SAKE
>>
>>61916369
>Not looking at the image >>61916287
>>
>>61916385
>using rust
lol
>>
>>61916388
>not being able to come up with his own arguments.

we're done here.
>>
>>61916287
>anti-efficient due to a number of relationships between processor, memory, and the outside world
it's the most efficient high-level programming language

>not clean
it is clean

>not fast
it is fast

>zero-terminated vector
what the fuck am I reading
>>
>>61916385
So is there a non-shit community for rust if you don't want anything to do with the official """community"""
>>
>>61916402
I actually enjoy it. Long ago I designed a language that I thought I'd enjoy using for everything and even though it didn't have all the lifetime/borrowing things it was quite close to Rust.
>>
File: 1451292793788.jpg (68KB, 645x773px) Image search: [Google]
1451292793788.jpg
68KB, 645x773px
>>61916385
>he doesn't debug himst programs with print statements
>>
>>61916369
That wasn't me, though. Every language is deprecated and shit by default. This is the natural state of any programming language.

One must laud the benefits of a language for it to be relevant; others don't have the burden of proving something is bad.
>>
>>61916432
I ask my questions on the mozilla's IRC channels and I never had to deal with anything SJW. I can't even remember why Rust is considered SJW anymore.

>>61916448
I always start by doing that but when I spend more than an hour on fixing a bug I switch to gdb instead.
>>
>>61916431
>>zero-terminated vector
>what the fuck am I reading
argv[argc] == nullptr
>>
File: 1418203280813.png (296KB, 521x493px) Image search: [Google]
1418203280813.png
296KB, 521x493px
>>61916471
Did you try testing the waters by making a tranny or #BlueLivesMatter joke?
>>
>>61916520
Why the fuck would you do that in a channel dedicated to talking about programming languages, you stupid motherfucker?
>>
>>61916534
That reaction was all I needed
>>
>TFW too brainlet to write a function that inserts an element at the end of the list

What's the idea behind it? Is the function supposed to call itself until there's an empty list then replace it with the element followed by the empty list?

Apologies if I break any rule
>>
>>61916570
What programming language are we talking about here?
>>
>>61916587
Haskell
>>
>>61916591
Can't you just do something like list ++ [element] ?
>>
>>61916608
I want to understand how these built-in functions work.
>>
>>61916628
I might be very wrong here since I know nothing about haskell but some things are implemented in the runtime because they can't be implemented any other way. I wouldn't be surprised to see efficient list concatenation be one of these things.
>>
>>61916628
Since you're using Haskell, perhaps you should read through this excellent book: Purely Functional Data Structures by Chris Okasaki.

as for how ++ works (append a list to another list):
(++) :: [a] -> [a] -> [a]
(++) [] ys = ys
(++) (x:xs) ys = x : xs ++ ys
>>
>>61915702
>Anime
Hi
Go to hell
>>
>>61916476
>nullptr
>C
pick one
>>
>>61916699
Better than
>Hijab
>>
>>61916699
thanks for staying with us today
>>
0 terminated vector or save the length in structure?
>>
>>61916727
for simple strings? \0
for anything else, save length.
>>
>>61916727
>O(n) .length()
no
>>
>>61916702
#ifndef __cplusplus
#define nullptr NULL
#endif

picked both
>>
>>61916759
no typesafety
>>
>>61916727
computers have more memory than processing power, so save it in the structure
>>
>>61916759
>compiling C code with sepples compiler
Oh shit nigger what are you doing?!
>>
>>61916777
I only write C in the common subset.
>>
If I read a stackoverflow answer years ago for a rudimentary concept and have since internalized it and used many variations of it in my projects, do I need to attribute the author in my source code? Is it any different from learning an algorithm in a textbook?
>>
>>61916791
you don't do anything useful with C.
>>
>>61916777
checked

>>61916768
I guarantee that you've never ever had to use std::nullptr_t. I see where one would use the type but I know you haven't
>>
>>61916793
did the original poster included a license with the code? no?

do whatever you want
>>
>>61916793
if you had to credit the first person who came up with an algorithm every time you wrote a program nobody would get anything done
>>
>>61916832
I'm just worried that I'm being a pajeet about it. I've been using variations on *this one weird trick* for years, and I'm sure the current me could conceptualize it from scratch in five minutes, but I read the answer when I was just getting started with programming, and I wouldn't have been able to think it up then
>>
>>61916894
What are you actually talking about?
>inb4 he's baiting us into reading his blog
>>
>>61916913
its one weird trick to get you to read his blog,

>>61916894
thoughtcrimes aren't illegal yet, anon.
>>
>>61916894
so whats the weird trick then exactly? hard to answer without knowing the context
>>
File: 1405616321213.jpg (38KB, 500x503px) Image search: [Google]
1405616321213.jpg
38KB, 500x503px
>tfw you check the local "developer" jobs and the only thing hiring in your area is webdev shit

Why the fuck am I even trying to learn C++?
>>
>>61916980
Gotta move to a bigger city where you'll be able to enjoy long commute hours, pollution and insane prices anon.
>>
>>61917010
is a motorbike a solution to long commute hours (skipping tru traffic)?
>>
>>61916979
A function to split a string by a specific character. Like string.split(' ') would split a string into a list of strings broken by spaces.

It's pretty common I think, but I couldn't figure out how to implement it on my own when I first started programming.
>>
Been trying to get an unsigned integer but it's not working. Negative numbers are being returned for some reason
unsigned int get_int(string prompt) {
while (true) {
unsigned int result;
cout << prompt << ": ";
cin >> result;
if (cin.fail()) {
cin.clear();
cin.ignore(10000, '\n');
cout << "Invalid input, please try again." << endl;
} else if (result > 0) {
cin.ignore(10000, '\n');
return result;
}
}
}
>>
>>61917049
are you going to cite us when you cite them, for helping you determine whether you should cite the SO person?

let f = asdf.split (' ')
t. me
t. SO user #123123
t. anon on 4chan

sounds dumb, right?
>>
>>61917071
>ayy soh
>>
>>61917066
Not possible unless you're storing the return value in a signed integer variable.
>>
>>61917149
return value itself is an uint and I had a check for that too? Why is it missing the check I wonder
>>
>>61917165
°
>>
>>61917184

Yee
>>
Did programming prior, decided to apply for CS but applied late and got placed as reserve.
College told me they have 45 spots and they accepted 47 students. I'm 7th reserve.
Anyone here attended SC, how is the drop out during the first weeks? What are the chances that 9 will drop out?
>>
Guys what's mobile dev like nowadays?

I only know Python and C++ and these guys want to hire me as a mobile dev lol. I'm scared that I accept it and can't deliver because I don't know or like Objective-C or Java or Switft or whatever bullshit mobile dev requires. I don't want to learn these
>>
Gtk just ditched autotools and adopted meson
>>
>>61917407
GNOME is moving to gitlab as well
>>
File: COBOL.png (14KB, 200x200px) Image search: [Google]
COBOL.png
14KB, 200x200px
>>61915702
Where can I find COBOL bindings for OpenGL ES 2, GLFW 3 and libsoundio?

I want to rewrite my C program in COBOL.
>>
>>61917376
>I don't want to learn these
Decline the offer?
>>
>>61917376
reject the offer, become a NEET and shistpost on /g/ every day how good c++ is
>>
>>61917508
>>61917509
Can I not do mobile dev in C++? I can't possibly learn 2-3 languages in a couple of weeks right?
>>
>>61917518
Learning the basics of a new language isn't hard if you've been using Python and C++ for a while.

I hear you can do mobile dev on Android with C++ with the NDK, but I haven't looked into it much. I also don't want to touch mobile development with a 10-foot pole
>>
>>61917482
Why
>>
>>61917482
>OpenGL in COBOL
Are you mentally fucking retarded?
>>
>>61917518
why would anyone hire you for that tho, if there is even a way to code mobile in c++ which I am not aware of because I hate mobile shit, it is so specialized that there are hardly any job offers for it.

Also everyone else uses java or xamarin or whatnot in a team of developers who are supposed to get shit done the right way(tm) and not waste time with lowlevel bs.

youre supposed to put together business logic shit and not write a second mobile OS
>>
>>61915939
>Again, barring little tiny extra optimizations you're not going to get much out of this.
I think you underestimate the effect of inlining. The video demonstrated a failiure to inline, which caused it to not collapse the loop, make the entire sum during compile time etc.
I've had many function calls not get inlined and when they do i get something like 10x performance gains.

If the compiler can't do its best without doing what he did then it's certainly not just tiny extra optimizations. Worrysome that both gcc and clang are having issues with something that's so simple though.
>>
>>61917586
Why couldn't it be done? Can't COBOL link to a shared library?
>>
>>61917566
I've discovered that C is for brainlets who can't into COBOL.
>>
>>61917615
Just use C or C++ for god sake anon, COBOL was made for financial purposes not graphics programming...
>>
File: 1462553099860.jpg (191KB, 2048x1130px) Image search: [Google]
1462553099860.jpg
191KB, 2048x1130px
>>61917482
For the sake of my sanity and my faith in /dpt/ I'm going to have to assume this is bait. Have a (You) on me.
>>
K&R's exercises are really tedious and not very interesting. Should I really do them anyways? Going through the book feels like a chore.
>>
In modern consumer processors and operating systems, do they run one program at time and that program has all the threads allocated to it or can the OS run multiple different programs at the same time each in their own thread?
>>
>>61917675
Actually programming outside of reading the example code is half of the learning experience
>>
>>61917675
Yes, they get you through very basic input/output and parsing algorithms that will be useful later on. These are also in little other languages since most of them do this kind of thing automagically.
>>
>>61917699
>>61917706
So I should just keep going through it regardless?
When does it get interesting instead of being boring but tedious stuff like "program a C syntax error checker"?
>>
>>61917680
One thread at a time per core, theoretically. Things don't always work out this way in practice due to stuff like thread locks, but that's the gist of it.
>>
>>61917764
If you wanna learn, yeah. I don't care what you do.
>>
Holy fuck why does elixir take so long to compile hello world? i've been seeing
Generated distillery app
==> shit
Compiling 1 file (.ex)
Hello World
Compiling lib/shit.ex (it's taking more than 10s)
Hello World

for 20 minutes now.
>>
>>61917827
maybe thats why rust fags sometimes shill for elixir...
>>
The only reason I'm not using Go is the fucking ugly mascot. Rob Pike(the faggot) should just divorce or not let her wife design his languages mascots.
>>
>>61917938
If that's the only reason you have for not using it you're a retard.
>>
>>61917947
t. paid go shill
>>
>>61917938
the token "{" not being allowed to be on a newline for 99% of the time is one of the reasons I don't want to use go.
>>
>>61917967
>>61917978
>arguing over semantics
Languages are just tools to get shit done quick and dirty.
>>
File: augie.jpg (41KB, 360x436px) Image search: [Google]
augie.jpg
41KB, 360x436px
>>61917938
is that the only reason?
>>
>>61917868
>rust

dammit i knew this language had a caveat. This is pissing me off, I like the syntax of elixir alot, and i want to try out a GC, but I need a compiled language. I don't do web shit. Crystal is great too, but i'd rather wait for 1.0 before I do anything serious with it. Any suggestions
>>
>>61917999
>Languages are just tools to get shit done quick and dirty.
You can't get anything done quick with GO because it's more gimped and verbose than fucking java
>>
>>61918005
You want a garbage collected compiled language? Why not C# or something?
>>
>>61917978
this really pisses me off
>>
>>61917999
Not everything should be quick and dirty.

>>61918005
What are your requirements? What are you trying to make?
>>
Is comparing every field by every other field is The Right Way (TM) to implement __eq__ in Python 3?

class PixelRect:
"""Represents uniform pixel region on image."""

def __init__(self, pixel, x, y, w, h):
# TODO: docs
# TODO: arg err checks
self.pixel = pixel
self.x, self.y, self.w, self.h = x, y, w, h

def __eq__(self, other):
# TODO: docs
# TODO: arg err checks
return self.pixel == other.pixel and \
self.x == other.x and \
self.y == other.y and \
self.w == other.w and \
self.h == other.h


This implies so: https://stackoverflow.com/questions/390250/elegant-ways-to-support-equivalence-equality-in-python-classes/25176504
>>
>>61917978
Wait, are you saying you can't do Block style with Go?
>>
>>61918055
>Not everything should be quick and dirty.
Most of us are not bright enough to work for DoD/aerospace.
>>
File: 1417646617944.jpg (60KB, 600x569px) Image search: [Google]
1417646617944.jpg
60KB, 600x569px
>>61918058
>self
>self
>self
>self

God I hate OOP in Python
>>
>>61918087
I don't think it's that bad.
>>
>>61918087
I hate you, animetards.
>>
>>61918087
Why? Explicit self allows using functions and methods interchangeably and makes the language conceptually simpler.
>>
>>61918045
>Why not microsoft java or something
'no'
>>
>>61918087
Explicit is better than implicit, you dolt. It's good to know where the variable is coming from.
>>
>>61918102
Why do you come here if you hate anime?
>>
>>61918058
in Haskell this is just

data PixelRect a = PixelRect { x, y, w, h :: a }
deriving Eq
>>
>>61918087
'self' is only a convention. you can call it 'this' if you prefer. just use 'this' as the first binding instead of 'self'
>>
>>61918058
In Racket this is just
(struct pix-rect (pix x y w h))


On a more serious note, I think that its important to be able to quickly conjure new data types in dynamic languages, and I think this is definitetly something where Python goes wrong, requiring so much boilerplate and "classes". Like, a majority of the time you just want a simple data structure with a few fields, you don't need a big object with dynamic dispatch and inheritance and constructors etc.
>>
>>61918115
Not wasting my time writing a helper library for my level generator in a typed-language.
>>
>>61918107
If I have a variable or function inside of a class, isn't it a dead giveaway that it's a member?

Didn't realize the Pythonista Defense Force was in. Fuck.
>>
>>61918106
>garbage collected compiled language that's independent of .NET and the JRE and still actually useful for something
Haskell is pushing the "still actually useful for something" bit but it's the only one I can think of.
>>
>>61916287
contemporary x86 was designed with C in mind
>>
>>61918127
There is literally no good reason to choose Python over Haskell and you know it
>>
>>61916287
Go is the C/C++ replacement, at least for some things. and, indeed, Go was thought as a "improved C"
>>
>>61918136
>that's independent of .NET
wew you sure ``dodged`` .NET by using .NET Core and Mono wow
>>
long time;

heheheheeh
>>
>>61918124
Python has this. It's called a named tuple.
>>
>>61918045
There is no reason to use C# over D, D supports C++ libraries
>>
>>61918141
>Dynamic typing is faster for small scripts
>Functional programming paradigm is *PURE* cancer, imperative and OOP are the ways to go (you may mix some functional too for brewity, but too much makes it unreadable)
>Haskell is a meme language (not even 1% marketshare)
>Python has clean, clear, concise syntax

Fuck, if I was serious about it I would write it in C.
>>
>>61918188
what if you want to program games in unity
>>
>>61918074
So everything is either unmaintainable shit or conforming to DoD quality safety procedures? No inbetween?
>>
>>61918204
>unity
lmao
>>
>>61918204
You can call .net from D
https://github.com/taylorh140/Calling-NET-from-D
>>
>>61918184
(car parts)

heehehe
>>
>>61918105
This.
>>
>>61918208
Well, if you put some shit in a barrel of honey... Does it really matter how much shit is there?
>>
>>61918055
Don't laugh, but:
something with syntax like Ruby or Elixir,
powerful and fast enough to write a native kernel in,
and relatively quick compile times.

I don't even need the GC, i just was fine with using it if i had too.

>>61918188
>D
maybe this, but i'd rather something that allows for interpretation and static typing (like Crystal)
>>
>>61918220
error parts not defined
>>
>>61918136
>compiled
C# is translated to bytecode
>>
>>61917518
you can
haxe.org
>>
>>61918247
And the bytecode is compiled before execution
>>
>>61917049
thats way too simple to bother crediting anyone for
>>
>>61918058
>not
    __eq__ = lambda self, other: all([getattr(self, attr) == getattr(other, attr) for attr in dir(self) if not attr.startswith('__')])


it's like you want all plebs to be able to read your code
>>
I generate one VAO for each model (currently 2 models right now)

I then in turn bind each VAO and pass a struct of model data to a function that generates and fills three vertex buffer objects, one for each set of attributes xyz, rgb, uv (the function also sets up the attribute pointer and index buffer).

now is this shit design or more or less how you are supposed to do it? The tutorial-style of having everything sequentially in the mainloop, is a clusterfuck.

void gen_and_fill_vbo(struct model_data * model)
{
//TODO: do these need to be freed? ... if so return IDs I guess
GLuint * VBOIDs;
VBOIDs = (GLuint*) malloc (3*sizeof(GLuint));
glGenBuffers(3, VBOIDs);
//one buffer for each of xyz, rgb, uv
for (unsigned int j_VBO=0; j_VBO<3; j_VBO=j_VBO+1)
{
static const unsigned int valuecounts[3] = {3, 3, 2};
//bind buffer
glBindBuffer(GL_ARRAY_BUFFER, VBOIDs[j_VBO]);
//fill buffer
if (j_VBO == 0)
{glBufferData(GL_ARRAY_BUFFER, sizeof(model->vertex_xyz)*model->vertex_count*3, model->vertex_xyz, GL_STATIC_DRAW);}
else if (j_VBO == 1)
{glBufferData(GL_ARRAY_BUFFER, sizeof(model->vertex_rgb)*model->vertex_count*3, model->vertex_rgb, GL_STATIC_DRAW);}
else if (j_VBO == 2)
{glBufferData(GL_ARRAY_BUFFER, sizeof(model->vertex_uv)*model->vertex_count*2, model->vertex_uv, GL_STATIC_DRAW);}
else
{continue;}
//VAP
glVertexAttribPointer(
j_VBO, // layout in shader
valuecounts[j_VBO],// values per entry
GL_FLOAT, // type
GL_FALSE, // normalized?
0, // stride
(void*)0 // array buffer offset
);
}

GLuint IndexbufferID;
glGenBuffers(1, &IndexbufferID);
glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, IndexbufferID);
glBufferData(GL_ELEMENT_ARRAY_BUFFER, sizeof(model->vertex_index)*model->index_count, model->vertex_index, GL_STATIC_DRAW);
}
>>
>>61918135
You erode readability and simultaneously encourage the risk of name collisions without specifying the scope of the variable you're trying to access. In interpreted languages you're often incurring a slight speed penalty when you do this, as well. Scope lookup takes time. In languages without this ability beyond structures (see: C), people have to prefix their libraries' functions or risk the aforementioned name collisions when used in an unfamiliar environment.
You strike me as the type to write
using namespace
everywhere. Tell me I'm wrong.
>>61918188
D is utterly useless in the real world. If you're trying to code solely in your basement for the 12 other people who use D, I'm not going to stop you though.
>>61918247
You stupid idiot. https://msdn.microsoft.com/en-us/library/6t9t5wcf(v=vs.90).aspx
>>
>>61918259
Same goes for python, without the bytecode part. Python has a JIT as well.
>>
>>61918045
I use linux, and the GC really isn't that important.
>>
>>61918190
>>Dynamic typing is faster for small scripts
False
>>61918190
>OOP is any good
Wrong, OOP makes code worse.
>Imperative is better than functional
Also false.
See how all languages are progressively becoming more functional.
Also note that you're using Python, I guarantee you're using functional features.
>Haskell has a low market share
Self fulfilling prophecy
>Python has clean, clear, concise syntax
False on all accounts.
Haskell is better in every respect.
>>
>>61918273
>https://msdn.microsoft.com/en-us/library/6t9t5wcf(v=vs.90).aspx
>>>
What is that supposed to establish? Having a JIT != compiled language. Even Lua has a JIT
>>
http://www.cprogramming.com/tutorial/c++-tutorial.html

Is this enough to continue to stuff like opengl etc?
>>
>>61918058
all(getattr(self, a) == getattr(other, a) for a in ("pixel", "x", "y", "w", "h"))
>>
>>61918273
If I'm using a lot of members from a namespace, I'll write using namespace foo in my local functions. Does this trigger you?
auto foo(const HDC hdc) -> void {
using namespace Gdiplus;
Graphics g(hdc);
// etc
}
>>
>>61918273
>``real world``
Care to explain? It seems to match the criteria of ``being useful`` and I don't see any arguments against it apart from your buttflustered rambling
>>
>>61918292
>>61918269

Longer that 79 characters. Try again.
>>
>>61918236
Have you considered that some of those requirements might be in conflict?
Also learn to be less picky about syntax when you have bigger requirements (like ability to be a low level kernel)
>>
>>61918273
C# does not produce native binaries you dumb pajeet
>>
>>61918273
But the scope is right there in front of you. class MyDick(>muh self). Can you not easily infer that the next few things you're going to write about within that block is a property of MyDick?
>>
>>61918308
>auto .... -> void
the fuck. why?
>>
>>61917938
retard

>>61917978
gofmt yourself
>>
File: 1501743893143.jpg (35KB, 400x400px) Image search: [Google]
1501743893143.jpg
35KB, 400x400px
>>61918343
>there are people that actually use go
>>
>>61918331
:^)
>>
>>61918350
>caring about what people think
>not being able to construct his own opinion
>>
>>61918350
simplicity is complicated
>>
>>61918378
I do have an own opinion: "Go is trash"
>>
>>61918331
#define fn auto

It's like I'm really writing Rust.
>>
>>61918389
Any niggerfaggot can make shit complicated. It takes a genius to make it simple.
>>
>>61918317
surely it should be at least possible to have a language look like ruby or elixir and work powerfully enough for a low level kernel, right?
>>
>>61918058
>>61918301
Also if you provide the class attribute: __slots__, you can define the attributes the class will use.
This will remove YourClass().__dict__ you'll be able to iterate over YourClass().__slots__.
class Some:
__slots__ = ("a", "b", "c")

def __init__(self, a: int=0, b: int=0, c: int=0):
self.a = a
self.b = b
self.c = c

def __eq__(self, other):
return all(getattr(self, a) == getattr(other, a) for a in self.__slots__)
>>
>>61918284
So a compiled language that works on Linux? I assume you're looking for something a bit esoteric, so Haskell still applies. You could try Vala if you wanted to go even more obscure.
>>61918292
>>61918326
The whole thing is compiled ahead of time via that tool - there is no JIT process.
>>61918309
If you want to learn a language whose actual applicability in the online open-source collective and the job market rivals that of stuff like Scheme, be my guest. If you're just doing it for yourself, whatever. But keep in mind your handicapping yourself if you're actually trying to do something for money/for other people.
>>61918328
Come back to me when you've written a program that spans at least a dozen files and tell me you can mentally infer scope from anywhere within it.
Inference on the programmer's part is a terrible, terrible thing because we are very stupid humans. We can't be trusted with stuff like that on a large scale, so we have tools to do it for us.
>>
>>61918438
This guy know what he's talking about. Now I need to write a helper library for my Python level generator because I can't get the scope of mere 500 lines of code.
>>
>>61918438
>The whole thing is compiled ahead of time via that tool
Yeah, I'm not convinced by some basement dwelling ms pajeet's hobby tool at all, fact is fact, C# is not a compiled language and it does not produce native binaries. Screech all you want
>>
Trying to make a simple 'arbitrary size number' arithmetic engine.

Just finished the summation method!

Any way I can condense/improve this while loop? I tried making it into a for loop, but it just looks hideous.
    while(L1_Iter != NULL &&
L2_Iter != NULL)
{
offset = 0;
/* Load current numbers and add them*/
Sum_Int = L1_Iter->digit + L2_Iter->digit;

/* If we end up with a two-digit number */
if(Sum_Int > MAX_ONES_DIGIT)
offset = 1, Sum_Int %= 10;

/* Insert the number into the Sum */
Sum_Iter->digit += Sum_Int;
Sum_Iter->next->digit += offset; /* In case we had a 2-digit #*/

/* Move to the next number in each LargeInt*/
L1_Iter = L1_Iter->next;
L2_Iter = L2_Iter->next;
Sum_Iter = Sum_Iter->next;
}
>>
>>61918483
Shit just noticed a bug (doesn't accurately take into account the fact that an offset can lead to a two-digit number)
>>
>>61918478
Learn to Google, pajeet
https://stackoverflow.com/questions/8837329/is-c-sharp-partially-interpreted-or-really-compiled
>>
>>61918438
I'm not the guy who asked that question.
I'm asking why you think D is ``useless`` in the ``real`` world.
>>
>>61918284

>Reason for not using C# is because he uses Linux
Does .NET Core not suit your needs?
>>
>>61918500
>JIT
try again, rakesh
>>
File: 1417812056940.png (52KB, 370x268px) Image search: [Google]
1417812056940.png
52KB, 370x268px
I am now under the impression that Python is for brainlets who desperately want to feel smart
>>
>>61918515
.NET core is a neutered down .NET, literally the second class citizen
>>
>>61918521
I didn't claim it was compiled, faggot.
>>
>>61918438
Maybe your right, I might just bite the bullet and learn Haskell or Vala or go back to C.I assume Vala doesn't require gnome or linux to run, and can compile to an unbiased elf-C.
>>61918515
It just seems foolish, like using Swift for windows.
>>
>>61918531
>It wasn't me
Like clock work
>>
>>61918539
>clock work
You should learn english, though.
>>
>>61918539
Are you advocating tripfags?
>>61918526
What other impressions are you under?
>>
>>61918497
You might want to read about a binary adder:
https://en.wikipedia.org/wiki/Adder_(electronics)
sum_int = (l1 + l2 + carry)
sum_iter -> sum_int % max_int
carry = sum_int / max_int
>>
>>61918549
>You should learn english, though.
Exactly
>>
>>61918551
That we're about to fish (You)s out of eachother
>>
>his language doesn't use statement terminators
Your language is shit
>>
>>61918577
>his language doesn't use character terminators
YOUR language is shit.
>>
>>61918577
Newline is my statement terminator.
>>
>>61918598
Wrong
>>
>>61918577
Your language a shit
>>
>>61918538
Nah, you don't need GNOME for Vala. You'll need GLib, but you probably have that already anyway.
>>61918501
Simple matter of availability. Take a look at any job listing; 90% of the time you're going to see C/C++, Java, or .NET. If you're looking at backend web stuff you'll see a lot of PHP, maybe some Python, or (god forbid) some ASP.NET. It's not like COBOL where if you actually know the language you get an astronomically high starting salary due to the amount of COBOL code present in the world. There's just simply not enough D code out there.
>>61918521
>JIT
>just in time compilation
>C# isn't a compiled language
This isn't even getting into your earlier """claim""" that a well-documented tool on MSDN that has been a part of .NET for 15 years (a mere year less than its entire lifetime) is somehow the work of some basement nobody.
>>
>>61918526
Python is for normal people who desperately want to become brainlets
>>
>>61918626
>Job
By your logic, people should only use VM langs like Java or C#, or C/C++. If you are concerned about money why are you in programming in the first place? This is a serious question.
There are close to none job listings for COBOL/FORTRAN/ADA --does it mean they don't belong to the ``real`` world?
>>
>>61918526
>>61918662
Python is for brainlets who desperately want to cosplay as scientists
>>
>>61918626
>It's a compiled language if it has JIT
The mental gymnastics you are demonstrating is quite funny, python is my favourite compiled language xD
>>
>>61918681
Python is for brainlets who want to get shit done.
>>
>>61918693
Yes, Python code and things written in Python are shit and are done by brainlets
>>
>>61918669
It's not a matter of money. It's a matter of being able to get a job in the first place. I'd never recommend someone pick up COBOL now for a similar reason - you'll be up against people who have been likely doing this since before you were born.
>>61918692
Compilation is compilation. If you want to move the goalposts to AOT as opposed to JIT (which is what you should have done in the first place), then be my guest. You still haven't addressed ngen.
>>
>>61918708
Indeed, Python is how brainlets can get a well-paying job and compete with competent C/C++ people.
>>
But for whom is Perl?
>>
Your thoughts on using nested functions instead of "private" functions for encapsulation? Could also be applied to GNU C.

    def toPixelRects(self):
"""Return a list of pixel rectangles representing the image."""

def expandPixelRect(x, y):
"""From self[x][y] expand PixelRect rightwards, then upwards."""

def isUniformPixelRect(x, y, w, h):
"""Returns if the specified image region is uniform."""
for xi in range(x, x + w):
for yi in range(y, y + h):
if self[x][y] != self[xi][yi]:
return False
return True

w, h = 1, 1
while x + w < self.width and self[x][y] == self[x + w][y]:
w += 1
while y + h < self.height and isUniformPixelRect(x, y, w, h + 1):
h += 1
return PixelRect(self[x][y], x, y, w, h)

r = []
included = [[False for y in range(image.h)] for x in range(image.w)] # mark pixels already in r
for x in range(image.w):
for y in range(image.h):
if not included[x][y]:
r.append(expandPixelRect(x, y))
for rx in range(r[-1].x, r[-1].x + r[-1].w):
for ry in range(r[-1].y, r[-1].y + r[-1].h):
included[rx][ry] = True
return r
>>
>>61918732
Sysadmins.
>>
File: Konata_lauert.jpg (14KB, 428x267px) Image search: [Google]
Konata_lauert.jpg
14KB, 428x267px
>>61916699
Anime website
>>
>>61918745
I like it, scope is an excellent tool. Sucks that I can use it in C but not C++.
>>
>>61918745
It's a legitimate Python tool. I use it every now and then for properties and stuff; I say go for it.
>>
>>61918761
>in C but not C++
Not in C11, but I guess people don't mind getting tied to GCC/Clang nowadays.
>>
>>61918788
That's what I meant of course.
>>
File: 1501806894206.jpg (519KB, 1280x1079px) Image search: [Google]
1501806894206.jpg
519KB, 1280x1079px
>>61916699
>>
>>61916409
Arguments are open source. Unless you can disprove that man's arguments, C is shit.
>>
>>61918745
so this is the power of concise(TM) clear(TM) python(TM) code(TM)
>>
>>61918728
>60k salaries vs 130k salaries
I'll admit, that you guys get better than retail pay, but it's not any real kind of competition.
>>
>>61918827
Seems pretty understandable to me, you don't even need to know Python.
>>
>>61918847
> r[-1].y
>>
>>61918878
Well, okay, you *do* need to know Python, but this *is* pretty elementary and expressive, right?

Maybe it would be neat if Python iterables had a .last() method but this is the way it is now and all languages have their flaws.
>>
>>61918878
Negative indexing is not that uncommon. It's very useful, though.
>>
>>61918124
>struct
>>
>>61918527

And yet it is rapidly becoming a first class citizen with this .NET Standard shit.
>>
>>61918912
It's also in Lua.
>>
>>61918917
>rapidly becoming
It's fucking 2017 and it's still not there so it's shit and should be abandonned.
>>
>>61918917
Could you elaborate? What do you mean? I just got into .NET programming as a (very) junior dev.
>>
>>61918915
not an argument, fag boi
>>
Is it still worth investing time in C++? The language feels sooo retarded. It's my second college year. Is machine learning stuff not a meme and worth getting into(I am exceptionally good at maths)? I simply don't want to end up a web codemonkey. Don't advise haskell, I had played with it for like a year and eventually got bored
>>
>>61918925
Actually, it's not, I'm rusty with Lua. You got the #r in Lua for that.
>>
>>61915702
teaching myself assembly and just realizing the full extent of how retarded my operating systems class without teaching assembly was
>>
>>61918124
Don't know how structs work but I bet it doesn't have default methods for comparing like CL does with its structs.
>>
>>61918950
>operating systems class teaching assembly

operating systems class is not for teaching assembly.

in my college we learn that in freshman year in computer architecture
>>
>>61918969
*work in Scheme
>>
>>61918972
where you at?
>>
>>61918925
It's in C++, if you overload t[]
>>
>>61918577
>his language has syntax
>his language requires statement terminators because of said syntax
>>
>>61918986
Europe
>>
Writing a RTOS for an ARM Cortex-M0 uC
>>
>>61918989
Well by that logic, it's also in Lua.
>>
>>61919008
UK?
>>
Is anyone here actually making profits of apps?
>>
>>61919028
Portugal
>>
>>61918972
what you call computer architecture was probably part of what I call operating systems
>>
Does anyone here work in academia?
My supervisor wants me to write a paper about my project, but I find it hard to describe as my project was mainly implementing algorithms other people have used and chaining them together to solve a couple of problems.
Algorithm papers usually focus on the algorithm and show a few examples of how it performs.

My project is more of a integration of a bunch of parts and describing them all is not possible in a single paper using any other papers as a model.

Any advice?
>>
>>61919041
The company I work for I certainly hope is.
>>
>>61919041
>/dpt/
>profit
I lol'd
>>
>>61919051
he wants *documentation* probably.
>>
>>61919051
You cite the other algorithms and tell what you've used them for. You don't need to describe them in detail at all. Include them in the appendix, if you want to, but citing is enough.
>>
>>61919041
This is why you get software dev job so you can still larp as an app developer without actually going broke.
>>
File: ruby-logo.png (101KB, 360x315px) Image search: [Google]
ruby-logo.png
101KB, 360x315px
GDScript is actually not that bad, but I still sort of want to implement an MRuby backend for Godot scripting.

Would anybody on /g/ care to code review me if I do?
>>
>>61919108
shoot
>>
>>61919071
no he wants me to write a conference paper. (about 6 pages), in order to make it easier to get funding.

>>61919076
So you think I should attack it as if it was an algorithm, and then just make separate papers for each part of the system?
>>
File: 1473805239681.jpg (83KB, 546x678px) Image search: [Google]
1473805239681.jpg
83KB, 546x678px
Why did the name "static" catch on instead of the less-ambiguous term "persistent"?
>>
    def getNeighbors(self, x, y, diagonals=False):
# TODO: docs
# TODO: arg checks
neighbors = []
coords = [(x - 1, y), (x + 1, y), (x, y - 1), (x, y + 1)]
if diagonals:
coords.extend([(x - 1, y - 1), (x + 1, y - 1), (x - 1, y + 1), (x + 1, y + 1)])
for x, y in coords:
try:
neighbors.append(self[x + xOffset][y + yOffset])
except IndexError:
pass
return neighbors


Fuck, how do I elegantly get that line into 79 lines without needing to break pep8? I don't want to fucking split it, that's ugly. Any ideas?

I know there's brilliance inside here.
>>
>>61919143
static is shorter than persistent
>>
>>61919150
>brilliance inside here
I meant there are cleverer people inside this thread.
>>
>>61918944
>I don't want to end up a web codemonkey
That will be the majority of the jobs most likely available in your area. Sorry, Anon, but webdev is """the future"""
>>
>>61919172
Not him, but I'm dreaming that wasm might save some wanna-be game-devs like me.
>>
>>61919123
I'm saying you should describe the problem and then divide it into parts. Next you tell what you've used to solve each sub-problem or part in it. Most are probably algorithms made by someone else, so citing their papers is enough. Don't write the algorithms open, unless necessary. What I mean is something like this: "To compare the distance of the secondary structures, we used a tree edit distance algorithm as described by Zhang et al. in their paper."

Just use common sense. Write what is interesting and useful. Don't write anything that is not.
>>
>>61919201
I am also hoping WASM changes the internet as we know it.
>>
>>61919212
Guess that makes sense.
Thanks.
>>
>>61919150
>>61919167
def getNeighbors(self, x, y, diagonals=False):
# TODO: docs
# TODO: arg checks
neighbors = []
x_a,y_a,x_b,y_b = x-1,y-1,x+1,y+1
coords = [
(x_a, y), (x_b, y), (x, y_b), (x, y_b)
]
if diagonals:
coords.extend([
(x_a, y_b), (x_b, y_b), (x_a, y_b), (x_b, y_b)
])
for x, y in coords:
try:
neighbors.append(self[x + xOffset][y + yOffset])
except IndexError:
pass
return neighbors
>>
>>61919150
Practicality beats purity, as the good Zen says. If this is the only line (or one of the few) that's in violation of the 80-column rule I'd leave it be. Your display is probably big enough for the whole shebang anyway.
>>
>>61919159
Just make it something like 'persis' like the Rust folks would do.
>>
File: IMG_1917.jpg (20KB, 264x191px) Image search: [Google]
IMG_1917.jpg
20KB, 264x191px
Anyone knows how to code with goggles api? like i just wanna be able to post events from coding instead of doing it manually and its a pain in my left nut
>>
>>61919354
just call the API methods?
>>
>>61919354
You should probably get that checked out
>>
>>61919172
creating a website's source code can be outsourced to places like india and china where they work for 10% of the price of a westerner. being a code monkey doesn't give job security
>>
>>61919150
delete the spaces between x + 1, x+1?
>>
>>61919364
Ill webmd it
>>
>>61919430
Nigger, just about anything can be outsourced these days
>>
>>61919454
even military systems and chips?
>>
>>61919454
not many as easily as coding, with the internet existing. design and testing are harder to outsource, so don't tell him web dev is the future when it's probably going to be 2nd worlders doing that for $3/h
>>
>>61919468
Merc groups and chinese chips? Yes
>>
>>61919483
they're charging $3/h for a reason, tech companies are paying $120k+/year for a reason, while web dev is generally easier than systems and applications programming, the pajeets produce such low quality work that you can't even use it, it's that bad
>>
>>61918527
This may have been true prior to yesterday, but .NET Standard 2.0 / Core 2.0 just released in full:

https://blogs.msdn.microsoft.com/dotnet/2017/08/14/announcing-net-standard-2-0/

.NET Core is definitely becoming, if not already, the first-class citizen here. Just look at any of the major development efforts over the last six months.
>>
>>61916980
Because software development is retarded as fuck if you don't have a field.
I live in a relatively small city (175k people).
There are more than 100 businesses within a 10km radius who hire C++ developers.
Some of them are startup tier, but you can basically pick and choose where to work.
>>
>>61918932
see
>>61919541
>>
>>61919483
My point is that we are already living in a world where it is easier and cheaper to outsource development, and yet there are a SHIT ton of webdev jobs available and ready for the surrounding population. I doubt we'll be outsourcing EVERY job to 2nd and 3rd worlders if muh Internet of Things is going to catch on like they want it to.
>>
>>61919549
Why do startups say shit like:
>must be proficient in React native and Angular etc etc

do they just pick the most trendy shit and except people to follow it?
>>
>>61919608
Because capitalism rewards excellence, anon.
>>
>>61919608
That is literally how the world of WebDev works. It's all about who is investing in the hottest framework meme.
>>
File: 1406502736388.jpg (23KB, 232x197px) Image search: [Google]
1406502736388.jpg
23KB, 232x197px
>>61919549
I just want to do graphics programming for a game company
>>
File: thatfeel.jpg (53KB, 450x600px) Image search: [Google]
thatfeel.jpg
53KB, 450x600px
>when your program is valgrind clean
>>
>>61919705
>just
you need a ton of experience with graphics programming and ideally a university degree
>>
Trying to fix yii2 JUI plugin it wraps generated Java Script in qutoes
>>
>>61919738
I'm already working on the university degree, but I have no idea how I'll get experience other than pet projects I can show off on a code repository
>>
File: miku cock.png (388KB, 435x437px) Image search: [Google]
miku cock.png
388KB, 435x437px
>>61919714
>when your program abuses undefined behavior and triggers valgrind warnings up the asshole but your program is correct
>>
File: mvs.jpg (101KB, 1241x606px) Image search: [Google]
mvs.jpg
101KB, 1241x606px
Anyone here uses Microsoft Visual Studio 2017?

I installed both Universal Windows platform and development and Desktop development with C++ but Win32 Console Application is missing from projects but it is in recent templates but when I click on it it says "This template is not present on this installation".

I tried to google but no one seems to have that problem with MVS2017 only with earlier years.
>>
>>61919934
Not sure unless you also need C++/CLI support
>>
NEW THREAD

>>61919981
>>61919981
>>
>>61919934
how about you install the template?
>>
File: 1482610498128.jpg (48KB, 500x378px) Image search: [Google]
1482610498128.jpg
48KB, 500x378px
Made a repo for that Scheme-in-Go project I referenced once or twice: https://github.com/DangerOnTheRanger/schego
Very much in the early stage, but feel free to point out improvements/follow along/submit pull requests once I get to a point where I can take them.
>>
Actual new thread with actually programming related pic:

>>61919998
>>61919998
>>61919998
>>61919998
>>
>>61919993
post to HN and reddit
hipsters will cream their pants
>>
File: anal beads.png (41KB, 493x527px) Image search: [Google]
anal beads.png
41KB, 493x527px
>>61919934
You might find what you're looking for in "Individual Components".

See image.
>>
>>61919892
That is not a good thing
>>
>>61912422
it's a script that splits large feature count shapefiles into smaller ones and runs them through the buffer tool and then stitches them back together.

it turns out when you try to do it in one go on 165000 polygon features it eats all your ram and shits itself after 2 hours- this script only makes it take 35 minutes and 300mb of ram
>>
>>61920711
Nice. Is this 2D or 3D? Is this to reduce polygon count? If so, do these optimizations suffer from the fact that you subdivide the shapefile into regions beforehand?

What's the buffer tool? Does it render the shapes and then tries to lossy-approximate it with fewer polygons?
Thread posts: 319
Thread images: 25


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.