[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: 313
Thread images: 40

File: anime_programming_language.png.png (1MB, 1200x1800px) Image search: [Google]
anime_programming_language.png.png
1MB, 1200x1800px
No time for love edition

Previous Thread: >>60455882

What are you working on, /g/?
>>
File: 1494215968986.gif (535KB, 540x304px) Image search: [Google]
1494215968986.gif
535KB, 540x304px
Rewriting C in the simply typed lambda calculus.
>>
Reposting because I didn't see there's a new thread

I have an array of indices for opengl, but every second index number is not for drawing the actual mesh. Any way I can specify a stride for the indices? I know it's possible for the vertex buffer, but I can't find anything about what I need. Please send help
>>
>>60461653
I know the answer, but I will demand an anime image as payment.
>>
>>60461621

wtf I love scala now
>>
>>60461621
Multi-layer composite cache. I have a bunch of threads. Threads belong to board(s). A board is sorted and paginated in bump order. Everything is cached. When you request a board page from cache, it queries the complete board cache, which is rebuilt on demand from individual cached threads, which are all updated and recached on expiration.
>>
https://ideone.com/R9cE7i
Cryptography in the worlds safest language cause Actionscript makes me want to shot myself
>>
>>60461719
>Actionscript
why?
>>
>>60461673
I would rather drown in the opengl specification sheets, thanks.
>>
File: 316842.png (193KB, 1920x1200px) Image search: [Google]
316842.png
193KB, 1920x1200px
>>60461653
Nyoro~n

Beware Freeman
>>
>>60461765
So basically you're admitting that you're a redditor then.
>>
File: 1492998899618.png (39KB, 1000x500px) Image search: [Google]
1492998899618.png
39KB, 1000x500px
>>60461765
You can piss right off, then.
>>
>>60461653
>>60461765
>video games
>non-anime reddit poster
Please return to >>>/v/
>>
>>60461788
>>60461808
>>60461825
>>60461779
Nice meme you faggots, go fap to your waifus
>>
@60461857
>meme
>go fap to your waifus
>>>/v/
>>>/r/abbit/
>>
>>60461765
I don't want reddit stink nearby. Fuck off.
>>
>>60461621
I wanna write a simple journal

It reads a directory of markdown files which have date and title metadata

and gives the option of outputting a simple html page with all the entries in chronological order.

1) Thinking about sharpening my go skills so is go good?
>>
reposting
>>60462037
>>
>>60461621
>that picture
Holy shit, Ruby's actually a girl, and she's posting in these threads? FUCK
>>
>>60461653
I thought you could specify a stride using glBufferData, I guess not.
>>
>>60462102
See >>60462227

char can be both signed and unsigned, as the standard allow the implementation to use either as default.
>>
>>60461621
Would love to fuck Ruby, Scala and ActionScript
>>
>>60462245
Is changing the default allowed for int as well? Although I'll agree that making unsigned default makes less sense than for char
>>
>>60462102
>>60462245
a file can contain any number of 8-bit values. getchar gets the next value or nothing. To distinguish the end-of-file condition, we need a value that's distinct from all possible 8-bit values, which doesn't necessarily fit in a char.
>>
>>60462359
>Is changing the default allowed for int as well
No
>>
>>60462359
http://en.cppreference.com/w/c/language/type

char is special, but it doesn't explain why char is unfit for the return type of getchar. See >>60462370
>>
>>60462370
>>60462383
danke
>>
>>60462389
Bitte
>>
>>60461621
>139cm
Nigga wut da fug is this picture? Are you so severely autistic that you jizz when calculating the BMI of chinese drawings?
>>
>>60462209
That's what I hoped for, but you can only use strides with the vertexattribpointer function, which is not used for the element array buffer object.

I just went and split up the index array into vertex indices and normal indices, it will have to do for now.
>>
>>60462463
>Nigga
Fuck off. I'm not your "Nigga".
>>
Guys I got a question.
When using exists in sql I can get a value of 0 or 1 however applying this to any freaking language such as java, c or c# I always get 1 no matter what I do.
What to do?!
>>
>>60462601
what
>>
>>60462612
Exactly, "what".
That's how I feel when I am using SQL.
>>
>>60462601
>>60462618
Try asking on >>>/g/sqt/
>>
File: monitor.png (253KB, 1920x1080px) Image search: [Google]
monitor.png
253KB, 1920x1080px
>>60461621
General purpose multi-client multi-server log aggregator.

Clients pipe any kind of log data to the client tool which sends it over HTTP to server
Server keeps track of all the logs it received
Viewer is a web frontend
Watcher monitors the logs for anomalies/bad values/unmet expectations (like no heartbeat from client X for too long)/whatever and takes action

About 30% done, any suggestions?
>>
>>60462601
What exactly are you trying to do?
>>
>>60462601
Isn't your zero converted to '0' anywhere, then checked against a boolean resulting in True/1?
>>
@60462643
Not programming, why did you feel then need to post it here?
Fuck off back to your containment thread
>>>/g/wdg/
>>
File: wayland-screenshot.png (293KB, 1920x1080px) Image search: [Google]
wayland-screenshot.png
293KB, 1920x1080px
Is my script is ready?
Should I make firs release?
>>
File: 1493243930820.png (587KB, 625x918px) Image search: [Google]
1493243930820.png
587KB, 625x918px
>ITT one autist anime faggot OP shitting up the whole thing
>>
>>60462643
Dammit!
Write console client in C!
>>
>>60462705
Sure, seems like it.
>>
>>60462643

holy shit

an actual arch user
>>
>>60462705
I bet you copied the code from screenfetch, lazy ass nigga
>>
What's going on
>>
>>60462651
>>60462665
I am doing some exercises.
I got a thing where I run select exists on a subquery and then it returns either 1 for true and 0 for false. If I apply said query to java or c, it always return 1 as in true, don't know if this is due to it being a query that runs successfully, and not returning the value
>>
>>60462760
>135 sloc
>screenfetch
>5204 sloc
Lol no, I wrote it myself, only thing that is copied from screenfetch is package counter.
gentoofetch is 137 lines long, 5kb in size 42 times smaller than screenfetch 26 times smaller than neofetch. It's written in ASCII characrers, so no Unicode required. Memory detection doesn't work in busybox shell
>>
Man, I wish GPU programming wasn't such a fucking pain in the ass. What's not going right?
>>
>>60462736
>>60462760
https://github.com/DmitryHetman/gentoofetch
Look at code and say if it's awful somewhere.
>>
>>60462782
This is worse than that one thread with the underwater weighing and the sister pulling her hair up.

You keep saying what you're doing, but not what you're trying to do. What are you trying to determine?

The answer ought to be something like "I want to see if a particular piece of data on a SQL Server exists, and then get whether it exists in a C application."
>>
>>60462832
Learn Vulkan+OpenCL+C11, you don't need anything else.
>>
>>60462849
You missed the part where I said fucking pain in the ass
>>
>>60461621
Come here you little shell twink
>>
>>60462845
Right, might got me off wrong. But the exercises should be done with "whatever" language I like and the problem is that whenever I "try" it get the same result that it's always true but doing it "pure" sql against the console line I get true or false depending if it is there or not.
>>
>>60462855
You don't need CUDA, use OpenCL.
>>
>>60462871
Then it's obvious that you've misunderstood the meaning of the function's return values. You know who understands them perfectly and is willing to tell you? TFM.
>>
>>60462947
No I have understood it correctly and I got it to work.
Thanks for trying to help.
>>
>>60462834
>GPL
Dropped.
>>
>>60463079
Why?
>>
File: 2017-05-18-153141_116x54_scrot.png (3KB, 116x54px) Image search: [Google]
2017-05-18-153141_116x54_scrot.png
3KB, 116x54px
>>60462720
Probably will at some point, but I've only read K&R and never did a C project before.
Is argp nice?

>>60462738
Wow I never even noticed that arch logo really and now it bothers me
>>
>>60463079
Fuck off
>>
>>60463137
It's CIA-affiliated trash.
>>60463161
I watch you, anon.
>>
>>60463138
what panel is that tho
and what theme
>>
>>60463138
To write console client you must know sockets/stdio.h/ncurses.h.
>>
File: reading_sicp.webm (1MB, 1280x720px) Image search: [Google]
reading_sicp.webm
1MB, 1280x720px
>>60462675
Please, don't say that.

>>60461621
>What are you working on, /g/?

On the official /dpt/ Tetris game
>>
>>60462760
Why would you assume someone copied a simple ascii drawing program?
>>
>>60461653
See
>>60463587
>>
>>60461621 (OP)
>What are you working on, /g/?

Bored playing mutex dance in golang. So I try to make it channels only.
>>
>>60463944
Faggot. sync.atomic is what real men use.
>>
>>60463981
Real men don't use G*.
>>
>>60463747
>official
I'll only accept this if (non-sexualized) lolis are involved.

>>60461621
>What are you working on, /g/?
I've spent the last week writing only SQL. Maybe it's Stockholm syndrome, but I'm finding it pretty comfy overall, especially when your queries get used to show things to people.
>>
>>60464203
>comfy
>>>/v/
>>
>>60464203
>non-sexualized lolis
good taste
>>
>>60464203
https://github.com/withmetta/g_tetris
>>
>>60463981
its for a web dev project, so i guess sync.atomic is useless...
>>
>>60464291
>sepples
Get a load of this stupid faggot.
>>
>>60464309
>web """dev"""
Fuck off to your containment thread
>>>/g/wdg/
>>
>>60464291
Should have done the C# one. Fuck sepples.
>>
>>60464309
Or you do your service using your very own metacustom lockless datastructures and you outperform your competitors while experiencing intellectual orgasm. Your choice.
>>
>>60462643
what font is that btw?
>>
>>60464319
Why aren't you sending pull requests, anon? Don't you want to take part in the biggest project /dpt/ has ever undertaken?
>>
>>60461621
I wanna make C feel young again via mating press
>>
File: 2142345235246246.jpg (10KB, 180x180px) Image search: [Google]
2142345235246246.jpg
10KB, 180x180px
Is Go worth learning?

It seems like the best compromise between Pyhthonic and C-like syntax and close to C performance
>>
>>60462049
Orgmode, deft, and Emacs does this already.
>>
>>60464396
Cython? I don't understand what you're looking for in terms of syntax....
>>
Please everyone, share your advices and ideas

https://github.com/withmetta/g_tetris/issues/5

Your voice does matters
>>
>>60461621
So i'm trying to make a cash register program for my Dad. I'm writing in Pajeet(Java) how can I make the printwriter text choose a device and print?
>>
>>60464396
It is, if you plan to use it as statically-typed ~500 times faster Python replacement.
>>
File: 1459078146481.png (1MB, 1000x1400px) Image search: [Google]
1459078146481.png
1MB, 1000x1400px
Hey /dpt/,

Are there any good resources to start learning C++?
>>
>>60463241
GPLv3 protects software from DRM.
>>
>>60464350
>>60463944
This. Many operations in Golang are perfectly thread-safe. For example, slice appends are safe, if there is only one writer at any given time.
>>
>>60464583
"The C++ programing language"
>>
>>60464583
>find somebody studying CS in college
>bum his slides

just saved you 20k
>>
tfw got 97/100 on c# midterm are u proud of me /g/?
>>
>>60464650
Is it achievement?
>>
Can anyone tell me why normal forms aren't sufficient enough for strong database design?

I assumed if my database for my project is in third normal form it would be fine but I've started undertaking a database class and the lecturer says that normal forms alone are not sufficient for good database design but offers no insight as to why?

Is this over the top and if not what are the technical reasons he may be citing?
>>
>>60464606
I'll re-license your script under a proprietary license right now. You can't stop me.
>>
>>60464685
You can't re-license because you're not the author.
>>
>>60461621
damn R is cute, I suppose it will be the next language I learn.
>>
>>60464685
Responded to the wrong post, eh?
>>
>>60464655
second in class so i guess its a small one
>inb4 come here when ur first
>>
File: images.jpg (7KB, 221x228px) Image search: [Google]
images.jpg
7KB, 221x228px
>>60464650
>c# midterm

>A class for a language
>>
>>60464615
I spam 1k goroutine randomly consuming that lib. It whether deadlock or panic. So i don't think its thread-safe.
>>
>>60464713
So?
>>60464776
Nope.
>>
>>60464831
So it's legal to sue you for violating license terms.
>>
>>60464840
I mean you could try, I don't think you will succeed though.
>>
File: dlang_chan.jpg (139KB, 470x545px) Image search: [Google]
dlang_chan.jpg
139KB, 470x545px
Threadly reminder that dlang-chan is not dead; she's going to have her GC tumor removed (eventually); and she's super duper cute and easy to prototype in! Say something nice about her, /dpt/!

>>60464583
Learn D~!
>>
Learning F#, trying to figure out the best way to do game dev constructs like manipulating data across the game loop. Doing a coding challenge thing on some site;
let getX x = if x > 0 then "S" else if x < 0 then "N" else ""
let getY y = if y > 0 then "E" else if y < 0 then "W" else ""
let getDir (x1, y1) (x2, y2) = (x2 - x1, y2 - y1)
let getCardinalDir (x, y) = getX y + getY x
>>
>>60464925
>game dev
>coding
>>>/v/
>>>/g/wdg/
>>
>>60464396
>close to C performance
Are you fucking retarded?

If you want both productivity AND speed you would actually use Nim, almost identical syntax of python. Or D, good and intuitive syntax.

Go is fucking slower than Java/C#.
Go is trash
Go absolute garbage
Fuck
>>
File: 1492501446016.jpg (106KB, 1280x720px) Image search: [Google]
1492501446016.jpg
106KB, 1280x720px
>>60464262
good taste indeed.

A loli should be adorable, not shoved into a gross sexual shoehorn.

>>60463747

Can you show your progress on this? I'm actually interested. What language?
>>
>>60464986

see
>>60464291
>>60464505
>>
>>60464943

Well, maybe there should be a /gdg/
>>
File: life.jpg (191KB, 784x811px) Image search: [Google]
life.jpg
191KB, 784x811px
>>60464650
>devoting an entire class to learning a language with no goals in mind
>>
>>60465015
This is probably one of those community colleges for subhumans. The goal is to be for a shitty job at the end, and so far they are aiming pretty accurate, no?
>>
>>60464986
you're a sexualized loli
>>
>>60464945
Calm down man, asking because Go has risen dramatically in popularity (from to 300 to top 50)

>>60464670
DBA here, good database design is simple and maintainable. There's no one-size fits all for your structures, but normalizing data is always a good step.


>>60464482
Go is kinda pythonic but really its closer to C.

I want something as versatile and productve as python but not as slow as python. Go seems to have a lot of libs too.

>>60464524
Like I'm so tempted to rewrite Jinja2 in Go because I know it will be way faster and more succint
>>
>>60465011
agdg on vg
>>
>>60465015
cs degree
goal is feeding myself by a job in the end like every education
>>
>>60465134

Oh awesome, I didn't know that existed. If you're the same anon, why /wdg/ if I'm into game dev?
>>
>>60465135
sad

this is how people get jobs at Microsoft doing nothing important
>>
In python I have a list of float tuples. I want to convert these to ints maintaining the tuple pairings and just losing the decimal point. Does anyone know how to do this? I'm embarrassingly stuck

ie take [(1.0,2.0), (3.0,4.0)] and turn it to [(1,2), (3,4)]
>>
>>60465058
>community colleges for subhumans
I couldn't afford anything other than community college. What is this, feudalism?
>>
>>60465197
int_list = [(int(x), int(y)) for x, y in float_list]
>>
>>60465239
It looks really obvious when written out... man, I'm dumb. Thanks, polite sage
>>
File: lapis-chan.jpg (113KB, 573x892px) Image search: [Google]
lapis-chan.jpg
113KB, 573x892px
>>60461621
>>
what's your thought process when you have to start a small project?

i have a project due sunday night and pretty much 100% free time until then. the problem is organizing the problem in my head and break it into chunks. also not freaking out because its in C and everything can go wrong in C.

its seems somewhat simple, i have to simulate sensor readings (temperature, humidity, etc). use threads to simulate multiple sensors at the same time, and save/load readings from the sensors in files. also have to use doubly linked lists.

i think ive developed some kind of anxiety about this, because once i start thinking about it, i just go into panic mode, instead of just creating an order of things to do, or even implement the basic parts of it, i just freak out and cant do anything.

how would you start? create sensor struct and implement basic add/remove functions or start by learning how to use threads / files in c?
>>
what would you say to convince someone to adopt GPLv3?
>>
>>60465015
dumb frogposter
>>
>>60465304
break it down in your head first
then lsit the steps needed in a todo list

work on an item in one pomodor cycle
take a break (do not forget this, or you will burn out and write less optimal code)
then do another cycle
>>
>>60465170
im not the same anon

/agdg/ sucks btw
>>
File: yakuza_housewife.png (553KB, 672x509px) Image search: [Google]
yakuza_housewife.png
553KB, 672x509px
>>60464986
>A loli should be adorable, not shoved into a gross sexual shoehorn.
It depends. For example, lolis like Yotsuba, Sakura, and Renchon should never be lewd'ed. All other lolis that aren't similar to the referenced character are primed for fap material.
>>
So why were Lisp's fexps replaced with current "macro" systems? They were perfect. They were simple, they were powerful, it was like adding custom code to the most fundamental function: eval.

You used to be able to evaluate anything any way you wanted using the exact same mechanism that powers things like function application. Now we have pattern-based shit like syntax-case.
>>
>>60465408

Yes it does, it's just kids playing around with Unity, it seems. I'm looking for more advanced help, like how to handle mutability across the game loop in a functional language, that's not a trivial question.
>>
Should I fully embrace C11?
Are there any modern platforms that don't support it?
>>
>>60461621
C++ best christmas cake
>>
>>60465456
>Should I fully embrace C11?
As long as you know how to write ASCII C, then you should. Read Modern C and be enlightened.
>>
is there a walkthrough or pastebin or some shit for idiots babies who have never had to compile their shit by hand before

i'm used to using IDEs on windows, now i want to program like a real human being on linux and i don't even know where to start
>>
yo since pro versions have msg disabled, how could i send a system message on a network(VPN)?
>>
>>60465511
i mean, non-pro versions*
>>
learning PHP because i need to

what exactly does php do that can't be done using some other language

for example if i want to interact with databse on the computer i could just use python

or if i want my page to have dynamic content or whatever i can just use javascript

>inb4 webdevc hurr

mysql tutorials use php so i need to know it a little bit
>>
>>60465508
>create program.c
>edit program.c
>gcc -o program program.c
>./program.c

Everything else is commentary.
>>
>>60465555
>./program

fixed
>>
>>60465555
>./program.c
terrible quads
>>
>>60465508
learn to use the command line

first install ubuntu - use the cmd as much as possible

then install ubuntu mini since the ubuntu comes with useless programs that are a pain in the but
>>
You said Go was FASTER!!!!
>>
>>60465540
PHP doesn't do anything different its just the quickest/dirtiest solution for backend stuff.
>>
>>60465595
Might I add it may be quick but its farm from elegant

thank god i never had to deal with PHP, ever.
>>
>>60465595
>backend stuff.
i dont know about web sites exactly

but by backend stuff wouldn't you mean the code that serves the webpage, the http server code - that's not in PHP

is it just the database access? or is there more
>>
>>60465445
>how to handle mutability across the game loop in a functional language
Honestly, try Rust.
>>
>>60465628
Basically database access and the operations associated with it.

It's really only still around because a lot of existing systems use it
>>
>>60465508
Lookup the concept of compilation units. Then you'll understand wtf the commands you are typing are doing. Then think about why a 10000-files project doesn't need to be recompiled entirely I'd you change a single function.
>>
>>60465090
>Like I'm so tempted to rewrite Jinja2 in Go because I know it will be way faster and more succint
Already done: https://github.com/valyala/quicktemplate
>>
>>60465540
There's that constrains you to php other than that there's support for php in many Web servers and there's convenient guides some even let you just point the users at a php file and they do all the work for you. You can look for other CMS systems. I hear Facebook uses their own C++ solution. But basically php just processes stuff into HTML which is sent to the user. You can easily replace it with your own thing.

I don't quite see why php became popular though. Maybe it's easy to support from the implementation side.
>>
>>60465675
>Maybe it's easy to support from the implementation side.

There isn't really a lot of effort for sysadmins I don't know a single general web server that doesn't support php out the box
>>
>>60465675
>I don't quite see why php became popular though. Maybe it's easy to support from the implementation side.
Probably because it's specialized and batteries-included.
>>
>>60465675
>there's that constraints..
I don't even know what I was writing here but my phone mangled it.
Sorry. Maybe 'there's nothing that constrains you to php'..
>>60465699
Yeah. But when you consider php as a language for that to be a trend it'd already have to be popular or for it to be silly easy to implement.
>>60465714
>specialized
There's tons of DSL that don't become popular. I don't see why web* would be drastically different in this.
>batteries included
I'm not a native English speaker. Are you implying php does everything for you?
>>
>>60465379
alright thanks. i guess i just have to calm down and think
>>
>>60465592
>what is compile time?
>>
>>60465583
>>60465555
thanks.

it appears solus doesn't have gcc installed by default.

>>60465665
i will, thanks.
>>
>>60465746
I mean I am no expert on web history but I think it was because PHP was there before most other server side solutions
>>
>>60465803
This. When your only choices are PHP and Java, I imagine, many would pick PHP.
>>
>>60465898
php is more garbage than java is. at least java is sensible, even if its overly verbose and weak
>>
>>60465898
Especially since all you really need to get going is Apache and php files

Glad we agreed on this.
>>
>>60465746
>There's tons of DSL that don't become popular. I don't see why web* would be drastically different in this.
Circuit-designing DSLs are very popular anongst the employees of CPU makers, but it's a small group so you've probably never heard about those languages, and neither have I. On the other hand PHP is also a DSL for the Web, but the Web is very visible so PHP is very visible. I don't think PHP is being used outside of Web servers, so there you go. It could potentially be a general purpose PL because it's Turing-complete, but it's used like a DSL.

>>batteries included
>I'm not a native English speaker. Are you implying php does everything for you?
This means it comes preinstalled with a whole bunch of features. (fCGI, SOAP, HTML-embedding) And this is useful for Web development and deployment. It's possible to do WebApps in other languages and there are advantages to doing it, but PHP is the default choice.
>>
>>60465986
php also has
$x = "12-13 children are at the playground"
$y = $x + 5

leave y with the value of 17. that's not a feature, that's gross. and gross is the only term i can use to describe php
>>
>>60465986
Batteries aren't strictly part of the appliance, but it's nice if they are already in. That's the idea behind the phrase.
>>
>>60466020
I agree but it doesn't change the facts I stated.
>>
>>60461621

Am I too old at 27 to learn some programming as someone who knows almost nothing? A few years back I experimented with some Python and I'd maybe like to try that again as a constructive hobby and maybe improve myself in my field. What do you guys think? What language do you think would be good for a rookie in current year +2? What resources would you use if you were in such a position?
>>
aight the php syntax is basically C with a dollar sign and without types - got that
i know html css and javascript
learnt the above in like a day (a working level, no libraries, "cool" features yada yada)

what i don't get is how to tie these 3 together and what apache does for me

apache is an http server so it BASICALLY listens on some port, gets a string, it's either a get or a post or something else, delivers

but i'm assuming a GET can include some sort of a database index (a query) - what apache does then is call a php module that delivers that/writes to an html page (for example writes the database record on the html page - hence dynamic page) - the html page is then handled by apache
>>
>>60466101
Its never too late man

Im diving in Go after reading it over

Stop your preconcieved notions and just do things
>>
>>60466101
>Am I too old at 27 to learn some programming as someone who knows almost nothing?
no you are not too old - programming is not hard, you just have to work and not be bored by it

i started not too long ago, i was 21 - in your position basically

first i learnt how to use a command line (powershell in windows), using python - i didn't use IDE, just wrote in a file and then ran the file
then i used mit ocw, coursera, edx and the internet in general

https://learnpythonthehardway.org/book/
this was the first thing i did - i didn't finish it but taught me not to use IDE and taught me to use command line
>>
can someone help? i'm trying to use the pandas module with python3

>>> max(df['Volatility'])
17.43818498714959
>>> min(df['Volatility'])
0.38637161924834884
>>> max(df, key = lambda x: x['Volatility'])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 1, in <lambda>
TypeError: string indices must be integers
>>> type(df.head())
<class 'pandas.core.frame.DataFrame'>
>>
>>60466126
If you have static content you only need HTML, CSS, and JS

Which are all used for the front end. Don't confuse node.js (backend) with javascript (front end).

PHP can be used to either render html by reading from some db on the server/connected to the server.

Or

You can set up an API in php and to GET requests in Javascript and render the webpage that way.
>>
>>60466101
Don't bother. I'm in a similar situation, and I've made no progress. I'm back to watching anime, playing vidya, and hating my job most of the time with some programming here and there. Don't bother with those faggots claiming you can "learn" programming at this age; they don't know what it's like to be "old."
>>
>>60464790
>>A class for a language

Many things are not considered normal in the West. Like designated shitting streets, scaling buildings to help your kid cheat in a math exam, or having an entire class about a programming language. But in India, it is
>>
>>60465135
>goal is feeding myself by a job in the end like every education

Damn, you really wasted a special opportunity in your life
>>
>>60461621
where is my lovely haskell gf?
>>
rust is a bust
>>
>>60466356
Garbage collector kicked in and she got BLOCKED
>>
>>60466277
>PHP can be used to either render html by reading from some db on the server/connected to the server.
how does php render html
i thought the program that renders the html is just the browser which interprets the html and just writes that to your browser window
>You can set up an API in php and to GET requests in Javascript and render the webpage that way.
so let's say you have a button on your webpage and the user clicks on the button and that would be an event that js responds to by making a GET request to the server
you(the server) get the GET but you still need an http server code to process the GET? does the http server code then call the php API

explain how this works to me please
>>
>>60466356
in my bed
>>
File: dlang_chan_2.jpg (75KB, 383x491px) Image search: [Google]
dlang_chan_2.jpg
75KB, 383x491px
>>60466356
A better question would be "where's my lovely dlang-chan?"
>>
Shoul I have stand for shaving brush? Is it useful?
>>
>>60466382
He means rendering a template. Google html templating
>>
>>60466356
too pure
>>
>>60466377
Nah she usually saves herself a lot of work by being really lazy
>>
>>60466418
oh i see, so the php extracts the template from the db, modifies it a little bit to make it your own site and forwards the files to apache so it can send it to the user?
>>
>>60466475
Basically
>>
she's dead. rip.
>>
>>60465456

>Should I fully embrace C11?
Yes.

>Are there any modern platforms that don't support it?
Modern? No. At least not the required features (C11 threads are not commonly implemented). Platforms that are still in use? I'd say probably a few. But you're unlikely to work on those platforms unless specifically hired for them. I'd recommend using C11 on a regular basis, but knowing how to do C89 if need be.
>>
>>60466475
Only with PHP filthy sluttery
>>
where will I end up if I decide to make a career at of programming?
just being a code monkey somewhere?
>>
>>60465768

>it appears solus doesn't have gcc installed by default.
sudo eopkg it -c system.devel -y
>>
>>60466569
if you do the machine learning coursera course you'll be making $300k/y in silicon valley halfway through. you won't be able to even finish the course because they'll hire you before you finish, no one finishes the course
>>
>>60466586
ass hole

i finished the course
>>
>>60466350
how so? its not like i can do anything with my dreams in current time its all political bullshit
half the people like polfags want wars for some reason
the free part spend their time making shiit up like genders studies and other libshit

my dream would be something like transferring memory and consciousness in robots so we become immortal
>>
I am pretty new to programming and I got a minor task to do but can't get my thoughts on track with it.

So I have a loop that goes through a random sequence of numbers and during the loop we check the random number against an array that has 2 values, if any of the two values equal to the random sequence number, print out "Boing" else "Yoink".

Could anyone be kind just write down pseudo code or hints on what to do?
>>
>>60466569
That entirely depends on if your programming skills are applied to another discipline.

If you "just program" and don't make any decisions, yeah, you're a code monkey.

If you're versed in physics maths, financial statistics, or genetics, and can apply that to programming, you're going to have a great career.
>>
File: 1493047642548.jpg (8KB, 190x188px) Image search: [Google]
1493047642548.jpg
8KB, 190x188px
>confusing toddleresque dreams with a once in a lifetime opportunity to devote all your time to learning and self improvement

K
>>
>>60466648
Your task isn't clear.

You're just checking to see if one of two given numbers are matched by a generated random number?
>>
>>60466672
Yeah
>>
>>60466648
For number in randomarray:
....Foo = false
....For other in twoarray:
........if other equal number: Foo = true
....if Foo: print boing
.... else: print yoink
>>
File: 1495050681563.png (181KB, 385x385px) Image search: [Google]
1495050681563.png
181KB, 385x385px
>>60461621
Trying to formalize all of anime.
>>
>>60466704
Ah so it requires nested loops, dang. I thought about this but worried about it being "inefficient". Thank you for the help.
>>
File: anal beads.png (14KB, 609x233px) Image search: [Google]
anal beads.png
14KB, 609x233px
>>60466688
I'm still not super clear, because it seems silly.

var muhNumbers = new int[] { 2, 12 };
var muhRandomNumber = new Random().Next(0, 20); // will be a value from 0-20

var boingOrYoink = muhNumbers.Any(x => x == muhRandomNumber) ? "Boing" : "Yoink";

WriteLine(boingOrYoink);
>>
<?php
function rand_coords(){
$x = rand(-500000, 500000)/1000000;
$y = rand(-500000, 500000)/1000000;
return array($x,$y);
}
function in_circle($coords){
return pow($coords[0],2) + pow($coords[1], 2) < 0.25;
}

function find_pi(){
$ctr = 0;
for($i=0;$i<100001;$i++){
$coords = rand_coords();
if(in_circle($coords)){
$ctr++;
}
}
$pi = 4*$ctr/$i;
print "pi = $pi\n";
}
print(find_pi());
?>


i run this with "php filename.php"

it's a monte carlo pi approximator
>>
File: 1415451252568.jpg (23KB, 512x384px) Image search: [Google]
1415451252568.jpg
23KB, 512x384px
>>60466652
I was a d/ic/k before picking programming
Where can that take me?
>>
Wow, go is really a pleasure to write in

even mores o than python which has you write boilerplate for classes
>>
File: 1494138653174.jpg (74KB, 1000x720px) Image search: [Google]
1494138653174.jpg
74KB, 1000x720px
I'm so glad Go programmers exist. I'm a pretty average programmer, but I look like a genius next to one of them.
>>
File: 44b.jpg (52KB, 479x750px) Image search: [Google]
44b.jpg
52KB, 479x750px
im trying to figure out what the next step is for me.
ive been learning java in school, basically i can do all the basics, some neat looking GUIs and connect to a database and do all the databasey stuff both ways.
But whats next? I feel like i need to connect more stuff, like i connected the database to the program. APIs theyre called? So i can come up with useful shit to do, like read out things from the internet, or files or something.
Or are there any new libraries i should learn cause they do cool stuff?
>>
File: machine_learning.png (28KB, 371x439px) Image search: [Google]
machine_learning.png
28KB, 371x439px
This is actually a rather accurate description of machine learning.
>>
>>60467051
You must be as smart as a 1st grader
>>
>another episode of neets and students not grasping why should you write in native languages for mobile devices

Jesus fuck they are so dumb.

Any fun project to learn COBOL?
>>
I will get out of retail!
>>
>>60467152
Good. Fast food is better.
>>
>>60467106
>Any fun project to learn COBOL?
why
>>
redpill me on cr3
>>
>>60464650
>not getting a perfect score
>>
anyone wanna participate in online competition, 1st place award is macbook pro, 2nd apple watch and 3rd ipad?
>>
>>60467498
>iShit
Nope.
>>
>>60467498
btw, they must be 18+ from Serbi/Romania or Ukraine
>>
>>60467051
This, the lack of any metaprogramming facilities in AOT compiled, statically typed languages is unforgivable.
>>
>>60467550
>Serbi/Romania
I'd just like to interject for a moment. What you’re referring to as Romania, is in fact, Serbi/Romania, or as I’ve recently taken to calling it, Serbi plus Romania.
>>
>>60467623
Serbia/Romania/Ukraine
Serbia or Romania or Ukraine
3 countries
>>
>>60467633
I'd just like to interject for a moment. What you’re referring to as Romania, is in fact, Serbi/Romania/Ukraine, or as I’ve recently taken to calling it, Serbi plus Romania plus Ukraine.
>>
>>60461621
A graph database for weighted associations, written in Go.

>>60467106
But don't you know that webstack PWAs are the future baka?

>>60467058
Pick something that seems really simple that you wish you had a program for that works exactly how you want it to. Then go figure out how to make that in your language of choice.
>>
>>60467051
You're welcome.

>>60467012
It truly is.

Now that /g/ has revived my spirits, back to my cozy >>60467679 programming.
>>
>>60467343

http://wiki.osdev.org/CPU_Registers_x86-64#CR3
>>
File: terry.png (524KB, 900x900px) Image search: [Google]
terry.png
524KB, 900x900px
String add_url = "https://myanimelist.net/api/animelist/add/"+Integer.toString(showID)+".xml";
String xml = XMLtoString(createAnimeXML());

URL url = new URL(add_url);
HttpURLConnection conn = (HttpURLConnection)url.openConnection();
conn.setRequestProperty("Authorization","Basic " + this.encodedCredentials);
conn.setRequestMethod("POST");
conn.setRequestProperty("Content-Type", "text/xml");
conn.setDoOutput(true);

BufferedWriter writer = new BufferedWriter(new OutputStreamWriter((conn.getOutputStream())));
writer.write(xml);
writer.flush();
writer.close();
System.out.println(conn.getResponseCode());


Guys, I am trying to send an XML string to the add anime API used by MAL. Nothing I do works for this. Any help? Using java btw
>>
>>60467498
шлюхa
>>
>>60467929
>XML and JAVA

this kills the developer
>>
>>60467948
really? I usually write in Python or C++ and use Qt for the GUI but I decided to give java a whirl since it's been a while since I wrote anything in java.
>>
func fizzBuzz(n: Int) -> String {
if (n % 3 == 0) && (n % 5 == 0) {
return "FizzBuzz"
} else if n % 3 == 0 {
return "Fizz"
} else if n % 5 == 0 {
return "Buzz"
} else {
return "\(n)"
}
}


>comfy as heck
>>
>>60467967
>Swift
my nigga
>>
>>60467965
Java has its uses but its painful to work with without an IDE.
>>
>>60468011
I am using eclipse as my IDE. I'm not insane enough to program Java in only a text editor. But trying to send XML to this shitty MAL API using POST is driving me insane.
>>
any non-whites here?

asians and indians don't count
>>
>>60468062
Miscellaneous brown checking in
>>
File: target-22.png (14KB, 733x700px) Image search: [Google]
target-22.png
14KB, 733x700px
>>60468062
why would it matter
>>
why doesnt this work

void printbyType(Sensor* l, char* type) {
while (l != NULL) {
if (l->type == type)
printf("%d", l->type);
l = l->next;
}
}


it works fine if i search for an integer instead of a string. whys c so such a bully for new programmers
>>
>>60468089
Could you just die please?
>>
File: install gentoo.jpg (296KB, 1920x1080px) Image search: [Google]
install gentoo.jpg
296KB, 1920x1080px
>>60468102
this is a no bully zone
>>
>>60468102
No :\

I'm not any different than anyone else, can't we be friends?
>>
>>60468093
fuck i forgot about #include <string.h> and strcmp

fucking c
>>
>>60468154
>he doesn't write #include-less code
>>
>>60462643
What desktop environment is this?
>>
>>60461621
can someone explain me why visual basic looks shy?
>>
>>60468212
MAXIMUMWM
>>
File: talk shit get hit.png (2MB, 1500x1333px) Image search: [Google]
talk shit get hit.png
2MB, 1500x1333px
Is there any way to change the contents of a single header file without recompiling every object in the project.
I have a few headers that only get used in 2 objects at most, and the most I've been able to do in make is force a complete recompile anytime the headers change for any reason.
Do I need some grep stapled on hack in order to recompile only the objects that #include the header I changed?
>>
>>60461621
>What are you working on, /g/?
Just finished implementing Dijkstra's in Python. Think I'll do A* after this.
>>
>>60468253
Fix your dependencies. make builds only what needs to be built.
>>
>>60468151
Sure, if you can prove that you don't hold certain political views.
>>
>>60468324
Like what? I'm pretty moderate.
>>
>>60468352
I think you know what I mean.
>moderate
That can mean very different things depending on the region.
>>
Web Development general is dead so I'll ask here. Someone wants to set up a WordPress site where somethung like a business can sign up, have their own separate page to edit, and add an instagram or live video feed on it. Should i go through the trouble of setting up subdomains or no
>>
>>60468398
>>>/g/wdg
>>
>>60468398
>Web Development general is dead so I'll ask here.
No. Fuck off, retard. Your kind simply isn't welcome here.
>>>/g/wdg/
>>>/b/
>>
>>60468398
>WordPress
Stopped reading there.
>>
>>60468417
>>60468420
>>60468430
Kek. Terrible ain't it. Hell if I know this shit I'm just a c+ guy
>>
>>60468444
Fuck off. I don't care if you're a "C+" guy. You and your ilk aren't welcome here.
>>
File: [email protected] (21KB, 270x270px) Image search: [Google]
Fast@3x.png
21KB, 270x270px
>>60468454
>>
>>60468454
Whatever you say anon. How many threads of (You)s are you running on right now
>>
>>60468092
To know how many lesser beings are visiting these threads.
>>
>Not using based MIT license
This real freedom, gpl doesn't let me release binaries, even for testing purposes.
>>
>>60468613
>taking a shower every day
lmao enjoy your NO FREEDOM
>>
Is there an easier or faster way to insert data into a database from a csv file with c# than splitting them by the comma into an array and insert in the correct columns using for loops?
>>
File: 1486252609952.jpg (8KB, 207x253px) Image search: [Google]
1486252609952.jpg
8KB, 207x253px
>>60468613
> gpl doesn't let me release binaries
https://www.gnu.org/licenses/gpl-3.0.txt
Here's the full text.
Now show me where it doesn't let you release binaries.
>>
File: 1491106499722.png (179KB, 463x492px) Image search: [Google]
1491106499722.png
179KB, 463x492px
Has anyone here solved P = NP yet? Is anyone even trying?
>>
>>60468677
I don't think so. But write you code to be usable for any table and any .csv and put it on github.
>>
>>60468694
I'm on it. Screencap it.
>>
>>60468694
P = NP
N = 1

Here, I solved.
>>
>>60468691
I'm taking about builds that have new code that hasn't been uploaded to github or any other way to access it, yet while still having the stable code available
>>
>>60468772
Is it your code? If yes you can just distribute a build if you want.
>>
>>60468715
Fuck really? It takes about 20-30 seconds to insert about 13k entries while also checking for invalid/null.
This is too slow.

Also, wouldn't that be easy? Just make the user specify the name of the table to insert data in, number of columns and the separator. It's just tedious.
>>
>>60463309
Thanks for the info, maybe but that'll be months out I guess.

>>60463275
xfce4-panel. Didn't really configure much in it, I think the colors come from arc-darker theme and the icons from aper

>>60468212
i3-gaps with all the good stuff coming from xfce. I wouldn't recommend it but I used to have nothing to do for a long time and was bored enough to configure it

>>60464354
Fira mono
>>
File: 1480803597941.png (394KB, 924x720px) Image search: [Google]
1480803597941.png
394KB, 924x720px
>>60468732
>P NP =
I believe you're wrong, I'm also on it.
>>
File: 1494699401195.jpg (734KB, 2560x1600px) Image search: [Google]
1494699401195.jpg
734KB, 2560x1600px
Shit, anons. I barely have any fantasy to create classes for multilevel and virtual inheritance. Any ideas?
>>
>>60464720
>>>60461621 (OP)
>damn R is cute, I suppose it will be the next language I learn.
same here senpai
also unironically will look to replace the tasks I do using octave with R because of Op chart
>>
new clfag here
is there a function that returns a string from a url that contains just text
>>
>>60468892
I wrote != but 4chan censored my '!'
>>
>>60468743
Or P = 0 you fucking idiot lfmao
>>
>>60468789
So gpl allows that? Because I remember a couple years ago I created a custom dolphin emu build and released an binary their forums for testing and then one of the devs neon rain threw a cow about me not releasing the code changes publicly, and at this time I didn't know much about how to use git, I then uploaded the code to my github and then all was good until they started complaining that they couldn't compile, and then saying since they couldn't compile it I violating the gpl, but this is because they were using the newer Microsoft visual studio 2013 update 2, while my project worked on the older update 1 of Microsoft Visual studio 2013. And the new update had only been out for a couple of weeks.
>TLDR
GPL Screwed me over.
>>
>>60468694

No
Yes
>>
>>60469036
>custom dolphin emu build
So it's not your code.
>>
>>60469036
*Neobrain not neon rain.
>>
>>60468694
Even if it gets solved it won't be a constructive proof for sure so who cares lul
>>
>>60468947
Class Platypus
>>
>>60469074
I'm working on a constructive proof.
>>
>>60469085
Prove it.
>>
>>60469112
Prove what? I don't have a proof (yet).
>>
>>60469002
>!=
Ugly...
>>
File: 1494225367416.jpg (63KB, 960x544px) Image search: [Google]
1494225367416.jpg
63KB, 960x544px
>D-dad.. I want to be a programmer..

How do you respond?
>>
>>60469066
GPL doesn't allow you to release binaries without source code regardless if it's your code.
>>
>>60469036
I thought the only requirement was releasing the code?
>>
>>60469225
>GPL doesn't allow you to release binaries without source code regardless if it's your code.
If it's your code you can release it without license. You own it, you do what you want.
>>
>>60469224
Depends on what she (male) means by "programmer".
>>
>>60469224
Fine by me.
Your other dad may lot like it though.
>>
>>60469224
"D is a dead language. Don't ever call me that again."
>>
>>60469236

That and saying that the new code is also licensed under the GPL.

Anon isn't required to make it able to be built in newer compilers. So long as the user is aware that VS2013 update 1 is required to build, if they want any other configuration, they can make it themselves... or pay Anon to add support.

>>60469249

Unless it contains any part of a GPL program
>>
>>60469074
Why is that?
>>
>>60469377
>GPL program
Not made by yourself.
>>
>>60469404
An existance proof is constructive if it provides an example of the object in question, here an algorithm that solves some NP problem in polynomial time. Unless we get that NP = P will probably not have an consequenses except purely intellectual.
>>
>>60469476
>An existance proof is constructive if it provides an example of the object in question
I know, but why do you think the proof won't be constructive?
>>
>>60467967
>if (n % 3 == 0) && (n % 5 == 0)
>having a third case
DROPPED
GET OUT OF MY OFFICE
>>
>>60469501
Irony is an inescapable property of our existence.
>>
>>60469571
S-sorry I'm new
>>
>>60992882
cuck
>>
>>6046971duck
>>
New thread:

>>60469874
>>60469874
>>60469874
>>
>tfw C-chan is taller than you
>>
File: 1492691181230.jpg (6KB, 251x201px) Image search: [Google]
1492691181230.jpg
6KB, 251x201px
>>60461621
Why is C so thicc?
Thread posts: 313
Thread images: 40


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