[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: 320
Thread images: 35

Previous thread: >>61273495

What are you working on, /g/?
>>
stop hating node.js
>>
a re-design of Rust's BC in my language that will never be because im a lazy shitter
>>
>>61280660
Learn a real language you fucking mongoloid.
>>
>>61280666
In what way is JavaScript not a real language?
>>
>>61280660
>dynamic typing
trash language
>>
>>61280716
Why? I bet you can't even tell me why dynamic typing is bad without resorting to memes.
>>
>>61280729
>everything I don't agree with is a meme
>>
>>61280729
it should be readily obvious to any competent programer
>>
>>61280729
I find it harder to read ;_;
>>
>>61280729
Not him but, FooNaN
Plus even before i knew the difference i was autistic about wanting to know what types my variables were.
>>
I want to start an RPG in C. I've already got the movement system and most of the RNG figured out. I'm struggling on the input, menus and pretty much any algorithm that doesn't return a single value.
>>
>>61280743
>>61280751
>>61280777
literally zero arguments
gg
>>
>>61280743
That's not what he said, dumbass.
>>
>>61280778
>Plus even before i knew the difference i was autistic about wanting to know what types my variables were.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/typeof
>>
>>61280780
You can either use structs or pointers to return multiple arguments from a function. Menus will suck, but look at GTK+, depending on inputs GTK might help you there too.
>>
>>61280778
>FooNaN
What?
>>
>>61280821
am I being baited or is this really the mindset of the javascript developer?
>>
>>61280846
Not an argument.
>>
>it's another /dpt/ hates something for no reason except rampant elitism episode
fucks sake
>>
>>61280821
>have to call typeof every other line to make sure my int didnt become a char array

wew
>>
Dfags, how should I make this more efficient?
///A personal library for permutations, combinations and distributors
module lib.combiners;

///[1,2,3].distribute([-2,0]) == [ [1,-2], [1, 0], [2,-2], [2, 0], [3,-2], [3, 0] ]
auto distribute(T)(lazy T[] arr1, lazy T[] arr2) if (is(typeof(arr1) == typeof(arr2)))
{
T[][] result;
result.reserve(arr1.length);

for (ulong ri, e1i = 0; e1i < arr1.length; e1i++, ri++)
{
result ~= arr1[e1i] ~ arr2;
}
return result;
}

///[1, 2, 3].distribute(["a", "b"])
///=> [(1, ["a", "b"]), (2, ["a", "b"]), (3, ["a", "b"])]
auto distribute(T, U)(T[] arr1, U[] arr2) if (!is(typeof(arr1) == typeof(arr2)))
{
import std.typecons;

Tuple!(T, U[])[] result;
result.reserve(arr1.length);

for (ulong ri, e1i = 0; e1i < arr1.length; e1i++, ri++)
{
result ~= tuple(arr1[e1i], arr2);
}
return result;
}
>>
I'm working on a JS interpreter. The language is... challenging. For example, what does this function do?

function foo(x) {
var z = x+1;
}


If you said "nothing", you're wrong.
>>
>>61280883
people who aren't retards and know what they're doing don't have that problem
>>
>>61280780
Is it supposed to have graphics? Use SDL then. It's super easy and it's what Valve uses. GTK's overkill.
>>
>>61280871
javascript is literally shit, even in a web browser your website should still work with javascript disabled, and if you're using javascript for desktop applications then may god have mercy on your soul
>>
>>61280905
>even in a web browser your website should still work with javascript disabled
Why?
>and if you're using javascript for desktop applications then may god have mercy on your soul
Still no arguments then?
>>
>>61280905
>if you're using javascript for desktop applications then may god have mercy on your soul

I don't know guy, seems like Electron is going to take over the future of software development.
>>
>>61280889
w-what does it do?
>>
>>61280895
And i also dont have that problem and dont have to worry about ambiguity either.
Dynamic tying makes for lazy and incompetent programmers.

And god help any web artisan that attempts to learn an actual FPL with dependent types
>>
>>61280924
weak bait
>>
>>61280937
>being this delusional
>>
File: apudance.gif (111KB, 1027x731px) Image search: [Google]
apudance.gif
111KB, 1027x731px
>>61280629
Thanks for using an apustaja image.
>>
>>61280889

I'm running noscript, so nothing
>>
>>61280929
>Dynamic tying makes for lazy and incompetent programmers.
This makes literally zero sense. Do you even think before you type?
>>
>>61280922
>>even in a web browser your website should still work with javascript disabled
>Why?

Not him but this is why.
>>
>>61280942
weak bait
>>
>>61280949
name one javascript programmer who isn't lazy and incompetent
>>
>>61280926
It can run arbitrary code when x is an object with an overridden number converter.
>>
>>61280956
And how is that bad, exactly?
>>
>>61280981
jesus christ
>>
>>61280949
Ah yes, because your average JShit dev is the model programmer.

Do you want to try to refute or give any valid application of DT besides the wrong kind of """"convenience""""
>>
Are we mad at javascript because js code artisans make way more money than us writing business logic
>>
>>61280989
https://www.youtube.com/watch?v=3U3lV5VPmOU
>>
>>61280929
oh no I guess those web artisans will have to skip hipster haskell and go straight to lisp then.
>>
>>61280989
>Do you want to try to refute or give any valid application of DT besides the wrong kind of """"convenience""""
How is it the wrong kind?
>>
>>61280993
They don't though
>>
>>61281014
LOL
>>
>>61280941
dumb frogposter
>>
>>61280993
No we hate JS because its single-handedly set back the web, decades.
>>61281000
>cant even tell me yourself
>>61281012
Because DT generates shitty and unmaintainable code. Thats why the web is a house of cards built on a foundation of incompetence and bloat.
>>
>>61281024
JS code artisans work for startups that pay low salaries and worthless equity or options
>>
I don't know why I still come to these threads.
>>
>>61281046
because of Haskell!
>>
>>61281040
implying js ruined the web, not social networks and adverts
>>
>>61281024
they're mostly self-taught hobbyist brainlets, and the few bay area queers that make any money have terrible job security at webfag startup companies
>>
JavaScript was my first language.
Or python.

I have a tendency to learn two languages simultaneously. I hate python more than JS because python syntax is kinda less ntuitive. Same goes with JS but at least JS is not white space sensitive
>>
>>61281040
>Because DT generates shitty and unmaintainable code.
How? I'd like to know what leads you to believe that.
>>
>>61281063
years of experience with both dynamically typed and statically typed codebases
>>
>>61281040
Wait, are you talking about dynamic typing? I thought DT stood for dependent types
>>
>>61281058
you don't actually believe this shit do you?
>>
>>61281014
>>61281024 (both)
>#TRIGGERED
>>
>>61281075
Okay, so you don't have an argument. Just anecdotes and ad hominem. I just wanted to confirm. Thank you.
>>
>>61281077
>come join our startup!
>our stack is node and ruby
>we can't pay you a great salary but we can give you options and pizza
>btw you'll be expected to put in 12 hour days regularly
>>
>>61281077
no i'm sure your artisan video game company will be a huge success
>>
>>61281063
Youve never had to work on a JShit code-base in depth if you really have to ask that.
There is literally no valid argument for your language being dynamic besides laziness. It only serves nothing but issues.
>>61281076
dynamic typing lad, thought that was clear.
>>
File: 89043e_6014629[1].jpg (279KB, 1200x1621px) Image search: [Google]
89043e_6014629[1].jpg
279KB, 1200x1621px
>>61280895
You're a good driver, anon
>>
>>61281104
>dynamic typing lad, thought that was clear.
I didn't bother reading the rest of the thread
>>
>>61281086
http://ieeexplore.ieee.org/document/677186/?reload=true&arnumber=677186
enjoy
>>
>>61281104
>>61281086
>>
>>61281125
fuck off with your IP grabber
>>
>>61281104
who needs types when you have tests?
>>
>>61280984

Wasting resources.

>inb4 but what's that for modern computers

Scale it to every site on the whole of internet wasting your resources and you've got a 1% larger electricity bill.

Or a 40% larger internet bill if you're on a data plan.

Scale that through a year and you're working somewhere near a whole week just to pay for someone's decision to bloat up their website.
>>
>>61281128
Youve still never given me an argument for what makes DT good besideos a youtube link i shant be watching.
>>
>>61281149
>Scale it to every site on the whole of internet wasting your resources and you've got a 1% larger electricity bill.
bullshit
>>
>>61281144
>he isn't behind 7 proxies
>>
Dynamic typing is just static typing done at runtime.
>>
>>61281153
>Youve still never given me an argument for what makes DT good
It's pretty self-explanatory.
>>
>>61281178
Then humor me.
>>
>>61281178
fuck off to >>>/g/wdg
>>
>>61281192
>muh c and haskell safespace
>>
>>61281145
Tests should only be reassurance, not a requirement for functioning code.
>>
File: 1497003131273.jpg (34KB, 567x565px) Image search: [Google]
1497003131273.jpg
34KB, 567x565px
>>61281178
>>
>>61281192
>programming thread
>except for programming languages i dont like
not your safe space, pal
>>
>>61281163
Not him but do you not see it streaming 256KB+ a second? That's more than a fucking mmo uses.

Do you not see it using 100mb of memory? That's also more than many video games.

The Internet would be SO FAST if web monkeys weren't so wasteful. Instead of being able to do more with faster computers, we end up being able to do the same because the monkeys who program websites expand how much resources they use. It's a shitty fucking Parkinson's law.
>>
>>61281192
>>>/tumblr/
>>
>>61281215
dependent typing > static typing > dynamic typing > dependent typing
>>
>>61281230
100mb memory... wow... literally an average google chrome tab... amazing...
>>
this thread is so bad

you don't even like javascript

you're just trolling
>>
>>61281230
>That's also more than many video games.
hell no
>>
Well, I think this is the last time I'll be opening a /dpt/ thread. Even Reddit is better than this.
>>
File: file.png (6KB, 519x47px) Image search: [Google]
file.png
6KB, 519x47px
>>61281271
he's right you know
>>
File: 1374574508775.jpg (29KB, 499x500px) Image search: [Google]
1374574508775.jpg
29KB, 499x500px
>All of these meta-fags
Fuck off. You're not increasing the quality of the thread.
>>
>>61281271
>i only play bloated ubishill games and shit that kids hacked together in jewnity engine just to exploit the steam trading card system
>>
>>61281301
metaprogramming is fine
>>
>>61281299
>chooses a tiny indie game that nobody but /v/ cares about to prove his point
lmao
>>
>>61281299
>garbage indie game
>>
>>61281249

huh
>>
>>61280956
>CNN
Fuck off.
>>
>>61280905
>and if you're using javascript for desktop applications then may god have mercy on your soul
Why? Is it because it's easy to use? Where is YOUR fork of VS code?
>>
>>61280956
>>61281325
Enjoying the nice weather in California, Patrick?
>>
>>61281341
Are you upset because it wasn't ``britbart``?
>>
>>61281356
>vs code is written in javascript
holy shit
>>
>>61281372
VS Code is literally built on top of atom shell.
>>
>>61281385
>atom is written in javascript
hOlY sHiT
>>
>>61281365
>FNN is getting so desperate that they have to do product placement on a mongolese hat knitting forum
>>
>>61281372
VSC is electron-based that ships with NPM.
>>
>>61281399
>electron is written in javascript
holy cow...
>>
>>61281397
>>61281407
>>
https://www.theregister.co.uk/2017/03/23/cursor_devours_cpu_cycles_ms_code_editor/
>>
>>61281372
>>61281419
>>
File: file.png (3KB, 539x35px) Image search: [Google]
file.png
3KB, 539x35px
>>61281305
>>61281323
you retards will never be happy
>>
>>61281398
Isn't that exactly how ``br**rt`` got so popular in the /edgy/ board?
>>
File: ENOUGH.jpg (29KB, 412x430px) Image search: [Google]
ENOUGH.jpg
29KB, 412x430px
NEWBIE CHALLENGE: WRITE CP IN YOUR CHOICE OF LANGUAGE

CP MUST TAKE TWO STRINGS, THE FIRST DESIGNATING AN INPUT FILE, AND THE SECOND DESIGNATING AN OUTPUT FILE

ALL THE DATA FROM THE INPUT FILE SHALL BE COPIED(OVERWRITTEN) TO THE OUTPUT FILE
>>
File: 1445722183259.jpg (68KB, 700x700px) Image search: [Google]
1445722183259.jpg
68KB, 700x700px
>>61281419
I-It's not JavaScript
>>
>>61281479
still looks as good as or better than most "modern" games
>>
>>61281419
typescript is javascript
>>
>>61281434
>10 year old game
>>
>>61281478
#!/bin/sh
cp $1 $2
>>
>>61281434
>>61281299
>>61281230
>what is vram
Are you fucking retarded? Crysis uses gigabytes of memory.
>>
>>61281478
#!/bin/sh
cat "$1" > "$2"
>>
>>61281434
trolling or just stupid as fuck?
>>
>>61281532
DISQUALIFIED
>>
File: v&.png (35KB, 475x122px) Image search: [Google]
v&.png
35KB, 475x122px
>>61281478
>write cp
>>
>>61281434
>he doesn't know about vram
>he actually thinks crysis uses 0.6 MB of memory
can't stop laughing
>>
>>61281532
>>61281546
>import solution
>>
Idris or Python?
>>
Why so many perl fags all of a sudden?
>>61281532
>>61281546
>>
>>61281546
>sh
>language
>>
this might sound retarded, but the knapsack problem is pretty much the same as the subset sum problem, but with two parameters instead of one (weight and value), right?
>>
>>61281533
>>61281549
>>61281566
no shit
>>
>>61281586
>perl
It clearly says "/bin/sh" at the top, idiot.
>>
>>61281478
With progressbar.
#!/bin/sh
curl -# "file://$1" > "$2"
>>
>>61281585
node.js
>>
Bash is not a language you stupid fucks.
Seriously, I don't know why I still come here.
>>
File: threads-as-control-flow[1].png (49KB, 1024x580px) Image search: [Google]
threads-as-control-flow[1].png
49KB, 1024x580px
What is the best library to use for threads in c++?
>>
>>61281624
>Bash is not a language you stupid fucks.
It's Turing complete, so that's enough for me to quality.
>>
>>61281532
>>61281546
>>61281600
not a language
>>
>>61281624
>Bash is a Unix shell and command language
???
>>
>>61281631
pthread
>>
File: file.png (9KB, 339x211px) Image search: [Google]
file.png
9KB, 339x211px
>>61281533
>>61281549
>>61281566
retards
>>
>>61281631
node.js
https://www.npmjs.com/package/threads
>>
File: db0.jpg (26KB, 349x642px) Image search: [Google]
db0.jpg
26KB, 349x642px
>>61281647
(You)
>>
>>61281570
#!/usr/bin/sbcl --script

(destructuring-bind (name arg1 arg2) *posix-argv* (declare (ignore name))
(with-open-file (in arg1 :direction :input
:element-type 'signed-byte :if-does-not-exist :error)
(with-open-file (out arg2 :direction :output :element-type 'signed-byte
:if-exists :supersede :if-does-not-exist :create)
(loop (let ((byte (read-byte in nil :eof)))
(if (eq byte :eof) (return)
(write-byte byte out)))))))
>>
>>61281643
Do you believe everything wikipedia says?
>>
>>61281657
disgusting
>>
>>61281683
A shell is also a programming language.
An abstracted set of commands to issue instructions.
>>
>>61281593
>this might sound retarded
not at all, I member reducing the subset sum problem to knapsack to prove npc as an exercise in complexity class. your post is a rough draft of the proof I think. it might be in that garey johnson book, not sure though
>>
I want to make an ios/android 2d game that will be heavily dependent on touch swiping/sliding. I am a web developer, current work stack is react and node.js. What stack can I use to get into this as quickly as possible while also having best support for touch events? Accuracy would have to rival touch ninja
>>
>>61281670
>he legitimately thought Crysis takes up 0.1 MB of system memory
no jon, you are the retard
>>
>>61281674
>import solution
>>
>>61281639
Shell scripts are programs, retard.
>>
>>61281705
fruit ninja*
>>
>>61281719
technically untrue
>>
>>61281699
yeah, subset sum is 01 knapsack with weight = value
I probably should have googled first
>>
>>61281705
stealing your idea rn btw
>>
>>61281719
no, shell scripts are ran by linux
>>
File: 1462423952574.jpg (43KB, 690x460px) Image search: [Google]
1462423952574.jpg
43KB, 690x460px
>>61281478
>cp
import std.stdio, std.file;

void main(string[] args)
{
args[1].readText.toFile(args[2]);
}
>>
>>61281761
>shell scripts are ran by linux
is this bait?
>>
>>61281783
i mean the linux kernel
>>
>>61281783
cp is a C program that you just invoked from your shell
>>
I'm kind of learning as I go with Android and it's all a huge pain in the ass

As my application gets more complex I find myself changing a bunch of code cause I keep using hacky solutions I find off stackoverflow that weren't best practice

I'm not sure if this is how android dev is or if I'm just a retard
probably the latter
>>
>>61281788
i'm using macOS, where is your god now
>>
>>61281761
B-but I'm using BSD.
>>
>>61281795
macOS is based on the linux kernel
>>
>>61281794
once you write a lot of programs you get the hang of patterns that work.
then you kill yourself because you're 45 and your only skill is programing you've developed carpal tunnel and you get fired from your job and you have no wife or children and you're alone on the street and its so so very cold its time to go to sleep now shhhhh
>>
File: 1475835800047.png (26KB, 625x626px) Image search: [Google]
1475835800047.png
26KB, 625x626px
>>61281816
>>
>>61281773
>race condition
>>
File: rgzr.png (589KB, 861x899px) Image search: [Google]
rgzr.png
589KB, 861x899px
>>61281875
https://dlang.org/library/std/stdio/to_file.html
>>
>>61281905
>falling for the D meme
>>
>>61281478
import System.Environment (getArgs)
import System.Directory (copyFile)

main = do
(from:to) <- getArgs
copyFile from to
>>
>>61281759
what idea? 2d touch game?
>>
File: eminem.jpg (96KB, 1024x768px) Image search: [Google]
eminem.jpg
96KB, 1024x768px
>>61281917
You think he tripped, fell, landed on that D?
>>
>>61281919
>import solution
>>
File: bun_noline.png (19KB, 600x600px) Image search: [Google]
bun_noline.png
19KB, 600x600px
Is there any unicode for akari's buns?
I want to overload ; with a cute akari bun
>>
>>61281478
(letrec ((cp (lambda (p1 p2)
(let ((c (read-char p1)))
(if (eof-object? c)
(begin (close-input-port p1)
(close-output-port p2)
#t)
(begin (display c p2)
(cp p1 p2)))))))
(cp (open-input-file (car (command-line-arguments)))
(open-output-file (cadr (command-line-arguments)))))
>>
File: Ken_n_dennis.jpg (19KB, 310x201px) Image search: [Google]
Ken_n_dennis.jpg
19KB, 310x201px
Anyone else learning B?
https://www.bell-labs.com/usr/dmr/www/btut.html
>>
>>61281936
>if you arent implementing the wheel it doesnt count
"no"
>>
Can one program in Latin?
>>
>>61281478
#!/usr/bin/env python3

import shutil, sys
shutil.copy(sys.argv[1],sys.argv[2])
>>
>>61281936
$ curl http://hackage.haskell.org/package/directory-1.3.1.1/docs/src/System-Directory.html >> cp.hs
there
>>
File: Smug_9d906d_5762907.jpg (42KB, 600x476px) Image search: [Google]
Smug_9d906d_5762907.jpg
42KB, 600x476px
>>61281919
D won this time
>>
Have maybe a stupid question guys:

Will using Linux make me a better programmer? Been programming for fun for awhile but I'd like to get more serious so I can eventually land a job.

Also, does anyone have any cool project ideas I can do for a portfolio?
>>
>>61281977
>he can't even cp
>he has to import his IO
haskellfags in a nutshell
>>
>>61281919
>from:to
Don't you mean
from:to:_
>>
>>61281979
You can program in anything. Just download an open source compiler/interpreter and modify the source code.
>>
>>61281980
>import solution
>>
>>61281993
Yes and no. With Linux you can tinker your system, modify some programs, compile and replace and use them very easily.

It gives you more freedom like that.
>>
>>61282003
stop spamming you lil shit
>>
>>61281963
>>61281674
So, only the lispfags can follow directions.
>>
File: 1488936529445.png (488KB, 2550x3300px) Image search: [Google]
1488936529445.png
488KB, 2550x3300px
>>61282003
>>
File: golang.png (29KB, 650x650px) Image search: [Google]
golang.png
29KB, 650x650px
Can we stop pretending this is bad?
>>
>>61281993
a bare kernel wount help you much senpai
get a full gnu/linux distro
it's comfy
>>
>>61282010
>pythong
>import
>solution
cant make this up
>>
>>61282019
https://github.com/ksimka/go-is-not-good
>>
>>61282019
botnet
>>
>>61282034
>github
>>
>>61282019
http://nogenerics.info
>>
>>61282040
It's where Golang is hosted, yes
>>
>>61282042
What's so bad about not having generics?
>>
>>61282014
>a challenge meant to make the people demonstrate knowledge and problem solving abilities
>just imports the solution
>>
>>61281919
ioArg2 :: (String -> String -> a) -> IO a
ioArg2 f = do
(x:y:_) <- getArgs
f x y

(utility function to be re-used later)
...
main = ioArg2 copyFile
>>
File: 1494332105752.jpg (733KB, 3702x2198px) Image search: [Google]
1494332105752.jpg
733KB, 3702x2198px
>>61282051
>>
>>61282042
generics are bad and you should feel bad for supporting this shitty meme
>>
>>61282014
If you believe programming is importing libraries then you will be replaced by a basic tool within the next 5 years.
>>
There is only one good pragramming language and it's called C.
>>
>>61282055
Can you make a program in your language that takes two arguments and prints the sum?
>>
>>61282072
you forgot the ++
>>
>>61282071
tools make programing easier friend
>>
>>61282071
>replaced by a basic tool within the next 5 years
We'll see.
>>
>>61282080
Bloat.
>>
>>61282080
Nope, he said "good"
>>
>>61282064
>needing functions like that
pleb detected
printf("%f", x + y)

is all you need, have you never heard of casting, 5.0 ==5
>>
>>61282087
2017
unless you're programming on embedded systems, it doesn't matter
>>
>>61282093
see >>61280888
>>
>>61282056
>::
>>
>write a tool to randomly combine Haskell library functions until a program of the correct type signature is generated
>it works 90% of the time
rip /dpt/
>>
File: 1498117439710.png (9KB, 637x130px) Image search: [Google]
1498117439710.png
9KB, 637x130px
>>61282094
>>
>>61282056
Actually one thing I just thought of
It would be nice if haskell had a
popArg :: IO String


>>61282100
Yes, this is Haskell
>>
>>61282103
Haskell doesn't have state, so you can't pop.
>>
Can we please stop pretending that C has any place these days outside of embedded systems?
>>
>>61282112
>IO
>>
can someone make a language like python without annoying whitespace rape?
>>
>>61282112
>Haskell doesn't have state
u wot m8
>>
>>61282096
Why did you quote me?
>>
>>61282093
>5.0 ==5
Average pytoddler

I bet you also think 12/10 == 12*0.1
>>
>>61282102
Wow, an image with text. It must be official!
>>
>>61282121
it's called javascript and it's fucking amazing
>>
>>61282132
>butthurt
>>
>>61282121
Lisp
>>
>>61282121
ruby?
>>
>>61282125
Because I was replying to you
>>
>>61282128
Reread the ieee754 standard again idiot. Double precision floating point number representations of whole numbers that take up less than 54 bits are exact.
>>
>>61281963
>command-line-arguments
>>
File: languages3.png (17KB, 522x384px) Image search: [Google]
languages3.png
17KB, 522x384px
>>
Which poo languages should I avoid?
>>
>>61282155
Correct
>>
>>61282138
I don't understand, is that an emote? Are you experiencing butthurt right now? Do you need a doctor? Colon cancer is serious, my friend.
>>
>>61282145
I don't know D, so I can't help you.
>>
>>61282162
>actually being butthurt
>>
>>61282138
>dumbass
>>
>>61282158
what defines a poo language?
>>
>>61282172
You need to take your anal health more seriously. Does it bleed when you poop?
>>
>>61282158
haskell, c, perl, ruby, lisp, python, d, c#, f#
>>
>>61282168
It's a library function where things are not as simple as "printing the sum". But obviously your retarded brain on python is unable to grasp that
>>
>>61280956
>him
Way to assume pronouns, shitlord
>>
>>61282182
something something
>made by apple, microsoft, google
>result is not a program, but an "app"
etc
>>
File: 1497305697332.png (40KB, 1620x774px) Image search: [Google]
1497305697332.png
40KB, 1620x774px
>>61282187
kek
>>
>>61282158
Go
D
C
>>
File: 10264303.jpg (126KB, 706x546px) Image search: [Google]
10264303.jpg
126KB, 706x546px
>>61282162
>>
>>61282155
>fast development
>functional meme languages
lol everytime
>>
>29 posters
Just sad.
>>
>>61282209
It says 30 on my clock. Fix your shit.
>>
>>61282209
This, bigger threads are fucking cancer
>>
>>61282190
I still can't read D, so fuck off, retard.
>>
>>61282182
class as a keyword
>>
>>61282219
I'm guessing you don't know C as well?
>>
>>61282147
http://www-users.math.umn.edu/~arnold/disasters/patriot.html
>>
>>61282214
That's me, you imbecile. This general is garbage, as are most generals.
>>
>>61282219
literally how, D has such simple syntax.
>>
python with static typing and type inference
>>
>>61282219
brainlet
>>
I'm writing a language called node.html
<print>hello world</print>
>>
>>61282230
Irrelevant, C isn't D.
>>
>>61282244
Cringed.

Why aren't pytoddlers banned already?
>>
What is the best lisp slang?
>>
>>61282250
cringed
why aren't elitists banned already?
>>
>>61282236
>this>>61280888
>simple
>>
File: 1487776988114.png (60KB, 645x968px) Image search: [Google]
1487776988114.png
60KB, 645x968px
>>61282219
>>61282244
>>
>>61282250
I don't even know python.
Why do you insist on binding me to an identity?
>>
>>61282263
The fuck dude, just read the function prototype
>>
>>61282260
http://lispyscript.com/
>>
Stop using javascript outside of webpages.
>>
>>61282209
Internet's down in most of Southern California right now. And as we all know, that's where the majority of programmers live.

It's also no coincidence that there's a distinct lack of tranny and muslim posting in this thread.
>>
>>61282284
I'm a muslim (former)
>>
Start using node.js everywhere.
>>
dynamic typing must be destroyed
>>
>>61282284
So this is why the thread is full off shitposts
>>
File: terminal-window.png (129KB, 1884x1560px) Image search: [Google]
terminal-window.png
129KB, 1884x1560px
https://github.com/NodeOS/NodeOS

/g/ BTFO
>>
>>61282233
How does 0.1 being unrepresentable in a double have anything to do with all 53 bit or less ints being representable?

You need to learn how floating point numbers work. They're not magically inaccurate.
All whole numbers between
9007199254740992 and -9007199254740992 are exact with doubles.
>>
Thoughts on curses?
>>
>>61282300
Please stop shitposting.
>>
>>61282266
~ is appending.
Im guessing you cant do templates?
>>
>>61282302
>They're not magically inaccurate.
They still are, the underlying reasons exist
>>
>>61282278
I bet you can't even read this, even though it's very simple to me.
reverse = foldl (flip (:)) []

qsort [] = []
qsort (x:xs) = qsort s ++ [x] ++ qsort b
where (s, b) = partition (<x) xs

import Data.List

data Color = White | Black | Purple | Red | Green | Orange deriving (Eq, Enum)

colors = [White .. Orange]

cut White = Left [White, Black]
cut Red = Right [Green]
cut Black = Left [White, Green, Orange]
cut Orange = Right [Red, Black]
cut Green = Right [White, Orange]
cut Purple = Left [Purple, Green, Orange, White]

boom :: [Color] -> Bool
boom = boom' colors
where boom' _ [] = False
boom' allowed (c:cables)
| elem c allowed = boom' allowed' cables
| otherwise = True

where allowed' = case (cut c) of
Left cs -> colors \\ cs
Right cs -> cs
>>
>>61282305
please stop your irrational hate of javascript
>>
>>61282300
proof that javascript is the future
>>
>>61282308
Why do you expect me to know things I don't know?
>>
>>61282312
That's not C syntax, which brings me back to >>61282230
>>
>>61282310
Only some of them you idiot.

Incidentally none of the whole numbers between
9007199254740992 and -9007199254740992 err when cast to doubles. Maybe if you learned how floating point numbers work you'd know why.
>>
File: 13122862.jpg (31KB, 326x323px) Image search: [Google]
13122862.jpg
31KB, 326x323px
>>61282312
Imagine a language that can't do multicore
>>
reminder that javascript was written in 2 weeks
>>
>>61282322
Every language has its own OS in the making.
A JS OS would be truly awful though.
>>
>>61282334
python?
>>
>>61282334
>anime
discarded

Also, Haskell is the best at threading since IO is contained.
>>
>>61282333
>Only some of them you idiot.
Of course, you fucking low IQ retard, which is why the bug happened in the first place. Stop trying already.
>>
>>61282340
POOCamel
>>
So basically this thread is all about
>ur dumb for using xy
?
Seriously?
>>
>>61282347
>5.0 ==5
>Average pytoddler
This is what it started with. Don't try to change the topic.

And yes. 5.0 == 5.

Try it out yourself. Read the ieee754 standard to find out why.
>>
>>61282357
I'd easily call JS, C++ and Python users dumb, and for valid reasons
>>
Reminder that if your language has "::", its automatically trash.
>>
>>61282357
s,thread,/g/,
>>
File: defusal.png (277KB, 2780x860px) Image search: [Google]
defusal.png
277KB, 2780x860px
>>61282312
>>
>>61282363
>>61282128
>>
>>61282370
(((Rust))) and C pee pee BTFO
>>
>>61282365
Eh, get off your high horse, Python is badass. The logo is a fucking snake.
>>
>>61282372
note this would be significantly more concise in Idris
>>
>>61280981
HAHAHAHA Fucking seriously?
>>
>>61282372
>haskellfags invent new extensions just to avoid IO
>>
What do you think of the Jai language?
Personally I am fucking hyped, and am just waiting for it to be released.
It makes so many optimization techniques clear and precise.
I think it could actually become the language of choice in any high-performance environment.
>>
>>61282357
this is every /dpt/
>>
>>61282372
>If you cut a white cable you can't cut white or black cable

???
>>
File: goprogramminglanguage.jpg (74KB, 760x479px) Image search: [Google]
goprogramminglanguage.jpg
74KB, 760x479px
New thread: >>61282519
>>
should i learn common lisp, scheme, some other type of lisp, OR haskell?

what about nim?
>>
>>61282464
it's totally unnecessary and one man isn't going to turn the industry upside down by himself. C++ is enough for performance already. even if you can get it up to par with C++ (or better), it won't be worth using simply because you would have to put in the investment of learning yet another special snowflake language for little to no real benefit.
>>
>>61282464
Literally cant have an opinion until he either releases an RC or 1.0 itself.
Right now its covered in
@fix
@slow
@hack
@work-around
etc

I dont see what the appeal of it so far though. Its just going to be his toy language, desu.
>>
>>61282507
you can't cut white then white or white then black you have to cut white then something else
>>
>>61281478
#include <stdio.h>
#include <string.h>

int main(int argc, char **argv) {
if (argc != 3) {
fprintf(stderr, "usage: cp <source> <dest>\n");
return 1;
}
if (strcmp(argv[1], argv[2]) == 0) {
fprintf(stderr, "cp: source and dest are the same\n");
return 1;
}

FILE *src, *dest;
if ((src = fopen(argv[1], "r")) == NULL) {
fprintf(stderr, "cp: file '%s' not found\n", argv[1]);
return 1;
}
if ((dest = fopen(argv[2], "w")) == NULL) {
fprintf(stderr, "cp: can't write file '%s'\n", argv[2]);
return 1;
}

int c;
while ((c = getc(src)) != EOF) {
putc(c, dest);
}

fclose(src);
fclose(dest);

return 0;
}


I-I'm still learning
>>
Why does opengl use floats everywhere? Doubles too expensive for graphics?
>>
>>61282746
most opengl applications push the limits of the hardware, so yes, doubles are too expensive, and you usually don't need double precision anyway
>>
>>61280629
Currently investigating gcloud. In the past I have used ec2 and digital ocean, but I am moving toward containerization and examining my options. Kubernetes seems interesting.

Anyone have any experience?
Thread posts: 320
Thread images: 35


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