[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Free Show | Home]

/dpt/ - Daily Programming Thread

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 323
Thread images: 23

File: Untitled-1.png (135KB, 1418x461px) Image search: [Google]
Untitled-1.png
135KB, 1418x461px
/dpt/ - Daily Programming Thread
Non-weebshit, pajeet, gay mods or trapfaggot edition.
What're you working on, /g/?
Previous: >>57045625
>>
>>57050025
>Spreading your stupid agenda in the OP
Delete this shit and kill yourself.
>>
>>57050053
>muh animu
>>
I'm reading a book on operating systems, then I want to make an operating system using Rust.
>>
>>57050064
which book anon
>>
>>57050025
What's this language?
>>
>>57050069
Pajeet++.
>>
>>57050029

You're welcome.
>>
why haven't indians made their own programming language
>>
>>57050025
Webshit gay mod trap faggot pajeet here. If I learn C, will it make me a better programmer?
>>
Any feedback on the design?
http://nanoboard.ga/
>>
>>57050104
someone already made java for them
>>
>>57050068
Modern Operating Systems (Tanenbaum)
>>
>>57050130
doesn't work in palememe
could hurt adoption in /dpt/, kek
>>
>>57050201
>Pale moon
What the hell? Are there actually people that use that shit?
>>
>>57050126
No, it will make C worse.
>>
File: Screenshot_2016-10-13_01-34-16.png (75KB, 1366x768px) Image search: [Google]
Screenshot_2016-10-13_01-34-16.png
75KB, 1366x768px
>>57050201
Basically looks like pic related. There is no tracking scripts nor bloating, so you can simply turn on js to be honest
>>
>>57050279
Hate the reddit style of handling comments. Even the fact that they are called comments and not replies, or posts even.
>>
>>57050314
Well, didn't realize I liked "replies" better. I'll change that.

>Reddit style
Reddit wasn't the first to use tree-style threads. Still I don't think that's the reason why Reddit sucks
>>
>>57050347
>Reddit wasn't the first to use
Never said it was. Doesn't change anything i said.
>>
File: chiyuki_back.jpg (79KB, 1920x1080px) Image search: [Google]
chiyuki_back.jpg
79KB, 1920x1080px
Anyone know where I can get oracle ebooks? Especially the dba side of things? Looking for some good books by Thomas Kyte and Jonathan Lewis I think. I have already checked the gentoomen library though thats the version I downloaded a year or more ago and should check for updates.

Cant find them on tpd and dont know which kick ass sites are trustworthy. Not that this search would likely trigger attention.

Anyone recommend a ebook torrent site?
>>
>>57050276
Well what the fuck, how do I get better?
>>
>>57050378
Are you able to describe why you hate it? Posts (a.k.a nodes) are sorted from new to old, so it gives more visibility to recent posts and it's easier to understand from an hierarchical point of view

I'm also planning to add an interactive map for browsing each roots. :^)
>>
>>57050409
i see stuff on libgen
look there
>>
>>57050430
Not him, but on 4chan, you see every post posted. On reddit, a lot of good content is buried because the masses upvote what they think is good
>>
File: comfy.jpg (114KB, 600x645px) Image search: [Google]
comfy.jpg
114KB, 600x645px
first for comfymeg
>>
>>57050426
Shit in a new street. A street with smarter people.
>>
>>57050437
There is no upvotes nor downvotes, new to old it is.
>>
>>57050025
def generate(range = 1..100, factors = [[3, 'Fizz'], [5, 'Buzz']])
code = []
code << "(#{range}).each do |i|"
code << " case"
factors.powerset.reverse.each do |arr|
n = arr.map(&:first).reduce(&:*)
str = arr.map(&:second).reduce(&:+)
code << " when i.modulo(#{n}).zero?"
code << " puts '#{str}'"
end
code << " else"
code << " puts i"
code << " end"
code << "end"
code.join("\n")
end

class Array
def powerset
1.upto(size).flat_map{ |k| combination(k).to_a }
end

def second
self[1]
end
end

eval(generate)


>rate my autism /g/
>>
>tfw PHP dev
W-w-will I get mocked here?
>>
>>57050459
I thought you were talking specifically about Reddit, and not yours. What's the URL for that?
>>
>>57050436

For some reason I got nothing from the main site but hits through mirrors and proxies thank you.
>>
>>57050468
 >++++++++++[<++++++++++>-]<[>+>[-]>++++++++++[<++++++++++>-]<+<<[->>->+<<<]>>>
[-<<<+>>>]<>>+++<<[->+>-[>+>>]>[+[-<+>]>+>>]<<<<<<]>[-<+>]+>[-]>[<<->>[-]]>[-]
<<<[[-]++++++++++[>++++++++++<-]>++.+++.[-]<[-]+++++++++++[>+++++++++++<-]>+..
[-]<[-]<<[-]>>]<>>+++++<<[->+>-[>+>>]>[+[-<+>]>+>>]<<<<<<]>[-<+>]+>[-]>[<<->>[
-]]>[-]<<<[[-]+++++++++[>+++++++++++<-]>-.[-]<[-]+++++++++[>+++++++++++++<-]>.
+++++..[-]<[-]<<[-]>>]<<[[-]>>++++++++++<[->-[>+>>]>[+[-<+>]>+>>]<<<<<]>[-]>>[
>++++++++[<++++++>-]<.[-]]<>++++++++[<++++++>-]<.[-]<<<]>[-]++++++++++.[-]<[-]
<-]
>>
>>57050477
For what? The map? It's not implemented yet but basically you'll be able to answer nodes from any depth so discussions can keep going for ever

That's the true goal of the project, testing stuff
>>
>>57050502
A[I]←1+I←(0⍷A)/⍳⍴A←('FIZZBUZZ' 'FIZZ’ 'BUZZ' 0)[2⊥¨×(⊂3 5)|¨1+⍳100]
>>
Is it too late to start at 23? Will i never be top tier?
>>
>>57050528
DATA: l_mod3 TYPE i,
l_mod5 TYPE i.

DO 100 TIMES.
l_mod3 = sy-index MOD 3.
l_mod5 = sy-index MOD 5.

IF l_mod3 = 0 AND l_mod5 = 0.
WRITE : / 'FizzBuzz'.
CONTINUE.
ENDIF.

IF l_mod3 = 0.
WRITE : / 'Fizz'.
CONTINUE.
ENDIF.

IF l_mod5 = 0.
WRITE : / 'Buzz'.
CONTINUE.
ENDIF.

WRITE : / sy-index.
ENDDO.
>>
File: 1476253647307.png (767KB, 700x700px) Image search: [Google]
1476253647307.png
767KB, 700x700px
>>57050449
I come here for help and all I get is trolling. What have you done? How could you do this to me?
>>
/dpt/ I'm having trouble looking for a coding job and could use some advice. all these places i'm applying to want experience with AWS, Redis, MySQL or Postgress or MongoDB, hadoop, rabbitmq, and a bunch of other things I have no experience using. How the fuck am I supposed to find something with all these demands?
>>
>>57050563
>I come here for help and all I get is trolling
Coming to anywhere on 4chan for help probably wasn't the best idea.
>>
>>57050566
Learn them and make something on your own. It shows initiative and builds experience. If you're talented you may make something people like and be able to sell/make money off that.
>>
>>57050556
: .fizzbuzz ( n -- )
0 pad c!
dup 3 mod 0= if s" Fizz" pad place then
dup 5 mod 0= if s" Buzz" pad +place then
pad c@ if drop pad count type else . then ;

: zz ( n -- )
1+ 1 do i .fizzbuzz cr loop ;
100 zz
>>
>>57050566
Have you ever studied mySQL? Just out of curiosity friend.
>>
Working on a comers xinu approaches questions hobby os and bootloader
>>
>>57050563

What work are you doing? Yes a good study of C will help but where will you get it? That matters. If you dont know python learn it its everywhere and spreading. Then learn enough pearl and lua to read the old fags work they left behind. After that if you have the languages you need to work maybe look at C and do some of the free computer science courses available on websites now. You can get those in python by the way study data objects and shit.
>>
>>57050593
  (defun fizz-buzz ()
(interactive)
(with-output-to-temp-buffer "*fizz-buzz*"
(dotimes (i 100)
(cond ((and (eq 0 (% i 3)) (eq 0 (% i 5))) (princ "FizzBuzz"))
((eq 0 (% i 3)) (princ "Fizz"))
((eq 0 (% i 5)) (princ "Buzz"))
(t (princ i)))
(princ "\n"))))

>>
>>57050579
Why not, you seem like good guys
>>
>>57050430
The hierarchical tree structure may not necessarily be that bad, but i hate how you have to click the teeny tiny comment button to enter the thread. I just want to click anywhere on the post.
And you get no sense for the discussion going on in a thread when all you get is the op, or worse only the heading, when casually scrolling past.
It makes me feel as if participating in any thread is discouraged.
>>
>>57050596
I have, and I've used it a bit honestly, it's just something I haven't had much experience using

the whole thing is complicated because many of the skills I know I haven't used in a job.
>>
>>57050624
>seem like good guys
Exactly like the worst villains
>>
Does there exist a method of ripping from pdf and producing epub or some other text format? This seems very useful as I read on e-ink and hate fucking with pdfs on it.
>>
>>57050616
Well my school is making me learn Java and before that I had to learn Visual Basic skills I feel like I should be learning C because everyone talks about how good it is. I don't want to be pajeet-tier, I want to be actually really good at what I do.
>>
>>57050563
In that case you need to ask better questions, and not impossible to answer generalities that only invite platitudes and shitposting.
>>
>>57050661

Dont touch C until you are productive with the languages you are learning. Youll end up burred. Learn C after you are already on your feet. Aim for pajeet tier before you ascend past it.

One must pass through the clouds to reach the sky.
>>
Anyone have that image with all the programming books that says own/read under them?
>>
>>57050676
I learned C as my first real programming language.
It's not unfriendly to beginners, it just doesn't hold your hand.

>>57050690
No. A collared shirt and jeans.
>>
>>57050639
I know this feeling and I'm taking this into account. I'm assuming sorting according to time (newest first) is enough to prevent the "bubble effect" you see on Reddit.
>>
>>57050563
Okay, then. Working at being a better programmer makes you a better programmer. You don't attain "Programmer", you do as programmer does. I can't shit in a can, have you smell it and suddenly make you a better programmer. What you need to do is take the time to understand what a computer is doing and how it is doing it, not who is doing it. Once you have managed the prospects of a computer as it is made not created then you will have an understanding upon which you can apply the constructs of any particular language, even javascript. But with any imparticular language comes the imparticular syntax and foundation of reasoning, which will manifest as very specific understanding and intuition. C is the bare minimum of all that but also offers up fewer comforts in the way libraries and conveniences.
>>
what the fuck is this error

>Thread 1 "Webcrawler.out" received signal SIGSEGV, Segmentation fault.
__GI___libc_free (mem=0x772064656c696146) at malloc.c:2952
>>
>>57050600
*xinu-esque
>>
>>57050697
That's retarded
>>
>>57050697
>I learned C as my first real programming language.
>It's not unfriendly to beginners, it just doesn't hold your hand.

He seems to have other stuff currently underway that he should be focusing on first.
>>
>>57050624
You ever think maybe you're not gay and just a fucking ass kisser?
>>
Was looking at an XORing function and noticed something i had never seen before in C++:
string p;
for(unsigned int i = 0; i < s.size(); ++i)
{
p += (s[i]^k[i]) ? "1" : "0";
}


Do any c++ wizards know what exactly the "? "1": "0"; part means?

Quick google search came up with nothing.
>>
Plz respond
>>57050536
Plz respond
>>
>>57050792
http://www.cprogramming.com/reference/operators/ternary-operator.html
>>
>>57050732
There's nothing but the necessary before C, though. What the fuck are you saying?

>>57050676
What if he doesn't want to code for enterprise in C? I think he's better off learning normal C before he goes into a grouped heuristic as found in the more modern languages. There's a reason fuckers are always pushing NODE as the ADT.
>>
>>57050212
more than you'd think. it was really popular on /g/ a while back and i've even run into a surprising number of normies that use it. runs better than firefox on my (pretty resource-limited) machine

>>57050279
i don't have JS disabled. i just noticed by palemoon build is a little out of date, though. i'll try again after updating. props for avoiding bloat/tracking but i'm personally not a fan of heirarchical comment systems. they don't scale well; under real-world use it begs the use of voted ordering and hiding and shit which in practice tends to elevate the uncreative/status quo (see: Reddit; arrested development references, completing song lyrics, and a bunch of other useless shit that ends up having a surprisingly significant and negative impact on the culture of the site). Reddit is okay for content aggregation i guess, but it's shitty for discussion largely because of this. chan-style design is better in that regard for a number of reasons and that's why i come here to actually talk about shit
>>
>>57050536
>>57050805
Yep, you are fucked
>>
>>57050811
Thanks.
>>
>>57050792
that's a ternary expression, newfriend
basically a condensed if/then/else
>>
>>57050698
Sorting by latest reply time, or by op time? The former seems to work for 4chan at least. The latter may, or may not, make the board seem to static. I don't know.

Also, i have bad eyesight and i hate it when people go full applefag and make the design half unusable in the interest of aesthetic, even a minimalist aesthetic. Right now the design is inclining in that direction.
>>
>>57050831
I don't understand what exactly its testing; the p+= part isn't a test, so how can it be saying if its true/false 1, else 0?
>>
>>57050805
No. Anon before me is just reciprocating your sentiments.

Stop listening to women and their bitch made children! They are all about status. You should be all about making a new battlestation. Or house.
>>
>>57050867
>http://www.cprogramming.com/reference/operators/ternary-operator.html
it's saying
if (s[i]^k[i]) {
p+= "1";
} else {
p += "0";
}
>>
>>57050879
But I am a woman
>>
>>57050886
How can the expression
s[i]^k[i]

be put in an if statement when its a bitwise operation, not a test? What is it "if-ing" so to speak? Or rather, in which situations would it evalute to p+= 1, or p+=0?
>>
I'm 48, is it too late to start?
>>
>>57050913
Then by default you'll never be top tier, you'll still have plenty of job opportunities because of quotas and lack of female programmers, due to the amount of work it takes to learn properly.
>>
When I include GLFW3 and link it, it cannot find "glcorearb.h"

I've spent way too long on this garbage
>>
>>57050934
remember that in C (and C++), 0 is false, non-zero is true. So if s[i]^k[i] returns anything but 0, "1" will be concatenated to p, if it returns 0, "0" will be concatenated to p.

http://www.cplusplus.com/reference/string/string/operator+/
>>
File: slide_mobile_logo - Copy.png (41KB, 770x316px) Image search: [Google]
slide_mobile_logo - Copy.png
41KB, 770x316px
any android devs on tonight?

my app:
>my team uploads leads to firebase db.
>app users get to see about 3 pieces of the info to decide whether they want to buy the full lead.
> when they buy, they get the full lead.

already set up dev account, adwords account, merchant account.

what is the best content delivery method?
let them DL a text file? somehow have button that changes from "buy lead" to "view full lead"? email them the data they purchased?
>>
>>57050822
It's true flat threads in chans force the users to interact with it thus making the thread feels more lively and the discussion actually go somewhere.
But I definitely think hierarchical threads with proper sorting can also achieve this. It's even easier to dig into a thread when their are already lots of replies. Also, you are guaranteed to get visibility since new replies are always showed first.

>>57050834
Every nodes are sorted from new to old, even for the threads on the main page (no bumping currently).
The design is (too?) small to allow more content to be shown, thus making following the thread easier. I tried to increase the font size but didn't find something I could stick too
>>
>>57050934
What do you think a test is?

C operators return the result of the operation.
>>
>>57050751
I am gay because I am a tranny. Technically. I have the mental illness I mean.
>>
>>57050982
Thanks, that clears it up.
>>
>>57050913
Did you not read my post?

Can't you use your critical thinking skills to maybe figure out my meaning? There aren't instructions to learning programming. Actually, what do you even want to start at?

Anyway, I think you've just illustrated my point a bit. There is no instruction set. There is no one to tell you what's there. You have to make it yourself. The only thing holding you back then is the people and the matter in the situation. If you are speaking to people and they say no, but you think yes, then you only believe no because they say no and thus can't really be expected to come up with a solution to your problem. You create a conflict for yourself. What you have then is the expectancy that someone will come along and show you how to figure that "yes, you can" start coding right now and today.

You said you are 23? and female? I'm not a professional coder but I can work with you for the price of unrequited love and daily chats. You don't have to do the love part. I just really want someone to work with and here on 4chan only stormtroopers reply. I'd be grateful that you were older than the usual shits we have on here. But please don't take advantage of my desire to work with other people.

Should we attempt to make contact?
>>
Help me out, algorithmicists.
I implemented a very basic Ant Colony to solve TSP for large (>100,000) point graphs.
I use kd-trees to produce some k-neighbors for each point.

While it works (poorly, it only optimizes Nearest-Neighbor by a factor of 1/2), I was wondering how people normally implement Ant Colony for huge graphs.

Naturally, you can't use a table to track pheromones (a 100,000x100,000 table of doubles costs 80 gigabytes), so what I've been doing is keeping track of edges from point-to-point.
The downside of doing this is that it's unidirectional (I can't update pheromones backwards because then I'd be updating pheromones multiple times)

What's a more sane way of managing pheromones in ACO for large graphs?
>>
File: 1476299451669.jpg (120KB, 800x1200px) Image search: [Google]
1476299451669.jpg
120KB, 800x1200px
I develop insomnia during periods where I code a lot, what does this mean?
>>
>>57050817
I should clarify, I have already taken a VB class and my first Java. Also my university makes us learn COBOL but they don't teach C or C++. If I already have a decent grasp of Java and I understand the basic concepts of programming, would it be okay to just dabble a bit in C? I also have a book on python but I wanted to put that off until I had C under my belt.
>>
File: 1457270628154.png (602KB, 481x586px) Image search: [Google]
1457270628154.png
602KB, 481x586px
I have a list of img urls in Python and I want to download them. What's the best approach?
>>
>>57051019
I..do not know how to respond to this. I have never approached it with someone so willingly calling it a mental illness. Maybe you just spend too much time around shitters and mouth breathers?
>>
>>57051054
>I develop insomnia
I seriously doubt that it's actually insomnia.

You're probably experiencing the first time in your life where your work is difficult and engaging enough to keep your attention throughout the night.
>>
>>57051054
It means I love you anon, please do not give up hope.
>>
>>57051073
Well maybe it's not a mental illness, perhaps it is a neurological illness? I don't know what it is exactly but it's an abnormality that causes me great problems in life. Having said that, thank you for not insulting me, i am very sensitive.
>>
>>57051078
I can't say, I'm not a mental health professional. The fact of the matter is that when I lie down to sleep nothing happens, I can't grasp that "sense" that guides me into sleep, but I become uncomfortable in a way I have to attribute to my inability to sleep
>>
>>57051033
I appreciate the sentiments and it makes a lot of sense, but I'm not really in a situation where I want to make new contacts, sorry anon
>>
>>57050993
yeah, i'm not of the belief that there's no right way to do it. but just something to keep in mind. i'm also bothered by only really being able to reply to one post. it would be nice to be able to inline-link posts other than the one being directly replied to. you could do it like 4chan, at least for posts in the same thread, where you just get a div showing the post on mouseover, or some similar approach. ideally something better than just a permalink to the post with no embedded ui functionality like Reddit
>>
>>57051033
If I were a girl I would contact you anon.
>>
>>57051057
C is just going to force you to rethink problems in lieu of implementation details about structures you may have learned in Java. You'll never hear it this way because we are running on enterprise wire but it's the truth. What a lot of enterprise manages then in those cases is process splitting through structures, which, really, could be done using a JavaScript UI. C will essentially teach you why we fear the robot uprising and, probably, a bit more about yourself. Java was a good start but it may depress you how difficult it is to use some of the stuff you get out of a simple import in java. But it will amaze you just how comfortable you can be under supposed heavy duress because you aren't making calls to build irrational models for enterprise logisctics consumption.

Someone mentioned a simple website running 1000+ lines of code to put time on an html body. That's what the rest of that code is for. Some of that code is calls to signatures on a remote db, too. Sucks.
>>
>>57051080
Thanks I needed that
>>
>>57051109
I have chronic insomnia and what you are describing sounds like it (not the chronic part). If you haven't had it before it's probably not a permanent thing. Likely it's caused by a new form of stress or even a lifestyle change.
>>
>>57051062
wget --input-file=...
>>
>>57051135
If you were a girl, anon wouldn't want to be contacted by you.

>>57051104
>thank you for not insulting me, i am very sensitive.
I don't think 4chan is the right place for you to be.
>>
>>57051160

No I want to use Python.
>>
>>57051033
I'm 27 and a guy but need someone to help work on goals and figure out where to go next.

I know the basics, worked through all the logic shit in FCC on my own and can make a simple python web and twitter scraper, and worked through how all of the different sorts work.

Or grills only?
>>
>>57051159
I sure as fuck hope not this is pretty bad
>>
>>57051145
>C will essentially teach you why we fear the robot uprising and, probably, a bit more about yourself
It feels like some deep meaning
>>
void parseHistI(cv::SparseMat &Mat, char *hist) {
int pos = 0;
float buf = 0;
for(int i=0; i < 256; i++) {
sscanf(&hist[pos], "%f\n", &buf);
Mat.ref<float>(i) = buf;
while(hist[pos++] != '\n');
}
}

void parseHistII(cv::SparseMat &Mat, char *hist) {
float dst[256];
sscanf(hist, "%f%f%...f%f%f", &dst[0], &dst[1], &dst[2], ..., &dst[253], &dst[254], &dst[255]); //Error: Comment too long

for(int i=0; i <= 248; i+=8) {
Mat.ref<float>(i) = dst[i];
Mat.ref<float>(i+1) = dst[i+1];
Mat.ref<float>(i+2) = dst[i+2];
Mat.ref<float>(i+3) = dst[i+3];
Mat.ref<float>(i+4) = dst[i+4];
Mat.ref<float>(i+5) = dst[i+5];
Mat.ref<float>(i+6) = dst[i+6];
Mat.ref<float>(i+7) = dst[i+7];
}
}


Which one is faster? Second has been simplified because of textarea length limitation but it should be 256 variables there.
>>
>>57051109
You used to fall asleep with the TV or a fan on for comfort and found a noise that runs at those similar levels running, more or less, all the time. This desensitizes you and now you're dealing with some of the stresses you had growing up. Just look around for noise algorithms and tune them til you find one that relaxes you. Or try hypnosis mp3s. There's a good one on the lixny server if you're not afraid of bait directories made by the trolls on here. Though, lixny, might be a honeypot. Who knows.
>>
>>57051162
It isn't but I am trying to build up an immunity to insults so I can be a stronger person. I think it is working.
>>
>>57051178
Like I said, it's probably not permanent provided you have never had trouble before. How long and when do you normally go to sleep compared to when you used to?
>>
>>57051203
Same time senpai
>>
>>57051183
run both and compare
>>
>>57051109
Do you exercise at all?

Generally speaking, if you're sitting down all day or even working retail on your feet but not really moving, you're not tiring your body out enough to sleep. Start working up to a 5k jog every day (should only take about 20-25minutes) and you'll find you sleep much better every night
>>
For the life of me I can't figure out what I'm doing wrong. I've got a function that's supposed to find the Kth smallest element in a BST, sometimes it gives the correct answer but most of the time it doesn't. Any ideas?


void Tree::printSmallestElement(int k, Node *leaf) { // Print the Kth smallest element in the tree

if (!leaf || k < 1) {
return;
}

printSmallestElement(k, leaf->left);
k--;
if (k == 0) {
cout << leaf->keyValue << endl;
return;
}
printSmallestElement(k, leaf->right);

} // end private printSmallestElement
>>
>>57051191
Then 4chan is definitely the place to be.
>>
My makefile generator in Ruby has turned into a CMakefile and general project generator, called genproject. It can more or less generate C, C++, and Java projects on the fly from templates. It's abstracted in a way right now where other project systems could be implemented for different languages.
>>
>>57051122
Okay then no contact. I don't really feel like explaining all that in just one thread. It's a lot, and is the only reason for why I was offering my help. Attractive women don't exactly flock to 4chan, especially not /g/.

Anyway, if you're that kind of "social" your problem might be a social one and not one to do with programming, neurotypical. You could jump on the webdev bandwagon and call what you do programming but you'd just be running on estrogen then. If you jumped on the regular programming deal you'd be faced with a lot of work and tons of misinformation considering the way you seem to collect your securities for deposit. Happy hunting!
>>
>>57051171
no
require 'open-uri'
files = urls.each { |u| open(u).read }
>>
>>57051219
But it is harder to do right? Do you lay down for a while and just lay with nothing happening? Do you drink lots of caffeine?

>>57051226
This anon is right as well. Exercise, even just basic stuff like running/walking, and school gym level exercises can really help you out if you are not already doing them.
>>
>>57051233
Thank you friend.
>>
>>57051238
I'm not attractive and I have so many issues that you would almost certainly regret making contact with me anyways.
You kinda lost me on the latter part of your post. Webdev isn't for me, I'm not very visually inclined
>>
im trying to hack the entire internet but my scripts not working, a little help fixing this error?
http://pastebin.com/G09GA0tE
>>
>>57051235
>A makefile-generator-generator
I think you need to stop.
>>
>>57051227
If i understand this correctly, i'm pretty sure the problem is that k is function call local scope.
>>
>>57050536
It doesn't take a terribly long time for people to git gud at programming.

I've seen Army Rangers go back to school at like, 26, and they come out as some of the best products of the university. Top notch programming abilities.

Now, the problem is that you're a woman. The problems lie in the fact that women are unwittingly trained to think that they aren't capable of doing something. They have a natural tendency to develop inferiority complexes, and as soon as the first roadblock pops up, they give up.

If you can get over your inferiority complex (based on all these posts you've made, you for sure have one), you'll be a fine programmer.
Books you should read are "Introduction to Algorithms" by Cormen et al., "Algorithms" by Dasgupta et al., and "Programming Language Pragmatics".

These are very general books which do not (necessarily) focus on any particular language. Reading through them, following the proofs, and solving the problems contained should grow your critical thinking skills.
Programming Language Pragmatics will teach you about the reasons programming languages are designed the way they are (and how they work), and the implications of that design. It works on the assumption that the reader somewhat understands how computers (or at least, memory) work at a lower level
>>
>>57051019
>>57051073
>>57051104
"disorder" is probably a better word. there are people who would probably find that offensive, but the problem there is really just that they're thinking of words like "disorder" or "abnormality" as having intrinsically negative connotations even though they really shouldn't. if there was a categorical mental abnormality that had a generally positive effect but was without a doubt extreme and highly uncommon, it would probably still be called a disorder. i've studied sex, sexuality, gender dysphoria, etc. fairly extensively (personally not academically, but i'd wager quite a bit more than the average person), and i'd call it a disorder, but i mean that in a purely clinical way. it is what it is. i think it would be much better if people approached it in this way. the liberal sentiment lately seems to focus on avoiding anything that could be perceived as implying any kind of negativity, but i don't think this ends up helping in the end because it discourages academic/clinical discussion, which is the context in which we should really be discussing these things. better understanding is better for everybody
>>
>>57050710
>#define
>std::list
>char *
>std::string
>fprintf

Jesus Christ will you pick a fucking language.
>>
>>57051238
>>57051335
Would these be understandable as a total beginner? Our perceptions of knowing how memory and computers work could be wildly different
>>
>>57051335
Any available text download for those books? Can't drop that much at the moment without screwing up food supply for the wife and kid
>>
>>57050025
more like reddit memes edition
>>
>>57051132
Linking to post is possible, just write the ID
Still the end goal is to only use an interactive map, kind of wikiverse.io, but more like flow charts. This is why each nodes can only have one parent.

Also, it means we could have an option to "flatten" threads if the user prefer to
>>
>>57051394
Lol dude, nice one!
>>
>>57051299

I think I need to go deeper.
>>
>>57051433
I unfortunately do not have a good source on a book regarding lower level computer architecture, but you don't need to understand the nitty gritty of the CPU pipeline to understand how your program executes.

Basically, all you need to know about physical memory is that it's a single bigass array of bytes. Look that up if you have to.

Introduction to Algorithms is designed to be -comprehensive-. Which means it's good for beginners.

However, a flaw in all the books I recommended is that they don't teach you how to read psuedocode (an easy to read, abstract and usually non-compilable example of how an algorithm works)

>>57051451
You can find them all on http://gen.lib.rus.ec/
Programming Language Pragmatics, 4th edition is not on there however.
I bought the PDF and I stripped my personal information from it. If you need it, I can upload it over MEGA or something.
>>
>>57051505
Honestly, pragmatics is the one I'm most interested in. I would love to get deeper into Algorithms eventually but how the languages work and interact with the hardware is really what interests me. Up to you though, no pressure if you don't feel like it.

Thanks for the other link!
>>
>>57051505
Contd--I have actually been looking for a high quality introductory book to programming for a long time.

However, what I have instead found is that every introductory programming book I've ever read are shovelware pushed by publishing companies.
They have the strong tendency to tie the user strongly to one language, which (temporarily) limits the scope of their understanding.

Programming Language Pragmatics is good, but it's target audience are people who understand the basics of programming already.
>>
>>57051526
>how the languages work and interact with the hardware
tl;dr: it's C all the way down
>>
>>57051526
https://my.mixtape.moe/ozwwcx.pdf
Enjoy. I don't know how long this website hosts files for.
>>
>>57051176
I'm down to work with you too, I just really like how sweet girls can be when they're grateful. She's not the grateful type. Just wants to flaunt femininity like a spore. Btw, you do realize I'm on 4chan too, right? I'll explain more if we do speak. How should we get in contact?
>>
D should be taught at universities instead of Java
>>
>>57051565
By the way, if you open the .pdf and some error message shows up, that's a result of me stripping my personal information from the PDF. I only have a rudimentary understanding of the PDF spec, so I may have deleted objects I shouldn't have, which sometimes results in a parse error.
>>
>>57051180
Nerves and streams, with cycles and user input with the conditions for learning as a possibility.
>>
>>57051565
Thank you so much anon. I'm just learning this stuff as a side interest for now but hopefully I can get enough out of all this stuff to eventually leave the retail management bullshit
>>
>tfw you find a blocking bug and all you can do is submit the issue and wait for the next major release.

Whelp, guess I'm not programming until february then.
>>
>>57051235
Welcome to Eclipse! :*
>>
>>57051292
It wasn't about you being attractive. It was about you helping me understand the modern woman better. I'm stuck 10 years ago. My point was that I didn't expect any of that.
>>
/dpt/ how do I get some company to hire me?
>>
>>57051613
>helping me understand the modern woman better
>understand woman
Haha, you're a funny guy. Go read: No more Mr nice guy.
>>57051634
Get a degree, start sending CVs.
The other one, which I'm doing: do the autodidact way, git gud, build some projects and start sending CVs, there instead of "education" put a lot of your projects and experience.
>>
>>57051634
Walk in to an interview and suck the interviewers dick while writing a fizzbuzz on a whiteboard in assembly
>>
>>57051297
use http://hastebin.com/
>>
>>57050064
you should just contribute to redox
>>
>>57051651
got the degree, sent out the resumes, still nothing after a month.

I think I must be doing something wrong but I don't know what. often people will email to ask for an interview but when I give times the never email back
>>
>>57051596
Good luck.
>>
>>57051682
build some stuff and show it to people
>>
>>57051348
Thank you for writing this anon, I haven't heard anyone say this yet. Very interesting perspective. I will think about this.
>>
>>57051693
I just wish I knew what to build. even something boring would do, but I figure it needs to show database skills since everyone wants a SQL/mongoDB developer
>>
>>57050279
Looks cool. Way better than anything I could do
>>
File: Capture2.png (105KB, 1337x575px) Image search: [Google]
Capture2.png
105KB, 1337x575px
lenovo Y-580
750 GB hdd
6GB RAM 4/2 sodimm
shit when trying to run android studio, especially when running emulator

installed mSATA ssd 250GB
installed 16GB RAM 8/8 (despite all official info saying max supported RAM is 8GB (4/4))
best thing i ever did (computer-wise)
now android studio is a breeze. emulator starts right up. but, emulators still crash, so i'm guessing the emulation is shit, since my hardware should more than handle everything.
also: bumping this
>>57050983
guess i'm going with the button idea. but how? not sure what to even search for in documentation.

yes, i'm a programming noob. teaching myself via books/videos. hard to learn something so vast at age 35 while have zero background in computer languages. but i'm trudging my way through it.
>>
>>57051567
and I meant that girls can be sweet. It's been a while since someone was sweet to me.
>>
>>57051651
I don't want to manifest in the integral and learn from mistake after mistake after mistake chasing only mistakes, brane-o. I want to understand her so that it won't break.
>>
while we're getting creepy: anyone from chicago here? i don't like finance so i think i'm going to have to move
>>
I, too, am looking for a qt girl to wear a skirt and sit on my lap while I program. Any takers?
>>
File: 1470263794648.png (2MB, 3840x2160px) Image search: [Google]
1470263794648.png
2MB, 3840x2160px
>>57050563
The posters replying are simplying giving you their faith without works, but I shall show you my faith through my works

and my works is by showing you pic related and tell you to work at the challenges there.
>>
File: what the fuck.png (272KB, 708x402px) Image search: [Google]
what the fuck.png
272KB, 708x402px
>>57051911
>>
there has to be a better way
#include <ncurses.h>

int
main ()
{
initscr();
cbreak();
curs_set(0);
noecho();

char c = 0;
int y = COLS / 2,
x = LINES / 2;

do {
mvaddch(y, x, '@');
c = getch();
mvaddch(y, x, ' ');

switch(c) {
case 'h': --x; ; break;
case 'j': ++y; ; break;
case 'k': --y; ; break;
case 'l': ++x; ; break;
}

refresh();
} while (c != 'q');
endwin();

}
>>
I made a thing:

https://github.com/expeditiousRubyist/genproject/
>>
>>57052135
Should put explicit instructions on how to use it.
>>
http://www.nytimes.com/2011/10/14/technology/dennis-ritchie-programming-trailblazer-dies-at-70.html

what should we do
>>
>>57052135
Wait are you a girl?
>>
File: 1.png (1KB, 972x431px) Image search: [Google]
1.png
1KB, 972x431px
what do you call someone who's looking to get something done?

i need a word
>>
>>57052163

genproject --help

>>57052178

No. When did I ever say or imply that I was?
>>
>>57052181
"Achiever", "doer"?
>>57052193
>genproject --help
kay
>>
>>57052202
>"Achiever", "doer"?
it needs to fit this sentence

>present a platform to [someone who's looking to get something done]
>>
>>57052181
john, client, seeker, employer
>>
>>57052211
>>present a platform to [someone who's looking to get something done]
not a sentence...
>>
>>57052211
client if they're using what you've made.
>>
>>57052193
your name
>>
>>57052224
>>57052223
>>57052213
>>57052211
thanks everyone. i went with employer and client
>>
File: rubyandbeautifly.jpg (30KB, 250x366px) Image search: [Google]
rubyandbeautifly.jpg
30KB, 250x366px
>>57052225

is based on a male character from the Pokemon Adventures comics.
>>
>>57052181
man
>>
>>57052193
I directly state you as such. Sorry if that offends you, I'd just rather not assume your gender.

>>57052225
I thought the same and then it occurred to me she might mean the programming language. But then I imagined him being a cutie pie nerd programmer and that just meshed with me better.
>>
>>57052248
underrated post

I think maybe you're burned on some ram there. First time I thought to check the temple os souce by address link on Terry's website.
>>
>>57052239
Well shit.
>>
>>57052252

It's like you're completely unaware that Ruby is a common nickname for Ruben, a 100% male name...
>>
>>57052248
kek
>>
>>57052279
Yeah but Ruben is primarily black or puerto rican and you're much cuter as a cutie pie nerd girl programmer. Also, what's your last name?
>>
>>57052279
and btw I am completely unaware that there could be a nickname Ruby for Ruben. We don't generally make for such ambiguities where I live. The boys that are given the name Lupe typically change their name by age 7.

Anyway, I'm arguing for you so that these guys like you. I think you're a great asset.

Also, hi Ruby!
>>
>>57052294

http://www.behindthename.com/name/ruben
>USAGE: Swedish, Norwegian, Danish, Dutch, French, Armenian, Biblical Latin

I will say this much:

1. My real name is not Ruben or Ruby. It's always been an alias.
2. I am not going to be revealing my real name, first or last. In this sense, I at least maintain a shred of anonymity while I act like a total asshat attention whore.
3. I am of Nordic decent, and have a Unix beard. If you want to imagine what I look like, picture a skinnyfat Viking.
>>
>>57052334
No, now your name is Helga. And, it's not like Ruby is a bad programming language. It's just not a good one.
>>
>>57052309

You don't need to argue for me. I am well capable of handling my own. I've been on this site for 10 years, and nothing you guys say really phases me.

Also, hello. What do you think of my shitty project generating tool that probably won't actually save any more time than it took to create?
>>
>>57052059
>C
anon, this is already the better way
>>
>>57052347
I thought exactly what you said but it's definitely something to build off of. :D

It's not like I have anything up besides random code bits I hand out.
>>
>>57052363
thanks
I come from haskell so C is kinda hard.

Anyways, I'm doing snake now, and I have no idea on what kind of data I should manipulate (aside from the obvious array of coordinates indicating the snake's body)

something so simple is so hard
>>
File: Better Help.png (172KB, 1395x962px) Image search: [Google]
Better Help.png
172KB, 1395x962px
I got so fed up with the help formatter that I made my own
You'd think that with standard libraries for EVERYTHING, there would be at least one for processing command line input that lets you organize your output in a non-fucktarded fashion
>>
File: ...............gif (610KB, 1440x1080px) Image search: [Google]
...............gif
610KB, 1440x1080px
>>57052347
Ruby is indeed a great asset. There is no argument to that. The man has proven themselves to be a hyper intelligent degenerate who will hopefully contribute towards the degeneracy of civilization by helping to push our current understanding of AGI further than expected in the foreseeable future.
>>
>>57052555

AGI?
>>
>>57052636
shhh, please Ruby
>>
File: ...png (1MB, 1600x1600px) Image search: [Google]
...png
1MB, 1600x1600px
>>57052636
Ok, fine, don't play along. Now I have to reveal to everyone I was making shit up.

AGI=artificial general intelligence
https://www.reddit.com/r/agi
it's kind of meme tier, especially because some dumbass runs around claiming he "solved AI" on here, artificial and neuralnetworks trying to sell his retarded AI alg which is literally just a for() loop with functionless functions with names like "think, breath, do, blah blah"
>>
>>57052555
>hyper intelligent

haha oh wow
>>
C++ or java? money wise
>>
>>57052715
Just do both.
Programming is not about learning a language.
A language is merely a tool to get the job done.
It just so happens that a certain domain of work favors usage of one language over another, but this occurrence shouldn't affect you in any way.
>>
>>57052715
depends on the level of expertise you can achieve on either of those
>>
>>57052826
and also this
>>
>>57052684

>think, breath, do
>do
>naming a function as something that is a reserved word in most languages

What an idiot.
>>
>>57050430

I like the way 4chan's posting system works because I can just mouse over the replies at the top of the post and see who's replied to you, then I can just mouse over any replies you've linked in your post to see exactly what you're replying to.

On reddit, when branches happen, it can take a few seconds to figure out who is responding to whom.

I understand that the mouse-over feature hasn't been here since the beginning though, and I would say that reddit's system is at least better than our old one.
>>
>>57052826
>>57052841
but it says here I need X amount of years in Y language
>>
File: my disgust.jpg (572KB, 1723x924px) Image search: [Google]
my disgust.jpg
572KB, 1723x924px
>>57052938
You're basically calling me an idiot there. Feels great :)
But yes, I may not recall it word by word buy I do recall it was not the most distinguishable and respectable endeavor the man had. I will try and recall his name to let you know later when I am not unimaginably intoxicated.
>>
>>57052938
>toString()
>>
>>57053033
Imagine using toString()/ str() in a makefile...
>>
rate my fizzbuzz

print("1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz 16 17 Fizz 19 Buzz Fizz 22 23 Fizz Buzz 26 Fizz 28 29 FizzBuzz 31 32 Fizz 34 Buzz Fizz 37 38 Fizz Buzz 41 Fizz 43 44 FizzBuzz 46 47 Fizz 49 Buzz Fizz 52 53 Fizz Buzz 56 Fizz 58 59 FizzBuzz 61 62 Fizz 64 Buzz Fizz 67 68 Fizz Buzz 71 Fizz 73 74 FizzBuzz 76 77 Fizz 79 Buzz Fizz 82 83 Fizz Buzz 86 Fizz 88 89 FizzBuzz 91 92 Fizz 94 Buzz Fizz 97 98 Fizz Buzz")
>>
>>57052999
So implement all your projects in both languages, and pass it off as X years of experience.
>>
>>57053083
im new here
has this meme always been here?
>>
>>57053122

If you can't fizz the kidz, then buzz off pajeet.
>>
>>57052049
roll
>>
>>57053122
Yes, it's supposed to link the idea of a series in math as a sequence that the compiler creates with output to a discrete set that runs on a set of deviations from the result at the standard position based on offsets that integrate on key press. Something like that could be modeled by math simply and create a nice analogy for bridging the understanding between math and "computation" as shown by the C style languages and their syntax.
>>
>>57053033

What about it?
>>
>>57053255
Layman's terms please.
>>
is there an easy way to shift all the elements in an array one unit left (except the first of course) in C?

aka
char *arr = { 'a', 'b',' c'}
shift(arr) = {'b','c'}

esentially, the equivalent of haskell's tail function, but in C
>>
>>57053275
It's an example of the stuff you learn in calculus applying to programming theory through the use of applying the orders of magnitude.

The sequence exists at the assembly level. The series a bit higher. And the constants, as demonstrated by the conditions on the index/data, are all applied from "behind the scenes"/ at the point of human configuration. The discrete set part applies to the table of data that is hardcoded into the machine as it places existing values into a running table as part of a set to be evaluated to.

I feel strange right now.
>>
sorry I still don't know why you people are memeing in C
>>
>>57053376
Make a pointer to the array with reference to the second element. Just make sure you don't delete the original array and instead copy your new address to the old one. It might fragment your table a bit but in the case of something like that you could just recreate state when performance isn't a problem. A one byte shift won't slow you down too much.
>>
>http://www.stroustrup.com/
motherfucking site
>>
>>57053449
what do you mean fragment my table?

also, I just finished making a realloc tail, why do you say to not change the original array?

I literally wouldn't need the first element anymore
>>
>>57053376
memmove() if you actually need to move the memory, otherwise for read-only operations just increment the pointer.
arr++
arr now points to 'b'.
>>
>>57053478
is this ground zero for bad programming paradigms?
>>
>>57053487
but does memmove just shift and not delete the extraneous elements?

aka
is it just
{'a', 'b', 'c'} -> {'b', 'c', 'c'}
if I do memmove(arr, arr+1, size-1)

what happens if then n given bytes contain off boundary bytes?
>>
#include <iostream>
#include <cstring>
#include <cassert>

using namespace std;

#define BOMB_MAX(x, y) x > y ? x : y

unsigned int HashCString( const char * pStringKey )
{
unsigned int hash = 0;
assert( pStringKey != NULL && "Trying to a hash non-existent string");

while( '\0' != (*pStringKey) )
{
hash += ( *pStringKey );
hash += ( hash << 10 );
hash ^= ( hash >> 6 );
++pStringKey;
}

hash += ( hash << 3 );
hash ^= ( hash >> 11 );
hash += ( hash << 15 );

return hash;
}

class Bomb
{
public:
virtual ~Bomb() {}
bool IsA( unsigned int typeId );
int CalculateTimeNeededToRun( int runningSpeedM ) const;

void PrintInformation() const;
void StartCountdown( int runningSpeedM ) const;

protected:
unsigned int mBombTypeId;
int mBlastRadiusM;
};

bool Bomb::IsA( unsigned int typeId )
{
return (mBombTypeId == typeId);
}

const int BUFFER_SIZE = 54;

int Bomb::CalculateTimeNeededToRun( int runningSpeedM ) const
{
int case1 = mBlastRadiusM * runningSpeedM;
int case2 = mBlastRadiusM * mBlastRadiusM;

return 2 * BOMB_MAX( case1, case2 );
}

void Bomb::StartCountdown( int runningSpeedM ) const
{
int timerSec = CalculateTimeNeededToRun( runningSpeedM );
for( int i = 0; i <= timerSec; ++i )
{
cout << timerSec - i << "..\n";
}

cout << "Bigbaddaboom\n";
}

void Bomb::PrintInformation() const
{
cout << "Some crazy information about bombs and the such\n";
}

class SuperBomb : public Bomb
{
public:
SuperBomb();

static const unsigned int msTypeId;
private:
};

const unsigned int SuperBomb::msTypeId = HashCString("SuperBomb");

SuperBomb::SuperBomb()
{
mBombTypeId = SuperBomb::msTypeId;
mBlastRadiusM = 6;
}

class DudBomb : public Bomb
{
public:
DudBomb();
int CalculateTimeNeededToRun( int runningSpeedM ) const;

>>
how much is software deving copy and pasting?
>>
>>57053553
debug
>>
>>57053485
because your second one references the original one and simply "forgets" to check what was at the original arrays first index.

XYaaaaaaaaaaaa123456789\0aaaaaaaaaaa

if this string represents your array, the iterator will have to course through all those 'a', right? With the original array's pointer (X) at 1 and the new array's pointer (Y) at 2 you could assign the address in Y to the pointer X and have the original pointer simply skip that first 1 upon leading the trail to the array. It will still end at the same place, just start further in. You don't save yourself any memory and you technically do less work over the same amount of memory but really who the heck would let it pile up like that and then expect it to be easy?
>>
Whats a good language for someone who has no intention of programming professionally and just want to fuck about?
>>
>>57053636
haskell
>>
>>57053485
And by fragmenting your table I mean it stretches the term cogent to a bounded mean. Instead of it all being contiguous, attached at the hip kind of deal, it skips over certain portions for the sake of brevity and assumes you'll defrag the data table yourself. This was one of the first things I learned about computers. When I was like 9.
>>
>>57053618
ok, so you're saying that a byte is negligible and just changing the pointer's address is much easier?

But seriously, I have an array of structs that grows quickly, and each struct has a pointer to a mallocd array, which in itself grows as quickly as the array itself
its grows n^2
>>
I need some advice on which languages to learn.

I'm a second year undergrad looking into mechanical/electrical engineering but I'm also very interested in comp sci as a back up. What are some good languages that are useful in both areas of interest?
>>
>>57053636
see >>57053640
>>
File: haskell-logo-with-name.png (7KB, 397x131px) Image search: [Google]
haskell-logo-with-name.png
7KB, 397x131px
>>57053640
An advanced, purely functional programming language.
>>
>>57053705
c++ & java
>>
>>57053640
>>57053707
>>57053719
Groovy. I have heard similarly before. Will look into.
>>
>>57053636
I agree with the other two fags.
Haskell is the only language I've evet had fun programming in.

Its mathematical in nature, and solutions are elegant and short (haskell code is, in average, 4 times shorter than their imperative counterparts, just look at xmonad, its 1000 lines including the big ass comments explaining)


Its strongly typed, meaning that if your code compiles it will 99% of the time work as intended.

It has advanced concepts and allows one to treat functions just like any other bitch such as integers or floats.
>>
>>57053752
Very interesting. Preffered method of learning it? Books or just diving right in?
>>
>>57053776
dive in, man.
>>
honest question: is visual basic used anywhere anymore outisde of maintaining legacy software
>>
>>57053789
Cheers ears
>>
I recently started learning Python through an app and am really digging it. I'm currently working but I'm planning on going back to school for Fall 2017.
This gives me about 10 months of freelance studying before I go back to school.
I'm classified as a sophomore and am wondering if in those 10 months I'm able to learn enough on the topic to not be overwhelmed by the CS classes.

Bit of a background:
I had no prior experience with CS or Computer languages before my interest piqued.
I'm going through the Computer Science modules in Khan Academy and am expecting to get a very basic grasp of the topic when I'm done.

I'm learning the basics of python right now but since I don't have a computer atm I'm unable to do any actual coding so I'm getting the basics down while I get one.

Does anon recommend any learning sources for a budding CS major?
>>
>>57053841
what app? im beginner too.
>>
>>57053532
Yeah it just shifts memory.
But there's no need to 'delete' anything. Presumably you have a size variable to go with your array, so just memmove and decrease your size by one, then you've 'deleted' an element.
>>
>>57053841
Refer to these posts I wrote earlier.

>>57051335
>>57051505
>>57051526
>>57051528
>>57051565

If you read Cormen and Dasgupta's books, follow all the proofs, and do the examples, your education will already be at the same level as a junior CS major.
Programming Language Pragmatics leaks a bit into senior-level coursework, and would ideally be supplemented with some knowledge regarding Computer Architecture and Operating Systems (both optional).
>>
>>57053846
Learn Python from SoloLearn
They have a series on programming languages. The UI is smooth and they do a good job of explaining the basics.
I'm not expecting to be have a full understanding of the language but after noticing my progress I'm expecting to at least be able to understand and type out basic code for everyday stuff.
>>
do you belive in the unfounded principle that any code can be made elegant
yes, I know elegancy is subjective, but its in the level of beauty since some can find certain code elegant, yet everybody knows non-elegant code
>>
>>57053915
Absolutely
>>
>>57053872
Nice! Thanks a bunch!
This'll really help a lot.
>>
File: 1467835370465.webm (894KB, 720x405px) Image search: [Google]
1467835370465.webm
894KB, 720x405px
this is the first "useful" thing that I made
I feel very proud of myself
>>
>>57053948
Is this possible in windows OS?
>>
File: 1445040686610.jpg (281KB, 560x783px) Image search: [Google]
1445040686610.jpg
281KB, 560x783px
>>57053961

I guess.
It's just a shitty img downloader written in python.
>>
>>57050502
>>57050528
>>57050556
>>57050593
>>57050623
>>57053083

let fizzBuzz = 
let rec cycle ls = seq { yield! ls; yield! cycle ls }
let fizzes = cycle [""; ""; "Fizz"]
let buzzes = cycle [""; ""; ""; ""; "Buzz"]

Seq.take 100 >> Seq.mapi (fun i (x, y) ->
match x+y with "" -> string (i+1) | _ -> x+y)
<| Seq.zip fizzes buzzes
|> Seq.iter (printfn "%s\n")
>>
>>57053967
CUTE
U
T
E
>>
is the C++ primer a good place to start programming?
want to work with virtual reality open source projects in the future
>>
>>57054021
What?
If you're trying to learn how to program, refer to >>57053872

If you're trying to learn C++ specifically, just use Stroustrup's books. If you don't know how to program, don't bother, because a reference textbook is a terrible place to learn from.
>>
>>57050468
What is this abortion of a language?
>>
>>57054068
it has the best reviews, and I already know programming
but yeah not sure if its just a reference textbook
>>
>>57053376
char *tail(const char *ptr)
{
return ptr + 1;
}
>>
>>57054246

>const elimination
>>
Yesterday i was told about the
>strict aliasing rule
and decided i should learn more about it, but now i'm wondering if that only applies to c and not c++, because i cant find anything about it in [Stroustrup].
>>
>>57053478
It has been a long since I haven't seen a site without JS.
>>
>>57054436
Strict aliasing rule also exists in the C++ standard, except breaking the rule is less obvious than in C as long as you don't use C-style casts.
For example, this code compiles (despite breaking the rule):
int i = 0x3f800000; // 1.0f in hex
float f = *(float *)(&i32);

But this one does not:
int i = 0x3f800000;
float f = *(static_cast<float *>(&i32));

C++ is deemed having a stronger type system, so this limiting yourself to C++ features should keep you safe from breaking the strict aliasing rule... except you can still break it with reinterpret_cast in place of static_cast.
>>
>>57054626
Thanks.

i32 is just a typo, right?
>>
>>57054704
Yes, it's supposed to be "i" instead. At first, I tested it with a int32_t (since it's the same size as float), hence the i32. Forgot to change all occurrences.
>>
>>57054626

Kek, that's all just the properties of C++ casts. static_cast isn't for converting between pointers of different types. A C style cast isn't technically appropriate either, it's just that it tries all of the casts except for dynamic_cast, so it always works. What you want, however, is reinterpret_cast.
>>
>>57052049

>basic bootloader.

Lol, this is what I'm working on right now. Fml.
>>
File: 2016-10-13-044339_601x525_scrot.png (32KB, 601x525px) Image search: [Google]
2016-10-13-044339_601x525_scrot.png
32KB, 601x525px
rate my code /b/
>>
What exactly is the meaning of "syntactic sugar"? Aren't all languages "syntactic sugar" by definition?
>>
>>57054870
What would reinterpret_cast give me, in this context?
>>
>>57054929
qt
>>
>>57054943
it's when you have a syntactic construction that doesn't change the semantics of the language.
>>
What's the best way to learn c# .NET when I am already decent with regular programming. I don't really care about switching to the c# syntax but I don't know how to use all of the .net components and stuff
>>
>>57054943
basically a pretty way to express something

list comprehensions are syntactic sugar

strings are syntactic sugar for {'a','b','c','\0'}
>>
>>57054963
there is no best way, just do your thing senpai
>>
>>57054966
>>57054957
Sure, but aren't strings syntactic sugar for assembly calls?
>>
>>57054976
no.
>>
Loops and if statements are syntactic sugar for goto desu
>>
>>57054998
no.
>>
>>57054998
pretty much yeah
>>
goto is recursion
>>
https://en.wikipedia.org/wiki/Pointer_aliasing
>In C or C++, as mandated by the strict aliasing rule, pointer arguments in a function are assumed to not alias if they point to fundamentally different types

Does this mean the strict aliasing rule only applies to function parameters?

I'm having trouble finding any official source that specifies what the strict aliasing rule actually is.
>>
>>57054945

reinterpret_cast just interprets one pointer as another pointer with complete disregard for what those pointers are pointing to.

When you do a C style cast in C++, in effect, you do the following casts in order until one of them works:

const_cast
static_cast
static_cast then const_cast
reinterpret_cast
reinterpret_cast then const_cast
>>
>>57055153
6.5.7

"An object shall have its stored value accessed only by an lvalue expression that has one of
the following types:
— a type compatible with the effective type of the object,
— a qualified version of a type compatible with the effective type of the object,
— a type that is the signed or unsigned type corresponding to the effective type of the
object,
— a type that is the signed or unsigned type corresponding to a qualified version of the
effective type of the object,
— an aggregate or union type that includes one of the aforementioned types among its
members (including, recursively, a member of a subaggregate or contained union), or
— a character type."
>>
>>57055204
Is that the C standard? Where can i find that?
>>
>>57055242
Your local Church
>>
>>57055268
Thanks.
>>
>>57055277
I recommend the King James version of the C Standard, but you could always go with the original latin
>>
How can I cast uint8_t* to uint32_t at an offset without getting an alignment compiler warning? I need it to store a byte array in a flash buffer but the function to store it only takes uint32_t* as an argument for the data.

Here's what I have now:
uint8_t transfer[33];
transfer[0] = 0x85;
uint32_t* transferName = (uint32_t*)&transfer[1];
flash_read_user_signature(transferName, 8); //8*4 = 32 byte


That gives the warning on line 3: "cast increases required alignment of target type [-Wcast-align]"
>>
>>57055307
Never mind I did it using memcpy
>>
>>57050945
No. Start off with an easy language, then find a book for beginners in that language and study it thoroughly. After that look for a book about programming concepts, apply what you've learned from that book and by then, you'll know what to do next.
>>
>>57050945
No, far from it.
>>
>>57055242

http://www.open-std.org/jtc1/sc22/WG14/www/docs/n1570.pdf

>>57055307
>>57055340

union {
uint8_t u8[36];
uint32_t u32[9];
} transfer;

transfer.u8[3] = 0x85;
uint32_t *transferName = &transfer.u32[1];


You get 3 bytes of padding onto the front, but you can force alignment.
>>
>>57055402
What about the C++ standard?

I'm only finding that i need to purchase it from ISO.
>>
File: 1476351619454.jpg (15KB, 480x360px) Image search: [Google]
1476351619454.jpg
15KB, 480x360px
Can /dpt/ solve this problem? /dpt/ can't even average two ints so I have my doubts.
>>
>>57055450

Not a clue. Maybe there's a torrent floating around somewhere.
>>
>>57055450
>I'm only finding that i need to purchase it from ISO.
Maybe your google is broken. I find it hard to come up with a query that doesn't lead me directly to a download.
>>
>half-jokingly recommend Haskell to a friend who's a math autist but has no programming experience
>forget about the whole thing
>two weeks later he tells me that Haskell is amazing and thanks me for the suggestion
I feel kind of guilty. He probably won't be able to switch to any other language because it will just feel shitty in comparison with Haskell.
>>
Not really programming, but rather shitty scripting. I'm not used to Windows and I'm trying to become more familiar with batch files. (Is there an alternative? Maybe something through powershell, or etc?)

Anywho, can people point out where I'm being retarded in these?
https://github.com/kilog/ffmpeg-batfiles
I use these files on my Windows machine, personally, because I don't like GUIs- I prefer things streamlined and text-input-only if I can help it.
I know my github is lonely, but please, bear with me.

I know this is just "scripting," but please.
>>
>including iostream and namespace std
>cout and cin are ambiguous
What am I fucking up
>>
>>57055519
>namespace std
This is where you fucked up.
>>
>>57055526
explanation?
>>
>If you have any control over the struct layout you can put your own type enumeration at the front of every struct to verify the type. This works in both C and C++.
What did he mean by this?
>>
>>57050279
can't access it
>>
>>57055456
Just take the black pawn.
>>
>>57055556
How?
>>
>>57055509

1. Scripting IS programming.
2. Don't use Batch if Powershell is at all available to you. Powershell may not be the best scripting language, but it is leaps and bounds better than Batch. The only reason to use Batch scripts is if you are on old versions of Windows that don't support Powershell, or DOS.
>>
>>57055556
>
>>
>>57055564
Right, but...

...hmm. I'm not entirely sure where to start if I want to start using Powershell. I've done a few searches, but I can't quite find a way to 'hop over,' per se
>>
Never mind, it only took me half an hour but I finally made a program without cheating
int main()
{
char ch = 'Y';
do {
float num1, num2;
cout << "Please enter your first number." << endl;
cin >> num1;
cout << "Please enter your second number." << endl;
cin >> num2;
float sum = num1 + num2;
cout << "The sum is " << sum << "." << endl;
cout << "Would you like to continue? Enter 'Y' for yes." << endl;
cin >> ch;
} while (ch == 'y' || ch == 'Y');
}
>>
>>57055563
Kh7 Kb6
Kh6 Kxc6
Kxh5
½ - ½
>>
>>57055563

Move king forward. Pawn can't attack except diagonally, and it can't move backwards, so after 2-3 moves of the king, the black pawn is dead.During or after this, black can only really take the white pawn, thus leaving two kings on the board for a draw.

>>57055570

ss64 for syntax and basic commands
msdn for .NET classes
For everything else, there's StackOverflow.
>>
NEW THREAD

>>57055631
>>57055631
>>57055631
>>57055631
>>57055631
>>
>>57055623
>>57055624
Oh I thought the puzzle was that you only have a single move
>>
http://en.cppreference.com/w/cpp/language/reinterpret_cast
>When a pointer or reference to object whose dynamic type is DynamicType is reinterpret_cast (or C-style cast) to a pointer or reference to object of a different type AliasedType, the cast always succeeds, but the resulting pointer or reference may only be used to access the object if one of the following is true:
>...

http://en.cppreference.com/w/cpp/language/type#Dynamic_type
>If some glvalue expression refers to a polymorphic object, the type of its most derived object is known as the dynamic type.

http://en.cppreference.com/w/cpp/language/object
>Objects of class type that declare or inherit at least one virtual function are polymorphic objects.

I understand this to mean that instances of ordinary trivial structs are not polymorhic objects, which means that they do not have a dynamic type.
Does this mean that i can cast pointers between trivial structs without violating the strict aliasing rule?
>>
>>57055651

The wording does suggest that, but it is provable that it can't be tied in one move.

>>57055685

You can reinterpret cast any pointer to any other kind of pointer. But that is undefined behavior.
>>
>>57055564
Batch is fine if all you're doing is making simple calls like using it like a windows makefile calling vcvarsall on your code.
>>
>>57055456
The solution is Kg7 (if Kh7 then h4, white loses). Shouldn't be too hard to see why.
Thread posts: 323
Thread images: 23


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]

I'm aware that Imgur.com will stop allowing adult images since 15th of May. I'm taking actions to backup as much data as possible.
Read more on this topic here - https://archived.moe/talk/thread/1694/


If you need a post removed click on it's [Report] button and follow the instruction.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com.
If you like this website please support us by donating with Bitcoins at 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
All trademarks and copyrights on this page are owned by their respective parties.
Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site.
This means that RandomArchive shows their content, archived.
If you need information for a Poster - contact them.