[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: 355
Thread images: 24

File: 1483317361570.jpg (72KB, 440x406px) Image search: [Google]
1483317361570.jpg
72KB, 440x406px
What are you working on, /g/?
Old thread: >>58289160
>>
Thanks for using an anime image
>>
File: 1454531188660.jpg (214KB, 600x620px) Image search: [Google]
1454531188660.jpg
214KB, 600x620px
>>58291863
>smug_anime_girl_321.jpg

>>58291845
I'm just kinda curious if anyone's actually going to start hosting on another platform. Like .NET Core on linux/mac was make or break for their product meeting demand (like hosting on AWS vs. Azure)
>>
I want to work from home. How fucked am I?
>>
Anime posters are usually polite, pleasant and knowledgeable

-- K. Powers, 43.
>>
>>58291925

If you want to do freelance, not at all. If you want to work in the industry, unless you have a nice resume, you probably won't get anything.
>>
File: 1467663665086.png (1MB, 1280x720px) Image search: [Google]
1467663665086.png
1MB, 1280x720px
>>58291882
Thank you for using an anime image!
>>
Day 6: Still learning Haskell. This the most I've dedicated to any language to get to a point to actually use the language. And I know Prolog and Functional Programming(Mostly). This is harder than I thought
>>
>>58292005
Only to learn that, in the end, you won't even use it
>>
>>58292005
>And I know Prolog
Did you do anything useful with it?
>>
Yeah, I ran this:

http://benchmarksgame.alioth.debian.org/u64q/program.php?test=fannkuchredux&lang=lua&id=1

And it only took 95 seconds on my FX-6300 vs 1600 on regular Lua compiler on a superior(I assume) CPU than mine.
>>
>>58292005
ask if you need help
>>
>>58292074
Not really. I learned a new way of thinking, and recursion is very easy now, thanks to Prolog.
>>
I'm trying to learn Scheme as a programming noob (just a little C++ experience), and I'm having trouble with this simple Fibonacci sequence code. Here's my attempt to produce the nth Fibonacci number:

(define (fib num) (if (< num 0) 0) 
(if (= num 1) 1)
(if (= num 2) 1)
(if (> num 2) (+ (fib (- num 1)) (fib (- num 2)))
)

But this produces the error "The object #!unspecific, passed as the argument to integer-add, is not the correct type." Surely my code is not efficient, but why doesn't it at least run? It seems there's some data type issue, which seems weird for Scheme.
>>
>>58292075
So basically if I'm allowed to cheat and import a threading library then I could get it down barely below the Java times on shittier hardware.
>>
I'm being lazy when it comes to multithreading some old code and making it so that I stick every single global variable I'm using in a giant struct, writing my function signatures and then using OpenMP to parallelize.

Good enough, in my books. Not sure how else I can more efficiently multithread without expending more effort with a concentrated rewrite.
>>
>>58292325

*rewriting my function signatures.
>>
>>58292202
(define (fib num) 
(if (< num 0) 0
(if (= num 1) 1
(if (= num 2) 1
(if (> num 2) (+ (fib (- num 1)) (fib (- num 2))))
))))
>>
clang's address sanitizer is pretty cool. The next three hours of debugging should be a blast...
>>
PSA: Crossdressing is unsafe, /dpt/. Stay safe.

use std::mem::transmute as crossdress;

struct Boy;
struct Girl;

fn main() {
let hime: Girl = unsafe { crossdress(Boy) };
}
>>
>>58292382
Ok that's pretty funny anon
>>
I want to write a game mod. Nothing really complex. I primarily want to read data
about what's happening behind the scenes but may not be part of the games interface.
Damage done, movement speeds and the like. Which libraries should I study to get an understanding
of what I need to do?
>>
>>58292359

Did you not catch this happening under Valgrind?

Valgrind gives better diagnostics with line numbers and such.
>>
>>58292404
what game and engine?
>>
>>58292404
Depends on the game, as well as how you interact with the data. Is there an API? A memory location?
>>
>>58292430
Unreal engine games.
>>
>>58292382
#define BOY 1.0
#define GIRL 0
float gender = BOY; // Hormonal ratio
gender = GIRL;
>>
>>58292416
Valgrind doesn't complain.
>>
>>58292336
Thanks! I would've never spotted the flow-control syntax error, since I haven't formally studied that in Scheme yet. I was just mimicking someone else's code which was much simpler to try to get it myself.

Also, I'm using Emacs for an interpreter right now. It seems like it might be useful, but do you recommend any others for any reason? I'm not really familiar with Emacs so I'll have to learn that too unless you think that might be a waste of time.
>>
File: 544747865464353.png (636KB, 742x534px) Image search: [Google]
544747865464353.png
636KB, 742x534px
>>58292382
>STD
>FN
>Transmute
>>
>>58292325
>lazy
who cares, as long as it works.

getting all the locks/spin waits set up right is the tricky part.
>>
was the original bit torrent client written in haskell?
>>
>>58292528
>who cares, as long as it works.

I assume people who actually want faster code. Why fuck with threads if you don't care about speed? Why be lazy if you do?
>>
>>58292560
No, it was written in Python.
>>
>>58292445
Which version of Unreal? 3 or 4?
With 4, they have a great amount of extensive tutorials on how to use the engine
https://docs.unrealengine.com/latest/INT/GettingStarted/index.html
Otherwise, you can start with downloading the Unreal 3 SDK.
Also, do you know C++? Also, they use UnrealScript, which is shit.
>>
>>58292564
point is, do whatever works.
don't fret about it being proper or someshit. if it makes an improvement, then it's a win.
>>
>>58292528

Maybe I should be more specific. I am calling all this code inside a loop so...

>>58292564

I need to do this because parallel calls to the code with a bash script didn't yield enough speedup.
>>
File: strong typing haskell.png (33KB, 552x328px) Image search: [Google]
strong typing haskell.png
33KB, 552x328px
>>58292382
>>
File: what.png (73KB, 1420x1030px) Image search: [Google]
what.png
73KB, 1420x1030px
why is "s" greater than "t" ?
>>
How many years do you think your code will stick around for and actually be useful?
>>
>>58292671
Because rock is after climbing alphabetically.
>>
>>58292696
print("Hello World!")

Forever.
>>
>>58292706
oh I had no idea it counted strings as values.

thanks lad
>>
File: 1461760947590.jpg (120KB, 963x1024px) Image search: [Google]
1461760947590.jpg
120KB, 963x1024px
Linux source is too much of a clusterfuck to read.

When you allocate a virtual page, wouldn't that be mapped into the current process's address space? so when you do a context switch and a Linux subsystem tries to access that portion of memory it should page fault right? because it was only mapped into that other process's address space because each process has it's own version of the kernel page tables.

Except this doesn't happen in practice. So does anyone know what Linux does to solve this? how does it somehow make kernel mapping available in every process?
>>
>>58292778
>Linux source is too much of a clusterfuck to read.
That's true of every optimized real world app.
>>
File: a.jpg (57KB, 633x855px) Image search: [Google]
a.jpg
57KB, 633x855px
>>58292810
>real world
>>
>>58292866
book examples and college projects are not the real world
>>
Do I really need to read SICP to learn functional programming or is that just a meme?
>>
>>58292580
Thanks. It's UE4/C++
>>
>>58292916
Like everything on 4chan it's just a meme. You just need to learn quantum mechanics if you want to stay relevant for the next 10 years.
>>
>when your page faults are in the millions
>but it doesn't really matter, right?
>>
>>58292943
Page faults don't exist in the C standard
>>
>>58292629
Reported to Github though police.
>>
>>58292778
>When you allocate a virtual page, wouldn't that be mapped into the current process's address space?

When you allocate it nothing happens until you do something with it. Paging is "lazy" afaik. So yes, it should page fault but only when you try to access it. This is needed because linux can over commit.
>>
>>58293082
I'm not talking about userspace though, I'm talking about the kernel.
When the kernel allocates a page for itself, how does it make that mapping available in every process's address space?
>>
>>58293095
I'm having a hard time finding the right info (and I'm not about to dive into source to find it) but I'm guessing it has to do some hand-waving with the page tables for all processes involved. But I think it only updates the tables for each process if they each fault.
>>
>>58293182
I miss spoke here. I think it's only a "fault" if no mapping exists. I'm having a hard time remembering the correct wording.
>>
>>58293182
>But I think it only updates the tables for each process if they each fault.
I think it does too. It is what https://www.kernel.org/doc/gorman/html/understand/understand007.html seems to be hinting at.
>>
>>58293204
Technically you are right because no mapping exists in that address space.
>>
>>58293204
>>58293248

Okay, found it finally. It IS a fault, but not a page fault. Referred to as a "minor fault" when the OS has a page but it's not mapped in the current process.
>>
I'm tempted to switch to loonix full time and run a VM for the shit on Windows I need, I installed it first to compile some project off github and it's been edging out windows in how everything just werks.
>>
Anyone good with shaders here?

I'm thinking about making a paint program that makes heavy use of OpenGL.

I'm wondering are there good potential ways of doing a flood fill using a shader?

What about expanding the edges of something.. like if a sent a b&w texture with a black blob in it to the GPU, could i make it expand the edges by 20px or so pretty efficiently?
>>
#include <stdbool.h>
>>
Should I learn Rust or is it just the meme version of C?
>>
>>58293461
>there's no #uninclude
huge mistake

>>58293465
Yes to both
>>
>>58293342
Yes but what about those fun enjoyable video games that you need to get through the day you BITCH
>>
>>58293476
This is a hypothetical but maybe he's not a man child?
>>
>>58293465

It's not C. It's basically a ML inspired version of C++ done more sanely. That being said, it is usable but I personally will not switch to it until it hits 2.0.
>>
>>58293476
I only play Dotes these days.
>>
>>58293465
It's a feature rich language with excellent resource management controls and LLVM on back end.
To the rest of /dpt/, what are the downsides of Rust at present?
>>
>>58293484
>C++ done more sanely
it would be nice to have a language like that but I don't think it'll be Rust
>>
>>58292202

1. You do not have a case for num = 0.
2. Please use cond, rather than a bunch of if statements.
3. Please do not ever write a O(2^n) Fibonacci except as an example of how to not do recursion.
>>
>>58293509
It's ownership system just gets in the way most of the time.
The syntax is pretty fucking ugly, but is still better that C++'s.
>>
>this is how you check if one string begins with another in haskell
zipWith const >=> (==)
>>
>>58293520
The insanity inherent in C++ becomes apparent when you exercise the elements of the language which are no longer idiomatic. C++11/14/17 was a series of therapy sessions to massage away the spikes of insanity, but they still linger beneath the surface.

Consider the fact that any non-trivial project you'll undertake will last at least 5 years. Do you want your program to live in the asylum of C++, or the sex dungeon of Rust?
>>
File: 1479474022940.jpg (30KB, 872x315px) Image search: [Google]
1479474022940.jpg
30KB, 872x315px
>highly efficient code restricted to one platform
or
>horrible in terms of efficiency code, but works everywhere
Choose your poison
>>
>>58293578
That's crazy. How can ANY other language compete?
>>
>>58293578
that's very ____ intuitive
>>
>>58293592
Not my criteria. Reliability Uber Alles.
>>
powerball.lisp
(defparameter *prize*
'(((5 . t) . grand)
((5) . 1e6)
((4 . t) . 5e4)
((4) . 100)
((3 . t) . 100)
((3) . 7)
((2 . t) . 7)
((1 . t) . 4)
((0 . t) . 4)))

; ((1 23 9 11 3 44) . 15)

(defun win (yours winner)
(let ((ix (car yours)) (j (cdr yours))
(kx (car winner)) (m (cdr winner)))
(labels ((foo (acc x)
(if (member x kx)
(1+ acc) acc)))
(cdr (assoc (cons (reduce #'foo ix
:initial-value 0)
(eql j m))
*prize* :test #'equalp)))))


>impying your lang can beat this
>>
>>58293592
you're looking for java

efficient but works everywhere
>>
File: Kornheiser_Why.jpg (23KB, 288x499px) Image search: [Google]
Kornheiser_Why.jpg
23KB, 288x499px
'Normal Day at the British Exam commision':
>Reginald: Spiffing Morning to day James. Have you got the new exams for the computing courses ready.
>James: Why, yes indeed my good fellow, I already submitted it to the Dean and he approved.
>Reginald: Wonderful, What have you changed?
>James: Well, you know how all these computing students spent a lot of time in front of their computers coding and stuff, I thought it must be bad for their eyes and brain; So I'm having write code, but not on a computer, no no, dear fellow, but on paper, just like God almighty Intended, but it still has to be syntactically correct.
>Reginald: Marvellous idea, my good man, you will be eternally remembered.
>>
>>58293633
but paper doesn't typecheck your code???
how would you write haskell in it?
>>
>>58293651
>implying students do anything other than java and assembly in here
>>
Currently trying to learn web shit for a project idea I have. I've spent the last two weeks playing with Javascript, React, ClojureScript etc, and I think I'm ready to build something.

Any ideas for a relatively simple single page application that should have login/users, simple data entry stored in db?

Don't care about how it looks. Just some simple functionlity to learn the architecture of this shit. I don't want to start my main project without having used any of this.

Also, r8 my stack:

>Clojurescript/React front end
>Reagent
>Re-frame
>Re-com
>Secretary

>Clojure backend
>Compojure
>HugSQL
>PostgreSQL
>>
>>58293565
>It's ownership system just gets in the way most of the time.
I can agree with you that the ownership system is at times cumbersome, but it's a constant time write cost that objectively improves the quality of code. As we know from several studies, high quality code upfront is always cheaper than low quality code which then gets reworked over and over in production. It's a pain point, but it is a good pain.

>The syntax is pretty fucking ugly, but is still better that C++'s.
I have to 100% agree on this. It's a shame that a language so inspired by ML doesn't have the clean readability that so many ML variants have.
>>
>>58293656
scratch
>>
>>58293627
I love watching the syntax highlighter fuck up faggy lisp code. Get bent pole smoker.
>>
>>58293631
This. I wish more people would understand the magnificent efficiency of JIT. Idiotic deluded Haskellfags.
>>
I assembled and ran my first byte code program for my interpreter today. Currently it's register based but I'm considering moving it to stack based.
.types
void
u8
u16
u32
u64
string

.signatures
run = void(string)
m = void()

.u64
number_1 = 214
number_2 = 34

.native_code
runuvm_print_number : run

.code
main : m {
load r0 number_1
load r1 number_2
call r0 add_and_print
return r0
}
add_and_print : m {
add_64 r1
call r0 runuvm_print_number
return r0
}

.exports
main
>>
>>58293633
My Aussie exams had this too. It's a laugh and a half having to fill out an unlined page with handwritten Java code that may or may not compile.
>>
>>58293686
Say I have a small Java program which I have deployed in a UNIX-like environment, and as part of some process I invoke that program 100 times or so. Do I have to pay the warm-up cost every time?
>>
>>58293661
>Clojure
That's a lot better than I thought it would be when you started your post mentioning web shit.
>>
>>58293764
Who /listened to every Rich Hickey lecture but never once even tried Clojure and never will/ here?
>>
>>58293661
A personal notes app?

>login/users
You know any web framwork implements this right?

>Clojurescript/React front end
Tolerable.

>Clojure backend
Pretty good.

>PostgreSQL
Pretty good.

>Reagent
>Re-frame
>Re-com
>Secretary
>Compojure
>HugSQL
I don't know any of these memes.
>>
Started to learn C as my first language.

How is my first program?

#include <stdio.h>
#include <stdlib.h>

/* Nigger Nigger Nigger Nigger Nigger Nigger Nigger */
int main()
{

printf("Hello Nigger.\n");
printf("Nigger Nigger Nigger.");


return 0;
}
>>
>>58293764
Yep, I fucking hate the web, but it's the only game in town for what I need it for.

Seems like Clojurescript gets me away from dirty Javascript enough. And React seems genuinely good.
>>
>>58293807
3/10, need a CIA nigger.
>>
>>58293807
You missed a newline.
>>
I'm writing a C library for storing and retrieving ordered strings using order-preserving minimal perfect hash functions for muh constant-time random access AND ordered sequential access.
>>
>>58293807
0/10 for not terminating with a newline.
>>
>>58293823
Is it thread safe?
>>
>>58293807
You don't need stdlib;
Why call printf twice?
Don't jump that many lines before returning.

You indented your first program. Have a (You)
>>
>>58293802
Thanks Anon.

The memes are (in order) just libs for react bindings, state containers, pre-defined components (so I don't have to do any shitty design), routing, rest api framework and sql bindings/sugar.
>>
>>58293833
Technically yes, but mostly thanks to the fact the string dictionary is not mutable.

It's part of a back-end for a genomic sequence aligner so that's how it's meant to be (it's a sequence database for annotation, the order is important because it's based on clustering by similarity) though.
>>
Any one have experience with websites being down for them. 90% of the sites I try to access are down for me including 4 Chan. Thought you all were ignoring me.
>>
>>58293807
it's int main(int argc, char *argv[]) you google
>>
>>58293919
might be this thing

https://en.wikipedia.org/wiki/Down_syndrome
>>
>>58293919
What is "down"? 404? Connection error? Time out?

I's probably you ISP or DNS cucking you.
>>
If you're still using a dynamically typed language in 2017 then you're a failure.
>>
File: 1.png (147B, 12x12px) Image search: [Google]
1.png
147B, 12x12px
Can I sign into my pastebin account using python and requests? I want to access more archived posts, but I can't without being signed in. Is there A way I can achieve this?
>>
>>58293946
Forth is the greatest language ever though.
>>
>>58293946
Argue your case.
>>
>>58293631
But what are the reasons of /g/ memeing how Java is bad?
>>
>>58293922
Having main without any arguments is valid, too.
>>
>>58293949
use selenium with phantomjs driver
>>
>>58293949
Open your network console, log in to pastebin, find the POST used to login, work from there. Requests manages cookies for you (I think) so you just need to post credentials and, if you want, stash your session cookie too.
>>
>>58293963
The only reason anyone would use a dynamic language is that they do not know a good static language. Hence, they are a failure.
>>
>>58293977
int main(void)
is the idiomatic way.
>>
Reminder that choosing not to do functional programming is literally choosing to forgo the benefits of abstraction and instead write the same code over and over again.
>>
>>58293997
There are things you can do in a Lisp that no static language has matched so far.
>>
>>58293972
It's overly verbose, has OO mania, and a crippled type system.
>>
>>58293949
pastebin has a python api, just search for it
>>
File: for_real_lie.png (392KB, 835x560px) Image search: [Google]
for_real_lie.png
392KB, 835x560px
>>58294019
>you can have abstraction only by using FP!
>yfw
>>
>>58294007
int main() { }

is equivalent to
int main(void) { }


That's not necessarily true for prototypes/function pointers though.
>>
>>58294023
No, there aren't. Unless you mean shoot yourself in the foot.
>>
>>58294019
Reminder that abstraction has no benefits.
>>
>>58293377
nm, I found exactly what I was looking for on ShaderToy.

Shaders are pretty savage...
>>
>>58294030
As far as I understand, .NET machine is kinda the same and it's restricted to Windows on top of that?
>>
>>58294050
Found your favorite language:

https://golang.org/
>>
>>58294064
Wrong on both accounts.
>>
This thread is pathetic. It is not about programming. It's just a bunch of computers illiterates and first semesters memeing about whatever they just learned.

A quick search shows that most arguments used here are not original and have been copied from some trendy tech blog or other shit site.

The only real programming questions I have seen so far are from beginners(it's fine to be a beginner btw).

This entire site is shit and I don't know why anyone would regularly come here.
>>
>>58294048
Show me an example of shooting oneself in the foot with a dynamic language.
>>
>>58294064
.NET is even worse because it doesn't have type erasure, so all .NET langs are crippled from the start. It's not restricted to Windows these days though.
>>
>>58293943
Failing to load. I have to use my phone to access this site. Seems to have started a few hours ago looking at when I lasted posted in this thread.
>>
>>58294089
https://www.google.com/search?q=python+type+error
>>
>>58294091
>because it doesn't have type erasure
Why the fuck would you want type erasure?
>>
>>58294064
>.NET machine
Common Language Framework

They were talking about java, not the jvm, you are comparing different things.

What you probably meant was:
>Is C# shit?
Yes, it is.

>restricted to Windows
It had a unofficial port, mono.
Now it has a official port.
>>
>>58294112
Well, how does JVM compare to CLF then?
Is there any "C" for JVM?
>>
>>58294102
1. Parametricity
2. So other languages can compile to your runtime without being forced to limit their type systems (e.g. Scala has HKTs, F# doesn't)
>>
>>58294098
>Failing to load.
What error does it give?
Can you ping your router? Your modem? 4chan.org? 8.8.8.8? Are you using wifi? Tested another cable?
>>
>>58294143
>giving your IP address to the botnet
>>
>>58294134
*Common language runtime, I'm sorry.

>Well, how does JVM compare to CLF then?
None is wonderfully designed. JVM is probably superior, but if you are just going to write software for them won't make much difference.

>Is there any "C" for JVM?
What do you mean by "C"? Something that is barely above the bytecode? That let's you manage resources and stuff? Or a de facto standard?

If the first, there would be no point in using the JVM if you wanted to manage resources.

If the second, the java language itself.
>>
TIL gdb has a Python interpreter built in.
>>
>>58294134
Also, for high load JVM is far superior.
>>
>>58294152
What is the point? The only thing they can tell is "this IP has been assigned for someone".
>>
>>58294206
And C/C++ are faster than all 3.
>>
>>58294143
I can't ping 4Chan. It's the same on my laptop and phone using Wi-Fi. Desktop is plugged into my router. It's not every site.
>>
>>58294240
>all 3
We are only talking about two things.
>>
Reminder:

Idris > Haskell > Scala > OCaml > F# > C# > Java > C++ > C > Common Lisp = Scheme = Clojure = Racket > Python = Ruby = JavaScript = PHP
>>
>>58294250
You are probably using your ISP DNS, which is cucking you. Try OpenDNS.
>>
>>58294257
Thanks for the reminder, I almost forgot about this inarguable fact.
>>
>>58293983
I really want to avoid selenium because I am creating a simple command line program.
>>58293992
I did that, but when I try logging in, it doesn't work. Idk why. Pastebin is the only site I can't manage to log into.
>>58294035
You mean python has a pastebin API wrapper, and I know. But I am working with python 3 and that wrapper doesn't do what I want either way.
>>
>>58294257
Rust > C++ > C > Go > Common Lisp = Scheme = Clojure = Racket > Python = Ruby = JavaScript = PHP > Idris > Haskell > Scala > OCaml > F# > C# > Java
>>
>>58294289
>Rust
>>
>>58294289
Go is shit. Java is not shit. Leave now.
>>
>>58294306
>Idris
>Haskell
>>
>>58294288
Have you ever tried eating selenium? It makes you sweat and smell like shit.
>>
>>58294323
Java is shit.
Go is even more shit.
>>
>>58294138
>So other languages can compile to your runtime
???
>>
>>58294323
Very constructive!
>>
>>58294257
>>58294289
Thanks guy, forgot about Go and Rust.

Idris > Haskell > Scala > OCaml > F# > C# > Java > C++ > C > Common Lisp = Scheme = Clojure = Racket > Rust > Go = Python = Ruby = JavaScript = PHP
>>
>>58293949
Signing into websites with requests is usually pretty easy. What issue are you having?
>>
>>58294257
>>58294289
Thanks to you I've realized this thread is pathetic and >>58294085 was right. I'll now proceed to unlearn everything I know about programming and kill myself.
>>
>>58294364
...and?
>>
LuaJit+C > All > Java = Haskell
>>
>>58294351
>Implying there is anything constructive about language wars.
The cafeteria food has been flung. At this point it doesn't matter.
>>
>>58294359
It really just isn't signing me in, I am not getting any error or anything. But when I try to go to pastebin.com/profile, it just brings me to pastebins index page.
>>
>>58294364
>(You) was right.
Thanks bae
>>
>>58294373
>lua
>array indexing starts at fucking 1, not 0
HUEHUEHUE
>>
>>58294364
See you next thread, anon!
>>
>>58294377
Have you tried setting a User-Agent?
>>
>>58294388
5 reasons lua sucks:

1. oh whoops, naturally indexed @ 1
>>
>mfw brainlets use dynamic languages or limited static languages
>>
>>58294413
I'm a brainlet and proud. What's the best language for me?
>>
>>58294421
Python
>>
>>58294388
Arrays only start at 0 because of C and mindless sheeple like you
>>
>>58294288
PhantomJs is a headless browser, so there's no UI. It can all sit inside a CL app, no problem.

Slightly overkill, maybe. But it Just Works and is easy.
>>
>>58294436
Arrays start at zero because it makes sense.
>>
>>58294435
Keep in mind that as a brainlet my primary concern is writing safe, reliable code. Will Python keep me safe?
>>
>>58294477

no language will keep you safe if you're a brainlet

go make html pages
>>
>>58294477
Python usually pushes good coding practices.

Dynamic typing is not the same as weak typing. The last one is the great cause of bugs.
>>
>>58294468
It makes sense because you're used to it being that way. Mathematics is 1-indexed.
>>
Why aren't decision tables more widely used in programming?

>https://en.wikipedia.org/wiki/Decision_table

You can condense a lot of logic in a decision table. The equivalent if > elseif > elseif....construct is much messier
>>
>>58294405
I did, here is my code:

import requests

URL = 'http://pastebin.com/login'
headers = { 'Referer': URL, 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36' }

with requests.Session() as c:
login_data = dict(submit_hidden='submit_hidden', user_name='myuser', user_password='mypass',
submit='Login')
c.post(URL, data=login_data, headers = headers)
print(c.get('http://pastebin.com/profile').text)
>>
>>58294507
Arrays start at zero because:

ptr[n] == *(ptr + n)


When n = 0, you get:

ptr[0] == *(ptr + 0) == *ptr


This is exactly the behavior you should want, because the front element of the array is stored at *ptr.
>>
>>58294531
Fuck, I was using the stackoverflow codeblock style

here is the actual code

import requests

URL = 'http://pastebin.com/login'
headers = { 'Referer': URL, 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36' }

with requests.Session() as c:
login_data = dict(submit_hidden='submit_hidden', user_name='myuser', user_password='mypass',
submit='Login')
c.post(URL, data=login_data, headers = headers)
print(c.get('http://pastebin.com/profile').text)
>>
whats a good first project besides hello world to make in C? got my linux distro, vim, and g++ ready
>>
>>58294499
>Python usually pushes good coding practices.

>

Both dynamic typing and weak typing are sources of countless bugs.
>>
File: 1371495799275.jpg (117KB, 403x400px) Image search: [Google]
1371495799275.jpg
117KB, 403x400px
>>58294562
>in C
>g++
>>
>>58294562
>g++
>>
>>58294562
A scheme interpreter
>>
>>58294562
Make homebrew for the 3ds
>>
>>58294553
>Arrays start at zero because:
I know.

But does that seem like a good reason to keep it that way in languages that don't even have pointers let alone pointer arithmetic?
>>
>>58294569
>>58294572

ya oops meant gcc
>>
>>58294556
Use the api

>https://pypi.python.org/pypi/Pastebin/1.0.3
>>
How do I program this

http://a.carapetis.com/csf/
>>
>>58294582
Yes.
>>
>>58294589
No you didn't. How could you even make that mistake?
You're a filthy Sepplesfag trying to post as a C programmer.
>>
>>58294605
>post
pose*
Although I guess "post" still made sense here.
>>
>>58294593
This can't get the archived posts, thats literally the only thing I am trying to figure out how to do
>>
>>58294564
No, not really. Dynamic type just means a variable type can change, at most it will cause a warning or type error. Which is easy to debug. Weak typing will cause strange behavior and throw error, you will have a hard time finding the source.

Dynamic vs static is just a design choice. Both are deterministic.
>>
>>58294582
Non-sheep here, the most intelligent way to handle it is to allow user defined offsets. This will be fine as long as the users of the language understand the usage of anything other than 0-offset.
>>
>>58294556
Try passing headers to get ie c.get('http:...', headers=headers)
>>
>>58294603
>The implementation details of a language developed in the '70s should dictate how every language works.
Like I said, mindless sheeple.
>>
>>58294644
>at most it will cause a warning or type error
Oh really, that's all, huh? Yeah, have fun with it happening in your production system at 3am.

I'll stick with static typing, thanks. I like things to be checked at compile time.
>>
for letter in 'Python':     # First Example
if letter == 'h':
continue
print 'Current Letter :', letter


what the fuck happens here? how's this any different than

for letter in 'Python':     # First Example
print 'Current Letter :', letter
?

what does the "if letter == h" function even do?
>>
>>58294673
Maybe you're right, we should get rid of recursion too, people learning programming today might find it too complicated.
>>
>>58294619
Fair enough.

Try printing the c.get(...).status_code
>>
>>58294721
Please repost your comment using a programming language that respects your intelligence.
>>
>>58294722
WOW that is such a good and logical rebuttal.
>>
>>58294721
if the current letter in the word youre iterating in is 'h' then it ends this iteration, thus not printing it
>>
>>58294738
pleb detected
>>
>>58294745
Maybe we should just pretend NaN doesn't exist either, to make things easier!
>>
>>58294721
The continue statement continues with the next iteration of the loop
>>
>>58294721
>what does the "if letter == h" function even do?
Do you know what if statements are?
>>
>>58294671
That actually got it to stop going to index, but the post still isn't working.
>>
>>58294644
Python and Ruby are both infamous for having detarminism issues. Which is why idiomatic Python code makes very little use of Python's more flexible dynamic capabilities.
>>
>>58294759
Oh yes, I must be a pleb for wanting more from a programming language
>>
>>58294694
>Oh really, that's all, huh?
Yes.

>Yeah, have fun with it happening in your production system at 3am.
What are exceptions?

Also, don't worry about that, you don't have a job. Automatically calling pacman on your notebook is not a production system.
>>
>>58294733
200
>>
>>58294784
what the fuck am i reading
>>
>>58294775
>but the post still isn't working.
What makes you say that? How are you detecting whether you are logged in or not?
>>
>>58294779
yes
>>
>>58294810
I get pastebin.com/profile, It tells you if you are logged in or not.
>>
>>58294776
>Python and Ruby are both infamous for having detarminism issues
[citation needed]

> Which is why idiomatic Python code makes very little use of Python's more flexible dynamic capabilities.
You have never used python right? Most obvious example Is being able to have a value of None or something else.
>>
>>58294808
Not an argument.
>>
>>58294854
im not even him you dumbass
>>
>>58294752
>>58294774

OH fuck me. It's 2 in the night so my brain froze for a moment.
Thank you.

>>58294738
Sincerely choke on infinite loops of dicks.
>>
>>58294834
Nice deflection, CIA nigger.
>>
So I'm following NewBoston's C programming tutorials here.

I copied everything word for word but I am getting an error.

#include <stdio.h>
#include <stdlib.h>

int main()
{
char firstname[20];
char crush[20];
int numberOfBabies;

printf("What is your name?\n");
scanf("%s", firstName);

printf("Who are you going to marry? \n");
scanf("%s", crush);

printf("How many kids will you have? \n");
scanf("%d", &numberOfBabies);

printf("%s and %s are in love and will have %d babies", firstName, crush, numberOfbabies);

return 0;
}


>error: 'firstName' undeclared (first use in this function)

and so on for all three inputs.

Is his shit outdated?
>>
File: AnimePepe.jpg (108KB, 640x640px) Image search: [Google]
AnimePepe.jpg
108KB, 640x640px
>>58294867
Still not an argument.

>him
>>
>>58294888
case sensitivity lol
>>
>>58294900
>>58294784
okay ill bite

>implying that using exceptions for sanitizing inputs is even remotely acceptable
>implying that static typing means you dont have a job
dynamic typing is only used in meme languages such as python and javascript
>>
>>58294776

>Python and Ruby are both infamous for having detarminism issues
Please, explain to me in detail what part of idiomatic Ruby and/or Python is non-deterministic. Duck typing and message passing are well-defined behavior.
>>
>>58294904
>>58294888

>case Sensitivity

I just fucking noticed it and came back to post I am retarded

[spoiler]fuck bucky[/spoiler]
>>
>>58294888
SHOW ME WHERE firstName IS DEFINED

GO ON

I GOT ALL DAY
>>
>>58294939
Those are just entry-level aspects of dynamism and you know it. You're really pissing me off!
>>
>>58294932
>implying that using exceptions for sanitizing inputs is even remotely acceptable
It is. In static typing you have to sanitize inputs too.

>implying that static typing means you dont have a job
I didn't say that. I just said you don't have a job. And that updating arch linux on your notebbok is not a production system.
>>
File: donkeyKong.jpg (70KB, 1199x826px) Image search: [Google]
donkeyKong.jpg
70KB, 1199x826px
>he doesn't use php
>>
>>58294986
>>>/g/wdg
>>
>>58291882
saten has gorgeous figure
>>
>>58294932
>implying that using exceptions for sanitizing inputs is even remotely acceptable
If you think the difference between dynamic and static typing is having to sanitize inputs >>58294085 was right.
>>
>>58295013
i didnt even come close to implying that, but it inherently comes with dynamic typing
>>
>>58294986
>>58295009
>>>/vg/
>>
>>58295044
Still you lack to explain why it's bad.
>>
>>58294974
You don't have to use exceptions though. Use types.
>>
>>58294825
Looks like you need to provide a csrf_token_login parameter to get.
>>
>>58295065
because its a shitty practice and can easily be avoided by using static typing
also you didnt explain why dynamic typing is better other than saying "lmao it just is"
>>
Types are documentation that never goes out of date, why would you eschew them?
>>
>>58295102
Typing is an unnecessary abstraction.
>>
>>58295109
A type-system can be complete, or consistent; never both,
>>
>>58295093
import requests

URL = 'http://pastebin.com/login'
headers = { 'Referer': URL, 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36' }

with requests.Session() as c:
login_data = dict(crsf_token_login = 'MTQ4MzQwNjEzNk5EclJncndpRHlRSHB', submit_hidden='submit_hidden', user_name='DoubleA_W', user_password='Id002009497*',
submit='Login')
print(c.post(URL, data=login_data, headers = headers).text)
c.get('http://pastebin.com/profile', headers = headers)

Yea I know, it didn't work.
>>
>>58295109
Documentation should be unnecessary.

You should know your code inside and out and its logic should flow smoothly enough for a complete stranger to understand it immediately.
>>
>>58294965

Dunno about Python, but Ruby is just objects and messages all the way down. If an object gets sent a message it doesn't understand, it sends itself another message, :method_missing. There's some interesting shit you can do in Ruby with instance_eval, but nothing's really non-deterministic. At least as long as there's no async/multi-threaded shit concerned.
>>
>>58295102
>because its a shitty practice and can easily be avoided by using static typing
By that you imply that the only difference between static and dynamic is having to use exceptions to sanitize input. Which shows a clear lack of understanding of the subject.

>also you didnt explain why dynamic typing is bette
I didn't say it's better, I said that it's not worse.

>"lmao it just is"
I didn't say that either.

>>58295156
You clearly don't have any idea of what you are talking about.
>>
>>58295143
you done goofed with your user/pass

delete this post
>>
>>58295174
are you shitting me? im pointing out a single issue and you think it's the only issue
you logic is pretty flawed for a programmer

>>lmao it just is
ofcourse you didnt, but it's the theme of your posts
>>
>>58295143
You can't just copy-paste an old crsf token. Also, nice password.
>>
>>58295143
>Id00...
Hope that isn't your twitter's password, DoubleA_W
>>
>>58295179
God I am an idiot, thanks for letting me know.
>>
>>58295143
thanks for the pro account
>>
>>58295232
>implying you can't easily find it in the archives
>>
>>58295254
I mean you probably can but I changed the password
>>
>>58295232
Time to change your stuff that uses this password.
>>
>>58295198
Well, you said dynamic typing was inferior.
This was the only difference you could point out. There is no reason to believe you know any other. If you assume things your logic is pretty flawed for a programmer(you committed other fallacies too).

Even more because because you got lost in your argument and deviated from the original statement, that "dynamic typing is inferior".
>>
>>58295264
then why delete it? your actions don't make any sense
>>
>>58295278
>t. Python brainlet
>>
Why does Haskell use Nothing instead of something like Null (which we're all familiar with)?
>>
>>58295289
deleted it before changing it just incase.
>>
>>58295305
It doesn't.
>>
>>58295198
>but it's the theme of your posts
It's not. But the opposite is literally your original post.

If you think that things can only be better or worse, but not just different you are pretty dumb.

>>58295303
Not an argument.
>>
>>58292629
what IDE is that??
>>
>>58295311
huh? how does that make even the slightest bit of sense? anyone who could gain access to it would have already done that prior to you deleting it. and your time would be better spent on actually hurrying up and changing your pass instead of trying to delete information from the internet
>>
>yfw every function in Java should really have return type OptionT IO a, or IO a in the case of primitives
>>
>>58295325
>different
I agree that dynamic languages are "differently abled"
>>
File: 1451625411386.jpg (31KB, 638x540px) Image search: [Google]
1451625411386.jpg
31KB, 638x540px
>>58295326
You don't want to know.
>>
>>58295326
Emacs
>>
How does Windows do threading and such?
>>
I'm trying to work on a music app that has a selection of different playlists for different moods/events (kinda like stereodose before they took it down). I learned some C in college way back but don't have too much experience programming. I'm using Xcode and struggling to implement the soundcloud API into it. It seems like a real bitch. Should I just host a server with the songs I want to use and stream from there instead? The app is really only for me and my friends.
>>
>>58295381
libneedle
>>
>>58295360
Not an argument, just a meme. You made a meme claim, which I should have ignored in the first place. Failed to provide arguments and showed a clear lack of understatement of the subject.

Stop embarrassing yourself.
>>
>>58294507
Mathematics is arbitrarily indexed and can be chosen at the authors discretion, while it is usually the convention to begin at 1. However this is such and insignificant issue, its extremely easy to use 0-based OR 1-based indexing, they both have strengths and weaknesses but at the end of the day it will be an extremely minor point in the implementation of your algorithms.
>>
>>58295311
anyway, try selenium. it just werks
npm -g install phantomjs-prebuilt


from selenium import webdriver

driver = webdriver.PhantomJS()
driver.set_window_size(1024, 768)
driver.get('http://pastebin.com/login')
driver.find_element_by_name('user_name').send_keys('username')
driver.find_element_by_name('user_password').send_keys('password')
driver.find_element_by_name('submit').click()
driver.save_screenshot('screen.png')
>>
>>58295395
>Xcode
Get a real computer, kid
>>
>>58295396
hehe very nice very nice
*scowls and walks away*
>>
>>58295414
I have a macbook pro and a PC I built. Not a poorfag and I like the workflow of adobe products on mac. I do a lot of freelance video / design work.
>>
>>58295143
you might wanna change the port for FTP, fellow newyorker
>>
>>58295345
>unbounded potential mutation of state
Wow, what a worthless language
>>
>>58295452
What are you talking about?
>>
>>58295440
>macbook pro
Do you spit or swallow?
>>
>>58295482
dont use the default one
>>
>>58295490
What are you talking about FTP for? My questions had nothing to do with FTP.
>>
>>58295500
>he doesn't know
mighty kek
>>
>>58295452
Hey, can you please deal with your state? It's been really pissing me off lately.
>>
>>58295509
I don't, do you mind explaining?
>>
>>58295486
I get more ass than u boi. I'm sure girls panties drop when they see your ugly ass lenovo running a shit distro.
>>
>>58295531
I'm sure you do get a lot of ass anon, just not much pussy.
>>
On the Lua topic. IF the only flaw you can point in a language is the index start, then >>58294085 was right.
>>
>making text based adventure
>want to let people choose from the left or right door
>nothing i code works
>>
>>58295509
I don't get it.
>>
>>58295570
Post source
>>
>>58295570
Try using monads
>>
>>58295570

if door = left
go left
if door = right
go right

fucking idiot baka
>>
File: file.png (156KB, 500x281px) Image search: [Google]
file.png
156KB, 500x281px
>>58295486
>>58295486
>>58295531
>>58295531
>>
>>58293807
>int main
>not void main

Why do people do this?
>>
>>58295632
How you gonna signal failure, anon?
>>
>>58295632
Because exit status is a thing, you triple nigger.
>>
>>58295570

State machine!
>>
1. How useful is emacs in a general sense? I'm not a hardcore programmer but I use Linux and am learning Scheme so I use it for that, at least for now.

2. This is probably a dumb question, but how similar are Lisp/Scheme/Haskell? Is it reasonable to be able to switch from one to the other easily?
>>
Are there any systems where the return code of a program isn't int sized?
>>
>>58295646
main will never fail for a small program.

>>58295648
>I need to know my exit status after computing a few factorials!
>>
>>58295664
>How useful is emacs in a general sense? I'm not a hardcore programmer but I use Linux and am learning Scheme so I use it for that, at least for now.
Emacs can be turned into a full-fledged IDE if you want, but it requires you to configure it and perhaps install appropriate plugins.

>2. This is probably a dumb question, but how similar are Lisp/Scheme/Haskell? Is it reasonable to be able to switch from one to the other easily?
Scheme is a dialect of Lisp, there is no "just" Lisp around.

Haskell is only similar in that that it also is a purely functional programming language. But it uses an entirely different syntax, has some concepts and features Lisp/Scheme does not etc.

>>58295665
It isn't int-sized on most POSIX-compliant systems. It gets truncated to an unsigned char, containing values from 0 to 255. Returning a value other than this is implementation defined and may result in arithmetic overflow.
>>
>>58295677
You may not need to know, but the OS for sure needs to know in order to log an event appropriately.
>>
>>58295712
>Lisp/Scheme
>pure
>>
>>58295712
>It isn't int-sized on most POSIX-compliant systems. It gets truncated to an unsigned char, containing values from 0 to 255. Returning a value other than this is implementation defined and may result in arithmetic overflow.
wtfffff so why we int main then
why not char main?
>>
File: FP.png (190KB, 2440x1228px) Image search: [Google]
FP.png
190KB, 2440x1228px
>>58295729
Go suck on a gigabyte per second
>>
>>58295728
That's why exit takes a status code.
>>
>>58295712
Scheme is not purely functional. One os the main selling points for lisp is the macro system, you can implement anything haskell has.

>>58295729
Lisp can be pure.
>>
>>58295746
Because the C standard doesn't give two fucks about POSIX.

Also, you're not guaranteed that CHAR_BITS is at least 8, which you need in order to represent values from 0 to 255.
>>
>>58295771
That's fucked. I'm never writing C again.
>>
>>58295767
>One os the main selling points for lisp is Turing completeness, you can implement anything haskell has.
>>
>>58295765
Yes, but exit() does not work well with sepples' RAII, for example.

For C, you can use either exit() or simply return from main, it makes little difference if any at all.
>>
>>58295767
C can be pure but nobody says it's a pure language.
>>
>>58295767
So Haskel is pure
Lisp is pure

But because Scheme can be like Haskell, it isn't pure?

wtf I hate functional programming now
>>
>>58295563
Regular Lua user here. Here are some flaws if you want "serious discussion".

>No true sequences
They have been memeing this shit to high heaven on the mailing list. It is a real problem. The solution people want to say, but no one wants to say is to split tables into two data structures (the underlying data structures).

>integers
Honestly, it was a terrible idea. What's even worse is that they make using them transparent without making the side effects of using them transparent. Library code now has all kinds of hidden errors lurking. And of course the solution is to use the same kind of shit as they did in python 2. I've seen enough
a = a // 1
for a lifetime.

>proxy tables
I once tried to implement a 'freezable' class. Basically a class that when derived gives the children the ability to be become explicit changed between read-only and mutatable. The only way to accomplish this is to use a proxy table to guard each access. Of course, to accomplish this, while making the ability transparent to regular use you have to override __index, __newindex, __len, and still that doesn't disallow fuck-ups. Also the underlying data (the real data not the proxy table) must be cached IN THE PROXY TABLE, or you can create closures EVERY TIME YOU SWITCH BETWEEN READ-ONLY AND MUTABLE. Not to mention the need to create, maintain, and destroy TWO tables for each object. And you can't make it abstract, this structure will surely fuck with whatever the child class is doing. Usually leading to recursive __index calls.
This could all be avoided with __get and __set. But NOOOOO.
>>
>>58295751
On the binary sizes aspect, I have a Haskell service running at work which essentially just provides a nicer interface to a legacy system. The binary is 23 MiB. Pretty krazy~
>>
>>58295771
>you're not guaranteed that CHAR_BITS is at least 8
Yes you are, idiot.
>>
>>58295786
C++ sucks, though.

Rust does it better; main doesn't return anything, but when you panic (throw an exception, the difference is you typically don't catch panics in Rust) RAII still works and the program exits with an error code. If a panic occurs in the process of panicking, that's when the program aborts.
>>
>>58295746
>so why we int main
>why not char main
Legacy reasons. Mainly to do with the whole implicit int thing.
>>
>>58295781
You clearly don't know lisp. One of the main selling points is being extensible. You can implement anything without going out of your way.

>>58295787
First of all lisp is not a language, it's a family.
Second, C can't be pure because it's not enforced at design level.

With think of lisp dialects as a programming language for creating programming languages. You can use a existing lisp dialect to create a other pure lisp dialect. The new dialect is still pure, still lisp and still compatible with the original dialect.


>>58295808
Thank you. I would like to discuss but I'm not lectured enough in lua to argue about it.
>>
>>58295830
Well, an uncaught exception in sepples will also abort unless you have defined an uncaught exception handler (in case it will abort if the uncaught exception handler throws an exception).

But it's still nice to return a user-defined numerical error code which the OS can understand, it's pretty handy if you're writing scripts that execute your program.
>>
>>58295854
New thread.
>>
>tidying up a coworker's code
>see a load of expressions of type void
>delete them
>he gets mad because his code is now broken
>I tell him to make his code referentially transparent in future
>>
>>58295712
>Emacs can be turned into a full-fledged IDE if you want, but it requires you to configure it and perhaps install appropriate plugins.

What's the learning curve? Should I follow some tutorials or just mess around to master it?

>>58295712
>Haskell is only similar in that that it also is a purely functional programming language. But it uses an entirely different syntax, has some concepts and features Lisp/Scheme does not etc.
What are some notable differences I should be aware of? I'm learning Scheme just to learn a functional programming language that's simple enough to get started with. I'm a mathematician for background. Would Haskell be a better longterm investment?
>>
>>58295856
>You claimed Lisp is Turing complete, therefore you clearly don't know Lisp

wtf?
>>
>>58295864
What's wrong with type void?
>>
Hey guess which Programming Language I'm parodying
>Ah, you want to know the value of x? Let me dereference this pointer. Oh, actually I need to dereference this pointer too. [19 degrees of pointer dereferencing later]. Ah yes it's 1.
>>
>>58295867
>What's the learning curve? Should I follow some tutorials or just mess around to master it?
Find a friend who knows Emacs and then find some tutorials. The learning curve is pretty steep.

>>58295867
>I'm learning Scheme just to learn a functional programming language that's simple enough to get started with.
That's what Scheme is intended for.

>Would Haskell be a better longterm investment?
Learn Scheme first, then Haskell.
>>
>>58295856
Given that a massive part of Haskell is its type system, you can't do that in Lisp short of actually implementing a statically typed language.

Saying Lisp is good because it can do everything is not special. Most languages can do everything.
>>
>>58295897
Any interpreted language?
>>
>>58295897
You're parodying Haskell, because of the value update chaining (which is why it uses an massive amount of memory).
>>
>>58295883
That's not what i said. What I meant in the first post is that lisp is made to be extensible. You can make it anything without modifying the language or creating a new one. In java for example you can't do pure functional programming, you have to create another language.
>>
>>58295907
He's just a dynamic typing brainlet.
>>
File: 1483101805820.jpg (1MB, 4602x3852px) Image search: [Google]
1483101805820.jpg
1MB, 4602x3852px
I'm at a fucking loss here. Hear me out.

Ever since I was younger, I wanted to learn how to program. I've tried countless times looking up tutorials, but nothing ever stuck with me.

I want to learn C or C++. What the fuck should I do first? Watch tutorials and type along? When should I start writing my own programs?

Everytime I watch a video tutorial, the information just goes away once I go to the next one. This shit is impossible.

>tfw i will never be to intelligent too program
>>
>>58295923
Java can do pure FP just as well as Lisp can. That is to say, the programmer limits himself with discipline and not a type system or whatever. That means you don't get e.g. the optimization benefits of purity.
>>
>>58295935
>video
garbage
>>
>>58295907
>you can't do that in Lisp short of actually implementing a statically typed language
You can. That's the Point. That is what lisp is good for, you can easily write a whole new language for each application. It will still be lisp, it will still be compatible with the other lisps of the same kind.

>Most languages can do everything.
The point is it can easily do everything. There are things you can't do in most languages without creating a new language, that is not compatible with the original. I can't write statically typed python without creating a new python on top of that.
>>
>>58295960
I suppose you have a point, but it's on quite a big technicality.
>>
>>58294199
TIL KYS is what you should do
>>
>>58295980
No, he doesn't.
>>
>>58295946

so what do you recommend then
>>
>>58295944
>Java can do pure FP just as well as Lisp can.
It cannot. You will have to create a whole new language on top of java.

>That is to say, the programmer limits himself with discipline and not a type system or whatever.
I don't understand how this is related.

>That means you don't get e.g. the optimization benefits of purity.
You can still have the optimizations of purity in lisp. The idea is to let you do anything. If you have a concurrent application, and you decide that the best for the task is a purely functional stateless language. Lisp is that. It will enforce things as much as haskell, it will optimize things as much as haskell.
>>
>>58295935
https://www.amazon.com/C-Programming-Modern-Approach-2nd/dp/0393979504
Thank me when you git gud.
>>
>>58295143
fucking kek

python brainlet

now go home and get your fuckin shinebox
Thread posts: 355
Thread images: 24


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