[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: 316
Thread images: 44

File: suomi.png (10KB, 683x601px) Image search: [Google]
suomi.png
10KB, 683x601px
Previous thread: >>60506490

What are you working on, /g/?
>>
>>60513923
first for coroutines
>>
>>60513949
First for chapel does parallelism way better than Go.
>>
>>60513956
first for goroutines are shit, coroutines were better.
>>
File: 1495251600951.jpg (22KB, 680x452px) Image search: [Google]
1495251600951.jpg
22KB, 680x452px
TWO SCOOPS
>>
>>60513977
GEE BILLY! TWO SCOOPS?
>>
File: php.jpg (46KB, 502x370px) Image search: [Google]
php.jpg
46KB, 502x370px
>>
>>60513867
Thanks, but I do wish they were a bit more like a c-like language.
>>
Finally got to chapter 4 in K&R, the reverse polish calculator exercises are a bitch
>>
>>60514032
you don't have to do every exercise you know. some are way harder than others on purpose
>>
Give me a project to work on, I've got absolutely no idea what to do
>>
>>60514117
computer-aided suicide
>>
>>60514127
that's called Rust and no thanks
>>
>>60514028
scala
https://github.com/lampepfl/dotty/issues/2491
>>
File: 1494451359140.jpg (22KB, 500x396px) Image search: [Google]
1494451359140.jpg
22KB, 500x396px
>>60514137
>that's called Rust
>>
Anyone has picture with list of programming tasks? I remember there used to be numbered list posted.
>>
>>60514149
https://better-dpt-roll.github.io/
don't roll in these threads
>>
>>60514171
thanks
>>
>>60514305
opengl
>>
>>60514305
For C++ I use SFML
>>
>>60514305
depends the language
>>
>>60514117
simple video game with 3d graphics
>>
>>60513923
::::DDDDD

So, I wonder why the Java compiler tells me I am not allowed to do this.
public class Kreiszahl_pi{
public static void main(String args[]){
//This should be a formula to approximate pi up to five digits after 0
double pi = 3;
double a=1;
double b=2;
double c=3;
double nikalantha1=0;
for (double i = 1; i <100; i+=5){
nilakantha1 =+ 4(a+i)*(b+i)*(c+i);
/*1+1 2+1 3+1
1+3 2+3 3+3
*/
}



}

}

this is the compiler output
PS C:\Users\thora\Documents\Uni\Übungsblatt4> javac .\Kreiszahl_pi.java
.\Kreiszahl_pi.java:10: error: ';' expected
nilakantha1 =+ 4(a+i)*(b+i)*(c+i);
^
.\Kreiszahl_pi.java:10: error: not a statement
nilakantha1 =+ 4(a+i)*(b+i)*(c+i);
^
.\Kreiszahl_pi.java:10: error: ';' expected
nilakantha1 =+ 4(a+i)*(b+i)*(c+i);
^
.\Kreiszahl_pi.java:10: error: not a statement
nilakantha1 =+ 4(a+i)*(b+i)*(c+i);
^
.\Kreiszahl_pi.java:10: error: ';' expected
nilakantha1 =+ 4(a+i)*(b+i)*(c+i);
^
.\Kreiszahl_pi.java:10: error: not a statement
nilakantha1 =+ 4(a+i)*(b+i)*(c+i);
^
.\Kreiszahl_pi.java:10: error: ';' expected
nilakantha1 =+ 4(a+i)*(b+i)*(c+i);
^
7 errors
PS C:\Users\thora\Documents\Uni\Übungsblatt4>
>>
>>60514423

+= not =+
>>
None of you are successful programmers. You simply spend your time posting here in a programming language dick-waving contest. Nobody cares that you find Go easy, or Java simple, or Rust safe, or Haskell clever, or Lisp elegant. None of you is ever going to finish making anything in any language. I have hundreds of thousands of lines of working C and C++ in production behind me, more useful than anything any of you will ever make. Dogpile me like a bunch of triggered furries all you want, it won't change the truth. You're just a bunch of losers!
>>
File: Untitled.png (17KB, 722x361px) Image search: [Google]
Untitled.png
17KB, 722x361px
Help! I can't stop formatting my code, going full autistic mode. I have to make sure everything is aligned in columns. Should I seek treatment? Is it some sort of OCD? It literally causes an irritation.
>>
>>60514423
>4(a+i)
must be
4*(a+i)
, there's no implicit multiplication by juxtaposition in Java, nor in most programming languages.
>>
>>60514450
it's not even easier to read, if anything it's harder
>>
>>60514443
still the same error :/
>>
>>60514470
>>60514462
Okay, solved the issue.
Man I am thankful there is a site like 4chan.
>>
File: 1490994155363.png (531KB, 436x553px) Image search: [Google]
1490994155363.png
531KB, 436x553px
>>60514469
Are there any books/guides how to make code beautiful, easy-to-read? Examples of such code?
>>
>>60514505
>C++
>beautiful
just write it normally and learn to appreciate it
>>
>>60514505
yeah man here's the guide: don't


add a bunch of

spaces between

............................your
............................words
>>
>>60514117
g_tetris
>>
>>60514443
>>60514470
>>60514487
javac's messages aren't very friendly, yeah. I think I can crack them open for yall tho:

nilakantha1 = +4<random garbage>;
that's how the compiler is seeing it. +4 is just 4, and this would mean assigning 4 to nilakantha1 even tho that's not what you meant, so the syntax error's not there, and
nilakantha1 += 4<random garbage>;
also triggers it. Now from the compiler's pov, the assignment statement is finished, and there's an expression juxtaposed to it for no reason, so it complains you should have ended the statement after the 4, and then states that even if you did, the following statement would still make no sense. Also 4chan is eating the leading spaces on your pasted error messages so wrap them in
 next time thx.
>>
File: bjarne-stroustrups-quotes-1.jpg (68KB, 575x324px) Image search: [Google]
bjarne-stroustrups-quotes-1.jpg
68KB, 575x324px
>>60514505
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines.html
>>
>>60514514
These aren't words though, they are symbols in a formal language. Try again.
>>
File: Screenshot_2017-05-21_17-05-26.png (16KB, 741x777px) Image search: [Google]
Screenshot_2017-05-21_17-05-26.png
16KB, 741x777px
Is there a less retarded way to do this?
Making a clock with ncurses
>>
>>60514553

"object oriented" programs with deep or wide inheritance hierarchies are more often than not shitty and unmaintainable.
>>
What's the best way to learn python?
>>
>>60514571
you forgot "my" at the start of your sentence.
>>
>Scala author proposes indentation based syntax
ugh, fucking why
>>
>>60514505
What I learnt in a span of time:

Comment your code.
If you think that you will really forget what your code will do, comment it.

Indent and space your code
if your code is inside a loop, or in a function or whatever, then make it look like so to denote that they are inside.
FUNCTION START:
code
FUNCTION END.

and
FUNCTION START
CODE
CODE
CODE
FUNCTION END.

Something like that.

TRy to make it look easy on your eyes.

Give variables and permutations MEANINGS.
Don't just go args1 args2 and shit.
You will be seriously killed or doxxed with snuffporn and no employer wants to do anything with you.

For an example, I am using the nikalantha algorithm in my code to approximate pi.
it is alternating inbetween + and minus, so I have divided the nilakantha algorithm into 2 functions called nilakantha 1 and 2.

Let it make sense to you even after you are done with your code.
>>
>>60514591
>falling for the scala meme
>>
>>60514592
Function start:
code
Function end

Function start
code
code
code
Function end.

Damn
>>
>>60514561
Store the textmaps in a separate file and xxd -i them at build time? would avoid the
"",
's but it's not that retarded IMHO.
>>
>>60514623
yeah I'd prefer having everything packed in the executable
>>
>>60514644
I see. xxd doesn't create 2-dimensional arrays though, so it's going to be nontrivial if you do it. You could get exactly this source code without writing it like so if you put all the textmaps in a text file, then ran
sed 's/.\+/"&",/'
on it. Dunno if you prefer that.
>>
What's the best site/resource for a crash course in C++? I haven't used it in a few years and now I can't remember shit for it but I might be using it for my next job
>>
>>60514730
cppreference.com
>>
>>60513923
Found a game I started when I was a kid using Java. The whole game is in the main method though and it's extremely bloated.

I could post the semi-working code if anybody's interested
>>
>>60514793

Do it, it's always a laugh.
>>
File: 2017-05-21-173015_714x410_scrot.png (40KB, 714x410px) Image search: [Google]
2017-05-21-173015_714x410_scrot.png
40KB, 714x410px
rate my improved screenfetch
https://github.com/wrclark/ye/blob/master/gachifetch
>>
>>60514824
thank you but bash is obsolete now
>>
I have a C++ question regarding design patterns (visitor here) with unique pointers. Here is an example of what I would like to do using dynamic dispatch
#include <memory>
#include <iostream>

class Visitor;

class Base
{
public:
Base() { }
virtual ~Base() { }
virtual void accept(Visitor& v) = 0;
};

class BaseImpl;
class BaseImplDeriv;

class Visitor
{
public:
virtual void visit(BaseImpl& b) = 0;
virtual void visit(BaseImplDeriv& d) = 0;
};

class BaseImpl : public Base
{
public:
BaseImpl() {}
virtual ~BaseImpl() { }
virtual void accept(Visitor& v) { v.visit(*this); }
};

class BaseImplDeriv : public BaseImpl
{
public:
BaseImplDeriv() {}
virtual ~BaseImplDeriv() { }
virtual void accept(Visitor& v) { v.visit(*this); }
};

class VisitorImpl : public Visitor
{
public:
virtual void visit(BaseImpl& b) override
{
std::cout << "BaseImpl visited" << std::endl;
}
virtual void visit(BaseImplDeriv& d) override
{
std::cout << "BaseImplDeriv visited" << std::endl;
}
};

int main()
{
VisitorImpl v;
std::unique_ptr<BaseImpl> b = std::make_unique<BaseImplDeriv>();

v.visit(*b);

return 0;
}

From my understanding the vtable used is the one from d, so how comes the visitor pretends it's visiting
BaseImpl
?
>>
#include <stdio.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <time.h>
#include <unistd.h>
int main() {
srand(time(0)*getpid());
int pagesize = getpagesize();
int offset = ((unsigned long) main)%pagesize;
unsigned char* page = ((unsigned char*) main) - offset;
if (mprotect(page, pagesize, PROT_READ|PROT_WRITE|PROT_EXEC) != -1) {
int i; for (;;) {
i = rand()%(pagesize - offset) + offset;
printf("%d: %x ", i - offset, page[i]);
page[i] = rand();
printf("=> %x\n", page[i]); }}
return 0; }
>>
File: IMG_1707.jpg (39KB, 335x335px) Image search: [Google]
IMG_1707.jpg
39KB, 335x335px
>>60514047
>not doing every exercise in k&r
>>
>>60514936
stop
fucking stop
fUC
KING
S
T
----*
[segmentation fault]
>>
>>60514888
Here. I realized in was proceeding in the wrong order like a retard. The call should be
      b->accept(v);

instead of
      v.visit(*b);
>>
>>60514801
Alright so the story is that I started making a text based game based of the universe of Fallout 1, then I got bored and abandoned it. Then after New Vegas came out I started working on it again, changing all the skills and stuff and then abandoned it again. This isn't the original but it's only slightly modified.

https://pastebin.com/Gu4cj0Wf
>>
>>60514888

Function overloads are resolved statically at compile time.
>>
which language allows me to have two scoops of ice cream?
>>
File: 1467155883060.jpg (88KB, 870x960px) Image search: [Google]
1467155883060.jpg
88KB, 870x960px
Rate my basename
import std.stdio;

void main(string[] args)
{
foreach (arg; args[1..$])
{
ulong last_slash_index = 0;
foreach(index, character; arg.dup.reverse)
{
if (character == '/')
{
last_slash_index = arg.length - index;
}
}
arg[last_slash_index..$].writeln;
}
}
>>
>>60514888
>>60514990
>>60514995
Thanks, I fixed it. Here is what I assume would be the correct usage of such a pattern in C++.
#include <memory>
#include <iostream>

class Visitor;

class Base
{
public:
Base() { }
virtual ~Base() { }
virtual void accept(Visitor& v) = 0;
};

class BaseImpl;
class BaseImplDeriv;

class Visitor
{
public:
virtual void visit(BaseImpl& b) = 0;
virtual void visit(BaseImplDeriv& d) = 0;
};

class BaseImpl : public Base
{
public:
BaseImpl() {}
virtual ~BaseImpl() { }
virtual void accept(Visitor& v) { v.visit(*this); }
};

class BaseImplDeriv : public BaseImpl
{
public:
BaseImplDeriv() {}
virtual ~BaseImplDeriv() { }
virtual void accept(Visitor& v) { v.visit(*this); }
};

class VisitorImpl : public Visitor
{
public:
VisitorImpl(Base& b) { b.accept(*this); }
virtual ~VisitorImpl() { }
virtual void visit(BaseImpl& b) override
{
std::cout << "BaseImpl visited" << std::endl;
}
virtual void visit(BaseImplDeriv& d) override
{
std::cout << "BaseImplDeriv visited" << std::endl;
}
};

int main()
{
std::unique_ptr<BaseImpl> b = std::make_unique<BaseImplDeriv>();

VisitorImpl v(*b);

return 0;
}
>>
>>60515097
sepples was a mistake
>>
I love it when something goes right in the end.
Thanks again for your help dpt.
Now I can calculate pi on my code
>>
>>60515112

"OOP design patterns" were a mistake
>>
>>60515034
any language, but you're better off doing it object-oriented

c++:
template <typename t> class scoop;
class ice_cream {};
template <> class scoop<ice_cream> {};
scoop<ice_cream> two_scoops_of_ice_cream[2];


lisp:
(defstruct scoop (t))
(defstruct ice-cream ())
(defun scoop-of-ice-cream ()
(make-scoop (function make-ice-cream)))
(defun two-scoops-of-ice-cream ()
(mapcar (function funcall)
(make-list 2 :initial-element (function scoop-of-ice-cream))))


It's plain to see which one is cleaner.
>>
>>60515263
shit my lisp was wrong i forgot the slot name
fixed:
(defstruct scoop (t))
(defstruct ice-cream ())
(defun scoop-of-ice-cream ()
(make-scoop :t (function make-ice-cream)))
(defun two-scoops-of-ice-cream ()
(mapcar (function funcall)
(make-list 2 :initial-element (function scoop-of-ice-cream))))
>>
>>60515246
Literally nothing wrong with that.
>>
>>60513923
>/dpt/
>working
wew meme lad reddit normie
>>
File: 1461197321224.jpg (68KB, 650x600px) Image search: [Google]
1461197321224.jpg
68KB, 650x600px
>>60514117
make a 4chan bot that reads data, about something. Maybe about the most frequently used words in each thread, then have it plot it into a graph. Basically graph 4chan data, id like to see something nice
>>
File: 192.png (217KB, 600x600px) Image search: [Google]
192.png
217KB, 600x600px
>>60515309
>meme lad
hoply fupck
>>
I have a hard time learning arrays.
I need to learn java, too. which I already am doing.

What's a step by step information on arrays?
Like, literal baby's intro to arrays to wizardhood?
>>
>>60515336
>#shittypoetry
>>
>>60515336

It's a list of something.
String[] someWords = {"First", "Second, "Third"};
// start counting at 0. This prints "First"
System.out.println(someWords[0]);


If you don't get it then programming isn't for you.
>>
>>60513923
>DIS OB
GUALIDY BREAD :DDDDDDDDDDD
>>
>>60515393
yeah, but ho do they apply for 2d rooms?
How do they apply to anything else?
Why does it work? I don't know, maybe I just don't know how to use it?
>>
>>60515428

Contextualise your questions plz
>>
File: 1453762935144s.jpg (3KB, 119x125px) Image search: [Google]
1453762935144s.jpg
3KB, 119x125px
>>60515428
2d rooms? What do you mean. Are you talking about 2d arrays? Those are just 2 arrays. IF YOU DONT UNDERSTAND ARRAYS, DONT DO 2D ARRAYS YET. Learn how normal arrays work and 2d will be easy
>>
File: 1353047836.jpg (24KB, 242x240px) Image search: [Google]
1353047836.jpg
24KB, 242x240px
>>60515336
https://www.youtube.com/watch?v=Mfacb9T4biQ

>>60515428
>yeah, but ho do they apply for 2d rooms?
you can use array of arrays to store tiled 2d structures
>>
Fucking hell ncurses is THE fucking cancer
>>
File: test (1).png (715KB, 779x1011px) Image search: [Google]
test (1).png
715KB, 779x1011px
>>60515336
Try linear algebra on KahnAcademy
>>
>>60515336
An array is like a shelf, it has so many spaces (length) of a certain size (type) and you can put things in each space.


>>60515428
One way to look at a 2D array is an array of arrays, in other words a shelf with smaller dividers in each space.
>>
File: images.png (4KB, 225x225px) Image search: [Google]
images.png
4KB, 225x225px
sup /dpt/
what is the fastest or at least most simple algorythm to sort a 3D network layout of nodes and links? something that avoids colisions to make it visually pleasing i guess. im looking at force directed algorythms which are extremely precise but at the cost of performance
>>
I read the yellow book for C#, wrote some 20 programs, what do I do now? What are pointers? Which is better, WinForms or WPF? Where do I go for further learning?
>>
>>60515516

>What are pointers?
if you want to really know, go learn C.
>>
>>60515473
btw, a more "Java" version of that picture would have all the subscripts (the parts in square brackets [ ]) less by one, as Java follows the convention of 0-indexing (the first element is subscript [0]).
>>
>>60515263
>>60515295
The lisp is cleaner.
>>
>>60515582
Your brain needs purged if you think any lisp is clean looking.
>>
>>60515582
>The lisp is cleaner.
REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
>>
>>60515602
It's certainly better looking than any c++.
>>
>>60515614
>but this mud is cleaner than this poo pile
>>
>>60515516
UWP. Do you really want to make windows desktop apps though?
>>
>>60515629
Whether or not both are shit is irrelevant to me. Just saying the lisp looks better is all.
>>
is there a better library than ncurses to control console output?
>>
>>60515582
>>60515614
>>60515629
template <typename t> class scoop;
class ice_cream {};
class poo {};
template <> class scoop<poo> {};
scoop<ice_cream> cplusplus;
poo java;
scoop<poo> lisp[256];
>>
Is it too late to learn android development?
>>
>>60515671
This looks noisy and inconsistent to me. At least the lisp was fairly uniform looking. Doesn't matter though, they're both shitty languages.
>>
File: flat,800x800,075,f.jpg (18KB, 248x189px) Image search: [Google]
flat,800x800,075,f.jpg
18KB, 248x189px
>>60515671
>HIS C++ DON'T EVEN WORK
>>
Should I write my own asm graphics libe, or use someone else's
[nospoilerson/g/] or integrate vulkan :^^^^^^^^^}
>>
>>60515677
why would it be too late? I started learning android development 2 weeks ago. Seems pretty reasonable. If you already know Java, then your 80% of the way there already
>>
>>60515677
yes, android is going to be ded next month
>>
>>60515690
>HE'S A REDDITOR FRGOPOSTER
>>
Fuck chapel looked so promising as a language but it can't even fucking use libraries compiled from it.
>>
>>60515719
Install gentoo
>>
>>60515726
already using it
>>
>>60515656
if you need anything more than printf then it's high time to make a proper GUI
>>
>>60515522
I want to know only if they have widespread use.
>>60515640
UWP is WinForms? Yes, they are used in most corporate environments as regular office OS.
>>
What tigh highs does /dpt/ use?
>>
>>60515336
You can think of a Java array as a function from {0, 1, ..., N-1} into T, where N is the size of the array and T is a type. We'll denote the set of arrays of size N with elements of type T as T[N].
There are several useful operations you can perform on an array.
The function valueAt of type T[N] x {0, ..., N-1} -> T takes an array, an integer less than the array's size, and returns the value of the array at the given index. More precisely, if A is an element of T[N], and n is an integer such that n < N, valueAt(A, n) = A(n). This is typically written as A[n].
setAt : T[N] x {0, ..., N-1} x T -> T[N] is defined as such, for A in T[N], n in {0, ..., N-1} and x in T: setAt(A, n, x) = λ k. if k = n then x else A[k]. In Java, the operation A[n] = x replaces the value of A with setAt(A, n x).
>>
File: 1483496520454.gif (395KB, 540x540px) Image search: [Google]
1483496520454.gif
395KB, 540x540px
https://www.microsoft.com/en-us/research/blog/p-programming-language-asynchrony/
>>
>>60515751

If you're not writing low level, high performance, unsafe algorithms then pointers have no use to you.
>>
>>60515751
>UWP is WinForms?
no, it's UWP

>Yes, they are used in most corporate environments as regular office OS.
corporate environments favor web over desktop for internal apps nowadays
>>
File: dum forgpopstr.png (22KB, 296x378px) Image search: [Google]
dum forgpopstr.png
22KB, 296x378px
>>60515718
>HE'S LITERALLY A FROG
>>
File: 1441648599925.jpg (606KB, 1395x858px) Image search: [Google]
1441648599925.jpg
606KB, 1395x858px
>>60515690
>>60515803
FUCK OFF
>>
>>60515784
>unironic goto in the manual's first example
wow
>>
File: U ARNT ANIME.png (2MB, 1395x1713px) Image search: [Google]
U ARNT ANIME.png
2MB, 1395x1713px
>>60515830
NO FUCK YOU YUO STUPID ANIME CUNT THINKIN U CAN BE ALL LIKE hur a dur im anime UR NOT ANIME OK NO ONES FUCKING ANIME ITS CARTOON YUO ARE NOT CARTOON GO BACK TO CARTOON STUTID FAT ANIME BITCH
>>
>>60514445

>I have hundreds of thousands of lines of working C and C++ in production behind me

and lisp programmers do that much in maybe 12 lines :^)
>>
>>60515860
8/10 you got me
>>
>>60515510
sort in what way? is there a reason you can't use any old sort like quicksort?
>>
>>60515885
wrog
>>
File: Capture.png (71KB, 1181x1005px) Image search: [Google]
Capture.png
71KB, 1181x1005px
>>60515888
?
>>
>>60515582
wrong
>>
>>60515797
Alright thanks.
>>60515798
Depends though. Also not all PCs have switched from W7 to W10 in our company.
>>
>goto is bad
>>
>>60515784
>This project is a collaborative effort between Microsoft researchers and engineers, and academic researchers at the University of California, Berkeley and Imperial College in London.
whatcouldpossiblygowrong.jpg
>>
File: B17kZytIYAAPcKZ.jpg (8KB, 276x270px) Image search: [Google]
B17kZytIYAAPcKZ.jpg
8KB, 276x270px
>goto is good
>>
>>60515929
shit taste
>>
>>60515948
>>60515965
whoms't are thou quoting
>>
>>60515985
>muh lisp
lol have fun making a viable commercial software product in lisp
>>
>>60516019
>commercial software
kys
>>
>>60516059
>unemployed neckbeard
kys
>>
rate my piece of shit "sum of all primes under X" function

void sum_of_primes(long n){
int i[n];
long p = 2; //set as first differing multiple
//populate array
for(long t = 0; t <= n; t++){
i[t] = 1;
}
for(long t = 0; t <= n; t++){
long j = 1; //set as first differing multiple

while(p <= n){
j++;

if(p * j <= n){
i[p * j] = 0;
}
else{
break;
}
}
p++;

}

//add all that up
long tmp_add = 0;
for(long v = 0; v <= n; v++){
if(i[v] == 1){
tmp_add += v;
}
}

tmp_add -= 1;

printf("sum of all primes under %li: %li\n", n, tmp_add);
}
>>
>>60516019
nice deflection. how can you possibly live with yourself day to day while being this insecure?
>>
>>60516075
nice projection
>>
>>60516067
>not an unemployed neckbeard
>claims to be a programmer
kys
>>
>>60516071
Algol influenced languages get an automatic F in my book.
>>
>>60515999
Learn to write. The correct sentence is "Whom quotest thou?".
>>
i rate your bitbucket/github/whatever on 10.
>>
>>60516086
must suck knowing your language is objectively shit
you're just another pajeet
>>
>>60516071

shitty and slow but it probably works
>>
>>60516071
>commenting your kode
>>
File: 143188.jpg (226KB, 869x1776px) Image search: [Google]
143188.jpg
226KB, 869x1776px
>>60516128
>not wanting your kode to look like klossy's
>>
File: yuuka_snapchat.png (496KB, 560x756px) Image search: [Google]
yuuka_snapchat.png
496KB, 560x756px
>>60516164
>klossyposting
>>
>>60516120
https://github.com/28beanz
Dont use it a whole lot. The projects there are from when I was learning some general OOP concepts.
>>
>>60516124
>C++
>shit
t. sour grapes
>>
>>60516109

Learn to use modern English. The correct sentence is "Who are you quoting?"

And of course, the answer is "nobody."
>>
>>60516232
2/10 because

Github
Only 2 projects
Only C# and Java
The Pokemon engine is not even finished.
>>
>>60516234
t. pajeet
enjoy your >>>/trash/
>>
>>60516313

C++ is to complicated for pajeets.
>>
if im saving info to a file (not binary) with fprintf like

"%3d %3d %1d %29s %29s\n"


whats the line length?

is it 3+3+1+29+29+1?
>>
>>60516337
you certainly would know mr. poojeet
go poo in the loo
>>
>>60516274
"Modern" English is an overly ambiguous clusterfuck.
>>
>>60516349
counting the spaces the full line length is 3+1 + 3+1 + 1+1 + 29+1 + 29+1
another +1 for the \n if you get the line with a method that doesn't discard it
another +1 for the \0 regardless
>>
what do ruby, javascript, and rust have in common that make them appealing to social justice warriors? how would one create a language that makes SJWs hate it and not want to use it?
>>
>>60515930
>Also not all PCs have switched from W7 to W10 in our company.
There's another reason why they prefer web apps - you just need a fucking browser, and not The New Thing(tm) Microsoft has introduced leaving The Old Thing you were reliant upon to rot.
>>
>>60516349
You mean minimum line length? %3d prints AT LEAST 3 characters, but it doesn't limit the maximum characters.
>>
>>60516384
They were all influenced by Lisp
>>
>>60515897
arrange in a 3D is space.
give each node an x,y,z position according to its properties
>>
>>60516384
>what do ruby, javascript, and rust have in common that make them appealing to social justice warriors?
They're new. SJWs are also new. New people like new things.
>how would one create a language that makes SJWs hate it and not want to use it?
Use racist, sexist, and homophobic terminology for your language keywords and type names.
>>
>>60516384
Ask Terry "T-God" Davis
>>
database autists help this retard out
what's the difference between these two statements
(I know it's terrible code/db design)

https://pastebin.com/db0wgz6X
Had to do pastebin link because 4chan was throwing a fit

If my shit code is illegible: basically, what's the difference between selecting multiple tables then comparing the foreign keys and doing a join?
>>
>>60516372
gonna try it out now thanks
>>60516399
yes, the value will never exceed 3 chars
>>
>>60516453
Select vs. joins are the same performance-wise
>>
>>60516492
so only syntactically different?
>>
>>60516164

Comments should be used to clear up ambiguities and confusing sections of code. They should not be used to merely describe each and every line of code, regardless of how obvious its meaning.

/* Fast implementation of inverse square root using Newton's method.
* The logic of this function can be described in the following paper:
* https://sites.math.washington.edu/~morrow/336_12/papers/ben.pdf
*/
float fast_inv_sqrt(float number)
{
union { int32_t i; float f; } cvt = { .f = number };
float half = number * 0.5F;

cvt.i = 0x5F3759DF - (cvt.i >> 1);
return cvt.f * (1.5F - (half * cvt.f * cvt.f));
}


And if the algorithm requires an entire paper to understand what the hell is going on, it never hurts to link to the paper so a prospective maintainer of the codebase can be assured that what they are reading is not magic.

>>60516384

Ruby: Easy to learn, very expressive. Community is ALREADY full of relatively nice people because of MINASWAN. Many similarities to Python, which is also full of SJWs. Don't believe me? Which language's convention did Donglegate occur with?

JavaScript: Required for web development. Most SJWs prefer webdev, so this is a logical choice.

Rust: Made by Mozilla, an SJW corporation.
>>
>>60516525
Pretty much, though the join syntax is more expressive allegedly
>>
>>60515263
What the fuck is that t in scoop in the defstruct.
>>
>>60516453
the first one is older syntax (implicit joins). use the second one
>>
>>60515295
Lmao I don't think that's legal CL syntax.
>>
>>60516556
t is the top of the type hierarchy in lisp
>>
does anyone use this?
https://wiki.gnome.org/Apps/Builder

I've never heard about it
>>
>>60516372
>another +1 for the \n
Does this need to account for other file formats (e.g. DOS where eol is CR+LF)?
>>
>>60515263
Why not just have '(scoop scoop)
Why make it an object lol.
>>
>>60516589
>GNOME anything
oh boy, can't wait for them to remove line numbers because they could be confusing for certain users
>>
>>60516535
then answer the second part of the question
>>
>>60516585
I'm not that faggot, but it doesn't error out:
CL-USER> (defstruct scoop (t))
(defstruct ice-cream ())
(defun scoop-of-ice-cream ()
(make-scoop :t (function make-ice-cream)))
(defun two-scoops-of-ice-cream ()
(mapcar (function funcall)
(make-list 2 :initial-element (function scoop-of-ice-cream))))
WARNING: slot name of NIL indicates probable syntax error in DEFSTRUCT
TWO-SCOOPS-OF-ICE-CREAM
CL-USER> (scoop-of-ice-cream)
#S(SCOOP :T #<FUNCTION MAKE-ICE-CREAM>)
CL-USER> (two-scoops-of-ice-cream)
(#S(SCOOP :T #<FUNCTION MAKE-ICE-CREAM>)
#S(SCOOP :T #<FUNCTION MAKE-ICE-CREAM>))
>>
>>60516594
It does. But that being said, first thing I said was actually wrong, without the \r\n or \n or \0 it would be 3+1 + 3+1 + 1+1 + 29+1 + 29, not 3+1 + 3+1 + 1+1 + 29+1 + 29+1, sorry about that.

Also for more platform independence you might consider using a function that discards the newline so you don't have to worry about its format
>>
File: crystal_logo-stacked_version.png (5KB, 253x276px) Image search: [Google]
crystal_logo-stacked_version.png
5KB, 253x276px
Friendly reminder that Ruby has been deprecated by Crystal, a programming language for the new century.

https://crystal-lang.org/
http://crystalshards.xyz/
http://awesome-crystal.com/
https://gitter.im/crystal-lang/crystal

Learn Crystal and you too become a true computer scientist.
>>
>>60516556
It's my attempt at imitating C++'s higher-kinded types. T is supposed to be the constructor of the type you're using as a "parameter."
>>60516585
You're right, I forgot the defstruct syntax is (defstruct typename fields...), not (defstruct typename (fields...)). My bad.
>>60516606
Because then how are you supposed to know it's a scoop of ice cream.
>>60516639
My bad about that. It should be (defstruct ice-cream), not (defstruct ice-cream ()).
>>
Which programming language should I start with lads?

I was thinking about going with Java > C > Assembly > Python > Haskell
>>
>>60516589
Looks like it might be decent IDE for C and if you are developing GTK applications.
But there are already good IDE's for C and C++. If it provided way to deploy your GTK application to android and IOS it might be interesting but at this point it just another C and C++ IDE.
>>
File: old_hag_langs.png (173KB, 600x355px) Image search: [Google]
old_hag_langs.png
173KB, 600x355px
>>60516713
Skip Java m8
>>
>>60516713
Common Lisp
>>
>>60516702
>ruby except compiled
oh FUCK yes
trying this shit right fucking now
>>
>>60516750
and static typed
>>
>>60516779
Instantly garbage.
>>
>>60516556
Dumbass, I know.
I bet you wrote bad Lisp code on purpose.
It's supposed to be (defstruct scoop t) or (defclass struct ())
(defstruct scoop t)
(defstruct ice-cream)
(defun scoop-of-ice-cream ()
(make-scoop #'make-ice-cream))
(defun 2-scoops-of-ice-cream ()
(mapcar #'funcall
(make-list 2 :initial-element #'scoop-of-ice-cream)))

But this shit is retarded.
It's better having a scoop be the holding place of an element of a list, and the type be the actual element.
'(ice-cream ice-cream)
Thanks to symbols, you don't need to do stupid shit like define a new structure without fields.
'(you are a faggot)
A scoop of 'you 'are 'a 'faggot
>>
>>60516655
worked with 71 length
>>
>>60516071
Who cares.
>>
>>60516791
>It's supposed to be (defstruct scoop t) or (defclass struct ())
yeah sorry about that, I'm too used to scheme
>It's better having a scoop be the holding place of an element of a list, and the type be the actual element.
>'(ice-cream ice-cream)
>Thanks to symbols, you don't need to do stupid shit like define a new structure without fields.
how the FUCK is that in any way better. symbols aren't even objects you absolute cuck. your ice-creams aren't even of type ice-cream, they're just symbols. if i wanted a fucking scoop of ice cream and i got a symbol instead i would be so pissed. YOU CANNOT EAT A SYMBOL.
>>
>>60516713
assembly (for whatever architecture you're using) -> forth

all you need.
>>
>>60516702
>https://crystal-lang.org/
syntax looks like ass
>>
>>60516851
reminder that the lisp was easier to read
>>
>>60516703
Make a comment saying '(symbol1 symbol2 ... symboln)
is a n scoops of symbol1 upto symboln)
and that '(ice-cream ice-cream) is two scoops of 'ice-cream ?
>>
>>60516852
Why do you think I should start with Assembly.
>>
>>60516851
Sure you can.
(defun eat-ice-cream (scoops)
(loop repeat (random (length scoops)) do (pop scoops))
finally (return scoops)))
>>
>>60516702
> It relies on LLVM for emitting
>Crystal needs a C compiler (cc) and linker (ld) to be able to compile Crystal programs
dropped.
>>
>>60516713
java > C++

all you'll ever need
>>
>>60516851
>symbols aren't objects
Ok, pal, I'm pretty sure symbols have at least 5 slots of information if they're interned.
>values
>global value
>function
>property list
>other miscellaneous shit
>>
    static int distanceToWall(){
int count=0;
while(Robbi.hasSpaceAhead()==true){
Robbi.moveForward();
if(Robbi.hasSpaceAhead()==false){
count =1;
Robbi.turnAround();
while(Robbi.hasSpaceAhead()==true){
count++;
System.out.println(count);
Robbi.moveForward();
}
Robbi.turnAround();
System.out.println("stop");
break;
}
}
return count;
}

static int distanceBetweenWalls(int idunno){
idunno = distanceToWall();
if(length!=0){
Robbi.turnLeft();
int width = distanceToWall();
}
return 0;

}

.\NoEyes.java:25: error: cannot find symbol
if(length!=0){
^
symbol: variable length
location: class NoEyes
.\NoEyes.java:35: error: method distanceBetweenWall
distanceBetweenWalls();
^
required: int
found: no arguments
reason: actual and formal argument lists differ i
2 errors
>>
>>60516939
>YOU CANNOT EAT A SYMBOL.
>Sure you can.
>*posts proof*
lol ok pacman enjoy eating your symbols and pretending they're ice cream

>>60516885
that's a pretty good solution but a better solution is still just to have your scoops of ice cream actually be scoops of ice cream

>>60516875
ree
>>
Rust will never be useful, because it will never have a way to guarantee TCO, fully-featured HKTs, or dependent types.
>>
>>60516916
So you learn the fundamentals.
It's also way easier to learn than any high level language, it's just shuffling data between registers and memory and looking up what various opcodes do.
>>
>>60516976
Why does it not work?
I honestly do not understand why it doesn't work, shouldn't the returned method make it work?
>>
>>60516941
no, you only crytal and llvm
>>
>>60517019
>llvm
>only
that's a bloated monstrosity.
I cannot respect languages without their own compilers and code generators.
>>
>>60516986
Dude, types are in our mind.
You know what structures are under the hood right, just vectors whose first element is a symbol, and the later elements being the fields and their values.

I could say that you're pretending your vectors are ice cream.

What matters here is that we're representing some arbitrary data type as our own type.
>>
>>60516632

How to make a language that SJWs don't like? Make it mildly difficult to use, and put in project maintainers to the compiler and standard library that will actively reject attempts at a code of conduct, or changes to wording (i.e. he to they).

>>60516702

You can't deprecate shit if you don't have a stable release yet.
>>
>>60517031
but llvm was written in crystal
>>
>>60516986
poop in my scoops
>>
would someone here be willing to tell me whats wrong with my single neuron neural net? it seems reasonable to me but for some reason i get a stupidly high level of error from it. the error drops til the third pass, where it starts steadily increasing.

code:
https://pastebin.com/tWJn86p6

the CSV file contains 3500 records ranging from 0 to 0.7, and the rate im calling train_net with is 0.001
>>
>>60517011
wat

>the returned method
No "methods" are being returned in >>60516976
so I have no idea what you mean

As for what's actually wrong, the error messages say everything. There's no variable "length" in the function distanceBetweenWalls and you are calling it somewhere else in part of your code you didn't include (specifically line 35) without no arguments (distanceBetweenWalls()) despite it obviously requiring one argument (int idunno).
>>
>>60517031
crystal has it's own code generator which generates llvm ir code
crystal compiler is written in crystal
crystal is self hosted
>>
>>60517054
No. LLVM is written in C++.
>>
>>60517088
I think I am going to a run and then go to bed.
Enough for today.
>>
>>60516990

>guarantee TCO
-C opt-level=2

There, now you have TCO.

>fully-featured HKTs
How often do systems programmers actually find a use for these?

>dependent types
I recall reading somewhere that this may be happening in Rust's future. I am still not sure where this would be useful for systems programming, however.
>>
>>60517095
>crystal has it's own code generator which generates llvm ir code
not interested.
>>
There's no point to use rust when ATS exists.
>>
>>60514450
>select text
>SPC x a [whatever character I want to align by]

have you tried using a real text editor?
>>
>>60517109
no, c++ is written in crystal
>>60517062
>poop in my scoops
>SCOOP IN MY POOPS
>HOLY SHIT FROOT IN MY FUCKING LOOPS
>REEEEEEEEEEEEEEEEEEEEE
>>
>>60517133
>There, now you have TCO.
You don't have a guarantee that the compiler performs TCO on the function you're interested in.
>>
>>60517188
>real text editor
You mean like cat?
cat >> out.txt
This is the best text editor ever!
^d
>>
>>60514591
You can still pollute your code with braces and semicolons, and it's only a proposal for dotty. I fucking hope it goes through
>>
>>60514611
>falling for the falling for the meme meme
>>
>>60517209
You need sed or awk
>>
>>60517193
>autismofagging this fucking hard
>>
>>60513923
"The most powerful programming language is Lisp. If you don't know Lisp (or its variant, Scheme), you don't know what it means for a programming language to be powerful and elegant. Once you learn Lisp, you will see what is lacking in most other languages." -Richard Stallman
>>
>>60517194

Recall: C does not have TCO guaranteed by the language standard, but in all practical cases, it should be treated as though it does. With the -O2 flag, both Clang and GCC will always perform TCO if it is possible to do so.

Rust uses LLVM as its compiler backend, the same as Clang. If Clang could make an optimization, Rust can too. This includes TCO. While it is possible for a Rust compiler to come into existence that does not use LLVM as its backend, no such compilers exist that are notable. Therefore, we can rely on the behavior of LLVM.

Can you show me a case of tail recursion in Rust where TCO is not performed with opt-level=2 or opt-level=3?
>>
>>60517341
I appreciate TCO because it makes it easier to call up chicks for sex
>>
I'm thinking of going back to programming. I used to do desktop programs with Java Swing and C# WPF but I'm guessing desktop programs are dead now? I don't really like web development. Any suggestions? What about mobile app development?
>>
>>60517383
Lisp
>>
>>60517341
Who said anything about C? Me thinking Rust is not useful does not mean I think C is any more useful.

Implementation-defined behavior is a nightmare. If it's not in the language standard you cannot rely on it.
>>
>>60516990
>muh TCO
if you unironically use recursive functions in production software you should kill yourself
>muh HKTs
>muh dependent types
don't even know what that is
>>
File: precise_precision.png (20KB, 1399x298px) Image search: [Google]
precise_precision.png
20KB, 1399x298px
I'm working on variable precision to zoom in on an answer numerically.

I'm trying to figure out why I'm getting divergence in results at 10^-5 when results are in the 10^3 range. The divergence comes from switching to that commented out line of code which functionally shouldn't change the behavior.
Double floating point precision should give 10^15 range but I'm getting less than 10^9. Is this because of the expression? Are the MATLAB implementations of arithmetic adding a lot of numeric noise? Do I have to re implement in a language using a quad precision math library?
>>
>>60517428
Pleas shut up. Ignorance is not an opinion.
>>
>>60517395

>Who said anything about C?
It was intended to be used as an example. C is another language which does not guarantee TCO, but for all practical purposes, you can rely on it to do so, because the only two compilers worth using perform this optimization wherever it is possible to do so with the right flag.

>Implementation-defined behavior is a nightmare. If it's not in the language standard you cannot rely on it.
Implementation-defined behavior exists because non-standard hardware exists, and we would like to support it. If there is a platform where, for some reason, LLVM is incapable of performing TCO because TCO cannot exist on that platform, then Rust cannot perform TCO on that platform, though it can still target it, and use standard iteration techniques. By comparison, languages which guarantee TCO cannot target that platform AT ALL, because implementing a code generator for said platform would require breaking the language standard.

It is unlikely that one will ever encounter a platform that cannot support TCO with Rust. We can reasonably rely on Rust to perform this optimization on the standard architectures. On non-standard platforms, programs should be designed around the non-standard hardware, rather than copying over code from others.
>>
>tfw coming here has made you completely lose faith in what little skill you had at programming
>>
>>60517878
Do not worry anon. Code at least 2 hours every day and in 10 years you'll be skilled.
>>
>>60517878
Learn Lisp.
>>
>>60517878
>tfw when coming here has made you completely lose faith in what little skill others might have at programming
People are fucking retarded.
>>
>>60517878
Then you must be completely awful barely able to program because most people here are shit.
You rare, if ever see anything beyond fizzbuzz stuff in these threads.
>>
>>60517956
Sorry.
>>
>>60517985
People discuss complex stuff in these threads all the time.
>>
>>60517951
Why is Lisp shilled so hard?
>>
I made an image hosting site and now I'm wondering what the fuck was the point.

Maybe I'll scrap it and create something else on that domain instead, i dont know.

Feel free to try it and call it shit: honk.pm
>>
>>60518073
>>60517331
>>
>>60517341
>If Clang could make an optimization, Rust can too.
wrong
>>
File: shamefur dispray.png (19KB, 640x480px) Image search: [Google]
shamefur dispray.png
19KB, 640x480px
>>60517075 anyone?

this is literally the best i can get
>>
>>60517878

Coming here has made me a better programmer, I think. 4chan is very abrasive, and will pick apart any code you post for flaws. You just have to be able to discern legitimate criticism from "hurr #{language} is shit" and similar arguments.

>>60518088

The only optimizations that Clang could do over Rustc would be frontend optimizations. Everything else is going through the same LLVM backend.
>>
>>60518128
I'm too stupid for these things
>>
>>60518087
What makes it so powerful?
>>
File: test (6).jpg (212KB, 645x960px) Image search: [Google]
test (6).jpg
212KB, 645x960px
>>60517075
>>60518128
What are you calculating?
>>
>>60518146
frontend optimizations are the most important optimizations. more the language is high level, more the code provides information to the compiler. rust not having the undefined behaviors of c, there are less optimization rooms.
>>
>>60518147
apparently i am too
either that or i need better instructions

>>60518171
its a single neuron neural net, im trying to train it to spot patterns in the data. blue line is the input, red is the best output i can get from it.
>>
>>60518152
metaprogramming
>>
>>60517956
half of the people ITT are only pretending to be retarded
>>
>>60518184
Maybe add another neuron lmao
no but seriously increase the step size or something
>>
>>60518192
What can I do with that?
Doesn't C++ have that?
>>
>>60518363
not as simple and straightforward as lisp.

Lisp is love, lisp is life
>>
>>60518363
Simplest use-case would just be adding new features to the language, instead of waiting for a BDFL or committee to implement such things. Read macros go further and let you reprogram the lisp reader, which parses the lisp code. So you could essentially reprogram the language. Here's an example which allows the Lisp reader to recognize JSON: https://gist.github.com/chaitanyagupta/9324402
>>
File: thanks professor.png (18KB, 640x480px) Image search: [Google]
thanks professor.png
18KB, 640x480px
>>60518229
turns out doing that while ignoring my professors "lol just slide all the weights using the same variables" advice was what was required, thanks
>>
>>60518178

>frontend optimizations are the most important optimizations
Considering that the majority of optimizations occur on the backend, I'd say you need to provide a bit better of an argument for why you think those frontend optimizations are more important.
>>
>>60514994
>System.out.println("think I'm really going to be sick... that's discusting... alright thats it, your not coming back from that one. Ugh, I think my eyes were bigger than my stomache on that one. I'm out.");

my sides
>>
Is masturbating 5-6 times per day normal? Will this in any way harm my programming?
For example, I just spontaneously felt the need to jerk off to this image >>60518171
>>
anyone here has experience with renderdoc?

i just can't make it work with my application.
>>
>>60518657
>Is masturbating 5-6 times per day normal?
no
>Will this in any way harm my programming?
you'll turn into a low test high prolactin beta fag so you'll fit right in
>>
>>60517428
>if you unironically use recursive functions in production software you should kill yourself
This!!! I don't use any loops too.
>>
>>60518688
>no
What should I do to fix it?
>you'll turn into a low test high prolactin beta fag so you'll fit right in
I meant purely the skill, not associating with "people" who program.
>>
>>60517428
thank god I'm only using it ironically
>>
>>60518469
>Simplest use-case would just be adding new features to the language
What if I use my own language?
>Here's an example which allows the Lisp reader to recognize JSON
Why would you think anyone non-subhuman would be interested in this? Do you have some better examples?
>>
Sometimes I can't program after masturbating, sometimes I can't focus because I am too horny

Fucking instincts man, I hate em. It's like being a slave to your penis
>>
>>60514117
A tetris game, then make an AI that plays tetris.
>>
>>60516019
>what is crash bandicoot

I hate lisp, but your point is just retarded,
>>
File: 1474373032775.jpg (115KB, 1200x1198px) Image search: [Google]
1474373032775.jpg
115KB, 1200x1198px
>>60518691
LOL!!!
>>
>>60518792
>one company who experimented with lisp in the 90s means lisp is relevant
>>
>>60518792
>Syntactically GOAL resembles Scheme, though with many idiosyncratic features such as classes, inheritance, and virtual functions.[1] GOAL encourages an imperative programming style: programs tend to consist of a sequence of events to be executed rather than the functional programming style of functions to be evaluated recursively. This is a diversion from Scheme, which allows such side-effects but does not encourage imperative style.
it's quite different from meme lisp and also >>60518811
>>
File: 1443500977688.png (835KB, 1200x1080px) Image search: [Google]
1443500977688.png
835KB, 1200x1080px
>>60518485
sure. just compare the llvm ir generated with -O0 and -O2

for example

int foo(int n, int s)
{
if (n > 0)
return foo(n - 1, s * 2);
return s;
}


with -O3

; Function Attrs: nounwind readnone uwtable
define i32 @foo(i32, i32) local_unnamed_addr #0 {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %12

; <label>:4: ; preds = %2
br label %5

; <label>:5: ; preds = %4, %5
%6 = phi i32 [ %9, %5 ], [ %1, %4 ]
%7 = phi i32 [ %8, %5 ], [ %0, %4 ]
%8 = add nsw i32 %7, -1
%9 = shl nsw i32 %6, 1
%10 = icmp sgt i32 %7, 1
br i1 %10, label %5, label %11

; <label>:11: ; preds = %5
br label %12

; <label>:12: ; preds = %11, %2
%13 = phi i32 [ %1, %2 ], [ %9, %11 ]
ret i32 %13
}


with -O0
; Function Attrs: noinline nounwind uwtable
define i32 @foo(i32, i32) #0 {
%3 = alloca i32, align 4
%4 = alloca i32, align 4
%5 = alloca i32, align 4
store i32 %0, i32* %4, align 4
store i32 %1, i32* %5, align 4
%6 = load i32, i32* %4, align 4
%7 = icmp sgt i32 %6, 0
br i1 %7, label %8, label %14

; <label>:8: ; preds = %2
%9 = load i32, i32* %4, align 4
%10 = sub nsw i32 %9, 1
%11 = load i32, i32* %5, align 4
%12 = mul nsw i32 %11, 2
%13 = call i32 @foo(i32 %10, i32 %12)
store i32 %13, i32* %3, align 4
br label %16

; <label>:14: ; preds = %2
%15 = load i32, i32* %5, align 4
store i32 %15, i32* %3, align 4
br label %16

; <label>:16: ; preds = %14, %8
%17 = load i32, i32* %3, align 4
ret i32 %17
}
>>
>>60518836
>meme
>>>/v/
>>
>>60518772
>slave
triggers my Black transgenerational PTSD. Never say that word again. If you have a master-sl*ve system at hand, rename it a master-puppet slave for the sake of Black people.
>>
>>60518891
*master-puppet system for feck's sake. that's how triggerd I am!
>>
File: images.png (5KB, 226x223px) Image search: [Google]
images.png
5KB, 226x223px
>>60518871
> >>>/
>>>/trash/
>>
>>60518923
>images
>>>/b/
>>
File: f8e.jpg (13KB, 320x362px) Image search: [Google]
f8e.jpg
13KB, 320x362px
>>60518907
>>
File: 1494995805430.png (2MB, 1044x1044px) Image search: [Google]
1494995805430.png
2MB, 1044x1044px
>>60518931
> >>>/
>>>/trash/
>>
>G*U trash
>>>/b/
>>
File: images (3).jpg (3KB, 225x225px) Image search: [Google]
images (3).jpg
3KB, 225x225px
>>60518942
> >>>/
>>>/trash/
>>
>>60518839
mem2reg is GOAT
>>
File: 1493879020711.png (660KB, 785x980px) Image search: [Google]
1493879020711.png
660KB, 785x980px
What is the best assembly language?
>>
Reminder that Paul Graham still hires lisp hackers (keyword for while males apparently)
>>
File: 1494922328031.png (194KB, 562x389px) Image search: [Google]
1494922328031.png
194KB, 562x389px
>>60513923
>Daily ""Programming"" Thread
Since when are fizzbuzzes programming?
>>
>>60519009
>(keyword for while males apparently)
while MALES; do MALES; done
>>
>>60518839
This doesn't prove what you say. Most of these are LLVM passes.
>>
>>60514824
BOY out of NEXT_DOOR
>>
new thread when
>>
>>60519030
>"Anonymous"
Since when were cockhungry sluts anons?
>>
Is it just me or is she sexually attractive?
>>
>>60519009
What about female Lisp hackers?
>>
>>60519141

Haven't met too many women who prefer Lisp. Most like Python, although I've met a few who are C hackers.
>>
>>60519203
Met a group of C/C++ graphics programming gurus once, bretty cool gals

Also, a lot of girls I've met liked ruby a lot btw
>>
>>60519046
which are not done in the backend part.
>>
>Job title: Android developer
>Requirement: Published app with 100k+ downloads
hmmmm
>>
>>60519009
What kind of lisp hackers?
>>
>>60519393
what's wrong with that?
>>
>>60519005
Lisp.
>>
>>60518811
US military uses Lisp, as does NASA.
>>
>>60519005
java assembly
>>
>>60519505
>legacy software
why don't you make new software using lisp if it's so good
>>
>>60519505
>>60518811
Intel also has lisp division for research
http://medias.ircam.fr/xe5f73b
>>
New thread: >>60519540
>>
>>60518811
they are still heavily using scheme in all their games.

PTC CAD softwares are using lisp

clojure is used quite a lot
>>
>>60519579
>they are still heavily using scheme in all their games.
doubt.png
>>
>>60516106
>saying "Algol" when you mean "C"
>being this bluepilled
The Algol people were using closures before Scheme existed. The Algol people solved buffer overflows in the 1960s.
>>
>>60519333
You're a dumbass. LLVM IS these compiler's back-end.
>>
File: 0.jpg (17KB, 300x100px) Image search: [Google]
0.jpg
17KB, 300x100px
Just working on my imageboard, 4kev.org
Thread posts: 316
Thread images: 44


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