[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: 318
Thread images: 37

File: serveimage(52).jpg (25KB, 736x525px) Image search: [Google]
serveimage(52).jpg
25KB, 736x525px
What are you working on, /g/?

Old thread: >>62188731
>>
>>62196453
trying to get emulated games working on this orange pi
>>
So here's the final allocator. I'm not sure where I want to go next, basically I plan to implement a scheduler in the near future but I also want
>some standard library-like containers to make it less a pain in the ass to work
>keyboard input
>>
Rewriting the Linux kernel in JavaScript
>>
>>62196558
that's great, anon. hope you post the source so everyone can use it.
>>
File: lth2102.jpg (777KB, 1026x1302px) Image search: [Google]
lth2102.jpg
777KB, 1026x1302px
>java has superclasses
How can C even compete?
>>
File: assembly-manga.jpg (2MB, 1000x1330px) Image search: [Google]
assembly-manga.jpg
2MB, 1000x1330px
How's that Assembly learning going?
>>
>>62196625
oop is cancer.
>>
>>62196648
>Z80
Comfy.
>>
File: TranslucentMetaclassClassClass.png (457KB, 3216x1787px) Image search: [Google]
TranslucentMetaclassClassClass.png
457KB, 3216x1787px
>>62196625
>his language doesn't have Metaclass class
pleb
>>
>>62196625
It competes by assuming the programmer has some ability to write code without babby-tier abstractions to help them along the way.

Well-written non-OOP code is actually a lot easier to follow and debug than well-written OOP-code. Java projects in particular are nightmares to trace through and make minuscule changes to, if you're not familiar with the project and its hierarchy of different classes and other abstractions afforded to the project by the language.
>>
>>62196453
Hang yourself, pedo.
>>
How hard would it be to land a Programming or IT job with felonies?
>>
>>62196692
What did you do?
>>
>>62196720
burglary
>>
>>62196726
Wew, I was expecting an actual pedo.
>>
>>62196692
I don't think anyone but felons and HR could answer that.
>>
>>62196692
Some hipster startup company on the west coast would probably take you. Of course, life on the west coast sucks ass and is fit only for animals, but consider it a stepping stone.
>>
>>62196453
HSA payroll deductions for my company's fintech platform...
>>
>>62196625
you misspelled base and derived
>>
File: IMG_2497.png (44KB, 220x220px) Image search: [Google]
IMG_2497.png
44KB, 220x220px
>>62196625
>class structure isn't defined by recursively constantizing strings read from a nested YAML file on disk
>>
>>62196542
got as far as to actually launch a game in mame
but, even though my controller works fine in linux and retropie and everything else, I can't get the emulator to recognize a single keypress
probably the end of the line
>>
Rust update.
>>
File: car_in_rust.png (90KB, 587x727px) Image search: [Google]
car_in_rust.png
90KB, 587x727px
>he doesn't use higher order functional programming with homotopy maps to hard-code a car in his language of choice
Can't wait to hard-code myself a gf.
>>
>>62196951
I can't tell if it's ironical (as it's supposed to be) or not. In any case, it's shit.
>>
>>62196469
>>62196491
Thanks! I solved the problem partially by adding const to the pointer to the pointer and the variable in the struct. That way I managed to access the struct member in the function and display the first string. However I was unable to access any of the other strings. Tried memcpy, but I'm getting a seg fault just trying to print the first string in there.

struct load_data { 
const char **img;
size_t img_s;
}

const char *images[] = { "test.bmp", "test2.bmp", "test3.bmp", "test4.bmp", "test5.bmp", "test6.bmp", "test7.bmp" };
const char **ptr_images = images;

struct load_data data = { ptr_images, sizeof(images) };
struct load_data *data_ptr = &data;

thread = SDL_CreateThread(scene_load, "load_scene", (void*) data_ptr);

int scene_load(void *ptr)
{

struct load_data *test = (struct load_data*) ptr;

char *images = (char*) malloc(test->img_s);
memcpy(images, test->img, test->img_s);

printf("address of test: %p\n", test->img); // works
printf("size... %i\n", test->img_s); // works
//printf("test: %s\n", *((test->img)+1)); // seg fault
printf("memcpy_img: %s\n", *images); // seg fault

return 0;
}



What am I doing wrong now?
>>
>>62196686
After (You).
>>
>>62197156
>char *images = (char*) malloc(test->img_s);
what value are you expecting test->img_s to have at this point of execution?
because you didn't initialize it
>>
>>62197229
>struct load_data data = { ptr_images, sizeof(images) };
see here
struct load_data data = { ptr_images, sizeof(images) };


It's the size_t if the original string array.
>>
I have a uni course where I need to find and contribute to a larger sized project on a git-ish service. Might you have any suggestions?
>>
>>62197235
ah I see
in that case I think the problem is that you're attempting to copy memory to an address of a variable that you've specified to be const
>>
File: 1.jpg (181KB, 1266x1280px) Image search: [Google]
1.jpg
181KB, 1266x1280px
>>62197243
see if you can push same changes through to
https://github.com/rust-lang/rust/blob/master/CODE_OF_CONDUCT.md
>>
where my trap"bros" at?
>>
>>62197292
>>>/lgbt/
>>
>>62197255
>>62197235
actually, I just ran it and it worked fine
try running this in a fresh project
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
struct load_data {
const char **img;
size_t img_s;
};
int main(){
const char *images2[] = { "test.bmp", "test2.bmp", "test3.bmp", "test4.bmp", "test5.bmp", "test6.bmp", "test7.bmp" };
const char **ptr_images = images2;

struct load_data data = { ptr_images, sizeof(images2) };
struct load_data *data_ptr = &data;
void* ptr = data_ptr;
struct load_data *test = (struct load_data*) ptr;

char *images = (char*) malloc(test->img_s);
memcpy(images, test->img, test->img_s);

printf("address of test: %p\n", test->img); // works
printf("size... %i\n", (int) test->img_s); // works
printf("test: %s\n", *((test->img)+0)); // works
printf("test: %s\n", *((test->img)+1)); // works
return 0;
}
>>
how do I git gud
>>
>>62197243
Just like use search my negroe
https://github.com/trending?l=cpp

Sometimes devs mark issues with newcomers labels
>>
>>62197366
There's an npm packet for it: https://www.npmjs.com/package/gitgud
>>
>>62197377
is that a good thing or a bad thing that npm has shit like "is-negative-zero"?
>>
EVALUATE TRUE ALSO desired-speed ALSO current-speed
WHEN lid-closed ALSO min-speed THRU max-speed ALSO LESS THAN desired-speed
PERFORM speed-up-machine
WHEN lid-closed ALSO min-speed THRU max-speed ALSO GREATER THAN desired-speed
PERFORM slow-down-machine
WHEN lid-open ALSO ANY ALSO NOT ZERO
PERFORM emergency-stop
WHEN OTHER
CONTINUE
END-EVALUATE
>>
>>62197386
COBOL is cute.
>>
How can I rename master / slave in my code to be politically correct?

I'm thinking seme and uke like in yaoi, because gay stuff can never be offensive.
>>
>>62197444
>not realizing how racists you are towards japanese people
>>
>>62197317
You're not attempting to print the newly allocated memory region

printf("test: %s\n", *((test->img)+0));       // works
printf("test: %s\n", *((test->img)+1)); // works


works only sometimes for me, sometimes it causes a segment fault.
>>
File: 1-df4p5VuCS5XPctlBQmdFEg.png (198KB, 1200x681px) Image search: [Google]
1-df4p5VuCS5XPctlBQmdFEg.png
198KB, 1200x681px
Hello, I'm an asyncio babby.
Currently I'm using the websockets library, but I can't figure out how to make this piece of basic server code multithreaded (with ThreadPoolExecutor, for example):

import asyncio
import websockets

async def hello(websocket, path):
name = await websocket.recv()
print("< {}".format(name))

greeting = "Hello {}!".format(name)
await websocket.send(greeting)
print("> {}".format(greeting))

start_server = websockets.serve(hello, 'localhost', 8765)

asyncio.get_event_loop().run_until_complete(start_server)
asyncio.get_event_loop().run_forever()


Any help appreciated, async is melting my brain.
>>
>>62196830
>>62196849
>>62196752
Someone told me most companies don't even do background checks. Is this true?
>>
>>62197595
Most probably they are going to look at your Facebook profile.
>>
>>62197595
I'm not American. I wouldn't know what the situation is like there but here I wouldn't expect them to. They look at your professional history. If you've got a work history gap that's a work history gap, which you may have to explain.
>>
>>62197637
>programmer
>facebook profile
these two don't overlap very often
>>
>>62197637
>>62197675
Ok thanks. I taught myself Java out of a textbook in prison. I didn't have a compiler but the knowledge I retained helped a lot so if I can't find a job oh well I didnt spend 60k on tuition.
>>
>>62197740
Do you have actual experience programming? I mean non trivial projects, doesn't matter if they are not done in a professional setting. This should be enough to land an entry level programming job.
>>
What are some projects with a decent codebase that need help? I don't mind writing C, Java or C# or learning some functional language. I want o start contributing quickly and getting famous on GitHub.

How do I switch to Python 3 as the default on a Debian system that has Python 2.7 as the default?
>>
>>62197814
python3
>>
>>62197814
Enhance image viewers and web browser with bpg of other image formats.
>>
>>62197814
I just don't install python2 at all but removing it and symlinking should work. Just be advised some python2 scripts are not compatible.
>>
>>62197317
ok I tried to run this on its own. and it worked fine. so I made it more like my program step by step. started by putting the malloc and memcpy in a function. worked fine. than I put the function in a SDL thread instead of calling it directly, not printing test->img seg faults. strangely, memcpy seems to work. that's what causes my program to seg fault...
>>
>>62197781
The only experience I have is with mSL. I used to write scripts for RuneScape bots lol. I plan to spend at least a year or 2 doing internships however.
>>
What C# program is well written and may be worth analyzing code-wise? I've started learning C# as my first programming language and want to some real programming stuff instead of FizzBuzz
>>
>>62194681
Oh damn, duh. Most logic you apply to sets you can apply to multisets, so it would still be a power set.
>>
>>62197875
You should definitely go for them. I get contacted quite often by recruiters and I haven't even graduated yet, probably thanks to the internships I've done.
>>
>>62197832
This will break a lot of shit on a Debian system. Don't do it.
>>
>tfw suddenly
#define private public
>>
>>62198326
You forgot a few.
#define protected public
#define class struct

Also I'm pretty sure #defining keywords is undefined behavior.
>>
>>62198326
#define if(x) if (rand() % 100 == 0) exit (1); else if(x)
>>
Can we all agree Eclipse Oxygen is an excellent IDE?
>>
>>62196648
Holy shit, did I just learn the kanji for 'code'?
>>
>>62196951
Someone new is going to come along and take this seriously.
>>
>>62198427
That's the point of every informative infographics.
>>
>>62198118
Even with update-alternatives?
>>
>>62197582
nvm, it works fine without threads.
I was getting 500 requests per second on localhost when I posted that. But after some time I started getting 4000 reqs/sec, which is acceptable. I didn't change any code to achieve that, so that's both a blessing and a curse.
>>
>>62198427
and they'd be well-informed as a result. It's a mostly accurate chart.
>>
>>62196980
I'm also hard coding if you know what I mean.
>>
>>62198456
That will just rename the symlink. Many of the scripts the OS uses are python2. You can't get rid of python2 and symlink python2 to python3.
>>
>>62198403
Eclipse is shit.
>>
File: 1476305714411.png (31KB, 720x644px) Image search: [Google]
1476305714411.png
31KB, 720x644px
>>62197376
brilliant, thanks famalamadingdong
>>
>tfw can't do SICP 1.13
am I a brainlet? Should I just give up?
>>
CodeAcademy or Treehouse?
>>
>>62198585
>wasting his time on SICP
>am I a barinlet?
Yeah, you're are.
>>
>>62197637

Not that guy but I have an honest question. What on your FB profile could actually make a company ignore your resume?
>>
>>62198626
>t. brainlet
>>
>>62198585
Take a break for the day and come back later.
>>
>>62198626
>barinlet
You're far worse, idiot.
>>
>>62198613
What are you learning?
>>
>>62198645
Do you actually make your profile public? If not, the only thing that would hold you back from some is your profile pic. But also,
>Having an online identity
The worst mistake you could ever make
>>
>>62198670
>>62198695
>Lies, SICP is still relevant!
Even MIT doesn't teach it anymore, mostly because reading SICP only makes you good at solving SICP's exercises, something the real world has little in common with.
>>
>>62197858
what the fuck
printf("test 1: %i\n", test->img_s);
char *images = (char*) malloc(test->img_s);
printf("test 2: %i\n", test->img_s);

output:
>test1: 56
>test2: 1695715840 (random garbage that changes everytime i run the program)

I don't no anymore lol
>>
File: 1502357606879.png (26KB, 929x162px) Image search: [Google]
1502357606879.png
26KB, 929x162px
Useless /sqt/, reposting.
Google Sheets problem. I'm trying to get the 13.02% in pic related through =IMPORTXML. I can get Sheets to show the $0.033875 above it just fine by copying the XPath from inspect element, but when trying to copy the XPath for the % (and most other numbers on the webpage too) I get either two N/A errors, "Resource at url not found" and "Imported content is empty" if I try mucking around with the XPath. Been doing my head in all week, is there a way to get around this? This is the site in question: https://coinmarketcap.com/assets/funfair/#charts

So this works: =IMPORTXML("https://coinmarketcap.com/currencies/funfair/?","//*[@id='quote_price']") but if I replace the XPath here with the XPath of the % I get an N/A error.
>>
why do people/compilers do

XOR EDI,EDI

instead of
MOV EDI,0

is it faster or something?
>>
>>62198877
I'm not sure anyone uses Google Sheets here tbhwyfam
>>
>>62198986
>is it faster
It can be, it's not always preferable. You can google the thing if you're genuinely interested, there are quite a few details on it in the manual.
>>
>>62198988
His problem is clearly using incorrect xpath, considering he didn't even post it.
>>
>>62198986
It's faster because all the modern CPUs recognize the XOR A, A pattern and have specialized circuits for it. Plus it's shorter, using MOV A, 0 means you have to pull 2/4/8 all-zero bytes after the opcode, while XOR A A is like 2/4 bytes wide in total.
>>
>>62198777
run it in gdb and valgrind for max info
>>
MySQL or mongo?
>>
>all these OS hobbyists being proud of undergoing the task of reimplementing libc
>meanwhile I just copy/paste shit from their libs to mine
>>
>>62199076
mysql
>can't implement sql standard properly
>have their own shitty functions for stuff
mongo
>loses your data left and right
literally anything else
>actually decent database
>>
>>62199076
Postgres, and I'm not even meming.
>>
  final static class PrimaryKey {
final private Class clasz;
}

Isn't Java Class class a generic? Why he declared it without the angle bracklets?!
>>
>>62199270
You don't have to pass type parameters.
>>
File: 1502600816825.png (7KB, 441x120px) Image search: [Google]
1502600816825.png
7KB, 441x120px
>>62199022
Well this is what gets copied when copying the percentage: /html/body/div[3]/div/div[1]/div[3]/div[2]/span[2]
Is it because of some sort of incompatible-with-sheets formatting?
>>
>>62196895
what
>>
>>62199346
This is copied from current document structure, and that could very well have changed from how it initially was, by javascript, which Google's thing does not run.
>>
>>62198877
Did you consider using the API?
https://coinmarketcap.com/api/
=ImportJSON("https://api.coinmarketcap.com/v1/ticker/funfair/", "/price_usd", "noInherit, noTruncate")
>>
File: MVI_4652.MOV.converted.webm (1MB, 1280x720px) Image search: [Google]
MVI_4652.MOV.converted.webm
1MB, 1280x720px
Do I get the job now???
>>
So I just got my Ph.D. in Physics but can basically only program in C (plus Mathematica and Matlab). I'm gonna leave academia and gonna try my luck in the private sector, like consulting and shit. Should I pick up Java, C++, Python, R, or what? I know it's a very vague question, I'm barely starting to look for jobs now, but I'm not sure what is more appreciated in the field.
>>
>>62198877
>FUNFAIR

Patrician taste anon.
>>
>>62199560
Just don't get into anime and you'll be fine I guess
>>
>>62199542

>we asked you to do this for numbers between 1 and 100, anon
>we'll be "in touch"
>>
>>62199542
It's nice, but what JavaScript frameworks have you worked with?
>>
>>62199560
>Physics
Go with Python then C++.
>>
>>62199528
I'll try adding it tomorrow, need to make up for no sleep last night, cheers anon. Didn't know Google Sheets could be that extensive until recently.

>>62199566
End of the year's going to be amazing
>>
>>62199583
T-t-t-thanks. See y-y-you!
>>62199611
Thank you for your brilliant question! I used mainly the C-Framework to build this.
>>
>>62199645
You should be using angular with JSX and typescript. Cmon don't be stuck in the past, embrace modern javascript
>>
>>62199579
I-I'll try, anon.
>>62199620
Thanks! However, I'm not looking forward to work on Physics, since my Ph.D. was on Particle Physics so there's no hope to find work about that in the private sector, kek. So I'm looking at random "consulting" jobs, which right now sound like a meme to me and have no actual idea of what the fuck they do, but it seems that they do look for profiles like mine. Still Python and C++?
>>
>>62199645
>he doesn't use JS for embedded
>he doesn't know about http://www.espruino.com/
What is this, 2016?
>>
>>62199721
Go for Machine Learning which is hot right now. ML heavily relies on statistics, probability, linear algebra and I bet someone with PhD in Physics has a better background for this than someone with CS degree(unless it was ML oriented). The ML industru grows fast and is rewarding. Many physicists are working in ML industry already. You should probably search for basic cources to understand instruments you need. You'll sure have to learn Python.
>>
>lightweight
>crossplatform
>gui
What's my choice?
>>
>>62199919
Yes indeed that was another option, some friends have already gone the ML way. Gotta give it a try. Thanks!
>>
>>62199938
SDL with nuklear.
>>
>>62199988
Can I get native look with nuklear?
>>
>>62199938
You have to pick 2. For example, `being lightweight` is only marginally useful, `actually having features` is a much more important quality. I bet you already can say I think you should use Qt.
>>
>>62200026
lol no but you said cross platform which pretty much means that no native look.
>>
>>62200042
Java had some features to have native look, but it was long ago, and Java isn't certainly my choice, since it would require installed JVM.

>>62200035
I don't want to have my program take tens of megs. Though, if I want that, my choice is probably to program in raw WinAPI/Xlib.
>>
>>62200127
>raw WinAPI/Xlib
>cross-platform
>>
>>62200137
I know, right?
I talk if I want take lightweightness as the priority.
>>
Where do I go to learn about JIT?
>>
>>62200161
>prioritizing lightweight over cross-platform
>>
Can you make it as a developer if you only focus on developing for one platform and ignore all other languages?
>>
>>62200362
>only focus on developing for one PLATFORM
>ignore all other LANGUAGES
could you elaborate
>>
>>62200196
Wade through the LuaJIT, its not insanely large. There are some paper put out by the unladen swallow team that are pretty nice.
>>
>>62200376
Can you make a living just by being an Android coding monkey?
>>
>>62200362
Considering that some stuff runs either on linux or windows but not both kind of suggests that it's possible.
>>
>>62200401
you could if your ideas for apps are really good and you have a lot of them but what does that have to do with languages
what are the "other languages" in this case that you would be ignoring
>>
>>62200425
Where I live, 99% of the jobs consist of doing the work for half the price 1st world countries would charge for it. So it's 90% web development. I don't wanna be a webdev
>>
>>62200439
ok i'm sorry to hear you're in that situation but what does that have to do with languages though
i can see how it has to do with platforms
android vs web
but where do languages come in
>inb4 you say something not true such as "what platform you're coding for determines what language you have to use"
>>
>>62200468
Wrong phrasing on my part, I'm somewhat skilled with native Android development, knowing some Java and my way around Android Studio. Just wondering if that's enough to get me started or should I get back to school.
>>
I'm not a CS guy, I'm Mech Eng student.
I'm very good with MATLAB.

Anyway, I'll have to be teaching myself C++ for a thesis I want to be starting next year. I'll be doing this with:
>Programming: Principles and Practice Using C++ by Stroustrup
I'll be supplementing it with other books from the /sci/ wiki.
>e.g. Data Structures and Algorithms in C++ by Drozdek

How does this sound to you guys?
How did you lean for yourselves?
Any alternative recommendations?
>>
File: 1503388202240.gif (577KB, 540x540px) Image search: [Google]
1503388202240.gif
577KB, 540x540px
>>62200272
>if
>>
long time;

heheheheeh
>>
>>62199804
>>62199671

kys
>>
>>62200617
I never read a book on it. I did some tutorial on the internet, then started writing programs, always finding suitable tutorials for each type of program (mostly games.)
I've read the C++ Primer book a little but really, didn't find it that useful. There's so much material on the internet you just search for it when you need it.
>>
File: 01155.gif (114KB, 650x450px) Image search: [Google]
01155.gif
114KB, 650x450px
>>62200636
>while
>>
>>62200617
>Data Structures and Algorithms in C++ by Drozdek
Personally, I prefer Goodrich, but yeah, it'll probably work just as well. Bjarne's book is suppose to carry someone who's never done any amount of coding, so both of those sound decent. Good luck.
>>
>>62198406
No, you've just learned the katakana for "code"
>>
>>62200530
If you already know the basics, I'd say dive right in, and if you have any questions on how to do something you want to do but haven't tried before, look it up.
What people don't tell you is that Android development isn't so much about programming. As I'm sure you've already noticed, since it's Java we're talking about, most of the basic building blocks you ever need are already there for you. Consequently, Android development is often much more about vision, perseverance, knowing how to most effectively get the word out on your app once it's done, and knowing how to keep your mouth shut until then so no one steals your idea and does it first.
>>
>>62200713
The Katakana says Ma Shi Nn. The Kanji is actually "Language."
>>
(((o(*゚▽゚*)o))) I passed the technical interview!
>>
File: 1418081126229.gif (3MB, 1280x720px) Image search: [Google]
1418081126229.gif
3MB, 1280x720px
>>62200740
Good job, Anon!
>>
>want to publish some free apps on the android store
>have to pay $25 to register
>i actually have to pay money to work and waste my time for no reward whatsoever
great
this is the capitalist dream
>>
>>62200790
Better than paying $100 a year
>>
>>62200790
Or upload it to F-Droid.
>>
>>62197243

Emscripen or Webassembly. Alon Zakai is a nice guy.

https://github.com/kripken/emscripten
>>
>>62200800
It's fine i don't mind paying, by the part i hate the most is publishing my shit and then observing the download counter which never moves suggesting that i once more failed miserably
>>
>>62200823
Unless you can market your shit, the smartphone market is absolute garbage.
>>
>>62200817
Good idea, i will do both.
Fdroid is schway, but the user base is minute compared to the google gay store
>>
>>62200821
Does anyone think WebAssembly will actually change the web as we know it?
>>
>>62200790
>want to publish some free apps on the android store
>have to pay a one-time fee of about enough to take a chubby girl out to dinner
the problem here is what exactly
>>
>>62200832
I don't have money for marketing and no connections in the biz and i only publish small shit always for free and with no ads so my only hope is the word of mouth and hitting the jackpot like thta fat asshole notch did
>>
>>62200740
Well, time to hang yourself
>>
>>62200850
>like that fat asshole notch
Notch did systematic shilling on /v/ for months to get where he is now. And no, I'm not shitting you.
>>
>>62200850
>fat asshole
but minecraft is a good game though????
>>
>>62200848
Not everyone is a welfare sucking rich amerifat, it's more than i make in a week
>>
Its a bad thing
>>
>>62200865
>systematic shilling on /v/
This explains PUBGs popularity
>>
>>62200871
>Not everyone is a welfare sucking rich amerifat
plese explmn to me how this are possibel??????!?!?
wOW my culturel vioo have been expand hur a fucking dur
>>
>>62198553
Oxygen is okay actually.
>>
>>62200870
when notch made minecraft, before he hired coders, the code was so bad it was literal joke, he got rich because he was incredibly lucky and stumbled on a hole in a market nobody knew existed, not even notch, one lucky idea is all it takes .. and the word of mouth obviously
>>
>>62200832
>, the smartphone market is absolute garbage.
it's so fucking saturated, every time i come up with an app idea, i look at the store and there are 10 fucking apps that already did it both worse and better
>>
>>62200969
The bubble's popped, at this point, it's just people desperately trying to scavenge crumbs.
>>
Can my application be closed sourced when i used apache licence components in it?
>>
>>62201028
Yes.
>>
File: 1493199906103.gif (2MB, 498x338px) Image search: [Google]
1493199906103.gif
2MB, 498x338px
>mfw my little bro is going to learn C# instead of Pascal and fucking Fortran 77/90
>>
>>62201062
>little bro is going to learn C#
He'll stop after he realizes he can't make shit in Unity
>>
File: Virginia is for lovers.jpg (353KB, 860x575px) Image search: [Google]
Virginia is for lovers.jpg
353KB, 860x575px
Best Intel 8080 assembly book? Looking to make an emulator for my operating systems class project.
>>
>>62201097
He'll learn it at the uni, not by himself.
>>
>>62201145
>C#
>In Uni
What kind of shit school is he going to?
>>
>>62201168
Do you have something better?
>>
>>62201194
Any other college is sounding pretty good, honestly.
>>
>>62201208
I'm talking about language.
>>
>>62196692
I got hired with a Possession of Meth charge and a Felony Level Shoplifting charge.

At a pretty big damn company. So, yeah. I would say programming/IT is a bit more open to hiring dem felons. Just be honest. Also, know how to program and interview well- the sense I got was that they cared more about what I could do then my past work history, life, etc.
>>
>>62201217
C++, Java, or Python.
I know you think I'm memeing, but I'm not.
>>
>>62201217
http://www.cs.utexas.edu/users/EWD/OtherDocs/To%20the%20Budget%20Council%20concerning%20Haskell.pdf
>>
>>62201194
Something that doesn't require Windows or .Net core. Java, Python, C++, literally anything other than C#
>>
Shit the app store wants to me include a privacy policy, where i can find some hostel only? Kind of like GPL of privacy policies, where it says i wont share the user info etc
>>
>>62201246
Well, why, it's any better than Pascal.
They would learn C++, but their professor isn't aware about new versions of g++ (like, g++ is too old).
Python is not the language I like, so I won't tell anything about it.
And Java - is Java such different from C#? I think once he takes a grasp, he'll be able to switch freely between languages.
>>
>>62201276
>Djikstra
>Haskell
wew
>>
>>62201276
Maybe he'll have FP course, so something like Lisp or Haskell should appear.
>>62201294
Yeah, I told him that's not the best language because of hard Microsoft dependency.
>>
>>62201348
Those languages rule the job market, wouldn't it be nicer to just have yourself ready to land a job after school?
>>
>>62201365
>Maybe he'll have FP course
Fat chance if his university chose C# as their intro language.
They're much more likely to have multiple courses on 'OOP'.
>>
>>62201168
My uni does C, Java and C# and that is at CS.
There are IT courses what teach JavaScript
>>
>>62201379
C# is popular enough to find a job, though.
>>62201410
I dunno, I was taught Pascal, Fortran, C and C++ and yet I had a course on Prolog.
>>
File: 1494742042996.jpg (41KB, 698x695px) Image search: [Google]
1494742042996.jpg
41KB, 698x695px
Math-anons: I require aid!

I'm trying to create a spring interpolation function. It should output the (float) distance given the time and the parameters shown.

I really have no idea how to approach this other than the fact that the second part looks like a bunch of sine waves. Google is giving me nothing for spring interpolation. Any advice or direction would help.
>>
>>62201436
>Java AND C#
Where the fuck are you guys going to school at? Holy shit.
>>
>>62201450
>I was taught[...]
Well that's probably why you had a course on prolog. You went to a decent university.
>>
>>62197444
Used master and puppet in a project. I think it's fine to use master in this context, and puppet sounds kinda cute. Never field-tested that assumption using real tumblr meat though
>>
>>62197444
>not just being satirical and using whiteman / blackman
>>
>>62197444
>master / slave
You use worker and manager quite frequently.
That's classist though. Managers most certainly do work.
>>
>>62201451
look for 'harmonic oscillator'
>>
>>62196663
>>62196685
How do you even write code without OOP?
>>
>>62201531
>This is the fate of OOP-only programmers
Smalltalk was a mistake
>>
>>62201549
I think you'll find most of these people are from languages like C# and Java, not Smalltalk.
>>
File: functional-vs-oop.jpg (134KB, 1200x488px) Image search: [Google]
functional-vs-oop.jpg
134KB, 1200x488px
>>62196625
>>
>>62201563
Smalltalk was everyone's favorite OOP language before those
>>
File: 1502815208446.jpg (23KB, 372x314px) Image search: [Google]
1502815208446.jpg
23KB, 372x314px
>>62201531
Is that bait?
>>
>>62201572
Yeah and it was relatively sane.
>>
>>62201563
Yep, C# and Java developer here.

>>62201573
Serious question. My brain is wired for OOP. I can't imagine how you'd structure and design any medium to large project without OOP.
>>
>>62201580
>OOP
>Sane
pick one
>>
>>62196453
I'm working on a brand new desktop environment using Electron. Any suggestions?
>>
>>62201607
kill yourself
>>
>>62201607
Stop.
>>
>>62201595
>any medium to large
Well, it's medium to large, most do such projects with OOP.
Anyway, it's going to be
method(struct)

instead of
object.method()
>>
my computer architecture professor's such a dick. idk why but i think he likes feeling like everyone but him is stupid. when he was talking about the left shift operation, he said he didn't want to get into the uses of it. and i asked isn't it used for multiplying by 2 and he refused to even acknowledge that's a use of it. as if saying yes, that's a use of it, would be going too fast. idk what his problem is
>>
>>62201825
Some are too lazy to do anything out of their learning plan. Who knows, man.
>>
>>62201825
it's a shit use for it.
>>
Python has way too many built-in functions polluting the default namespace. I'm tired of picking a variable name only to have it wind up shadowing something else.
>>
>>62201876
troll post
>>
>>62201897
state your reasons
>>
>>62201607
minimalism
>>
takes my laptop good 15 seconds to run 100000000 iterations
#include <stdio.h>
#include <math.h>

int main()
{
double pi, iteration_value;
int number_of_iterations, initial;

scanf("%d", &number_of_iterations);

pi = 0;
for (initial = 1; initial <= number_of_iterations; initial++){
iteration_value = (pow(-1.0, initial) * 4.0 ) / (-2.0 * initial + 1.0);
pi += iteration_value;
}
printf("%.5f", pi);

return 0;
}
>>
>>62201825
>idk why but i think he likes feeling like everyone but him is stupid
Calm down, just act stupid with him, praise him, like he's the cleverest man in the world, he'll step on his shit someday.
>>
>>62201568
delet
>>
>>62201893
True. I get caught every now and then by that shit, but so be it.
>>
>>62201933
he also asked for a way to turn a counter that counts up into a counter that counts down, and he said he didn't think my solution would work. i said to invert all the bits at the end. so instead of
0000
0001
0010

it'd be
1111
1110
1101

it'd have been different if he said it's because it used more parts than the solution he wanted but he acted like it didn't make it count down
>>
>>62201959
wat
>>
File: IMG_4655-resized.jpg (270KB, 2500x1666px) Image search: [Google]
IMG_4655-resized.jpg
270KB, 2500x1666px
>>62196453
>What are you working on, /g/?
ported my hd44780 C-lib to python.
Worked pretty flawless desu. Had a few minor bugs, but went pretty well.

Why did I port it to python?
Because I want to make a nice little status display for shit like current radio stream running, weather forecast and maybe some other shit - will see. Shit like that will A LOT easier in python than in C.
>>
File: csci.jpg (1020KB, 2560x1440px) Image search: [Google]
csci.jpg
1020KB, 2560x1440px
literally just wanted to make video games
>>
>>62202058
if you thought making vidya is easy then pls kys. Thanks.
>>
>>62202058
parallel programming is the future anon, you're not wasting your time
>>
>>62202058
This is why the people who state "I want to make video games!" are laughed at in CompSci courses.
>>
>>62202058
>90% of CS students right now
>>
>>62202058
what is that
>>
File: 710201223221.jpg (82KB, 574x606px) Image search: [Google]
710201223221.jpg
82KB, 574x606px
>>62202126
forgot pic
>>
File: 1491623641826.png (11KB, 398x320px) Image search: [Google]
1491623641826.png
11KB, 398x320px
Sorry for such a simple question, but what should I do with this summary comment Visual Studio created?
>>
>>62202130
it's discussing how to change and the effects of changing a network topology from a more highly connected network (hypercube) to a less densely connected network (mesh)
>>
>>62202146
C# btw.
>>
>>62202152
oh i see
so it's about the congestion bullshit and cost and all that crap
>>
>>62202094
>the future
The future is now, man
>>
What is the memest license I could use for a project?
>>
How do I add to this segment of my code
for(i=0;i<n;i++)
{
printf("Enter the %dth number: ", (i+1));
scanf("%d", &a[i]);
while(a[i] <= 0 || a[i] > 300)
{
printf("Please enter a valid number between 1 to 300.\n");
scanf("%d", &a[i]);
}
}

such that characters or strings will also reflect the same message?
>>
>>62202352
>Enter the 1th number:
>>
>>62196453
```python
def run(values):
seniles, adults, juniors, senile_sr, adult_sr, junior_sr, birth_rate, generations = values
for x in range(generations):
seniles_sn = seniles * senile_sr
adults_sn = adults * adult_sr
juniors_sn = juniors * adult_sn + juniors * juniors_sr
print("seniles: " , seniles_sn , "adults: " , adults_sn , "juniors: " , juniors_sn)
```
getting a name is not defined error for senile_sn and am looking for solutions
>>
>>62202352
>>62202381
>2th
>>
>>62202381
>>62202442
3th
>>
>>62202323
wtfpl
>>
>>62202499
best license
>>
>>62200643
let go;

haha
>>
I got a project but I'm not sure if its even possible. I wanna make my pi into an internet radio (easy), but I want to control it through a web browser.

So like, the pi is playing internet radio through its audio out with python or something, but then I can take my phone or tablet on wifi and go to its IP on the local network in my web browser and change the station etc.

Web is inherently stateless and disconnected from programs that are running on the server itself, for obvious reasons, so I dunno how you'd even do it.
>>
>>62202517
def initely():

teeheehee
>>
>>62202517
 long while; 
>>
File: stop callin me phil.png (102KB, 320x248px) Image search: [Google]
stop callin me phil.png
102KB, 320x248px
>>62202550
short man;
>>
>>62202547
>>62202550
impl ying {

heh
>>
https://en.wikipedia.org/wiki/Centipede_(video_game)

I'm tired of writing games for prog assignments. When will this stop? 2nd semester student here.
>>
>>62202628
>Writing games for prog assignments
>2nd semester student
Where are you going to college? Digipen?
>>
Just started learning pointers in C. I don't fucking get it
>>
>>62202643
I-it's a public university somewhere.
>>
>>62202652
It's literally just an address.
>>
>>62196895
>Any structure isn't defined with brackets but with some ugly "end" system relying on proper indentation from other people when trying to look at their code
>>
>>62202656
I've never heard of game projects for first year students. Are you doing some kind of Multimedia focus or something?
>>
Ionic app with Typescript. Fucking shoot me.
>>
>>62202652
This >>62202682
You grab the address of a variable, can dereference (grab the value, not the address) with *, and fuck with it.
>>
>>62202700
No. Is this supposed to be a bad thing? It's tiresome to make games, but the professors say it helps us to structure or code better, etc.
>>
>>62202732
>structure our code better
>>
>>62202732
Not necessarily, just strange.
>>
>>62201062
> C#
> Microsoft Java
Fucking shoot him
>>
>>62202756
A friend of mine that studies in another uni said the same.
My final assignment in the first semester had 1175 lines of code. He said that he reached ~900 during his third semester, and almost never programmed games.
>>
File: Capture.jpg (23KB, 525x440px) Image search: [Google]
Capture.jpg
23KB, 525x440px
>>62201451
Still workan on this
>>
>>62201607
Good luck on that
>>
>>62202781
That's pretty close to my current experience too. Maybe your college is just aware that games are what most first year students want to make anyway.
>>
>>62201451
>>62202806

It's spline interpolation, not "spring"
>>
File: cs.jpg (1MB, 1904x4706px) Image search: [Google]
cs.jpg
1MB, 1904x4706px
>>62202058
>>62202141
>>
>>62202880
>also zed shaw
Why the hate for Programming Motherfucker guy?
>>
>>62202944
He shits on C, /g/ (indirectly) and everything that smells "academic".

Plus, his books sucks.
>>
which of these do you agree/disagree with?

>KISS
>DRY
>YAGNI
>NIMBY
>MAD
>>
>>62202944
Because he's stupid. According to Zed Shaw Python isn't a turing complete language because Python 3 isn't backwards compatible with Python 2.
>>
>>62202970
>He shits on C
as anyone with minimal education in PLT
>>
>>62202970
>He shits on /g/
Seriously?
>>
File: kek.png (24KB, 674x290px) Image search: [Google]
kek.png
24KB, 674x290px
Why is Objective C so ugly /g/?
>>
>>62202141
Man, I remember that shit
>>
>>62203028
Same thing in Swift:
func sayHello() {
print("Hello, World!")
}
>>
>>62202146
What do you mean by "what should I do"? It's an XML doc comment. You can either leave it be, delete it, or replace it with your own XML doc. You might as well just leave it be.
>>
>>62201451
Did you try construction a polynomial for that?
>>
How do I get to an expert level like you guys? I just know Java really and learnt c++ some time ago.

I don't how to write programs to extract stuff from websites or make 3D models and more of the complicated stuff. Is there like a guide or bunch of exercises to get there?
Like a step by step guide?
>>
>>62202971
I've never heard NIMBY or MAD
>>
>>62203028
Opening brace on a separate line? Immediate blacklist.
>>
>>62203028
muh strict superset
>>
>>62203028
it's not actually.
>>
File: Capture.jpg (18KB, 486x144px) Image search: [Google]
Capture.jpg
18KB, 486x144px
>>62202852
Spline interpolation isn't what I want. Spline interpolation helps find the best fit curve through arbitrary points. I've already implemented that with the quadratic bezier formula.
I'm trying to emulate what happens when a spring system is released and tries to reach equilibrium. If I pulled this block to left and released it, it would fly towards the right, overshoot the center, then bounce back and forth a few times before resting in the center.
>>
File: trialanderror.png (14KB, 445x461px) Image search: [Google]
trialanderror.png
14KB, 445x461px
>>62202806
>>
>>62203006
t. Neet
>>
>>62203068
>Not liking K&R or Block style
>>
>>62203061
>expert level like you guys
>to extract stuff from websites
trivial, just has to be learnt
>or make 3D models
same
>and more of the complicated stuff.
like?

if you know java, just use java modules to for ex. extract stuff from websites
google shit

if you dont know what a website is, google that too - learn html, css and javascript - it takes a day to get a feel for how those work

use text editor and command line though, dont use IDE's and shit
>>
>>62203061

Webscraping is piss easy with Python, there's lot of tutorials, if you want to get into the nitty-gritty of 3D I'd say look into DirectX or at least some libs to get you started like SDL, both of which are geared for C++. If you want a core understanding pick up some 3D math books. There a lot of good ones out there.
>>
What are some good sources to learn how to program in R? Need it for a finance study group I'm intending to participate
>>
anyone know of any good practical guides to making a programming language? emphasis on practical. inb4 ''you need to know the theory brainlet'' i know about grammars and stuff, now i want to be able to apply it
>>
>>62203152
>making a programming language?
write an interpreter
write a compiler to assembly
write a compiler to llvm
write a compiler to C
>>
File: godsofprogramming.jpg (100KB, 600x600px) Image search: [Google]
godsofprogramming.jpg
100KB, 600x600px
>>62203152
C
http://www.buildyourownlisp.com/

Ruby
http://hokstad.com/compiler

Racket
http://cs.brown.edu/~sk/Publications/Books/ProgLangs/
https://users.dcc.uchile.cl/~etanter/ooplai/
>>
>function call overhead
>>
>>62203189
how much of the stuff in buildyourownlisp am i going to be able to skip without missing out on anything if i already know C? the guy says he's going to be teaching you C in it
>>
>>62203205
>calling functions
>not inlining everything
>>
currently making an ncurses (partial?) replacement in c++. working on the ISO6429 right now. it's going well!
>>
>>62203225
I'm not using function pointers am I?
>>
>>62203189
>http://www.buildyourownlisp.com/
give me a quick rundown
is it a compiler, interpreter
what does it compile to
what data types are there
>>
>>62203152
Read the Dragon book.
>>
>>62203240
>not precautionally inlining every possible function
>>
>premature optimization is evil
>function call overhead
Well which one is it then, you can only choose one.
>>
>>62196556
are you writing your own kernel?
>>
>>62203318
Yes
>>
>>62196556
This looks easy!
>>
>>62203331
cool
where do i start with that
the thing that's stopping me is not knowing how to start it

i have an idea how to implement processes, what to do with the memory etc.
i just don't know how to start
>>
File: Capture.jpg (72KB, 626x772px) Image search: [Google]
Capture.jpg
72KB, 626x772px
>>62203092
Thanks, from that equation I was able to make this, which is exactly what I want. Now I just have to figure exactly how to manipulate the variables.
>>
>>62203085
Draw the free-body diagram, write out the equations of motion, solve the differential equation, apply initial conditions, plot.
>>
>>62203383
Osdev.org
>>
File: consider.jpg (29KB, 600x600px) Image search: [Google]
consider.jpg
29KB, 600x600px
new thread
>>62203462
>>
>>62203412
My understanding from high school physics is that the box technically oscillates an infinite amount of times when released, and never truly comes to rest. I'm only trying to emulate this behavior with a fixed amount of oscillations, meaning solving the real-world equations wouldn't help me.
>>
>>62203514
Except it would. Your diagram earlier is a basic spring-mass system. Solve the equations of motion and you get the nice oscillating curve that you expect. What you're trying to model is a spring-mass-damper system, where the damper is friction. Again, solve the equations of motion and you'll get a nice exponentially damped oscillatory curve. It's basic dynamics, anon.
>>
>>62203608
graph earlier shows an increase of frequency though, not sure if this is intended
>>
>>62203781
make the spring/damper coefficients a function of time /shrug
>>
>>62198029

Anyone?
Thread posts: 318
Thread images: 37


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