[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: 322
Thread images: 51

File: 1480590811928.png (389KB, 934x1000px) Image search: [Google]
1480590811928.png
389KB, 934x1000px
What are you working on, /g/?

Old thread: >>58764819
>>
>>58770625

thank you for using an anime image
>>
How do you find a company name for your software development business?
>>
do a lot of nested threads cause trouble in JAVA?

I get really weird behavior...its so confusing
>>
Will listing Go projects on the CV increase or decrease your value on the job market?
>>
>>58770625
thank you for using a SICP anime image
>>
>>58770635
In the dictionary.
>>
>>58770635
pull a random noun from the dictionary and slap a "solutions" to the end of it.
>>
File: dptaocp.jpg (98KB, 934x1000px) Image search: [Google]
dptaocp.jpg
98KB, 934x1000px
>>58770625
SICP is entry-level
>>
>>58770635
>>58770669
"Anime solutions" is a pretty good name, in my opinion.
>>
I just finished a shitty text only chan clone:

193.70.41.220:8082

source: https://github.com/aadddddd/shit
>>
File: e9dd92f9e2a4203e2bed649619edcbf7.jpg (101KB, 856x1200px) Image search: [Google]
e9dd92f9e2a4203e2bed649619edcbf7.jpg
101KB, 856x1200px
>>58770632
>>58770655
You're welcome anon

>>58770635
Just make shit up
"Aventi Software" sounds good and I just made that up.
Look up latin words.
>>
>>58770600
Kek binary and hexadecimal is always good to know.
It's still being used a lot and it's so easy to learn.
>>
File: 845c26795e1755fa63fd07f54f990d0e.jpg (178KB, 850x1202px) Image search: [Google]
845c26795e1755fa63fd07f54f990d0e.jpg
178KB, 850x1202px
I've heard people talk about thinking in a programming language.

Is this hyperbolic, meaning simply having a mastery of a language so it's rules are intuitive to you or does the Sapir–Whorf hypothesis possibly apply to programming languages as well?
>>
>>58770852
>does the Sapir–Whorf hypothesis possibly apply to programming languages as well
Yes, of course it does, it's probably the easiest place to see it in action. Someone used to using an OO language will want to use objects for everything, someone used to using a Lisp will want to use macros everywhere, etc.
>>
>>58770852
The brain optimizes out the translation layer at some point.
>>
>>58770876
This, and someone using FP will create software that works.
>>
>>58770852
Well, only mastering a limited number of languages probably affects how you approach problems; Since you spend a lot of your time thinking in terms of the semantics of a language, you will come up with solutions to problems under those semantics as well.
For instance, if a problem requires traverse some sort of structure and you write a lot of C, you'll probably be drawn to for loops, while someone who writes a lot of FP will probably reailze the appropriate fold that would accomplish the task.
It's important when learning multiple languages to realize the equivalencies between the constructs presented in both, and to make sure that you are considering the constructs of both rather than just trying to rephrase constructs from language X into language Y.
FOr instance a new lisper may be tempted to use flags and conditions when it may be a better solution to use higher order functions. But a lisper going to C may try to use recursion and function pointers where it is inappropriate because of C's poor support for the constructs from lisp that is attempting to be emulated.
>>
>>58770852
>>58770876
I should specify that it's more like that person is ONLY used to using certain types of language. The more different languages you know, the less you will be affected.
>>
File: languages3.png (17KB, 522x384px) Image search: [Google]
languages3.png
17KB, 522x384px
Reminder
>>
>>58770740
Python is utter garbage
>>
>>58770966
What would you replace it with
>>
>>58770980
See >>58770941
>>
File: 1483073157801.jpg (110KB, 1280x720px) Image search: [Google]
1483073157801.jpg
110KB, 1280x720px
>>58770980
Haskell
>>
>>58770980
Although well done on making something anon even if the language isn't to my taste.
>>
>>58770991
>meme language
No thanks.
>>
>>58770931
>>58770852
In my university we learn Java in a strange way but it presents us with the equivalence between FP and OOP.
For instance the following haskell code:
data NamedColor = Red | Blue | Green
data RGBColor = RGB Float Float Float

toRGB :: NamedColor -> RGBColor
toRGB Red = RGB 255 0 0
toRGB Green = RGB 0 255 0
toRGB Blue = RGB 0 255 0


Is the same as the following Java code:
class RGB {
float r, g, b;
RGB(float r, float g, float b) {
this.r = r;
this.g = g;
this.b = b;
}
}

interface INamedColor {
RGB toRGB();
}

class Red implements INamedColor {
public RGB toRGB() {
return new RGB(255, 0, 0);
}
}

class Green implements INamedColor {
public RGB toRGB() {
return new RGB(0, 255, 0);
}
}

class Blue implements INamedColor {
public RGB toRGB() {
return new RG(0, 0, 255);
}
}


This is of course known the value problem, and while the Java code is obviously more verbose, it does have it's advantages (if you were to add more colors).
>>
>>58770941
This just isn't correct.

How anyone can claim that Go development isn't fast just shows that you don't know what you're talking about.
>>
File: tumblr_lt2yaa8PBL1qgcopeo1_400.gif (466KB, 281x246px) Image search: [Google]
tumblr_lt2yaa8PBL1qgcopeo1_400.gif
466KB, 281x246px
>>58771010
>>
>>58771007
>it does have it's advantages (if you were to add more colors)
class NamedColor a where
toRGB :: a -> RGBColor

newtype Red = Red
instance NamedColor Red where
toRGB Red = RGB 255 0 0
>>
File: ?.png (7KB, 120x120px) Image search: [Google]
?.png
7KB, 120x120px
how the fuck do you save instagram photos?

right click doesn't work

i can only save one, by inspecting element... bla bla
>>
>>58771007
>equivalence between FP and OOP
Cool, now implement
traverse_ :: (Foldable t, Applicative f) => (a -> f b) -> t a -> f ()
in Java.

By the way, the value problem has been solved in FP. Start here: http://www.cs.ru.nl/~W.Swierstra/Publications/DataTypesALaCarte.pdf
>>
File: cute anime pic 0167.jpg (38KB, 640x480px) Image search: [Google]
cute anime pic 0167.jpg
38KB, 640x480px
>>58771046
>>
>>58771046
Not programming.
>>
>>58771030
>>58771055
Yes, OOP is truly obsolete

class ToRGB a where
toRGB :: a -> RGBColor

-- ad hoc polymorphism through GADTs
data NC where
NC :: ToRGB a => a -> NamedColor

instance ToRGB NC where
toRGB (NC c) = toRGB c

newtype Red = Red
instance ToRGB Red where
toRGB _ = RGB 255 0 0
...
>>
>>58771074
>>58771079
i'm writing a instagram parser to download photos from a random account

i just tried that and doesn't work. i wonder how do other people save them
>>
>>58771085
>OOP is truly obsolete
this assumes it wasn't "obsolete" at some point in time. which is blatantly false
>>
>>58771010
A language as crippled as Go can never be fast to develop in.
>>
>>58771107
It has a shit type system so you don't get distracted with the neat features of Haskell
>>
What language should I learn next?

>Scheme
>Clojure
>Rust
>Idris
>>
Scheme is a meme language. This is my conclusion after taking the EdX Systematic Program Design course from UBC.

The reason is, we spend all kinds of time commenting and templating about what types of data the program should use, but it's all comments that don't do anything.

Trying the same thing in a language with a proper type system would make all the comments redundant and make the programs safer.

I'm going to finish the course, but I'm learning Haskell or OCaml straight after.
>>
>>58771121
You instead spend more time writing the same code over and over and over again.
>>
File: 1460042706546.jpg (58KB, 720x405px) Image search: [Google]
1460042706546.jpg
58KB, 720x405px
>>58770625

Any resources out there for great examples of scripts? Doesn't matter the application, language, or industry.
>>
>>58771129
Racket or Rust
>>
>>58771132
Congrats, you've escaped the Lisp delusion.
>>
File: 1486083545730.jpg (57KB, 720x405px) Image search: [Google]
1486083545730.jpg
57KB, 720x405px
>>58771155
>>
>>58771132
I'd say one advantage Scheme has over say Scala is that it really does have a much tighter and faster development feedback loop. The Scala compiler is painfully slow.
>>
>>58771132
>x is a meme language
stopped reading right there.
>>
>>58771205
>>x is a meme language
>stopped reading right there.
stopped reading right there.
>>
>>58771132
It's meant to be a teaching language. You don't have to specify design recipe bullshit in real programs. They teach this way so that it makes more sense when you are introduced to statically typed languages. And so that you understand that the purpose of types are documentation and verification (not just appeasing the compiler gods, like the poor kids in the intro Java course struggling with the garbage type system).
Python babbies don't even understand the merits to good type systems; they prefer to have special language syntax that are essentially comments ("annotations" gege).

I've been writing a lot of Racket lately and I always include a one line comment and a type signature comment above my functions just so I remember the argument order / return type without having to delve back into the implementation. However I spend the majority of my time writing code or coming up with algorithsm.

>>58771151
More lines of code = more productivity :)
>>
>>58771129
>Scheme

Ultimate meme language (see above).

>Clojure

Good option if you're already on the JVM. Otherwise, why bother?

>Rust

It's never going to replace C.

>Idris

Good candidate.
>>
>>58771239
>meme language
That's where I stopped reading.
>>
>>58771239
>It's never going to replace C.
Just because most people are retarded doesn't mean it's not worth using it yourself where you would otherwise use C or C++.
>>
>>58771239
>It's never going to replace C.
Good job it's not trying to, then. It's trying to replace C++.
>>
>>58771249
Are you a bot?
Also considering filtering "meme language"
But why stop there? Why not just leave /g/ entirely?
>>
>>58770635
Pee Pee Software Developement Solutions
>>
>>58771260
He's probably butthurt because somebody called his favorite language a meme language.
>>
>>58771260
>meme language
nice try, but I didn't read any further.
>>58771265
>meme language
stopped reading right there.
and no, in no way did I even imply that I like Scheme.
>>
How do you minimize the need for nested IF statements?
>>
>>58771270
You know it would take you less time to read these posts than to reply to them

That being said, "X is a me** language" is complete cancer
>>
>>58771297
that's not the point. eating my own shit will also take me less time than cooking some quality food but why would i ever want to do that?
>>
>>58771270
Tears falling down his cheek,
Knees trembling, bowels weak,
He shouts and stamps his feet,
As shit sprays on his seat!
>>
>>58771210
>It's meant to be a teaching language. You don't have to specify design recipe bullshit in real programs. They teach this way so that it makes more sense when you are introduced to statically typed languages.

Why not just start with a statically typed language?

>And so that you understand that the purpose of types are documentation and verification (not just appeasing the compiler gods, like the poor kids in the intro Java course struggling with the garbage type system).

I agree with "documentation and verification". However, a type signature comment does not provide any verification.

>Python babbies don't even understand the merits to good type systems; they prefer to have special language syntax that are essentially comments ("annotations" gege).

There are a lot of reasons for a Racket hacker to legitimately snob out against Python, but I don't think types is one of them.

>I've been writing a lot of Racket lately and I always include a one line comment and a type signature comment above my functions just so I remember the argument order / return type without having to delve back into the implementation. However I spend the majority of my time writing code or coming up with algorithsm.

Cool that you're doing productive work in Racket. I can definitely see, after using it for a few weeks, what a good dev environment it is.
>>
>>58771296
Learn boolean algebra better?
>>
>>58771322
>Why not just start with a statically typed language?
>I agree with "documentation and verification". However, a type signature comment does not provide any verification.
You are a beginner and we would prefer you not have to fight with the verification tools just yet.

>There are a lot of reasons for a Racket hacker to legitimately snob out against Python, but I don't think types is one of them.
Fair enough.

>Cool that you're doing productive work in Racket. I can definitely see, after using it for a few weeks, what a good dev environment it is.
I really enjoy it. But I'm mainly doing PL stuff, which is kind of what Racket is pushing to be good at anyways.
I also used it to generate plots for a physics lab report, which was very neat and easy to use.
>>
>>58771361
>You are a beginner and we would prefer you not have to fight with the verification tools just yet.
So instead you have to fight more with the debugging tools struggling to figure out an error a compiler could have told you about much more quickly?
>>
>>58771129
see
>>58771158

Though, I would personally say Racket before Rust.
>>
>>58771389
You write tests for every single one of your functions, which are short anyways. HtDP curriculum is supposed to put absolute minimal mental load on the first semester programmer in terms of concepts, which are introduced incrementally.
>>
>>58771210
>I've been writing a lot of Racket lately and I always include a one line comment and a type signature comment above my functions just so I remember the argument order / return type without having to delve back into the implementation. However I spend the majority of my time writing code or coming up with algorithsm.
Use contracts
>>
>>58771616
>use memes
>>
>>58771612
Types make testing easier.
>>
Is it true that LLVM optimisation quality drops significantly when it's used to produce concurrency-type codules?
>>
>>58771643
(check-expect (my-func ..) expected-result)
Is extremely easy to understand for someone who has never touched a programming language before, and is sufficient for basic testing. Semester 1 does not intend to make you a professional software developer.
>>
>>58771690
I can see we have different outlooks on this... my first term at uni was all about types, we used ML.
>>
dynamic typing must be destroyed
>>
>>58770650
Depends on whether or not it's a low level language. If it is then no, otherwise then it would.
>>
>>58770650
If I were interviewing you I'd ask what you thought of Go.
>>
float x = 2.55;
printf("x to the 4th power = %g\n", powf(x,2));


Why doesn't this work in C? Can pow not take variables as arguments?
>>
File: 1451294164587.png (717KB, 832x835px) Image search: [Google]
1451294164587.png
717KB, 832x835px
So, what's the best web back-end language for someone who has a strong programming / software development background?

I don't want to waste time with bad but "easy" languages, I want the most reliable and best designed back-end language there is. Google isn't really helping with this, since all I get from searching are results such as "most in-demand languages" or "highest paying languages", which are hardly good metrics for what I want to know.

Anyone can give me suggestions? Is PHP worth it or is it considered garbage in this day and age?
>>
>>58771895
>wants x^4
>computes x^2
>>
>>58771895
Well what's the error you're getting
>>
>>58771899
Scala with Lift or Play

https://liftweb.net/
https://www.playframework.com/
>>
>>58771899
COBOL
>>
>>58771895
Maybe you should be more specific about the error you're having.
That should work.
>>
>>58771913
Scala is a meme

Play! is a meme within a meme
>>
>>58771909
>>58771924
Just says undefined reference to `powf '
>>
>>58771949
Add -lm to your command line arguments.
You didn't link the math library. It's a common beginner mistake.
>>
>>58771949
Link with -lm
>>
>>58771980
>to your command line arguments
To your compiler command line arguments, I mean.
So
gcc prog.c -o prog -lm
or whatever
>>
>>58771980
>>58771983
thanks dudes

whats weird is it works without linking as long as I don't include a variable in the arguments. e.g. this compiles with no error:
printf("2 to the 4th power = %g\n", powf(2,4));
>>
>>58772031
The optimiser would have removed the call to powf and just replaced it with a constant value.
>>
>>58771913
Seems interesting, I'll look into it.

>>58771921
I wouldn't touch that with a 10-foot pole.

>>58771933
Calling things a meme is a meme.
>>
>>58772068
Yes, we all know ""X is a meme" is a meme" is a meme.
>>
>>58772104
>meme is a meme in meme meme
okay
>>
>>58772068
>Seems interesting, I'll look into it.
In-depth Scala course:
https://www.coursera.org/course/progfun
>>
File: 1485184120563.jpg (31KB, 438x428px) Image search: [Google]
1485184120563.jpg
31KB, 438x428px
>when you realize you're nothing but a bundle of memes trapped in skin, flesh and bones
>>
Iven thinking to start learning to code shit

i was told to learn html and css and python/java

Now is that a legit good recommendation?

and where do i go to learn i was looking the lynda courses
>>
>>58772104
>>58772117
Is this the new Millhouse? Have we come full circle?
>>
>>58771899
>gimp pepper sticker

cute
>>
why can't i find the source code for gas?
I wanna see how it lexs/parses arm assembly.
>>
>>58772337
http://ftp.gnu.org/gnu/binutils/
>>
in js how can i convert something like this

["{"value":"off","label_name":"hidden"}","{"value":"off","label_name":"2"}","{"value":"on","label_name":"a"}","{"value":"on","label_name":"123"}","{"value":"off","label_name":"1ads"}"]


to

[["{"value":"off","label_name":"hidden"}"],["{"value":"off","label_name":"2"}"],["{"value":"on","label_name":"a"}"],["{"value":"on","label_name":"123"}"],["{"value":"off","label_name":"1ads"}]"]
>>
So I'm reading SICP and installed MIT/GNU scheme on my debian machine and I can't fucking figure out how to run anything.

I installed racket but I can't figure that out either.

Help!

like, I'm trying to do write a cube function and this is what happens:
    1 ]=> (define (cub a) (* a a a))

;Value: cub

1 ]=> cub 5

;Value 13: #[compound-procedure 13 cub]

1 ]=>
;Value: 5

1 ]=>
>>
>>58772451
You have to apply the zygohistomorphic prepromorphism.
>>
Anyone wants to rewrite this fuzzy search in C https://github.com/junegunn/fzf

Is currently written in Go.
>>
I'm really loving C++, I've been reading about Rust but their anti-OOP stance is really odd.
Why?
>>
>>58772610
Because OOP is bad.
>>
>>58772451
(define (cub a) (* a a a))
(cub 5)
;=> 15
>>
>>58772610
Because it's not needed. The only thing OOP can bring to the table in Rust is inheritance and I don't think I need to talk about why that's better off not being available.
>>
>Your code contains lines > 79 characters.
>Please clear out your desk.
>Security will escort you out.
>>
>>58772484
>zygohistomorphic prepromorphism.
ha ha, okay.

>>58772637
>le expression
almost forgot about this, thanks.
>>
>>58772659
You might want to stick with DrRacket, if you can. It'll tell you what's wrong with your code as you write it instead of waiting until you try to run something from the REPL.
>>
>>58772610
Rust isn't an OOP language is why. It's procedural with some functional constructs.

Traits are favoured in place of inheritance for type polymorphism.
>>
File: fired-650x360.jpg (27KB, 650x360px) Image search: [Google]
fired-650x360.jpg
27KB, 650x360px
>Fizz-Buzz using division or modulo?
>Fired.
>>
File: Selection_20170203_04:10:14.png (412KB, 1267x718px) Image search: [Google]
Selection_20170203_04:10:14.png
412KB, 1267x718px
This is why TempleOS is divine intellect.
>>
This is the first program I wrote without copying anything based on what I learned in ten exercises. Is it good?

i = "lots\t"
x = 10 * i
lots = 100
b = 10 * lots

who = "Hero"
question = "\"Is this a lot of goos?\", %s asked." % who
answer = True
reply = "\b, it's %s\b.\"," % i + " Hero said."

count = ("""
"This\fis\n%s\fgoos."
I am certain this is how many:
\t\t\t\t\t"%s!"
""") % (x, b)

print(question)
print(count)
print(answer, reply)
>>
>>58772682
Which language should I choose? racket or R5RS?
>>
>>58772822
you may want to download the sicp package for racket
>>
>>58772821
merge the print statements
>>
>>58771095
You'll need to use something as Selenium to load the entire profile and then retrieve all the links of the photos (hint: they have a fixed html attribute value)
>>
>>58772822
>>58772830
There is an sicp package you can download and install from inside DrRacket. It's pretty handy.
>>
>>58772906
>>58772830
raco setup
racket -l sicp --repl

right?
>>
>>58772923
sounds about right

again, you should really just use drracket if you're starting
>>
>>58772923
Or even
raco pkg install sicp
racket -l sicp --repl
>>
>>58772939
Why not MIT/GNU Scheme?
>>
>>58773030
well racket comes with an IDE-like thing already
>>
>>58773040
I have vim
>>
This thread will be drowning in blood before nightfall.
>>
>>58773062
EST nightfall or PST nightfall?
>>
I know a decent amount of OOP, a little bit of web dev, and a little bit of Android dev. I want to make a mobile app in which users can submit stories and other users can comment on them. What do I need to study up on?
>>
>>58770941
Fast development + Good Performance :: Common Lisp
>>
>>58772801

TAD is my hero.
>>
>>58773198
I'll grant that SBCL is impressively fast, but it's still non-trivially slower than C and C++.
>>
>>58773171
AEST
>>
>>58773217
Ozzie, what IDE do you recommend for C# development (or any .NET work, really)?
>>
>>58773233
Kangaroos out
>>
>>58773235

I use Visual Studio, but Monodevelop is okay.
>>
>>58772999
>>58772939
Okay, installed drracket. Now what do I write for #lang?

#lang sicp
?
>>
>>58773268
yes
>>
>>58771132
>but it's all comments that don't do anything.
Look at Racket's contracts. Many scheme implementations support something similar.

>Trying the same thing in a language with a proper type system would make all the comments redundant and make the programs safer.
But this has drawbacks: runtime type information is powerful, and allows one to reuse components in rich ways. Often times, we are working with incomplete and evolving data. Static typing doesn't model this reality particularly well, except for contrived examples in relatively well-defined problem domains. Rather than focus all of your time defining types, Lisp puts an emphasis on defining operations to work over generic data.

Common Lisp has a very impressive type system, and Clojure's new spec system is really game-changing.

Of course Scheme doesn't have standard support for these things -- it was designed by programming language theorists to be flexible enough to try out new ideas quickly.

Saying
>Scheme is a meme language
demonstrates nothing except your ignorance of the language, its history, and its purpose. You don't build industrial applications with it, but that does not imply that it does not have a place in other domains.
>>
>>58773268
yes
>>
which one is preferable?
  2           0 LOAD_CONST               1 (23)
3 STORE_FAST 0 (a)

3 6 LOAD_CONST 2 (44.0)
9 STORE_FAST 1 (b)

4 12 LOAD_CONST 3 (211)
15 STORE_FAST 2 (c)

5 18 LOAD_CONST 4 (24.2)
21 STORE_FAST 3 (d)
24 LOAD_CONST 0 (None)
27 RETURN_VALUE

or
  8           0 LOAD_CONST               5 ((23, 44.0, 211, 24.2))
3 UNPACK_SEQUENCE 4
6 STORE_FAST 0 (a)
9 STORE_FAST 1 (b)
12 STORE_FAST 2 (c)
15 STORE_FAST 3 (d)
18 LOAD_CONST 0 (None)
21 RETURN_VALUE
>>
how i hack a wpa2?
>>
>>58773276
>Static typing doesn't model this reality particularly well
I'd say many of Haskell's libraries are great examples of static typing done right. Things like functors and monads crop up everywhere. They're fantastically generic and reusable.
>>
>>58773305
Call the house pretending to be tech support
>>
>>58773292
>>58773275
Thanks!
>>
Do I have to learn Javascript to be employable in the current year?
>>
>>58773305
You mean "crack"
>>
>TAD spends whole live stream talking about how he's too good for Physicsgirl
>stalks her Insta and FB anyway

Come on..
>>
>>58773318
Right, but when you are dealing with evolving data models, incomplete data, etc. Haskell's type system __tends__ to get in the way. It solves the problem fine when it is well-defined, but as an application is forced to evolve, it certainly becomes possible to paint yourself into a corner with the type system. Hence, it is possible to make elegant, generic, and reusable code in Haskell for generic, well-defined problems, but as the problems evolve in their complexity (and I'm speaking more of the reality of software engineering in a large environment, not how difficult an algorithm is to implement), it becomes less well-suited compared to other options.
>>
>>58773250
kangaroos are white and based
>>
I've been reading Javascript: The Good Parts lately and watching Crockford's talks on js. I was wondering if something like this existed for C? Kind of like "Gotchas" in C programming and good and bad practices and stuff
>>
>>58773515
All of C is the good parts.
>>
>>58773515
>Javascript: The Good Parts
So it's like one single page long?
>>
>>58773526
Ah. I was hoping to read about good and bad practices too.
>>
File: rzrcw.jpg (65KB, 800x600px) Image search: [Google]
rzrcw.jpg
65KB, 800x600px
>>58773533
>>
>>58772610

Rust has no use for OOP.

>>58772451

(cub 5)
>>
>>58773557
>tfw my joke isn't original but I laugh at it anyway
>>
File: 1485547923673.png (429KB, 451x619px) Image search: [Google]
1485547923673.png
429KB, 451x619px
Probably a stupid question but I have to ask:

Is it possible to make a program where the graphical interface is displayed through HTML and Javascript, but the algorithms and the logic of the program and done with C++?
>>
>>58773859
yes.
>>
>>58773859
Yes
>>
>>58773875
>>58773909

So how do I do it?
>>
>>58773920
Html interpreter with a c++ backend. How do you think browsers work?
>>
>>58773593
People routinely design Rust APIs in an OOP way (as in the bad parts of OOP)
>>
>>58773920
>>58773944
You'd probably want to use lua or python instead of html as a scripting language though. Easier to get working out of the box.
>>
>>58773949
That's unfortunate.
>>
File: bubbles.png (670KB, 1920x1080px) Image search: [Google]
bubbles.png
670KB, 1920x1080px
Learning Assembly for an ECE class, shit aint bad
>>
currently working on ending my own fucking life because i'm 24 and work as a developer for $20/hr


i will never see a decent salary
>>
Would I be a madman to use a mix of Haskell and C without using the Haskell standard library, prelude, or any library other than the GHC API for that matter?
>>
>>58773990
nobody will stop you
>>
>>58773974

20/hr isnt that bad anon. Ask for a little pay raise every 6 months.
>>
>>58773949
>as in the bad parts of OOP
so all of them?
>>
File: kidpepepng.png (38KB, 657x527px) Image search: [Google]
kidpepepng.png
38KB, 657x527px
>>58773360
what language best for crack?
>>
>>58774013
$20/hr for development is fucking heinous, what the hell are you talking about?
>>
File: smug_youko.png (341KB, 784x549px) Image search: [Google]
smug_youko.png
341KB, 784x549px
>>58774018
Russian
>>
>>58770941
>Go
>Bad performance
http://benchmarksgame.alioth.debian.org/u64q/go.html

???
It's no C but it's a good in-between
>>
Why does no one talk about C# here? I'm currently taking online tutorials on it but i'm wondering if there's an easier language to start with? Is C/C++ a better choice? Any advice would be great.
>>
>>58774037
C# is better than C++ but it's also more OOP so you want to try to avoid that
>>
>>58774037

C# is occasionally posted here, particularly when OSGTP is around. C is the easiest language to start with, C++ commands a bit more of the programmer to actually understand the nuances of the language to make effective use of it.
>>
>>58774027

ask for a pay raise cock breath
>>
>>58774018
>what language best for crack?
https://en.wikipedia.org/wiki/African_American_Vernacular_English
>>
>>58774053
desu if he had cock breath he wouldn't be paid this little
>>
>>58774053
I'm not him, dick licker

>>58774037
Because it's "le meme OOP xDDD"
Learning C# is a fine way to get into programming compared to Python because it actually has non-idiosyncratic syntax and features.

It's still better to start out with C though. Otherwise you'll treat strings like mutable data all the time.
>>
>>58774036
Now compare Go against C.
>>
>>58770635
most names are kinda dumb if you think about it

just pick whatever you like

maybe something that has to do with your business or something else entirely
>>
>>58773974
haha i'm 32 with a compsci degree earning $0 unemployed
>>
File: 1462565199381.jpg (40KB, 657x527px) Image search: [Google]
1462565199381.jpg
40KB, 657x527px
>>58773557
>yahoo press
>>
>>58773974

>20
>Still in college
Currently applying for an internship that pays 20/hr.
You should find a new place to work.
>>
>>58774013
it is when everyone you know who is either younger than you or the same age as you is making over $125k/year in the same field, working for companies like amazon, facebook, and google.

meanwhile i'm over here barely making ends meet working for some small ass startup. no formal cs education, and i learned everything i know about development on the job.
>>
>>58774077
>It's no C but it's a good in-between
I know your autism wants everything to be pure black and white logic, but that's not how reality works.
>>
>>58774083
stupid frogposter
>>
>>58774027
depends on where you live and he's probably in a junior position
>>
File: 1475261883568.png (44KB, 658x662px) Image search: [Google]
1475261883568.png
44KB, 658x662px
>>58774092
what
>>
>>58774042
>>58774050
>>58774076
Okay, so I guess I should start with C then. Any good resources/tutorials? I applied to school for programming so I want a head start. Thanks
>>
>>58773198
Not Stalin.

>>58773515
Undefined behaviour

>>58773859
Start a web server from your c++ program. Look into ipython.
>>
>>58774087
>i learned everything i know about development on the job.
there you go. you're probably quite shit and not worth six figures
>>
>>58774087
Depends where you are, anon.

$50k in Montana buys you a much better quality of life than $100k in the Bay Area.
>>
>>58774110
hence why i said i'm working on ending my own fucking life you retarded fuckbag
>>
File: images.duckduckgo.jpg (16KB, 260x341px) Image search: [Google]
images.duckduckgo.jpg
16KB, 260x341px
>>58774105
Do every exercise.
>>
>>58774118
i live in seattle
>>
>>58774120
get a better brain and start improving your skills. you're basically getting paid to learn. your experience at the startup will look on your resume too.

https://www.youtube.com/watch?v=0xc3XdOiGGI
>>
>>58774129
I'm sorry, anon.
>>
>>58774134
>will look on your resume
will look good on your resume
>>
File: 1478491158211.png (24KB, 657x525px) Image search: [Google]
1478491158211.png
24KB, 657x525px
>>58774122
>tfw have read through this 3 times without doing the exercises and have been coding java for a living for 5 years
>>
File: powerthirst.png (2MB, 1440x903px) Image search: [Google]
powerthirst.png
2MB, 1440x903px
>>58774122
will i soak more in if i drink powerthirst while readin ?
>>
>>58774122
As much as I thought this book would be a meme, I've kept it with me all semester and read it in my off time and it's incredible
>>
>>58774105

C Primer Plus, 6th edition.
>>
>>58774087

big tech companies love hiring people with their degree from a fancy school, thats just the way it is, but they probably know more than you too
>>
File: 1484805896740.jpg (1MB, 1134x2268px) Image search: [Google]
1484805896740.jpg
1MB, 1134x2268px
>>58774153
Do the exercises
They're very simple and you should be able to do the first few chapters in a couple lazy days.

>>58774155
You soak in more of everything with Powerthirst

>>58774159
We were required to buy it for my "intro to systems programming class" last semester. Last semester I learned that my university thinks a semester dedicated to bash is okay, and that these books will probably teach me more than anything in my academia will.
>>
>>58774134
don't get me wrong, i've come a long fucking way. last august i didn't even know what a REST API was, now i'm designing fully-featured, dynamic web applications for the startup from scratch. in the span of 6 months, i've gone from doing data entry into the database, to a developer role. i've learned a fuckton, but when it comes to moving on from this company, i won't fare well in the interview process because i don't have a formal education in algorithms and data structures and shit. everything i know now i learned by breaking shit, figuring out what broke, then fixing it.

and fuck the idea of getting into any top company like fb/amazon/goog/palantir. fuck the idea of getting a 6 figure salary. i don't think that will ever happen in the next 10 years.
>>
>>58774192
I sympathize, anon. Tech hiring is really broken.

The only time I've ever needed to implement an algorithm I learned in college has been in my hobby projects, where I'm deliberately writing lots of things from scratch. Implementing binary search or whatever has never come up in my day job.

I think part of it is that it's really difficult to test well good someone is likely to perform on real problems in a one hour interview slot. The interview would be over before you finished explaining all the necessary context. So you end up with really artificial problems and/or algorithms quizzes.
>>
>>58774229
i really don't care that the hiring process is broken or whatever, i just think i started preparing way too fucking late. i graduated with a degree in applied mathematics last year, when i could have been doing something useful like a cs degree that would have at least prepared me a little bit with courses on algorithms/data structures.
>>
>>58774264
>degree in applied mathematics
that's still good, you just need to self-learn more cs and programming stuff and get a few years of software dev experience and you'll do great
>>
File: ND4Np9c.gif (347KB, 691x827px) Image search: [Google]
ND4Np9c.gif
347KB, 691x827px
Clojure or Go
>>
>>58771899
Javascript is what I would start with. I come from assembler and C, currently using C# for monstruous Unity apps.
>>
>>58774286
i really don't think the company i'm working for will exist for another 2 years. one of the other engineers is going off to an internship at fb in the summer and will most likely have a job there after he graduates, and the other one is most likely going to be working for some other large company. and the company we work for isn't generating any money so far.
>>
>>58774339
Clojure
>>
File: 1475290259078.png (155KB, 293x326px) Image search: [Google]
1475290259078.png
155KB, 293x326px
>>58774339
Go learn an older language first, like D, Forth, or Scheme.
>>
>>58774409
>D
>Older
>>
File: dead.jpg (34KB, 800x445px) Image search: [Google]
dead.jpg
34KB, 800x445px
>>58774339
Fortran desu
>>
>>58774370
>Javascript
Compared to that steaming pile of shit, even COBOL sounds attractive.
>>
>>58774264
what is applied mathematics about? that sounds interesting, I've always found it difficult to apply the math I learned
>>
>>58774384
are you paid?
When you have a job and you're on LinkedIn recruiters try to rip you out of your current job. You could do that.
>>
>>58774479
COBOL is not a web language, your mayking apploranges right meow
>>
>>58774479
Also (same dude) I don't know much about Javascript, what's so bad about it? Memory management?
>>
>>58774523
>COBOL is not a web language
https://arstechnica.com/information-technology/2015/08/calling-1959-from-your-web-code-a-cobol-bridge-for-node-js/
and for giggles
https://arstechnica.com/information-technology/2016/05/who-put-this-javascript-in-my-cobol-node-cobol-thats-who/
>>
>>58774492
i focused on computational mathematics, so i worked on a lot of numerical analysis, but a lot of people go into optimization and mathematical modeling.

>>58774505
what do you mean by paid? i'm on linkedin, haven't gotten a single message.
>>
>>58774534
They fucked up when designing it and gave it a bunch of ass backwards semantics. You'll get a bunch of replies with REPL's showing proof of how bad it is.
From a purely language standpoint and ignoring all of the shitty little mistakes, it's alright. First class functions and a prototype object system that hasn't turned out to be incredibly useful. Very similar to Lua.
It's just another blub language to me.
>>
>>58774543

interdastang
>>
>>58774523
I'd rather make web applications with COBOL than Javascript.

I can't trust a programming language where typeof NaN evaluates to Number, and NaN == NaN evaluates to false. I don't mind using it for front-end since it's not programming per se. But never for server-side applications, no matter how many "frameworks" people come up with to workaround its inherent crappiness.
>>
>>58774561
link to your linkedin?
it probably stinks
>>
>>58774606
>I can't trust a programming language where ... NaN == NaN evaluates to false.
#include <stdio.h>
#include <math.h>
int main () {
printf("%d\n",
NAN == NAN);
return 0;
}


>output:
>0 (false)
>>
File: javascript.png (32KB, 576x402px) Image search: [Google]
javascript.png
32KB, 576x402px
>>58774606
Whenever somebody asks me why I hate javascript I just show them this
>>
>>58774635
$ python3
Python 3.6.0 (default, Jan 16 2017, 12:12:55)
[GCC 6.3.1 20170109] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 1 + - + + - - - + - + + - - + - 2
3
>>
>>58774635
>>58774650
>>58774632
wtf I hate programming now
>>
>>58770625
Writing some makefiles right now. Is there really no way to have a dependency be a non-existent file? So that the recipe can obtain the missing dependency?
>>
>>58774614
i'm not giving out any personal information, bubberoo
>>
>>58774667
How about PHONY targets?
>>
>>58774650
Python is bad for also reasons
>>
I'm slowly falling for the scala meme.

Can anyone give some unbiased opinion.
>>
>>58774700
It's fine. Just fucking make shit, the language doesn't matter
>>
>>58772131
what ia a man? a miserable little pile of mey meys
>>
>>58774667
order-only prereqs?
http://www.kolpackov.net/pipermail/notes/2004-January/000001.html

btw use cmake instead
>>
>>58774684
Wouldn't it run every time, regardless if the dependency was retrieved?
>>
>>58774686
Putting arbitrary +'s and -'s in between two numbers is valid in practically every infix language (including your precious C).
NaN == NaN is the standard for every single implementation of IEEE floats.
I hate javascript as much as the next guy but please don't criticize it on a basis that is true for every other language; it just nullifies your argument.

Actual bad things about javascript:
> weakly typed == and operators other than + (arguably weak + is bad too, but many languages allow it)
> 'this' argument, which has to do with prototypes and was built because they didn't think closures would be as popular
> adding new slightly-different syntax ("""arrow functions""") usually doesn't actually fix the language, as evident by e.g. C++
> variable hoisting, which is a lazy way to fix mutually recursive functions. again fixed by "patching" new features.
> prototyping isn't useful and hardly any javascript code takes real advantage of it
> object key iteration is fucked because of prototyping, and you have to be very careful and use things like Object.keys to avoid bad things
> object keys being coerced as strings is arguably bad; they """fixed""" this with weird Symbol shit
> other minor inconsistencies and dumb shit, like .map pointlessly applying extra arguments and .sort sorting numbers alphabetically, or the parser interpreting the function keyword differently if its an expression or a statement

Note that you could create lists like these for most shitty blub languages.
>>
Right now an encrypted websocket chat in C using libwebsocket, makes me wonder if I could somehow torify it and implement some high degree encryption, basically making a tor discord, where its safe to say anything you want
>>
>>58774761
that all sounds pretty terrible
>>
>>58774719
>>58774684
Figured it out. It will always run, but it might do nothing.

target:
ifeq ($(wildcard $(FILE)),)
@echo You're a nigger, Harry.
endif
>>
Spent all day configuring Atom. Changed about 3 lines of code in my actual project.
>>
Programming is a terrible profession. For one, you are not respected at any normal company. You're known as 'IT' or 'tech' and everyone gossips about how disgusting everyone is in the department. Every day, some Alpha who probably does nothing at his job except get his secretary to suck his dick in his corner office cucks you into doing random bitch work, and then yells at you when it's not done by the deadline despite it being impossible to complete the work requested. Not only that, the code rarely works, your co-workers are smelly Indians brought in by Tata Consultancy and connive to replace your job at all times for half the salary, and the work never, ever ends. You pollute your body with sugar and toxins, deprive it of sleep, and let it rot while you sit the majority of the day, neglecting any healthy exercise, social interaction or life goal attainment. It's like a Postal worker, but coupled with feelings of patheticness, lonliness, helplessness, rage and total hopelessness.

Women, when they hear you are a programmer, instantly remove you from the potential pool of mates as they know your earning potential is maxed early and your career over at 35. They are also instantly disgusted by you. It is far better to tell a woman you are on welfare than to out yourself as a computer programmer. It's also highly embarrassing for a woman to date or be married to a programmer, as virtually everyone knows they are the grown up version of the hopeless virgin in high school. One who never really grew up and became normal and fit into society, but rather found an environment where he could escape the reality of his situation and be invisible, able to hide the toxic shame and utter humiliation that is the programmer.

After Dentists, programmers have the highest rates of mental disorders, especially depression and suicide.

Programmers, why haven't you taken the cyanide pill?
>>
>>58774859
Where I live women jump on you for having an IT job as it means high earning or that you are connected with tourists tho
>>
Best emacs git package?
>>
File: 1453261446276.jpg (35KB, 200x200px) Image search: [Google]
1453261446276.jpg
35KB, 200x200px
>>58774859
This is a copypasta right guys?
>>
>>58774761
>Putting arbitrary +'s and -'s in between two numbers is valid in practically every infix language (including your precious C).
wrong
>>
>>58774859
s/programmer/sysadmin
>>
>>58774875
This.
>>
>>58774893
no, it's 100% true
>>
>>58774859
programming is literally the best profession for intelligent people. if you're smart enough you can make really cool shit and earn fuckloads of money. most other professions are dumb normie shit, or they're slow because they're limited by physical constraints whereas with programming you're limited only by the amount of brain power available to you.
>>
>>58774606
>NaN == NaN evaluates to false

That's how it should be: https://en.wikipedia.org/wiki/NaN#Floating_point

>A comparison with a NaN always returns an unordered result even when comparing with itself.
>>
>>58774635
>they defend + overloading for addition and concatenation
>>
>>58774926
If it supports + as an unary operator (as a complement to -), then most parsers will allow arbitrary combinations of the two before a number.

Languages that allow it
>JS obviously
>Python (2 and 3)
>C
>C++
>Java
>Perl
>Julia
>Ocaml

Languages that don't:
>Lua
>Rust
>Haskell

Feel free to append to this list with languages that I don't know the syntax to. But it should be clear that languages that do this are in the majority.
>>
>>58775027
CL and scheme dont
>>
>>58774859
You sound bitter. Going back to India?
>>
>>58775027
http://ideone.com/0vns1P
>>
>>58775065
>practically every infix language
>infix language
>infix

>>58775073
>arbitrary + and - between two numbers
>between two numbers
>between
>two
>numbers
http://ideone.com/1zMuVI
>>
File: 1484855607122.png (1MB, 1200x1800px) Image search: [Google]
1484855607122.png
1MB, 1200x1800px
>>58775027
>Lua
>Rust
>Haskell
The Holy Trinity.
>>
File: 1484504862247.jpg (49KB, 500x500px) Image search: [Google]
1484504862247.jpg
49KB, 500x500px
>professor gave us an assignment that requires some coding
>i have literally zero experience with code
>it's not a computer class at all

wtf......
>>
>>58775110
where's the fucking frog
it must somewhere near, but i see only wojak
>>
>>58775110
basic coding is easy as fuck

just do it, don't be a pussy
>>
>>58775110
t. brainlet pajeet
>>
https://bodil.lol/hipster/
>>
>>58775094
Scala is best girl in pic, but I've never written any Scala code before
>>
>>58775094
But where was Mathematica?
>>
>>58775094
>C++
>christmas cake

>C
>qt princess tier
???
>>
>>58775178
the wolfram language is fucking disgusting
>>
>>58775180
>qt princess
>MILF
>princess
>>
>>58775198
B-but muh symbolic claculations
>inb4 Maple
>>
>>58775227
it's useful but i wish there were a better alternative
>>
just purchased mathematica lads

prof gave us some example code in python to do the assignment but i couldn't decipher it lol
>>
>>58775250
>just purchased mathematica lads
isn't it like crazy expensive
>>
File: manga.png (1MB, 1096x1548px) Image search: [Google]
manga.png
1MB, 1096x1548px
Messing around with unscrambling ripped manga.
>>
>>58775240
Too bad Sage sucks shit and is also closed source
>>
>>58775257
scramble yourself if this is in plebthon
>>
>>58775253
the full version is

browser only version is $75/year or in monthly payments

bad decision as i'll probably never use it again but i'm desperate at this point
>>
File: is_this_bitch_serious1.png (93KB, 279x387px) Image search: [Google]
is_this_bitch_serious1.png
93KB, 279x387px
>>58775250
>just purchased mathematica lads
>Mathematica
>purchase
>>
watching the tutorial vid now
>>
I don't have programming anime pictures
Please post them
>>
File: rebindable syntax.png (11KB, 624x163px) Image search: [Google]
rebindable syntax.png
11KB, 624x163px
>>
>>58775349
what memelang is this
>>
>>58774414
It's been around longer than you'd think
>>
>>58775386
Haskell
>>
>>58775393
Looks like haskell with meme arrows.
>>
So this takes forveer to run on drracket with sicp.

help.

#lang sicp
(define (curt a) (cuberoot-iter 1.0 a))
(define (cuberoot-iter guess a)
(if (good-enough? guess a)
guess
(cuberoot-iter (improve guess a) a)))
(define (improve guess a)
(/ (+ (square (/ a (square guess))) (* 2 guess)) 3))
(define (square a) (* a a))
(define (good-enough? guess a)
(< (abs(- (square guess) a)) 0.001))
>>
File: 1480308555073.jpg (475KB, 852x973px) Image search: [Google]
1480308555073.jpg
475KB, 852x973px
>>58775347
>>
>>58775423
>Exercise 1.8. Newton's method for cube roots is based on the fact that if y is an approximation to the cube root of x, then a better approximation is given by the value

Use this formula to implement a cube-root procedure analogous to the square-root procedure. (In section 1.3.4 we will see how to implement Newton's method in general as an abstraction of these square-root and cube-root procedures.)
>>
>>58774859
if programmer {
return beta;
}
return chad;
>>
File: what the fuck am i reading.jpg (170KB, 869x689px) Image search: [Google]
what the fuck am i reading.jpg
170KB, 869x689px
>>58775423
>>
>>58775423
see http://community.schemewiki.org/?sicp-ex-1.8
>>
>>58775456
goto r9k;

if (false) returnToDpt();
>>
>>58775456
if(beta.numberOfGfs() < 1)
printf("tfw no gf")
exit(0);
>>
>>58775424
More please
>>
File: 1480187906353.jpg (1MB, 1920x1411px) Image search: [Google]
1480187906353.jpg
1MB, 1920x1411px
>>58775549
>>
>>58775561
Don't stop
>>
>>58770941
I'm fairly certain you've got the fast development/neither backwards.
>>
File: required reading for (You).png (381KB, 528x528px) Image search: [Google]
required reading for (You).png
381KB, 528x528px
>>58775600
>>
File: 1482181025637.png (769KB, 1052x1342px) Image search: [Google]
1482181025637.png
769KB, 1052x1342px
>>58775549
>>
File: 1485633700505.png (661KB, 600x600px) Image search: [Google]
1485633700505.png
661KB, 600x600px
>>58775549
post other anime images to repay me.
>>
Why haven't you learned Haskell yet /dpt/?
>>
File: 1484824364153.png (208KB, 5000x5000px) Image search: [Google]
1484824364153.png
208KB, 5000x5000px
>>58775650
>>
File: 1482055600767.png (818KB, 1280x719px) Image search: [Google]
1482055600767.png
818KB, 1280x719px
>>58775650
>implying
>>
New thread:

>>58775678
>>58775678
>>58775678
>>
>>58775645
>>
>>58775703
>>
>>58775650
It's a meme language for memesters.
>>
File: 1481203747565.jpg (2MB, 2963x4172px) Image search: [Google]
1481203747565.jpg
2MB, 2963x4172px
>>58775720
>>
>>58772134
Python is very easy to learn, but if you want to go all in and learn the least high-level high-level language, go with C

Also, steer clear of object oriented programming if you're only beginning to learn.
>>
>>58773859
You want to use Electron and write addons using V8 API.
>>
>>58770669
>mfw my company's name is actually like that
moderate kek
>>
>>58773990
so gangsta
>>
>>58774859
wtf I hate programming now
>>
>>58775650
posting memes is enough for me. I don't need to code them aswell.
>>
>>58771132
Your conclusion is not well drawn.

However, what you've hit on is a good reason to prefer static over dynamic typing. That said, dynamic typing does have some advantages.
Thread posts: 322
Thread images: 51


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