[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vr / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / asp / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / qst / sci / soc / sp / tg / toy / trv / tv / vp / wsg / wsr / x] [Settings] [Home]
Board
Settings Home
/g/ - Technology



Thread archived.
You cannot reply anymore.



File: prog.jpg (105 KB, 473x496)
105 KB
105 KB JPG
Last thread: >>64114135

What are you working on, /g/?
>>
first for very important issues
http://www.strawpoll.me/14754710
http://www.strawpoll.me/14754710
http://www.strawpoll.me/14754710
>>
Reverse probabilistic 2D regex. It generates 2D patterns instead of matching strings.
>>
JavaScript is the greatest language
>>
How can I deploy my C++ projects?
I use Maven for Java, but I don't know what to use for C++..
>>
>>64123021
K&R all the way.
>>
>>64123021
https://www.kernel.org/doc/html/v4.10/process/coding-style.html#placing-braces-and-spaces
>>
making a preference bundle (settings page) for my tweak, just updating the .plist file now (i've stripped this down for simplicity):

<dict>
<key>items</key>
<array>
<dict>
<key>cell</key>
<string>PSButtonCell</string>
<key>label</key>
<string>Enable</string>
<key>action</key>
<string>enable</string>
</dict>
<dict>
<key>cell</key>
<string>PSButtonCell</string>
<key>label</key>
<string>Disable</string>
<key>action</key>
<string>disable</string>
</dict>
</array>
<key>title</key>
<string>RemoveDock</string>
>>
>>64123182
iToddlers...
>>
Does anyone use visual studio here?
I never hear anything about it. Is it not good or something?
>>
>>64123262
B L O A T
L
O
A
T
>>
>>64123293
What IDE do you use for C++?
>>
>>64123262
I'd assume it's because of the use of Linux. Also, I personally hate it because of how bloated and slow it is to get up and running.
>>
Daily reminder that all languages compile to an IR regardless of their interpreted (VM)/native (no VM) execution model, regardless of their association with LLVM
>>
>>64123306
Orwell Dev-C++
Code::Blocks
GCC + command line
>>
>>64123316
>inb4 machine code is actually IR because muh microinstructions
>>
>>64123306
Emacs with company and flycheck
>>
>>64123374
Reminder that C and C++ are interpreted by the big two compilers
>>
>>64123109
it's not
>>
>>64123397
>inb4 constructing an AST is "interpretation"
>>
>clion student edition is only for non-commercial projects
how could they prove you used it in a commercial project?
>>
File: 1485810909710.jpg (651 KB, 3840x2160)
651 KB
651 KB JPG
>>64123306
emacs
>>
>>64123502
>how could they prove you used it in a commercial project?
They couldn't, but if you're big enough to matter, you probably employ quite a few people, not all of which can be trusted to keep your illegal activities secret forever, and you have enough money to pay for a license anyway.
>>
>>64123338
>>64123382
>>64123515
What's Eclipse like for C++, or just in general?
>>
>>64123262
I use it, it's ok. The only reason I do though is for .NET languages.
>>
Learning the ropes of using Haskell
I'm having a bit of trouble implementing mergeSort, though.
My "halve" and "merge" functions work, so I'm not really sure where my problem is. Any hints? or at least how to debug in Haskell?

myHalve :: Eq a => [a]-> ([a],[a])
myHalve list
| (list == []) = ([], [])
| otherwise = (take halflen list, drop halflen list)
where halflen = (length list) `div` 2

merge [] list2 = list2
merge list1 [] = list1
merge (l1:list1) (l2 : list2)
| (l1 > l2) = l2 : merge (l1:list1) list2
| otherwise = l1 : merge list1 (l2:list2)

{-
Now define the function mergeSort :: Ord a=> [a]->[a],
where any list is sorted by mergint the two lists that result from
sorting the two halves of the list separately
-}

--Cases with zero and one element
mergeSort [] = []
mergeSort [x]= [x]

--General case of MergeSort
mergeSort (x:xs) = merge lHalf' rHalf'
where (lHalf, rHalf) = myHalve (x:xs)
lHalf' = mergeSort lHalf
rHalf' = mergeSort rHalf
>>
>>64123896
>Learning the ropes of using Haskell
srlsy? haskell? what's the point of using haskell over C, C++ or C#?
>>
>>64123780
shit
>>
>>64124014
more expressive code
>>
>>64124014
It's a high level language that, unlike python, actually feels like thought was put into its constructs. There's a definitive ideology behind it that isn't "just put shit together until it sort of works" and it's surprisingly easy to translate between English and Haskell if you know what you're doing

Writing a four line quicksort function is really flipping cool
quickSort (elem: list)  = smaller ++ [elem] ++ larger 
where smaller = [x | x <- list, x < elem]
larger = [ y | y <- list, y > elem]
>>
>>64123896
*Main> [6..1]
[]
>>
>>64124053
When comments are not enoght, so you have to invent whole new langluage.
>>
>>64124088
Oh shit, really? Huh. Though the list shorthand syntax could work the other way around.
God dang it.
>>
>>64124098
>trusting the comments over the code
You're a bad programmer.

I've seen this sort of shit in other people's code:
it+=it; // this increments it
>>
>>64124127
>implying it doesn't increment `it`
The comment doesn't say it increments `it` by 1, does it?
>>
>>64123306
Sublime 3 + CMake + Clang
>>
>>64123021
offside/lisp obviously
>>
a very abstract framework for finding an initial peer to bootstrap from (and later use that for a
p2p network that can be run anywhere)
>>
>>64123780
Bad. Eclipse kinda blows in general.
>>
>>64122992
fuck Objective-C
why am I doing this to myself
>>
Why is visual studio whining that identifiers for pow and sqrt can't be found when #include <cmath> and #include <math.h> are both at the top?
What the fuck is going on?
>>
>>64124207
Yep, I fuckup'd the example, but you get the idea
>>
c++ is the greatest language of all time
>>
>>64124411
namespaces

using namespace std
>>
>>64124014
>what's the point
Adding one more string to your bow. How can you use the best tool for the job if you only ever used one tool in your entire life ?
C, C++, C# totally overlap each other.
>>
>>64124411
if you build (f7) and it succeeds but you're still getting the error, then it just means intellisense has crashed
happens to me all the time. gotta restart VS
>>
File: govnocode.webm (2.35 MB, 640x360)
2.35 MB
2.35 MB WEBM
>>
>>64124673
>>64124713
Turns out it's because #include "stdafx.h" wasn't first.
>>
>>64124778
the absolute state of windows programming
>>
File: cpu-images-min.jpg (180 KB, 1280x637)
180 KB
180 KB JPG
I have a question for /dpt/ since you are the most intelligent thread on this board
I have a Sandy Bridge i5 processor from many years ago and will this Intel 30% thing affect me and if it does can I sue Intel for selling me a defect product that is not what they advertised ?
Thank you
>>
File: 123123d.png (159 KB, 648x830)
159 KB
159 KB PNG
I have work due in 1 week for an assignment where I have to create a basic program in C. My lecturer is Asian and nobody can understand a thing he says, despite apparently graduating from Harvard. Is there anyone I could pay?
>>
>>64124647
Just post what you have till now
I'll help
>>
>>64124803
This sounds like a pretty basic and doable thing.
>>
>>64124803
If this were in advent of code it would have been solved in under 30 seconds
>>
>>64124803
That's pretty easy though, within 1 week you could teach yourself enough to make that program even if you had no prior programming knowledge whatsoever.
You should really try to do it yourself, throwing in the towel this early on is going to fuck you over big time later on
>>
Could you please try to compile this on any C++ program you use? It works on cpp.shell but DevC++ wont output result. It should sort elements in array from lowest to highest or maybe other way

#include <iostream>
using namespace std;

int maxValue(int b, int a[]) {

int max = a[0];
for (int i=0;i<b;i++) {
if (a[i]>=max) {
max = a[i];
}
}
return max;
}
int maxValueIndex(int b, int a[]) {
int maxIndx;
int max = a[0];
for (int i=0;i<b;i++) {
if (a[i]>=max) {
max = a[i];
maxIndx=i;
}
}
return maxIndx;
}

int minValue(int b, int a[]) {

int min = a[0];
for (int i=0;i<b;i++) {
if (a[i]<=min) {
min = a[i];
}
}
return min;
}
int minValueIndex(int b, int a[]) {

int min = a[0];
int minIndex;
for (int i=0;i<b;i++) {
if (a[i]<=min) {
min = a[i];
minIndex=i;
}
}
return minIndex;
}

int main() {
int n;
cout << "Ile elementow ma zawierac tablica?" << endl;
cin >> n;
int tab[n];
cout << "Wpisz " << n << " elementow: " << endl;
for (int j=0;j<n;j++) {
cin >> tab[j];
}

int z = maxValue(n, tab) + 1;
int l=0;
int tabRosnac[n];
for (int h=0;h<n;h++) {
tabRosnac[l] = minValue(n,tab);
tab[minValueIndex(n,tab)]=z;
l++;
}
cout << "Tablica rosnaca: " << endl;
for (int k=0;k<n;k++) {
cout << tabRosnac[k] << endl;
}
return 0;
}
>>
>>64124803
>>64124831
Post what you have till now
>>
>>64124886
(he has nothing)
>>
>>64124803
What the fuck are you doing in a course that teaches you C if you have no interest in it?
>>
>>64123113

CMake
>>
>>64123113
Jenkins
>>
>>64124883
I don't know much about c++, but doesn't n have to be constant ? you're creating your arrays on the stack, right ?
>>
>>64125017
That's correct. While C99 allows variable length arrays, C++ does not.
Although g++ and clang++ provide this functionality as an extension.
>>
>>64124793
>the most intelligent thread on this board
kek
>>
File: 1501052273182.png (269 KB, 960x540)
269 KB
269 KB PNG
>>64124059
Lel
Except your function sucks and does not sort correctly
Protip actually use recursion in a recursive definition.
And plz post a corrected version
>>
>>64124933
It's a Computer Networking course and covers a range of topics, with some irrelevant ones such as "writing and research in the workplace" that is nothing more than reading a paragraph then paraphrasing what was said.

>>64124831
>>64124886
I can't copy/paste using the website that I have to submit using as it's disabled due to using a "secure" browser
>>
jesus c++ is hard
>>
>>64124883
here you go

#include <iostream>
using namespace std;

int maxValue(int b, vector<int> a) {

int max = a[0];
for (int i = 0; i<b; i++) {
if (a[i] >= max) {
max = a[i];
}
}
return max;
}
int maxValueIndex(int b, int a[]) {
int maxIndx;
int max = a[0];
for (int i = 0; i<b; i++) {
if (a[i] >= max) {
max = a[i];
maxIndx = i;
}
}
return maxIndx;
}

int minValue(int b, vector<int> a) {

int min = a[0];
for (int i = 0; i<b; i++) {
if (a[i] <= min) {
min = a[i];
}
}
return min;
}
int minValueIndex(int b, vector<int> a) {

int min = a[0];
int minIndex;
for (int i = 0; i<b; i++) {
if (a[i] <= min) {
min = a[i];
minIndex = i;
}
}
return minIndex;
}

int main() {
int n;
cout << "Ile elementow ma zawierac tablica?" << endl;
cin >> n;
vector<int> tab;
cout << "Wpisz " << n << " elementow: " << endl;
for (int j = 0; j<n; j++) {
int input;
cin >> input;
tab.push_back(input);
}

int z = maxValue(n, tab) + 1;
int l = 0;
vector<int> tabRosnac;
tabRosnac.resize(n);
for (int h = 0; h<n; h++) {
tabRosnac[l] = minValue(n, tab);
tab[minValueIndex(n, tab)] = z;
l++;
}
cout << "Tablica rosnaca: " << endl;
for (int k = 0; k<n; k++) {
cout << tabRosnac[k] << endl;
}
return 0;
}
>>
>>64125093
maybe computers aren't for you, anon
>>
>>64125127
oh , also put #include <vector> at the top
>>
>>64124883
>>64125017
int * tab = new int[n];

/* ... */

int* tabRosnac = new int[n];
>>
>>64123021
1TBS, but voted K&R because it's close and way better than Allman.
>>
>>64125093
>>64124803
That program is much more about basic logical thinking and problem solving than any kind of programming prowess, so it being part of a more general course makes sense.
You should definitely work on it yourself, you have an entire week after all. It's really not asking all that much, just take it one step at a time.
>>
>>64125128
Maybe you're misunderstanding, I can only access the website using a browser they provide, and copy/pasting is disabled along with many other features to prevent cheating
>>
How does /dpt/ structure its program?
Do you split your code between domains? Do you use a meme pattern like MVVM or MVP? Or do you write spaghetti code?
>>
File: 729.gif (137 KB, 340x340)
137 KB
137 KB GIF
>>64124059
>Writing a four line quicksort function is really flipping cool
You can write a "four line quicksort" like that in any language that supports recursion and has a list structure in the standard library, but all of these toy implementations are useless with shit performance. A proper quicksort in Haskell looks worse than C.
>>
>>64125199
Why would you work on the project in some shitty web frontend?
Download an IDE and fuck around with it on there. You have the instructions already, what more do you need?
>>
>>64125199
You're a bit slow aren't you? Are you really sure working with computers is what you want to do once you are all grown up?
>>
int size = sizeof(ar) / sizeof(ar[0]);

How does this work? How does it give the size of the array?
>>
>>64125199
let's get started. decide how you want to store the current state of a player—one idea would be to have an array int cards[10] and a counter int n that keeps track of how many cards are actually there
task #1 is to read that two-line input and get it into these variables
>>
how would you exploit the intel fuckup?
>>
>>64125306
I know I know, the only reason I did so was because my lecturer advised that we did so in order to ensure compatibility
>>
>>64125404
size of an array / size of a single element = number of elements in the array
How is this hard to understand?
>>
>>64125404
ar is an array of things of size n (
thing[n]
)
ar[0] is a thing
ergo
sizeof(ar) = sizeof(thing[n]) = sizeof(thing) * n

and
sizeof(ar[0]) = sizeof(thing)

thus
size = sizeof(thing) * n / sizeof(thing) = n
QED
Obviously not gonna work if ar is a pointer and not an array in compile-time terms.
>>
anyone happen to have some JS to block the add on the bottom of the page on 4chan?
>>
>>64125640
adblock + adblock pro + ublock
>>
how do i declare an array in c++ using a variable to set its size?
i.e.
int ar[val];
it won't allow it.
i want a function to take an array as a parameter and return another one.
>>
ayyyyyyy you guys took down the Pentagon yet
>>
>>64125650
Thanks, "Ublock" did it for me
>>
>>64125681
You don't if you want to be standard compliant - although g++ and clang++ allow it.
The easiest way to get this behavior portably is to use a vector.
#include <vector>

...

std::vector vec;
vec.resize(val);
>>
>>64125681
Obviously you can't, you have to allocate memory..

int *arr = new int[size];

remember to delete it.

For what you want to do, you should probably use std::vector though.
>>
>>64125681
int n;
cin >> n;

vector<int> arr;
arr.resize(n);


vector<int> MyFunc(vector<int> param){
vector<int> ret;
return ret;
}
>>
>>64125446
by short selling
>>
>>64124059
Javascript is a high level language that, unlike Haskell, actually feels like thought was put into its constructs. There's a definitive ideology behind it that isn't "just put shit together until it sort of works" and it's surprisingly easy to translate between English and Javascript if you know what you're doing

Writing a five line quicksort function is really flipping cool
function qsort(arr) {
if(arr.length < 1) return arr;
var left = [], right = [];

for(var i = 1; i < arr.length; ++i)
(arr[i] < arr[0] ? left : right).push(arr[i]);

return qsort(left).concat(arr[0], qsort(right));
}

Note that this one works, unlike its Haskell counterpart, and doesn't perform quite as badly.
>>
>>64125127
>>64125150
nice, still wont output in dev c++
>>64125681
const int
>>
>>64124803
struct Player{
int cardCount;
int* cards;
};

int getMin(int a, int b){
//return the lower value of the two integers a and b
}

void sort(int* numbers){
//sort the array from greatest to lowest value
}

int main(){
Player player1;
Player player2;

//get input, check if between 2 and 10
player1.cardCount = input;
//get input, check if numbers match cardCount
//check if numbers between 1 and 10
player1.cards = malloc(player1.cardCount*sizeOf(int));
//Assign numbers to player1.cards
sort(player1.cards);

//Repeat above for player2

for(int i=0; i < getMin(player1.cardCount, player2.cardCount){
if(player1.cards[i] > player2.cards[i]){
//output player1 wins
return 0;
} else if(player1.cards[i] < player2.cards[i]){
//output player2 wins
return 0;
} else {
//output draw
return 0;
}
}

if(player1.cardCount > player2.cardCount){
//output player1 wins
return 0;
} else if(player1.cardCount < player2.cardCount){
//output player2 wins
return 0;
} else {
//ouput draw
return 0;
}
}
>>
>>64125804
>nice, still wont output in dev c++
probably because dev c++ is ancient
get visual studio
>>
>>64125793
Hell no mate. JS is a not a good example for that claim. It's an awful abortion of a dynamic, scheme-like language that was casted into those shitty C-like syntaxic traits for no practical reason, and it's shit all around.
>>
>>64125841
get Orwell instead
>>
>>64125804
Does helloworld actually output anything on "dev c++" according to you? sure it's not you being unable to use this IDE properly?
>>
>>64125876
Hell no mate. Haskell is not a good example for that claim. It's an awful abortion of a static, scheme-like language that was casted into those shitty Python-like syntaxic traits for no practical reason, and it's shit all around.
>>
>>64125994
>static, scheme-like language
kys
>>
>>64126037
>javascript, scheme-like language
kys

You see, anon... anyone can claim stupid, generic shit without any logic or evidence.
>>
>>64126063
https://en.wikipedia.org/wiki/JavaScript#Beginnings_at_Netscape fyi

fecking looney is what you are
>s/actual facts/retarded bullshit/g
>joke's on you
>>
>>64126117
>my opinions are facts
Beyond help...
>>
>>64126141
I didn't post >>64124059 and I supported my statement on JS with a source, so you can apply that greentext to yourself
>>
>>64124793
>the most intelligent thread on this board
heh
>>
>>64126167
>I supported my statement on JS with a source
Posting a link and claiming that it supports your statement =/= supporting your statement with a source. Scheme and JS are both dynamically typed, and both support closures. That's where the similarities end. JS is not "scheme-like" in any meaningful sense, unless you want to claim Smalltalk, Ruby, Python, Self etc. are all Scheme-like.
>>
What does /dpt/ think of crystal lang
>>
>>64125838
: In function 'main':
Line 154: ERROR: unknown type name 'Player'
Player player1
>>
In C++ you never want to access unchecked pointers. So every time that you have to access a pointer, you have to make sure it's valid.
Doesn't this go against the principle of programming that you shouldn't do things over and over again? Why isn't there an operator to always safely access a pointer?
>>
>>64126216
go spoonfeed yourself to death
>>
>>64126538
>So every time that you have to access a pointer, you have to make sure it's valid.
that's not even possible to do with traditional pointers
if they're invalid they could just be pointing to some invalid address, and there's no way to verify that
>>
>>64126399
meh
>>
>>64126603
i mean validity as not being null, not as pointing to the wrong address
>>
>>64126538
source? What's a "valid" pointer? a non-null pointer?

Checking for nulls is not specific to C++ anyway. It's not like you MUST put a test on each line of code you write, it's just that code that segfaults is buggy code and you should not write buggy code. I think that's the idea behind what you posted. but again where does that come from?

How would you envision that operator? Should it throw exceptions? nice, so now instead of null checks you have exceptions catchers. It's worse IMHO
>>
>>64126538
Isn't that what smart pointers do or something? I don't really know.
>>
>>64126596
Maybe you should read your own "source", because it clearly states that you're wrong, kid.
>>
>>64126798
Smart pointers are for memory management, not null checks.

>>64126538
If your problem is the null problem, this is largely what & references are for.
>>
>>64126790
Yes, my bad, I simply meant nullptrs. And fuck if I know how to do it, I'm just saying, I think it should be automated somehow.
>>
How do I into side effect free programming?
>>
why does calloc have a different signature to malloc
>>
>>64126814
It cant be automated anymore than it actually is. when you unadvertently dereference a nullptr, the computer cant guess what the correct course of action should be, so it cant do anything else than crash and tell you that you should fix your code.
>>
>>64126814
anyway, this isn't true
>So every time that you have to access a pointer, you have to make sure it's valid.
what you do is decide on whose responsibility it is to determine that the values you're using are valid (the caller or the callee)
then, whatever you decide, keep it consistent throughout the codebase
this minimizes the amount of duplicated checks that need to be done and removes the confusion as to where you should put those checks
>>
merge = (a, b) => {
if (!a.length) {
return b;
}
else if (!b.length) {
return a;
}

if (a[0] <= b[0]) {
return [a[0]].concat(merge(a.slice(1), b))
}
else {
return [b[0]].concat(merge(a, b.slice(1)))
}
};

mergesort = (x) =>
x.length < 2 ? x : merge(mergesort(x.slice(0, x.length/2)), mergesort(x.slice(x.length/2)))

mergesort([1, 5, 9, 0, 3, 4, 2, 8, 7]).forEach((i) => console.log(i));
>>
>>64126909
haskell as a language is designed around this
>>
File: whiteboard.jpg (62 KB, 1200x900)
62 KB
62 KB JPG
*blocks your path*
>>
>>64127227
>he pretends, as he loudly manipulates his moan ads
>>
>>64127209
mergesort([1, 5, 9, 0, 3, 4, 2, 8, 7]).forEach((i) => console.log(i));

can be simplified to
mergesort([1, 5, 9, 0, 3, 4, 2, 8, 7]).forEach(console.log);
>>
These aren't the same, why?
int factorial(int x)
{
int result;
if (x == 1)
return 1;
else
return x*factorial(x-1);
}


int factorial(int x)
{
int result;
if (x == 1)
return 1;
else
return x*factorial(--x);
}
>>
>>64127385
>mergesort([1, 5, 9, 0, 3, 4, 2, 8, 7]).forEach(console.log);
Nope.

Callback arguments are (element, index, array) and console.log interprets this as multiple values to print out.
>>
>>64127452
--x sets x to x-1, so what you're doing is really (x-1)*factorial(x-1) , since the multiplication can't be done until the factorial has finished, which requires decrementing x
>>
>>64127452
Order of evaluation is not defined so the -- may mutate x before the multiplication by x.
>>
>>64127452
>These aren't the same, why?
Sequence points, --x decreases the value of x, then factorial is called with the new value of x, then the new value of x is used to multiply.

For example, if x is originally 5, the first one will evaluate as:
5 * factorial(5 - 1)


whereas, the latter is:
4 * factorial(4)
>>
I have dumb question regarding python synthax. Here is the code:

def quicksort(array):
if len(array) < 2:
return array
else:
pivot = array[0]

less = [i for i in array[1:] if i <= pivot]

greater = [i for i in array[1:] if i > pivot]

return quicksort(less) + [pivot] + quicksort(greater)

print quicksort([10. 5, 2, 3])



Now, my questions are regarding this part of the code
 [i for i in array[1:] if i <= pivot] 
. Is that part equivalent to, say,
 array[ i ] for i in array[1:] if array[ i ] <= pivot 
? I know this is a moronic question, but I am coming from C, so I am trying to make sense from this pythonic syntax.
>>
>>64127560
this is called a "list comprehension"
you should read up on it, C doesn't have an equivalent thing
http://www.pythonforbeginners.com/basics/list-comprehensions-in-python
>>
>>64127599
Thank you, anon. I will check it out.
>>
>>64127560
https://docs.python.org/3.6/tutorial/datastructures.html#list-comprehensions
>>
so im trying to get my first android app running on my phone. I'm connected through USB. When I build/run on android studio it builds fine but when i my log says "Client not ready yet..."

wat do
>>
>>64127522
>>64127526
>>64127558
Interesting. I know you guys will hate this, but I just had to check, but it does work for Java. I'm not sure if one way really makes more sense than the other.
>>
>>64127743
Danke, anon.
>>
>>64127779
>I'm not sure if one way really makes more sense than the other.
Personally, in my opinion.
>>
>>64127779
I believe Java has a well defined evaluation order.
>>
Real talk, no memes. Why does Rust get so much hate on this board? I have not tried it, but it looks to have a lot of good features, while being low level like C. I know it may not perform as well as C, but damn, it may get close to it, while containing features that C could use.
>>
>>64127866
What I posted then, is that possibly compiler dependent for C?
>>
>>64125080
Sorry. Was going by memory.
Woops.
quickSort [] = []
quickSort (elem: list) = smaller ++ [elem] ++ larger
where smaller = quickSort [x | x <- list, x < elem]
larger = quickSort [ y | y <- list, y > elem]
>>
>>64127870
Ugly syntax and the safety meme limiting you. Those are my issues anyway.
>>
>>64125254
Most quicksort implementations I've seen in C/C++ are a lot faster, but more prone to error.
It's a trade-off I'm willing to make if I'm not going for blazingly high speeds
>captcha was "Disabled" lol
>>
>>64127906
Yes. Java guarantees left to right evaluation (so x will be substituted with 5 before x gets decremented on the right) while C may do it in any order.
This doesn't matter for most operators, but the ++ and -- operators have side effects.
>>
>>64127285
i like whiteboards. i wish i had one
>>
>>64127870
Anything that gets spammed as a great solution to every problem will eventually become hated.
That said, Rust is something we need. Nobody can write correct, memory safe C code consistently no matter how much they claim they can.
>>
>>64125876
How the FUCK is javascript scheme-like? Where's the homoiconicity? Continuations? Only thing I can see is first class functions but then should we call C++ and Java scheme like as well?
>>
im supposed to be starting a programming project for uni tomorrow. I have two weeks to build it, and the only requirement is that it communicates over the internet somehow.
any suggestions for something fun to make?
>>
File: 1505135055054.gif (133 KB, 640x550)
133 KB
133 KB GIF
>tfw I just bought one
>>
>>64128031
>homo
>>
>>64128031
It's schemelike because dude closures lmao.

But whatever, closures are more central to Javascript than C++ or Java. You could argue that they're just as fundamental as objects are in Javascript. But that just makes it functional, not schemelike.
>>
>>64127934
>>64127980
So, Rust has potential? How would you guys fix it, to become a worthy successor, or at least, be almost on par with C?
>>
monad = (modifier) => {
return (value) => {
let monad = Object.create(null);
monad.bind = (f) => f(value);
modifier.call(monad, value);
return monad;
};
};

Number.maybe = monad(function (value) {
if (typeof(value) != 'number') {
this.bind = () => undefined;
}
});

maybeNumber = Number.maybe(3)
result = maybeNumber.bind((value) => value + 3);
console.log(result);
>>
I was trying to implement a numerical solver for a very complicated system of ODEs but got lazy and now I'm making something to do that for me.

Right now the program only simplifies arithmetical equation, but I'll get there.
>>
>>64127931
smaller = filter (<= x) list
bigger = filter (> x) list
otherwise, if your list has repeated elements you'll lose them.
>>
>>64127962
>It's a trade-off I'm willing to make if I'm not going for blazingly high speeds
It's not a "trade-off". Your quicksort isn't just slow. It's borderline-useless.
>>
>>64127870
There's a very strong non-technical, ideological footprint in the rust/mozilla community. This is why I find it hard to trust rust and the extraordinary claims its community make. It is a very self-righteous environment.

When one has a ideological commitment to something, they are much more inclined to gloss over the flaws of the very thing they are promoting.
>>
recommend me a programming book that is easy and hold hands ( beginner )
>>
>>64128467
Depends on what you're going for.
If you've never touched a programming language before, I recommend "Automate the Boring Stuff with Python"
More than anything, I've found that books with a lot of exercises in them help me learn the concepts presented pretty well, so I recommend checking the syllabuses (syllabi?) of several different university-level intro to programing courses and seeing what books they recommend.
>>
>>64128467
php pandas
>>
>>64128467
SICP
>>
>>64127748

anyone?
>>
>>64128546
Depends on what you're going for.
If you've never touched a programming language before, I recommend "Automate the Boring Stuff with Python"
More than anything, I've found that books with a lot of exercises in them help me learn the concepts presented pretty well, so I recommend checking the syllabuses (syllabi?) of several different university-level intro to programing courses and seeing what books they recommend.
>>
>>64128546
Make sure it's actually in debug mode. Run `adb devices` and see if it's listed correctly.
>>
>>64122992
rate my rock paper scissors /g/:
import Control.Monad
import Data.Maybe
import Data.Char
import System.Random

data RockPaperScissors = Rock | Paper | Scissors deriving (Show, Eq)

beats :: RockPaperScissors -> RockPaperScissors -> Bool
beats Rock Scissors = True
beats Paper Rock = True
beats Scissors Paper = True
beats a b = if a == b then
False
else
not $ beats b a

getRockPaperScissors :: IO (Maybe RockPaperScissors)
getRockPaperScissors = do
response <- getLine
case (map toLower response) of
"rock" -> return (Just Rock)
"paper" -> return (Just Paper)
"scissors" -> return (Just Scissors)
xs -> return Nothing

randomMove :: IO RockPaperScissors
randomMove = do
x <- (getStdRandom (randomR (1 :: Integer, 3 :: Integer)))
case x of
1 -> return Rock
2 -> return Paper
3 -> return Scissors

main :: IO ()
main = do
putStrLn "rock, paper, scissors? "
userMove <- getRockPaperScissors
case userMove of
Just user -> do
computerMove <- randomMove
if user == computerMove then
putStrLn "Tie!"
else if user `beats` computerMove then
putStrLn "You win!"
else putStrLn "You lose!"
Nothing -> putStrLn "Bad move! Auto-loss!"
>>
>>64128436
Well, how would you implement a "useful" quicksort? I can almost guarantee I can make it faster
>>
>>64128088
It's fine as is, people just need to stop being bitches when the compiler shits on their shitty code.
>>
>>64128088
I'd wait 2-3 years for all the fixes they already have planned to get merged into stable.
>>
>>64128589
overengineered, like everything in haskell.
>>
>>64128316
false. Haskell list comprehensions preserve both order and duplicate elements. although the notation borrows from set theory in which order and duplicates aren't allowed, this particular aspect didn't transfer.
*Main> [a | a <- [1, 2, 2, 1, 1]]
[1,2,2,1,1]
>>
File: takbir.jpg (16 KB, 306x410)
16 KB
16 KB JPG
>>64128690

Oh yeah? Name a better functional language
>>
>>64128728
JavaScript.
>>
>>64128728
>name a better pile of shit
>>
>>64128582

ok i did that and it recognizes my device. I got "Split APKs installed, Client not ready yet" still though
>>
>>64128728
Functional programming is bad by design. But Common Lisp is better.
>>
>>64128700
That's not the problem, look at his code.
>x < elem
>y > elem
>>
>>64128773
>Functional programming is bad by design

retard
>>
File: haskeller.png (89 KB, 627x114)
89 KB
89 KB PNG
>>64128589
haskell SUPER-AUTISTE here
mega tips for beginners

if you just derive Read then you can use readMaybe from Text.Read (though it'll instead be Rock, Paper, Scissors) or
str <- getLine
case reads str of
((x, _):_) -> ... success ...
_ -> ... no parse ...


further, if you derive Ord, and instead order them
Scissors | Paper | Rock
you can do

-- ties the whole thing around
Paper `beats` Rock = True
i `beats` j = i > j
(infix definition because it's more intuitive which is which - like a verb)

then, if you derive Enum, randomMove becomes
toEnum <$> getStdRandom (randomR (0, 2))

Finally I think there's some bullshit you could pull off with MaybeT IO and <|>, alternatively use the monad loops package and use untilJust
>>
>>64128856
by reverse i actually mean
Paper Scissors Rock
this way you get automatically
Paper < Scissors < Rock
and just have to write the special case
Rock `beats` Paper
>>
>>64128889
or Paper `beats` Rock rather
>>
>>64128823
no u
>>
>>64128728

F#
>>
http://www.strawpoll.me/11767105
>>
>>64128035
an auto-clickfraud client that goes through some popular website (maybe searching random dictionary terms in google?) and clicks every single advertisement to waste the pay-per-click advertisers' money
>>
Okay realistically what the fuck should I do to get a job? Do I just focus on Java and look for java jobs? Or try to get multiple languages or what? I graduated and have time now but I have no idea what I am doing to find a job. I'm just making shitty programs and posting it on my github is there something specifically I should do to find a job? I don't know who else to ask because I pretty much only talk to anyone on 4chan.
>>
File: uh oh.jpg (25 KB, 350x329)
25 KB
25 KB JPG
>>64128750
>JavaScript
>>
>>64128806
Oh, my bad
>>
Objects are just intuitionistic co-data, what's the problem?
>>
>>64129008
>I have no idea what I am doing to find a job
Are you actually applying for jobs? Sounds fucking obvious, but nobody owes you anything so if you don't apply then you won't get.

Also, make sure your application is well written, don't write obvious lies on it, do your homework before you go to interview so you can ask some intelligent questions (not just about the pay and conditions). When you actually go, make sure you're clean, dressed conventionally and not late.

Also, remember that it can take a lot of job applications to get an interview, and more to get hired. Don't give up if you get one or two rejections; they're not always your fault.
>>
>>64128589
>>64128856
import Control.Monad.Loops (untilJust)
import System.Random (randomRIO)
import Text.Read (readMaybe)

data RockPaperScissors = Paper | Scissors | Rock
deriving (Eq, Ord, Show, Read, Bounded, Enum)
Paper `beats` Rock = True
Rock `beats` Paper = False
i `beats` j = i > j

userMove, randomMove :: IO RockPaperScissors
randomMove = toEnum <$> randomRIO (0, 2)
userMove = untilJust (readMaybe <$> getLine)

randomRIO (a, b) = getStdRandom (randomR (a, b))
unfortunately this version using untilJust won't tell you you gave it the wrong input it'll just keep getting lines from the user until one parses
many this could be avoided by instead using MaybeT IO
>>
>they fell for the functional meme

#!/usr/bin/env python3
from random import randrange

possibleMoves = ['rock', 'paper', 'scissors']
winningMoves = {'rock': ['scissors'],
'paper': ['rock'],
'scissors': ['paper']}


def randomMove():
return possibleMoves[randrange(len(possibleMoves))]


def getWinner(userMove, computerMove):
if computerMove in winningMoves[userMove]:
print("You win")
elif userMove in winningMoves[computerMove]:
print("The computer wins")
else:
print("Tie")


while True:
userMove = input("rock, paper, scissors ('q' to exit)? ")
if userMove == 'q':
break
if userMove not in possibleMoves:
print("Try again, retard")
continue
computerMove = randomMove()
print("The computer plays: " + computerMove)
getWinner(userMove, computerMove)
>>
File: 1512198381455.jpg (165 KB, 992x746)
165 KB
165 KB JPG
>>64122992
Trying to learn how to suppress valgrind false positives and known bugs.

I've never been this close to the edge...
>>
>>64129179
Yeah I'm applying. Haven't gotten a lot of responses though. What kind of questions should I ask? I've had a couple of phone interviews but that's about it.
>>
>>64122992

I did a backtrace() function in js. The function adds the source code context to each call (5 lines).

The output looks like that:
https://p.sicp.me/aCiwa.js

A excerpt of the function:
https://p.sicp.me/bDGAQ.js

I do that for an irc bot. The bot reads the /g/dpt thread and post new comments to #/g/dpt on rizon.
>>
>>64129231
Again this doesn't have the error message when you give the wrong message but this was my adaptation of what he wrote

import Control.Monad.Loops (untilJust)
import System.Random (randomRIO)
import Text.Read (readMaybe)

data RockPaperScissors = Paper | Scissors | Rock
deriving (Eq, Ord, Show, Read, Bounded, Enum)

Paper `beats` Rock = True
Rock `beats` Paper = False
i `beats` j = i > j

userMove, randomMove :: IO RockPaperScissors
randomMove = toEnum <$> randomRIO (0, 2)
userMove = untilJust (readMaybe <$> getLine)

main :: IO ()
main = do
putStrLn "Rock, Paper or Scissors?"
[u,r] <- sequence [userMove, randomMove]
putStrLn ('>': show r)
putStrLn $
case () of
_ | u `beats` r -> "You win!"
| r `beats` u -> "You lose!"
| otherwise -> "It's a tie!"

It's shorter than yours (characters and lines), type safe (unlike yours) and in a compiled language
>>
>>64129248
I tried to suppress errors from sdl and opengl but gave up. No idea why it's so poorly documented or rather lacking simple example for this use case which I assume is common.
>>
>>64129328
And almost unreadable.

>type safe
Oh no what I'm going to do without the compiler babysitting my code!
>>
>>64128589
>3 :: Integer
>>
>>64129380
>And almost unreadable.
Maybe, if you're literally retarded.
>>
>>64129380
Sorry scriptkiddie but this is the daily programming thread

>unreadable
learn Haskell
>>
>>64124791
only visual studio
>>
>>64128631
>I can almost guarantee I can make it faster
That's irrelevant. Try using your Haskell sort to sort a billion elements and tell me how that works out for you.
>>
I've gotten a code test to do for a year placement.
One of the questions asks to sort an array. Should I use something like mergesort or do you think it'd be fine to just do insertionsort? What are they looking for?

C++ btw.
>>
>>64128523
>>64128519
thanks senpai i look into it.
>>
I'm outta projects. Anyone wanna help me destroy my programmer's block?
>>
>>64129516
std::sort(myVec.begin(), myVec.end())
>>
>>64129573
make game
>>
>>64129675
what sort of game? i've made loads anyway.
>>
maybe i should make a simple game in a language that i've barely touched.
>>
>>64129609
The elements aren't primary types, they're objects which you need to use methods on to compare.
Is there any way to do that using sort in C++, like with a comparator in Java?
>>
>>64129573
a cli, sound-only 4chan reader
>>
>>64129774
you should look at the docs for std::sort, anon
>>
>>64129774
The third argument to std::sort can be a function object like a lambda. It'll look somethng like this.
std::sort(myVec.begin(), myVec.end(), [](auto x, auto y){ return x.compareTo(y) < 0; });
>>
time to think of some sorta cli game, then
>>
Aw so cute

https://www.youtube.com/watch?v=-RbZBdM516Y

>yfw a loli is better at programming that half of you faggots here
>>
>>64129838
make a shitty roguelike
procedural generation is cool
>>
>>64129841
might as well just quit programming now because those lolies will take your job
>>
>>64129821
Thanks. What's the [] for in the third argument?
>>
>>64129880
how am i supposed to make a roguelike in a cli?
>>
File: 1513401045975.png (162 KB, 543x600)
162 KB
162 KB PNG
>>64129841
>she literally gets to BE a loli programmer
>>
>>64129908
That's the lambda syntax in sepples. You can tell that it's the syntax for anonymous functions because there's literally no reason for it to look like that at all.
>>64129930
>what is curses
>>
>>64129930
you can't make one that's cli but you can run entirely in the console/terminal
>>
tiEM tO BOot uP my YEAr olD uNIty thEN
>>
>>64129908
This is lambda syntax. It defines a nameless function inline. It's useful for introducing a function inside another statement that is immediately used as a function argument.
// A function object.anonymous function that takes two ints as arguments and returns an int.
// The return type can be omitted.
[](int x, int y) -> int { return x + y };
>>
>>64129841
>no indentation
>basic tier fake C shit (lmao'ing at your life)
>what is a folder structure
>clearly typing over some tutorial
>shit abstractions
>no adblocker

hahaha I bet she can't even install gentoo

>>64129936
>tfw you will never be a cute loli that learns how to program in preschool but rather some adult that spend his whole youth browsing the internet and playing games
>>
in AS whats the difference between

>run "app"
>run

>debug "app"
>debug
>>
In Python, how can I interrupt a running thread portably without relying on an external package?
>>
>>64129908
capture list
e.g.

int x
[x](int y) { return x + y; }
// capture x by value

[&x](int y) { x += y; return x; }
// capture x by reference
>>
>>64130043
from my python experience, i don't believe you can.
>>
>>64129328
>mfw I have to `cabal install random` to get random numbers in haskell
How can anyone defend this?
>>
>>64130066
wow... in the trash it goes, then.
>>
>>64129841 >>64129995 >>64129936 >>64129892
this is my waifu now, back off
>>
>>64130077
i thought it shipped with ghc, did you do a minimal install?

also you realise you can write your own random number generator right? it's just a stateful function
>>
HDF5 doesn't even build its fucking retarded h5cc compiler wrapper by default and I can't figure a way to make it build it and that's the thing CMake uses by default to figure out whether it can be found and they pretend it has good CMake support but it doesn't and I'm angry
>>
>>64130126
Just a `brew install ghc`.

The Haskell Docker image also does not have it installed by default. Something with cabal seems to be broken on my mac, because although random is allegedly installed, it is impossible to import System.Random.
>>
>>64130246
huh
does it work with packages or sandboxes
>>
hashtable or trie?
>>
>>64130304
what are you doing
>>
>>64129952
>>64129976
>>64130046
Thanks.
How can I pass objects in the vector to the function? Basically each object has a function foo() which returns a float. The sort function should sort the objects in ascending order based on the value of foo().
>>
>>64130322
asset manager
>>
>>64130356
you're not using strings are you?
>>
>>64130350
[](auto x, auto y) { return x.foo() < y.foo(); }
may be > or <= or >= i'm not sure
>>
>>64130350
std::sort(vec.begin(), vec.end() [](auto left, auto right)
{
return left.foo() < right.foo();
});
>>
>>64130402
as key for the items? Yes.
>>
>>64130304
Tries are underrated. "Free" sorting is a really nice bonus.
Too bad they're limited to strings.
>>
>>64130446
... you're not using strings elsewhere to refer to those assets though right? it's just for loading/scripting/logging?
>>
>>64130452
Eh, most of the time your keys are strings anyways. Tries should also work with integers, but the savings probably aren't as great.
>>
>>64130486
once the object is stored with string key it returns pointer to the resource.
>>
>>64130523
and gets rid of the string?
>>
>>64130529
>inb4 whoah that's super inefficient!
>>
>>64130545
>inefficient
it's pajeetcode
>>
>>64130545
>>64130556
literally the stuff i saw co-students doing in final year of undergrad and was like "what the fuck is this shit"
>>
>>64130418
>>64130425
vector<tstClass> sortList(vector<tstClass> vec)
{
sort(vec.begin(), vec.end());, [](tstClass obj1, tstClass obj2){return obj1.magnitude() < obj2.magnitude();});
return vec;
}

It's not compiling, I can't even tell what the errors are.
>>
>>64130529
well current system stores only the hash but that's vulnerable to collision, also having the key stored would let me see what items are actually in the store.
>>
>>64130556
>>64130572
It's more common than you think
>what is Python
>>
>>64130582
>;
>>
>>64130582
Uh, anon. The lambda needs to be a parameter to sort. Don't close it with ); before the lambda.
>>
>>64130585
but Python is for shitty programmers

>>64130584
what is wrong with just using an int?
e.g.

struct Material {
int textureId
float spec;
}

then when you load it in from a file that uses a string like "metalTexture" it fills in the id
this way it's like all your stuff is auto-hashed
the only problem is if you run out of ints
>>
>>64130642
or pointers as you said
>>
>>64130614
>>64130629
shit
thanks
>>
>>64124803

Help yourself first. Look up data structures. Think about how you could represent a hand of cards.

I'll give you a hint: you could use a Priority Queue or a sorted array. Those aren't gua ranted to be the correct answer, but the goal of this is to get you to think logically and break the problem down into small segments that you can solve individually
>>
>>64130518
>Tries should also work with integers
You can think of an integer as a string of bits.
I was thinking of strings in the more general CS sense, but I should have been explicit about that.
You could argue that ANY data can be thought of as a string of bits, and while true, it would usually lead to some pretty inefficient tries.
>>
>>64125064
Isn't a variable length array just an arraylist or a vector?

Or are you talking about magic arrays with n designated at runtime
>>
>>64130721
>You can think of an integer as a string of bits.
Yeah that's what I was thinking of, but specifically low-level types whose comparison identity is their bytes. Stuff that needs some kind of higher-level compare wouldn't work in general.
>>
>>64129248
>>64129355
It's probably as bad as with Allegro.
>common use case
Actually I think 90% of gamedevs won't do that kind of QA. Epic is to intelligent and Bethesda doesn't give a shit about crashing their game.
>>
>>64125838

Christ man don't do his homework for him

If he's not even willing to take the first steps to help himself or even think about it outside of "this won't copy paste" he shouldn't be programming.
>>
File: 091708487415.jpg (15 KB, 378x287)
15 KB
15 KB JPG
>Python teacher uses an anti-plagiarism software to scan our codes

Jesus. Even though he uses stack overflow snippets himself.
>>
>>64130733
VLAs are allocated on the stack and have a fixed size determined at run time.
>>
>>64130778
>>common use case
Well I think that many C programmers use SDL and at least try opengl. Sure most of them won't use valgrind but I would imagine that anybody that tries will google "valgrind suppress opengl"
>>
>>64130585
>what is Python
Close to shit. Or as Larry Wall once said Perl is only worse than Python [but only slightly] because the community wanted it worse.
>>
>>64127452

X-- != --x
>>
>good type systems are pointless, just use valgrind
>valgrind doesn't work
Oh no.
>>
>>64130848

Good type systems are not pointless. But if you use types systems that aren't dependent you're doing it wrong
>>
>>64130848
>valgrindr
>>
>>64130860
>if you use types systems that aren't dependent you're doing it wrong
when will you stop spreading your stupidity?
not every type system should have dependent types
>>
>>64130870
kek
>>
>>64130892
Why?
>>
>>64130892

Dependent types are the future, lad
>>
>>64130916
>>64130927
write a type system for a programming language in which types never explicitly appear
>>
>>64130965
You're almost 10 years too late, buddy, Liquid Types exist.
>>
>>64130985
>write a type system for a programming language in which types never explicitly appear
>>
>>64130965
Sounds like fun error messages.
>>
>>64130996
Liquid Types have complete type inference.
>>
>>64131005
In the source you idiot

>>64131011
Liquid Types also don't have constructions like
(x : Int) -> [fun x]
>>
>>64130806
does it strip variable names and instead checks if the structure is the same? if so that sucks

i mean there's only so many ways you can some basic homework assignment
>>
>>64131011
in fact you could say, that it's almost like liquid types have a particular definition and that they don't arbitrarily include things to ruin properties and meaningfulness
strange that isn't it? because obviously well-typed-ness means you take every type system and add pi-types, even if pi-types don't make sense, even if you don't even have functions
>>
>>64130806
that's the dumbest thing ever
he should be sacked
>>
>>64131065
I frankly have no idea, which is why I'm worried despite my work being original. Like you said, there's only so many ways to code basic homework, and many students probably end up with the same basic functions and shit because of this. It's just normal.

>>64131099
It really is.
>>
>>64131054
Yes it does, it just does less computation in types. Even annotation-less liquid types can verify equations like `x = y => f x = fy` or `f (g x) = (f . g) x`.

Besides, you can have type inference allowing you to write correct (while restricted) annotation-less programs even if the type system as a whole is more powerful, you just never infer higher-rank quantifiers.

>>64131083
What the fuck are you talking about?
>>
>>64130806
just write it yourself and dont copy paste from stack overflow.
>>
>>64131146
never mind it's beyond you
obviously fucking every type system should arbitrarily include dependent types for some fucking reason
>>
>>64131132
break up every function that should be one function into 3 functions
nobody else will do something that stupid, so it should be pretty unique
>>
>>64131054
>In the source you idiot
In the compiler? Hope your not somehow implying compiler devs time is valuable in the greater scheme of things.
In the program source code? Have auto-generic arrays, tuples, dictionaries and references, boom done.
Good luck with those error messages.
>>
>>64131161
You seem to think pi types are the only dependent types for some reason. You should fix that.
>>
>>64131186
Are you actually fucking stupid?
Yes, no annotations in the program source code.

y = 5
x = y + "test"
>error: couldn't match int with string
>in y + "test"
>where y :: Int

Oh wait I guess for some reason good error messages means dependent types? what the fuck?
>>
>>64130834
true but that wasn't relevant to anon's question
>>
>>64131214
>everything should have dependent types
is still a retarded fucking proposition
>>
>>64131254
I'm not convinced.
>>
>>64131264
What's the type system for a language without any values?
That's right, people who think it just has a single type, void, are retarded.
In fact, smart people like me and you know that really it needs a dependent type constructor!
>>
>>64131288
(or no types, an empty type system - still no dependent types)
>>
>>64131288
If you're using a type system where everything is void then you're doing it wrong.
>>
>>64131220
>Are you actually fucking stupid?
No, it's just you and the other one or more retard rambling non-aligned nonsense about dependent types and error messages.
Your shitpost about languages without types in the source code has apparently no connection to dependent types whatsoever, because the other fags shitpost about dependent types also seems to be disconnected somehow.
>>
>>64131312
You're so fucking stupid it actually hurts.
>>
>>64131323
If you went back to my post you'd realise it's a perfectly good example of a type system without dependent types.
>>
>>64131333
Read the original post again: >>64130860
>>
>>64131350
I know right, I just don't see any connection in you guys earlier shitposts.
>>64130927
and >>64130965
to be explicit
>>
New thread:

>>64131415
>>64131415
>>
>>64130793
Relax Anon. I just a gave him an outline for the program. Its not even compilable as is because of syntax errors in the code. Looking back over it there's even a conditional branch that shouldn't be in the for-loop. He still has to define the functions and do error checking on the inputs aside from correcting what I posted.
>>
>>64131399
>not every type system should have dependent types
>>why
>that post




Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

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.