Old /dpt/ at >>51748143
What are you working on?
First for for.
>>51755311
Visual based is the best programming language
>>51755333
First foreach.
>>51755311
>What are you working on?
My local to remote GPU RDMA benchmarking program.
>>51755311
op god
>>51755346
Man, I love foreach.
>>51755311
>What are you working on?
implemented Dijkstra's algorithm in Haskell
>>51755402
foreach around
>>51755311
Looking for a pdf version of HtDP to download, does anyone have it?
>>51755402
webfag confirmed
>>51755411
gay
>>51755508std::vector<int> container;
container.push_back(3);
container.push_back(2);
container.push_back(1);
for (auto& element : container)
{
std::cout << i << " ";
}
std::cout << "imblygin!" << std::endl;
>>51755517
What are you working on?
Why does bitcoin use disposable addresses? Why doesn't it just send funds directly to the recipient's public key?
>>51755535
Rewriting Haskell in Python
>>51755535
my hangover
and a virtual ant farm
while calling you gay on dpt and irc
>>51755540
A key is not an address, and your public key does not ensure privacy
>>51755555
cheggem.
>>51755555
>while calling you gay on dpt and irc
What channels do you frequent?
>>51755529
for (const auto& i : {3, 2, 1})
std::cout << i << ' ';
webfag confirmed
>holy shit yours wouldn't even compile
>>51755570
chegged
>>51755586
btw shouldn't pass ints by const reference, this was just pointing out you were passing them by non-const reference
>>51755586
>arrays and vectors are the same
webfag pls
>>51755576
##programming @ freenode
>>51755623
>preferring a vector to a literal
Ask your beloved programming literate anything.
>>51755654
Does P equal NP?
>>51755674
probably.
>>51755641
>pretending that arrays and vectors are the same
>tfw done with my first compsci course
Now I got time for SICP
>>51755722
>resizable array = vector
lel, c++ fags at their finest.
Can I learn C++ from only the web and still be good?
>>51755722
>putting the same words in someone's mouth twice
>>51755529
>element
>i
ask me how I know you're a jsfag
>>51755722
>thinking an braced initializer list is an array
>>51755749
well, what more would you need
>>51755626
>freenode
confirmed SJW faggot
rizon is where it's at big bois
>>51755802
>thinking it's not
>>51755822
I don't know, will programmers that learned at school look at me weird? will I even get hired?
>>51755841
>literally not knowing C++
>IRC
Keep the memes coming kids!
>>51755599
what the fuck
also
double chegged
>>51755867
i think it should be enough
>>51755879
>trying to weasel his way out of this
>denying that he is literally creating an array
>when the original example used a vector
>>51755918
>the original example didnt work
>the original example was shit anyway
>improved original example by replacing vector
>hurr durr why you change my webfag code to non webfag code
>still thinks a braced init list is an array
literal retard
>>51755837
>going to the biggest network out there means you are a SJW
mental retardation, the post.
>>51755885
>>IRC
>Keep the memes coming kids!
>kids!
yeah kid, gtfo
stupidos can't learn by themselves
>>51755508
>webfag
Most languages have it in some capacity.
>>51755955
Hey there big boy ;)
>>51755901
It's the furry /g/entooman
>>51755988
underage b&
>>51755954
I'm not that guy but inializer lists are just wrapped arrays so the faggot is half right
>>51756007
Your ability to recognize an obvious joke is pretty legendary. Unless this is a joke playing off a joke, in which case we're no longer on speaking terms.
I'm 26 for the record.
>>51755954
>improved
Nice autism
solved the 8th day of code adventfunc solveEighthDay() -> Int {
let input = getInput().componentsSeparatedByString("\n")
return input.map({($0.characters.count, ((
($0["\\\\\\\\"] ~= "~" // replace //
)["\\\\x.."] ~= "~" // replace escaped hexadecimal
)["\\\\."] ~= "~")) // replace escaped character
}).reduce(0) {$0 + ($1.0 - ($1.1.characters.count - 2))}
}
>>51756022
>vectors are just wrapped arrays on the heap
>>51756048
I was strictly referring to stack allocated arrays
>>51756040
>replacing webfag shit with non webfag non shit is autism
>push_back(3); push_back(2); push_back(1)
>>51756029
backpedal harder, enjoy your b&
>>51756046
/me projectile vomits
>>51756070
Will do. Enjoy wearing your mother's skirts!
>>51756066
And I was strictly referring to braced init lists
>>51755995
>>51755901
Pic related
>>51756069
>doesn't understand the example being that you can for-each any STL container
Absolute autism
>>51756071
Regex is pretty disgusting
>>51756110
holy shit, kek
>>51755749
Very few people manage to become decent at programming without going through a rigorous education, so I don't know, are you one of these special snowflakes? It will take you years and lots of effort, but it can be done.
>>51755749
If you want to purely be a basic code monkey, sure
>>51756069std::vector<int> container{3, 2, 1};
That's an initialization list for a container, you autistic sperglord. What you are doing is creating an int array.
>>51756110
>is a webfag
>thinks writing shit code to do a for each on a completely unnecessary STL container proves he isnt a webfag
>>51756091
which are defined by the standard to be deduced as std::initializer_list
>>51756170
Which strictly aren't arrays. I don't even think the standard guarantees a braced init list must be a contiguous array (it might though).
>>51756158
I'm saying the push_back() push_back() is fucking retarded. You could've done that, or you could've not used a container where it's completely fucking redundant.
>>51756162
>>thinks writing shit code to do a for each on a completely unnecessary STL container
>completely unnecessary STL container
>unnecessary
Like creating a expensive as hell std::initializer_list ???
GTFO webfag
my professor gave me a 50% on an assignment because i "used an array instead of an adjacency list" which is "unacceptable". and yet i did have an adjacency list, which was inside of an array of vertex structures, which was inside of a graph structure. guess what the directions say to do?
>>51756193
>Which strictly aren't arrays
they're just wrapped arrays, nothing else
>>51756193
>Which strictly aren't arrays.
No, they can be implemented as a linked list making it expensive as fuck.
>You could've done that, or you could've not used a container where it's completely fucking redundant.
The point was that you can use for each on any container, you huge fucking autistic piece of shit.
Anti-functional programming religious nutcases never fail to amuse me.
>>51756221
>they're just wrapped arrays, nothing else
They're not
>Initializer lists may be implemented as a pair of pointers or pointer and length. Copying a std::initializer_list does not copy the underlying objects.
>The underlying array is not guaranteed to exist after the lifetime of the original initializer list object has ended. The storage for std::initializer_list is unspecified (i.e. it could be automatic, temporary, or static read-only memory, depending on the situation).
>>51755341
right, and trump will be the best president
>>51756207
>initializer list on the stack
>expensive
>>51756221
strictly, they may well be implemented as arrays, but it's certainly not "creating an array" in the sense of an array variable.
>>51756224
How was that the fucking point? The fucking point was trying desperately to prove you aren't a webfag. You failed miserably.
>>51756254
You're supposed to say something that isn't true
>>51756258
See >>51756245
They may be implemented as a list of pointers, which is more expensive than just creating a vector.
If you weren't a webfag you would have read the standard and know this.
>>51756281
>webfag
See >>51756289
GTFO webfag
>>51755555
Quints of destiny have spoken.
>>51756245
>may
>the storage is unspecified
>>51756156
what is the difference between a code monkey and a skilled programmer?
>>51756213
you're probably just retarded. you think you're smarter than your professor? go fuck yourself
>>51756307
It's unspecified, meaning that it is an implementation detail.
This means that element lookup of an initalizer list may be O(n) (including costly memory lookups).
Vectors, on the other hand, are guaranteed O(1) lookup. In this case, traversal is O(n) any way, but initializer_list may mean two memory lookups instead of just one.
>>51756289
cpp reference
"__A braced-init-list is not an expression and therefore has no type__, e.g. decltype({1,2}) is ill-formed. Having no type implies that template type deduction cannot deduce a type that matches a braced-init-list, so given the declaration template<class T> void f(T); the expression f({1,2,3}) is ill-formed. A special exception is made for type deduction using the keyword auto , which deduces any braced-init-list as std::initializer_list"
"Also because braced-init-list has no type, special rules for overload resolution apply when it is used as an argument to an overloaded function call."
"for ( range_declaration : range_expression ) loop_statement"
"range_expression - any expression that represents a suitable sequence (either an array or an object for which begin and end member functions or free functions are defined, see below) __or__ a braced-init-list."
>>51756245
>Since C++14
>The underlying array is a temporary array, in which each element is copy-initialized (except that narrowing conversions are invalid) from the corresponding element of the original initializer list. The lifetime of the underlying array is the same as any other temporary object, except that initializing an initializer_list object from the array extends the lifetime of the array exactly like binding a reference to a temporary (with the same exceptions, such as for initializing a non-static class member). The underlying array may be allocated in read-only memory.
>>51755674
maybe
>>51756351
That does not contradict that it may be implemented as a linked list, mang.
>>51756355
found a reference in the std draft
>http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3797.pdf
>page 210 paragraph 5
>>51756311
Code monkeys do the drudgework and churn out thousands of lines of code each day, very much like workers in Chinese sweatshops are assembling iPads. Curiously enough, skilled programmers hardly ever do any actual programming but rather envision the software at large by writing design documents and class diagrams, that's why they are usually referred to as Software Architects or Software Engineers.
>>51755955
everyone on freenode is a pretentious asshole and/or a redditor
>>51756467
more relevant:
>An object of type initializer_list<E> provides access to __an array of objects__ of type const E.
>[ Note: A pair of pointers or a pointer plus a length would be obvious representations for initializer_list. initializer_list is used to implement initializer lists as specified in 8.5.4. Copying an initializer list does not copy the underlying elements. — end note ]
Pair of pointers/pointer+ length is literally telling you how the /array/ could be written.
>>51756497
>skilled programmers draw class diagrams
>software architects or software engineers
So far im working on this project:
https://github.com/MauricioTorre
>>51756511
>pair of pointerstemplate <typename E>
struct initializer_list_elem
{
E* elem;
initializer_list_elem* next;
};
>>51756548
I've already reported you to Github for offending my sensibilities.
>>51756550
are you retarded
>>51756110
>I think of it as more of a "sanctuary" than "battlestation"
Fucking lost
>>51756550
>>51756594
template <typename T>
struct initializer_list
{
T *_begin, *_end;
}
1) it's a wrapper for an array
2) that's an element. it says 2 pointers for the list.
3) it says as an alternative "a pointer and a length"
>>51756616
*const T
>>51756630const T* const
ITT: webfags and furries
>>51756521
Well where do you draw the line? You either have the wits or you're a monkey.
>>51756650
>/dpt/ has moved on from the minutiae of The C Standard to the minutiae of The C++ Standard
So this... is what progress feels like
>>51756650
you're right, i should commit harakiri immediately
>>51756550
Besides, nobody is retarded enough to actually use a linked list for anything.
>>51756745
Linked lists are literally better than arrays.
>>51755311 (OP)
I find myself writing scripts every so often but, almost every time its in a new language. Usually I'm reading wireshark outputs and making some sort of analysis script. But because I'm switching languages so often I don't think I have a good enough base in any single one. I find I have to lookup syntax and how to approach problems all the time.
>>51756767
>>51756745
NOT FUCKING AGAIN YOU SHITLORDS
>>51756506
and so are people in 4chan, even behind their anonymity. your point being...?
>>51756769
OP !w24LdKi0cI
>>51756683
I'm a noob webfag. rate my website pls: http://www.nask.co
(note: it doesn't need flash/JS to work)
>>51756798
Yes. The fire rises.
>>51756823
http://nask.co/hear/9X2ZQvxELM
I'm working on a PHP project with a database and I'm stuck on this stupid problem (it might be simple but I haven't worked with PHP in a while):
This is my folder structure:index.php
config.php
templates/
header.html
footer.html
...
library/
functions.php
crawl.php
parse.php
...
config.php contains database username, password, an array with IDs etc. and needs to be accessible for index.php and any of the files in library.
functions.php uses include_once to include all other files in that folder, so I only need to include functions.php to have access to all my functions.
What's the best way to include the config.php and how should I save the data within the config.php so I have access to its data from both root files as well as library files?
>>51756825
Fire, walk with me
>>51756844
rate my website pls: https://www.youtube.com
sorry i meant https://www.youtube.com/watch?v=dQw4w9WgXcQ
>>51755411
too edgy
std:: is pronounced "stud"
>>51756844
http://nask.co/hear/E4prud5wfm
>>51756877
it's pronounced std scope
>>51756877
if you're a sepples guy, then unique_ptr also called "unique puttr"
>>51756877
It's more like "stood"
>>51756922
*a mistake
what's wrong with using lists if you're using java and writing some desktop application for modern pcs, not 1995 toasters?
>>51756963
>what's wrong
>lists
>java
>modern pcs
>not 1995 toasters
nice great rod m8
>>51756877
I pronounce it as 'ass titdy'
>>51756984
if you're not using C why should I care about using a list that contains less than 100 elements?
I'm not making something complex like working on google databases.
I don't think most of us will ever get to work on something as complex.
>>51756877
study::grad_tier<>()
>>51757034
Because a vector or array is faster and provides random access.
>>51757049
even in your meme pictures, the diference is the same if the list size is less than 1k elements.
>oh no, my 3k gaming pc will use a few more kb
>>51757073
>memory
>not processor cycles
>wanting to limit access
array: a[4]
linked list: a.begin.next.next.next
>>51757133
.next
>>51757133
>machine cycles cost more than the ease of development
just get a newer PC you neet.
>>51757034
stay pleb
at least use an ArrayList, not a LinkedList
>>51757162
>he is too dumb to learn how to use arrays
>>51757162
>linked list
>ease of development
gr8b8m8(r88/8)itl8ond8w/k8(f8)bitir8(noh8)
>>51757162
Arrays are easier to use.
>>51757194
>>51757207
>>51757208
arrays can't be resized and I rather have some dynamic elements I can put and pop.
besides lists are easy to use.
I'm not making a google database application so my lists sizes are usually pretty small (less than 1k elements).
Also it comes out of the box in most standart libraries.
>>51757246
vectors can be resized
lists are not easier to use
vectors are out of the box in most standard libraries
>>51755311
The algorithmic language Valutron.
Valutron stands for Functional Programming Language Built on the Lambda Calculus with Object-Oriented Characteristics. It is a powerful programming language deriving primarily from Scheme (as defined by R6RS) and from ISO Lisp (from which it heavily borrows from iLOS, the ISO Lisp Object System). A very powerful object model is provided, as is a high-speed trace and sweep garbage collector.
This object model is one unique feature of Valutron. Another is V-expressions. These constitute an alternative syntax option which is algebraic in style.
>>51757264
But anon, you actually haven't completed anything
>>51757264
get a fucking trip code so we can filter you
are you tetsumi or someone else?
at least come up with something new before you post it again. this thread is mostly the same people posting over and over so most up of us have seen valutron a number of times already
>>51757246
>arrays can't be resized
Yes they can.
>besides lists are easy to use.
Nope.
For one thing they don't have random access, so that means many common algorithms and usage patterns aren't available (or only available at extreme cost, like n*n complexity)
But the main point is that they actually can have identical interfaces - as in the case of Java with ArrayList.
So why would you ever use a linked list?
>>51757271
I just did actually.
>>51757316
>arrays can be resized
get this madman out of here
vectors can be resized, arrays cannot.
you can make a new array that includes a part of the previous array (elements and/or memory)
>>51757316
why should I care about worse performance if I'm not making a C software and my lists use less than 500 elements?
I care more about having something that I can finish in 15 minutes than some autistic waste of time looking up maximum performance over smaller sets of elements that are pretty much irrelevant since modern pcs are so fast.
>>51757337
Arrays (i.e the data structure, not the C or C++ term) can be resized.
>>51757369
they're not real arrays
real arrays have immutable size
real arrays can exist on the stack
>>51757358
>I care more about having something that I can finish in 15 minutes
Then use an array, it's the simplest and most easy to use data structure.
>>51757375
>they're not real arrays
Yes they are.
>real arrays have immutable size
Nope.
>real arrays can exist on the stack
Completely irrelevant to the definition of an array (data structure), it's an implementation detail.
Also stacks can be resized.
>>51757381
Most of the time I don't know how big would be the size of the collection and I don't give a fuck about making new arrays if I need a bigger set.
>>51757404
>the stack
>stacks
>>51757413
>Most of the time I don't know how big would be the size of the collection
Arrays work just fine for that.
But you're also wrong, most of the time you DO know the maximum size (unbounded sizes are often pathological and something you wanna guard against anyway), and for a "15 minute project" it's probably not even big number.
>I don't give a fuck about making new arrays if I need a bigger set.
No need, just resize in-place.
>>51757424
Stacks is the plural form of stack.
>>51757482
https://en.wikipedia.org/wiki/Stack-based_memory_allocation
>>51757499
Read the first sentence.
>>51757465
List<faggot> you;
you = new List<faggot>();
void AddFaggot()
{
you.add(new faggot());
}
void KillFag(int index)
{
you.removeat(index);
}
That's all I need.
I don't need to care about autistic diferences between all the data structure flavours.
It works for me and have good performance since I'm using really small sets.
>>51757482
We're not talking about the data structure, we're talking about memory.
When you declare a variable, it is on the stack.
When you malloc memory, it is on the heap.
1st meeting of your first programming-related class should have taught you this.
>>51757508
Read any other sentence.
>>51757520
std::vector<faggot> you;
you.push_back(faggot());
you.erase(you.begin() + index);
hey guess what
you[5]
you[3]
you[arbitrary index]
not
you.begin.next.next.next.next
>>51757520
>you = new ArrayList<faggot>();
now it's an array, same code, and it will run better.
>>51757542
I'm using java.
>>51757558
why should I care?
what's the diference?
>>51757568
the difference that you care about (i.e. not the performance gain) is you can access an element by its index (random access) and not have to go through every previous element to do it
>>51757246
Use an ArrayList.
>>51757521
>When you declare a variable, it is on the stack.
>When you malloc memory, it is on the heap.
Implementation defined and not even true - global variables are not on the stack.
Might wanna actually learn what you're talking about before trying to come off like a smartass.
>>51757597
I was providing the most basic and watered down definition, because I felt that is what anon needed.
>>51757523
Why?
>>51757609
>I was providing the most basic and watered down definition
For what purpose?
Did you have a point?
>>51757542
Sure you buy yourself some syntactic sugar, but resizing vectors can take a lot of time while lists can grow in constant time, anytime! That's why the Linux kernel uses lists all over the place actually.
>>51757625
To clarify that we were talking about the stack, not stacks.
>>51757643
Stacks is just the plural form of stack.
Do you not understand basic English?
>>51757664
He's right, static variables don't go on the stack, which he obviously knew because he isn't baiting someone into falsely replying that they do.
>>51757626
>but resizing vectors can take a lot of time
No, they are amortized constant time (or logarithmic, which is the same as constant in practice).
>That's why the Linux kernel uses lists all over the place actually.
That's not the reason.
>neither RoboVM customers nor us, as the maintainers of RoboVM, have realized any benefits to sharing the products source under such liberal terms. While we are strong believers and supporters of OSS -- as evident from our contributions to various projects such as libGDX -- RoboVM’s continued development and longevity requires a competitive and healthy business.
Remind me again how I benefit from contributing to open source?
>>51756046
Does it handle the edge case?
>>51757707
Yes, that's what the ugly["\\\\\\\\"] ~= "~"is
I feel so empty when implementing data structures in C++ rather than C, because they're already in the C++ standard... Should I just implement them in C? I'm reading one of those data structures & algos books.
>>51757726
I'm not sure if we're talking about the same thing (hard to deduce from this mess) but I'm talking about this:
>"ubgxxcvnltzaucrzg\\xcez"
It's supposed to output ubgxxcvnltzaucrzg\xcez without translating \xce afterwards.
>>51757767
If you want to go around implementing bog-standard data structures and feel worth-while doing so, then yeah do it in C.
>>51757782
It doesn't matter what you replace it with, as long as it becomes a single character
>>51757829
That's the thing, you DO NOT replace \xce in THIS SPECIFIC case, and it has to remain 3 characters, otherwise it won't pass.
>>51757832
Don't care enough, I wanted to catch up.
>>51757849
I passed the problem all the same
/* This test uses Chapel's data parallel features to create a
2 * parallel hello world program that utilizes multiple cores on a
3 * single locale (node)
4 */
5
6
7 //
8 // This configuration constant indicates the number of messages to
9 // print out. The default can be overridden on the command-line
10 // (e.g., --numMessages=1000000)
11 //
12 config const numMessages = 100;
13
14 //
15 // Here, we use a data parallel forall loop to iterate over a range
16 // representing the number of messages to print. In a forall loop,
17 // the number of tasks used to implement the parallelism is determined
18 // by the implementation of the thing driving the iteration -- in this
19 // case, the range. See $CHPL_HOME/doc/README.executing (controlling
20 // degree of data parallelism) for more information about controlling
21 // this number of tasks.
22 //
23 // Because the messages are printed within a parallel loop, they may
24 // be displayed in any order. The writeln() procedure protects
25 // against finer-grained interleaving of the messages themselves.
26 //
27 forall msg in 1..numMessages do
28 writeln("Hello, world! (from iteration ", msg, " of ", numMessages, ")");
>>51757874
>parallelised hello worldE N T E R P R I S E
N N N
T T T
E E E
R R R
P P P
R R R
I I I
S S S
E N T E R P R I S E
I'm seeing lot of anons taking clojure. I started it. Looks great.
why does it seem like everyone knows about programming these days. even just last year, you'd only see the subject confined to /g/ and only within /dpt/. now every thread on /g/ is some idiot asking which language they should choose. and sometimes there's a post mentioning programming on other boards.
I want to make a CDN for my own website. anyone knows a good platform for distributed file storage, and/or a guide on how to deal with this shit?
>>51758114
people are asking what language to choose because they're realizing that it's a great field to get into right now.
i guarantee you that 99% of the people asking will never follow through though, or they'll learn the absolute basics and then give up when it gets a little bit difficult.
>>51758114
if you're a man and can't program, you're a retard
>>51758114
most people know *of* programming. Most can't do it for shit.
>>51758114
The part of the board we had in the past that liked the talk about videocards that were being released and new CPUs and stuff is no longer large. People interested in technology are far more likely to get in to programming than any of the other angles to approach the field from.
That and just the general seemingly infinite demand and possibilities in the field.
When we had the first dpts on /g/ they were sometimes multi day threads and every now and then we would go for a time without a thread since nobody could be bothered to create one. The population of /g/ has changed quite a bit.
>>51758114
>Why are people talking about programming on the technology board?
I started reading a book about Java
Some of you people seem to dislike Java. What makes C++ or some other language superior then?
>>51757689
> No, they are amortized constant time (or logarithmic, which is the same as constant in practice).
Append to vector is required to be amortized constant time. Whether that's equivalent to actual constant time depends upon your requirements. If you just care about overall throughput, they're equivalent. If you're writing real-time code where the resize operation will screw you, they're not (but then your list needs hard O(1) allocation, which isn't trivial).
In most cases, you wouldn't choose list over vector because of amortized O(1) versus actual O(1) for the append time. If you (legitimately) choose list, it's almost always because of O(1) versus O(n) insertion.
If you don't need O(1) insertion, you'd use vector. Better constant factor for iteration and O(1) indexing rather than O(n).
>>51758216
hating java is a meme
it can't be used for kernel or driver development, but it's a relatively fast and robust language. easy to get a job in since every major corporation uses it.
>>51758215
reading comprehension is clearly not your forte, my foolish friend
>>51758278
>why does it seem like everyone knows about programming these days
Why is valgrind reporting that strlen is acting on unterminated char arrays?
I don't even have string.h loaded.
>>51758268
No point in using it over C#, except for jobs.
>>51758268
> it can't be used for kernel or driver development,
And what's more: C# is virtually the same but just.. better - especially now that it's all being open-sourced and multiplatformified
>>51756745(cons are (cons you (cons faggot (cons a (cons huge nil)))))
that's a syntax tree btw
>>51758132
anyone? should I ask wdg?
>>51755311
right now i am writing pseudo code to define the thought process of an AI.
I am basing it on human thought process of conditioned response to stimuli. Self preservation being the foremost instinct that drives human behavior, and a reward process that motivates the AI to perform certain tasks.
>>51758339
>except for jobs
Well that is a pretty valid point then, if you ask me.
>>51758406
What do you need distributed file storage for? You can use almost any cloud computing platform for that shit.
>>51758412
what is the end game here? game? sentient robots?
>>51758437
I didn't say it wasn't. But the language on it's own terms, is not that good compared to others that exist. That's why almost everyone hates Java.
>>51758308
you can stop proving to us that your reading comprehension is poor now. we get it, you're dumb
>>51758446
I want to create something that can truly evolve in real time, instead of waiting billions of years.
>>51758477
so neural networks?
Are Rust/Go programmers employable? I need a break from C#.
>>51758319
Maybe some library function is using strlen()?
>>51758571
HAHA
no.
Well, you might have some luck with Go if you're good and look hard.
Try F#. Literally the best language. Good chance you can sneak it in in some C# shops, and as a bonus become unfireable if no one else knows F#.
Every mediocre kid with a book could start programming in less than one month. programming could become an oversaturated field. how does this make you feel?
>>51758605
There will be plenty of work that needs to be done quickly and plenty of work to rewrite the work done quickly.
>>51758442
media files: mp3, ogg, mp4, webm
I have some credit for cheap VPSs in digitalocean (don't have money for anything else), I need some advice on how to do it, the problems that I might have and so on.
I made this website so I could learn, at least the basics...
>>51758605
I'll still have good work because I'm actually good. Just because you know how to code doesn't mean you're not shit.
>>51758605
every mediocre kid could start learning math and become an engineer in less than one month, engineering could become an oversaturated field
>>51758647
i mean why not use a single server. Are you planning on storing so much stuff to need distributed storage?
>>51758639
>>51758649
>>51758654
nice try NSA shills. i know you guys have been trying to get more programmers in the US to counter chinese hackers but don't be so obvious about it
>>51758605
Couldn't give less of a shit. I actually enjoy programming, which inherently puts me above 99% of every mediocre kid. Plus programming is easy to learn, but it's hard to master. Most get discouraged when they realize how hard it is to program useful shit outside of codecademy.
While the job market might become saturated with "programmers", I can never see it becoming saturated with "good programmers" or even "not terrible programmers".
>>51758268
>it can't be used for kernel or driver development
It absolutely fucking can, they were fucking using it for fighter jets.
>>51758695
this. There's been a shortage of programmers consistently since the 80's, even though there's tonnes of jobless CS graduates. Turns out companies only want to pay you a salary if you're good.
>>51758695
the industry today doesn't need the best of the best. it only needs the people to get the job done. how does this make you feel?
>>51758605
see >>51758141
>>51758660
well, right now my website isn't using much storage, but I want to make my website popular... videos, and sometimes the audios too, generally use a lot of space, so that's why
>>51758702
I don't think you know what a kernel is anon.
>>51758730
You realize embedded java chips enable you write bootloaders in java let alone kernels right?
making testing C scripts for my undergraduate students in intro to C
memleak.c
#include <stdio.h>
#include <stdlib.h>
void leak(void);
main() {
int i;
for (i=0; i<10000; i++) {
leak();
}
}
void leak(void) {
int *a;
a=(int *)malloc(1000*sizeof(int));
if (a==NULL) {
printf("Failed to allocate memory\n");
exit(1);
}
/* This is a memory leak unless I free a */
free(a);
return;
}
______________________________
maxmem.c
#include <stdio.h>
#include <stdlib.h>
main() {
int *array;
long n=1000;
while (1) {
array=(int*)malloc(n*sizeof(int));
if (array==NULL) {
printf("Failed to allocate %ld ints\n",n);
exit(1); }
printf("Successfully allocated %ld ints\n",n);
free(array);
n*=10;
}
}
_________________________
Does anyone have any memory allocation or memchecker scripts I can discuss for their final labs? Also pic is their final, r8 please. It's meant to be a fun final
>>51755654
sauce ?
>>51758719
>>51758660
crap, I'm retarded and didn't actually repond to the question... I want to use these VPSs both as storage and for file processing. plus digitalocean VPSs don't give you twice the disk space when you pay twice the price... so I'll be using many servers
>>51758718
>it only needs the people to get the job done.
and very few are good enough to do that. Software projects have very high failure rates compared to other industries. It's worth paying a lot of money for someone good who won't fuck things up, then paying for 10 mediocre programmers who produce slow, bugger, unimaginable garbage that they just have to hire much better programmers to clean up the shit they took later anyways.
>>51758364
>tree
>linked list
pick one
>>51758752
use something like Azure storage, which just abstracts the whole concept of file storage for you.
>>51758746
You might as well skip the whole text and just write "make this pseudocode into C code"
>>51758755
You don't do either of those things exclusively. You hire a few pretty good dudes and some mediocre programmers that more or less can be replaced without too much difficulty (obviously still harder than hiring for a fry cook position). Ideally they all get along and stick around and the general skill level rises and they go back and refactor their shit.
People that come in and try to tear everything apart because they think it sucks are usually full of shit. Usually they think it sucks because they can't imagine more than one way of solving the problem and doing it any other way means it sucks.
But of course all of medical records software pretty much sucks, so you've got that point on your side.
>>51758718
I have bash scripts that write more/better code than some of the people I've worked with. If you want to talk in terms of how many jobs you can put on my desk and have finished by the end of the day, I'm a pretty good investment.
You could start teaching programming as part of the core curriculum worldwide, and I wouldn't be worried about my job security.
>>51758776
I don't have money for that shit, and since I live outside the US, I probably won't even get anything for free. also, as I said, I want to use them for two things at once.
(I'm a NEET... I'm trying to become a non-NEET, or a rich NEET, whatever comes first (: )
>>51758811
Can't help it, I was an undergraduate molecular biology major lol, I like explaining concepts eagerly and basically fluffing documents
>>51758847
Then how can you afford Digital Ocean shit
>>51758847
Ethan is that you?
>>51758864
free credit from https://education.github.com/pack + $5 in paypal
I actually have > $100 in credit for amazon... but I don't have a credit card, so I can't use it.
btw, I can suggest that, for example, if you want your own website for free, you can use openshift.
I'm poor, so I've had to find ways to get stuff for free...
>>51758926
no
>>51755311
Learning about Big-O, Big-Ω, and Big-θ
>>51758960
You're a Big Ï•
>>51758993
http://www.nask.co/see/VqaXIQRIM4
>>51758993
that's not very nice
>>51758862
Then how are your students supposed to learn anything.
oh wait nevermind, this is uni, you're not supposed to learn anything lol
>>51758956
I've found that the easiest way to get something for free is to 'work' for a few hours at a 'job', and they give you this 'money' stuff that you can exchange for goods and services.
Hey guys, faggot with 0 programming knowledge here. How hard would it be to make a stable mobile app with some menus?
I plan into making an app about birdwatching with some menu, a "seen" feature and support for two languages.
Where should I start or which software is better for this endeavour? I plan to make it for Android and just for fun.
>>51758812
>mediocre programmers that more or less can be replaced without too much difficulty
It depends on what kind of code you're writing. If you're talking web developers, then maybe, but if you're talking embedded systems or the like, then you might have some difficulty hiring.
My team has apparently been looking for decent developers since long before I started working there. I got hired as a compromise, since I'm a decent developer, but I knew very little about embedded systems at the time and was willing to learn.
>People that come in and try to tear everything apart because they think it sucks are usually full of shit.
I agree with you on this though. I've been brought on for projects with the shittiest code bases, and as depressing as it may be, if it works it works, and the most I'll do is refactor the parts that are actively getting in my way. I'll sometimes make the case for refactoring if I think paying developers to fix it will make it's own money back, but usually those numbers don't work out.
>>51759006
Was O((n^2)!) a part of your plan?
>>51759048
O-course!
>>51759025
>intro to C
>learning
you crack me up m8
>>51759038
https://play.google.com/store/apps/details?id=org.kidinov.awd&hl=en
and use guides for each of the language and formats mentioned, literally 88% of the work is done usually around stackoverflow
>>51759038
Use java, everyone hates Android Studio but that's probably your best bet for something simple.
>>51759027
but then you have to find 'clients', hope they like your 'work' and pray that you aren't being 'scammed'. and since you are a 'foreigner', they will pay peanuts for your 'work'
meanwhile, I could be 'working' on my own 'webapp', making 'desktop'/'mobile' 'apps' for it and attracting 'users' to it. and if it 'fails', at least I'll have some 'experience' and 'knowledge' IRL
>>51759102
>implying
>>51759084
>>51759094
Thank you very much.
>>51759084
>https://play.google.com/store/apps/details?id=org.kidinov.awd&hl=en
He wants to make the app run on Android; he doesn't want to make the app ON Andriod, lol
How hard would it be to write an android app in a language that's not Java?
>>51759102
I found this 'company' that values my particular set of 'skills'.
>>51759038
There are a lot of tutorials online to easily make a bare android app. The difficulty for your projects might be setting up a database for your bird pictures, maintaining a server for this and making the application remember which you've seen and another difficulty will be the support for two languages as you wouldn't be able to just put the texts in the code but make the code refer to specific document based on the language setting.
>>51759121
whatever its better anyways to use thumbs
>>51759124
>google.com
>>51759124
Depends on how much you need native performance. If you don't need it, then it's piss easy. Just use something like Meteor or Cordova that lets you use web technology to write apps. If you need to optimize performance, then your options are basically just Java.
>>51759124
Super easy, if you're using C#.
If you use Xamarin, you can deploy to iOS and WinPhone, too.
Or just use C#/Unity and have it literally compatible with all major OSs.
>>51759038
fukken stole it.
thanks mate I'll send you a thank you on your mail ;)
>>51759171
>using ideas from 4chan for profiting
>>51759170
Xamarin is actually efficient for windows phone? it's not 2009 anymore????
>>51759135
I live in this 'country' that values 'workers' as much as 'slaves'. I think that being 'self-employed' is much better than the 'alternatives', even more since, while I don't have demonstrable 'experience', I'm not retarded
>>51759124
use Haxe, it makes things so much easier... that is, if you don't find bugs.
>>51759216
They made a big deal out of this on the Visual Studio 2015 launch conference thing how lovely it is to work with.
Solved the 2nd part of adventofcode day 8:print sum(2+i.count('\\')+i.count('"') for i in open("Advent8.txt"))
;)
>>51759223
>a lot of demonstrable 'experience' or 'knowledge'
FTFM...
I need a way to pass arbitrary number of const references to a function in C++.
I can't pass them by value, because the objects being passed are non-copyable resources.
Which means i can't use std::initializer_list.
Something like this:#include <iostream>
using namespace std;
void foo(const int&... list) {
for(const int& obj : list) cout << obj << endl;
}
int main() {
int a, b, c, d;
foo(a);
foo(a, b);
foo(a, c, b, d);
}
>>51759271
template <typename ... T>
void foo (const T&... obj);
Guys, what semi complex project that is vaguely related to maths should I write? Language : c++
>>51759312
I don't like it because you can't put implementation in cpp file.
I have a huge header file that needs to be included for the implementation to work.
C++17 modules will solve this though hopefully.
Is there a static_assert to check if T is certain type?
>>51756850
bump?
>>51759489
I think static_assert(typename std::is_same<T, some_type>::value)...;
not sure
You could try an initializer list of std::reference_wrapper, or make your own reference wrapper, or use pointers.
>>51759461
draw 3d graphs using a 2d graphics library
:^)
bonus: allow user to move the camera
>>51759654
>using a 2d graphics libary
aren't all graphics libraries 2d?
oh, forgot about 3d monitors
A lot of my projects recently have required audio transcoding. I dislike executing the ffmpeg/avconv command-line tools from programs that aren't shell scripts, but the documentation for libav* is really pretty terrible, just auto-generated Doxygen stuff. Partly to make a better audio library for my own use, and partly to learn a little more about audio coding, I want to make a library that's similar to libav* but focused on audio only (wrapping various codec and container libraries like libflac, libopus, liboggz, libmp3lame, etc). I know it's a stupid idea but I want to give it a shot.
>>51755749
absolutely, but don't forget to learn about data structures as well :}
>>51759715-pedantic
>>51758842
>>51756254
and mcdonalds is the best restaurant
public class yolo {
public static void main(String[] args){
String yolo = "()()(()()()(()()((()((()))((()((((()()((((()))()((((())(((((((()(((((((((()(((())(()()(()((()()(()(())((()(())(()(()(()(()";
int i = 0;
int count = 0;
for (i = 0; i < yolo.length(); i++){
char c = yolo.charAt(i);
if (String.valueOf(c) == ")"){
count = count - 1;
}else if (String.valueOf(c)== "("){
count = count + 1;
}else{
System.out.println(c);
}
}
System.out.println(count);
}
}
why doesnt this work?
its the advent of code day 1 challenge.
im new to java...
>>51759750
Make it a Rust project
>>51759819
I didn't know Java was a lisp
>>51759750
That is indeed a stupid idea. There is a lot of magic happening to supply a generic implementation for all the codecs.
>>51759832
what?
wrong syntax/retarded shit?
>>51759750
From what I've seen from ffmpeg/avconv/libav* and my own experience with audio codecs, there will be a general notion of container formats, like Ogg and Matroska, and codecs, like FLAC and MP3. Some codecs will include their own "container" format, like MP3. The audio interface will usually be 16-bit PCM, but some codecs support >16-bit PCM, so the sample resolution should be configurable where appropriate.
>>51759836
Oh, I'm well aware. I'm familiar enough with a few codecs and formats to imagine I'll be able to at least support them (specifically, both FLAC and Opus, which both use the Ogg format and have a roughly similar architecture outside of the actual frame decoding). I'm sure it won't get much further beyond that, but I'm going to give it a shot as a sort of long-term pet project.
The Xiph formats have really good documentation, luckily.
>>51759825
I was actually thinking about this, but I'm not familiar with Rust yet outside of toy programs and I think learning it at the same time would be a headache.
>>51759819
Should've done python lad. inb4 memedprint sum(i.count("(")-i.count(")") for i in open("Advent1.txt"))
If you should be an overall good dev, then why everyone expects 10 years in one technology?
>>51759757
Could you explain why that is important? What would happen if you didn't learn data structures very well?
>>51759957
Because they can.
Because job postings don't actually reflect what kind of person they will hire - only what they want to hire.
Because HR wrote it.
>>51759957
Realistically, you should divide the number of expected years by 2.5, and have a good portfolio to back it up, and be learning 10 technologies at once in order to get a really high-end job
>>51759973
You'll end up writing shitty and inefficient programs if you don't.
>>51757246
https://www.youtube.com/watch?v=YQs6IC-vgmo
now stop being retarded
I'm going through project euler and i'm on problem 11 right now, and that involves iterating through a 20x20 grid diagonally to find the highest product. I've never worked with a grid in mind before though so how could I do that?
Should I write an interpreter or a compiler for a custom language in C++
new thread when ? :3
>>51760359
Never.
>>51760368
please make one :33
NEW THREAD
>>51760395
>>51755311
Python chat. Server + client with gui. Challenge is as small as possible. Going pretty well : P