[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 | Extra juicy! | Home]

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: 352
Thread images: 39

File: 1334682645405.jpg (475KB, 1024x1076px) Image search: [iqdb] [SauceNao] [Google]
1334682645405.jpg
475KB, 1024x1076px
Previous /dpt/ at >>50756824

Actually get stuff done edition

What are you working on?
I'm currently looking up somethings for my networks homework. Done with Computer Graphics project for today.
>>
File: asmref2.png (117KB, 1920x1080px) Image search: [iqdb] [SauceNao] [Google]
asmref2.png
117KB, 1920x1080px
Other than examples, what other sections should I add to my entries?
>>
>>50762733
checking out graphql from fb, seems pretty nifty
>>
>tfw not imaginative enough to think up of things to make
>>
Trying to figure out the best way to go about keeping one from calling an initialization function twice in a row without first calling the associated shutdown function in my dependent linear language

What I'm thinking is that the main function gives you a linear "system" handle as a parameter and requires you to return it, and this handle has a set of libraries in its type
Initializing library X adds X to the set in the system type and requires that it not be there beforehand, and shutting it down removes it

Sound sensible?
>>
File: 1425634768588.gif (486KB, 475x347px) Image search: [iqdb] [SauceNao] [Google]
1425634768588.gif
486KB, 475x347px
>covariance
>contravariance

I just don't even care anymore
>>
>>50762793
why the fuck is it a c program, just write a manpage nigga
>>
use the trap thread plz
>>
>Recent CS grad
>Applied to be software development engineer at Amazon
>Fuck up at the end of phone technical interview

O-oh well. I guess I can keep working at this shitty startup that doesn't pay.
>>
>>50762793
that pretty much sums it up
>>
statement vs expression
>>
File: what.jpg (449KB, 1537x851px) Image search: [iqdb] [SauceNao] [Google]
what.jpg
449KB, 1537x851px
how is this suppose to make any sense
>>
>>50762856
But anon, that's not going to improve my coding skills
>>
>>50762936
hi ANDREW
:)
>>
>>50762936
tell it where autoheader is? maybe it's looking in /usr/something
>>
>>50762936

Just let it go.
>>
>>50762998
hello
>>
>>50762936
gentoo
>>
>>50763009
>tell it where autoheader is? maybe it's looking in /usr/something

How the fuck do I do that?

>>50763010
But i need curl ;-;
>>
>>50762851
Assume that B is a subtype of A

You can get an A from both a container of As and a container of Bs, but you can only get a B from a container of Bs
For that operation, a container of Bs can be substituted for a container of As (following B --> A); that operation is covariant

You can put a B into both a container of As and a container of Bs, but you can only put an A into a container of As
For that operation, a container of As can be substituted for a container of Bs (the opposite of B --> A), that operation is contravariant
>>
What programming pet peeves do you have? Mine is when people convert numbers to strings to find digits.
>>
>>50763107
How are you supposed to do it then?
>>
>>50763107
when people use C++
>>
>>50763057
>How the fuck do I do that?
fuck me if I know. I have automake and autoconf installed and that autoheader is simply there in /usr/bin. How the hell did you install that?
Why do you peasants use mingw when you can just virtualize some linux distro?
>>
>>50763114
Modulo and floored division by 10.
int sumdigits(int n) {
int sum = 0;
for(; n; n/= 10)
sum += n % 10;
return sum;
}
>>
>>50763131
fuck this gay ass shit dude

HOW CAN AUTOHEADER NOT BE INSTALLED IF IT'S RIGHT NEXT TO AUTOCONF

that doesn't even make sense... either both would be installed or neither
>>
>>50762886
>>50762886
>C++

You guys are doing it wrong.
#include <iostream>
#include <string>

using namespace std;

bool no_go(const string& str, const string& delimiters = " _") {
string::size_type pos = str.find_first_of(delimiters, 0);
return pos == string::npos;
}

int main() {
std::string no_go1{"OP is a faggot"};
std::string no_go2{"OP_is_a_faggot"};
std::string good_2go{"OP.is.a.faggot"};

cout << std::boolalpha;

cout << "no_go1 : " << no_go(no_go1) << endl;
cout << "no_go2 : " << no_go(no_go2) << endl;
cout << "good_2go : " << no_go(good_2go) << endl;
}
>>
>>50763173
have you checked if it's in a different path?
have you tried uninstaling it and reinstaling it?
jokes on you for using the GANOO
>>
What is /g/'s opinion of F#, OCAML, or other similar functional languages?
>>
>>50762866
kill yourself faggot
>>
File: smartneko.webm (265KB, 486x500px)
smartneko.webm
265KB, 486x500px
Ask a programming literate anything.
>>
>>50763153
ugly
>>
>>50763233
i'm not a faggot, it's not gay if i'm dressed like a girl
>>
>>50763260
WAY faster and more efficient. It should be an idiom programmers are used to.
>>
>>50763267
post legs
>>
>>50763244
Text editors from best to worst
>Emacs
>Atom
>Sublime
>nano
...
>Vim
>>
>>50763215
>have you checked if it's in a different path?
It is in the same path
>have you tried uninstaling it and reinstaling it?
I will
>>
File: cover.jpg (51KB, 400x579px) Image search: [iqdb] [SauceNao] [Google]
cover.jpg
51KB, 400x579px
>>50762733
Why is this book considered important? LISP sucks!
>>
>>50763244
Where do you get these cute gifs?
>>
>>50763278
Emacs + vim bindings > vim > Emacs
>>
>>50763217
I fucking hate ML syntax
>>
>>50763291
reddit
>>
>>50763217
Hybrid functional languages are just a trick to get procedural programmers to work with people who know better (i.e. people who would prefer functional languages like Haskell). OCaml's acceptable, but languages like F# and Scala are a disgrace. Haskell is better than Ocaml.
>>
>>50763310
too strong for you?
>>
File: wsg9.webm (265KB, 486x500px)
wsg9.webm
265KB, 486x500px
>>50763291
>>
>>50763340
No, I love functional programming, the purer and stronger typed the better

I just really dislike ML syntax compared to Miranda (Haskell, Agda) syntax
>>
>>50763338
Haskell makes my brain hurt. C and Python are all I need.
>>
File: d.jpg (864KB, 1280x1707px) Image search: [iqdb] [SauceNao] [Google]
d.jpg
864KB, 1280x1707px
>>50763278
emacs > spacemacs > *

>>50763291
Internet
>>
>>50763369
That's fine by me. If you ever want a challenge or something to learn I strongly suggest it though. No reason to bother unless you want to learn it.
>>
>>50763282
>Why is this book considered important?
Because it teaches you very good practices about how to actually write code. Personally, I prefer HTDP
>LISP sucks!
that's your uneducated opinion and for which you didn't provide any evidence to back it up

>>50763379
like:
int a;
double b= 4.23;
a = b;

of course you can, but the floating part goes to shit
>>
>>50763282
https://www.cs.berkeley.edu/~bh/sicp.html
>>
>>50763187
>function named exactly backwards heh

#include <iostream>
#include <string>

using namespace std;

bool good_2_go(const string& str, const string& delimiters = " _") {
string::size_type pos = str.find_first_of(delimiters, 0);
return pos == string::npos;
}

int main() {
std::string nogo_1{"OP is a faggot"};
std::string nogo_2{"OP_is_a_faggot"};
std::string good_2go{"OP.is.a.faggot"};

cout << std::boolalpha;

cout << "nogo_1 : " << good_2_go(nogo_1) << endl;
cout << "nogo_2 : " << good_2_go(nogo_2) << endl;
cout << "good_2go : " << good_2_go(good_2go) << endl;
}
>>
>>50763244
So are those balls like tokens for the cat, so it can exchange them for food when it wants, but only a limited amount?
>>
>>50763460
Looks like it
>>
Trying to think of the best way to control my LED cube.
I'm intentionally not looking at other people's work since I want to do this myself.
I plan on doing a 7x7x7 but I'm starting off with a 3x3x3 just to get my control circuit figured out.
I'm using RGB common anode. I'm trying to decide if I want to have the cathode color leads controlled independently of the current sink logic and actually give varied colours for each individual LED, or if I should control the logic through the R G and B individually and just use multiplexing to give the illusion of mixed colours.
>>
>>50763460
>>50763473
http://benjaminmillam.com/cat-geek/monkey-the-cat-hunts-for-dinner/
>>
>>50763435
That's nice.
>>
>>50763460
yup. Even crows can do the same. Those fucking intelligent birds
https://www.youtube.com/watch?v=AVaITA7eBZE
>>
>>50763534
This is truly amazing.
>>
Reminder that C is obsolete and Go is the approved language for all new projects.
>>
>>50763543
Wow...
>>
>>50763662
/g/ approved?
>>
>>50763694
Yes, both /g/ and the entire professional programming community at large.
>>
>>50763662
>GC
Nah
>inb4 "it runs on a different thread so there's no runtime effect"
>>
>>50763662

B-but what about muh dlang?
>>
>>50763662
>Go is the approved language for all new projects.
said no one ever
>>
>>50762733
studying for a c++ midterm tomorrow, only doing from the intro to c++ to nested while loops, nothing crazy.
>>
>>50763662
>Go is the approved language
Kill yourself

>>50763694
No it's not. We've had this discussion with Gofags too many damn times and each time they get BTFO because it's a shitty language.
>>
File: Capture.jpg (30KB, 465x368px) Image search: [iqdb] [SauceNao] [Google]
Capture.jpg
30KB, 465x368px
>>50763662
>import "fmt"
>Still have to write fmt.PrintLn
Dropped
>>
>>50763710
Dead. D had its chance and blew it.
>>
>>50763723
Go is a stupid language but this is a stupid complaint. You can easily import stuff into the namespace using:
import . "fmt"
>>
>>50763662
>Go

http://qr.ae/drvVS
http://qr.ae/drvm8
http://yager.io/programming/go.html
http://nomad.so/2015/03/why-gos-design-is-a-disservice-to-intelligent-programmers/
http://java.dzone.com/news/i-don%E2%80%99t-much-get-go
http://dtrace.org/blogs/wesolows/2014/12/29/golang-is-trash/
http://www.lessonsoffailure.com/software/google-go-not-getting-us-anywhere/
http://www.lessonsoffailure.com/software/googles-go-not-getting-us-anywhere-part-2/
http://www.lessonsoffailure.com/software/google-go-good-for-nothing/
https://gist.github.com/kachayev/21e7fe149bc5ae0bd878
>>
>>50763739

You take that back.. you.. you... double nigger!
>>
>>50763749
>other languages do it automatically
>have to add an extra period to import into namespace
My complaint is still valid
>>
I completed the Python track in Codeacademy /g/, tell me where to go next.
>>
>>50763739
d is far from being dead.
>>
Are there any good guides for learning how to write Linux kernel modules?
>>
>>50763662
Go sucks. C is well designed and clean. C is better than C++. C++ is too difficult.
>>
>>50763791
>c++ is too difficult

really? I mean I find it to be almost as easy as python.
>>
File: 1443418480630.jpg (81KB, 707x682px) Image search: [iqdb] [SauceNao] [Google]
1443418480630.jpg
81KB, 707x682px
>>50763791
>C is well designed and clean.
>>
File: call-him-a-faggot.png (715KB, 956x553px) Image search: [iqdb] [SauceNao] [Google]
call-him-a-faggot.png
715KB, 956x553px
>>50763770
>>
>>50763772
Actually thinking about it this isn't a bad complaint. Good compilers should implicitly detect what needs to be imported from the standard library and work as such. It's verbose and unnecessary for stuff to be imported when it's already there in the code. Then again, verbose and unnecessary is the definition of Go.
>>
>>50763782
If that's true, then how come the first letter of Dead is 'D'?
>>
>>50763773
I'd also like to know, I'm sort of in the same boat.

For now, what I've been doing is making little programs to challenge myself (basic movement on a text grid represented with X and 0, a basic RPG text combat engine that still needs a lot of work, etc).

I'm going through the HTML/CSS course right now, but that's a totally different animal.
>>
>>50763785
TLPI?
http://www.man7.org/tlpi/
>>
>>50763901
That opens precedents.
>>
>>50763791
> If you can't manage memory on your own you are stupid and get what you deserve.
> C++ is too complicated
>>
>>50763782
>abandoned by its creators
>not dead
pick one
>>
>>50763918
I'll check it out, thanks.
>>
>>50763933
hehe could be anon

>>50763959
nprb
>>
>>50763791
Go's a systems programming language though, unlike C++.
>>
>>50763938
>abandoned by its creators
what the fuck are you talking about ? Andrei Alexandrescu left his job at facebook to create the D Foundation

http://forum.dlang.org/post/[email protected]
>>
>>50764015
Yeah, and then he immediately regretted it and offed himself.
>>
>>50764015
>http://forum.dlang.org/post/[email protected]
>I'm also glad to announce that the D Language Foundation already has a donor - I have decided to contribute my books' royalties to it.
Beautiful.
>>
File: 1440078011096.png (35KB, 700x700px) Image search: [iqdb] [SauceNao] [Google]
1440078011096.png
35KB, 700x700px
>>50764001
>>
If Go's so great then why doesn't Richard Stallman use it?
>>
>>50764001
pls
>>
>>50764054
Stallman doesn't program, he just gives talks.
>>
>>50764045
>implying books royalties make D less shit
nigga please
>>
>>50764109
Where i said that ?
>>
>>50764097
Oh, I guess GNU just programmed itself then.

>this is what atheists actually believe
>>
>>50764128
GNU's just an acronym, there's no programming involved.
>>
>>50764128
But that anon is right, Stallman does not program anymore, he used to, but does not anymore, he stopped in early 90s or so, decade before Go existed even on paper.
>>
1/2

Guy Steele expresses similar admiration. Currently a research scientist for Sun Microsystems, he remembers Stallman primarily as a "brilliant programmer with the ability to generate large quantities of relatively bug-free code." Although their personalities didn't exactly mesh, Steele and Stallman collaborated long enough for Steele to get a glimpse of Stallman's intense coding style. He recalls a notable episode in the late 1970s when the two programmers banded together to write the editor's "pretty print" feature. Originally conceived by Steele, pretty print was another keystroke-triggerd feature that reformatted Emacs' source code so that it was both more readable and took up less space, further bolstering the program's WYSIWIG qualities. The feature was strategic enough to attract Stallman's active interest, and it wasn't long before Steele wrote that he and Stallman were planning an improved version.

"We sat down one morning," recalls Steele. "I was at the keyboard, and he was at my elbow," says Steele. "He was perfectly willing to let me type, but he was also telling me what to type.
>>
I've had a little experience with java in my classes but eventually switched to Python. I have a few interviews soon, should I try to relearn Java ASAP? Or pray they are fine with Python?
>>
>>50764175
2/2

The programming session lasted 10 hours. Throughout that entire time, Steele says, neither he nor Stallman took a break or made any small talk. By the end of the session, they had managed to hack the pretty print source code to just under 100 lines. "My fingers were on the keyboard the whole time," Steele recalls, "but it felt like both of our ideas were flowing onto the screen. He told me what to type, and I typed it."

The length of the session revealed itself when Steele finally left the AI Lab. Standing outside the building at 545 Tech Square, he was surprised to find himself surrounded by nighttime darkness. As a programmer, Steele was used to marathon coding sessions. Still, something about this session was different. Working with Stallman had forced Steele to block out all external stimuli and focus his entire mental energies on the task at hand. Looking back, Steele says he found the Stallman mind-meld both exhilarating and scary at the same time. "My first thought afterward was: it was a great experience, very intense, and that I never wanted to do it again in my life."
>>
>>50764164
How do you know? Do you watch everything that Richard Stallman does? He could be working on all kinds of projects for all you know.
>>
>>50764209
How could he be programming if he's too busy living in his car and eating foot skin?
>>
File: c.png (63KB, 449x498px) Image search: [iqdb] [SauceNao] [Google]
c.png
63KB, 449x498px
>>50763933

Yeah, like C and.. hmm.. what's that word that everybody keeps saying?
>>
>>50764222
Well memed, my friend.
>>
>>50764209
I don't watch everything he does, I read everything he writes.

>My favorite programming languages are Lisp and C. However, since around 1992 I have worked mainly on free software activism, which means I am too busy to do much programming
>>
>>50764229
>Cuck nigger
Isn't that exactly what YOU are, you disgusting race-mixer?
>>
>>50764229
i kek'd irl
>>
>>50764232
What Richard Stallman calls "not much programming" is more programming than all of /dpt/ put together.
>>
>>50764245
>you disgusting race-mixer?

I don't think it's disgusting. I find it fulfilling.
>>
People working on important stuff and you still try to push your several fizzbuzz programs as hard work
http://www.wired.com/2015/10/major-advance-reveals-limits-computation/
>>
>>50764260
>fulfilling
GTP confirmed for taking BBC
>>
>>50764282
>Linking a wired article
I'm not opening that shit.
>>
>>50764250
I don't think so but even if we assume so, he dropped programming altogether in 2008.
>>
File: p1280037.jpg (1MB, 3072x2304px) Image search: [iqdb] [SauceNao] [Google]
p1280037.jpg
1MB, 3072x2304px
>>50764222
stallman is a true programmer, wherever is he, he always stops and takes times to write some code.
>>
Name one reason why I shouldn't put all my talent points into C#
>>
>>50764301
Did you mean
>he always stops and takes time to reply to all the emails
>>
>>50764308
>my talent points
You don't have any talent, anon.
>>
>>50764301
>tfw you're trying to cross a rope bridge and you have to step over Richard Stallman

EVERY TIME
>>
>>50764308
Because nobody wants a hybrid in their group ;)
>>
>>50764286

Very funny, funny man.
>>
>>50762867
how bad did u fuck up? story?
>>
>>50763122
>Boohoo c++ is for faggots who dont appreciate high level languages
>>
>>50764308

Learn many languages, master a few. Pick whatever suits the majority of the work you're doing.

So if it's embedded, pick C or C++, desktop applications are fine in C#, Java, etc.
>>
File: mid_img_0632.jpg (120KB, 675x900px) Image search: [iqdb] [SauceNao] [Google]
mid_img_0632.jpg
120KB, 675x900px
>>50764327
your battle station is your basement-bedroom. his battle station is the whole world.
>>
>>50764380
>So if it's embedded, pick C or C++
>or C++

I sense a series of shitposts coming.
This one included.
>>
>>50764385
stallman is peace-loving
>>
>>50764401

C-only embedded is over, anon. It's CURRENT_YEAR.
>>
>>50764385
That's because he doesn't have a bedroom smh fam
>>
>>50764401
you'll find that the kind of ``embedded systems'' C++ users use are literally PCs from ten years ago. whoop de do
>>
>>50762936
you are fucking retarded, windows won't execute linux program
I don't even know why I, or anyone, is still helping you... stop doing this shit, just kill yourself
btw, if you compile your shit with the gcc compiler in windows, it still won't work in other machines
as you've been yold many times already, go install visual studio, and stop being retarded, you fucking piece of shit

>>50763278
no. Vim > *
>>
>>50762733
Working on a GIF to PNG converter. Currently defining a struct for a PNG chunk which includes 4 4-byte words.
>>
>>50763338
they serve different purposes. also their feature sets are very different. haskell has things like type classes but lacks an ML-tier module system, for example.
>>
>>50763710
D sucker

>>50763662
this
>>
>>50764454
Type classes solve the same problem that ML's module system solved, kind of. ML's "solution" is less general.
>>
>>50762733
Programming a Tetris clone in Visual Basic 6.0 using DirectX 7.0
>>
>>50764490

[spoiler]secretly, I still enjoy toying with VB6[/spoiler]
>>
>>50763791
>C is well designed and clean
Let me guess. You're only pretending to be retarded?
>>
>>50764436
(fset '> '<)
(> ?v ?e)
nil
>>
>>50763791
>C is well designed and clean.
>>
>>50764509
What do you expect would happen?
>>
lisp
>>
Python generators.

Are they anything but a really fast way to produce lists?

Why did this video series include them with object oriented programming?
>>
move semantics are the biggest load of shit i've ever witnessed

c++ tries to have its cake and eat it too as far as abstraction goes and it SUCKS
>>
Can anyone figure out why this code isn't working?

using System;

namespace encrypt
{
class MainClass
{
public static void Main(string[] args)
{
string input;
char[] character;
double i = 0;

try {
input = args[0];
} catch(Exception) {
return;
}

character = input.ToCharArray();

char[] encryption = {
'A',
'B',
'C',
'D',
'E',
'F',
'G',
'H',
'I',
'J',
'K',
'L',
'M',
'N',
'O',
'P',
'Q',
'R',
'S',
'T',
'U',
'V',
'W',
'X',
'Y',
'Z'
};

foreach(char chr in input) {
foreach(char item in encryption) {
i = char.GetNumericValue(item);
for(int j = 0; j < i; j++) {
for(int k = 0; k < input.Length; k++) {
char fuckvariablenamingschemes = character[k];
++fuckvariablenamingschemes;
character[k] = fuckvariablenamingschemes;
}
}
}
}
Console.Write(character);
}
}
}
>>
>>50764472
not at all. with implicits modules basically become type classes, but they can do a lot more as well, such as conventional module features:
- logical grouping of similar code
- improved compilation times
- easy drop-in replacements of old code
but also can do a lot of unique things:
- abstraction layers between different pieces of code
- version control between modules (as a language-level feature)
- solve problems in which OOP is generally used in a more purely functional way
- an extension framework (by accepting a certain module type and then using include you can extend a module and use it instead of the original with no side effects)
>>
>>50764529
Just that.
>>
File: asmref3.png (287KB, 1920x1080px) Image search: [iqdb] [SauceNao] [Google]
asmref3.png
287KB, 1920x1080px
>Can't do multiline strings in JSON
>Have to make it an array
The worst
>>
>>50764562
The best way to produce lists is either through list comprehensions or generators, yes.
>>
>>50764575
what's wrong with them?

>>50764597
lmfao get a data entry job
>>
File: 1442512810784.jpg (224KB, 488x484px) Image search: [iqdb] [SauceNao] [Google]
1442512810784.jpg
224KB, 488x484px
I have been writing comfy Go all day, every keypress fills my dpt tear glass.

How does it feel to not be on the one true Bell Labs extended lineage?
>>
>>50764597
shame, if you used racket and sexp with your own semantics you could use @-exp for that

oh well!
>>
File: computerman.jpg (13KB, 400x226px) Image search: [iqdb] [SauceNao] [Google]
computerman.jpg
13KB, 400x226px
> tfw you work in infrastructure
> tfw every week involves yelling at people to fix their shit but they never do
> tfw I've become the build bitch for at least three teams, but they're never consistent about their build processes

Any office that doesn't regularly have devs build and deploy their own shit needs to be destroyed.
>>
>>50764642
>meme language
>>
>>50764634
>animu faggot
>bell labs lineage
you got that right
>>
I wanted to fuck around with oop and make a shitty platformer game. Is there anything better in python then pygame?

Are all the good graphics shit in c++?
>>
Is exception handling even used outside of like, opening files?
>>
>>50764634
>Bell Labs
mo' like lel labs, amirite?
>>
>>50764436
What is mingw? Are you only pretending to be retarded?
>>
>>50763710
>muh c++ alternative meme
>>
>>50764683
User input
>>
>>50764683
No, that's all it's good for.
>>
>>50764576
Seriously I have no idea why this isn't working.

When i call the program with the argument `abc` it should return `bdf` if I did my math properly (adding letters is difficult). But it doesn't, it just returns `abc`.
>>
>>50764683

From what I understand since you often write code that is used not by people but by other code exception become pretty important as a error handing method that can pass the method to other code all the way to the top.
>>
ITT: we develop the /g/ programming language

Everything is immutable
>>
>>50764634
When will you Go users realize that your language is a piece of shit?
>>
>>50764683
Out of bounds array indexing.
>>
>>50764690
You shouldn't be throwing exceptions for bad user inputs. Just write a function that verifies it yourself.
>>
>>50764688
>meme

muh meme meme
>>
>>50764699
>shit exploding everywhere out of the blue
>a good idea
exception cucks actually believe this
>>
>>50764704

Well memory has become abundant. Just make a new object each time and delete the old.
>>
>>50764704
How are we doing i/o?
>>
>>50764704
There are no variables, only pointers.

Also it's reverse-garbage-collected - random spots in memory are "reserved" by the compiler at runtime to ensure there are no stack overflow errors.
>>
>>50764679
No, use C with SDL or Allegro. Or use Visual Basic 6.0 with DirectX 7.0 as I am currently doing. Very easy.
>>
>>50764728
Magnetic pins and switches
>>
>>50764704
Null-terminated character arrays for string B)
>>
>>50764683
Exception handling shouldn't be used and if your language requires it it's a shitty language
>>
>>50764731
>There are no variables, only pointers.
wat
>>
>>50764706
>superior systems language
>low level
>maintainable code
>>
>>50764739
>>50764739
>Or use Visual Basic 6.0 with DirectX 7.0 as I am currently doing. Very easy.
i swiftly exhaled air through my nose
>>
>>50764704
There is no heap, only stack
>>
>>50764743
this
>>
File: 1443271113363.png (295KB, 401x593px) Image search: [iqdb] [SauceNao] [Google]
1443271113363.png
295KB, 401x593px
>>50764706
Until Rob and friends drop it I'll stick with them

I don't see an alternative I would like more
>>
>>50764743

It might be needed in some big project.

But you will know that hopefully.

Otherwise whats the point of passing it up.
>>
>>50764704
Indenting your code results in a compiler error.
>>
>>50764761
There's no stack, only registers.
>>
>>50764687
>What is mingw?
from google:
>MinGW | Minimalist GNU for Windows
windows won't execute linux executables. if you look at the pic, you'll see that those aren't .exe files...
>>
>>50764747
You don't use declare and define variables, you simply read/write the memory directly.

*(int *) 0xDEADBEEF = 500;
if(*(int *) 0xDEADBEEF == 500)
{
// do something
}
>>
>>50764772
>what is nim
you mentally ill pedos deserve to be cucked by go
>>
>>50764747
The pointers point directly to memory locations, so when you want a constant value you just search the current memory registry for a location with the value you want. Then you create a constant pointer to it.
To make it easy the ramsearch could just be a function call, such as this:

point exampleName = ramsearch(16)


This would create a pointer called "exampleName" to the first memory location that contained the value "16".
Of course this may become problematic if the memory location you indexed changes externally, but hey that's why they're called variables and not constants, right?
>>
>>50764704
No branching or flow control so the language is optimized for caching.
>>
>>50764797
in an language without any mutability
>>
>>50764743
>>50764720
>>50764710
>>50764699
>>50764690
>>50764692
>>50764683

Why the fuck is exception shit being forced on me in intro to comp sci.

I understand why you wouldnt want to use it like if the user makes an error you tell the user to fuck off and ask for input again but should you just use exceptions in place of the actual error?

I am not even the guy who posted the original question.
I wish /g/ had some real programmers.
>>
>>50764775
Here's how a non-shit language deals with errors

https://www.fpcomplete.com/school/starting-with-haskell/basics-of-haskell/10_Error_Handling
>>
>>50764789
Windows can execute certain linux executables.

For example, programs written through Mono can actually be executed on both Windows and Linux without having to recompile. Assuming the program doesn't call any platform-exclusive libraries the same executable will work on both systems.
>>
>>50764822
>Why the fuck is exception shit being forced on me in intro to comp sci.
It's used all the time in actual applications.
>>
Just write error-free code and you never have to handle errors ;)
>>
>>50764789
>windows won't execute linux executables. if you look at the pic, you'll see that those aren't .exe files...
https://github.com/wishstudio/flinux
>>
>>50764833
>in shit applications
>>
>>50764749
>superior systems language
Try writing a decently functioning kernel in it and we'll talk. The ones I've seen have all been very limited due to Go being a bad systems programming language. And that's on top of it being GCd and benchmarking much slower than C/C++.

>low level
That's a joke right? It's about as low level as Java, maybe a bit more because you have pointers, but it's nowhere near C/C++'s level

>maintainable code
Well it's verbose as hell and ugly. It's certaintily not as messy as C, but I don't have much of an opinion on this.

It has a shitty type system, lacks generics and exceptions, has shit tooling, and this is on top of it just being crap at the one thing it tried to do well, concurrency. Its concurrency is like a braindead gimped version of what's used in Erlang.

>>50764772
>I don't see an alternative I would like more
How about Erlang/Elixir?
>>
>>50764856
I'm not justifying it, I'm just telling you how it is.
>>
>>50764822
>not using exception oriented programming
I don't even use for loops anymore if I'm going over an array. I just go until an out of bounds exception happens, and I catch it and go on with the rest of my program.

It's very enterprisey.
>>
>>50764844
this anon gets it
>>
>>50764694
> When i call the program with the argument `abc` it should return `bdf`
Such a transformation would require a single loop. Your code has 4 nested loops.

What exactly are you trying to do?

E.g. this part
                        for(int k = 0; k < input.Length; k++) {
char fuckvariablenamingschemes = character[k];
++fuckvariablenamingschemes;
character[k] = fuckvariablenamingschemes;
}

is equivalent to
                        for(int k = 0; k < input.Length; k++)
character[k]++;

It increments each character in the string.

On its own, that would transform "abc" to "bdf". So what are the 3 outer loops for?
>>
File: layne staley.jpg (32KB, 500x365px) Image search: [iqdb] [SauceNao] [Google]
layne staley.jpg
32KB, 500x365px
>>50764870
>I just go until an out of bounds exception happens, and I catch it and go on with the rest of my program.
I know you're joking, but I can't shake the feeling someone has done this
>>
>>50764858
>how about meme/meme2
>>
File: 1442779743925.gif (892KB, 500x281px) Image search: [iqdb] [SauceNao] [Google]
1442779743925.gif
892KB, 500x281px
>>50764858
Erlang actually sounds nice but from a different angle.

I don't like buying in to pre 1.0 languages without strong backing so most of those Elixer/Nim and stuff languages are not yet worth looking at.
>>
>>50764858
>lacks generics and exceptions
>what are interfaces
>what are error codes
javacuck confirmed
>>
>>50764885

This.

Some fag has done it and shipped the software.

Someday someone is going to maintain the code and show all his friends after he spends an hour figuring out what he is looking at.
>>
>>50764888
Yes friends, did you know that your phone is running off of a meme language? And that whatsapp is running off of a meme language? And did you know that you're a faggot?
>>
>>50764826
So you should write convoluted code that pushes all the dangerous work onto the user of your library?
>>
>>50764882
I...uh...

Well. This is embarrassing.
>>
>>50764858
>i can't write a kernel
>go is limited
>implying I can write a kernel at all
Dumbass.
>>
>>50764831
>>50764847
what the hell are you faggots arguing? are you retarded? it's clear to me: the guy downloaded a binary package for a linux program, and put the files in some random folder, hoping it would magically run
also, if you need an external application, then it's not windows itself running the program, and you can't run .net executables on linux directly.
stop arguing random shit, you fucking retards

>>50764858
>How about Erlang/Elixir?
slow as hell
>>
File: 1442093961107.jpg (262KB, 544x604px) Image search: [iqdb] [SauceNao] [Google]
1442093961107.jpg
262KB, 544x604px
>>50764885
[spoiler]I have some software that works this way written in [spoiler]Go [/spoiler], Recovering from panics on bounds is really dank.
>>
>>50764704
100% manual memory management
>>
>>50764930
i didn't even follow the discussion, just hopped in to contradict your argument
>>
>>50762733
Anon, why didn't you use the Anime image?
>>
>>50764704
I'll help design the logo!
>>
>>50764930
>and you can't run .net executables on linux directly

If they're simple enough you can. The `mono` extension is only actually needed for framework calls which most console applications don't have. You'll need it for GTK# applications, but Windows can't run GTK# natively anyway so the point, unlike this board, is moot.
>>
>>50764910
No, my phone is not running off a meme language. I don't do whatsapp. Anything else, faggotron?
>>
>>50764704
The stack is a 1st class object that can be passed around
>>
>>50764914
This is probably a better article, I didn't read that one and just assumed it would go over the monadic syntax

http://www.randomhacks.net/2007/03/10/haskell-8-ways-to-report-errors/
>>
>>50764942
Not a pedophile.
>>
This fuck sentDex has a ton of python videos on youtube.

How the hell does he still have shit audio?
>>
>>50764966
who
>>
>>50764896
Erlang is worth looking into. Elixir is 1.1 at this point but I do agree that it's still fairly immature. That being said what it's done so far has been impressive

>>50764904
>interfaces
interace{} anyone? :^)

>>50764923
I have no idea what you're trying to say, but I was giving an example of what a good low level language should be able to do. Go is not a good low level language.

>>50764930
>slow as hell
It depends on what you're trying to do. You wanna serve out some static files or move a few directories around on a computer? Well it's gonna be slow as hell. Now if you want to have 100k connections going simeltaneously then Erlang is fast. It's all about the usecase. And even that aside, with HiPE, Erlang's speed isn't terrible.
>>
>>50764951
What stack, you fucking retard? There are only registers, you dumb cunt!
>>
>>50764941
ok. I had no idea flinux existed, so thanks for pointing out.
I guess they want some sort of wine for linux programs in windows... not sure for why you'd want that
>>
>>50764948
Microsoft released the CLR code recently so it's just a matter of time before the thing is fully ported onto Linux.
>>
>>50764821
The pointers themselves are immutable.
>>
>>50764973
>with HiPE
Can this shit get any more meme?
>>
>>50764978
Registers are now first class objects that can be passed to other registers.
>>
>>50764973
>It depends on what you're trying to do. You wanna serve out some static files or move a few directories around on a computer? Well it's gonna be slow as hell. Now if you want to have 100k connections going simeltaneously then Erlang is fast. It's all about the usecase. And even that aside, with HiPE, Erlang's speed isn't terrible.
http://benchmarksgame.alioth.debian.org/u64q/erlang.html

>>50764948
once again, what the hell are you talking about? how is this related to the post I was replying to, and why should I care about windows shit?
>>
>>50764973
>slow as hell
>Erlang is fast
>adding 2 numbers is slow
>solving traveling salesman is fast
Now if this isn't a meme language, I don't know what is.
>>
Name one good reason to use C in 2016
>>
>>50765015
>C#
>Windows shit
>>
File: 1438820391695.gif (2MB, 200x200px) Image search: [iqdb] [SauceNao] [Google]
1438820391695.gif
2MB, 200x200px
>>50764704
The syntax is a cleaned up C. Variables are declarded as either heap or inline (stack on the stack and heap when allocated on the heap)

The few language constructs always go through a meta compilations phase. Enums are just a meta-function. for and other loop constructs are just meta-functions around a single loop keyword. Templates are done with meta-functions. static_if is done with a meta-function. No special comment syntax is needed.

From the ground up meta-function language with s-expressions processing symbols.


("generic max function that takes a variable number of arguments")

(fn |max a b|
if a > b { a } else { b }
|)

(fn |Max ...args|
((nest-binary-op max args))
| check-types)
>>
>>50764882
Actually I just compiled that and it doesn't work.
Inputing `abc` results in `bcd`, not `bdf`.
So back to experimenting, I guess.
>>
>>50765015
>>50765029
Erlang is terrible at number crunching. Which is why it provides a direct interface to call C code when necessary. If you want to look at benchmarks, look at ones which actually utilize what Erlang is good at, concurrency.
>>
>>50764973
>>50765015
BTFO
T
F
O
>>
>>50764822
Most non-trivial functions have requirements for their inputs. E.g. division requires that the denominator is non-zero. Memory allocation requires that the requested memory can actually be obtained from somewhere. And so on.

So the function can "fail". Ideally, you don't want every possible failure to simply terminate the program. But you can't just ignore them either (at least, not if you want software which actually works). So you have to be able to inform the caller that the function failed.

The "C way" to do this is via a status return, e.g. 1 for success, 0 for failure. But this requires that you check every function call for failure, and do something about it ... typically by having the parent function report failure to its caller, and so on up the call chain.

If you look at properly-written C code, as much as 70% of it can be error handling, with the other 30% being the actual "meat" which handles the success case.

Exceptions allow you to get rid of all of the boilerplate to check for errors and propagate them. You write code to handle the "typical" case, and propagating errors happens automatically. You only need to write specific code if you want to do something other than propagate the error up to the caller (i.e. catch it).
>>
>>50765031
to impress non-programmers with how l33et your coode loooks
>>
>>50765031
muh perfurmance
>>
>>50765047
or as we like to call it, "funcurrency"
>>
>>50765031
Embedded
>>
>>50765047
>http://benchmarksgame.alioth.debian.org/u64q/erlang.html
compare against
https://benchmarksgame.alioth.debian.org/u64q/go.html

>>50765035
way to keep talking shit. you guys surely love arguing pointless shit
>>
>>50764704
CPU cores are first class objects that can be passed around.
>>
>>50765047
>I'm slow as fuck; better give me MOAR cores to be slow on all of them.
>>
File: street.jpg (38KB, 388x585px) Image search: [iqdb] [SauceNao] [Google]
street.jpg
38KB, 388x585px
Okay funny joke Mr Google, but really which one of these was meant to be the right answer?
>>
>>50765071
literally use assembly
everything else is a meme language
>>
>>50765081
Erlang had really poor multicore efficiency for a long time. Concurrency does not necessarily imply multicore.
>>
>>50764658
>hi friend this language literally solves all the exact problems you're having
>yeah but it's just a meme
lel good luck in your future endeavors friend
>>
>>50765047
>>50765075
#rekt
Go mustarace!
>>
I(s it my imagination or does using generators in python only require changing return to yield?

What the fuck is going on behind the scenes.
>>
>>50764704
Language support for embedding binary files at compile time.
unistd.h required part of the standard library.
Absolutely everything is inline.
Window opening and basic drawing functions required part of the standard library.
Cute anime girl required embedded into standard library binaries, required lossless plain RGBA 32 encoding, specific character is implementation defined, cute_anime_girl is a standard global symbol pointing to the pixel data, with cute_anime_girl_w and cute_anime_girl_h pointing to width and height of image.
>>
>>50765103
>our problems are CPU bound
>this meme language doesn't do shit
>>
>>50765041
My bad. I think you want something like:
for(int k = 0; k < input.Length; k++) {
character[k] += encryption[k % encryption.Length];
}

But maybe I'm misunderstanding how the encryption array is supposed to be interpreted.

In any case, I'm fairly sure that you only want to be iterating over the input once.
>>
>>50765075
>way to keep talking shit.

I'm saying that you saying C# is windows shit is dumb.
>>
>>50765120
>Language support for embedding binary files at compile time.

Every language does that. Even the Z80 assembler I used to use had an INCBIN directive.
>>
>>50765086
>using assembly meme
>almost 2016
ishiggydiggy
>>
>>50765115
Sorta. You write generators differently than you write functions. It'd never make sense to write a function like this:
def wat(start):
while(True):
return start
start += 1


I always figured the Python compiler (yes, the compiler runs before code gets interpreted) sees that "yield" is being used instead of return, then sets it up as a generator.
>>
>Erlang
BOTNET
O
T
N
E
T
>>
>>50765149
Yeah, assemblers do, higher level languages don't.
>inb4 #include.
We've been through this argument before, #include is not suitable for embedding binary data.
>>
>>50765132
The idea was to simulate "adding" two letters, by increment each character in the input string by the numerical equivalent of the alphabetical equivalent of the numerical value of the current character.
Which would, in other words, take `abc` and return `bdf`, because it would, behind the scenes, be doing ([a+a][b+b][c+c]), which translates to ([a+1][b+2][c+3]) or bdf. The 1,2,3 etc would be constant and not affected by the input string.
>>
Generators make so much more sense in functional languages with codata (lazy semantics) like Haskell

fibs = 0 : 1 : zipWith (+) fibs (tail fibs)
>>
>>50764787
this

>mfw the propeller has no stack
>mfw it has 8 cores
>they all have access to a main memory but it is limited by hardware control to ensure there are never races
it's a fucking brilliant chip I can't wait to see what the propeller 2 is going to be like

>it's 2030
>Parallax has finally acquired Intel after the failure of the x86 and their dogged determination to keep it alive
>they release a 1024-core chip
>linux has died because the chip was designed for microkernels rather than monolithic spaghetti kernels
>GNU Hurd is finally finished and released
>computing is saved forever
>>
>>50765156
I wonder is I should learn C immediately.

Trying to learn program and python seems to hide so much stuff from me.

Which I suppose is the point.
>>
>>50765179
hi i use f#

what the fuck does that code do
>>
>>50764704
The kernel is a first class object that can be passed around.
>>
trying to fig out best way to learn to code. my cousin makes way to much money in SF and he is a pleb. fuck him.

whats best way to learn: bootcamp in my city (Atlanta), bootcamp in SF, or like more immersive like that code school in Bali or Costa Rica.

advice. now.
>>
>>50765179
They don't make any sense at all in those languages because they don't exist and wouldn't be necessary anyway. : constructs lists. It just so happens that making a list lazily in Haskell resembles generators in Python. Python generators involve stateful computation that wouldn't be reasonable in Haskell.
>>
File: 1444597303860.jpg (22KB, 250x250px) Image search: [iqdb] [SauceNao] [Google]
1444597303860.jpg
22KB, 250x250px
>>50763369
foldr :: (a -> b -> b) -> b -> [a] -> b
foldr _ id [] = id
foldr f id (x:xs) = f x (foldr f id xs)

So you're saying you can't comprehend this? Heh, feels good to be masterrace.
>>
>>50765186
No don't use C.
Where Python hides basic functionality from you in favor of abstraction, C lacks basic functionality entirely and expects you to include fucktons of boilerplate code in the name of efficiency.
I mean C doesn't even support strings, just arrays of characters that sometimes act like strings and sometimes act like arrays.

C++ is what you're looking for.
>>
>>50765189
Your mom is a first class hooker that can be passed around.
>>
>>50765189
The user is a first class object that can be passed around.
>>
>>50765205
>C doesn't even support strings
>I don't know what the fuck I'm talking about
>>
https://gist.github.com/kachayev/5426175

>>50765140
>I'm saying that you saying C# is windows shit is dumb.
ok, idgaf, I refuse to run .net programs in my (linux) machine
the original topic was that the fucking retarded guy was trying to run some linux programs/executables in mingw

>>50765202
https://benchmarksgame.alioth.debian.org/u64q/haskell.html
(your) pic related
>>
>>50765218
That would actually be pretty useful. Fund it.
>>
>>50765202
>using id as a variable name
It's like you don't even {-# OPTIONS_GHC -Wall #-}
>>
>>50765220
No anon,
const char*
is not the same as a string.
>>
File: 1370760162411.jpg (12KB, 186x119px) Image search: [iqdb] [SauceNao] [Google]
1370760162411.jpg
12KB, 186x119px
>>50765151
time to NOP you.
>>
>>50765205
>C lacks basic functionality entirely
It has all the functionality a competent programmer needs, weeb.
>>
>>50765188
Generates the Fibonacci sequence as an infinite list

>>50765196
>thinking of things this backwards
https://en.wikipedia.org/wiki/Corecursion
Generators are an implementation of corecursion in imperative languages using iteration
Corecursion in Haskell doesn't have to be in the form of a list generator, it just has to be guarded by a constructor, in this case cons (in the same way corecursion is guarded by "yield" in Python)
>>
>>50765205
>I mean C doesn't even support strings
Not having a type to represent it != "not supporting it"
>>
>>50765235
Nobody said that's a string; that's just a pointer, you fucking idiot.
>>
>>50765188
It's a lazy sequence of fibonacci numbers
There's a few ways to do it in F#, like
let fibonacci = 
Seq.unfold
(fun (current, next) -> Some(current, (next, current + next)))
(0, 1)
>>
>>50765238
I'm not disagreeing with you, but there's a reason C isn't really used in applications development anymore. While there isn't really anything that C CAN'T do, there's much better ways to do more or less anything C can do in other languages.

Specifically there's no reason to use C over C++ for all but the most performance-critical tasks and even then I'd say C++ or Asm.
>>
Is there any reason to use C/C++ over Python or C# unless you're a nerd?

fuck manual memory management and all the memes that come with those gay languages.

What can C++ do that C# can't?
>>
>>50765075
>>50765081
>>50765108
As I've said, it's all about the usecase. When it comes to concurrency and handling high load, I wonder who's really BTFO?

http://www.ostinelli.net/a-comparison-between-misultin-mochiweb-cowboy-nodejs-and-tornadoweb/

https://github.com/ericmoritz/wsdemo/blob/results-v1/results.md
>>
>>50765230
>ok, idgaf, I refuse to run .net programs in my (linux) machine

You're such a homo. I hope you don't use anything that requires a VM.
>>
>>50765233
>It's like you don't even meme while you meme your meme
>>
>>50765115
> Is it my imagination or does using generators in python only require changing return to yield?
More or less.

> What the fuck is going on behind the scenes.
If the compiler detects a yield expression anywhere within the body of a function, it compiles it as a generator function rather than as a normal function.

Calling the function returns a generator object, i.e. something with a .next() method which returns a value each time it is called.

The .next() method is basically the function's body, except that yield is converted to return, local variables are part of the generator's state (so they retain their values between calls), and on subsequent calls to the method, execution resumes after the yield/return, rather than starting at the beginning.
>>
File: Fuck_anime.jpg (359KB, 806x1200px) Image search: [iqdb] [SauceNao] [Google]
Fuck_anime.jpg
359KB, 806x1200px
>>50764942
Because anime sucks
>>
>>50765281
Run as efficiently as possible
>>
>>50765251
Actually I'd say that that's exactly what it means. C programs can support it. Hell even C programmers can support it. But C doesn't.
If you have to construct support for it every time you want to use it, that's not "support", that's called programming.
And a programmable programming language is retarded.
>>
File: 01.jpg (830KB, 2913x1950px) Image search: [iqdb] [SauceNao] [Google]
01.jpg
830KB, 2913x1950px
>>50765281
not really

but is there any reason to use python over lisp unless you're a hipster girl?
>>
>>50765278
>there's much better ways to do more or less anything C can do in other languages
aka with more bloat, less performance, but in a shorter amount of time because lazyness and incompetence. agreed.
>>
>>50765246
Who brought up corecursion? It's a concept incidental to both generators and lazy lists.

>>50765281
>What can C++ do that C# can't?
Shoot yourself in the face and the foot at the same time. C can only do one at a time without some serious work.
>>
>+300
We need a new thread now !
>>
>>50765281
Is there any reason to use Python or C# over Haskell or F# unless you're a weeaboo?
>>
>>50765299
>Run as efficiently as possible

With modern computers does .5% performance increase really matter?

Considering how prone C/C++ is to all sorts of overflows and the difficulty to do trivial tasks why is this even considered?
>>
>>50765304
You sound very confused. Does C++ have a type that represents the numbers between 7 and 14? No. Does it "support" use of those numbers? Of course.
>>
>>50765314
C++ isn't really any slower than C.
>>
>>50765324
>actually using F#
There is no need for this, my friend.
>>
>>50765318
Lazy lists are just corecursion, while generators are written in imperative style with a different keyword that turns an infinite loop into something that resembles corecursion the same way finite loops resemble (structured) recursion
>>
>>50765335
Do any real programming languages have a type that represents the numbers between 7 and 14? Do most C++ programs include boilerplate code that attempts to distort pre-existing types that don't really do what they should into one that implicitly supports the numbers between 7 and 14?
No.
>>
>>50765304
>And a programmable programming language is retarded
Oh, like the ones with templates? Or macros? Fucking retard.
>>
File: H0T8080.jpg (133KB, 500x494px) Image search: [iqdb] [SauceNao] [Google]
H0T8080.jpg
133KB, 500x494px
>>50765281
Embedded systems, performance critical applications, drivers... it's not about what it "can", but exactly how it accomplishes this. C# is just a higher language and runs in a managed environment (up until now at least) which causes some limitations
But don't be hard on yourself, if you want to get into coding quickly, go for C# first for results. It's pointless to limit oneself due to the autistic stubborn preference in a language
>>
>>50765334
Because the single biggest CPU bottleneck, memory latency, is something that can only be addressed if you have manual memory management

Games are one example of applications that need to be efficient, and so are mobile applications, since efficient means they consume less battery
>>
>>50765342
There's no need NOT to. F# should have been an atomic fucking bomb. F# should have wiped away the entire programming landscape and replaced every single language with an F# module. It should have made all paradigms obsolete because it supports every single one of them.

But it didn't, because memers like you can't see the future.
>>
>>50765334
>With modern computers does .5% performance increase really matter?
It's more like 1000% performance increase.
>>
>>50765202
I have no idea what that does. It's too cryptic.
>>
>>50765340
It is, wake the fuck up.
>>
>>50765357
>Do any real programming languages have a type that represents the numbers between 7 and 14?
Yes
>>
>>50765281
C# isn't much use if you want to write libraries which are callable from languages other than C#, or device drivers, or "leaf" code (i.e. code which is performing primitive operations rather than just invoking other API calls) with a performance requirement, or code with relatively hard real-time requirements.

You'll note that Microsoft doesn't actually use C# very much themselves. It was originally developed as a spoiler to Java, it survives mainly as a replacement for VB.
>>
>>50764182

Depends on what the guys on the job said they wanted.
>>
>>50765384
Real, you fucking buffoon, not memes.
>>
>>50765373
Then how come modern games are extremely abstracted?

The last game that was written in assembly was Roller Coaster Tycoon 2. Sure engines are written in low level languages but the games themselves are just written through APIs and scripts for those engines, which act as a pseudo virtual machine. That's not performance, that's ease of use.
>>
>>50765363
>But don't be hard on yourself, if you want to get into coding quickly, go for C# first for results. It's pointless to limit oneself due to the autistic stubborn preference in a language

Call me a retard but C++ is just absurdly complicated and bloated for new programmers... C# seems like a good balance between ease of use and actually creating meaningful things.
>>
File: 1441594460089.gif (549KB, 720x534px) Image search: [iqdb] [SauceNao] [Google]
1441594460089.gif
549KB, 720x534px
>>50765263
Relax Cuk, everyone knows you're the smartest for managing your own memory and writing all your own data structures :)
>>
>>50765334
>only .5% performance
>let's consider java
>what is lagdroid
>>
>>50765384
obscure python libraries don't count, anon
>>
/!\ A L E R T /!\

new thread
>>50765408
>>50765408
>>50765408


/!\ A L E R T /!\
>>
>>50765396
>Sure engines are written in low level languages
Because they need to be fast
>>
>>50765400
>a pedophile calling someone a cuck
>>
Trying to figure out how the fuck symbols work in Common Lisp. I think Ruby and Erlang have made it so I can only think of them working in one way.

In Common Lisp what exactly does the #: mean before the name of a package when calling defpackage?

I want to call a function using funcall and symbol-function passing in a function name that is constructed from concatenating some strings (in Ruby this would be like doing send("my_#{adjective}_method") for example). My only problem is that when my function is part of a package I can't seem to get to it. I mean I can, but I need to know the package first, the name of which is also being constructed from strings. Every example I see uses defpackage with like so: (defpackage #:my-package). If I do that and then do (find-symbol "MY-PACKAGE") I get nil. But if do (defpackage my-package) then (find-symbol "MY-PACKAGE") returns the symbol. That makes a certain amount of sense, but what's weird is this:

[1]> (defpackage #:my-package)
#<PACKAGE MY-PACKAGE>
[2]> (in-package #:my-package)
#<PACKAGE MY-PACKAGE>
MY-PACKAGE[3]> (defun my-function () "lol")
MY-FUNCTION
MY-PACKAGE[4]> (in-package #:cl-user)
#<PACKAGE COMMON-LISP-USER>
[5]> (find-symbol "MY-PACKAGE")
NIL ;
NIL
[6]> (find-symbol "MY-FUNCTION" 'my-package)
MY-PACKAGE::MY-FUNCTION ;
:INTERNAL
[7]> (find-symbol "MY-PACKAGE")
MY-PACKAGE ;
:INTERNAL


Why is it that once I use find-symbol to get my-function from my-package I can then use find-symbol to find my-package? Is there something about doing so that makes the symbol visible from cl-user?
>>
>>50765334
Considering Python, it's a LOT more than just .5%.
>>
File: 1439087738099.jpg (214KB, 345x336px) Image search: [iqdb] [SauceNao] [Google]
1439087738099.jpg
214KB, 345x336px
>>50765380
Post some C code that you can't make run as fast in C++
>>
File: BZDu_vrIIAA1dLK.jpg (67KB, 599x514px) Image search: [iqdb] [SauceNao] [Google]
BZDu_vrIIAA1dLK.jpg
67KB, 599x514px
>>50765398
>>
>>50765434
Literally any code.
>>
>>50765433
>Considering Python, it's a LOT more than just .5%.

Python yes, but even so it generally doesn't matter all that much since most programmers, especially hobbyists aren't going to be writing highly intensive 5k+ LoC projects.

and comparing C# to C/C++ it's even less noticeable.
>>
>>50765357
You can make one pretty easily in C# with properties and implicit conversions

>>50765411
Fuck off, reddit
>>
File: 1444445309900.png (6KB, 557x267px) Image search: [iqdb] [SauceNao] [Google]
1444445309900.png
6KB, 557x267px
>>50765446
>there are people this dumb on /g/
>>
>>50765455
Yeah you can do a lot of things in C#.
>>
>>50765459
>I can't handle the truth
>>
File: hitler tips.jpg (59KB, 500x435px) Image search: [iqdb] [SauceNao] [Google]
hitler tips.jpg
59KB, 500x435px
>>50764001
>systems
>>
>>50765453
>but even so it generally doesn't matter all that much since most programmers, especially hobbyists aren't going to be writing highly intensive 5k+ LoC projects.
I wouldn't count on that, I'm a hobbyist and I'm writing a PC-like virtual machine, I'm writing it in C because it needs to be really efficient, especially the instruction decoding & execution part.
And after that, I'll be porting a retargetable C compiler to my architecture to write my kernel in, i could write the kernel in assembler but that's way too tedious, and i won't be able to use things like struct which are really useful, and I think the C compiler would probably produce faster code than my handwritten assembly.

There are also things like media players that need to be pretty fast too, and most of them are written in C/C++.
>>
>>50764704
Elementary arithmetic is implemented using Church encoding and repeated application of increments and decrements as in the Peano axioms. Nontrivial calculations cause stack overflows.
>>
>>50765563
I guess man.

but writing the same program in python and using some meme library is at least 10x faster than writing the same meme in C++ and spending hours debugging, checking if array is out of bounds, wondering where exactly the culprit that's overflowing your memes, etc.

>There are also things like media players that need to be pretty fast too, and most of them are written in C/C++.

I mean there's a reason that Python has such a huge scientific and machine learning, algorithmic trading, etc community.

If Python performance was so poor, then why would it be used for scientific projects and all sorts of stuff like that?
>>
>>50765233
>variables
>haskell
looks like you're outmemed, m'friend
>>
>>50765651
>If Python performance was so poor, then why would it be used for scientific projects and all sorts of stuff like that?
because scientists aren't programmers so they use the least programming-like programming language to "program" with
>>
>>50765792
>because scientists aren't programmers so they use the least programming-like programming language to "program" with

Wrong. I think it's because they use a language where you need to figure out the logic more, rather than figuring out how to do something.

Makes it much more intuitive and doesn't waste time doing trivial shit for hours when they could be figuring out how to actually make stuff relevant to their project.
>>
>>50765833
>y use a language where you need to figure out the logic more, rather than figuring out how to do something.

ie a programming language where you don't program
>>
>>50765865
>ie a programming language where you don't program

Nah.

ie a programming language where you don't re-invent the wheel and spend days doing something that has been done before you, and doesn't further you towards your completed program.

ie for people who actually have jobs and value their time. I mean yeah man it's cool to make kewl projects to impress /g/ with but really it just delays you for getting REAL THINGS done
>>
>>50765833
>I think it's because they use a language where you need to figure out the logic more, rather than figuring out how to do something.
That's exactly what he was saying retard.
>>
>>50762733
How do I get FLTK to work in VS 2015 and does the test code in Stroustrup first edition appendix D still work?
Thread posts: 352
Thread images: 39


[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]
Please support this website by donating Bitcoins to 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
If a post contains copyrighted or illegal content, please click on that post's [Report] button and fill out a post removal request
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 4Archive shows an archive of their content. If you need information for a Poster - contact them.