[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: 320
Thread images: 30

File: 1486157194941.jpg (125KB, 800x720px) Image search: [Google]
1486157194941.jpg
125KB, 800x720px
What are you working on, /g/? And what color thigh-highs are you wearing? Old thread: >>58826877
>>
Fuck OOP, FP for life
>>
>>58832512
>how to tell if someones a neet
>>
>>58832523
>someones
how to tell if someone's a pooloo
>>
i think i just came up with a new, unbelievable modulus algorithm with a ton of entropy like you wouldn't believe
>>
File: 1479851938223.png (208KB, 807x935px) Image search: [Google]
1479851938223.png
208KB, 807x935px
C++ is a horrible language. It's made more horrible by the fact that a lot of substandard programmers use it, to the point where it's much much easier to generate total and utter crap with it. Quite frankly, even if the choice of C were to do *nothing* but keep the C++ programmers out, that in itself would be a huge reason to use C.

In other words: the choice of C is the only sane choice. I know Miles Bader jokingly said "to piss you off", but it's actually true. I've come to the conclusion that any programmer that would prefer the project to be in C++ over C is likely a programmer that I really *would* prefer to piss off, so that he doesn't come and screw up any project I'm involved with.

C++ leads to really really bad design choices. You invariably start using the "nice" library features of the language like STL and Boost and other total and utter crap, that may "help" you program, but causes:

>infinite amounts of pain when they don't work (and anybody who tells me that STL and especially Boost are stable and portable is just so full of BS that it's not even funny)
>inefficient abstracted programming models where two years down the road you notice that some abstraction wasn't very efficient, but now all your code depends on all the nice object models around it, and you cannot fix it without rewriting your app.

In other words, the only way to do good, efficient, and system-level and portable C++ ends up to limit yourself to all the things that are basically available in C. And limiting your project to C means that people don't screw that up, and also means that you get a lot of programmers that do actually understand low-level issues and don't screw things up with any idiotic "object model" crap.

So I'm sorry, but for something like git, where efficiency was a primary objective, the "advantages" of C++ is just a huge mistake. The fact that we also piss off people who cannot see that is just a big additional advantage.

But I'm sure you'd like it more than git.
>>
>>58832523
C isn't OOP either
>>
>>58832512
Did you just assume my programming preference?

this is a programming safe space for all programmers check your binary privilege
>>
>What are you working on, /g/?
I am procrastinating on a few things

>And what color thigh-highs are you wearing?
I'm not wearing any thigh-highs at all!
>>
>>58832532
>>58832544
butt-blasted neets detected
>>
>>58832561
>I'm not wearing any thigh-highs at all!
Your name is Ruby; so that's a lie. I bet they're red.
>>
>>58832561
We all know Ruby programs nude
>>
>>58832555
chmod +777 (you) like the little whore you are
>>
File: leh.png (263KB, 523x372px) Image search: [Google]
leh.png
263KB, 523x372px
hi /dpt/
what is the most artisan and organic programming language?
>>
I've got some regex for pulling IDs from eroshare and imgur URLs using Python

Imgur ID regex
^(?:.*/)?([a-zA-Z0-9]{5,7})(?:[/?#.].*)?$

Eroshare ID regex
^(?:.*/)?([a-zA-Z0-9]{8)(?:[/?#.].*)?$


Are these ok? I use regex.search(url).group(1) and it works so far, I've run a program using these against 2000+ URLs without error.

My regex knowledge is shit though, every time I need a new one I have to look up all the symbols and shit again or I find something on StackOverflow.
>>
File: son-of-man-linestest2.png (501KB, 347x520px) Image search: [Google]
son-of-man-linestest2.png
501KB, 347x520px
>>58832561
>I am procrastinating on a few things

I am procrastinating on everything by playing with my art thing.
>>
I recently realized that OOP is mostly a meme and that half the shit they teach you about it falls apart the second you build anything even remotely complex in the real world.

What do?
>>
>>58832601
Ignore that missing curly bracket on the second group of the Eroshare regex, a typo.
>>
>>58832578
I have no thigh-highs. I only wear black crew socks, and right now, I am not wearing any socks at all.

>>58832583
This is ultimately correct unless I am not programming at home.
>>
File: h a s k e l l.png (126KB, 400x400px) Image search: [Google]
h a s k e l l.png
126KB, 400x400px
>>58832608
>>
>>58832615
>I am not wearing any socks at all
l-lewd
>>
>>58832622
Haskell better not be a fucking meme language like Lisp (I like the syntax and features, but just try getting shit done in it) or I'm gonna shitpost so hard.
>>
File: vlcsnap-2017-02-05-22h06m01s941.png (827KB, 1280x706px) Image search: [Google]
vlcsnap-2017-02-05-22h06m01s941.png
827KB, 1280x706px
>>58832596
Only language who adopted the Contributor Covenant:
>>Open Source has always been a foundation of the Internet, and with the advent of social open source networks this is more true than ever. But free, libre, and open source projects suffer from a startling lack of diversity, with dramatically low representation by women, people of color, and other marginalized populations.
>Part of this problem lies with the very structure of some projects: the use of insensitive language, thoughtless use of pronouns, assumptions of gender, and even sexualized or culturally insensitive names.
>Marginalized people also suffer some of the unintended consequences of dogmatic insistence on meritocratic principles of governance. Studies have shown that organizational cultures that value meritocracy often result in greater inequality. People with "merit" are often excused for their bad behavior in public spaces based on the value of their technical contributions. Meritocracy also naively assumes a level playing field, in which everyone has access to the same resources, free time, and common life experiences to draw upon. These factors and more make contributing to open source a daunting prospect for many people, especially women and other underrepresented people. (For more critical analysis of meritocracy, refer to this entry on the Geek Feminism wiki.)
>>
>>58832608
No it isn't. OOP actually works well for medium to large programs in teams of programmers who know what they are doing not just one guy trying to make a complex project who doesn't know what he is doing.
>>
>>58832643
Haskell has one major flaw, which is it's bad at the kind of reason why you'd use C or ASM, i.e. explicit memory management, allocation, cleanup.
>>
I'm working on a binary tree in C, the function that creates my tree out of an array of numbers is finished, rate my shit code
Node *createTree(int a[], int size) {
Node *start = newNode(a[0]);
Node *temp = start;
for(int i = 1; i<(size/sizeof(a[0])); i++) {
temp = start;
while(temp->data < a[i] || temp->data > a[i]) {
if(temp->right == NULL && temp->data < a[i]) {
temp->right = newNode(a[i]);
break;
}
if(temp->left == NULL && temp->data > a[i]) {
temp->left = newNode(a[i]);
break;
}
if(temp->data == a[i]) printf("Threw out duplicate entry!");

if(temp->data < a[i])
temp = temp->right;
else if(temp->data > a[i])
temp = temp->left;
}
}
return start;
}
>>
>>58832722
>not C89
shit
>>
>>58832722
change createTree to use dynamic memory allocation

make it work with non-numeral values by having a comparison function as an argument. see function pointers
>>
>>58832747
my Nodes are all dynamic, if that's what you're talking about
Node *newNode(int data) {
Node *n = (Node*) calloc(1, sizeof(Node));
n->data = data;
return n;
}
>>
what advice do you guys give to beginner programmers
>>
>>58832635

It's probably for the better that you not know what else I'm not wearing.

>>58832735

Name one platform that people give a shit about that doesn't support C11.

>>58832843

Read code.
Write code.
>>
>>58832722
See if you can figure out how to do it recursively, it makes a lot more sense to do it that way
>>
>>58832843
avoid python and java like the plague
>>
>>58832861
wouldn't that cause a shitload of overhead with all the function calls you'd be making
>>
>>58832859
>Name one platform that people give a shit about that doesn't support C11.

There's no C11 for the Motorola 68000. How am I supposed to do modern Amiga programming?
>>
>>58832843
try hard and dont give up at all

>>58832862
probably a good idea to ignore people who are opinionated, unless they're successful. Python and Java are great languages that you should verse yourself in.
>>
File: why would you compile that.png (248KB, 819x466px) Image search: [Google]
why would you compile that.png
248KB, 819x466px
>>
>>58832882
>Python and Java are great languages that you should verse yourself in.

>>58832843
Ignore that person.
He is wrong and will never admit it.
This is what happens when you are taught Python or Java as one of your first languages or your first languages that depart from what you're used to.
>>
What is the simplest/sanest script language/library/shell for dealing with Windows filepaths. When I was using Python I had to copy some C hack from Stackoverflow to deal with long paths.

Powershell?
>>
>>58832871
Doubt it, you can compare the iterative and recursive methods if you want to see performance. The thing to really be looking for is possible stack overflows.
>>
>>58832843
Get used to the fact that everything you write for the first few years is going to be garbage, but keep practicing anyway.
>>
>>58832859
>Name one platform
I can't name one but I know many exist that don't have C compilers that support C11 or even all of C99's features
ANSI C is still the standard for portability
>>
>Tfw learned Java as my first programming language but I find it very difficult to program in functional programming languages that do not all think in objects

How do I untrain my mind from this mindset that everything has to be objects? I can't even go basic algorithms anymore in functional languages because of it.

What it do?
>>
wow weird
>>
>>58832484
>what color thigh-highs are you wearing
Program is literally not doing what I tell it to do.
>>
>>58832928
Every time you see something, think "value" or "type" (in some systems they're the same)

"value" not "object"

one way is to write some high level abstractions, because they're by definition as far from objects as possible
>>
@58832934
No (You) for you.
You're clearly trying to get someone to ask what you're talking about, but honestly, I don't care.
>>
>>58832911
My only really experience with recursion is in a java class I took in highschool, I remember we were learning recursion at one point and everyone's programs would end up running slower and slower as it worked through some list of shit
>>
>>58832905
Racket has good pathing utilities.
(simplify-path (expand-user-path "~/pictures/favorites/"))
;=> #<path:c:\users\me\pictures\favorites\>
>>
File: 1461350800677.jpg (67KB, 500x600px) Image search: [Google]
1461350800677.jpg
67KB, 500x600px
>>58832689
>OOP is only for dumb assembly-line coders
checks out
>>
@..
no i'm not
>>
>>58832952
this meme picture it is not true and you know it if you ever did OOP before
>>
File: vlcsnap-2017-01-25-00h30m07s074.png (402KB, 853x482px) Image search: [Google]
vlcsnap-2017-01-25-00h30m07s074.png
402KB, 853x482px
>>58832928
Learn C. Read The book. Do exercises.
>>
>>58832975
why C from any other language?
>>
>>58832689
Every large OOP codebase I've seen either:
1) Breaks the rules of loose coupling and/or high cohesion
2) Has an absurd number of layers of abstractions that make it incredibly difficult to find the code that actually does shit, due to how many levels of indirection there are
3) Is partly procedural, partly OOP (this generally seems to be the best 'OOP' code)
4) A mixture of 1 and 2

If you can point me to an open source repo of what you would consider "good OOP code" I would appreciate it.
>>
>>58832986
It teaches good practises
>>
>>58832990
Apache TomCat is a good example of good Java code
>>
>>58832997
Because you have to walk a tightrope every time you make a program. If you fuck up even slightly, shit blows up. Other languages are usually more forgiving.
>>
The Photoshop plugin interface is stupid complicated. :-|
>>
>>58832946
Depends on what the problem at hand is. If you do a naive implementation of the Fibonacci sequence recursively, it'll get slow as fuck pretty quickly since you'll end up repeating the same calculations over and over again. Creating a binary tree recursively on the other hand shouldn't cause significant slowdown, but I don't know the numbers on that.
>>
File: makis_cute_window_manager.png (298KB, 482x550px) Image search: [Google]
makis_cute_window_manager.png
298KB, 482x550px
>>58833013
Which makes you as sloppy as maki's blowjobs. C is great for beginners
>>
>>58832881

Modern Amiga is on PowerPC, not Motorola 68k; and furthermore, GCC supports both. Presumably, you can just compile GCC 5 or higher and binutils for the appropriate target triplet, and you'll have a working C11 compiler for the platform.
>>
>>58832905

Windows filepaths don't really need to be treated much differently from Unix filepaths. Windows will not complain if you use forward slashes for everything.
>>
>>58833056
Powershell is a cunt with unusual paths though
>>
>>58833013

Why should beginners use more forgiving languages? They should be made to think before they type.
>>
>>58832843
>Learn 3 or 4 different languages
Preferably ones that are quite different to each other - it doesn't really count as 2 languages if you learn Java and C#. This will allow you to see what aspects of programming languages are similar - which constructs can you generally expect to find, etc. Learn a high-level managed language like Java or Python. Learn a low-level unmanaged language like C. Learn a scripting language like Lua. Learn a functional language like Haskell, Scala, or Scheme. This will make it incredibly easy for you to pick up a new language when you need to and help you understand computer programming better. And I don't mean "learn" as in "master". You don't even need to learn the whole language (I have friends who write production C# and don't even come close to utilizing the entire language). I just mean put a couple months into them and write a few toys, though if there's something unique about the language then don't avoid it.

>There is no such thing as a silver bullet and anyone who says otherwise is selling you snake oil
Yes, some paradigms/tools/frameworks/languages are more effective in certain circumstances than others, but you're never going to find a language that is optimal for all possible use-cases. This ties into the first point, which is has the nice effect of keeping you from boxing yourself in with one language.

That said, there is nothing wrong with using a tool that isn't best for the job for learning/fun purposes.
>>
>>58833079
they should learn an easy language like Haskell instead
>>
>>58833038
>Modern Amiga is on PowerPC

???

>furthermore, GCC supports both. Presumably, you can just compile GCC 5 or higher and binutils for the appropriate target triplet, and you'll have a working C11 compiler for the platform.

Didn't know that.
>>
>>58833079

this.

they'll be wondering wtf is going on when they switch from a dynamic to static language
>>
>>58833014
Use blender, nerd
>>
Should Java be taught as a first programming language? Why or why not?
>>
>>58833079
Because everybody should be able to learn how to kode :)
Mean old C >:( is too hard for my pansexual otherkin SO
>>
I'm writing a custom bootloader for custom 64 bit kernel

who /elite koder/ here
>>
>>58833111
>too bloated
>verbose as fuck
>makes you lazy
>smells like curry
no
>>
>>58833103

I'm doing image filters. Someone here mentioned a program that hosts filters a long time ago, but I never really looked into it.

I forget what it was called now.
>>
>>58833111
No.
We would all agree that Java is trash - with one notable exception. Java programmers.

Java is a cancer on the brain.
Once one starts liking Java, they're gone.
It's not them any more. You can't convince them.
>>
>>58833139
>I'm doing image filters
still? damn bro...
>>
File: powershell.png (126KB, 1024x790px) Image search: [Google]
powershell.png
126KB, 1024x790px
>>58833074

No, it's pretty content about Unix style paths.
>>
File: anime_puke_mapped.png (550KB, 512x512px) Image search: [Google]
anime_puke_mapped.png
550KB, 512x512px
>>58833163

I am becoming incredibly powerful...
>>
>>58833166
That's not unusual though. I'm taking about long paths with spaces, brackets, and everything that's explicitly allowed.
Also how's that botnet?
>>
>>58833090

>???
If you are saying you want to program for "Modern Amiga", then I am assuming you are referring to Amiga OS 4.1 Final Edition Update 1, which can only be run on custom PowerPC hardware.
>>
>>58833171
>GTP posting an anime gril
Did I shift universes by posting in that bog thread?
>>
>>58833185
>Also how's that botnet?
every time.
>>
>>58833185

>long paths
As long as it's small enough for NTFS not to bitch at you, it's fine.

>spaces, brackets, everything else
Like any shell on any modern operating system, Powershell is going to see two things separated by spaces, and treat them as two separate arguments. When one argument is enclosed in quotes, it ignores all other syntactic rules, and treats it like a single string. For some characters, you will need to use escape characters. Powershell is okay with that. Again, I will continue to note not to use backspaces for separating directories.

>how's that botnet
It is contained in a Virtual Box instance, where it can do no harm.
>>
>>58833236
>Virtual Box
BOT
...
NET
>>
>>58833242

>GPL
>Botnet
Explain.
>>
who comfy here? and by that i mean comfy chair, comfy laptop, comfy drinks, comfy keyboard, comfy lighting, comfy OS, etc. EVERYTHING is comfy. Comfy desk, comfy stereo, etc. I need my set up and home to be comfier.
>>
File: davis_a_terry.png (237KB, 448x324px) Image search: [Google]
davis_a_terry.png
237KB, 448x324px
>>58833196
>the call that saved OS dev
>>
File: img_099.png (236KB, 528x573px) Image search: [Google]
img_099.png
236KB, 528x573px
>>58833276
I've got a comfy dildo up my ass, does that count?
>>
>>58833276
everything i own is comfy :^)

>>58833295
yes! i just massaged prostate myself :3
>>
>>58833276
i have the most comfy lair it has a comfy big couch with a big comfy chair and I have comfy pajama pants on and a comfy t shirt
>>
File: If_I_ever_see_a_g_toddler_irl.jpg (340KB, 1000x1091px) Image search: [Google]
If_I_ever_see_a_g_toddler_irl.jpg
340KB, 1000x1091px
>>58833111
If you are able to teach object orientation properly, yes. Java is alright.

Kinds of people that hate on Java:
1. NEETS (70% of the hatred):
You will find them to be expert on meme languages like hasklel and other bullcrap that has no practical value. Their brain was unable to grasp OOP so they must look tough by posting the most 1337 implementation of fuzzbuzz using functional programming.
2. Microsoft Shills:
It should be obvious. Microsoft saw the success of Java and couldn't stand Oracle. So they made a Java rip-off called C# and started the popular Java hatred meme. The NEETs described in category 1 took the bait and forgot how shitty C# itself is.
3. Lastly, the ""expert"" C kernel hackers who hasn't programmed anything but fizzbuzz tier pet projects. They like to pretend they are some kind of epic anonymouse programmer but as soon as you actually throw a real problem at them to solve they will disappear. They tend to forget the hard truth that no matter how much they study and work on C, they can never be even anywhere close to Linus Torvalds. Other common traits they've got:
>They have programmed a sophisticated web browser that doesn't work
>They tend to be hipsters - avoids GNU and pretend they are any (ANY) better programmers
>When faced with deeper C topics, they won't answer, because they don't know how to work with it.
>Post books they haven't actually bought
>Pretends to understand basic things like pointers while never used double pointers in life
>Resorts to namecalling, "Pajeet", "india", "curry" are the most favorite terms. Insecure about indian boogeyman taking their non-existent expert kernel hacker job
>Things Computer Science is actually any Science, doesn't admit only lowest of the low scorers choose CS while top scorers choose Physics, Chemistry, Pharmacy etc
>90% are dropouts and has ""problems"" with current academic curriculum. The rest are underage schoolkids. (example: OP of General C thread)
>>
>>58833276

any ideas how to make a good lay down station? i sit at work all day and when i come home i dont want to sit the rest of the day some more. Looking to make something comfy. Like a comfy lawn chair customized to hold me laptop in front of me. I think that would be pretty comfy
>>
>>58830084
Just checked this thread again, thanks for the help.
I already finished it my own way, but I appreciate the attempted spoonfeeding.
Also, your code seems to segfault at s[finish_index] = '\0';
It might be something I fucked up in the ~2 seconds I committed towards testing it.
Just thought you might want to know.
>>
>>58833315

ya that does sound pretty comfy. I was thinking maybe just get some big pillows and lay on your bed with your laptop. That sounds comfy. Then you have a lot more freedom and space to move around and be comfy. Also if you get up and stretch every once in awhile it will make things comfier when youre trying to be comfy because it helps your muscles become more comfy.
>>
>>58833315
>>58833348

omg bros do you know what would be really comfy? what about getting a giant bean bag chair to be comfy in? i know it sounds like its for kids but they really are comfy. I was thinking about getting comfy in one of those. Easy to move around the house to when you want to be comfy somewhere else. I call it flexible comfiness.
>>
Sure you get this question a lot, however, what language should I start with?

I know a decent amount of c++ syntax, logic and just a lot of other pleb shit. I don't even know what I specifically want to write.
>>
>>58833315
what i do is make a ``mound'' of bankets to lean back on then i lay back however i want to
for instance, right now i have my laptop on my stomach and my neck at a pretty small angle
other times i sit more upright such that i'm in more of a reclined position the mound
it's pretty sweet m8, very versatile
>>
>>58832484
Trying to figure out rest api and json api for Wordpress
>>
>>58833236
How much have you actually scripted with powershell?
>>
I found the filter host, software called Houdini.
>>
>>58833314
There is no good reason to use java over scala.
>>
>>58833529

You should use Kotlin instead
>>
File: Run 3.png (175KB, 1286x988px) Image search: [Google]
Run 3.png
175KB, 1286x988px
A* was a fun little thing to write.
>>
>>58833111
Could be, but you'd need to teach modern Java and not fucking Java 5, and skip over all the modern utilities, like the java.nio package, java.time package and so on.
>>
>>58833533
Haven't used it but it sounds like a meme language.
>>
>>58833529
That kind of goes both ways though.

Unless you really want to use say, Play, you can flip a fucking coin.
>>
>>58832643

Just in case you're still here... By some view points haskell might actually be even more of a meme language than Lisp when it comes to getting shit done.
One thing that gets in the way is that haskell's terse syntax that does a lot of things behind the hood is hard to read / understand for beginners. Another painful thing about haskell is you can forget about using for anything that requires a thorough degree of control (Allocation, Deallocation, Any detailed and specific memory management). OH, and probably one of the biggest problems is as much as the haskell community likes to brag about documentation... The documentation and resources for learning the language really blow.

Basically, the goal of being "Pure" makes doing things that are relatively common in other languages a bit more painful or in some cases terrible in haskell.
>>
>>58833547
>Introduction to Artificial Intelligence: Assignment 1
What are you following?
>>
>>58833549
As in, teach modern Java, and not skip over everything that happened to the language and ecosystem post 2007.

It's fucking retarded.

Java is optimized for large projects. It is supposed to let you wrap shit up in easy-to-use classes.

You end up with your own flavour sprinkled on your frameworks letting you do things more easily.

There are people who don't even know that java.util.Scanner exist. They read from files, streams, etc. by creating an InputStream, wrapping that in a BufferedInputStream, and then wrapping THAT in a fucking InputStreamReader, so that they finally get some decent methods to call.

Who the flying fuck wants to work like that?
>>
>>58833369

It might be a good idea to figure out what exactly you wish to create before needlessly expending energy learning to use random tools for creation.

Which languages to learn from a practical stand point are largely dependent on the problem domain you wish to specialize in.
>>
File: ella-freya-000.jpg (60KB, 640x640px) Image search: [Google]
ella-freya-000.jpg
60KB, 640x640px
>>58832843
Follow a book or take a class that teaches you the basics like data types, variables, operations, functions, classes, importing modules, interfaces, inheritance...

Python is very good for this, because you don't have to fuck around with confusing IDEs or compiling.

Once you're familiar with those concepts, (just to the point where you know what you have to look up when you see it again), it's time to study how things are made, like web apps, desktop applications, plugins, and so on.

The best way to study is to do your own personal project in the categories that interest you. Then just reference examples. Doing so will take you on a journey through many languages and technologies.
>>
>>58833346
>Also, your code seems to segfault at s[finish_index] = '\0';
Why the fuck would you segfault by assigning a value to an array?
>>
>>58833435

Not a ton, but I've played around with a number of its features. My primary use for it tends to be as a testbed for anything .NET. You can pretty much use it to interactively test any C# or F# class fairly easily.
>>
>>58833678
s was probably NULL when he attempted to dereference at
finish_index
.
>>
Any good references on cross compiling for Windows using gcc?
>>
>>58833855

>cross compiling for Windows
I'm presuming you're doing this on Linux? Look for a package along the lines of g++-mingw-w64-x86-64. The command for compiling will be x86_64-w64-mingw32-gcc, or x86_64-w64-mingw32-g++, depending on whether you are using C or C++. You will also want wine for testing your application. Otherwise, pretty much everything is like using GCC anywhere else.
>>
>>58833926
sizeof(char) * (strlen("test string") + 1))

since you must include the extra space for the terminating null character
>>
>>58833926
There are a lot of things wrong with your code:
>(char *)
Don't cast void pointers. It's pointless and just repeats information.
>sizeof(char)
This is pointless, as it's guaranteed to be 1.
>strlen("test string")
This doesn't leave space for the null terminator.
It should be strlen(...) + 1.
>>
>>58833970
>This is pointless, as it's guaranteed to be 1.
>i like using magic numbers in my code
kys faggot
>>
>>58834007
It's extremely clear from context, and in that particular example, there wouldn't be any number at all.
>>
>>58833942
>sizeof char
>>
>>58834212
there's literally nothing wrong with this. it is evaluated at compile time and improves readability and intention.
>>
why is my program segfaulting when I try to assign something to a particular array? i assigned it memory with malloc(), but it still segfaults 100% of the time when I try to give it a value.
any ideas why, /g/urus?
>>
>>58834252
>improves readability and intention
All it does is clutter up the code.

>>58834257
You're going to need to post the code.
>>
I know basics of C++, pretty much up to classes/structures.

How do I improve from here? Should I pick up a book or perhaps find a task to accomplish and learn along the way?

Also, how hard is Java to learn? I'm kinda turned off by its syntax and I'll have to learn it later on through college courses anyway.
>>
>>58834262
>All it does is clutter up the code.
opinion discarded
>>
>>58834288
It provides no useful information that wasn't there already.
It's the exact same reason that casting void pointers is stupid.
>>
>>58834284
the syntax is the easy part
>>
>>58834295
>It's the exact same reason that casting void pointers is stupid.
Doesn't C++ get pissy if you don't cast void pointers?
>>
>>58834309
>C++
Get the fuck out of here, you shit-eating moron.
>>
>>58834295
>It provides no useful information that wasn't there already.
It does. It provides the information that the data will be use as a memory for a C string.
>>
>>58834338
Or perhaps the fact you're assigning it to a char * would do that, and the size is calculated from a strlen.
>>
File: 1-raWO3dhM4jMjf9VY-kZzNg.png (333KB, 1200x960px) Image search: [Google]
1-raWO3dhM4jMjf9VY-kZzNg.png
333KB, 1200x960px
WHY IS JAVASCRIPT SUCH FUCKING CANCER I JUST WANT TO MAKE GOOD LOOKING APPS
>>
>>58834802
>APPS
found your problem
>>
I don't get it, do I absolutely need windows 10 if I want to make a game for it on Monogame? Any alternative that won't make me install Windows 10 but I will still be able to make a game for it and 8 (I have 7)?
>>
>>58834802
>90% of the tools in this are deprecated
>>
>>58834802

> APPS

Definitely your problem..

It also doesn't help that the more "Corporate acceptance" a language has the more likely it is to be horseshit to maintain / use.

Personally, I think mainstream corporate languages influenced by the same people who decided they need to fill every major logo / product with /x/ style symbolism and bullshit. It'd explain why Java, Node.JS, and .Net bullshit got so big.
>>
>>58834838

>do I absolutely need windows 10 if I want to make a game for it on Monogame?
By the looks of things, no. From the Monogame website, it seems it works with versions of Visual Studio as far back as VS2010, and furthermore, it appears that VS2015 (the latest version supported by it) does, in fact, support Windows 7. You should have no problem developing Monogame applications on Windows 7.

>Any alternative that won't make me install Windows 10 but I will still be able to make a game for it and 8 (I have 7)?
You can always develop on Linux as well.
>>
>>58834802
I'm glad to say that I recognise almost none of those pretty pictures.

I'm too busy conjuring the spirit of the computer with my spells.
>>
>>58834939
It supports windows 7 but says I need to have windows 8/10 to develop for 8/10 meaning a game wouldn't work on those OSs and I don't get why.
>>
spacemacs is a cool editor
>>
>>58834959

Develop and test the game on Windows 7. It will work without modifications on Windows 8 and 10. Presumably, you would need 8 or 10 if you wanted to make some sort of Metro/UWP game with Monogame.
>>
>>58835027
alright I guess microsoft and some other were just shilling when they said you needed the OS you were developing for if you wanted it to work on said OS.
>>
>>58835042

It's generally good practice, but strictly speaking, there wasn't too much of a breakage in application compatibility from 7 to 8 to 8.1 to 10.
>>
Hey, guys, what does a Sharepoint Developer do?

I dont get it. Sharepoint is a filesharing application. How do you develop for that?
>>
>>58833314
>It should be obvious. Microsoft saw the success of Java and couldn't stand Oracle. So they made a Java rip-off called C# and started the popular Java hatred meme. The NEETs described in category 1 took the bait and forgot how shitty C# itself is.
Wow, it's just like my chinese cartoons.

Surely, it's not the fact that C# is a much nicer language to use, and the tools and frameworks surrounding it are insanely easy to work with.
>>
>>58835135
You can embed all sorts of things into Sharepoint; it becomes a huge franken-website with all manner of fun things.

Eventually, you get to the point where making a change or maintaining it involves lamb's blood and pentagrams.

Basically, it's so configurable that you need people dedicated to configuring and maintaining it.
>>
>>58834988
No, it's warm and comfy.
>>
>>58834802
>JavaScript
>Script
>scripting languages
>applications
>ever
>>
>>58835560
Some people want to accomplish something as programmers.
>>
>>58835570
I don't understand how anyone can be retarded enough to make a statement like that.
>>
>>58835570
>wanting to accomplish something as a programmer
>not living the glorious NEET life
>>
>>58835594
>>58835623

>Backend programmer
>Nobody knows you
>Nobody cares about you
>You dont make pretty things
>Your only purpose is to satisfy the lead programmer who's only purpose is to satisfy the director
>Maybe you should make apps with a nice looking UI and cool features
>lol fuck that bro are you some sort of hipster fag? Only faggots would ever want to use their creative abilities to make something nice.
>>
>>58835630
>Backend programmer
>NEET programmer
These two things are not the same.
>>
>>58835570
Scripting languages are supplementary tools for programmers, you know?
Even non-programmers use them.
>>
>>58835653
Yes I do know that anon.
I am trying to make apps with C++ backend and literally any fucking frontend that looks good and modern and is really really customization.
The only thing I am aware of that does this is Javascript with Electron.
I've looked in Python but it looks like shit. I've also looked into wxWidgets but they also look like shit. Kivy looks like shit.
>>
>>58835679
Welcome to the meaningless agony of GUI development.
>>
Hey all, not sure if this is the greatest thread to ask this question but couldn't find any other active appropriate ones.

I want to write a program that's effectively a chat room for organising matches for a particular video game I play. It'll have rooms for specific geo locations and create new chat rooms for started games.

I'm about intermediate with python and java, which language would you suggest for such a task?
>>
>>58835749
Use Java for the back end and Python for the front end.
>>
>>58835749
Use Python for the back end and Java for the front end.
>>
>>58835749
Use Python for the back end and the front end.
>>
>>58835749
Use Java for the back end and the front end.
>>
>>58835749
install gentoo
>>
>>58835749
im new here wheres tyhe wiki
>>
>>58835840
In the sticky: >>51971506
>>
>voulant creer personnel web parseur
>deteste memeserpent
La vie est souffrant.
>>
File: 1486429712136.jpg (123KB, 410x410px) Image search: [Google]
1486429712136.jpg
123KB, 410x410px
>>58835913
Is that actually French, because I can actually understand that.
>>
>>58835913
Don't you have some sentences to write where you put an unnecessary space before question marks?

>>>/int/
>>
>>58835679
Try Qt with QML.
>>
<?php 
$arrData = array();
for($i = 0;$i < 10; $i++)
{
$arrData[] = rand(0,100);
}
$arrPrimes = array();
$arrPrimes[0] = 2;
$j = 0;
for($i = 3;$i < 100;$i++)
{
while(true)
{
if($i % $arrPrimes[$j] == 0)
{
break;
}
else
if($i < $arrPrimes[$j]*$arrPrimes[$j])
{
$arrPrimes[$j+1] = $i;
$j = 0;
break;
}
else
$j++;

}
}
print_r($arrPrimes);
?>


why does he skip primes?
>>
File: 1444540183565.gif (568KB, 240x291px) Image search: [Google]
1444540183565.gif
568KB, 240x291px
>>58835913
>memeserpent
>>
>>58835931
Voici un. Es-tu satisfait maintenant ? :-)

>>58835930
English borrowed a lot from French, and gallicisms are used for "high speech", e.g. respond me instead of answer me and such.
>>
Still having problems with learning haskell, any good book recommendations except for learn you a haskell?
>>
>>58836079
Why are you learning Haskell?
>>
>>58836079
Haskell wikibook.
>>
>>58836092
Just wanna try out some functional programming to see in what ways it's different.
Kinda get a new perspective yaknow
>>
>>58836079
"Haskell Programming (from First Principles)" has everything you could ever want to know and ramps up slowly.

Be warned, it's not for the faint of heart.
>>
>>58836109
this
learn you a haskell is kind of retarded and it skips a lot of things.
>>
>>58836079
>>58836109
>>58836131
>>58836138

We really need a decent Haskell book.
The wiki is... a wiki.
Haskell Programming is fuckhuge.
LYAH is disorganised and patchy.
Real World Haskell is old and moves too fast.
>>
>>58836148
>The wiki is... a wiki.
that's what I like about it.
>>
>>58836179
Yeah, fair enough. Some people will want a .pdf or hard copy, though.
>>
Why do we hate functional programming in JavaScript, /g/ ? It's so much fun.


// Expand a one-element list: expand([1], 3) = [1, 1, 1]
var explode = ((handle) => handle.bind(null, handle))(

(myself, list, length) => {
if (list.length != length)
list = myself(myself, list.slice().concat(list[list.length - 1]), length);

return list;
}
);


// Return arguments as a list
var zip = function () {
return Array.apply(null, arguments);
};


// Left rotate a list, place the left-most element to the right and
// return new first element
// NB! This mutates the list argument
var shift = (list) => [list[0], list.push(list.shift())][0]


// Do fizzbuzz
explode([1], 100)
.map(((i) => () => ++i)(0))
.forEach(
((fizz, buzz, number) => (

(fizz, buzz, number) => {
console.log(fizz + buzz ? fizz + buzz : number);
}).apply(null, zip(fizz(), buzz(), number))

).bind(
null,
((fizzes) => () => shift(fizzes))(explode([''], 2).concat('fizz')),
((buzzes) => () => shift(buzzes))(explode([''], 4).concat('buzz'))
)
);

>>
>>58836148
Programming in Haskell
>>
>>58836214
I don't know why 4chan is wrapping my post
>>
>>58832484

Cirno a cute!
>>
>>58836214
>mutating i
>mutating list
>using javascript scope

Pig disgusting
>>
>>58835930
It's google translation french.
>>
>>58836218
Had a flick through the first two chapters and it seems to introduce the basic concepts at the right rate and in the right order.

Here's a link to an OCR copy:
http://smtebooks.com/book/2234/programming-in-haskell-2nd-edition
>>
>>58836250
I'm not sure of that, because the poster does in fact appear to be French.

Notice that he missed the preposition when using 'respond' in this post: >>58836075
>>
>>58836214
t. pajeet
>>
>>58835913
Va te faire foutre, espèce de petit pd
>>
>>58836327
What's a 'pd'?
>>
>>58836344
A faggot.
>>
>>58836356
What do the letters stand for?
>>
>>58836344
2/3 of a pdf
>>
>>58836359
per deux
>>
>>58836214
Why the hell would anyone program this way? That looks tedious as fuck. Are Haskell fags this retarded too?
>>
>>58836359
It's short for pédéraste.
A man who loves little boy.
>>
>>58836369
Two thirds of a pedofile?

>>58836382
Ah, that makes sense. It's spelled 'pederast' in English.
>>
>>58836376
In Haskell it would be much nicer
>>
>>58836408
And 'map' wouldn't be broken.
>>
Trying to optimize prime number finder/adder, without using arrays. Got it to around 112ms for first 100k'th prime sum with compiler settings, skipping evens, and having to use modulo/making my inner loop increment by 6/other crap. Can't seem to make it faster without having to use arrays somehow. I can't count composites up to a number using loops without somehow storing values (without vectors and bitset as well), and there are repeats if you use inner loops. I don't think I can do anything else.
>>
>>58836432
There's some good information about optimising the Sieve here:
https://www.cs.hmc.edu/~oneill/papers/Sieve-JFP.pdf

I'm sure that some of it will translate to an imperative style.
>>
>>58836214
Your map is unecessary:

// Do fizzbuzz 
explode([1], 100).forEach(
((fizz, buzz, number) => (

(fizz, buzz, number) => {
console.log(fizz + buzz ? fizz + buzz : number);
}).apply(null, zip(fizz(), buzz(), number()))

).bind(
null,
((fizzes) => () => shift(fizzes))(explode([''], 2).concat('fizz')),
((buzzes) => () => shift(buzzes))(explode([''], 4).concat('buzz')),
(((i) => () => ++i)(0))
)
);


>>58836421
How so?
>>
File: javascript.png (5KB, 148x107px) Image search: [Google]
javascript.png
5KB, 148x107px
>>58836458
>>
File: 1485398946790.jpg (13KB, 600x159px) Image search: [Google]
1485398946790.jpg
13KB, 600x159px
>>58836458
>>
>>58836471
>>58836466
The callback function to map takes three arguments, anons, namely: element, index and array

['10', '10', '10', '10'].map(n => parseInt(n))
>>
>>58836447
I can't use a sieve if I can't remember where I've sieve before, as in using a vector/array/bitset. So I don't know how I could use a sieve without something like that.
>>
>>58836492
Oh, we know. See: >>58836421
>>
>>58836492
>>58836466
>>58836471
And parseInt takes multiple arguments, namely string and base.
>>
>>58836492
eta reduction does not apply in js

that is a shocking flaw


i.e. (\x -> f x) =/= f
>>
>>58836263
Glad you found the 2nd edition, the first edition introduced doing a parser waaaaaaay too early
>>
>>58836544
Fair enough. I was after the second because it was released last year, whereas the first was from 2007.

I actually really like that it starts off talking about programming with simple functions, and then very sensibly (and briefly) dips into 'and here's how to use do-notation for your side-effects'.

Once you understand those two things, you're pretty much set with basic Haskell.
>>
>>58836492
lmao
what a shit language
>>
>>58836575
>>58836506
>>58836499
>maximum damage control

Haskellfags gonna hasklel
>>
>>58836327
Je n'irai pas. Qu'est prochain ?
>>
>>58836575
>>58836506
>>58836503
>>58836499
Well, it doesn't have eta reduction.

But you can do this though
Function.prototype.rbind = function () {
return (function (args) {
return this.apply(this, [].slice.call(arguments, 0, arguments.length - args.length).concat(args));
}).bind(this, [].slice.call(arguments));
};

var pi = parseInt.rbind(10);

console.log(['10', '10', '10', '10'].map(pi));
>>
>>58836621
>>58836327
>francofags arguing
I'm actually learning from this, please continue.
>>
>>58836376
one of the sane versions:
fizzBuzz :: (Show a, Integral a) => a -> String
fizzBuzz n =
case (n `mod` 3, n `mod` 5) of
(0, 0) -> "FizzBuzz"
(0, _) -> "Fizz"
(_, 0) -> "Buzz"
(_, _) -> show n

main = mapM_ (putStrLn.fizzBuzz) [1..100]
>>
>>58836672
>[].slice.call

what is this memery
>>
>>58836676
N'écoute pas ce type, son Français est à chier.
>>
>>58836692
That looks like the bastard child of Perl and CoffeeScript had a child with bash.

>>58836694
arguments isn't an array, it's an object.
>>
>>58836692
Needs more monoids.

import Data.Monoid
import Control.Applicative -- it's not real programming if you don't break out the S combinator at least once

three :: Integer
three = 3
five :: Integer
five = 5

forb :: Integer -> String
forb = mwhenMof three "Fizz" <> mwhenMof five "Buzz"

mwhenMof = mwhen . ((0 ==) .) . flip rem
mwhen p m x = if p x then m else mempty

fb = rwhen (== mempty) . forb <*> show
rwhen p x y = if p x then y else x

main = putStr $ foldMap (<> "\n") $ fb <$> [1..100]
>>
>>58836692
Array(100)
.fill("")
.map(
(e, i) => (i+1) % 3 ? e : "Fizz"
)
.map(
(e, i) => (i+1) % 5 ? e : e + "Buzz"
)
.map(
(e, i) => e ? e : i + 1
)
.forEach(
(e) => console.log(e)
);

>>
>>58836672
Wait, what? Am I reading this correct? JavaScript can into partial functions now? But /g/ told me it couldn't do that because it isn't a proper programming language....
>>
>>58836711
>three :: Integer
>three = 3
>five :: Integer
>five = 5

why is this acceptable?
>>
>>58836710
>That looks like the bastard child of Perl and CoffeeScript had a child with bash.
Haskell first appeared in 1990.
_Almost_ everything you see there was in by 2000.

There's a function in the Data.Foldable called for_ that might make this easier


main = for_ [1..100] (\i -> putStrLn (fizzBuzz i))
>>
>>58836755
Gotta avoid those magic numbers, bro.
>>
>>58836755
it's retarded, but why would it be "not acceptable"?
>>
>>58836755
I'm more concerned about why it couldn't be just something like:
>three :: Integer = 3
>five :: Integer = 5
>>
>>58836755
>>58836895
It's retarded and unacceptable because that code was written for maxiumum derpery.

If you remove them, you'll find it's actually a very daft way of adding type constraints.
>>
>>58836711
Why can't you use <*> in base, or (<>) = mappend?
That would avoid both imports
>>
>>58836917
Oh, syntax. Just enable ScopedTypeVariables if you want that style.

>>58836927
This code was not written for the sake of sanity.
>>
>>58836939
I'm kind of disappointed in you anon.
You could've used the
Monoid b => Monoid (a -> b)
instance
>>
>>58836950
Check out 'forb'.
>>
>>58836958
Oh, I didn't see the extra argument.

I'm disappointed in you anon, you didn't use the
Monoid m => Comonad ((->) m)
instance
>>
>>58836966
Ha, fair enough. Feel free to work it in.
>>
How do I convert this to g++ asm? It won't run in NetBeans. It can't recognize the (naked) either.

double inline __declspec (naked) __fastcall sqrt(double n) {
_asm fld qword ptr [esp+4]
_asm fsqrt
_asm ret 8
}
>>
How do I guarantee referential integrity/consistency in a nonrelational database?
>>
Would anyone be willing to help me out here?

http://softwareengineering.stackexchange.com/questions/341745/how-do-i-compile-a-js-file-from-an-html-file-page-using-firefox
>>
>>58837104
Something like that?
__attribute__ ((naked)) double inline __fastcall sqrt(double n)
{
double result = 0;
__asm__(
"fldl %1;"
"fsqrt;"
"fst %0"
:
"=g" (result)
" g" (n)
);

return result;
}
>>
File: unknown.png (696KB, 1000x749px) Image search: [Google]
unknown.png
696KB, 1000x749px
Using CSharpScript I was able to add scripting to my image filter shit.

Kinda neat.
>>
>>58837360
I love that that shares its abbreviation with cascading style sheets.
>>
>>58837374

I also thought that was pretty entertaining.
>>
>>58837387
It's also interesting because C# shares its file extension with the language in which I first learned to program: TribesScript.
Makes me think about recursive trailling 's's.
>>
>>58837329
Why does C/++ inline assembly gotta be so gross
>>
File: 20170207_115230.jpg (3MB, 3264x1836px) Image search: [Google]
20170207_115230.jpg
3MB, 3264x1836px
>>58837329
Doesn't quite work. Posted error in the pic.
>>
>>58837525
AT&T syntax, the constraints and shit, the underscores around "asm" are kind of ugly too.
>>
Going to roll my own NFA regex implementation.
>>
Daily reminder OOP is for real programmers who can actually think
>>
>muh data structures
>muh algorithms
>>
I am working on learning C and ASM by translating code between the two. I have no idea how to handle things like the 16 and 8 bit registers. I have only ever used python before so everything here is new to me. If for example I have
mov ebx, eax
xor bl, al

How do I represent this in C since I would be modifying a portion of the ebx register as well.
>>
how do i check
if(someStreamPos != 0)
...


it says

std::fpos<_Mbstatet>::operator !=': 2 overloads have similar conversions


how do i make it just pick one?
>>
File: preprocessor.png (11KB, 755x390px) Image search: [Google]
preprocessor.png
11KB, 755x390px
>C#script has no built in way for code block to specify references
>have to write a preprocessor

Before the Roslyn team even came up with this scripting engine, some other guy's csscript had '//css_ref fn'

Why not include something like that?
>>
>>58838202
nvm, apparently i can just use size_t instead of streampos

why did some tutorial i read suggest i use streampos to save a filesize instead of just size_t?
>>
I'm thinking on picking up Haskell again.
Is https://en.wikibooks.org/wiki/Haskell good? I'm looking for a resource without to much math masturbation.
>>
>>58837317
You getting a 404 on your js file in the console?
>>
Any good tutorial for paralell image processing in opencv?
>>
>>58837317
>console.log('It's working!');

that's a syntax error
>>
Still writing the fucking interpreter for my shitty markup language for my shitty UX library.

fuck me in the ass
>>
>>58838303
>Haskell
>without to much math masturbation
Did you think Haskellfags are pretentious faggots for nothing?
>>
>>58838303
http://learnyouahaskell.com/ is still the best I have found.
>>
>>58838359
And by writing I mean stretching the work I could do in a day to 2 weeks alrady.
>>
>>58838303
>"learning" Haskell
>not learning at least category theory and lambda calculus
hahahah good luck maybe next you'll try to learn Java without objects
>>
>>58838205
i think the idea is that it's arguably not the business of the script to specify references, but rather that the code that consumes the script should specify what references the script is allowed to use
>>
>>58838399
I've already gone through LYAH, but I didn't like it. I feel like it doesn't explain things properly.
>>
>>58838359
>>58838414
Still trying to justify all this work by thinking about how much more efficient this should be than electron for multiplatform applications though.
>>
Best over the counter study aids? Someone has to be redpilled on this.
>>
>>58838205
>>58838462
also note that there's no way to specify an assembly reference for a block of regular C# code either, even with the preprocessor (rather it's part of the build process), because references are an aspect of the assembly, not of any given block of code. so allowing it for scripts is somewhat of a break from style, though it makes more sense since every script could potentially be built as a separate assembly
>>
>>58838551
Nicotine gum. All the other stuff (eg modafinil) just keeps you awake, whereas nicotine is actually nootropic, too.

Source: read pharmacology at the 'bridge.
>>
>>58838359
>>58838414
>>58838507
Any thoughts on this?
>>
>>58838551
slav? cigarettes
scandi? snus
* coffee
>>
>>58838599
Will I get addicted to studying? That might stave off the depression.
>>
>>58838649
only if you can maintain your enthusiasm for your subject, sure
>>
>>58838551
if you want significant results, drop the over-the-counter requirement and get a prescription for adderall (it's pretty easy). that shit works
>>
>>58837104
>>58837329
>>58837572

Anyone?
>>
File: w.jpg (11KB, 300x150px) Image search: [Google]
w.jpg
11KB, 300x150px
>C++ Java C# Rust Go

which has the most comfy standard library for algorithms and data structures for getting shit done?
>>
>>58838677
well last time i went to the doctors they told me i needed a professional diagnosis from a psychologist in order to get adderall so...
>>
>>58838696
C++
>>
>>58832555
>binary privilege

umm did you just really? I'm a non-binary digit (non-bit) who don't need no restrictions
>>
>>58838709
>C++
>getting shit done
nope
>>
>>58838696
Anything but Rust and Go.
>>
>>58838619
Okay, since that's not interesting, what are some of the best things Angular, React and all them do?
>>
>>58838687
That should have been:
    __asm__(
"fldl %1;"
"fsqrt;"
"fst %0;"
: "=g" (result)
: " g" (n)
);
>>
bool ^= 1;


bool = !bool

are these the exact same operations or is the first one actually faster?
>>
>>58838677
It was probably easy to get and worked because you actually need it.
>>
>>58838696
C++'s is fast and powerful but pretty barebones, somewhat difficult to learn to use correctly, and certainly ugly and/or cumbersome at times. C#'s is pretty, extensive, and easy to understand. Java's is probably similar to C#'s but Java is a shit language in comparison. Can't speak for Rust or Go, personally. For the "comfy" heuristic specifically, C# wins for me.
>>
>>58838696
Java because it pretty much has a library for everything and it will get your code to work and run but it won't be the best
>>
>>58838767
The first one is faster, but the compiler will optimize the second one into the first.
>>
>>58838785
> Java's PROBABLY similar
> but Java IS shit
Really made me think
>>
>>58838767
both compile to a single xor instruction even without optimizations
>>
>>58838785
I love people like this say a language is shit for absolutely no reason when in reality Java is a good programming language to work with and when he finally comes up with reasons they will all be non issues in programming
>>
>>58838555
>so allowing it for scripts is somewhat of a break from style, though it makes more sense since every script could potentially be built as a separate assembly

Really, I just wanted it to be flexible enough to use any existing assembly. Maybe somebody wants a script to use their library or something.
>>
>>58838708
have you talked to a psychologist? if you're having trouble focusing on studies/looking for study aids, you might legitimately be the kind of person it's intended for

>>58838768
it was probably easier to get because i actually need it, yeah. but from what i've seen, it "works" for basically everybody (by that i mean it'll help you cram/binge study/work with laser focus)
>>
>>58838798
what if it's actually a ptr to a bool
ptr->bool = !ptr->bool
vs

ptr->bool ^= 1


now it must be faster tho right? because you don't have to lookup 1? i'm having a difficult time testing this because the performance i get running my program varies for some reason i don't understand. but the second one seems to be consistently faster in this case.
>>
>>58838862
wow i'm really fucking up those code tags every time
>>
>AAA games are arguably some of the most complicated computer programs in existance
>Not a single. one. is. in Java.
really makes you think, eh
>>
>>58838883
>AAA games are arguably some of the most complicated computer programs in existance
>Not a single. one. is. in Haskell.
certainly boggles your synapses
>>
File: 1483982685056.jpg (94KB, 803x688px) Image search: [Google]
1483982685056.jpg
94KB, 803x688px
>>58838883
>AAA games
>most complicated computer programs in existance
>>
>>58838883
well yeah, you can't really use a GC based language for an AAA game otherwise you end up with something like Minecraft that struggles to maintain 60 FPS on modern hardware
>>
>>58838813
>>58838828
Note that I said Java is a shit language *in comparison*. It's a language, yeah, it'll get the job done. Yeah, it's similar to C# in many ways. But C# is also significantly better in so many ways to the point that I would never recommend using Java over C# unless you're restricted by some external factor.
>>
Is malloc really slow for games?
Is that why every engine and game ends up writing it's own memory allocators?
>>
>>58838696
If you want straight up comfy with plenty of out-of-the-box things to work with data, that's going to be C#.

It just werkz™.
>>
>>58838924
it's not slow per se, but allocating memory all the time with a lot of dynamic objects can be costly that's why it's better to just go with something like static pools for those games
>>
>>58838905
>Advanced 3D rendering, physics, networking, AI and hundreds of mechanics all interacting in one package
>Not complicated
Whatever you say pajeet.
>>
>>58838883
>AAA games are arguably some of the most complicated computer programs in existance
>>>/v/
>>
>>58838915
>C# is similar to Java
>C# is also significantly better in so many ways
>Doesn't list any real reasons it is better
>>
>>58838915
I was pointing out that you admit you don't know or use Java when you used the word 'probably' and then go on to make a definitive statement about it.
>>
>>58838848
I hear you. I'm not saying that shouldn't be possible, it sounds reasonable to me. I was just giving a potential reason as to why the API was designed as it was.
>>
New thread:

>>58838969
>>58838969
>>58838969
>>
>>58838934
So basically they're just preemptively hoarding a few gigs to distribute internally instead of begging the kernel for memory every time?
>>
>>58834007
>REEEEEEEEEEEEE I didn't know that
>>
>>58834252
>improves readability
retarded webshit detected
>>
>>58838765
Still isn't working. Says invalid punctuation ' ' in constraint.
Tried to remove the space before the g, and it compiles if I return n but doesn't run, but if I return result it days invalid instruction suffix for fld, operand type mismatch for fst
>>
>>58838359
>UX library
>UX
>library
anon...
>>
>>58838959
I was assuming the standard library is similar. I know about the language features. I especially know what Java is lacking in comparison with C# and it is a significant matter.

>>58838953
disregarding numerous very useful and verbosity-reducing instaces of syntactic sugar features (since those "don't count"), off the top of my head; user-definable value types (huge), unsafe contexts, delegates, ref/out, generic constraints, generics on value types and primitives, covariance/contravariance, value types implementing interfaces with no runtime cost (except automatic boxing/unboxing where applicable)
>>
>>58838943
OS is infinitely more complicated
>>
>>58838943
>muh gaymes
fuck off, kid
>>
>>58838649
You might get addicted to nicotine, but I doubt you'll get addicted to studying.
Thread posts: 320
Thread images: 30


[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.