[ 3 / biz / cgl / ck / diy / fa / g / ic / jp / lit / sci / tg / vr / vt ] [ index / top / reports / report a bug ] [ 4plebs / archived.moe / rbt ]

Due to resource constraints, /g/ and /tg/ will no longer be archived or available. Other archivers continue to archive these boards.Become a Patron!

/g/ - Technology

View post   

[ Toggle deleted replies ]
File: 97 KB, 1280x720, 1544847735332.jpg [View same] [iqdb] [saucenao] [google] [report]
68955702 No.68955702 [Reply] [Original] [archived.moe] [rbt]

Old thread: >>68951463

What are you working on, /g/?

>> No.68955727

Lisp is the second most powerful language next to C17.

>> No.68955746

C++ is to macros as IRS is to Poetry.

>> No.68955747

What is C17 you mean C++17?

>> No.68955751

mad lispfag incoming everyone hit the floor

>> No.68955753
File: 41 KB, 499x499, 0934 - VSlc5Gv.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.68955768

>he doesn't know about C17

>> No.68955783

There is literally nothing wrong with C++, java, or python.

>> No.68955788

based yuno posters

>> No.68955796
File: 673 KB, 600x655, 1479182503834.png [View same] [iqdb] [saucenao] [google] [report]

C17 that fag from dragon ball?

>> No.68955803

I wonder how it feels to be wrong

>> No.68955819

He meant C18 (i hope)

>> No.68955826

C17 is a minor "bugfix" release for C, to address a few issues in C11. It's sometimes referred to as C18 too.

>> No.68955830

dumb cat poster.

>> No.68955835

Just remember going to school.

>> No.68955880

(when (true) (print 'Wrong.'))

>> No.68955901


>> No.68955904
File: 490 KB, 449x401, .png [View same] [iqdb] [saucenao] [google] [report]

>when he tries to insult you in common lisp and doesn't even know the basic boolean keywords or the character for string literals.

Judging that you used single quotes, I can only imagine this is a javascript dev trying to pretend to be a lispfag.

>> No.68955907

so what I'm getting out of this is that they forgot to bump the version number so C18 is just C17 with the right version number. nice.

>> No.68955940

they really should have changed more than what they did. I would really REALLY like a rework of this shit here
int *a
should be
int* a

>> No.68955947

The early proposals were done in 2017, hence C17. It was finalized in 2018 so people refer to it as both C17 and C18. Most of the initial work for compilers were done with c17 and hence you would use it via --std=c17. I don't know if any of them updated to let you choose --std=c18 to mean the same .

>> No.68955958

Works on my machine I just changed the language :^)

>> No.68955971

>distingushing between " and '
i love this, never stop doing this
>having strings and not array of chars
this is bad, very bad poojeet

>> No.68955972

No, you're stupid.

There is a somewhat lengthy ratification process for ISO standardised.
They finished it in 2017, but it was not finalized and released until 2018.

>> No.68955975

Lisp is the most powerful programming language.

>> No.68955985

no u

>> No.68955988


>> No.68955991

A string is a string of chars that is terminated with a null.

>> No.68956000

>ISO standardised
ISO standards*

>> No.68956023

CL-USER> (type-of "asdf")

>> No.68956029

>Python vs java
Who gives a fuck?

>> No.68956040

>brings up subject
>who cares
You do, apparently.

>> No.68956041


>> No.68956049

If you program at over iso 50 you're a fag

>> No.68956055

They really should have added improvements to the quality of life of the language.

>> No.68956056

no, fuck off. You can write it that way if you want, but don't force me to be retarded too.

>> No.68956061

>but don't force me to be retarded too.

>> No.68956062

They're both retarded.

>> No.68956063

It was only a "bugfix" release. The next real standard is C2x, which is likely C21 or C22.

>> No.68956066

Java is an obsolete legacy language. Python is the most beautiful language and is going to be the most used and in demand very soon.

>> No.68956079

im sorry did you have an argument

>> No.68956121

Did you, other than your assertion of opinion?

>> No.68956137

>Major changes from the previous edition include:
> added a one-argument version of _Static_assert

glad to see ISO is fast at work getting C2x ready

>> No.68956280
File: 196 KB, 598x932, file.png [View same] [iqdb] [saucenao] [google] [report]

>these are the people in charge of the C standard

>> No.68956297

Do you think you could do a better job?

>> No.68956308

sounds like a bunch of whiny faggots to be honest

>> No.68956357
File: 27 KB, 593x70, file.png [View same] [iqdb] [saucenao] [google] [report]

This man is rustfag's worst nightmare.

>> No.68956374
File: 1.10 MB, 1023x991, 1544582929085.png [View same] [iqdb] [saucenao] [google] [report]

Can someone tell me which programming language is best to learn for someone wanting to get into cyber security?

Right now, I'm in the process of beginning to learning Python through a free program on Edx. Any recommendations?

> Currently going to school for Information Systems degree
> Just got a part time job as an IT help desk associate

>> No.68956377


>> No.68956387

Really depends where you end up. If you're just going to be on an IT team helping monitor systems then any scripting language will get by.

If you're thinking of finding exploits, vulnerabilities, etc then you best be learning ASM variants, C, C++, etc.

>> No.68956412

You'll also need to learn:
Databases, reverse engineering, networking, cryptography, and a myriad of other things.

>> No.68956496
File: 495 KB, 597x1643, file.png [View same] [iqdb] [saucenao] [google] [report]

We will never see proper exception handling in C with these people alive.

>> No.68956512

>ASM variants, C, C++
Thought about C, C++, but I've heard that they are pretty difficult languages to learn.

>Databases, reverse engineering, networking, cryptography, and a myriad of other things.
My Uni has a masters specializing in Cyber Security that I'm planning on attending that specifically hits on a few of these points. I'm sure I'll self teach anything they won't cover too.

Hmm, never heard of this language either. An Anon above you mentioned it too. I'll look into it.

Luckily I'm already learning it, lol.

>> No.68956532

i couldnt find an answer online so im going to ask you guys
basically im using the numpy module to numpy.append to a numpy array
only issue is im having issues with the "axis" value
im following it just as the documentation says but it keeps saying invalid syntax
any ideas?

>> No.68956536

>Hmm, never heard of this language either.
it's a common abbreviation of assembly, newfriend. And implicitly referring to the x64 variant most of the time.

>> No.68956540

C is dead simple.
C++ is another beast just because there is so much to it now at this point.
ASM refers to Assembly and it's specific to the architecture. Ie: x86, MIPS, ARM, etc

>> No.68956546

Does C have a functioning memory model yet?

>> No.68956550

All programming languages are just Lisps with varying degrees of acceptability.

>> No.68956580

Yes, there is sbrk().

>> No.68956592
File: 6 KB, 229x220, 1525891708311.png [View same] [iqdb] [saucenao] [google] [report]


>> No.68956621

I'm so glad you asked. C2x is revising the C memory model and you can read all about it here:

>> No.68956658

>it's a common abbreviation of assembly
>ASM refers to Assembly and it's specific to the architecture

Thank you two for answering my question. I also see a lot of suggestions for learning Linux and Unix. Can either of you tell me why it would be important to learn either of those OS's? I'm aware of them, but not familiar with either to be honest.

>> No.68956686

>Can either of you tell me why it would be important to learn either of those OS's?
Unix is the most popular kind of os on the planet.

All programming languages are just higher abstractions of machine code.

>> No.68956690

>no mention of concurrency

>> No.68956698

Because any company who's not trash and cares about security will not be using Windows. And Linux is very prominent in the software world.
You'll probably never see actual Unix in the field, as Linux and BSD have taken over and inherited most of it anyway. But you'll probably run into a BSD* variant as well so it's worth learning too. FreeBSD is most popular, but OpenBSD is also growing.

>> No.68956701

Why would there be anon? malloc and friends are already thread safe.

>> No.68956731

>C Memory Object Model
I see, so that page isn't about the full memory model. Still, C11's memory model is fundamentally broken when it comes to concurrency.

>> No.68956742

UNIX is more of a "way of thinking" at this point. If you're going to run into any "UNIX" OSs it's going to be like AIX, HP-UX, etc. Probably very few, rare, nothing to really leanr about them.
Linux is widely used in servers, and that's really where you'd be using python to script out stuff. Most security platforms and tools will need a Linux server to run on.

Windows also plays a huge deal in any big corporate company contrary to what >>68956698 says, but in reality you don't have to know shit about them because any good Security tools will do the vulnerability scanning for you regardless of OS.

Really it comes down to what you want to do for your job. Are you just in it for monitoring systems for a company, suggesting improvements to the architectures, ensuring your company is up to date, and so forth or are you wanting to be some kind of vulnerability finder, etc.

>> No.68956754

How so friend? Please indulge us so I can accurately reply based off your real complaints.

>> No.68956790

>arm chair NEET

>> No.68956844

>Common Compiler Optimisations are Invalid
in the C11 Memory Model

>> No.68956862

I fell for the lisp meme and want to start doing real shit on it, any good books for getting gud?

>> No.68956882

>cannot assume that a program with no data races actually behaves sequentially
>cannot assume that an aborted speculative execution will have no side effects

>> No.68956886

Sounds pretty petty to be fair anon. I'd imagine by now both GCC and clang also implemented their own fixes, which they are allowed to do since the C standard leaves a lot up to the compiler designers.

>> No.68956904

>the C standard allows compiler designers to break well defined (by the standard) programs with optimizations

>> No.68956924


>> No.68956943

If it was a big deal it would have been fixed in C17. Also from your paper this applies to C++ too. In any case, members of GCC sit on the committee and even they don't seem to care about it since it's not even a talking point.

>> No.68956950

C is worthless without compilers

>> No.68956965

fucking update C already REEE
fucking whiny faggot cnile committee and their "obsolescence" fucking christ DO SOMETHING ALREADY

>> No.68957026

>he doesn't know about C18

>> No.68957052

I think you are missing the point. Do those compiler optimizations break programs in practice? No, because real hardware doesn't allow for the executions that would be affected by them (and probably never will). But the memory model is broken, because according to it, the answer is yes, a correct compiler should not perform these optimizations.

>> No.68957066

wow, it's like abstracted representations of the hardware have inaccuracies and the hardware isn't 100% perfect, yet neither of these things matter because they have miniscule impact relative to the more pertinent issue of program correctness.
who ever would have guessed.

>> No.68957097

Your problems will be formally addressed in C2x. The committee members on the Memory Model project have written articles about the issues of it as well and are aware of it. In the meantime, it's not a major issue and was not part of C17.

>> No.68957119

Fact: A good high quality post has NEVER been paired with a frog image, or a wojak image.
Therefore, I predict 95% hit rate if all frogposters and wojakposters were automatically banned for breaking global rule 6.
Prove me wrong.

>> No.68957121

I'd rather they move slowly than do whatever the C++ committee is doing. They've released C++11, C++14, and C++17, and soon C++20 in the time it's taken the industry to catch up with C++11. C++14 and C++17 in particular were both haphazard clusterfucks. At least the C standards committee takes the time to refine the standard before releasing it.

>> No.68957134
File: 51 KB, 657x527, dumb crow.png [View same] [iqdb] [saucenao] [google] [report]

take your racism back to /pol/

>> No.68957146

It's funny, since the C11 Memory Model that >>68956844 is upset about is a result of the C committee taking directly from C++11.

C++ ruined C.

>> No.68957148

Figure 1

>> No.68957155

That's off-topic, stupid faggot. I hope you get banned, cum guzzling retard.

>> No.68957180

Learn Lisp.

>> No.68957214
File: 769 KB, 1052x1342, 1462128560034.png [View same] [iqdb] [saucenao] [google] [report]

also, anime posters have the best quality posts on average. This is because they are generally friendly to other anons and post pertinent material alongside their anime images.

did some more work on my compiler today, parsing infix operations still takes fucking forever but at least I don't randomly stack overflow anymore.
Also released the first semi-usable version of my data plotting library for C. It's very primitive but it was fun to make and it spits out pretty pictures.
Yesterday I more-or-less finished my first-ever little webdev project. Did it in Python with Flask. Normally that stuff is really not my realm of expertise but it was a lot of fun to write and I wrote it all as a library decoupled from Flask that I can use what I made for future projects.
did a little maintenance stuff for my OS kernel, just tidying things and a little documentation. I want to get back to working on that project regularly, but I'm planning on completely rewriting it again since I have a better idea for what I want it to be now.
what about you, OP?

>> No.68957222
File: 1.33 MB, 1280x720, [Coalgirls]_Yuru_Yuri_03_(1280x720_Blu-Ray_FLAC)_[B25D1CAF].mkv_snapshot_04.11_[2018.07.11_06.39.05].png [View same] [iqdb] [saucenao] [google] [report]

what kind of language are you making lad?

>> No.68957224 [DELETED] 
File: 3.13 MB, 1920x1080, snapshot_21.23.png [View same] [iqdb] [saucenao] [google] [report]

there is a report button to report froposters
report frogposters everytime you see them

>> No.68957228 [DELETED] 

>This is because they are generally friendly


>> No.68957243 [DELETED] 

Announcing reports is against the rules dumb animeposter.

>> No.68957245 [DELETED] 

>also, anime posters have the best quality posts on average.
Holy shit, murder yourself, faggot.

>> No.68957259
File: 57 KB, 398x409, 0641 - TBjZ73O.png [View same] [iqdb] [saucenao] [google] [report]

Does anyone know any good baremetal raspberry guides?

>> No.68957262

I'm trying to read through a txt file that has a bunch of points in (x,y) format using C++. What would be the best way to get the x and y's and make a graph[j]. I was thinking regex but I was wondering if there was a better way.

>> No.68957265

No report was announced, dumbass.

>> No.68957267

What exactly do you want to do with it, sharkposter?

>> No.68957276

Nice reddit spacing. Time to go back.

>> No.68957285

reddit spacing would be:



>This is because they are generally friendly


>> No.68957293

Just some embedded work, I want to write a small kernel and play around with ARM SIMD. I have a TTL cable/ ftdi usb adapter that I want to use to interface with the pi.

>> No.68957296

>regex for this basic a string
do it urself geez

>> No.68957307

Give an example of a line.

>> No.68957314

Why not just use Linux?

>> No.68957320

I figured there was a way todo it without it. But I've been really tired with finals and can't think of it.

>> No.68957334

Because I already do linux systems programming on my computer. I want to get into embedded work. Also, I need some a decent project so I can get a job.

If the lines are all uniform, then extracting each number grouping is baby tier.

>> No.68957340


or even better if you don't want to validate that it has (..) just

>> No.68957351
File: 475 KB, 852x973, 1460515560181.jpg [View same] [iqdb] [saucenao] [google] [report]

It's a systems programming language. I'm an embedded C developer, and while I like C, I would like something that feels just a bit more modern.
The primary features vs. C are a stronger type system (that still fucks off when you need it to get out of the way), type-safe variants, modules, array types with the length built in, and generics.
I'm trying to keep everything in C that makes it so good for embedded, so my lang uses the same runtime system as C (just clear .bss and populate .data), the only symbols that are mangled are those with generics, heap is a library feature, seamless interfacing with asm, and bare pointers.
I'm also experimenting with a form of haskell's do notation, which should allow for cleaner error handling than something like Go.

>> No.68957353

If you know your input is always valid and not malicious just drop [0] and [len-1], split on ',' and parse two numbers.

>> No.68957387

Nim already did this.
>I'm also experimenting.. . with haskell
this is going nowhere, typical animeposter.

>> No.68957394
File: 402 KB, 1052x1342, Shiomiya_Shiori_Holding_Shy_Ada_95_From_The_Beginning.jpg [View same] [iqdb] [saucenao] [google] [report]

eh, not my taste but godspeed. Check out Cyclone though, it's an abandoned lang but another "improved C" flavor you might get ideas from.

>> No.68957407

Yeah, I know after seeing what the "answer" kind of wish I could've spent a little more time on the problem.
Thanks, I could've figured out the regex, I was hoping for a different way. Appreciate it though.
Jesus, thanks, always feel dumb when I see an answer to a question I ask.

>> No.68957409

>The virgin class user vs the posix programmer

>> No.68957419

>I'm an embedded C developer
How do I get a job like yours, based animeposter?

>> No.68957438

You can _pretend_ to have any job when you're NEET.

>> No.68957455

Idk why this dont work
f = "Fiction"
n = "Non Fiction"
classbooks = []
books = [['Walsh, Bill', 'Football', 'Sports', n], ['Adams, James', 'FakeBook', 'Porn', f]]
class Book:
def __init__(self, Author, Title, Genre, Fiction):
self.author = Author
self.title = Title
self.genre = Genre
self.fiction = Fiction

def sortAuthor():

for i in books:

>> No.68957469

The Sumerians are all dead; when would this ever be useful?

>> No.68957490

When using older systems.

>> No.68957518

Not him, but apply for an embedded job. It's not some unreachable pinnacle of programming.
I've only ever worked in a single embedded place, and most of the programmers and code were terrible. It was consumer-grade IOT garbage, which certainly didn't help.

I've now got a job doing systems programming for Linux (in C, of course), and it's much more satisfying.

>> No.68957561
File: 909 KB, 440x508, 1505707418411.gif [View same] [iqdb] [saucenao] [google] [report]

I apologize if this is more meant to go in /sqt/ but as someone who has next to no knowledge on programming, would anyone here have any recommended reading or some kind of resource for someone who's looking to get into programming starting with c#? Many books don't seem to be geared towards beginners, or they're just lacking exercises which is bit of a turn off. Or would I be better off starting with a different language?

>> No.68957573

>I've now got a job doing systems programming for Linux (in C, of course), and it's much more satisfying.
What kinds of things does your job entail?

>> No.68957574

First, remove your avatar. It's not needed. Second learn to google. Third, go back to /sqt/.

>> No.68957587

Start with C or python first.

>> No.68957600

Learn Lisp.

>> No.68957602

>Second learn to google
Because I totally haven't tried that already, right?

>> No.68957605

Please learn what an avatar actually is. Attaching an image to your post is not an avatar. Repeated attaching of the same character or thing to your posts, IS an avatar.

>> No.68957608
File: 2.17 MB, 1164x1738, 1532571916113.png [View same] [iqdb] [saucenao] [google] [report]

I got it through a recruiting thing at my university. Our most skilled software guy has been programming since he was a kid, and he is vehemently against us adopting C++ for anything (for many of the same reasons people on /g/ hate it). As a result, the meat of our codebase 100% standards-compliant C. Both he and our codebase are a joy to work with.

Again, one of my goals is for the language to be well-suited for embedded development. Thus, the following things are mandatory:
>not garbage collected (yes, I know Nim can be done without GC, but it's not the default and virtually all of its libraries require GC)
>compiler must not reorder structs
>no exceptions
Each of the things listed above is either not supported by Nim, or its support is poorly documented and assumes a high-level understanding of the language as a prerequisite.
I do like Nim, though, and I borrow some ideas from it. I use its square-bracketed syntax for generics, I use the same var/let syntax, and I use a loosely related style for lambdas.

>he doesn't approach things with an open mind
>he doesn't seek out the strengths in things, even if he doesn't like them overall
>he can't appreciate things that don't fit into his preconceived notions of how the world works
typical seething anti-anime poster

>> No.68957630 [DELETED] 

Avatar posting is against the rules. Last warning.

>> No.68957643

Where's the avatar? I can't see it.

>> No.68957672
File: 866 KB, 996x1000, 1543000339886.jpg [View same] [iqdb] [saucenao] [google] [report]

I'm remotely work for a place the contracting in some specialist areas.
Recently I was working on getting a bunch of custom changes upstreamed in some open-source software.
I shouldn't really go into too much detail about what I do, because most of it happens in "public" and probably wouldn't be too hard to find out who I was.

Sounds like an awesome guy/job. There is a difference between C-only dinosaurs who only use C because they refuse to learn anything else and C-only geniuses who only use C because they know it's actually the best.

>> No.68957682

I really hate moot for killing /prog/

>> No.68957727

python is slowest lenguage in the fucking world.

>> No.68957736

noice frog, mate

>> No.68957750

Ok stop fucking LARPers, you dont even code

Show me your lisp code right now

>> No.68957755

Strings may have advantages.

>> No.68957760

>lisp code

>> No.68957762
File: 188 KB, 1280x720, 1459584684448.jpg [View same] [iqdb] [saucenao] [google] [report]

>There is a difference between C-only dinosaurs who only use C because they refuse to learn anything else and C-only geniuses who only use C because they know it's actually the best.
Agreed, and I really didn't see it until I worked here. Some of these guys have been doing this stuff 30+ years, and at plenty of different companies. They've seen it all, at least relative to me.

>Last warning
rule 12, faglord

>> No.68957763

#.(loop for i from 1 to 100 do
(format t "~:[~:[~a~;Buzz~]~;Fizz~:[~;Buzz~]~]~%[email protected]*" (= 0 (mod i 3)) (= 0 (mod i 5)) i))

>> No.68957774

neither do you Karlie.

>> No.68957780

CL-USER> (defun add (x y)
(declare (type fixnum x y))
(declare (optimize (speed 3) (safety 0) (debug 0)))
(the fixnum (+ x y)))
CL-USER> (disassemble #'add)
; disassembly for ADD
; Size: 19 bytes. Origin: #x10036F4701
; 01: 84042500000F20 TEST AL, [#x200F0000] ; safepoint
; no-arg-parsing entry point
; 08: 4801F9 ADD RCX, RDI
; 0B: 488BD1 MOV RDX, RCX
; 0E: 488BE5 MOV RSP, RBP
; 11: F8 CLC
; 12: 5D POP RBP
; 13: C3 RET

Cniles hate me.

>> No.68957788

>rule 12
link to the rules if you want to be taken seriously

>> No.68957791

wtf is that ugly shit?

Not him.

>> No.68957793 [DELETED] 

Not programming related, because I'm drunk, but how do I get over a girl? She doesn't want me to care for her like that anymore and she's purposely distancing herself

>> No.68957796

cd code
cd ..
cd code
cd ..

>> No.68957798

stop being pathetic

>> No.68957800

#define bitreverse(_in_val) ({\
__auto_type out = _in_val;\
switch (sizeof(out)) {\
case 8:\
out = ((out & 0xFFFFFFFF00000000UL) >> 32) | ((out & 0x00000000FFFFFFFFUL) << 32);\
case 4:\
out = ((out & 0xFFFF0000FFFF0000UL) >> 16) | ((out & 0x0000FFFF0000FFFFUL) << 16);\
case 2:\
out = ((out & 0xFF00FF00FF00FF00UL) >> 8) | ((out & 0x00FF00FF00FF00FFUL) << 8);\
case 1:\
out = ((out & 0xF0F0F0F0F0F0F0F0UL) >> 4) | ((out & 0x0F0F0F0F0F0F0F0FUL) << 4);\
out = ((out & 0xCCCCCCCCCCCCCCCCCC) >> 2) | ((out & 0x333333333333333333) << 2);\
out = ((out & 0xAAAAAAAAAAAAAAAAAA) >> 1) | ((out & 0x555555555555555555) << 1);\

>> No.68957805


>> No.68957806

Stop drinking, faggot. Work on yourself, and move on.

>> No.68957809

He never said he was a admin, mod or jannie. Please take this off topic subject to /b/ as it is against the rules.

>> No.68957810

why do CS students always try to do stupid shit like making OSes or their own languages or compilers instead of something reasonable

>> No.68957816

I always get Nimfags recommending it to me, they don't seem to understand that GC is a no-go for anything that needs deterministic performance. I'd rather blow my brains out write Rust with the chunks than use a GCed language

>> No.68957824

Noob Python help, using pymysql

How do I execute 2 select queries on a page?

sql = "select * from table1"
sqlT = "select * from table2"
results = cursor.fetchall()
results2 = cursor.fetchall()

This doesn't work and probably doesn't work for an obvious reason but I can't find an answer.

>> No.68957825 [DELETED] 
File: 7 KB, 250x202, snapepe.jpg [View same] [iqdb] [saucenao] [google] [report]

Kill yourself, faggot.

>> No.68957829 [DELETED] 

It's not that I don't have options, I just like her

I'm drunk and like the people on this board

I drink to forget but I always remember

Over-zealousness, it's a common trait among most people

>> No.68957830

C was a mistake.

>> No.68957837

the animeposter is also a frogposter. Yikes.

>> No.68957838

Your mom and you were a mistake.

>> No.68957842


GC in Nim can be turned off.

>> No.68957848

Then turn off the GC, it's not hard.

>> No.68957850

new advent of code problem in about 17 mins

>> No.68957851 [DELETED] 
File: 6 KB, 250x164, 0776 - PvzVT60.jpg [View same] [iqdb] [saucenao] [google] [report]

>I'm a weeb
I hate anime and weebs. Die of AIDS, you dirty homosex.

>> No.68957862

No social life

>> No.68957867

is this part of the new school curriculum because when I was that age nobody acted like a know-it-all they just wanted to get shit done

>> No.68957868

>participating in a jewish tradition

>> No.68957870

If you aren't using any of the standard library then you might as well just write in C (like I already do)

>> No.68957878


mfw I just created a library for gc in C.

>> No.68957879

you can use the std without the GC, it's not coupled like D.

>> No.68957880

I decided to work on an OS because Linus did it at 21 and a schizo did it, so if I'm incapable of it I'm obviously a brainlet
t. 18 year old soph

>> No.68957887

You probably just didn't seek them out. Trust me they are all age ranges. Linus is a good example, altho he actually knows his shit so his elitism gets a pass.

>> No.68957899

>I decided to work on an OS
>18 year old soph
just stop dude do something productive with your life

>> No.68957903

My girlfriend dumped me and I have a solid month til the next semester, what the fuck else do I have

>> No.68957911

>My girlfriend
get your priorities straight and stop letting women rule your life.

>> No.68957917

start a business and become a billionaire

>> No.68957924

I don't even want money, I just want to feel like not an idiot.

>> No.68957945

teenage girlfriends don't matter, get over it

>> No.68957954

>I don't even want money
>I just want to feel like not an idiot

>> No.68957966

As someone very new to programming, I never actually even thought about what goes into *making* the programming languages. How does one even do that? What sorts tools does one use?

>> No.68957973
File: 661 KB, 600x600, 1486597032012.png [View same] [iqdb] [saucenao] [google] [report]

like the other anons said, GC can be disabled. Either way, the lack of bitfields is pretty much a dealbreaker for embedded. They're critical for abstracting hardware registers in any comprehensible fashion.
Nim is a good language, though. Keep an open mind to it. I find that it's awesome for writing little CLI tools and the like, since it feels like a scripting language but it isn't.

>wrote an OS kernel
>writing a compiler
>not a CS major
because it's fun. Why does my hobby have to be "reasonable," whatever the fuck that means in this context? It's a hobby, I'm not in it for the money, I do it because it's fun.

>> No.68957975

A post rater to specially tell me the odds of a post being a shitpost or not. I would say it's coming along pretty good since frogposters and wojakposters match 100% of the time and animeposters are right up there as well. I'm still working on getting subtle posts caught as well.

>> No.68957980

you just write a program that turns text into binary code

>> No.68957985

That sounds like pure AIDS

>> No.68957993

>>wrote an OS kernel
>>writing a compiler
you're the trendwhore cancer killing programming, congrats

>> No.68957995

>text isn't represented as binary
>he means op codes when he said binary


>> No.68958000

C is dead

>> No.68958003

Not to shit on your parade, but how would your algorithm account for posters specifically avoiding it?

>> No.68958029

What do you mean? Right now it's heavily based off a neural network i've trained on key phrases commonly associated with shitposting.

>> No.68958038

ur mom fagit

>> No.68958042

>more languages are bad

>> No.68958049

they are, especially when they're poorly thought out hobbyist projects by animeposters

>> No.68958055

I mean if your code and/or data was to leak, you know there would be a lot of people evading it, how would you solve for that?

>> No.68958058

>having more languages is good

>> No.68958060

All languages are variants of lisp

>> No.68958066

Well, I would just never share my code or data. It's closed source :3

>> No.68958068

>shitpost how all new langs are dedlangs and they'll never gain traction
>but somehow dedlangs are still affecting us

>> No.68958071

This, you can make literally any language inside lisp with macros

>> No.68958072

B A S E D, considering you're on /g/.

>> No.68958101

Relax, autismo. I wasn't in a flame war, but I thought your point that having a bunch of useless languages is good. You're not a new programmer, but when I was starting out, I wasted time with a bunch of useless shit languages because they were "new" and "better than x." It's all bullshit, and retards like you don't help.

>> No.68958102

>implying failure to gain traction is the problem

>> No.68958109

Even if anything were to leak the most they could do is start running their posts against my code to see what the prediction is and then to modify their posts until its within acceptable ranges. This would have to be done via code words and such and eventually cause the shitposter to be even less effective at getting his point across and likely just confusing everyone.

>> No.68958116

Fuck, I'm curious about your code but I don't want to help with CS shit

>> No.68958118

failure to innovate and stand out is.

0 support
0 reason to use over existing languages
waste of time, no few library support
and the list goes on.

I hate meme languages.

>> No.68958121

the problem is the new languages are worse than the ones they're trying to replace

>> No.68958132

>there's to many distros, how was i supposed to know XYZ are shit, people need to stop making new distros!
there is no problem.
new langs are good. Brings out new ideas, new inspirations, etc.
Just because you're a nitpicking cnile who will actively try to nitpick any language to death, doesn't make new langs bad.

>> No.68958139

new languages are only good if they're good, they're not good just because they're new
>Just because you're a nitpicking cnile

>> No.68958141
File: 417 KB, 1600x1064, mtgp.jpg [View same] [iqdb] [saucenao] [google] [report]

>there's to many distros, how was i supposed to know XYZ are shit, people need to stop making new distros!
>mental olympics 2018

>> No.68958145

It's really not as complex as you may think (which is the nice thing about using neural networks). Filtering and modeling your input data into the neural network and then having enough data to help train the neural network is the real problem. If you screw up there the whole thing can be bogus and give bad results.

>> No.68958148

I'm kind of learning that myself, anon. Outside of my Electrical Engineering stuff, I'm completely self-taught in programming. I just work my ass off and seek out help from more experienced people.
With regards to language design, I kinda just took things I liked from a bunch of different languages, and mashed them together until I had something semi-coherent. It helps that I had a goal in mind for the language's purpose, too.
>What sorts tools does one use
Check out Lex and Yacc. My understanding is that they are widely taught in university courses on compilers. They basically will automatically spit out your parser for you. I'm not using them, but they're pretty cool and very commonly used for prototype compilers.

>> No.68958151

There are very few new langs that don't have plenty of redeeming qualities. Just because they're not literally your perfect lang, doesn't make them bad.

>> No.68958152


Its really complicated.

Compilers are broken up into a bunch of stages:
1) scanning
2) parsing
3) semantic analysis
4) code generation

First a "scanner" takes source code and breaks it up into what are called "tokens". Those tokens form an abstract sentence that is passed into a "parser" which validates the grammer and creates a "parse tree". Finally you take the parse tree and create an "abstract syntax tree" which can be traversed to execute your program.

Alternatively you can traverse the AST and generate code that can be executed by a CPU or VM.

I've definitely left things out but w.e

> What sorts tools does one use?

I highly doubt people write scanners and parsers by hand ( they are a bitch to implement). Most people use "compiler generators" like javaCC, lalrpop , yacc+lex ,bison etc etc

>> No.68958156

If its not made in lisp I dont really care

>> No.68958171

kill yourself.

>> No.68958174
File: 7 KB, 198x183, really makes you function.png [View same] [iqdb] [saucenao] [google] [report]

>my hobby is killing your profession
you probably just suck at your job, then, anon.

>> No.68958175

By CS i meant cosed source

>> No.68958180

>I highly doubt people write scanners and parsers by hand
It's a lot more common than you think, and not particularly hard.
You can get much better error messages from a hand-written recursive descent parser.

>> No.68958184

Introducing a new language to the world increases the burden of knowledge required to program so your language better be worth that, because if it isn't then you've made programming worse for everyone
Does the world really need Go?

>I highly doubt people write scanners and parsers by hand ( they are a bitch to implement).
Unless a language has a pre-processor/macros you can write a parser in about 200 lines of code

>> No.68958198

I didn't mean my job, I just meant interest in the field in general, instead of being motivated by creating something good and something useful you're motivated by memes and trying to appear smart

>> No.68958201

Creating new languages > Trying to keep old ones around.
Reducing Entropy is a good thing. You should regularly go through old code and revision it all.

>> No.68958221

>t. retard

>> No.68958222

> Reducing entropy is good
> Creating new languages is good
> Contradiction = false
QED you're retarded.

>> No.68958250
File: 117 KB, 713x554, 1542475864799.jpg [View same] [iqdb] [saucenao] [google] [report]

topkek, I haven't seen anyone use that before on here.

>> No.68958263

>creator of Erlang is a retard
>a PhD in physics is a retard

>> No.68958334

What's new in C17?

>> No.68958344
File: 173 KB, 540x540, 1533977729368.png [View same] [iqdb] [saucenao] [google] [report]

please educate me on when hobbyists in any of the following fields ever produced anything "useful" by the standard you're holding me to:
>collectors (e.g. records, trading cards, stamps)
>model train enthusiasts
>anime fan artists
>bird watchers
>people who knit/crochet
>hikers, mountain climbers
I do systems software because I like doing systems software, so I wrote a kernel. I wanted to better understand the nature of the tools I use, so I'm playing around with writing a compiler. Not to mention, I have done plenty of other things, some of which might actually be useful depending on where you've arbitrarily placed the goalposts.
I also don't know where you got the assumption that I don't care about the quality of the things I create, but it's dead wrong. Even though it's only a hobby, I take pride in everything I do, regardless of whether I'm doing it to serve someone else's purposes.
If the sole purpose of what I'm doing is "creating something useful" then it isn't a fucking hobby, it's either resume padding or free labor.

>> No.68958350

C17 is just bug fixes.

>> No.68958370

Good. I was getting worried.

>> No.68958375

>posts disgusting frogs
>doesn't like cute girls
No, YOU are the homosex.

>> No.68958390

C2x is the next feature update standard. So far it doesn't have much to it, but it's not going to be finalized until 2022 likely.

>> No.68958398 [DELETED] 
File: 66 KB, 399x351, 1539158506229.jpg [View same] [iqdb] [saucenao] [google] [report]

I like cute, REAL women. Not anime, stupid weebpedo. Fucking faggots.

>> No.68958409

Your whole attitude is cancerous
That doing productive work is only to pad your resume or 'free labour' and the stuff you do for fun are useless projects with no point
Richard Stallman may be a retard but I'm starting to understand the dislike for wageslave programmers

>> No.68958421

>cute, REAL women
Nice oxymoron.

>> No.68958429 [DELETED] 

Fuck off with your weird fetishes, cum guzzler.

>> No.68958440

Why the anger frogposter or is this a falseflagger?

>> No.68958461 [DELETED] 
File: 129 KB, 422x437, 1064 - 209KNou.jpg [View same] [iqdb] [saucenao] [google] [report]

Seriously, fuck off with your off-topic bullshit.

>> No.68958479

she needs to join our startup

>> No.68958483

>Gustedt: The most important strong points of C are efficiency, portability and stability. Whenever those are the main concerns in software development, C should be considered as a primary choice.

>Stability: The C committee puts particular effort into guaranteeing the stability of the code base of our users. Deprecations are rare and marginal. Correct C code that you write now will still compile and run with very little effort 20 years from now; code that has been written in the 80s or 90s still kicks today. Also C has a limited set of features that should be mastered at graduate level in any good engineering school. So maintenance can be ensured over years and even decades. “Legacy” can have a very different taste with C; good C code can be a real asset and must not be a burden.
>Deprecations are rare and marginal.

This is why C will always be stuck in the past despite overwhelming support to get rid certain aspects, like errno, and do something that's smarter. I'm so upset that the proposed changes to errno have already gotten basically smashed by the committee from what i've read. I hope some of the members continue to push for it because not having proper error handling in 202x is just retarded.

>> No.68958496
File: 346 KB, 850x1223, 1528369126514.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.68958497

Based standards committee.
Nobody wants your shitty exceptions.

>> No.68958511 [DELETED] 
File: 48 KB, 502x384, 1232 - szrdj1f.jpg [View same] [iqdb] [saucenao] [google] [report]


>> No.68958517

No one said exceptions.
C is just too weak to have good, efficient, zero overhead error handling.

>> No.68958554

Most of the committee wants a better solution they just don't agree on how to do it and to keep >>68958517
in mind is a requirement along with other factors.

>> No.68958610

Are there any good books on opengl mathematics (using shaders) that are dedicated to 2d effects, and projection matrices, without going too deep into 3D?


>> No.68958632

all graphics programming guides are about 3D because 2D is fairly simple and a subset of 3D

>> No.68958668

Shucks, are there any good books on just general particle effects then? Good cartoony stuff? I don't care if the language is action script or anything (I kinda regret asking for a C/C++ book now, I don't see what the language really matters, just the end result does).

>> No.68958671
File: 339 KB, 1920x1080, we53q4vera563w4323qw4.gif [View same] [iqdb] [saucenao] [google] [report]

once again
>implying what I do isn't productive
>vague definition of "useful"
>putting words in my mouth
I never said that the ONLY thing productive work is for is padding your resume or free labor. what I said is that, if the ONLY thing I'm motivated by is making things that are "useful" in some arbitrary sense of the term, then I might as well be wageslaving.

However, you have said everything I do is motivated by memes, and all of it is useless. All of the things I create are useful in the sense that they provide value to me, because I learn by doing things. Making things of external value is obviously important, but I find that my more adventurous projects, even if they aren't useful to someone else, are useful to me because I learn new techniques, apply critical thinking skills, and learn new approaches to solving problems.
I sense that you don't care about personal value, however, so I'll throw in this: many of the things I create are useful to the other hobbyists who I work with online. We make stuff together, and we learn from each other. Our individual projects serve as valuable example pieces for other people in our little community, and our group projects directly benefit the community as a whole, as well as other folks who use the software some of us have written.

Go back to writing code for the sole purpose of making other people happy. I will continue doing things I like doing, because I like doing them. Cuck.

>> No.68958693


The concepts of 3d apply directly to 2d. You can skip over stuff that obviously doesn't apply to you, but you'll find most stuff does.

>> No.68958709
File: 150 KB, 496x1122, 1541900093146.jpg [View same] [iqdb] [saucenao] [google] [report]

>zero overhead error handling
>execution of error-handling code at runtime without the execution of code at runtime
pajeets actually think this is how it works

>> No.68958732

>I don't know what overhead is.

>> No.68958733

Providing 'value' to yourself and your community of autists isn't useful
Do you think you're going to be the next Linus
if anything Linux succeeded despite its hobbyist roots and not because of it
If Linux wasn't an OS written for people who liked tinkering it might actually be a viable alternative to Windows

>> No.68958738

stupid animeposter.

>> No.68958743

Is that Nicole kidman?

>> No.68958749

>blue square
>image search

>> No.68958755

Particle effects are extremely simple in essence
you have a position (x,y) which is modified by the velocity (x=x+vx,y=y+vy) and the velocity is modified by the acceleration (vx=vx*ax,vy=vy*ay)
apply the same formula to color, scale, rotation, apply a random offset upon creation and you have 90% of particle effects right there

>> No.68958799

>Providing 'value' to yourself and your community of autists isn't useful
if you really believe that, all you're doing is proving my point. You have no concept of personal value. Everything you do is for someone else.
>Do you think you're going to be the next Linus
no, I guess it'd be pretty cool though.
>if anything Linux succeeded despite its hobbyist roots and not because of it
Now that's a hot take
>If Linux wasn't an OS written for people who liked tinkering it might actually be a viable alternative to Windows
I'm not even sure what this has to do with my argument. What does Linux even have to do with my argument?

>> No.68958801

Do you guys use --std=c11 or --std=gnu11?

>> No.68958809


>> No.68958812

>You have no concept of personal value
No you have no concept of objective value
personal value and value to others to me is one and the same
that's how sane people should think
you're basically a kid building shit with lego well past your age

>> No.68958819

>C++ standard is still so broken that it's unusable
>let's go back to returning a value for error checking, just like what C has done for years without problems

>> No.68958826

>Exceptions are bad
>proceed to use setjmp

>> No.68958834
File: 107 KB, 2500x1250, npc-meme.jpg [View same] [iqdb] [saucenao] [google] [report]

>his entire sense of value is what he can provide to others
just admit it, anon

>> No.68958863

I said they're the same, one is not derived from the other, you're an eternal child playing with toys

>> No.68958884

>not goto
get on my level anon

>> No.68958971

-std=c11 and -D_POSIX_C_SOURCE=200809L

>> No.68958999

And that is why C++ is a horrible memelang that nobody should use.

>> No.68959030
File: 60 KB, 443x550, pp,550x550.u1.jpg [View same] [iqdb] [saucenao] [google] [report]

>implying that's a bad thing
my toys are my own technical and crtitical thinking skills. I'm quite good at my job as a result. It also just means that my sense of self, and my pride in my work, is decoupled from my paycheck. If you can't underatand how that works, then I can't help you.

>> No.68959070

And you're a backwards cave monkey, playing with your balls.

>> No.68959150

all you'll get here is a bunch of meme book recommendations (but at least they usually have anime girls attached)

>> No.68959276

There's nothing to misunderstand, you're just a child who will never amount to more than a worker bee

>> No.68959372

So I have Python 2.7.14 and 3.6.3 installed on my Ubuntu distro, and when I run my unit tests with Python (linked to the 2.7.14 python) they all pass despite one of my classes extending the Enum class (which was added in Python 3.4).
The same code on a colleague's machine fails, and they have Python 2.7.12 iirc.
So presumably my Python2 is finding the Enum module from Python3?

>> No.68959487

>Python 2
Anon please.

>> No.68959541

And google along with many other respectable companies ban them for some reason.
It's almost like they're an awful idea even if they were completely free.

>> No.68959593

This. Python other than scientific purposes is absolute shit.
Have to work with Django now and it fucking can't run multiple subdomains on it's retarded Daphne Server and because hurr durr reasons it's not compatible with Apache/Nginx either so I have to either programm middleware which I'm fucking not going to do or use different ports directly in the url which looks retarded.

Am I missing something or is Python Django really this worthless?
Only ever did webapps or whatever you want to call it in PHP with no issues whatsoever.

>> No.68959720

What language is the one on the left programming with?

>> No.68959761

timestamp faggot

>> No.68959789
File: 893 KB, 1422x800, Screenshot_2018-12-17 g - dpt - Daily Programming Thread - Technology - 4chan.png [View same] [iqdb] [saucenao] [google] [report]


>> No.68959809

Is D with betterC the most beautiful programming language or what? I don't think I'll be spending much more time with Rust now

>> No.68959810
File: 56 KB, 700x875, 253532523.jpg [View same] [iqdb] [saucenao] [google] [report]

Can i get a job with Python with Data or webshit if i don't have Science degree but have (will have) CS instead? Python seems to be on this weird edge that its a programming/scripting, but its also a tool for non-programmers

>> No.68959821

A CS degree alone these days is a meme, especially if all you want to do is python. Highly recommend you specialize in an application space as a minor.

>> No.68959822

That's really fucking cute.
no pedo.

>> No.68959826


>> No.68959847

>A CS degree alone these days is a meme
Only in Burgerland

>> No.68959856

thank you for posting this anon

>> No.68959870

We weren't talking about exceptions, and exceptions aren't zero overhead.
That's exactly why they're trying to replace them with a better system: >>68958738

>> No.68959878

D is a literal deadlang. Stop wasting your time.

>> No.68959905

guys i just figured out the harappan script, a dead language from near india that hasnt been translated in 4000 years
turns out it's just the D programming language

>> No.68959922

betterC is pretty good but I find GC useful.
Let's be honest here, no one ITT is writing the next NVidia driver for Linux, the GC = Bad meme is basically a jerking point for kernel dev LARPers.

>> No.68960049

GC is bad for games, which is the only thing (besides drivers) you shouldn't be programming in Javascript anyway.

>> No.68960095
File: 33 KB, 285x281, 1376813888542.jpg [View same] [iqdb] [saucenao] [google] [report]

>no one ITT is writing the next NVidia driver for Linux
The issue with Nvidia's blob is not necessarily the driver, but is the API for performing GPU memory allocations. Nobody wants to write driver-specific code, and their shitty EGLStreams are exactly that. Sure, you pushed it through Khronos to get it into EGL pretending that it's "standard", but if you're the only one who implements it, it's effectively a proprietary API.
Meanwhile, Mesa uses GBM to abstract over all of the allocations over all of its drivers, which even many proprietary ARM GPUs can use.
Which API are you going to think I'm going to pick? The open-source one that everybody uses, or the effectively proprietary one that only a single vendor uses? I'm not going out of my way to support both, especially since EGLStreams doesn't fit my rendering model.
God damn it Nvidia, you can really go fuck yourselves. I'd consider using liballocator if you fucking finished and it had any advantages over GBM, but with no commits in 10 months, I've given up hope.

You could say I'm somewhat knowledgeable about this area.

>> No.68960149

Why would you want exceptions in C?
That would literally ruin C.

>> No.68960155

It's good to know that the people on the standards committee actually understand C and why people want to use it.

>> No.68960170

C++ exception handling is unfixable. Don't even try - adding more shit is not going to help.

>> No.68960252

Is "dynamic" typing simply a dishonest term to give untyped languages recognition they don't deserve?

>> No.68960257

There are truly untyped languages that exist, like B, but dynamic typing isn't much of an improvement on that.

>> No.68960280

>c++ adds useful features
>"hurr durr bloat disgusting ergfhsdhdhdg"
>c finally adds some features
>beautiful. perfect. no language comes close.
Cniles are a joke.

>> No.68960290

That would by ruby or CL. Hasklel is pretty slow too.

>> No.68960297

It's how people who are too stupid for type theory rationalise their limitations.

>> No.68960302

I have never seen a CS major actually capable of those.

>> No.68960311


>> No.68960379

Rust is slow as fuck too, which is crazy because it uses LLVM and you'd think the autistic fucking borrow checker could help in optimizing your code, but apparently not

>> No.68960478

Heh, nothing personal kid.

>> No.68960497
File: 143 KB, 557x530, 1544967209628.jpg [View same] [iqdb] [saucenao] [google] [report]

What's a good resource for learning C#? I'm alright at Java, and I've read a few times in here that they're very similar with different libraries.

>> No.68960499

>Adding another kind of exception handling that implementers must implement and programmers must worry about
This fixes nothing.

>> No.68960500

>Rust is slow as fuck
That's an overstatement. Rust is decently fast. Though C and C++ still beat it slightly.

>> No.68960509

>This fixes nothing.
Except for the efficiency part. I.e. the most important bit and the bit every proper C++ programmer gives a shit about.

>> No.68960516

And the semantics get even more muddled than they already were.

>> No.68960521

Did you read the proposal?

>> No.68960555

Yeah. It introduces a new keyword, throws, which can annotate a function. It means there now two different kinds of exception handling (static and dynamic) with three different-exception related qualifiers a function can take (noexcept(false), noexcept(true) and throws).
That's overcomplicated. No sanely designed language does that, and growing the number of ways that any function can fail does not solve the problem of having too many ways a function can fail.

There's literally nothing wrong with return values. Return a [[nodiscard]] error code and be done with it. If you want to be fancy then use variants.

>> No.68960633
File: 26 KB, 667x66, file.png [View same] [iqdb] [saucenao] [google] [report]

This bothers me so much. It's just not true.
>you don't pay for what you don't use
If we ignore compile time this is true, that's fine. You can't expect unused language features to not cost at compile time.
>when you do use it you can't reasonably write it more effectively by hand.
Everyone knows this isn't true. Even if we consider ourselves incapable programmers. Compilers fail at optimizing away range based for loops for anything but the most trivial cases. Such a simple construct (from a semantic point of view) has a very heavy cost because failing to optimize this has reduced visibility for data access patterns. I'm not sure if they're deceiving themselves or if they're being dishonest. It's been this way for so long now I'm doubting their intentions.

>> No.68960634

>Rust is slow as fuck too
haha no

>> No.68960654

>(when (true) (print 'Wrong.'))
works on my machine
(def (true) #t)
(def print displayln)
(when (true) (print 'Wrong.'))
=> Wrong.'

>> No.68960660

>Compilers fail at optimizing away range based for loops for anything but the most trivial cases.
Guess what? You don't pay that price if you don't use range based for loops. I don't see how this is a retort.

>> No.68960662

Slower than C/C++ in all cases, sometimes significantly. And to get performant code you need to write in unsafe.

>> No.68960663

just do a real project

>> No.68960679

>when you do use it you can't reasonably write it more effectively by hand.
This is the claim. That's what I respond to. Yes of course just because they have ranged for in the language now doesn't mean all our typical C style for loops have gone to shit.
But the claim that 'you couldn't reasonably write it more effectively by hand'. Would either imply that they've made a perfect implementation for the feature (not true), or that the alternative (a simple for loop) would be worse.

>> No.68960695

(define-public (curryn function . args)
(lambda rest
(apply function
(let loop ((args (map reverse args)) (rest rest))
(if (null? args) rest
(loop (cdr args)
(apply insert
(cons* (caar args) (1- (cadar args)) (list rest)))))))))

>> No.68960696

>problem of having too many ways a function can fail.
This problem doesn't exist.
>There's literally nothing wrong with return values.
Except, you know, blocking the return channel.
>If you want to be fancy then use variants.
You do realize that the this exception proposal literally abstracts this. It's implemented by returning std::expected under the hood.
I guess that proves you didn't read the proposal.

>> No.68960726

>This problem doesn't exist.
The document itself acknowledges the problem in its opening paragraph.
>Except, you know, blocking the return channel.
You have out parameters, std::optional and std::variant don't you?
>You do realize that the this exception proposal literally abstracts this. It's implemented by returning std::expected under the hood.
I guess that proves you didn't read the proposal.
It shouldn't. This is not something that needs to be abstracted at the language level, this is something that needs a new stdlib header at most. A function is more easily understood than a language feature.

>> No.68960783

A range-based for loop is not the same thing as the more traditional for loop. It's syntactic sugar for calling the iterator under the hood.
If you can't index your structure numerically, or the ordering isn't trivial, the most logical way to iterate the structure is to provide an iterator, which will be used by the range based for loop.

>> No.68960790

It's a thin wrapper. A range based for loop is roughly the same as this classical for loop.
for (auto it = foo.begin(), end = foo.end(); it != end; ++it)


>> No.68960823
File: 134 KB, 1266x1824, Screenshot_2018-12-17 Rust vs C++ g++ - Which programs are faster Computer Language Benchmarks Game.png [View same] [iqdb] [saucenao] [google] [report]

>Slower than C/C++ in all cases
Why does /g/ relentlessly keep spreading fake news about Rust? How does it benefit them?

>> No.68960848

>It's syntactic sugar for calling the iterator under the hood.
Well, what did I say?

>> No.68960852

Jesus christ C++, what the fuck?
I can also imagine that disgusting type that the auto is hiding.

>> No.68960860

it's whatever type foo.begin() is, it could be as simple as a pointer

>> No.68960865

new thread

>> No.68960873

I'm trying to point out that a range-based for loop is a trivial transformation. It's little more than syntactic sugar, so it should be surprising if it does not optimise well.

If foo has type Foo, then foo.begin() usually has type Foo::iterator. Often this is just a struct with a single pointer as a member and a bunch of associated methods.

>> No.68960890

>It shouldn't. This is not something that needs to be abstracted at the language level, this is something that needs a new stdlib header at most. A function is more easily understood than a language feature.
t. cnile
You pretty much don't have an argument.

>> No.68960908

Declaring that someone else doesn't have an argument while ignoring the 2/3rds of their post that are nothing but arguments is not an argument.

>> No.68960939

>I'm trying to point out that a range-based for loop is a trivial transformation. It's little more than syntactic sugar, so it should be surprising if it does not optimise well.
It can't be optimized any better than manually writing the for loop using the iterator.
As I said before, you can certainly do better by using array subscripts, if you can, but that isn't really the same thing.
Using array subscripts first of all requires that the data structure provides an approproate operator[], and this can't always be done comfortably, depending on the structure (it may not make sense to index the structure). So it's not the same thing.

>> No.68961070

I am HTML programmer

Name (leave empty)
Comment (leave empty)
Password [?]Password used for file deletion.