[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: 316
Thread images: 27

File: K&R himegoto waifux2.png (1MB, 1000x1400px) Image search: [Google]
K&R himegoto waifux2.png
1MB, 1000x1400px
old thread: >>61094702
What are you working on, /g/?
>>
>>61100986
Are you underage or why do you use an anime picture? Anime is for little girls
>>
File: old_hag_langs.png (173KB, 600x355px) Image search: [Google]
old_hag_langs.png
173KB, 600x355px
>>61100986
First for Fortan 77.
>>
nth for lisplets are losers
>>
>>61101001
But we're all little girls here!
>>
>>61100986
Thank you himeposter

>>61100639
I've been meaning to learn it as a sort of curiosity due to ClojureScript. But I would always rather use Haskell over a lisp language personally. If you really want lisp mechanics Scala is more popular and I think it plays nicer with the JVM.

>>61100785
Okay, serious question, I listen to touhou music and all that but how do you even into touhou? There's eight million different games and fan made things all over the place and everyone else but me seems to know what everything is and where to go.
>>
>>61101019
>read Forbidden Scrollery
>watch anime
>find your favorite character
>play the games that feature your favorite character most heavily
Got my dad into Touhou like this.
>>
File: d75.jpg (35KB, 495x495px) Image search: [Google]
d75.jpg
35KB, 495x495px
I remember the first time visiting /dpt/, there where a lot of guys talking about cool programming stuff and interesting projects. Now it's a piles and piles of crap not even near related to programming things. Can we return to the old days?
>>
>>61100986
learning python like a moron.

How would I take a string like 'item1 | item2 | item3' and slice out item 2 only? data[7:data.index('|')] only returns ''. I feel that this is a simple thing that I am overlooking, but I just can't see it.
>>
JavaScript that's run by v8 engines which returns strings for C# to build web pages that are sent with a dodgy server. This way, to make webpages you just write the boring html, add everything like this
var ScriptedPage p = new ScriptedPage("main.html",new {name = "Larry"});

For the simple hello world of most templating libraries.

There's also a function you can set so this happens at runtime, also I've implemented 6 different JavaScript templating engines.
>>
>>61101071
be the change you want to see anon.
Whining about meta is just as bad as shitposting.
And so is commenting on the meta-whining.

What does /dpt/ think of netrunner?
Do you think it has a chance?
>>
>>61097646
Congrats on your CS degree Ruby!

>>61101043
>Forbidden Scrollery
Just looked this up, is this something I can just read and pick up how the touhou world/characters work as I go, or am I supposed to already know?

I already know a little bit about the characters due to all the music I listen to and random stuff from youtube, but that's it.

>>61101071
People were saying /dpt/ was going to shit back then, too. But admittedly, it has been kind of shitty lately. It just comes and goes with the seasons.

>>61101074
"foo | bar | baz".split(" | ")[1]


>>61101098
Yeah I agree. And no, netrunner has literally no chance.
>>
Thanks. Never even seen split yet.
>>
>>61101098
Netrunner has been around nearly an entire week and there still hasn't been a SINGLE code commit to their repo.
>>
>>61101123
Web browser is not a child's play.
(Unless you are a C++ pajeet and link together a few Qt widgets)
>>
>>61101007
confirmed for lisplet
>>
File: software craftsman.jpg (239KB, 1036x1360px) Image search: [Google]
software craftsman.jpg
239KB, 1036x1360px
>programming is a skilled trade
>programming is totally like a blue collar trade
>software apprenticeship
>software """""""craftsman""""""

Is there anything more pathetics than weak-ass pale-faced computer monkeys LARPing as skilled tradesmen?
It's been 40 years and they still don't even have an organized union.
>>
>>61101399

>mfw the IEEE websites require advertisements to stay alive
>mfw I have no face because I can't afford one
>>
>>61101140
If you will be reading /dpt/ Designated Pajeet Thread you'll understand that C and Haskell are true pajeet choice not C++.
http://mattbriggs.net/blog/2015/06/01/the-role-of-a-senior-developer/
>>
>>61101399
That's because we require too much individual training and make too much money for collective bargaining to make any sense.

There's a huge divide in skill in CS. The most influential employers don't want unions because it would cost them a lot of money for dead weight programmers. The most influential programmers don't want unions because it would weigh down their salary and they'd make less money.

This kind of thing is why WHITE COLLAR jobs like software developers almost never properly form labor unions and when they do they're never big.
>>
File: yukari_spurdo.png (796KB, 637x900px) Image search: [Google]
yukari_spurdo.png
796KB, 637x900px
>>61101399
>code junkie
>software barista
>computer architect
C E A S E
>>
>needing a union to ask mr shekelberg to treat you like a human and pay you better
wwwwwwwwwwwwwwwwww
When will brainlets just kill themselves
>>
>>61100986
Currently trying to implement this paper https://www.math.ucla.edu/~jteran/papers/SSCTS13.pdf

fuck me continuum mechanics are hard
>>
>>61101491
How much theory do you know? Tackling problems with little to no background is very dangerous.
>>
>>61101491
I'm way too retarded for that shit

I feel like no matter how much math I take I'm completely unprepared for the real world
>>
>>61101491
The paper is old like a shit of a mammoth, it contains PDEs and a solultion using finite-difference method just like in fluid dynamics. It isn't hard, it's a level of a CS undergraduate.
>>
>>61101586
I mean the CS undergraduate level is sufficient to implement it in a code. To write a paper like this really requires good understanding of the physics of the process, classical mechanics to be precise.
>>
>>61101635
Yep, specifically visco-elasticity. It's a really undertaught subject desu.
>>
>>61101643
In the sense of physics it isn't straightforward, I agree. But you have already formulas to compute it, there's no need to bother if your part is to write a fast code for it, not to do research.
>>
>>61101043
You're dad gay
>>
>>61101643
In my opinion these things in computer graphics such as Monte Carlo integration, some dynamics with PDEs aren't actually rocket science. The success of Arnold Render or Nuke is not because they did some super discoveries, they just provide a good scalable and flexible code needed for the industry.

If you can write a code which you can put on several servers and GPUs to compute this simulation it will be more useful in practice than fucking around about physics.
>>
File: smug_ran8.jpg (571KB, 1111x857px) Image search: [Google]
smug_ran8.jpg
571KB, 1111x857px
>>61101712
>>61101754
Did you confuse me with the anon that posted the PDF? There's no need to try so hard, I actually don't give a fuck what you think.
>>
>>61101796
Wow! I hoped you do.
>>
>>61101796
>PDF
Do you mean a probability distribution function? I didn't try hard, it's pleasure for me to discover about how things work.
>>
>>61101796
I want to cuddle Ran-sama
>>
>>61101895
Nope that privilege is mine and only mine.
>>
>>61101906
>Viscoelasticity
I thought that you meant convection–diffusion. I remembered, viscoelasticity is quite simple.
>>
>>61101991
Never said it wasn't, insecure anon.
>>
clojure or common lisp and why?
not responding will be parsed as racket
>>
>>61102119
>and why?
This is the actual question for the majority of posts here.
>>
>>61101012
careful, the very intelligent mods here sometimes actually ban you for saying that, personal experience
>>
/dpt/ should make a programming language.

unlike the gargantuan projects /g/ usually engage in, making a compiter that does lexing, parsing, a bit of typechecking and then outputs some C is pretty simple.

then we name it something politically incorrect, put an ASCII cock in the CoC file and market it as an alternative to rust
>>
File: 562628_1000_1_800.jpg (114KB, 800x800px) Image search: [Google]
562628_1000_1_800.jpg
114KB, 800x800px
So, I'm thinking of creating my very own text editor with all the kool features I want, but I don't really know where to start with the rendering of the text itself. How do text editors like Emacs generally render their text, do they delegate it to UI libraries like GTK or the windows API, or do they render them themselves using things like Cairo or something of the sort?

My intention is to make something as low level as possible, and I'll be using c++. The idea is to use a graphical user interface (AKA, I'll not be running the program on console). What are some good, open source, editors I should check out; preferably not monsters like Emacs.

Thanks for the help in advance.
>>
anyone else here learning programming but not sure what they actually want to do with such a skill? I enjoy solving problems and i basically just do a bunch of exercises but i've created very little of my own ideas. I guess i'm mostly interested in just how the world runs on programs, stuff like computing systems inside of machinery, embedded systems and networks.
>>
Ermm... how do I share my files only with special people?
I used pastebin, but I seem to not understand it very well.
I wanted to share my current progress of my assignment with a buddy so I can get some pointers whether I still need to do some stuff, or if it's enough to be submitted as an assignment to the faculty servers.
>>
>>61101462
Do unions have to be about wages?
What about skills, responsibilities and ethical behavior?
>>
I'm C# dev.
And I want some personal project to work on.
Suggest something.
>>
>>61102195
>anyone else here learning programming but not sure what they actually want to do with such a skill
I never had this problem.
>>
>>61102158
Implementing a language might be trivial
Designing it isn't.
>>
>>61102183
Check notepad++ or geany. But It would probably be easier if you use javascript and electron. Otherwise you will have to write a lot of extra code to make it cross platform.
>>
>>61102183
>What are some good, open source, editors I should check out
http://howl.io/
>>
>>61102119

Between the two, I'd take Clojure. Because:

1. Compatibility with a large number of Java libraries (or JavaScript or .NET if ClojureScript or Clojure CLR are used).
2. Lisp 1 > Lisp 2, plain and simple.
>>
>>61102332
designing a language is trivial, designing a good language isn't, and this is /dpt/ so who gives a shit about good
>>
>>61102286

Lisp .NET Core.
>>
Finally found a site that allows me private pastebins.

https://gist.github.com/anonymous/c29334ac54abdafea99702554072cd0a

Do you know why the Java compiler can't find the main body?
>>
Has anyone worked with 4chan's API?

I'm trying to md5sum the images but the md5 4chan says
text (24 character, packed base64 MD5 hash)


What can I do here to check my local files with the currently online files right?
>>
>>61102364
>moonscript is a scripting language that complies to lua
>a scripting language that compiles to an other scripting langage
Wew
>>
>>61102460
What?
>>
>>61102652
>what is transpiling
though I agree with you that it's stupid
>>
learning linear algebra to work on my 3d loli sex mmorpg

currently have a rotating triangle kek
>>
>>61102393
Can you make a comfy botnet for CIA niggers working on Ryzen with this language?
>>
>>61102652
>>61102788
it's not stupid when the "scripting language" you're compiling to rivals the speed of C
>>
>>61102782

Make a Lisp interpreter that runs on the DLR in .NET Core. Translate S-exprs into CIL.
>>
>>61101091
do we still consider babbies writing in JavaScript programmers?
>>
>>61102276
>skills
none
>responsibilities
none
>ethical behavior
LOL
>>
>>61102989
And whats the point of that?
LISP is dead.
>>
>>61102158
You'd just end up with a shittier version of Go with the best selling point being that it can apply partial functions.
>>
>>61103010
People like you are why our profession will never be taken seriously.
>>
>>61102999
Ah but I'm writing C# with JavaScript!
>>
>>61102263
what is email?
>>
>>61102119
Clojure.

CL is... dated. The language itself is fine, but the ecosystem reeks of an 80s approach to programming.
>>
>>61103034
Do you think he's employed?
>>
File: 1479590672215.png (260KB, 620x640px) Image search: [Google]
1479590672215.png
260KB, 620x640px
>>61101906
>posts ran-sama with everypost
A new form of namefagging
>>
>>61103079
How does the ecosystem reek of an 80s approach to programming?
>>
>>61102807
Projective geometry is the next step.
>>
>>61103019

Mindless fun perhaps? You were looking for a project, and the world doesn't have nearly enough programming language variants that no one will ever use.
>>
>>61103171
Some examples:
Pretty much every library assumes concurrency is something you'd never want to do.
"God-functions" that try to do everything for you, rather than concise, modular parts.
Cross-platform sucks, and you'll find a lot of documentation about "cross platform" talking about decades old kernel versions.
A lot of standard abstractions are borrowed from imperative programming practices, rather than the couple decades of development of Functional Programming's practices that even imperative languages are picking up now.

Really, you'd just have to use it and get a feel for it.
>>
File: cSOjUQ8m7zw.jpg (20KB, 408x231px) Image search: [Google]
cSOjUQ8m7zw.jpg
20KB, 408x231px
i bet these tech /g/ niggers cant solve SHIT

Given an integer N and M:
(1 ≤ N≤ 10^18, 2 ≤ M ≤10^5)
find the remainder after division of N-th Fibonacci number on M.
>>
>>61103165
or you know, a classic form of avatar-fagging
>>
>>61103312
nice math homework, nerd.
>>
Filthy casual learning ruby here, I don't understand the syntax of the .sort_by method.

For example if I have a hash assigning numbers to colors and I want to sort it from highest to lowest it goes:
hash = hash.sort_by { |color, count|count }

What I don't understand is the |color, count|count part. Especially since I can remove the "count" at the end and it gives me the same result.
Could someone explain?
>>
>>61103297
Plenty of libraries use bordeaux-threads or lparallelism. Look through quickdocs and tell me how many "god-functions" you see. I certainly don't see any. Cross-platform shouldn't be much an issue unless you heavily rely on FFI, but FFI is kind of a clusterfuck no matter what you use. You'll need to elaborate on your last point. CL can be written in an imperative way obviously, but there are plenty of FP related abstractions.
>>
>>61103474
*lparallel
>>
>>61103429

:sort_by is a method on Enumerable objects which sorts the elements of an enumeration, but instead of comparing the elements directly, passes those elements to a block and compares the output of that block. In the case of a Hash table, the elements are a two element array which can be split apart into its elements as separate arguments to the block. In the example you have provided, the hash is sorted by the values, and completely ignores the keys.

By the way, if you find you don't understand how some enumerable method works, be aware that you can put whatever you want in a block, including print statements!

irb(main):001:0> { hello: 3, world: 2 }.sort_by { |x| puts x.inspect; x }
[:hello, 3]
[:world, 2]
=> [[:hello, 3], [:world, 2]]
irb(main):002:0> { hello: 3, world: 2 }.sort_by { |x,y| puts x.inspect; y }
:hello
:world
=> [[:world, 2], [:hello, 3]]
>>
>>61102982
Lua pretty amazing at speed. It's sad that the syntax in pig disgusting
>>
Just finished making this.

What do you think? https://github.com/wewman/4bash
>>
>>61103553
Thanks. I haven't gone over blocks yet, but
>the hash is sorted by the values, and completely ignores the keys
So in the |color, count|count part, I'm telling ruby that in the hash, color is the key and count is the associated value, and that it should sort by count?
Sorry if I'm being dense
>>
>"lmao go concurrency is SO good"
>its literally impossible to do concurrency in go
>>
>>61103643
Who said this?
>>
>>61103600
I'm thinking of implementing 8ch to this, but I don't know if they have APIs/json support for their boards.

If not, I have to do it the hard way.
>>
>>61103600
Looks fine. I'd add in an option to make it oneshot instead of it looping forever, but that's trivial.
>>
>>61103698
I made it loop forever so when a new image is posted, it will automatically grab it after it refreshes. Also fixed an issue with the refresher running to 0 and staying 0.

Maybe add an option to do exit after a download? Or the other way around maybe.
>>
>>61103734
Yeah I know, it's just something extra. Looks good though as is.
>>
>>61103734
>>61103698
>>61103769
Oh yea, I read you wrong. It's night time here.

Thanks.

Though, do you think 8ch has json APIs like 4chan does? I did not find it.

Maybe that will be my hardmode challenge.
>>
>>61103312
That's not terribly hard.
>>
>>61103778
A quick google points to yes, but I don't use that site.
>>
>>61103792
Oh shit I didn't see that, nice!
>>
>>61103635

>I haven't gone over blocks yet
It's just Ruby's fancy way of doing callback functions.

>So in the |color, count|count part, I'm telling ruby that in the hash, color is the key and count is the associated value, and that it should sort by count?
Yes.
>>
>>61103808
Alright, thanks again.
>>
File: 1498108612020.webm (924KB, 600x336px) Image search: [Google]
1498108612020.webm
924KB, 600x336px
>>
>>61103823
python a shit
>>
How to program myself a gf?
>>
>>61104065
for girl in facebook_friends: 
message(girl, "will you go out with me?")
>>
>>61104065
learn COBOL
women are complicated and ugly
so is COBOL
>>
>>61104065
You need a body first.
>>
>>61104088
for student in enrolled_in_cs101:
student.post(make_random_lame_programming_joke())
>>
>>61104296
for buttmad_virgin in dpt:
buttman_virgin.get_assblasted()
>>
>>61104296
>>61104337
why are iterating over one person
>>
>>61104088
>>61104296
>>61104337
See >>61103831
>>
File: 18671069.jpg (32KB, 398x478px) Image search: [Google]
18671069.jpg
32KB, 398x478px
>>61104088
facebook.friends
.filter!(person => person.gender == girl)
.each!(message("Will you go out with me?");


>>61104296
students
.filter!(student => cs101.belongsTo(student.enroled)
.each!(post(jokes.filter!(belongsTo(category.programming))));


>>61104337
virgins
.filter!(buttmad)
.array
.filter!(belongsTo(dpt))
.array
each!(blast(ass));
>>
>>61104390
D is DOA
>>
I'm building an application in Java that requires two different user views: auditor and developer. When changing from one to the other I just set the visibility of the current view to "false" but I'm worried this is creating a performance overhead since I fear that this is just hiding the view rather than destroying it. What's the best way of fixing this?
>>
File: fuck.png (97KB, 277x315px) Image search: [Google]
fuck.png
97KB, 277x315px
>>61104088
>mfw no facebook
>>61104296
>mfw no longer student
>>61104337
>mfw no girls in workplace
>>
>>61104390
look like linq
>>
>>61104390
>.filter!(student => cs101.belongsTo(student.enroled)
>missmatched bracket
TRIGGERED
>>
How do you all get focused? After work I try to do something but my mind wanders so I can't make progress or learn anything new. How do I stop being retarded?
>>
File: 1497657204142.png (22KB, 470x216px) Image search: [Google]
1497657204142.png
22KB, 470x216px
>>61104411
Please, I may be bad but please don't call me brain dead.
>>
>>61104403
>DOA
You do realize D is nearly 20 years old right?
>>
>>61104341
i'm not you fucking dumbposter every student enrolled in cs101 posts lame programming jokes and that's a list of students
>>
>>61104416
Git gud
Meditate
Do sports, preferably cardio
>>
>>61104425
And that makes it better?
>>
File: 91f.jpg (27KB, 550x366px) Image search: [Google]
91f.jpg
27KB, 550x366px
>>61104425
>D is nearly 20 years old
>>
>>61104423
But it does
>>
>>61104446
Lisp turns 60 next year.
>>
>>61104411
http://blog.ielliott.io/why-LINQ-is-broken/
>>
>>61104446
It doesnt really count though because it was irrelevant for quite awhile as Walter got shitposted to death for wanting to make a new language.
And then the D1-D2 switch. Which is why people think D is just as young as Rust and co.
>>
>>61104405
Find a trap! Cute boys are funt to have sex with. They are cute!
>>
>>61104390
>each!(blast(ass));
I chuckled
>>
>>61104473
it's not gay if they have a cute penor
>>
>>61104472
The shitposters won. D will always be irrelevant.
>>
>>61104473
I feel like IRL traps and femboys are no where near the how they are in fantasy/anime. I feel like they would be emotionally unstable and sad people. The sex wouldnt be that great either.
>>
>>61104489
Not really, ive seen a steady influx of new d posters desu.
D will continue its turtle race.
>>
>>61104460
Well that's what you'll get in a mish-mash of concepts
>>
>>61104499
:(
>>
>>61104499
Most of the depression is over not being cute. One day science will make any boy (who wants to) cute.. and I'll be too old or dead to see it.,
>>
>>61104506
>steady influx of new d posters
No, it's clearly the same couple of people posting over and over again. Also, nothing of any significance has been posted. It's all extremely trivial shit, so people clearly aren't using Deadlang for anything serious.
>>
>>61104528
How do you know?
>>
>>61104448
D's UFCS can be abused all the same, you arent wrong. But unlike LINQ, it doesnt feel hacked in, so it goes beyond just terse-posting.
> It's all extremely trivial shit
Thats most of /dpt/,desu. I rarely see extensive repos being posted, or anything beyond SICP-teir stuff.
>it's clearly the same couple of people
Id say there are atleast a dozen or so of us.
>>
>>61104557
>>61104528
>>
>>61104557
>a dozen
AHAHAHAHAHHAHAHA. No.
Maybe a dozen in the entire world. but in these threads alone, you're fucking got to be kidding.
>>
>>61104585
alright lad, i guess well see.
>>
>>61104499
> The sex wouldnt be that great
What did he mean by this?
https://i.4cdn.org/gif/1497742640123.webm
>>
>>61104626
my bepis cant take this
>>
>>61104626
>smoking
fucking gay
>>
>>61104650
>being too beta for even traps
>>
>>61104626
>rust.webm
>>
File: 18.png (883KB, 647x595px) Image search: [Google]
18.png
883KB, 647x595px
Trying to make bounding volume hierarchies a bit faster on a javascript raytracer, which is impossible since javascript IS shit

It took 20 minutes to render pic-related on a single thread
>>
>>61101462
https://www.youtube.com/watch?v=Tng6Fox8EfI
>inb4 "Uncle Bob"
>>
>>61104830
>javascript raytracer
Those are two words that shouldn't be next to each other.
>>
>>61104897
what a meme man
>>
>>61104897
>Uncle Bob
There is no way in hell I'm watching that shit. OOP is a fucking travesty.
>>
>>61104962
That talk is not about OOP.
>>
File: output.webm (541KB, 400x400px) Image search: [Google]
output.webm
541KB, 400x400px
its spinnan!
>>
>>61104979
browser trash
>>
>>61104979
still got some work to do lad.
>>
>>61104979
I can already see the lolis
>>
>>61104979
okay wtf is that explain pls
>>
should i do code on the same day as my code test, or should i go as fresh as possible? what do you guys do on these situations?
>>
>>61105002
WebGL is quite advanced and readily available with no downloads and w.e
>>61105011
true, but its some progress
>>61105020
kek, soon! i'll post daily my progress
>>61105044
its a demo of a webgl 3d animation rotating the object along the X axis
>>
>>61105076
A true coder code as soon as she/he wake up and stop when she/he go to bed.
>>
Let's say I have a secondary C program compiled with 2 versions of a library. Each of these programs calculates and stores a number in a local int variable. How can my main program get each of these values to compare them?

Do I need to somehow call the secondary program from my main and store the value in my main program?
>>
>>61105076
Ideally you should write your tests before your code, but not many people actually do this. I don't see a reason to write tests on a separate day, if you have time to write them both in the same day (in any order) then go for it!
>>
>>61105125
Make a dll
>>
>>61105125
man 3 dlopen
>>
Writing a tcp file-transfer program in C++, that respects rfc791. I wrote something similar for UDP in C, but this time I am learning the OOP features of C++ and TCP sockets simultaneously.

If anyone has any advice for a budding network programmer, I would really appreciate some guidance further.
>>
>>61105176
poo in loo
this is the only advice you'll ever need
>>
>>61105088
but what was the starting thing which looked like a compilation?
I've tested recently webgl's 2 transform feedbacks and they're awesome, you can litterally move millions of particles with opengl3 performance
>>
>>61105165
>>61105169
I'm on unix but the second looks like it may be exactly what I wanted. Thank you so much
>>
i'm creating a program to connect java with mariadb using jdbc, should i check if the user input is valid in the registration frame text fields, should i let the "catch" clause warns the user, or maybe do something inside the Bean(model) classes?
>>
Why is this general so bad?
>>
>>61105176
Read this, before it bites your ass
https://blog.netherlabs.nl/articles/2009/01/18/the-ultimate-so_linger-page-or-why-is-my-tcp-not-reliable
>>
>>61105208
the new API is excellent, I can have complex renders on my shitty hd 4000, I'm planning to learn linear algebra and the API deeper so I don't write pajeet tier code lol. some SIMD optimizations and a good physics library will make for a game that'll compete with the popular desktop ones I imagine
>>
>>61105237
You only think it's bad, but you'll fall in line real quick when someone insults your favorite language.
>>
>>61105237
whats wrong?
>>
>>61105237
Because almost all of the posters are students. I fucking hate student programmers. Every single good programmer I've met irl has been self taught.
>>
>>61102119
Common lisp. Clojure is mostly slow as balls, not standardized and has only implementation.
>>
let's write a program line by line

import random
>>
>>61105295
EOF
>>
>>61105197
I'm a native Anglo, but thanks.

>>61105239
Thanks
>>
>>61105295
#include <studio.h>
>>
>>61105295
//im not using this shit language
>>
>>61105304
dumb phone poster
>>
>>61105295
/*
>>
>>61104528
I'm writing my compiler in D (albeit with a ton of external tools)
>>
>>61105295
>>61105300
>>61105304
>>61105305
>>61105332

this code has about the functionality i'd expect from a /g/ project
>>
>>61105340
tell me about it lad, i think D will be my first dive into compiler-dev.
>>
>>61105284
How the fuck do we expel these summerfags
>>
>>61105295
*/
>>
>>61105250
> and a good physics library
Welcome to the club
I waited 2 years and still nothing fast enough to be considered playable is on the horizon
Cannon.js may be somewhat usable, expecially recently since the author implemented collisions entirely in webgl but it's still far from completion as far as i know
>>
>>61105415
Good software wont come around until you write it.
>>
>>61105351
Not too much to brag about yet, the lexer was written using Ragel and the parser in Bison. My biggest roadblock so far was getting the two to work together, but other than that it's chugging along nicely. Right now I'm just incrementally building the grammar up and working on the parse tree. I'll probably throw it on Github once there's something more substantial to show off.
>>
>>61105415
guess will have to write a small library for the few physics requirements I have to not unity3d flash tier performance. whats your favorite 3d technique to make things more realistic looking?
>>
>>61105304
kek, I do this too
>>
File: DAnfH5hXkAAWnF-.jpg large.jpg (27KB, 966x630px) Image search: [Google]
DAnfH5hXkAAWnF-.jpg large.jpg
27KB, 966x630px
>>61105465
Fresnel Reflectance is very underrated imho

Also accurate soft shadows, I've implemented a piece of research paper of Gael Guannebauds on shadow backprojection which could run at 60fps and is image based as you'd normally do with shadow mapping, but i've read there are new research papers on the subject worth reading

pic related is the result I got from backprojection
>>
>>61105535
sweet!
>>
>>61105284
Fuck you. I need a degree to get a good job. You think I'd be doing this garbage if I could live without it? I have needs you piece of shit.
>>
File: sada.png (1MB, 1363x673px) Image search: [Google]
sada.png
1MB, 1363x673px
>>61105551
As for fresnel reflectance, note how the colors of the airplane gets more reflective at grazing angles, helps a lot with realism for certain materials

this one also featured godrays and a parallax mapped terrain to give a fake 3D effect and still managed 60fps on every browser

We're in a sweet spot with webgl/2 nowadays except we're still missing compute shaders and a goddamn good way to parallelize js computations
>>
>>61105635
Fuck you. Your favorite programming language is shit.
>>
>>61105434
why not handwritten lexer and parser?
>>
>>61105642
Explain to me why this matters and how it has anything to do with this discussion.
>>
>>61105284

This desu.
>>
>>61105727
This comment is not programming related. Please redirect yourself to >>>/trash/ immediately.
>>
File: 1479883677181.jpg (143KB, 833x696px) Image search: [Google]
1479883677181.jpg
143KB, 833x696px
>>61105635
>>61105642
>>
>>61105764
that's incorrect
>>61105771
plis
>>
>CShitters triggered
>>
>>61105799
Who said this?
>>
>>61105805
I did:
>>61105799
> >>CShitters triggered
>>
>>61105722
I'm lazy.
>>
>>61105833
Please show me the exact source of this quote.
>>
>>61105833
>he doesn't know how quoting works
>>
@61105845
i already did WAYQ-kun
>>
/dpt/ how do I achieve maximum programmer? You know, with the long beard full of hotpockets and the disgusting morbidly obese belly and the sweat and the grime and the unbearable shitstench and the dorky glasses and the brain the size of an entire small child and the leet hacking skills and the complicated mathematical proofs scrawled all over the walls and the qtpi AI GF because no actual girl will even come near?
>>
>>61100986
What's so hard about programming? You're literally just typing text. Any braindead retard can do this. There is no reason programmers should be making any more than minimum wage.
>>
>>61105879
>not being /fitlit/
brainlet manlets pls go
>>
>>61105909
why is meme
>>
>>61105907
t. sandwich artisan
>>
>>61105907
What's so hard about being CEO? You're literally just attending meetings. Any braindead retard can do this. There is no reason CEO should be making any more than minimum wage.
>>
>>61105907
typing text is harder when you have to come up with what to type and it has to adhere to mathematical rules that when applied in conjuction will result in desired behavior
>>
>>61105907
This
>sit down at computer
>hit the keyboard a few times
>have a working kernel
>>
>>61105964
it's even easier than this
>have a working kernel
literally a one-step process
>>
>>61105944
What's so hard about any white collar job? You're literally just succumbing to meaningless artificial stress on the daily while actually living quite safely and comfortably. Any braindead retard can do this. There is no reason white collar workers should be making any more than minimum wage.
I actually mean this. This isn't an ironic meme. This is what I really believe.
>>
Soo I anyone care to recommend a good free or freeish debugger for C / front-end for gdb.
>>
>>61105944
Most CEOs make less than minimum wage though.
>>
>>61106025
Almost all unrecoverable errors you'll ever encounter in C will be some variant of memory errors, so valgrind is a pretty good alternative to gdb
>>
>>61106020
>I actually mean this. This isn't an ironic meme. This is what I really believe.
four dimensional ironic memeing right here
>>
>>61105642
[spoiler]my favorite language is the same as you'res[/spoiler]
[spoiler]check mate[/spoiler]
>>
>>61106086
>you'res
u fokn wot m9
>>
>>61106123
its his thick finnish accent
>>
>>61106384
kekkerino mein kampfuccino
>>
>>61106025
qtcreator (can be used as external debugger too), ddd isn't too bad when it works, but the UI is ancient and it crashes a lot.
>>
File: JUST.jpg (31KB, 456x320px) Image search: [Google]
JUST.jpg
31KB, 456x320px
I'm trying to implement Dijkstra's algorithm in Java, and the priorities of the objects in a priority queue in Java cannot be updated, meaning I will end up having to use a bunch of really fucking expensive operations to look up the nodes and to delete and reinsert them when a priority needs to be updated.
>>
>>61106617
>the state of Java
>>
>>61106617
>the priorities of the objects in a priority queue in Java cannot be updated
this
is the whole
FUCKING POINT
OF A PRIORITY QUEUE WHAT THE FUCK
>>
>>61104423
Linq is actually functional programming tho
>>
>>61106617
>really expensive
Isn't it just log(n)? I don't think you can do it better than that, in Dijkstra. This is like complaining that you can't make the darn light go faster than c.
>>
>>61106787
babby's first
>>
>>61106829
If by "babby's first" you mean intuitive, useful, and concise sure
>>
>>61106908
> "select"
>>
>>61106929
>double quoting
What's wrong with select?
>>
>>61106929
It came from SQL
>>
File: 1490504339473.png (304KB, 722x768px) Image search: [Google]
1490504339473.png
304KB, 722x768px
Is there a non-C++ version of Haskell?
>>
>>61106972
C++
>>
>>61106946
>>61106960
>intuitive
>useful
>concise
map > select
>>
>>61106990
For someone coming from sql select is intuitive.
>>
>>61106972
They are called Agda & Idris
>>
>>61106972
What does this mean
>>
>>61106990
This is a retarded criticism. A function having a different name is a stupid reason to dislike an API.
>>
>>61107001
>For someone coming from sql
>>
>>61107015
Haskell is ruined by having no real std and Xtension nonsense. Also obviously its a FPlet for having no DT.
>>
>>61107017
Keep up with the conversation
>>61106908
>>
>>61107031
>no real std
False

>Xtension nonsense
Most are considered effectively standard, we're just waiting for committees to ratify them.

>no DT
Keep in mind Haskell is like 20 years old and begun with full inference
>>
>>61105964
#!/usr/bin/env python3

import kernel

kernel.work()
>>
>>61107003
Anything vastly superior isn't merely a "version".
>>61107015
It means I need something similar to Haskell in quality, but without the C++ aspects of it.
>>61107046
>Most are considered effectively standard
Hacky garbage being standard doesn't make it less garbage.
>>
bash: .: .: is a directory

nice os you got there
>>
>>61107020
C# is mostly used in enterprise environments, and LINQ was made to replace the old shitty SQL client library. No more SqlConnection

>>61107034
Those are both me. A function having a different name doesn't make it hard to learn. Calling a function select instead of map does not negatively impact it's usefulness or conciseness. It might be slightly less intuitive if you expect C# to use the same idioms as Python, but that would make you an idiot.
>>
>>61107046
>false
its true.
>>61107064
Well idris was built on haskell so, yes its technically a version.
>>
>>61107070
How do you delete a folder called ~ without nuking your home directory?
>>
>>61107074
>Well idris was built on haskell
That's not really possible without removing most of the language, in which case it isn't really "building on it". And being heavily influenced by a language isn't the same as "being built on" it.
>>
>>61107123
Alright you pedantic faggot.
But seriously, look into those two if you want a serious FPL.
Theres a few others with DTs you could check out as well but i cant speak for them.
>>
>>61107080
honestly it's like you people don't even have a search engine
https://unix.stackexchange.com/questions/279569/how-to-delete-a-tilde-folder
>>
>>61107148
google doesn't respect my freedom
>>
>>61107073
>Those are both me. A function having a different name doesn't make it hard to learn. Calling a function select instead of map does not negatively impact it's usefulness or conciseness. It might be slightly less intuitive if you expect C# to use the same idioms as Python, but that would make you an idiot.

"select" is less intuitive (completely unintuitive), useful (limited to SQL analogies as a word) AND less concise than "map"
>>
>>61107161
There are loads of other search engines. You could even write a web crawler yourself
>>
>>61107135
>look into those two if you want a serious FPL.
I never claimed I want a serious FPL, I just need something almost as shit as Haskell or even slightly shittier.
I'm already using one of the languages you mentioned.
>Theres a few others with DTs
ATS?
>>
>>61107080
"~"
Also, rmdir doesn't remove non-empty directories so you can't accidentally delete data with it
>>
>>61107161
There are search engines besides googlel.
>>
>>61107180
who the fuck uses rmdir?
rm -r always works
>>
>>61107171
And F*, yes.
> or even slightly shittier.
Use an imperative language with FP support
>>
>>61107165
>less intuitive
Only if you've only ever used Python. In the designated shitting language it's called select, and in SQL, both of which have larger user bases than python.
>less useful
How, it does the same fucking thing.
>less concise
It's not less concise than map, unless by concise you literally mean "number of characters" in which case you're being a pedant.
>>
>>61107204
>imperative language with FP support
What's the best one?
>>
>>61107229
C++
ignore D shills
>>
>>61107229
Probably D. Or if you hate yourself, Rust.
>>
>>61107229
C#
>>
>>61107241
>C++
>FP support
>>
>>61107219
>only if you've used python
Completely fucking wrong, I don't give a shit about Python and I haven't used Python
"Map" is intuitive because you're mapping
"Select" is not intuitive at all. It's SQL jargon.
Map is much more intuitive than Select.

>how
I literally just told you that the word "select" is less useful than "map" because it has a restricted application.

We're talking about one fucking instance, obviously I could go on to say that C# FP is utterly disabled by a limited type system but this is a single point.

>It's not less concise unless you mean less concise
>>
>>61107229
Rust
>>
>>61107241
Call me when C++'s UFCS proposal finally goes through.
>>
>>61107229
C# or C++.
Java is getting better. Scala is okay if you ignore 90% of it.
>>
>>61107241
>sepples
Opinion discarded.
>>61107246
>C#
Opinion discarded.
>>61107243
What's the main difference?
>>
>>61107292
>sepples
>C#
>J*va
>Sc*la
Opinion discarded. Fuck off, retard.
>>
>>61107294
Between D & Rust?
>>
>>61107229
Common Lisp
>>
>>61100986
Have to write some spreadsheet-like program in C#. Holy fuck, handling expressions in OO languages feels terrible.
>>
>>61107294
Rust is a meme and D is dead
>>
>>61107319
Yeah.
>>
>>61107346
>meme
Opinion discarded
>>
>>61107314
Rust and D are both trash toy languages only used by special snowflakes. Enjoy never being taken seriously.
>>
>>61107346
>meme
Opinion discarded.
>>
>>61107373
Rust's borrow checker can get annoying and it bloats up the syntax/general way you do things.
D is just the c++ youve always wanted, shorter and more logical syntax for most things. The prime example being . vs ::
>>
>>61107229
Ignore the dumbs that think that merely adding lambda expressions to a language makes it support FP. Among the ones I know you could try OCaml or Scala. Or just Haskell with ST monad.
>>
>>61107415
But on the otherhand, you have a GC (albeit one you can control). But you can also forego it and just use malloc if you want to. As well as just writing C with UFCS if you wish.
>>
>>61107171
USE ATS YOU FOOL
>>
>>61107415
>D is just the c++ youve always wanted
I'm not mentally ill, so the "C++ is always wanted" is no C++ at all.
>>61107433
>OCaml
I'll try it.
>Scala
Complete fucking garbage.
>ST monad
Why would I want to make the language even worse?
>>
>>61107386
>Enjoy never being taken seriously
Yeah, by people on /dpt/. How tragic
>>
>>61107529
C++ in the traditional sense of C + modern features.
Avoid Ocaml though, its trash.
>>
>>61107294
>What's the main difference?

d was dead on arrival with nobody wanting to touch it because of concerns with proprietary licence baggage, regardless of that not being an issue almost immediately after release, along with a change in the language equivalent to the python 2 > python 3 change but while still just being called d officially, with people referring to the change unofficially as d v2

rust on the other hand right now is more popular than d ever was and you have people actively using and recommending it so much that just mentioning rust on /g/ will have an army of autists countershilling it because sjws or some such nonsense
>>
>>61107550
Ahh, I understand. Your only interaction with the world is through /dpt/. Well, if you ever try to bring whatever hip flavor-of-the-month language you've found to an actual workplace, you can enjoy being laughed at by your peers and superiors.
Sorry friend, the rest of us have real work to do.
>>
>>61107553
Sepples is pure shit in every sense of the word "sepples".
>Ocaml is trash
Why?
>>
>>61107529
Well, ST monad lets you do imperative programming in Haskell, like mutable variables and arrays. So I guess it would be functional language with support for imperative programming instead. I just like Haskell and think that ST monad is pretty ridiculous so I wanted to mention it.
>>
>>61107590
painfully verbose and ugly syntax
>>
>>61107345
What do you mean?? maybe I can help. I actually did a small compiler using OO.
>>
File: 1416669618549.gif (22KB, 94x122px) Image search: [Google]
1416669618549.gif
22KB, 94x122px
Guys I'm gonna have to use Java again for a class I'll be taking soon and I'm kind of rusty, any resources y'all could recommend me so I could brushen up/ practice?

Thanks in advance.
>>
>>61107631
Sure, go here
https://reddit.com
>>
>>61107631
http://docs.oracle.com/javase/tutorial/
I think is one of the best tutorials ever written for the language. And people still pay hundreds for some shitty kathy sierra book.
>>
>>61107594
I would just use some imperative language for that.
>>
>>61107587
>Well, if you ever try to bring whatever hip flavor-of-the-month language you've found to an actual workplace

are you legitimately retarded?
>>
File: tool.jpg (82KB, 594x395px) Image search: [Google]
tool.jpg
82KB, 594x395px
>>61107654
This looks very good, I'll start reading it now

Much obliged.

>>61107631
The layout of that site has always been an eyesore to me.
>>
>>61107529
>I'm not mentally ill
>lives in the real world
>is not mentally ill
What kind of freak are you?
>>
>>61107714
>The layout of that site has always been an eyesore to me.

This was meant for >>61107644

I'm dumb.
>>
>>61101098
>Do you think it has a chance?
LMAO of course not
>>
>>61103312
This is easy as fuck
remainder = fib(N) % M
>>
>>61107587
Yeah, it's not like asking a company to overhaul their software to a different language is just always a bad idea.
>>
new thread: >>61108019
>>
>>61107629
I'm supposed to make a kind of spreadsheet program that takes in a list of formulas: (simplified ambiguous grammar)
<formula> ::= <name> = <expression>
<expression> ::= <name>
<expression> ::= <constant>
<expression> ::= <expression> <binary operator> <expression>

I made classes representing expressions:
abstract class Expression
{
Value eval(Environment env);
IEnumerator<Variable> dependencies();
}
class BinaryExpression : Expression
class Constant : Expression
class Reference : Expression

The dependencies part got ugly because apparently you can't call it with
foreach(Variable x in expr.dependencies())
, because it expects an object with
GetEnumerator()
method. So I have to write ugly code like
IEnumerator<Variable> a = expr.dependencies();
while(a.MoveNext())
doStuff(a.Current);
>>
>>61106787
>LINQ
Half assed, crippled garbage
>>
File: 1498408261711.jpg (128KB, 600x1005px) Image search: [Google]
1498408261711.jpg
128KB, 600x1005px
>>61107241
>No modules
>No UFCS
>Ugliest syntax in the history of mankind
>Made to be C with classes
"no"
Thread posts: 316
Thread images: 27


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