[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: 328
Thread images: 34

File: c-shine band.jpg (154KB, 633x558px) Image search: [Google]
c-shine band.jpg
154KB, 633x558px
Old thread: >>56129785

Functional autists not allowed edition

What are you working on, /g/?
>>
>>56138414
can someone tell me what this lisp code is doing

    (cond 
((typep is_atom 'atom) (push is_atom list_of_atoms))
(t (loop for x in is_atom appending
(some_func x))
)
)
>>
File: STRENGTH THROUGH PURITY.png (36KB, 2000x1412px) Image search: [Google]
STRENGTH THROUGH PURITY.png
36KB, 2000x1412px
>>56138414
>Functional autists not allowed edition

Functional edition it is

>>56138467
No, what does it do?
>>
>>56138465
>>56138480
well i mean i know what it does. it takes an atom and recursively returns the strings in that atoms what i dont understand is how that
(t (loop...
part works

how does it ever get to there if its always an atom and thus should only execute the first part where it checks whether or not it is an atom?
>>
>>56138467
Seems like a very ugly way to recursively collect every atom in a tree. Is the conditional inside the function some_func?
>>
>>56138491
>Is the conditional inside the function some_func?

yeah

oh okay so is a tree not the same as a list? i assume a tree is made up of atoms?
>>
>>56138475
I don't like f# just because its a microsoft product
mind you, I don't know f# itself
>>
>>56138467
>self documenting code
>>
File: 1454655106962.png (425KB, 730x916px) Image search: [Google]
1454655106962.png
425KB, 730x916px
Whatever happened to that one IRC group that was studying all of K&R in 2 weeks?
>>
>>56138500
A tree is a list that can be nested, i.e. it is either an atom or a list of trees. A neater definition for the function would be
(defun some-func (tree)
(if (atom tree)
(list tree)
(mapcan #'some-func tree)))

or, with the equivalent formulation of trees as either NIL, an atom or a cons pair of trees:
(defun some-func (tree)
(cond ((null tree) NIL)
((atom tree) (list tree))
(T (append (some-func (car tree))
(some-func (cdr tree))))))
>>
I want to go through SICP but I don't want to be forced to learn a dead interpreted language from the 70s.

Can I do the exercises in another language or does it completely revolve around scheme?
>>
File: le meme guy.png (96KB, 262x259px) Image search: [Google]
le meme guy.png
96KB, 262x259px
>>56138577
It's a meme. Read P:PP.
>>
>>56138572
>
(T (append (some-func (car tree))
(some-func (cdr tree))))))


this is my primary question -- what is this doing? so it's saying if the tree is null then return nil, if its an atom return a list with the atom, if its .. then i get lost at this part
>>
>>56138488
t is essentially the same as an Else clause, because that case will always match (and so it must be the laste Cond clause.)
LOOP is a DSL embedded in Lisp for iterating over various kinds of structures.
>>
>>56138572
>atom
????

I don't /lisp/, thats why..
>>
>>56138608
>t is essentially the same as an Else clause, because that case will always match (and so it must be the laste Cond clause.)

ah i see

thanks
>>
>>56138520
function types are related to exponentiation
a -> b = b^a

bool -> bool = bool^bool = 2^2 = 4

absurd :: void -> a
void -> a = a^void = a^0 = 1

() :: ()
() -> a = a ^ () = a^1 = a
a -> () = () ^ a = 1^a = 1
(const ())
>>
>>56138598
what is PPP?
>>
>>56138577
So use an R6RS/R7RS compiler.
Learning something isn't going to hurt you unless you actually don't enjoy programming.
>>
>>56138610
An atom is something that's not a cons pair.
>>
>>56138621
purchasing power parity
>>
>>56138621
programming principles and practice by bjarne stroustrop
>>
>>56138627
What happens if you give a lisp function an atom when it expects a cons or vice versa?
>>
>>56138637
It throws an error.
* (cdr 'a)  

debugger invoked on a TYPE-ERROR in thread
#<THREAD "main thread" RUNNING {1002C74733}>:
The value A is not of type LIST.

Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
0: [ABORT] Exit debugger, returning to top level.

(CDR A) [tl,external]
0]
>>
>>56138657
That's really shit
How can you defend this?
Is this a principle of all lisps?
>>
What's a good book for organizing problems?
Like, if I want to design something, how do I go about it pragmatically and logically so that I don't just start shitting out bad, redundant, inefficient or boilerplate code all over the place
>>
>>56138679
What are you trying to build anon?
>>
can someone teach me common lisp right now?
assume I know basic stuff such as looping, recursion, if for while, pattern matching, partial application, function composition
>>
>>56138672
Throwing an error when you try to find the contents of a second cell of an atomic type?
What's it supposed to do?
Does it need to be wrapped in a (catch (try ...))? so that the error is silently ignored?
>>
NEET here. I entered in a paid for by the government 7 month programming course. There was choice between C#, Java and php. I chose C#. Did I make the right choice?


I already know how to program C/C++, I just have have no diploma or portfolio so I can't find work.
>>
>>56138696
The error IS silently ignored - by the interpreter or compiler. This is something you could catch.
>>
>>56138702
It's the least AIDSey of the available choices.
>>
>>56138702
yes
>>
>>56138707
The compiler is throwing the error.
It drops you to a debugger so you can fix your shit.
http://www.gigamonkeys.com/book/beyond-exception-handling-conditions-and-restarts.html
>>
>>56138672
It's a principle of all languages.
>>> 1[:-1]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'int' object has no attribute '__getitem__'
>>
>>56138738
Why not just have a proper type system, rather than a broken one you pretend doesn't exist?
>>
>>56138779
Prelude> head 'a'

<interactive>:56:6:
Couldn't match expected type ‘[a]’ with actual type ‘Char’
Relevant bindings include it :: a (bound at <interactive>:56:1)
In the first argument of ‘head’, namely ‘'a'’
In the expression: head 'a'
In an equation for ‘it’: it = head 'a'

Wow, Haskell is such a shitty language for throwing errors where it should be throwing errors!
>>
If someone isn't accepting your pull requests how do you make them accept it? My pull is a genuine improvement.
>>
>>56138808
It's simple, don't use head.

Now show me some Lisp code that doesn't use cdr
>>
>>56138685
Educational program for musicians, it's the largest personal project I've taken on (I mostly just make personal toy programs for my own amusement, I'm not much of a """""programmer""""" at all)
It's there a book that companies give to employees where they learn how to take a spec from a client and turn it into a general framework and then implement the skeleton into actual code?
I keep running into walls because thing X and thing Y need to know about think A but also thing Z shouldn't be here because it's redundant and etc etc
>>
>>56138619
This shit blew my mind when it first clicked.
Have you studied "type theory"?
>>
>>56138811
You can't force them.
If the author is an asshole, they might steal your pull request, commit your changes under their name and not give you credit.

Also, if your pull request consists of nothing but menial comment changes and/or a license, you can fuck right off. I block people who do that.
>>
>>56138811
>If someone isn't accepting your pull requests
You stop contributing to that repo, and start making your own projects. The author do what he considers to pull or not the contributions.
>>
>>56138828
So what does this educational program for musicians actually do?
>>
>>56138819
What are you expecting from a type system??
>>
>>56138619
This is basic set theory.
https://en.wikipedia.org/wiki/Function_space
>>
>>56138811

Submit a pull request to add a code of conduct
>>
>>56138844
....helps them music more gooder
Can you answer my question or a are you going to just funpost
>>
>>56138819
Functions throw errors when given an argument that they can't operate on. Are you just not going to use any function?
>>
File: code.jpg (21KB, 342x416px) Image search: [Google]
code.jpg
21KB, 342x416px
>>56138828
>>
>>56138863
function application is always valid in the lambda calculus
>>
>>56138870
Thanks anon :3
>>
>>56138861
I'm being completely serious, you're the one who's only interested in acting retarded.

Does it display musical notation?
Do you intend to have expandable lesson packs?
What does this offer over a book or a text document?
>>
>>56138863
>Functions throw errors when given an argument that they can't operate on.

This is what types are for
Types tell you what arguments a function can be given
>>
>>56138905
Types are much much more than that, anon
>>
>>56138913
that's their primary role, telling you what programs are valid
>>
can someone redpill me on command line
>>
>>56138905
Exactly. That's why >>56138657 throws a type error.
>>
>>56138924
>redpill
fuck off
>>
>>56138899
>Does it display musical notation?
Yes and plays randomly generated sequences
>Do you intend to have expandable lesson packs?
No, all in one package
>What does this offer over a book or a text document?
Books don't generate and play random melodies
>>
>>56138919
>he hasn't experienced blissful haskell, where the type context of an expression determines its functionality
>>
>>56138933
Is this program for teaching you how to play by ear?
>>
>>56138941
It could, ear training in general
Generates random melodies or chords, plays them, user figures out what's being played, then the answer is revealed when they hit a button
>>
>>56138702
Yes.
>>
>>56138936
It's called polymorphism and it's still part of checking which programs are valid

>>56138926
How do you explicitly state which inputs your functions can take?
>>
>>56138956
It's inferred, but can be declared as well.
* (describe #'cdr)

#<FUNCTION CDR>
[compiled function]

Lambda-list: (LIST)
Declared type: (FUNCTION (LIST) (VALUES T &OPTIONAL))
Documentation:
Return all but the first object in a list.
Known attributes: foldable, flushable, unsafely-flushable
Source file: SYS:SRC;CODE;LIST.LISP
>>
>>56138956
>How do you explicitly state which inputs your functions can take?
Most modern lisps allow type annotations for runtime checks. I'm currently working on making a lisp like this, except the JIT compiler is going to optimize out most of these checks.

>explicit
watch yourself
>>
So what are functional languages used for in a professional setting?
>>
>>56138969
What are procedural languages used for in a professional setting?
>>
>>56138954
Ideally, you could create a chord drawing library that displays any chord or note sequence that you specify, another library that handles audio tones, and the frontend which is the user interface.
>>
>>56138969
Literally anything
>>
>>56138988
That's actually my current design more or less, but if I made another program, say a notation editor, then it's orders of magnitude more complex. Then how do I know where to start? That's why I was asking for a book. But thanks for your input anon :3 I'm out of animals because I'm on my phone so have a gondola instead
>>
Can anyone explain to me what in the world rvalue references are for? Every source I come across is intentionally obtuse.
>>
I have a basic single threaded program compiled in visual studio, but apparently it launches 4 threads - not one. How comes?
Windows.
>>
>>56139094
that's the botnet revving up into overdrive!
>>
>>56139094
because you have library calls which are not single threaded
>>
File: Lisp.png (40KB, 555x513px) Image search: [Google]
Lisp.png
40KB, 555x513px
>>
Someone on here said you need a firm grasp of linear algebra and matrix arithmetic before you can use graphics libraries.

I'm looking at an algebra book and it has a section on matrices next to the section on systems of linear equations, is this what they're talking about?
>>
/g/, what effect can your choice of OS have on your programming experience?
>>
Anyone else have trouble getting started learning? Made it a chapter or two into two different books and then sort of stopped working on it. Also took me months to get this far because I rarely actually read them. C Primer Plus and Think Python 2nd Edition. I've also started but not finished several Codecademy courses. I know it would all be easier if I just learned a language already, but I'm just having trouble sticking to it. What do?
>>
>>56139200
windows makes your life hell if you're not fully sucking on the microsoft ecosystem teat with visual studio.
apple makes your life hell if you're not fully sucking on the apple ecosystem teat with xcode and paying $99/year for a developer license to be able to run unsigned code on your iOS device

linux comes with everything you need to write and compile C programs using the time tested UNIX way
>>
>>56139213
Sounds like a motivational problem. Do you find the content to be unstimulating?
>>
>>56139229
So if you're not using the MS/Apple approved methods, it's harder than it needs to be? Is it a program compatibility issue or just restrictive OS'?
>>
>>56139229
>>56139254
Windows doesn't make your life hell if you aren't using VS
>>
>>56139229
os x has UNIX certification while linux doesn't
so you can do C better there
>>
>>56139254
The OS simply doesn't come with a compiler unless you install one yourself.

Your only alternative is using windows/mac ports of traditional *NIX tools, like gcc, make and the gnu coreutils, but at that point, you may as well be using linux.

>>56139260
>i have no idea what I'm talking about
>>
>>56139277
sorry but it's true
>>
>>56139284
You're not even using the correct name for macOS, you dumb shit.

macOS's inbuilt copy of gcc and the gnu coreutils haven't been updated since 2 0 0 3
>>
>>56139300
>builtin
lmao
you know since it's UNIX certified you can compile the latest version yourself
>>
>>56139258
You just have to install cyg "i can't believe it's not unix!" win, and go to sleep pretending that there is any merit to the OS running in the background
>>
>>56139237
Hm. That could be it. I don't want to believe it's because I don't like programming, though. I think I am just depressed as fuck and having trouble doing anything.

I can say that codecademy feels a bit more fun than the book because of the dopamine rush that comes with the green check mark saying you did it right, versus just hoping you did the book problem right. Whether it's codecademy or one of the books, though, I also find that I'm not retaining the knowledge well. I think it's probably been 2-4 months since I wrote any C or Python now and I don't really know them at all. Like I said, I was at absolute beginner territory, but I don't even think I could do a Hello World in C anymore unless each step was presented as a multiple choice question or something.

Am I doing the wrong languages? Do I need a better goal to motivate myself? I thought of maybe trying to learn bash scripting since I use GNU/Linux, but I don't think I have any good books on that, and the codecademy command line course was way too basic.
>>
>>56139300
>macOS's inbuilt copy of gcc
macOS comes with clang, not gcc. And it's very up to date.
>and the gnu coreutils
BSD coreutils. Also fairly up to date.

You clearly have no idea what you're talking about.
>>
Writing a time management program for the new semester

Hopefully it'll get so detailed I won't have any unscheduled time at all and thus won't have to think
>>
>>56138969
Nothing.
>>
File: 1467372288344.jpg (111KB, 900x1075px) Image search: [Google]
1467372288344.jpg
111KB, 900x1075px
Any recommendations for books to learn Ruby with on Amazon?
>>
>>56139325
Take vitamins, sort out your diet, start exercising, and when you finish exercises on CA continue working from a good book. I don't think you can't do it, it sounds to me like you need a kick up the arse [spoiler]just like I did[/spoiler] to get your discipline in gear.

>>56139260
So a compiler on Windows would be something like Cygwin?
>>
>>56139446
try Don't learn RUBY by mr. Ching Chong
>>
File: 1467170642899-3.jpg (36KB, 241x479px) Image search: [Google]
1467170642899-3.jpg
36KB, 241x479px
>>56139471
I don't understand the joke.
>>
>>56139170
help
>>
>>56139170
>>56139671
lol you don't need shit to use a graphics library, that's the whole point of a library

does all the heavy lifting for you and you just initialize it

I mean you should probably know how to do matrix arithmetic and calculus just for utility though, that's like one of the first classes you take in college.
>>
quickest crash course in C# basics?
>>
>>56139699
https://learnxinyminutes.com/docs/csharp/
>>
>>56139711
sweet shit, thanks m8
>>
Still working on my text based RPG. I'm not proud of it but I'm happy with it. I added some item descriptions.
https://github.com/enigma424242/RPG/blob/master/textbasedrpgtest.py
>>
>>56139695
what if it's low level graphics like opengl?
>>
>>56139805
I don't think I'm qualified to help you

but from my experience with jlwgl and slick2d basic game design involves a lot more knowledge of how to work with classes and ticks and events than calculating the horizontal area between two waves or calculating collision vectors while travelling in an arc

also you'll be spending a lot of time reading docs because nothing will be intuitive or easy to do
>>
Still optimising my tool, managed to get 15-20 seconds per run compared to yesterday's 20-30.

I'm reimplementing a data analysis tool which takes 30-40 minutes per run.

(Mostly because it's horrid Perl spaghetti code which converts the files it uses into different formats several times just because it was easier to do some operation on them in a different format)
>>
>if creation
... = true
>else
... = false
Why?

Also some parts of inventory and such could be autogenerated

>>56139805
>opengl
>low level

>>56139835 >>56139865 >>56139885
>>>/adv/ >>>/fit/ >>>/r9k/
>>
>>56139695
Depends on what you want to do.

If you wanna make video games you can get by using an engine like unity if you know what a vector is.
>>
>>56139805
Pretty much every opengl tutorial or book starts of with explaining the basics of matrices and vectors, which is pretty much all you need to know unless you're writing things like realistic water shaders.

Its not like you even need to remember how you multiply matrices, you use a math library for that.
>>
File: foutgjustemamerdeenlair.png (92KB, 295x229px) Image search: [Google]
foutgjustemamerdeenlair.png
92KB, 295x229px
>If you passed high school math and can hack around in Python, I want to teach you Deep Learning.
>oh, sweet
>only three chapters online
>only the first one is free
>>
>>56140070
Read a book ....
>>
>>56140081
That's what I'm trying to do. Do you know a book about machine learning that doesn't assume you have a PhD in linear algebra?
>>
>>56140070
Just use libgen. Online books are most likely trash anyway.
>>
>>56140090
>Machine learning
>Linear algebra

Anyway, if you're shit at math don't assume you'll ever be more than a code monkey. Or brush up on your math.
>>
>>56140090
http://www.deeplearningbook.org/
http://neuralnetworksanddeeplearning.com/
>>
>>56140122
I'm not shit at math but my linear algebra education was basically repeatingly inverting matrixes and all sorts of repetitive tedium, there's a good reason computers are marginally better than humans for that.

>>56140127
Thanks.
>>
Aight guys, which book should I read first? "The hidden language of computer language and software", or "Structured computer organization"?
I am learning how to program, but I feel that if don't truly know how the "magic" happens under the hood, I may not be as great of a software developer as I would hope so. I know it isn't necessary for me to know these things, but knowledge is always a great investment.
>>
File: hqdefault.jpg (18KB, 480x360px) Image search: [Google]
hqdefault.jpg
18KB, 480x360px
>>56138414
What is the best way to do this?

I am writing a memory game and I came to the point where I need to compare two cards.

The program works like this:
1. Cards load into random container.
2. Anither layer of containers are dynamically created afterwards on the top of the layer below.
3. Covers loaded in to the top layer.
4. User clicks on a cover then the opacity becomes 0% and the bottom layer container is assigned to a 2 elems array.
5. Same things happens with another card.
6. The program compares the containers content by name. If they are equal the player gets a point and the card disappear from the windows, if this does not happen then the cover loads back. In either case the arrays gets emptied out.

Now my problem comes with the comparison part. What is the best way to get the exact container under the selected cover?

I thought about naming the cover container like "card22cover" and the container below "card22" and writing some tedious method which gets the cover container name and searches for its "pair" and loads the found container into the comparison array. But I am sure there is an easier way to do this.

Any suggestions?
>>
>>56140152
You should read the C book, the one the pink anime girl always has in the OP
>>
>>56140146
Isn't enough? Just knowing what you can do and why you do it enough. As for the how you just use libraries.
>>
File: le intrigued canine.jpg (9KB, 265x265px) Image search: [Google]
le intrigued canine.jpg
9KB, 265x265px
>>56140180
>girl
>>
>>56140205
You still need math for machine learning. All papers use math and mathematical concepts. You cant avoid it
>>
File: Comfy_guy.jpg (53KB, 197x190px) Image search: [Google]
Comfy_guy.jpg
53KB, 197x190px
I actively started learning programming this week. I'm just an 18 year old sperg, but it's so comfy.
>>
>>56140180
Oh I am learning how to program in C. Not using that book tho, I am currently reading Kochan's one, plus doing the "Computer Science Course" in github. I know wanted to learn more about hardware and software, to truly "understand" how computers work. Thanks anyways tho, I will get that C book in the future, kind of expensive, and couldn't find the pdf online. If you have a link let me know tho lol.
>>
File: pajeet.png (4KB, 295x106px) Image search: [Google]
pajeet.png
4KB, 295x106px
>>56140205
>lol just use libraries
>>
File: trumplet.png (8KB, 100x95px) Image search: [Google]
trumplet.png
8KB, 100x95px
Can we stop the trump/hillary spam?
>>
>>56140180
>>56140228
Nevermind, found the pdf. I guess I will read it along with Kochans.
>>
>>56140228
>couldnt find the pdf online

i typed "the c programming language pdf" and found 5 direct links to a pdf in the first 5 results
you're retarded and this doesn't bode well for you and your ability to learn programming in any meaningful way
>>
>>56140261
Read through linux programming interface once you finish those
>>
>>56140217
Yeah, you need to understand it.
Take a piece of paper and try to work it out.

You'll improve your math skills.
>>
>>56140268
I just told you I found the pdf. Stop assuming shit before you meet people.
>>
>>56140277
Ignore him, /pol is strong today
>>
I feel like I'm shit at math in general but I'm understanding C# reasonably well.
If I'm truly shit at algebra, would I hit a wall at some point?
>>
>>56140272
Aight man, I will take it into consideration. Thanks.
>>
>>56140310
not for doing CRUD, GUI or web shit
>>
I'm using Python and trying to save some stuff in a dict for later look-up based on the first five strings in a string list.

Which is the better approach?

lookup_dict[tuple(my_list[:5])] = stuff


or

lookup_dict[','.join(my_list[:5])] = stuff


(the strings themselves can't contain commas)

The latter seems to perform faster for look-ups.
>>
>>56140384
The first one is cleaner, but both work. If you're worrying about the speed of dictionary lookups, you shouldn't be using Python but something faster.
>>
>>56140411
No idea but try to do the work on your list in a separate function.
>>
I wish Hiro had the balls to delete /pol/ again
>>
File: amada eats cheese.png (690KB, 600x653px) Image search: [Google]
amada eats cheese.png
690KB, 600x653px
>>56140452
/pol/ is a containment board and the most visible meme force on this website
deleting /pol/ means letting the beast out of it's cage
you think the /pol/ takeovers are bad now?
>>
>>56140452
>they have different opinions from mine, silence them!
>>>/reddit/
>>
guys


programming
>>
>Everyone can own a gun
>Help why are police using even bigger guns!?

If you want guns that's fine, but stop bitching about the militarization of your cops.
>>
>>56140423
if he's worried about performance (which he probably shouldn't) that's terrible advice, function calls in Python are VERY expensive.
>>
>>56140522
But that makes his code more readable and maintainable. But yeah, I thought instantly after posting that while it would incur no overhead in a compiled language, an interpreted language surely wouldn't work the same. Anyway why bother with Python if you worry about performance?
>>
I think I managed to lose my love for programming just in time to celebrate my graduation. Do I just kill myself now or what?
>>
>>56140663
Pick up a new language or start a new project you've never tried before.
>>
>>56140178
>I thought about naming the cover container like "card22cover" and the container below "card22"
Jesus christ no, use arrays or lists or something. I can't understand your question completely, desu. But it sounds like what you want is a 3d array like containers[x][y][cards]? Something like that, you figure it out.
>>
im fucking love programming
>>
>>56140411
The first one is cleaner, but both will do. But if you worry about the speed of dictionary lookups you should be using a faster language.
>>
>>56139943
What do you mean why? Status and skills are called during the character creation as well as the main menu. Character creation has a reset option so, without that the player could use reset and pop back to character creation. Unless you have a better way to go about it.
>>
/dpt/ - guns and politics
>>
How do we compete against Pajeet guys
>>
So a big part of my programming tests is to tell what given functions calculate, is there any trick to it or should I just go through them one by one, which is very time consuming?

f.e.
static int f(int m, int n) {
int i = m+1,
x = 0;
while(i > n+1) {
x = x+m+n;
i = i - i;
}
return x;
}

which is [spoiler](m+n)(m-n)[/spoiler], when I see the solution is always easy but I cant really do it on my own.
>>
how do you compare a symbol against a string in lisp? i'm doing
(eq some_symbol "TEST")
however it's not working -- should that work?
>>
>>56141070
Just compute a few iterations, maybe 2 maybe 3 for yourself and you'll probably see what it's computing
>>
>>56141082
(string= (symbol-name some-symbol) "TEST")
>>
>>56141082
ignore this! i found out you have to use intern
>>
>>56141082
use eq?
However it will return false since they are not equal
>>
>>56140963
>if a
>x = true
>else
>x = false

x = a
>>
How does Qt's QCoreApplication class work anyway? Been writing a small interactive interpreter but I don't know how to run it in an event loop, and the official tutorials and guides don't go beyond the most basic "how to write hello world" stuff.
>>
>listening to 8 hour workshop about ecommerce tool because we will soon implement it to replace hybris

Mixed feelings.
>>
>>56141150
Actually managed to get rid of most of them with a while loop.
>>
>>56141150
*Also... That's exactly what I was doing. I just couldn't find a way to reuse the logic.
>>
>wake up
>a retard responding with something wrong to your post in a dead thread
>can't give a timely rebuttal
>/dpt/ has gone full /pol/ again
>have to do actual work today to invent something that for some reason doesn't exist in your language

Fuck Thursdays.

Why can't the available libraries be convenient AND fast?
>>
File: 1465146905838.jpg (29KB, 476x543px) Image search: [Google]
1465146905838.jpg
29KB, 476x543px
>>56138414
Next thread will be maki, just you see!
>>
File: standards.png (24KB, 500x283px) Image search: [Google]
standards.png
24KB, 500x283px
>>56141510
ah yes I'm sure you implement it better than everyone else
>>
>>56141510
I don't know any convenient libraries
>>
>>56141510
>reddit-tier pussy arguments are "full /pol/"
God, you people are total weaklings.
>>
>>56141150
>x = foo != bar ? false : true;
>>
>>56141576
just because you can do something in one line doesn't mean you should
>>
>>56141576
>x = foo != bar ? foo != bar : foo != bar;
>>
>>56141589
You idiot, that's a joke
x = (foo == bar)
>>
>>56141551
There are no fast and convenient ETL libraries with the features I need. I even considered using Python just for the ETL, because Python has some good ETL libs, but they weren't as fast as what I'm doing because of RBAR.
>>
>>56141596
>x = foo != bar ? foo == bar : foo == bar;
ftfy
>>
>>56141589
>>56141596
>>56141599
Ya, I actually find code like this at work.
>>
>>56141567
It has nothing to do with the content or "pussy-ness" of the arguments; I like that kind of discussion, but /dpt/ ain't the place.
>>
>>56141615
I review code from the pajeetiest of the pajeets, and I've never seen them write anything quite that stupid.
>>
>>56141626
Have you seen Paki code?
public class XXXXX
{
// Some stuff from other people

public void tryThis( String s )
{
for ( int i = 0; i < numOfLetters; i++ ) // A loop to get the letters
{
if( s.equals( letters[i] )//Our letter must be equal to one of the letters
{
// I dont need to check if there are 2 of the same letter
// Because there simply arent

secretWord.length() = n;
int[] quantity = new int[n];

int a = 0;
if( a < n )// Using a loop and an array to count and store how many times a letter is used
{
quantity[a] = s;
a++;
}

updateKnownSoFar( s );

if( updateKnownSoFar(s) != true )
numOfIncorrectTries++;
}
}
}
}
>>
>>56141626
The person who wrote it isn't even a pajeet.
>>
>>56141641
>those braces at the end
don't care about the rest senpai
>>
>>56141641
I would bet my left nut that that's a first year CS student
>>
File: cs grad swapping expert.png (125KB, 813x600px) Image search: [Google]
cs grad swapping expert.png
125KB, 813x600px
>>56141672
You never know.
>>
Prelude is really really shit
Also kind of wish type classes had better overloading

>>56141527
This thread just got a 100 more posts to go
>>
Working on a realtime chatroom, using a NoSQL backend:

https://www.raskie.com/on-notice/
>>
>>56141693
What's the problem here? That he didn't figure out how to access an element of an arraylist properly or wut lol
>>
Looking to start learning java but can't find the list of good sites to use for learning, like codecademy but free/cheaper and also the programming challenge list of things I can try to make. Someone hook me up?
>>
>>56141850
I had like 11 labs to do in CS 21 that taught me java

berkeley and some other unis have their programs open to the web, so maybe just do that? The labs are very easy but have some progression at least
>>
useless NEET here. want to teach myself to program but get endlessly distracted by video games and porn etc

worth buying a $300 thinkpad with nothing but an IDE, a textbook and google and removing myself from temptation? or will i suck at programming if i dont immediately love it
>>
>>56142188
Why would you waste $300? Do you not already have a computer?

If you don't have the resolve to just do it, then you're not going to be able to learn on a barebones laptop sitting next to the porn and game machine anyway.
>>
>>56142188
maybe

I have a craptop and a very expensive laptop and never use the shit one because I just hate it even though I theoretically should (to increase productivity)

I find that the only real changes you make in your life don't come from extreme decisions, they're from small ones that you don't even have to dedicate yourself to but just become a part of you over time

instead of making it a big thing in your mind you just might need to take it down a few notches in your mind and just start somewhere
>>
>>56142188
Download Haskell Platform
>>
>>56140472
not true
/pol/ contaminates every board, back when /new/ was deleted mods were doing their job to ban /new/ behavior
>>
Is anyone familiar with the GHC source?
Where is Type defined?

>>56142343
mods are doing their job, this thread was at 303 ish all the way back here >>56141527
>>
>>56142212
have a gaming pc and have passive income (enough to cover living expenses + about $200us spare per month)

the idea was take the laptop elsewhere so i can actually focus
>>
>>56142288
He's neet, he needs something that gives him a good chance of getting a job.
Haskell is not a good choice for that.

Instead, he should learn piss easy shit such as Java, get a job and then further educate himself from there.
>>
>>56141527
Lets hope!
>>
Got a sqlite db file of towns with weird duplicate entries; some will have the plain old town name and others will have town name + " Fd" or town name + " Fpsa", etc. I know it's possible to do stuff like mass delete rows with a python script/plain SQL, but is is possible to mass edit out those odd parts from each record containing " Fd" or " Fpsa"?
>>
>>56142796
It's possible to do almost anything in almost any language
>>
>>56142836
ebin 5/5
>>
>>56142796
To remove something like Fd:
UPDATE CITIES
SET name = replace(name, 'Fd', '');


To remove all rows with Fd at the end of the name:
DELETE FROM cities
WHERE name LIKE '%fd'
>>
>>56142894
I did a google search for editing rows before I initially posted and saw some SO question where the responder was going "THAT'S NOT SAFE" - I guess that's not the case?

Thanks.
>>
>>56142974
Well, any time you do an UPDATE/SET outside of a transaction, you're modifying data without the chance to do a rollback or otherwise retrieve that data without a backup.

I typically comment out the UPDATE/SET and do a SELECT * WHERE so I can see exactly what's going to get modified.
>>
>>56143014
Gotcha. That helps to know for the future.
>>
File: 1470482481802.png (432KB, 527x593px) Image search: [Google]
1470482481802.png
432KB, 527x593px
Which program language should I learn to impress cute anime girls?
>>
>>56143045
Haskell
>>
>>56143045
It's not about the language you know. It's how you wiggle it.
>>
>>56143045
GHC Haskell
>>
File: wejustdontknow.gif (995KB, 250x250px) Image search: [Google]
wejustdontknow.gif
995KB, 250x250px
>optimising python script
>test dataset run
>180 seconds
>implement caching yesterday
>120 seconds
>nice, but probably someone already implemented caching better
>install cachetools
>replace my caching with cachetools caching
>220 seconds
>>
>>56143045
Scheme, specifically r6rs Scheme
>>
Does Microsoft really expect me to use CamelCase for classes and methods in C#?
>>
>>56143436
You can use whatever casing style you want, moron.
>>
>>56143436
That's not camelCase, that's PascalCase
>>
What's the reasoning behind PEP/style manuals recommending four spaces instead of tabs for indenting?
>>
godIHateCamelCaseItsSoDamnUglyAndYouCantEvenReadIt
>>
File: c.png (266KB, 776x508px) Image search: [Google]
c.png
266KB, 776x508px
Hello, I'm teaching myself C through the power of the internet and I got both of these books yesterday.

Which one should I read first?
>>
why do people read books to learn programming languages

it's like reading the entire service manual on a car before touching it

just learn how to drive the damn thing and worry about the finer points until you notice a deficit in your knowledge
>>
>>56143693
and *don't* worry, I meant to say
>>
>>56143693
Cuz PLs ain't cars.
>>
I guess I'l crosspost this to here. On the off chance some decent programmer accidentally stumbled into dpt
>>/vg/152157228
>>
>>56143847
lrn to crosspost ok

>>>/vg/152157228
>>
>>56143847
>>56143859
Ask /biz/ they know all about kneepads so they probably know about these too.
>>
>>56143823
you wouldn't compile a car
>>
>>56143847
you could use those gel things that lay at the base of your keyboard and you rest your hand on
theyre quite cheap but I dunno if theyre any good or just impede you
>>
>>56143847
I have never had wrist issues
Maybe you should take this up with /fit/
>>
File: 1468783746791.png (55KB, 217x190px) Image search: [Google]
1468783746791.png
55KB, 217x190px
>>56138630
>>56138598
>programmer from memeland
>thinks of how to meme the programming community as hard as possible
>finds some shitter made a super meme-y design principle with no real use other than complicating things
>copy the language you think has the most longevity and add the design principle ontop under the guise of making it more easy to write code that way
>push for it super hard, ignore criticisms from major forces in the industry
>years later you find yourself bored of your epic troll
>decide to make a new version which throws away practically everything the language had that was added ontop of the original language
>people think your language is good now
He's an amazing person and an inspiration to us all.
>>
>>56143591
Because you can change the style of tabs from 8 spaces to n spaces, then you might go to another editor that automatically converts them to spaces, or you might intermix spaces and tabs because you can't immediately tell what's tabs and it ends up a fucking mess because significant whitespace. What a joke.
>>
>>56143925
bjarne is a magician
>>
>>56143045
Haskell
>>
>>56143847
Get off the computer once in a damn while. It's almost impossible to get RSI if you take proper precaution.

Stop using the computer for the day if your wrists hurt, take frequent breaks to just walk around or whatever, do some sort of exercising to strengthen wrists like lifting of biking or calisthenics... But most importantly, HAVE GOOD POSTURE.
>>
>>56143942
MLfag, does oh camel have runtime polymorphism?
>>
What's a good programming language for an absolute beginner looking to go to college to become a computer engineer? C right?
>>
>>56143979
unironically Haskell
>>
>>56143979
BASIC, as name suggest
>>
>>56143992
why?

>>56143993
I don't believe you.
>>
File: 1463174335918.jpg (98KB, 865x924px) Image search: [Google]
1463174335918.jpg
98KB, 865x924px
What functions? WHAT functions? Those are subroutines gee. Always have been, always will be!
>>
>>56144022
Those are methods
>>
>>56143979
>college to become a computer engineer
This could mean a bunch of different things.
General computer science degree? Learn Java.
But if "computer engineer" means something closer to electronic engineer, robotics, nanotechnology or whatever, then learn C.

Different countries and even schools have lots of different names for the various computer related programs so it's hard to know for sure without looking at the specific program.
>>
>>56144047
Sorry to pop your bubble, SIMULAbro, but no. Just no they aren't. Really not.
>>
>>56143979
Read what you're gonna learn in class later so you can focus on getting credit. More time for harder courses.
>>
>>56144017
It's a really good language that will teach you functional programming and pure code
>>
>>56144060
The program is called computer engineering and it's in the US. From my understanding it's half computer science and half electrical engineering.

Here's the relevant info about the program

>The program emphasizes a number of areas of technology including computer architecture, logic design, very large scale integrated circuit design and testing, software design and analysis, operating systems, computer system design, networks, compilers, databases, digital signal processing, and computer vision.

>>56144087
How is that related to computer engineering?
>>
>>56143979
Pascal.
>>
>>56143979
Obviously C++. You can invest countless years of learning into it.
And if you are a really good C++ programmer, you will understand any language and concept with ease because at that point you will have understood what developing proper software is all about.
Only a different style, such as functional languages (eg Haskell) would add more to your mental world.
>>
>>56144152
>because at that point you will have understood what developing proper software is all about.
More like you've been torturing yourself for a long time for no reason.

Writing C helps you understand what developing software is about.
>>
>>56144132
Definitely sounds like a C-heavy program. Software design and analysis might use some OOP language, computer vision is probably python? Databases is of course some SQL language. The rest should be C (or is strictly hardware stuff).
>>
Code While Standing
>>
>>56144191
>C++
>torture

The fuck are you on about? Make some points.

>C
There is no reason ever to use C when you can use C++.
>>
>>56138602
t in cond blocks are a catchall.

So if it is not looking at a null or an atom, it assumes it is a node and will call itself on both child nodes (The car and cdr), and append the results of the two.

This will continue to recurse until it looks at an entire tree.
>>
>>56144281
automatic arrays
>>
>>56144281
Practically every feature in C++ is bad. It's the C part which teaches you understand software.

This isn't a new topic and most people know this shit by now.
>>
>>56144323
Have you ever done anything in C++? Doesn't seem so.

Do you mean VLAs?
Do you mean compile time size restrictions for non dynamic arrays?
What the fuck are you trying to say?

I swear i thought people on this board were actually working software developers with deep knowledge about various stuff.
Like /plg/ on /fit/ (if you ignore the shit posting trash).
>>
>>56144356
arrays with automatic duration
>>
>>56144328
Kek.

Please go on c-plusplus.net/forum, open a thread and try arguing what is bad about C++. I'll participate.
You can post in English, no one minds.

Also, bring everyone from this board too, so the kids here can finally meet some actual developers :)
>>
>>56144365
Can you formulate a sentence?

Do you want to say that you dislike the fact that things on the stack are discarded as soon as the scope is left?
Do you even know the difference between stack and heap?

Kek, this board
>>
>>56143693
>why do people read books to learn programming languages
To get a deep understanding of the language and programming in general. You'll have to read SOMETHING anyway. Documentations, tutorials, etc.
Might as well read a book if it's well written. That's especially necessary for hard languages like C where you need to understand some theory about registers and stack and heap and so on. In higher level languages like Python though, yeah a tutorial online is good enough.
>it's like reading the entire service manual on a car before touching it
I sure hope you're aware that driving lessons consist of theory and practice, right? I mean, you do know traffic laws, right? You don't have to read an entire book before you start programming. Normally you'll read a little and then try it out.
>just learn how to drive the damn thing and worry about the finer points until you notice a deficit in your knowledge
You mean you can fix those deficits by... reading a book? Fascinating
>>
>>56144356 >>56144393 >>56144418
you're new here, aren't you?
why are you so irritable?
C++ is not a replacement for your ex

for posterity, please be advised that not all platforms use a stack and heap


is it worth using C++ over many languages?
yes

is C++ a good language?
no
>>
>>56143955
yes, although not the same way as other languages. it doesn't actually store the types at runtime but there is still type information that must be present at runtime (i.e. `A doesn't compile the same way as A because it can take on multiple types at runtime so it must be known by the same unique name globally, which is used for dynamic type checks). I'm not sure about how objects work entirely, but I imagine it's somewhat similar
>>
>>56144393
Ok so how about you define what you think 'developing proper software' is. Because it's certainly not what I see C++ developers doing. The amount of complexity in the user facing parts of C++ programs is massive. While C developers are extremely concise, efficient, stable and easy to interface with.

Just the recent developments of C++ should be telling because the committee is effectively admitting the faults of the language. Andrei Alexandrescu is supporting D for a reason. C++ 11 and above are moving away from past decisions. So how can you possibly defend every feature in the language and claim it teaches you good practices when there's no consistency within your group. You're basically telling anon here to go fuck himself with the nearest phallic object. Maybe he likes that like you do. But for the larger majority of people who follow that course of action they get nothing but pain.

So a good question is what's good about C++? Are you writing procedural code or OOP? Some mix? Are you satisfied with your compile time and iteration process? When you do some data restructuring how many code changes are you making? Do you do a bunch of upfront design?

There's so many questions I can ask you to tell if you're a good programmer or not. But practically all of them can be generalized as if it's a C++ feature C doesn't have and you're using it. It's likely bad.

Things I don't mind are namespaces, member functions, single inheritance. They're superfluous features you may enjoy because of how terrible IDE's are. But that's about it. Compared to every other language I know C++ produces poor code, the only reason I'm using C++ is because of how the industry is. There's not many good options and it interfaces with C pretty OK.
>>
>>56144548
>The amount of complexity in the user facing parts of C++ programs is massive.
I meant to say in the user facing parts of C++ API's. C++ devs can take the most simple thing and turn it into a nightmare to deal with. And they often do it less effectively than a solution I'd write myself because some of them don't even do profiling on their code. They have this weird obsession with templates and move semantics as if that's what anyone uses to make fast code.

I don't get how there can be an entire generation of programmers who don't know how to write programs. And if there's any doubt in anyones mind about that look at the absolute catastrophe that is programs written in C++. They're slow crash prone messes with incredibly poor UX and often have arbitrary constraints on their functionality.
>>
>>56144498
Make some actual points or shut the fuck up already.
How are you in a scientific job but cannot formulate arguments when you are trying do discuss something?
>>
>>56144704
>Make some actual points
>ignores the major response
>doesn't realize burden of proof is on him to show that C++ warrants using.
Nice.
>>
File: Lucy0930.jpg (115KB, 576x361px) Image search: [Google]
Lucy0930.jpg
115KB, 576x361px
Are sneks good programming buddies?
>>
>>56144756
>python
No.
>>
File: 1454010683342.png (10KB, 122x120px) Image search: [Google]
1454010683342.png
10KB, 122x120px
>>56139200
Quite a lot, though you can configure OSes to act a certain way to bridge the gaps. For example, I dual-boot and use Windows a lot like a Linux, though it took some setting up.

My tools are cross-platform, so I generally set those up the same. I put MinGW on my path, get git, and use cmd more often than mostly anything else... And when the lack of readline bugs me, I drop to MinGW bash.

I have Ext2Fsd to mount my Linux partition as readonly so things like SSH keys and configuration can be used across both platforms, and I use NTFS symlinks (Which you can make on Windows, and read with ntfs3g) to get some of these configurations set up.

Also, on the Linux side, my home folder is largely symlinks to locations in my Windows Library folders, so regardless of OS, I have access to the same stuff. I also use dokany for a lot of the things I use FUSE for in Linux (SSHFS, for example), but it doesn't have nearly as many options as FUSE proper.

The result? Basically a very OS-agonistic environment where you can switch between two OSes with very few problems. The biggest quirks are when some configuration needs to update file paths. (Though MinGW SSH hates ProxyCommanding remote "ssh -w" on Windows, and that dies a horrible, awful death)

There are still a few walls that Windows AFAIK can't do though. I just try to work around those with a VM.

I probably use Windows about 5% of the time for my development, and while it's not perfect, I can get up to speed very quickly.

tl;dr - It affects a lot, but it's not impossible to set it up to do a lot of similar things.
>>
>>56144756
snakes are better than gophers i guess
>>
>>56144770
>>56144792
I mean actual sneks, not memelangs
>>
>>56144704
What the fuck is a scientific job and when did I say I was in a "scientific job"?

Why would I make an argument? I'm not trying to convince you, I'm trying to insult you. You don't belong here and don't have the intellectual capacity to become a better person.

C++ is a shit language with a god awful syntax, a shitty type system when it comes to polymorphism (it basically doesn't exist in any sense at runtime), and the ONLY reason C++ is used is for performance concerns. That's it. People only choose to use it because they want higher level features without losing too much performance. Nobody picks C++ because they like it.
>>
>>56144756
only if it doesn't stick out of my pants
>>
>>56144735
>doesn't realize burden of proof is on him to show that C++ warrants using.
...thats not how burden of proof works. burden of proof means that you cant assume P or ¬P until proven
>>
>>56144548
Your argument is basically that you can produce shitty code with C++ and that's why it's bad.

You are also telling me that the fact that C++ keeps receiving updates and improvements makes it bad.
Which is bullshit.
You are also trying to make it seem like the new standards are basically reversing the entire language. Which is, again, bullshit.

I have heard this argument so often, its not even funny anymore.

You see, if i was only browsing /g/ for personal contact to other "developers", i would probably totally buy what you are writing and assume that only idiots that never got the bigger picture,

But that's not the case - i have been browsing forums, where people that have been in software engineering since 30+ years participate. People, that are literal nerds and do nothing else their entire life than reading books, programming even in their spare time and learning about new technologies every day.
They know of so many concepts and technological details of so many different things in the world of IT, that reading through their posts is always a huge delight.

Right here, right now, you and I both know that if you were to argument about "C++ is bad" with them, they would crush you so hard you would leave out of shame and never look back.
>>
Haskell is the minimum acceptable language these days

(OCaml had its chance and blew it)
>>
>>56144876
You're so fanatical and crazy in your delusions of language grandeur that you've surpassed even Python users
>>
>>56144874
>new language comes out
>welp, now we should rewrite all our code in it, nobody has proven that we shouldn't use it
>>
>>56144835
>I just want to insult you
>I don't want to make arguments
>You are not smart enough to be here, here, where people just insult others without making arguments

>they only choose it because it has better concepts at better speed
>>
>>56144876
And I know people who have been programming for 50 years who think C++ is an atrocity that has retarded progress for decades.
>>
>>56144907
I'm not fanatical or delusional at all. I have read countless arguments from people that knew more about software development when they were 16 than you currently do and probably ever will.

I know you cannot process the idea that there actually are people out there that are insanely knowledgeable and that's why you try putting it off.
There is no wonder you have doubt about it, considering the average level of expertise on this board.
>>
>>56144986
I know you're worried that you might have wasted your life so far by obsessing over C++, but seriously, take a step back and look at how buttblasted your posts are.
>>
what's an easy to max out cpu usage with a few lines of code in C++?
>>
What are efficient alternatives to C++, that are not low level like C ?
>>
>>56145053
while (1) { malloc(sizeof(int)); }
>>
>>56145053
for(;;)

I bet no one can golf it harder.
>>
>>56145057
>efficient
What do you mean by this?
>>
>>56145057
Rust?
>>
>>56145095
i mean runtime efficient, not necessarily coding efficient
>>
>>56145057
Java, C#
>>
>>56145011
Whatever. I have read countless discussions about people clashing into that community, trying to trash talk C++.
I was reading it neutrally every time and yet i was always convinced by logic and sound arguments.

What are you even trying to argue here? C++ is bad? What a weird statement. You cannot win it. Go try the discussion over there, im telling you that you wont make it anywhere.

Different types of software have different langues that excell with them. I wouldn't ever recommend anyone to use C++ for weblogic. And so on and so forth.

So, really, it's you that is being fanatic by trying to tell me (and others) that the language itself is (always and everywhere) complete shit.
>>
>>56145057
C# or Java
>>
>>56145108
Isn't Rust just another meme language that noone takes seriously?

>>56145117
>Java
>efficient
>>
>>56144919
>welp, now we should rewrite all our code in it, nobody has proven that we shouldn't use it
I never claimed that.

>makes an obviously wrong statement
>too pathetic to admit youre wrong
You're a retard
>>
>>56145108
Im the "hurr durr C++" fanboy and i must admit, Rust is quite awesome.
>>
>>56145083
this hogs ram more than anything else but neato
>>
>>56145126
It is used in many areas where it is inappropriate. Systems programming? Use C, or maybe Rust. Application development? Use Java, or C#. Webdev? Use Scala, or Python, or Clojure.

Game dev? Sure, C++ might be a good choice, but C# is fine for most projects too.
>>
File: quality dpt discussion.png (61KB, 485x675px) Image search: [Google]
quality dpt discussion.png
61KB, 485x675px
>>56144944
Yes, if someone comes into your home and starts wrecking shit and asking why it isn't built to their liking, you don't spend hours arguing over the origin of property rights, you tell them to fuck off, you call the police or you get violent. Arguing in that situation is not intelligence, it's stupidity. It's being blinded by academics to the real world of values and people.

There is no reason I should have to argue with you. You've just come here and posted some of the most bullshit, condescending trash I have ever read. You asked, in a completely reaosnable post, "why anyone would use C over C++". You get, among other things, DOWNSIDES TO C++ (if you can imagine such a thing!)
What is your response? You go fucking mental.

Where do you get off on acting like you're the fucking Jesus of programming here to preach the Language of God, but actually you're just really humble because there's these senior developers who agree with you?

You fucking drama queen. Oh, but wait, there's more!

>I have read countless arguments from people that knew more about software development when they were 16 than you currently do and probably ever will.
>I know you cannot process the idea that there actually are people out there that are insanely knowledgeable and that's why you try putting it off.
>There is no wonder you have doubt about it, considering the average level of expertise on this board.

You are, quite literally, the WORST poster in /dpt/.
You have set a new fucking record.
I have never seen this level of trash before.
I'd rather have the idiots who wasted 100 posts on fucking political discussion, because at least they're not nearly as much of a fucking cunt.

I hope the (You) was worth it Bjarne

>I was reading it neutrally

Yeah, sure you were. And you just fucking sit there observing arguments waiting for someone to attack the holy fucking grail of amazing languages

Two +s have been added to your account


C++ is still shit
>>
>>56145135
>Noone

You mean only /g/
>>
>>56145126
I think you're less neutral than you believe. Pro-C++ arguments are "logic and sound arguments", anti-C++ arguments are "trash talk", yeah real unbiased, fanboy.
>>
>>56145230
I mean nobody besides hip hackernews coders

Or maybe i just live in a stale community down here
>>
>>56145229
Bjarne wishes he were Dijkstra. He's not even close.
>>
>>56145135
Albeit far from perfect, the JVM is a magnificent piece of engineering.
I'd kill to have their GC in my Lisp compiler.
>>
>>56145092
That doesn't even work. You need the semi at the end

for(;;);
>>
>>56145092
>>56145322
int main(){for(;;);}
>>
>>56145229
Okay, wait, there actually is a legit reason to use C over C++: preference.

True, i cannot argue that. Everyone has their own preferences, and if someone loves the way code is designed with C, then you cannot argue against it, at all.
In fact, i never claimed C to be shit.

I was infact baited by your(?)/the response to my original post.

You however, are trying to claim that C++ is shit. And by all means of logic, arguments and facts, you cannot win this point. Sorry.
>>
Ny tråd når? Jeg vil norskposte
>>
>>56145370
Actually, I take it back

>>56145053
If you want to max out CPU usage with only a few lines of C++, just compile a C++ program

>>56145379
It is
>>
>>56145248
No. Trash talking is trying to argue that "C++ is shit".

Why is it trash talking? Because it's someone that talks bullshit aka trash.

Are there downsides to C++? Sure.
Is C++ shit?
No.

Think about the difference of these two statements a little and you will realize that i am right.
>>
>>56145379
Go home, Bjarne. You've admitted that logic, arguments, and facts will not sway you, so there is no reason for you to linger here further.
>>
>>56145398
You mean that, in this very thread, there have been arguments full of logic that proved that C++ is shit?
Just trying to confirm that we are on the same page here.
>>
>>56145393
So arguing something that you disagree is "bullshit" and "trash talking"?

That's... not how you win arguments. You don't get to write the other side off just because you disagree with them. You've already stated that you don't care how much logic or how many facts are involved.
>>
>>56145426
No, stop putting words in my mouth.

You have stated that you will not listen to such arguments, so talking with you further is pointless. Please leave and stop shitting up the thread.
>>
>>56145452
No, you have still not understood the point.

I don't know how to make it much clearer, ill give you a last shot, here, let me formulate it again:

Saying that a langue, that has been used by millions in millions of projects, with people that have incredible knowledge in IT, is SHIT aka not good in any way, is TRASH talking because it is making a ridiculous statement.

Saying, however, that certain features of a language are not optimal / could use improvements / are solved in a better manner in a different language is perfectly fine and up for a proper discussion.
>>
>>56145542
>>
>>56145469
Where have i admitted that logical and sound arguments aren't important / persuasive?
>>
>>56144786
Thanks for your answer. I understand very little of what you told me, but I really appreciate the effort.
>>
>>56145537
Argumentum ad populum
>>
>>56145570
Here >>56145379
>>
>>56145593
Nothing in there says anything even remotely close to that.

Quote the text passage that you missread.
>>
>>56145583
Not at all, no.
>>
>>56145607
>And by all means of logic, arguments and facts, you cannot win this point.
In other words: even if some proves that C++ is shit, it won't be good enough for you.
>>
>>56145655
No, it means that if you were to use all the available logic, arguments and facts that you could compile, you still wouldn't make the statement true - simply because there aren't any that could make such a ridiculous statement objectively true.

I mean, look through the thread.
>>
>>56145719
Then it should be simple for you to produce a proof that C++ is not shit, and I mean without appeals to authority or to popularity.
>>
>>56145582
Ah, what I meant to say is that it's basically just a matter of configuration.

While there are limitations to OSes, they aren't generally fatal flaws.
>>
>>56145745
It's a language with little restrictions. It can be rather low level but also pretty abstract.
It doesn't dictate the programming paradigms, allowing for the programmer to freely use a mix of the best of many worlds, resulting in very solid software design.
It has support through many top libraries, such as boost.
It is continuously worked on and improved and itself a very mature language, that has gone through years of polishing.
It's high-performance.
>>
>>56145858
Not a proof of non-shitness.
>>
>>56145995
K
>>
>>56138577
> reading a book that literally teaches you how to write compilers
> dur scheme is an interpreted language

literally the first implementation of scheme was a compiler you dumb fucker
>>
>>56138577
>>56146218
also it's pretty easy to use a different language if it matters that much to you
>>
In python, can you .pop multiple elements at once?

Make a list like this
[1,2,3,4,5]

become that
[3,4,5]

and return
[1,2]
Thread posts: 328
Thread images: 34


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