[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: 339
Thread images: 31

File: best girl.jpg (83KB, 1280x720px) Image search: [Google]
best girl.jpg
83KB, 1280x720px
What are you working on, /g/?
Previous thread: >>61175574
>>
>>61183729
Reading
>>
first for fuck an*me
>>
>>61183740
good lad
>>
>>61183740
>!int
It's shit. That's as ugly as t@ype in fucking ATS.
>>
how the fuck do I edit natively supported languages' lexing rules and keyword groups in notepad++
>>
File: 1495641113909.png (72KB, 1016x98px) Image search: [Google]
1495641113909.png
72KB, 1016x98px
>>61183764
Can't go uglier than this (pic)
>>
If pickle and shelve is so vulnerable why include them with python?
>>
File: thats_encouraging.png (58KB, 1351x575px) Image search: [Google]
thats_encouraging.png
58KB, 1351x575px
>>61183729
>Doing online gigs
>Lots of clients want "wordpress developers"
>"Might as well learn it"
>Shit is bloated as fuck
>Loads tons of unecessary stuff by default
>Retarded way to organize your project
>Even the documentation itself have workarounds (I'm not shitting you, pic related)
Why is this piece of crap so popular?
>>
>>61183865
The installation was really easy back in the day, so people used it and the rest followed
>>
>>61183865
Same reason stuff like visual basic and .net are still around. When a technology gets a decent amount of momentum, even when it doesn't deserve it, that momentum will inevitably keep it alive for years and years to come.
>>
>The algorithm was originally attributed to John Carmack, but an investigation showed that the code had deeper roots in both the hardware and software side of computer graphics. Adjustments and alterations passed through both Silicon Graphics and 3dfx Interactive, with Gary Tarolli's implementation for the SGI Indigo as the earliest known use. It is not known how the constant was originally derived, though investigation has shed some light on possible methods.
> 0x5f3759df

Who and HOW did someone find this magic number? This is like twiliight zone of programming and math.
>>
In Elisp, how can I give a variadic function a list of args?
(start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS)

I have a list of args that I want to give to
start-process
, but I can't figure out how.
>>
>>61183865
> Why is this piece of crap so popular?

Everyone uses it because everyone uses it.
And everyone uses it because everyone uses it.

It's easy -- You can assign an intern to manage it, no need to hire additional staff
It's cheap -- You don't have to pay someone to create a website for you
It's social -- With a like button next to everything people advertises for you
It's safe -- It's "industry standard" so it's "perfectly secure".
>>
>>61183939

(start-process "my-shitty-process" "*buffer-full-of-images-of-people-sucking-cocks*" "program-that-manages-my-homo-pictures" 1 2 3)
>>
Anyone have experience with OO languages like Smalltalk?
And if so which one would you recommend purely for self-education purposes?
>>
>>61183988
>OO is stupid meme that could have only been invented in California
-- Dickstra
>>
>>61183936
I really believe that this should be investigated further.
>>
>>61183936
The source code for Quake III was not released until QuakeCon 2005, but copies of the fast inverse square root code appeared on Usenet and other forums as early as 2002 or 2003.[1] Initial speculation pointed to John Carmack as the probable author of the code, but he demurred and suggested it was written by Terje Mathisen, an accomplished assembly programmer who had previously helped id Software with Quake optimization. Mathisen had written an implementation of a similar bit of code in the late 1990s, but the original authors proved to be much further back in the history of 3D computer graphics with Gary Tarolli's implementation for the SGI Indigo as a possible earliest known use. Rys Sommefeldt concluded that the original algorithm was devised by Greg Walsh at Ardent Computer in consultation with Cleve Moler, the creator of MATLAB.[20] Cleve Moler learned about this trick from code written by William Kahan and K.C. Ng at Berkeley around 1986[21] Jim Blinn also demonstrated a simple approximation of the inverse square root in a 1997 column for IEEE Computer Graphics and Applications.[22] (see the comment section at the end of fdlibm code for sqrt[23]).
>>
Is it normal, that you don't know what to do, or even just watch the wall while trying to do your work assignments??
>>
>>61184022
>>61184010
How can the history of computing be so vague and untracable? I thought everything should be logged somehow whenever someone invented something big and important. This is all fucked up. This all should be traceable back to the roots, its not like we are talking the history of ancient pyramids where the information is not passed in strict digital form like the history of computing.
>>
>>61183988
Io is a more modern language in the vein of Smalltalk/Self

http://iolanguage.org/

It's in the Debian repos too
# apt-get install iolanguage
>>
>>61184046
>How can the history of computing be so vague and untracable?
The history of computing is well documented.
>>
>>61184046
Money ruins everything.
>>
>>61183729
Cards Against Humanity as local network game
It's a project for my Java course at my uni and we have to do it in Java
>>
>>61183936
Isn't there an explanation on wikipedia about why it works?
>>
>>61184088
fuck this gay Earth
>>
>>61183988
I wrote a bit of smalltalk with Pharo. The smalltalk environment is worth checking out at least once
>>
is OCaml a comfy language?
>>
>>61183729
desuwa best girl
>>
>>61184159
No, i ts ugly as sin.
>>
>>61184170
2bh ebin(a) was the best girl
>>
>>61184159
It's a bit bumpy :DDDDDD
>>
File: 1494809577339.png (122KB, 960x653px) Image search: [Google]
1494809577339.png
122KB, 960x653px
>>61184183
Fugg
>>
>>61184134
i thought is was pretty cool and shows you quite a few things we still do not have in modern operating systems. I.E. full version controlled environment, serialisable memory deserialising on startup, consistent message passing architecture on every object in the system.
>>
>>61184159
yes its worth checking out. nice consistent lang. also check f# if .net is your thing
>>
>>61184196
>full version controlled environment
Freebsd snapshots?
>>
>>61184206
>.NET
redflag
>Slow and .NET
Dropped
>>
>>61184217
get a job kid, and get out of your mothers basement
>>
>>61184212
maybe similar but it does it by default and encompasses your ram too.
>>
>>61184280
Learn to poo in the loo, pajeet.
>>
>>61184159
It's lit af
>>
>X11 is garbage collected
>>
>>61184311
my favourite toilet is your mothers mouth.
>>
>>61184343
wayland desu
need to start working on my WM
>>
>>61184351
Got'em
>>
>>61183729
from time import strftime as gtime
from random import * as rand
class Obsrvx:
global offset, PWD
PWD = "fuck_you_dumb_frogposter"
def __init__(self):
rand.seed(int(float(gtime("%S"))))
offset = rand.randrange(0, 1024)
def obsrvx():
file = open("dbinfo.dat", "w")
file.write("")
for i in range(0, 1024):
if(i == offset):
file.write(PWD)
else:
for j in range(0,len(PWD)-1):
file.write(ord((i+j)*rand.random()))
file.write("\n")
file.flush()
file.close()
def gobsrvx():
file = open("dbinfo.dat", "r")
ret = ""
i = 0
line = file.readline()
while(line != "" && line != "\n"):
if(i == offset):
ret = line
line = file.readline()
i += 1
file.close()
return ret

:^)
>>
File: 1466422342777.jpg (246KB, 643x960px) Image search: [Google]
1466422342777.jpg
246KB, 643x960px
>>61184280
>>61184351
>>
>>61184062
Omg thats hideous
>>
>>61184427
Some day you may realize how retarded you are. In the meantime, welcome to 4chan!
>>
>>61184458
Only retards call others retards.
>>
>>61184559
t. retard
- retard
>>
>>61184159
>end
>no native thread support
>having different operation for summing integers and floats
>no unsigned int
>number values are boxed
>only 64bit float
>only one int type
I have no idea why this shit is more popular than SML.
>>
What programs have you been asked to develop at your workplace? I'm looking for a job, but all the one's I've seen ask for 4+ languages, and don't state what they actually need
>>
File: rack.png (614KB, 1411x485px) Image search: [Google]
rack.png
614KB, 1411x485px
racket's name is racket
racket symbol is basically just pepsi flipped/rotated with an extra line
pepsi sponsors tennis
pepsi actually has a patented tennis racket
drracket is a weird ass name; dr pepper reference?

what is going on here? are the racket devs just that pepsi obsessed? tennis obsessed? both?
is racket... a pepsi advertising conspiracy?
>>
>>61184684
It's probably some autistic joke.
>>
>>61184663
Nothing difficult, really. You don't need to know languages, you need to know how to program and how to use Google. Earlier this year I mainly used ruby and javascript/react for a pretty simple internet site. It was the first time I've ever used ruby. Last month I've been using python to automate some document processing. I honestly don't know why I'm getting paid at this point, since a monkey could do this job.
>>
>>61184663
I'm an Android developer, so mainly Android apps.
>I'm looking for a job, but all the one's I've seen ask for 4+ languages, and don't state what they actually need
Doesn't the title of the job offer give you enough information?
>>
Front end web dev master race reporting in. About to start a contract with an airline company's special projects division tomorrow. Salary is >200k Aus dollaroos.

>Buildan web apps in React that run better than 99% of native mobile apps, from the browser.
>Using AWS for machine learning, image recognition and whatever I want 'as-a-service'
>Backend? Nah nigga, we only do Serverless functions. Fuck dealing with backend devs.

Web development in a golden age right now. Pajeet only hates javascript because his shitty job at some offshore agency only does Wordpress sites. Wordpress is for nigger developers and nigger businesses.
>>
>>61184941
t. retard
>>
>>61184958
hes AUS so thats a given.
>>
>>61184979
You're right, my bad.
>>
File: straya.png (86KB, 500x360px) Image search: [Google]
straya.png
86KB, 500x360px
>>61184941
These damn 'strayans don't even need a flag to assert their dominance in shitposting.
>>
Anyone know if there is an eventmask for when the window is closed/requested to close in XCB?

uint32_t eventmask             = XCB_CW_EVENT_MASK; 
uint32_t eventvals[] = { XCB_EVENT_MASK_EXPOSURE | XCB_EVENT_MASK_STRUCTURE_NOTIFY };


structure notify is just for when the window is resized, but doesnt check if the window is requested to close (the exposure mask is not helpful either)
>>
>>61184917
Nope, they only say 'programmer' or 'system administrator'
>>
>>61185123
Does the job offer state the company? If so, you can check out what they specialize in.
>>
In c++ is it safe to say that in all { } blocks that variables made in there are defined only in that scope?
>>
>>61185159
no
>>
>>61185159
It all depends on the context.
>>
Even after seven years of development Rust still feels very rough. I don't know how I manage to keep bumping on things that are dead simple and yet not implemented. I must be a pretty shit programmer.
>>
>>61185197
Implement on your own: the old school way
>>
>>61185197
No, rust is just shit.
It unironically still doesnt have proper strings.
And then theres shit like .unwrap
>>
>>61185215
I'm not going to spend time learning Rust, then the Rust code base and then spend more time implementing slice patterns before finding out whether Rust is worth learning.
I like Rust a lot, it has a lot of features that I came up with on my own while thinking about programming language design, but I'm really not sure it's worth spending time on yet.
>>
>>61185138
Thanks for the tip, I'll do that!
>>
>>61185197
Like what?
>>
>>61185311
Right now it's slice patterns, I wanted to use them to do pattern matching but you can't do that yet. Rust devs have been talking about implementing them for two years now.
>>
>>61183740
Wow, looks cancerous.
>>
>>61185341
I doubt they'll ever implement that. I feel like the project is stagnating.
>>
>>61185432
Gotta keep that CoC up to date, and make sure theres no bullies making people feel bad :^)
>>
>>61185432
Really? What makes you say that? Are you close to the development team?
>>
>>61185446
They don't mind directly bullying people with different opinions though:
https://github.com/rust-lang/rust/issues/41646
>>
I want growable allocator that I can initialize, use and then just free the allocator in the end.
The allocator should support freeing and allocating custom sized objects.
I will build it on top of just C's malloc, realloc and free.
Which type allocator is best suited for this job?

stack allocator kind of has it but you can only free object from the top of stack.
Pool allocator could be it but having to have pool for each different size of object doesn't seem good solution.
Hierarchical allocator like talloc seems to be the solution. But talloc just mallocs object and keeps some kind of list of the objects.
I want the allcator to have some kind of caching or reusable pages to minize system calls.
>>
>>61185453
The project doesn't live outside of the Rust community as much as it did.
>>
Not working on anything, atm.
Reading:
Computer Organization and Design ARM Edition: The Hardware Software Interface
>>
>>61185474
Its how Rust stays ahead of the curve.
https://github.com/rust-lang/rust/issues/38646
>>
>>61185341
>>61185432
>>61185499
Rust's entire presence outside the core project has always been pure hype. It's a fad, and it's starting to fade. All fads disappear in the end.
>>
>>61185499
That's disappointing. Can you post a link to Rust statistics?
>>
File: 1488254630662.gif (944KB, 264x320px) Image search: [Google]
1488254630662.gif
944KB, 264x320px
>>61185509
Oh, wow.
>>
>>61185535
Can you post a link that claims otherwise?
>>
File: 1489195384770.gif (64KB, 720x403px) Image search: [Google]
1489195384770.gif
64KB, 720x403px
>>61183942
Far from secure. You may think it is secure because your crappy site isn't getting traffic. Wordpress, Joomla and Magento are dog shit for shit eaters who work for shit fucks that demand you make a shitty website 'they' can manage... They still can't manage it tho.
>>
>>61185507
Similar situation here. Learning some basic computer vision and currently trying to compile OpenCV which is - as expected - a pain in the ass
>>
>>61185221
What is a ""proper string""?
>>
>>61185542
Going through the issues is amusing
https://github.com/rust-lang/rust/issues/12832
>>
>>61185552
I was not claiming otherwise, I just thought you were saying that because you saw Rust statistics somewhere. The only kind of statistics I saw recently was about Rust being voted "most loved language" on stackoverflow, but since it's a vote and it's stackoverflow it hardly counts.
>>
>>61185586
Where did I mention statistics?
>>
>>61185341
>Slice pattern
Can you elaborate? I am pretty sure your problem has a simple workaround
>>
>>61185586
Polls like that are astroturfed by the Rustzilla shills
>>
>>61185582
It's quite a bit amusing how they managed for that to happen. Most languages process macros and shit before normal code.
>>
>>61185592
You didn't, I just thought you had some.

>>61185597
for chunk in buffer.chunks(4) {
pic[i / pic_height][i % pic_width] = match chunk {
[0, 0, 0, _] => Colors::Black,
_ => Colors::White
}
}


>>61185601
Yeah, that's what I meant by saying that it hardly counts.
>>
>>61185474
Rust has nested comments, wha'ts so hard about that?
>>
>>61185620
Did you ask it in their IRC, they were pretty helpful last time I tried
>>
>>61185614
When your basic print is a marco, youve basically given up hope of having a good language.
>>
>>61185509
Poor guy. It's a legit issue and he got shoved aside by the Rust defense committee.
>>
>>61185652
How is that a legit issue?
>>
>>61185597
>>61185620
I forgot to increment "i" but I hope you got the idea.

>>61185633
Nope, but I saw some disgusting workaround being recommended instead and I don't want to use it.

>>61185621
What is the purpose of nested comments? I honestly can't see what they could be used for.
>>
>>61185621
There is literally no logical reason why you need nested comments.
>>
>>61185668
>>61185670
This can be helpful in documentations. It's not that it's a bug, it's just that the user simply didn't know things like nested comments exists
>>
>>61185665
Do you claim it's as designed?
>>
>>61185688
Yeah, like demonstrating rusts dumb """"features"""".
>>
>>61185703
>>61185621
>>61185688
>>
>>61185688
But the compiler should be generating documentation, should it? There should be another binary that takes care of that, even if it shares code with the compiler and the compiler shouldn't care about the content of comments.
>>
>>61185713
*shouldn't be generating documentation
>>
>>61185709
What's wrong with being able to show comments in documentation?
>>61185713
There may be some messages you want to directly pass on to the documentation hence why.
>>
>>61185710
It's inside a string literal so it shouldn't be treated as a start of a comment block.
>>
Nested comments in proper languages:
(+ 5 (comment (* 5 9) (+ 5 9)) 3)
>>
>>61185730
It doesn't matter where you place your /*comments*/
>>
>>61185747
But in Rust it does(tm)
>>
>>61185746
Wheres your example?
>>
>>61185757
Here >>61185746
>>
>>61184427
your silly internet memes have no affect on me and my fat stack of dollarydoos. kys poorfag.
>>
>>61185724
>There may be some messages you want to directly pass on to the documentation hence why.
I think I don't understand what you mean. Can you provide an example?
>>
>>61185755
Right, since you can have comment blocks inside of comments it does. Why do you keep embarrassing yourself?
>>
File: 2017-07-02-150832_800x600_scrot.png (19KB, 800x600px) Image search: [Google]
2017-07-02-150832_800x600_scrot.png
19KB, 800x600px
I made this simple puzzle game in BBC BASIC:

https://pastebin.com/fSrbjfAP

I've only tested it with Brandy, it probably wouldn't work in any other version of BBC BASIC.
>>
File: 1475972764280.jpg (471KB, 1680x1096px) Image search: [Google]
1475972764280.jpg
471KB, 1680x1096px
>>61185778
>pajeet still mad
>>
>>61185781
If it's not a bug, does that mean every other language is bugged?
>>
>>61185797
No, because many other languages do not have nested comments.
>>
>>61185781
Works in OCaml
Kys
>>
>>61185724
>lets fuck up our language for one literally worthless feature
wow, Rust's priorities are top-tier.
>>
>>61185804
See >>61185823
So using nested comments in Rust causes undefined behavior?
>>
>>61185827
Having comments inside comments does not fuck up a language.
>>61185823
If the comments inside does not have a closing bracket/signature, OCaml is being too tolerant
You can add an i32 with f32 or i32 in other languages, you can't do it in Rust
>>61185831
>UB
Rust is not C/C++, so no I guess
>>
>>61185858
/*
write("/* Rustlet pls ");
*/
//compiles just fine
>>
>>61185869
D does not have nested comment, idiot faggot
>>
>>61185869
This kills Rust.
>>
>>61185869
Also, you have been in this thread for 4 hours now. Haven't you got anything else to do?
>>
>>61185858
>If the comments inside does not have a closing bracket/signature, OCaml is being too tolerant
# let a = (* "(**" *) "";;
val a : string = ""

Thing is that unlike shitty languages like Rust it does not consider things inside strings as comments.


>You can add an i32 with f32 or i32 in other languages, you can't do it in Rust
Because rust is a shitty language.
>>
>>61185558
Oh, good luck! :)

The book I'm reading is about computer architecture.
It uses a subset of ARMv8 to explain concepts, but the authors also changed ARMv8 a bit to make it easier to use it for explanations (they call the modified subset of ARMv8 they're using LEGv8, kek).
But at the end of some of the sections they have an "elaboration" subsection where they show the difference between LEGv8 and the actual ARMv8.
>>
>>61185885
If by shitty language you mean "lets not enable brainlets with their shitty implicit conversasions", yes
>>
>>61185875
Because nested comments dont add anything of use.
>>61185882
ive been in and out.
>>
>>61185885
Also, does OCaml have nested comments?
>>
>>61185898
More like let's cause pain and suffering to everyone. This is something that the compiler can easily solve by itself, just like things like argument types.

>>61185903
Yes
>>
>>61185901
>Because nested comments dont add anything of use.
Where does your argument stand now then? You are now complaining about nested comments instead of "Rust's comments are broken".
>>
>>61185914
There are languages that allow 1 + '1' as well, it certainly is less painful than OCaml and I don't see you are interested about it
>>
>>61185919
1. Nested comments are bad and serve only to make things unnecessarily difficult, but thats Rust's mantra at this point.
2. Rust is shit
I have not said or meant to imply anything else.
>>
>>61185931
The difference is that 1 + '1' does not make sense. What are you trying to prove exactly?
>>
https://vimeo.com/216330850
>>
>>61185934
>Nested comments are bad and serve only to make things unnecessarily difficult
Unless you _know_ it exist. Don't just do stupid things --it's not a rocket science
> Rust is shit
This is subjective. But I haven't found anything ITT that makes me agree
>>61185939
Having /*comments doesn't make either
>>
>>61185942
Everything is better than node.
>>
>>61185945
This is some embarrassingly obvious false-flagging.
>>
>>61185939
1 + '1' = '2'
>>
>>61185945
>Having /*comments doesn't make either
What? OCaml does not have /* comments.
>>
>>61185959
What? How?
>>61185964
Neither does Rust
>>
>>61185961
It would make sense if it was like C where '1' is a char and is treated like an int where '0'...'9' are sequential.
It would not make sense if it was a string however.
>>
>>61185978
>Neither does Rust
Please stop posting, Rust clearly has /* comments.
>>
>>61185981
1 + "1" = ""
>>
>>61185981
using single quotes for strings is cancerous
>>
>>61185978
Because youre not a native english speaker and you probably dont even use D.
>>
>>61185991
This only makes sense if strings are pointers/arrays like in C.
>>
>>61185990
It doesn't actually
>>61185997
But I do use D
>>
>>61186020
>It doesn't actually
Well, you are wrong.
>>
Friendly reminder that "cybersecurity" is one of the lamest and most homosexual of the computer-related jobs, second only to webdev.
>>
why did c++ go from c with classes to a compiled javascript
>auto
>[=](
>shared_ptr<
what the fuck
>>
>>61186020
post something youre working on then.
Its interesting how you popped up shortly after my snippet.
>>
>>61186055
C++ went from one kind of trash to another
>>
>>61186032
Nope, Rust doesn't allow unfinished comment blocks, I just checked

>>61186062
I'll do you one better. Give me a short problem and I will post it.
>>
>>61186072
what isn't trash nowadays?
>>
>>61186074
You clearly can't read and can't make a proper argument.
>>
>>61186079
anime
>>
>>61186086
>I got owned: the post
>>
>>61186098
Not really, you just moved the goalpost like the faggot that you are.
>>
>>61186114
How is that "moving goal posts"? I clearly showed you how Rust won't allow you to have unclosed blocks (even in nested comments).
>>
>>61186098
I asked (not to you though I believe) before but I didn't get an answer, probably because of the sea of shitpost that flooded the thread. Can you please provide a use case for nested comments? I can't figure why anybody would need it.
>>
>>61186074
literally cant think of anything thats not easily googlable, or too extended.
Just show me your d workspace with a simple hello world.
>>
>>61186123
Except that we weren't talking about nested comments you dumb faggot.
>>
>>61186055
>>61186072
>>61186079
I'm going to take the unpopular stance here and defend both C++ and Javascript
If you don't pay for what you don't use, why is it bad for a language to continue to support more and more possible styles of programming as it grows?
>>
>>61186162
>I'm going to take the unpopular stance here and defend both C++ and Javascript
You could've just said "I'm retarded"
>>
>>61186162
>why is it bad for a language to continue to support more and more possible styles of programming as it grows?
I can program in any style i want, AND my language isnt is a gigantic clusterfuck. Thats where c++ fails.
>>
>>61186127
>Can you please provide a use case for nested comments?
Whether nested comments are useful to someone is a different topic than Rust's comments being broken.

However, as the other anon might have implied, it can help you explain your stuff better in documentations

>>61186140
The Workspace-d is installed by VSCode itself, as for hello world;

"Hello world".writeln;

Give me somehting more meaningful

>>61186152
If you follow the github link, the first reply makes it clear, Rust has nested comments and you can't leave them unclosed. This is not a bug, it's a lack of user's knowledge. He should have consulted their IRC fellows before posting on github
>>
JS/PHP > Py
>>
>>61186178
>If you follow the github link
Irrelevant, the discussion between us was not about that.

>Rust has nested comments and you can't leave them unclosed
The bug is that Rust considers /* inside strings as comments, unlike proper languages like OCaml.
>>
>>61186176
Yeah but what's actually WRONG with a language being a gigantic clusterfuck? Unless you're someone who has to actually MAINTAIN the language, why would this bother you as one of its users?
>>61186172
I'm not interested in the kind of discussion you're offering.
>>
>>61186178
>it can help you explain your stuff better in documentations
I don't see how, but even if it is true, why would the compiler need to parse comments? This is the documentation-generator's job.
>>
>>61186178
meant a screenshot, but it doesnt even matter that much.
Why are you defending Rust's shit so hard though?
>>
>>61186205
>whats wrong with bad implementation and making your life harder.
nothing if youre an apparent masochist.
>>
>>61186127
different anon, but the use case is pretty obvious:
/*
int this_code_is_commented_out() {
blah(); /* whoops, I'm a retard who uses block comments as regular comments */
}
*/


pseudocode, because i'm not a rustyboy.
this is mostly a concern for C89 fags, because they don't have any other way to write comments. Most C++ fags (and I assume rustfags) use // for regular comments, so /**/ can be used for commenting code out.
Still, sometimes you want to comment out a block of code which already has some other code commented out inside of it. That's pretty annoying in C++
>>
>>61186220
>this is mostly a concern for C89 fags, because they don't have any other way to write comments
False, in fact, C89+ has nested comments in the form of #if 0
>>
>>61186218
>>whats wrong with bad implementation and making your life harder.
No, no, that's not what I asked, I asked what's wrong with a language being a gigantic clusterfuck.
>nothing if youre an apparent masochist.
I'm not, it's just that I can read good C++ code and be pretty clear on what it's supposed to do, and the fact that C++ itself is large and unwieldy doesn't make that any harder for me. In fact, it actually makes it easier, because its features make sense to me, regardless of the fact that they don't logically follow from its past features.
>>
>>61186220
>return int
>1 nested function
and a retard i see.
>>
>>61186197
>Rust considers /* inside strings as comments
Excuse me? I don't quite understand what you mean there.

>>61186206
I am not familiar with their documentation technique so I can't comment on that. It's a feature you can choose not to use.

>>61186211
Rust is not shit. It's one of the very few languages (without GC) that I actually would love to spend more time on.
Rust is cetainly better than C++
>>
>>61186246
>Excuse me? I don't quite understand what you mean there.
Read the issue.
>>
>>61186211
Rust is being unfairly hated on. It has a lot of flaws but most of the shitpost is unjustified.

>>61186220
Oh, that makes sense now, thank you. This is a weird design choice in my opinion though, I think I'd prefer plain and simple comments instead of nested comments.
>>
>>61186246
why are you pretending you dont have rust installed.
Now i want to see your VS extensions.
>>
>>61186250
>>61186197
That's wrong though. There's not strings in Rust comments, only plaintext and nested comments.
>>
>>61186266
This is what is wrong, this is not a problem in proper languages like OCaml.
>>
>>61186260
I don't use VS, I use VS Code. Why are you interested in me so much?

>>61186250
Do you know the difference between a "string literal" and a "comment"?
>>
>>61186274
Yeah but that's not a bug. It's a design choice. You seem to enjoy strings and comments inside comments, I dislike both. There's no right or wrong answer here.
>>
>>61186286
Sure
>>
>>61186286
now show me your rust version
>>
>>61186274
If OCaml actually considers comments as string literals, I feel sorry for the language.

I was the one who asked this >>61184159
>>
>>61186291
*A shitty design choice.
>>
>>61186220
#if 0
....
#endif


Comments are for comments. Macros are for disabling blocks of code. Dumb faggot.
>>
>>61186301
>>
>>61186286
>vs code
Retard

>>61186305
>If OCaml actually considers comments as string literals
It does not.
>>
>>61186315
figured as much
>>
>>61186315
>Gnome term
Why are you still alive?
>>
>>61186315
B..but you're not running Rust Nightly which is a whole different ecosystem :^)
>>
>>61186320
Looks like it does

If things like >>61186098 is valid in OCaml, it's compiler is severely broken

>>61186333
That's not GNOME-terminal, it's tilix
>>
Reposting >>61186237
Can anyone explain this to me? What exactly is the problem with a language being thicc? It's not like you're going to memorize the whole language by rote, you're supposed to actually understand it and then do all your future work building off your understanding. Do C++ haters really just do everything by memorizing design patterns and their use cases, and now they fuckin mad because there are so many of those in modern C++ that you basically can't count them anymore?
>>
>>61186356
>Looks like it does
Well, you are wrong yet again.

>If things like >>61186098 is valid in OCaml, it's compiler is severely broken
Wut?
>>
>thicc
dumb /v/eddit poster
>>
>>61186340
Eh, one of the few things I don't like about Rust is that there are too many things that are still in nightly.
>>
>>61186356
>That's not GNOME-terminal, it's tilix
Still cancerous.
>>
>>61186356
>If things like >>61186098 is valid in OCaml, it's compiler is severely broken
I thought you were ok while defending Rust but you're just as retarded as the rust-haters. Allowing strings in comments is just as stupid as allowing nested comments: it's not. It's a simple design decision that doesn't impact shit besides predictability to beginners.
>>
>>61186391
strings in comments are no longer strings, they are a comment demonstrating the string syntax.
>>
>>61186391
>Allowing strings in comments
But rust doesn't doo that. A comment is a comment, there is no string literal inside comment blocks.

Also, I don't quite "love" Rust, I'm just fond of it.
>>
>>61186333
Not him but what the fuck exactly is so wrong with using gnome terminal
>inb4 no multiplexing
gnome has window tiling
>inb4 default font / colors are ugly
1) i don't personally think so
2) if i did, i wouldn't care
>inb4 anything else
doesn't matter because terminals are for fucking text i/o can gnome terminal do text i/o? yes it can so what exactly is the fucking problem
>>
>>61186376
not an argument
>>
>>61186412
>don't quite "love"
you are just paid to shill it, we get it.
>>
>>61186428
Tilix can synchornize stdin too
>>
>>61183865
>>Shit is bloated as fuck
>>Loads tons of unecessary stuff by default

wow web-dev in 2 lines who knew
>>
>>61186428
It's bloated shit that breaks in every single version, this is what is wrong with it.
>>
shit, my keyboard is failing
>>
>>61186409
Depends on what you call a string.

>>61186412
I know it doesn't do that. But you're shitting on ocaml because it allows strings in its comments and that's just retarded when you just spent half an hour defending Rust against retards shitting on rust because it allows nested comments.
>>
File: 1331972083325.jpg (233KB, 727x3382px) Image search: [Google]
1331972083325.jpg
233KB, 727x3382px
>>61186412
>But rust doesn't doo that.
>>
>>61186450
Not to mention the shitty compatibility as a termemu
>>
>>61186438
I really dont get it.
Hes using a terminal made with D(ed), namefags with D, but is shilling Rust for """free""".
>>
What languages have delimited continuations?
>>
>>61186458
OCaml is shit for other reasons.
>>
>>61186428
Does gnome allow for horizontal and vertical tiling? I only got a single split working.
>>
>>61186458
>Allowing string literals inside comment blocks
Beyond broken/10
>>
>>61186474
Advanced shilling strategy of false-flagging and pretending to be something else and acting retarded thus making rust competitors seem bad.
>>
>>61186444
why do you need this
>he does not literally just type

>>61186450
It has never once broken on me and the bloat has never affected me in any way
Please remind me why I should hate it. Installing and acclimating to a different, possibly objectively superior terminal emulator requires just enough effort not to be worth the invisible benefits of the change that I don't care about because the lack of these benefits has never bothered me.
>>
>>61186458
>retards
But anon, you are the retard.
>>
>>61186504
well if you open up another screen you will not have to cd into the previous directory you were working on
>>
>>61186494
No horizontal (---) tiling except for corner tiling.
It does have vertical (|) tiling though.
>>
>>61186229
>>61186310
I completely forgot about that for some reason. I don't usually disable code, I just delete it (version control is nice)

>>61186240
>pseudocode
>i'm not a rustyboy
>retard
what did he mean by this
>>
>>61186518
But I already don't have to do that. Gnome terminal does that for me.
>>
What is the point of tiling in a fucking terminal emulator? Just use tmux or some shit.
>>
>>61186491
I don't know if it's shit but I'll willingly admit it has multiple flaws.

>>61186497
>>Allowing nested comments
>Beyond broken/10
I hope you realize this is how you sound. And I think I just realized I'm being trolled.
>>
>>61186527
That's a shame. I use Gnome at work, but I really miss the tiling functionality I get with i3.
>>
>>61186540
Oh, I know Qterminal doesn't do it.
>>
>>61184005
there's no good source for that quote
>>
Does Rust have HKTs or a way to guarantee tail call optimization yet?
>>
>>61183988
open cobalt looks cool but I haven't tried it
>>
>>61186553
You can avoid nested comments by not making nested comments

You can't fix broken comment system no matter how hard you try.
>>
>>61186577
You can just avoid strings in comments by not using quotes in comments. I don't see how that's any different.
And even then, contrary to nested comments, string in comments don't really change anything.
>>
>>61186577
How is the ocaml comment system in any way broken?
>>
>>61186594
>Can't use quotes in comments in OCaml
Now this is pretty sad
>>
imagine using a language that doesn't support multicore
>>
File: ak.jpg (110KB, 500x375px) Image search: [Google]
ak.jpg
110KB, 500x375px
>>61184046
P O P C U L T U R E
>>
Reposting >>61186364
Reminder that C++14 is a good language because the only argument against it is that it is bloated up with features that don't fit together well and the only people who should have to worry about that are:
>maintainers of the language itself
>brainlets who learn everything by rote and can't intuit how things work
>these same brainlets who can't read code written in C++14 because it is too many things for their tiny brains
While the rest of us can just take the unnecessary multitude of features that don't fit together well, use whichever ones we like as we please, and get efficient code out of it that works and is reasonably readable (except in the case of programmers who don't know how to use auto, which is literally the most pathetic possible thing to not know how to use).
>>
>>61186627
That's called OCaml afaik
>>
>>61186616
>>Can't use /* in comments in Rust
>Now this is pretty sad.
I can't see a single reason why you might need a single quote in a comment though. Quotes always come in pairs, contrary to apostrophes.
>>
>>61186627
imagine using a language that doesn't support nightcore
>>
>>61186627
Imagine using a language where you had to delete your string before commenting out, or risk a compile error.
>>
>>61186646
No one does that. However using "quotes" in comments is pretty common if you ask me
>>
>>61186654
yeah but imagine using a language that doesn't support nightcore
>>
>>61186616
>Can't /* anywhere in comments in Rust
Now this is pretty sad.
>>
>>61186665
And OCaml allows that.
>>
File: 1385136139955.png (19KB, 870x870px) Image search: [Google]
1385136139955.png
19KB, 870x870px
>IMAGINE USING A LANGUAGE THAT DOESN'T GO FAST
>>
>>61186669
That's becuae Rust has nested comments.

And multicore. :^^)
>>
>>61186665
Our firend here https://github.com/rust-lang/rust/issues/38646 obviously did.
Also see what you did? You used TWO QUOTES, meaning nothing would happen in ocaml.
>>
>>61186692
>That's becuae Rust has nested comments.
No, because it has a shitty design. Unlike OCaml.
>>
>>61186702
Sorry if it doesn't let you have unfinished comment blocks.
>>
File: hqdefault (1).jpg (6KB, 168x94px) Image search: [Google]
hqdefault (1).jpg
6KB, 168x94px
>i walk into the the thread
>why the fuck is a pile of rust fighting a camel
>>
File: waste waste waste.png (116KB, 694x801px) Image search: [Google]
waste waste waste.png
116KB, 694x801px
>>
>>61186716
They are not unfinished comment blocks because /* in strings are not comments in proper languages, lol.
>>
>>61186733
>strings
That's not a string. That's something that's called "Comment blocks"
>>
>>61186745
These are two different things.
>>
>>61186755
Exactly.
>>
>>61186745
literally why do you even have D installed if you are wanking this hard to rust?
You dont use D for work, and obviously want to use rust instead as its already installed
>>
>>61186761
You don't seem to understand that though.
>>
>>61186767
I don't recall Walter Bright asking me to meaninglessly hate on Rust
>>
File: shot0010.jpg (153KB, 1280x720px) Image search: [Google]
shot0010.jpg
153KB, 1280x720px
>>61183729
When the fuck will the second season begin? I'm tired of waiting..

That new OVA was neat and all, but it was just one episode.
>>
>>61186781
Give it up Andrei, D is dead

Let it go!
>>
>>61186781
Answer my question.
>>
Lisp is the Love Live of programming.
>>
>>61186781
He asked you to shill for D though.
>>
>>61186798
Big tiddies.
>>
File: shot0009.jpg (172KB, 1280x720px) Image search: [Google]
shot0009.jpg
172KB, 1280x720px
>>61186835
For you
>>
>>61186767
>literally why do you even have D installed if you are wanking this hard to rust?
1. They are not mutually exclusive
2. I don't see anything ITT that makes me hate Rust
3. I hate C++ and yet I have GCC and Qt installed in my system

>>61186814
D is not perfect but it's the best I see
>>
>>61186810
More like the Death Note of programming.
>>
So does no one have a real argument against this?: >>61186635
Is that what's going on here?
>>
>>61186853
Death Note was pretty decent
>>
>>61186853
Rust is the Death Note of programming. Only edgy teenagers use it.
Haskell is the BanG Dream! of programming. Not as good as Love Live, but still good.
>>
>>61186851
There is not a single thing Rust does better than D though.
And Rust is even worse a functional language than Ocaml.
Rust has no real niche.
>>
>>61186798
Please no
>>
>>61186874
>worse a functional language than Ocaml
That's difficult
>>
>>61184917
what kind of apps?
>>
>>61186871
Rust is more like the American Pie of programming
>inb4 but anon american pie isn't even an anime it's a normie film
My point exactly
>>
>>61186871
Wouldnt rust """""""""""""programmers""""""""""""""""""" be the opposite of edgy though?
>>
>>61186851
>I hate C++
And yet you have no argument against this. >>61186860
>>
So what's your take on scala for webdev my lads?
>>
>most of /dpt/ has never even used an indexed monad
>>
>>61186927
>muh "moan ads"
>>
>>61186888 (checked)
Apps centered around playing video.
I'm responsible for the video part on all apps.
>>
>>61186938
>Apps centered around playing vidya.
ftfy
>>
>>61186874
>There is not a single thing Rust does better than D though.
Depends on the use case. I certainly would not write a window manager in D. It's inherently more expensive. However by the time I finish writing an X11 WM in Rust I'd probably be able to do it twice in D, because it's so comfy. And it leaves me much more room to actually optimize my algorithm and program design.

>>61186874
>And Rust is even worse a functional language than Ocaml.
Difference between D and Rust is, both the languages have a decent collection of functional programming concepts. I do not like the existence of Class and other OOP concepts of D.

However OCaml is just a bad language. It's popular because you can learn it in a week.

>>61186874
>Rust has no real niche.
This is meaningless. I don't care what others use and for what.
>>
>>61186932
This does not make you intelligent

If you don't know what a monad is by the time you finish college then you have failed as a programmer
>>
>>61186945
?
>>
File: Umaru.jpg (154KB, 800x698px) Image search: [Google]
Umaru.jpg
154KB, 800x698px
>>61186879
>implying more umaru is a bad thing

Anon plz
>>
>>61186927
>haskell still hasnt used dependent types
>>
>>61186957
>haskell is the only language in which indexed monads are expressible
>>
>>61186950
>If you don't know what a monad is by the time you finish college then you have failed as a programmer
>know what a monad is by the time
>at a monad is by
>a monad i
>monad
>muh "moan ads"
>>
>>61186948
> I certainly would not write a window manager in D.
THEN WHY THE FUCK ARE YOU USING TILIX
WHAT THE FUCK AM I READING
>>
>>61186948
>However OCaml is just a bad language
Funny, when considering that you claimed that you posted >>61184159. Somehow you were able to learn all of OCaml since then?
It seems to be that you are trolling.
>>
>>61186969
>muh "moan ads"
>>
# GADT equivalent in Julia using abstract and parametric types.

abstract type expr{T} end

struct In <: expr{Int64}
int::Int64
end

struct Bo <: expr{Bool}
bool::Bool
end

struct Add <: expr{Int64}
a :: expr{Int64}
b :: expr{Int64}
end

struct Mul <: expr{Int64}
a :: expr{Int64}
b :: expr{Int64}
end

struct Eql{T} <: expr{Bool}
a :: expr{T}
b :: expr{T}
end

# Haskell type signature would be calceval :: expr{T} -> T
calceval(e::In) = e.int
calceval(e::Bo) = e.bool
calceval(e::Add) = calceval(e.a) + calceval(e.b)
calceval(e::Mul) = calceval(e.a) * calceval(e.b)
calceval(e::Eql) = calceval(e.a) == calceval(e.b)
>>
File: 1497988968405.jpg (25KB, 572x720px) Image search: [Google]
1497988968405.jpg
25KB, 572x720px
>>61186973
Tilix is not a window manager you little shit

>>61186979
Where in that post did I mention "learning" OCaml?
>>
>>61186985
>>61186971
>people still get hung up on that one word
>>
>>61186994
One would not ask such a question unless if he did not know the language or if he was trolling.
>>
>>61186994
ITS STILL MORE IMPORTANT THAN A WM
WHY WOULD YOU TRUST D WITH YOUR TERMINAL BUT NOT SOMETHING MUCH MORE SIMPLE
>>
>>61186992
>dynamic trash
Programlets, when will they learn?
>>
>>61187009
Implicit type conversions has damaged your brain

>>61187019
kek calm down fgt
>>
>>61186969
Then what language with Moe Nads do you use?
>>
>>61187019
>WM is simple
>terminal isn't
wewest of the lads
>>
>>61187039
I don't know what a Moe Nads is.
>>
>>61187033
NO ANSWER MY QUESTION YOU DUMB FAGGOT.
OR JUST TELL ME YOUVE BEEN TROLLING THIS WHOLE TIME.

ALSO D HAS ITC

I THINK IM DONE, YOURE JUST PRETENDING, YOU CANT BE THIS RETARDED
>>
>>61187033
>Implicit type conversions has damaged your brain
I will assume that you admit that you were trolling.
Also, languages without type inference are shit.
>>
File: consider.jpg (29KB, 600x600px) Image search: [Google]
consider.jpg
29KB, 600x600px
new thread
>>61187074
>>
>>61187023
Julia's compiler can infer the types for this, a simple @code_warntype allows me to prove type safety.
>>
>>61186950
>If you don't know what a monad is by the time you finish college then you have failed as a programmer
Monads are only necessary in a language where immutability, statelessness, and purity are concerns.
In other words, a shitlang, because computers fundamentally don't work that way, and any language that insists on working that way cannot go fast.
Correctness, readability, and going fast are the only three things that matter. Imperative languages with mutable state are better for going fast. Hasklel, Lithp, and I[dr]SIS are better for correctness and readability, but anyone who is not a brainlet can write correct and readable code just as well in an imperative language with mutable state. If you're especially not-stupid, you can even write *gasp* type-unsafe code that's correct, readable, and more efficient than its type-safe equivalent.
>>
>>61187064
Tha'ts because
1. An X Window manager is far more complex than a terminal emulator
2. While a D WM would probably prevent memory leakage, it will be more CPU resource hungry

I know D is far more efficient than C# or Java but you have to admit that Rust has no GC overhead.

I wish D fags and Rust fags stopped hating each other
>>
>>61187119
>I wish D fags and Rust fags stopped hating each other
They cannot. D fans will be forever butthurt about Rust because D is dead but Rust is not
>>
>>61187132
Hi

So what was the purpose of Rust again?
>>
>want to make a project
>want to have a nice looking github profile for wagecucking purposes
>don't want to be associated with the project irl
What do?
>>
>>61187149
Not him and I don't actually know what the purpose of Rust is but here is a purpose Rust serves:
>a compiled language with OOP support
>not shit (unlike C++)
>not almost low level (unlike C)
>not unsafe (unlike both)
>not a VM-lang (unlike Java)
>not dead (unlike D)
>>
>>61187149
To be a better C++.

And it might succeed, unlike D. It hasn't had a garbage collector for any part of its life, let alone the first fifteen years.
>>
>>61187208
>>a compiled language with OOP support
Rust doesn't quite have OOP, and that's not a bad thing.
However it's not strong in Functional and template metaprogramming either. It's literally good for nothing, unlike D
>>not shit (unlike C++)
Even Java is better than C++
>>not almost low level (unlike C)
What?
>>not unsafe (unlike both)
Rust is pretty unsafe
>>not a VM-lang (unlike Java)
Any language can do that
>>not dead (unlike D)
In 5 years it's dead. Simply because
1, Community full of dumb webdevs (seriously, not a single knowledgable person)
2. Rust is too hard for its own community (Python/Ruby refugees)
3. Too busy with PC, and being Anti PC is the latest trend
>>
>>61187273
>Rust is pretty unsafe
Really? How? Don't mention the "unsafe" keyword, you're not supposed to use it.
>>
File: not_chuckle.gif (2MB, 245x246px) Image search: [Google]
not_chuckle.gif
2MB, 245x246px
>>61185509
wew
>>
>>61187177
Have two github accounts? One for projects you do want to be associated with and one for the rest.
>>
>>61188479
Yes, but then I won't get a nice-looking github profile.
>>
>>61188498
You will if you just do lots of projects you want to be associated with alongside the ones you don't.

Otherwise you're asking "How do I be associated with a project without being associated with it?". Unless you mean you don't mind potential employers seeing this project but want to keep it hidden from everyone else, you could just use a private repo on another git site like GitLab or Bitbucket.
>>
>>61188540
I was mostly venting tbqh, but thanks for the advice.
Would employers care about for instance developing some imageboard engine, or would they just see it as "cool, he did some web stuff"?
>>
File: 8.jpg (96KB, 880x1048px) Image search: [Google]
8.jpg
96KB, 880x1048px
How smart is the average programmer in a business setting? I have this idea that they're all amazingly smart and know almost everything there is about programming. Is this true?
>>
>>61188562
They would probably see it as "cool, he did some webstuff", unless you're naming it "Kawaiipantsuchan" or something autistic, then they might have some questions.
>>
>>61188604
Well my experience is mostly from university funded projects and the friends that I have discussed with.
By my experience they are normies and they know at most 2 languages and maybe git. They are generally ignorant about algorithms and portability. "If it compiles and looks good we get funding".
>>
>>61188604
if it was software wouldn't suck so hard
>>
>>61188604
Just because you have a job doesn't mean you are good at it. This is true across the board.
Thread posts: 339
Thread images: 31


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