Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "no compiler"
-
I want to pay respects to my favourite teacher by far.
I turned up at university as a pretty arrogant person. This was because I had about 6 years of self-taught programming experience, and the classes started from the ansolute basics. I turned up to my first classes and everything was extremely easy. I felt like I wouldn't learn anything for at least a year.
Then, I met one of my lecturers for the first time. He was about 50~60 years old and had been programming for all of his career. He was known by everyone to be really strict and we were told by other lecturers that it could be difficult for some people to be his student.
His classes were awesome. He was friendly, but took absolutely no shit, and told everything as it was. He had great stories from his life, which he used to throw out during the more boring computer science topics. He had extremely strict rules for our programming style, and bloody good reasons for all of them. If we didn't follow a clear rule on an assignment, he'd give us 0%. To prove how well this worked, nobody got 0%.
We eventually learned that he was that way because he used to work on real-time systems for the military, where if something didn't work then people could die.
This was exactly what I needed. In around one semester I went from a capable self-taught kid, to writing code that was clear, maintainable and fast, without being hacky.
I learned so much in just that small time, and I owe it all to him. So often when I write code now I think back to his rules. Even if I disagree with some, I learned to be strict and consistent.
Sadly, during the break between our first and second year, he passed away due to illness. There was so many lessons still to be learned from him, and there's now no teachers with enough knowledge to continue his best modules like compiler writing.
He is greatly missed, I've never had greater respect for a teacher than for him.21 -
This is more just a note for younger and less experienced devs out there...
I've been doing this for around 25 years professionally, and about 15 years more generally beyond that. I've seen a lot and done a lot, many things most developers never will: built my own OS (nothing especially amazing, but still), created my own language and compiler for it, created multiple web frameworks and UI toolkits from scratch before those things were common like they are today. I've had eleven technical books published, along with some articles. I've done interviews and speaking engagements at various user groups, meetups and conferences. I've taught classes on programming. On the job, I'm the guy that others often come to when they have a difficult problem they are having trouble solving because I seem to them to usually have the answer, or at least a gut feel that gets them on the right track. To be blunt, I've probably forgotten more about CS than a lot of devs will ever know and it's all just a natural consequence of doing this for so long.
I don't say any of this to try and impress anyone, I really don't... I say it only so that there's some weight behind what I say next:
Almost every day I feel like I'm not good enough. Sometimes, I face a challenge that feels like it might be the one that finally breaks me. I often feel like I don't have a clue what to do next. My head bangs against the wall as much as anyone and I do my fair share of yelling and screaming out of frustration. I beat myself up for every little mistake, and I make plenty.
Imposter syndrome is very real and it never truly goes away no matter what successes you've had and you have to fight the urge to feel shame when things aren't going well because you're not alone in those feelings and they can destroy even the best of us. I suppose the Torvald's and Carmack's of the world possibly don't experience it, but us mere mortals do and we probably always will - at least, I'm still waiting for it to go away!
Remember that what we do is intrinsically hard. What we do is something not everyone can do, contrary to all the "anyone can code" things people do. In some ways, it's unnatural even! Therefore, we shouldn't expect to not face tough days, and being human, the stress of those days gets to us all and causes us to doubt ourselves in a very insidious way.
But, it's okay. You're not alone. Hang in there and go easy on yourself! You'll only ever truly fail if you give up.32 -
The ability to convince the compiler that there's no errors.
"Shhhhhh.. trust me, there's such things as a duoble. Now just tell me the build was successful"2 -
1. Have some issue with my code which spits out cryptic compiler error.
2. Ask on stack overflow, Reddit, etc for a solution.
3. Get scolded at for "not reading the documentation" and "asking questions which could be answered by just Googling". Still no clue what I'm doing wrong, or what the solution would be.
4. Find someone else's vaguely related problem.
5. Post my problematic code as the answer, with arrogant comment about OP being a retard for not figuring that out for themselves.
6. A dozen angry toxic nerds flock in to tell me how retarded and wrong I am, correcting me... solving my original problem.
7. Evil plan succeeded, my code compiles, and as a bonus I made the internet a worse place in the process.
I think if you tell a bunch of autistic neckbeards that "all coronaviruses are fundamentally incurable", you'd have a vaccine within a week.15 -
When I was in the army I wasn't officially a dev. But one commander needed someone to develop a bunch of stuff and couldn't get a dev officially, so I ended up as his "assistant", which was an awesome job with about 60% time spent on software development.
Except I wasn't an official developer, so I wasn't afforded many of the privileges developers get, like a slightly more powerful machine, a copy of Visual Studio, or an internet connection. In this environment you couldn't even download files and transfer the to your computer without a long process, and I couldn't get development tools past that process anyway.
So I was stuck with whatever dev tools I had pre-installed with Windows. Thankfully, I had the brand new Windows XP, so I had the .Net framework installed, which comes with the command line compiler csc. I got to work with notepad and csc; my first order of business: write an editor that could open multiple files, and press F5 to compile and run my project.
Being a noob at the time, with almost no actual experience, and nobody supervising my work, I had a few brilliant ideas. For example, I one day realized I could map properties of an object to a field in a database table, and thus wrote a rudimentary OR/M. My database, I didn't mention, was Access, because that didn't need installation. I connected to it properly via ADO.NET, at least.
The most surprising thing though, in retrospect, is the stuff I wrote actually worked.14 -
*On a programming support forum*
Guy: My compiler keeps throwing null pointer exception at line 128.
Me: Ok. Can you post your code real quick so I could figure out what is null at line 128?
Guy: No I'm not going to show my code to someone on the internet. What if you want to steal my code?
My mind: "Dude wtf why would I steal someone's code on a support forum?"
Me: *Use the next 15 minutes explaining that showing the code is necessary so that others can actually help him, and that no one on a support forum is going to steal his code.*
Guy: "You know what I'm more convinced that you want to copy my code. I might as well just try to fix this on my own."
What?14 -
this.title = "gg Microsoft"
this.metadata = {
rant: true,
long: true,
super_long: true,
has_summary: true
}
// Also:
let microsoft = "dead" // please?
tl;dr: Windows' MAX_PATH is the devil, and it basically does not allow you to copy files with paths that exceed this length. No matter what. Even with official fixes and workarounds.
Long story:
So, I haven't had actual gainful employ in quite awhile. I've been earning just enough to get behind on bills and go without all but basic groceries. Because of this, our electronics have been ... in need of upgrading for quite awhile. In particular, we've needed new drives. (We've been down a server for two years now because its drive died!)
Anyway, I originally bought my external drive just for backup, but due to the above, I eventually began using it for everyday things. including Steam. over USB. Terrible, right? So, I decided to mount it as an internal drive to lower the read/write times. Finding SATA cables was difficult, the motherboard's SATA plugs are in a terrible spot, and my tiny case (and 2yo) made everything soo much worse. It was a miserable experience, but I finally got it installed.
However! It turns out the Seagate external drives use some custom drive header, or custom driver to access the drive, so Windows couldn't read the bare drive. ffs. So, I took it out again (joy) and put it back in the enclosure, and began copying the files off.
The drive I'm copying it to is smaller, so I enabled compression to allow storing a bit more of the data, and excluded a couple of directories so I could copy those elsewhere. I (barely) managed to fit everything with some pretty tight shuffling.
but. that external drive is connected via USB, remember? and for some reason, even over USB3, I was only getting ~20mb/s transfer rate, so the process took 20some hours! In the interim, I worked on some projects, watched netflix, etc., then locked my computer, and went to bed. (I also made sure to turn my monitors and keyboard light off so it wouldn't be enticing to my 2yo.) Cue dramatic music ~
Come morning, I go to check on the progress... and find that the computer is off! What the hell! I turn it on and check the logs... and found that it lost power around 9:16am. aslkjdfhaslkjashdasfjhasd. My 2yo had apparently been playing with the power strip and its enticing glowing red on/off switch. So. It didn't finish copying.
aslkjdfhaslkjashdasfjhasd x2
Anyway, finding the missing files was easy, but what about any that didn't finish? Filesizes don't match, so writing a script to check doesn't work. and using a visual utility like windirstat won't work either because of the excluded folders. Friggin' hell.
Also -- and rather the point of this rant:
It turns out that some of the files (70 in total, as I eventually found out) have paths exceeding Windows' MAX_PATH length (260 chars). So I couldn't copy those.
After some research, I learned that there's a Microsoft hotfix that patches this specific issue! for my specific version! woo! It's like. totally perfect. So, I installed that, restarted as per its wishes... tried again (via both drag and `copy`)... and Lo! It did not work.
After installing the hotfix. to fix this specific issue. on my specific os. the issue remained. gg Microsoft?
Further research.
I then learned (well, learned more about) the unicode path prefix `\\?\`, which bypasses Windows kernel's path parsing, and passes the path directly to ntfslib, thereby indirectly allowing ~32k path lengths. I tried this with the native `copy` command; no luck. I tried this with `robocopy` and cygwin's `cp`; they likewise failed. I tried it with cygwin's `rsync`, but it sees `\\?\` as denoting a remote path, and therefore fails.
However, `dir \\?\C:\` works just fine?
So, apparently, Microsoft's own workaround for long pathnames doesn't work with its own utilities. unless the paths are shorter than MAX_PATH? gg Microsoft.
At this point, I was sorely tempted to write my own copy utility that calls the internal Windows APIs that support unicode paths. but as I lack a C compiler, and haven't coded in C in like 15 years, I figured I'd try a few last desperate ideas first.
For the hell of it, I tried making an archive of the offending files with winRAR. Unsurprisingly, it failed to access the files.
... and for completeness's sake -- mostly to say I tried it -- I did the same with 7zip. I took one of the offending files and made a 7z archive of it in the destination folder -- and, much to my surprise, it worked perfectly! I could even extract the file! Hell, I could even work with paths >340 characters!
So... I'm going through all of the 70 missing files and copying them. with 7zip. because it's the only bloody thing that works. ffs
Third-party utilities work better than Microsoft's official fixes. gg.
...
On a related note, I totally feel like that person from http://xkcd.com/763 right now ;;21 -
I've got a mini stroke today. My project ended and I got delegated elsewhere.
"It's going to be fine, it's c++, you will find yourself there"
Suspicious, it's a project everybody was staying out of as hard as they can. But hey, it's cool, how bad can it be? what can go wrong with that?
Reality was brutal, project that uses Boost C++ as framework and bjam as builder. Builds with a decent dose of luck, and only under special circumstances, only under one specific version of compiler. No docs, quartet of the code is in Fortran, just to use ancient lisp part which was second qarter. The most senior Dev around does not have idea how it all works. Also everything is inside one enormous try/catch block. Because of the reasons.
That's how people end up with severe alcoholism and meth addiction.8 -
Me talking to a recruiter (even though I am not looking for a job)
Me: If I walk into an interview, and they ask me to reverse a binary tree for a frontend Reac or Vue position or something along those lines, I will end the call and/or walk away from it.
Him: I get similar feelings from other programmers, I don't quite understand why the notion is as common
Me: Because it is fucking useless, it servers no purpose to a dev to know about that when building frontends with react, I link my github profile, for which they can find advanced backend-frontend related projects, compiler and interpreter projects, plus the title I currently have at my workplace and a bunch of other shit, I am not interviewing for a teaching position at an institute, but an actual place of work, for which if they want to know about DS and A they can review my profile which has a repo of DS and A in about 5 different languages including plain C++. I do not need to be offended by such notions since they server no purpose on the frontend, and neither do other devs. If anything it should be a casual conversation during the interview, not a basis for employment.
Recruiter: .........thank you for explaining this to me, I am sure I can bring it up to the agencies doing the reviews and interviews. Are you still interested?
Me: Are they going to give me a coding assignment for a project or a bs question like what I mentioned?
Him: I don't know
Me: then I am not interested12 -
Friend: dude, JavaScript seems awesome. It looks so easy and there aren't any annoying compiler errors like in Java
Me: I know it sounds cool in theory, but it sucks in practice, trust me
Friend: no way, dynamically typed languages are the future
*Friend installs node*
*Friend writes a simple script*
*Friend gets undefined errors because of a few typos and has a hard time debugging it*
Friend: JavaScript is retarded
-_-13 -
At an interview, the first round was an online coding round. Two questions, one easy one hard, 90 minutes, easy peasy.
I solved the hard one first.
A bit of good logic, followed MVC pattern, all done. Worked flawlessly.
Submitted code. Online compiler threw up an internal error citing java is an invalid command(jdk not found).
Called the invigilators. What I heard next, I couldn't believe this shit.
"We're not responsible for any errors you may be having. Figure it out yourself"
I was like WTF dude. This is not even a compilation or runtime error!
After a heated discussion, I made him look at the code.
Him - what is all this classes and all? Why haven't you written everything inside the main function?
Me - those are model classes. Those are different helper functions. That is a recursive function to avoid 5 for loops and use divide and conquer. Ever heard of OOP? what kind of person writes a 300 line program inside one function?
Him - no no we write it like that only. Correct this.
Me - I fit everything inside the main function. Still the same error, java not installed. Called the idiot to have a look at it.
Him - yeah your code is wrong.
Me - may I know what's wrong with it? Can you fix it please?
Him - no no we aren't allowed to see the code (he had already read it twice. It was compiling and running perfectly, locally) .
Yeah you solved only 1 problem, you were supposed to solve 2.
Me - yes because the rest of the time I had the pleasure of your company. (It isn't everyday that I see talking buffoons.)11 -
> le server suddenly stops working, no boot, no POST, no beeps, no video
*le frantic cursing on how perhaps that's why the fucking thing was only €60 🤬*
*takes out RAM*
> le server still not booting
*places RAM back without doing anything else*
> le server boots up again
🤔🤔🤔
Is this what they mean with things like "compile it again and somehow the compiler will not complain anymore after a while"?16 -
My first poem for programmer girl 😘😘😘
My life is incomplete without you,
You are semicolon of my life
You are my increment operator,
you make my value increases
I am username and you are my password,
without you No one can access me
You are my initializer,
without you my life would point to nothing (NULL or “0”)
If I were a function you must be my parameter,
Because I will always need you
Can you be my private variable?
I want to be only one who can access you
You are my compiler,
My life wouldn’t start without you
You are my loop condition ,
I keep coming back to you
My love to you is like recursive function,
It will never ends & Will never enter into infinite loop
Forever and Ever10 -
I know a guy who writes everything in Haskell.
He started learning it because his parents got him into a math school (and math schools in Russia use either Python or Haskell), he liked it, but later he dropped out. Today, apart from Haskell, he only really knows HTML and CSS, and maybe some JavaScript.
He writes backend AND frontend in Haskell and uses some kind of JRPC stuff to manage all that. He told me that his life is a pure heaven. He IS RELEVANT (!!!!!!), his apps always run without bugs (because in Haskell you can mathematically prove that there are no bugs), they are performant, faster than C (because you can't write a complex enough app in C that will be as efficient as compiled Haskell, because it's you vs compiler). He doesn't have any problems in life whatsoever. He never got burned out, he never got anxiety or depression. He doesn't act pretentiously and stuff, he's just a normal person who rarely even mentions that he can program.
Science says it can't be done! You can't only know Haskell and be a relevant software engineer! You know what, he didn't _know_ it was impossible. He's like that grandpa from a meme, he got Alzheimers, but because of it he forgot that he had Alzheimers, and now remembers everything.
The fun thing is that he looks like a typical gopnik, with adidas suits and stuff.
What a gem of a person.26 -
Let the student use their own laptops. Even buy them one instead of having computers on site that no one uses for coding but only for some multiple choice tests and to browse Facebook.
Teach them 10 finger typing. (Don't be too strict and allow for personal preferences.)
Teach them text navigation and editing shortcuts. They should be able to scroll per page, jump to the beginning or end of the line or jump word by word. (I am not talking vi bindings or emacs magic.) And no, key repeat is an antifeature.
Teach them VCS before their first group assignment. Let's be honest, VCS means git nowadays. Yet teach them git != GitHub.
Teach git through the command line. They are allowed to use a gui once they aren't afraid to resolve a merge conflict or to rebase their feature branch against master. Just committing and pushing is not enough.
Teach them test-driven development ASAP. You can even give them assignments with a codebase of failing tests and their job is to make them pass in the beginning. Later require them to write tests themselves.
Don't teach the language, teach concepts. (No, if else and for loops aren't concepts you god-damn amateur! That's just syntax!)
When teaching object oriented programming, I'd smack you if do inane examples with vehicles, cars, bikes and a Mercedes Benz. Or animal, cat and dog for that matter. (I came from a self-taught imperative background. Those examples obfuscate more than they help.) Also, inheritance is overrated in oop teachings.
Functional programming concepts should be taught earlier as its concepts of avoiding side effects and pure functions can benefit even oop code bases. (Also great way to introduce testing, as pure functions take certain inputs and produce one output.)
Focus on one language in the beginning, it need not be Java, but don't confuse students with Java, Python and Ruby in their first year. (Bonus point if the language supports both oop and functional programming.)
And for the love of gawd: let them have a strictly typed language. Why would you teach with JavaScript!?
Use industry standards. Notepad, atom and eclipse might be open source and free; yet JetBrains community editions still best them.
For grades, don't your dare demand for them to write code on paper. (Pseudocode is fine.)
Don't let your students play compiler in their heads. It's not their job to know exactly what exception will be thrown by your contrived example. That's the compilers job to complain about. Rather teach them how to find solutions to these errors.
Teach them advanced google searches.
Teach them how to write a issue for a library on GitHub and similar sites.
Teach them how to ask a good stackoverflow question :>6 -
"Fatal Error"
Exceptions? No, let's just halt the entire program.
Apparently a CS professor wrote this code.
"Needed to keep the compiler happy"17 -
Online tutorial pet peeves
————————————
My top 10 points of unsolicited ranting/advice to those making video tutorials:
1. Avoid lots of pauses, saying “umm” too much, or other unnecessary redundancy in speech (listen to yourself in a recording)
2. If I can’t understand you at 1.5 - 2x playback speed and you don’t already speak relatively quickly and clearly, I’m probably not going to watch for long (mumbling, inconsistent microphone volume, and background noise/music are frequent culprits)
3. It’s ok to make mistakes in a tutorial, so long as you also fix them in the tutorial (e.g., the code that is missing a semicolon that all of a sudden has one after it compiles correctly — but no mention of fixing it or the compiler error that would have been received the first time). With that said, it’s fine to fix mistakes pertinent to the topic being taught, but don’t make me watch you troubleshoot your non-relevant computer issues or problems created by your specific preferences (e.g., IDE functionality not working as expected when no specific IDE was prescribed for the tutorial)
4. Don’t make me wait on your slow computer to do something in silence—either teach me something while it’s working or edit the video to remove the lull
5. You knew you were recording your screen. Close your email, chat, and other applications that create notifications before recording. Or at least please don’t check them and respond while recording and not edit it out of the video
6. Stay on topic. I’m watching your video to learn about something specific. A little personality is good, but excessive tangents are often a waste of my time
7. [Specific to YouTube] Don’t block my view of important content with annotations (and ads, if within your control)
8. If you aren’t uploading quality HD recordings, enlarge your font! Don’t make me have to guess what character you typed
9. Have a game plan (i.e., objectives) before hitting the record button
10. Remember that it’s easier to rant and complain than to do something constructive. Thank you for spending your time making tutorial videos. It’s better for you to make videos and commit all my pet peeves listed above than to not make videos at all—don’t let one guy’s rant stop you from sharing your knowledge and experience (but if it helps you, you’re welcome—and you just might gain a new viewer!)14 -
Ok. Yesterday I finished building my compiler I have to say: it was a pretty darn big thing with 7000 Lines of code.
I did it alone and with almost no help.
I wanted to give some advice in case someone wants to program a compiler. I knaw its useless in times of lex and yacc, but anyway.
-have a good idea for the language
-learn about parser/lexer
-learn assembler
-do it like me: output the assembler to a file and let it assemble/link by the linux standart-tools (call the commands)
-Have fun. Fun is essential in coding
I hope I was able to help people who want to build a compiler alone... Yau can always ask questions ;~)
-3 -
❤️ Swift ❤️
for (i = 0; i < polygon.count; i++) {
// some print statement
} **
This highly advanced and futuristic piece of code made the Swift compiler eat 14+ GB of RAM while trying to syntax-highlight, before crashing my 8 GB-equipped Macbook.
** yeah, "C-style 'for' loopz syntaxx deprecated since Swift 3 blah blah". Let's reinvent an industry-standard for no goddam reason, because Swift is the FUTURE, oh, and because fuck you by the way.3 -
I'm working on a programming language with a "bytecode" interpreter and a compiler that translates source code to said bytecode and... it sort of actually works!
I want to recreate an Erlang-style environment, currently you can write functions, call C++ functions via wrappers, have immutable-only values, and it has no explicit control structure apart from statement sequencing and the if-expression because I want to make it as functional as possible. Next thing on the list is to add a green threads implementation and ability to spawn and send messages to processes.
Still a WIP and heck even design-in-progress.
Now for the rant:
I'm using CMake for building C++ (interpreter) and Stack for Haskell (compiler) and I've been trying to get them to talk to each other for hours because I want CMake to manage the Stack build too and shove all the executables into one place. CMake documentation is weird and Stack isn't too helpful either, so I guess I'll just spend another few hours trying to get Stack to fuckin reveal its build directory to CMake and/or build to a given directory. Ugh.8 -
I'm currently rewriting perfectly clean and functioning Scala code in Java (because "Enterprise", yay). The amount of unnecessary boilerplate I have to add is insane. I'm not even talking big complicated code but two liners or the lack of simple things like a range from 5 to 10.
Why do I have to write
List<Position> occupiedPositions = placedEntities.stream()
.flatMap((pe) -> pe.occupiedPositions().stream())
.collect(Collectors.toList());
instead of simply
val occupiedPositions = placedEntities.flatMap(_.occupiedPositions)
Why on earth does `occupiedPositions.distinct` suddenly become a monstrosity like `occupiedPositions.stream().distinct().collect(Collectors.toList())` where the majority of code is pure boilerplate? And this is supposed to be the new and better Java8 api which people use as evidence that Java is now suddenly "functional" (yeah no, just no).
Why do APIs that annotate parameters with @Nullable throw NullPointerExceptions when I pass a null? Why does the compiler not help prevent such stupidity? Why do we use static typing PLUS those annotations and it still crashes at runtime like every damn dynamic, interpreted language out there? That's not unfortunate, it's a complete waste of time.
Why is a simple idea like a range from x to 10 (in scala literally `x to 10`) not by default included in Java? There's Guava's version of Range which does not have a helper for integer ranges (even though they are the most used ones). Then there's apache.commons version which _has_ a helper for integers, but is strangely not iterable (wtf I don't even...).
Speaking of Iterable: How difficult could it be to convert an abstract Iterable<T> into a concrete List<T>? In scala it's surprisingly `someIterable.toList`. I found nothing like that so I took to stackoverflow where I found a thread in which people suggested everything from writing your own ListUtils helper class, using Guava (which is a huge dependency!) to using the new Java8 features inline (which is still about three lines long). I didn't know this was such a hard problem in computer science, TIL.
How anyone can be productive in this abomination of a language is beyond me now, even though I've used it for many years while learning to code (back then I didn't know there were much better ways to do things). The only good part is that I have to endure this nonsense for only about 3 days longer then I'm free again!12 -
I could bitch about XSLT again, as that was certainly painful, but that’s less about learning a skill and more about understanding someone else’s mental diarrhea, so let me pick something else.
My most painful learning experience was probably pointers, but not pointers in the usual sense of `char *ptr` in C and how they’re totally confusing at first. I mean, it was that too, but in addition it was how I had absolutely none of the background needed to understand them, not having any learning material (nor guidance), nor even a typical compiler to tell me what i was doing wrong — and on top of all of that, only being able to run code on a device that would crash/halt/freak out whenever i made a mistake. It was an absolute nightmare.
Here’s the story:
Someone gave me the game RACE for my TI-83 calculator, but it turned out to be an unlocked version, which means I could edit it and see the code. I discovered this later on by accident while trying to play it during class, and when I looked at it, all I saw was incomprehensible garbage. I closed it, and the game no longer worked. Looking back I must have changed something, but then I thought it was just magic. It took me a long time to get curious enough to look at it again.
But in the meantime, I ended up played with these “programs” a little, and made some really simple ones, and later some somewhat complex ones. So the next time I opened RACE again I kind of understood what it was doing.
Moving on, I spent a year learning TI-Basic, and eventually reached the limit of what it could do. Along the way, I learned that all of the really amazing games/utilities that were incredibly fast, had greyscale graphics, lowercase text, no runtime indicator, etc. were written in “Assembly,” so naturally I wanted to use that, too.
I had no idea what it was, but it was the obvious next step for me, so I started teaching myself. It was z80 Assembly, and there was practically no documents, resources, nothing helpful online.
I found the specs, and a few terrible docs and other sources, but with only one year of programming experience, I didn’t really understand what they were telling me. This was before stackoverflow, etc., too, so what little help I found was mostly from forum posts, IRC (mostly got ignored or made fun of), and reading other people’s source when I could find it. And usually that was less than clear.
And here’s where we dive into the specifics. Starting with so little experience, and in TI-Basic of all things, meant I had zero understanding of pointers, memory and addresses, the stack, heap, data structures, interrupts, clocks, etc. I had mastered everything TI-Basic offered, which astoundingly included arrays and matrices (six of each), but it hid everything else except basic logic and flow control. (No, there weren’t even functions; it has labels and goto.) It has 27 numeric variables (A-Z and theta, can store either float or complex numbers), 8 Lists (numeric arrays), 6 matricies (2d numeric arrays), 10 strings, and a few other things like “equations” and literal bitmap pictures.
Soo… I went from knowing only that to learning pointers. And pointer math. And data structures. And pointers to pointers, and the stack, and function calls, and all that goodness. And remember, I was learning and writing all of this in plain Assembly, in notepad (or on paper at school), not in C or C++ with a teacher, a textbook, SO, and an intelligent compiler with its incredibly helpful type checking and warnings. Just raw trial and error. I learned what I could from whatever cryptic sources I could find (and understand) online, and applied it.
But actually using what I learned? If a pointer was wrong, it resulted in unexpected behavior, memory corruption, freezes, etc. I didn’t have a debugger, an emulator, etc. I had notepad, the barebones compiler, and my calculator.
Also, iterating meant changing my code, recompiling, factory resetting my calculator (removing the battery for 30+ sec) because bugs usually froze it or corrupted something, then transferring the new program over, and finally running it. It was soo slowwwww. But I made steady progress.
Painful learning experience? Check.
Pointer hell? Absolutely.4 -
First dev job: port Unix on Transputer, a (now defunct) bizarre processor with no stack, no registers and no compiler. That was fun! And that was in 1991 😎3
-
Interesting bug hunt!
Got called in because a co-team had a strange bug and couldn't make sense of it. After a compiler update, things had stopped working.
They had already hunted down the bug to something equivalent to the screenshot and put a breakpoint on the if-statement. The memory window showed the memory content, and it was indeed 42. However, the debugger would still jump over do_stuff(), both in single step and when setting a breakpoint on the function call. Very unusual, but the rest worked.
Looking closer, I noticed that the pointer's content was an odd number, but was supposed to be of type uint32_t *. So I dug out the controller's manual and looked up the instruction set what it would do with a 32 bit load from an unaligned address: the most braindead thing possible, it would just ignore the lowest two address bits. So the actual load happened from a different address, that's why the comparison failed.
I think the debugger fetched the memory content bytewise because that would work for any kind of data structure with only one code path, that's how it bypassed the alignment issue. Nice pitfall!
Investigating further why the pointer was off, it turned out that it pointed into an underlying array of type char. The offset into the array was correctly divisible by 4, but the beginning had no alignment, and a char array doesn't need one. I checked the mapfiles and indeed, the old compiler had put the array to a 4 byte boundary and the new one didn't.
Sure enough, after giving the array a 4 byte alignment directive, the code worked as intended.8 -
EEEEEEEEEEEE Some fAcking languages!! Actually barfs while using this trashdump!
The gist: new job, position required adv C# knowledge (like f yea, one of my fav languages), we are working with RPA (using software robots to automate stuff), and we are using some new robot still in beta phase, but robot has its own prog lang.
The problem:
- this language is kind of like ASM (i think so, I'm venting here, it's ASM OK), with syntax that burns your eyes
- no function return values, but I can live with that, at least they have some sort of functions
- emojies for identifiers (like php's $var, but they only aim for shitty features so you use a heart.. ♥var)
- only jump and jumpif for control flow
- no foopin variable scopes at all (if you run multiple scripts at the same time they even share variables *pukes*)
- weird alt characters everywhere. define strings with regular quotes? nah let's be [some mental illness] and use prime quotes (‴ U+2034), and like ⟦ ⟧ for array indexing, but only sometimes!
- super slow interpreter, ex a regular loop to count to 10 (using jumps because yea no actual loops) takes more than 20 seconds to execute, approx 700ms to run 1 code row.
- it supports c# snippets (defined with these stupid characters: ⊂ ⊃) and I guess that's the only c# I get to write with this job :^}
- on top of that, outdated documentation, because yea it's beta, but so crappin tedious with this trail n error to check how every feature works
The question: why in the living fartfaces yolk would you even make a new language when it's so easy nowadays to embed compilers!?! the robot is apparently made in c#, so it should be no funcking problem at all to add a damn lua compiler or something. having a tcp api would even be easier got dammit!!! And what in the world made our company think this robot was a plausible choice?! Did they do a full fubbing analysis of the different software robots out there and accidentally sorted by ease of use in reverse order?? 'cause that's the only explanation i can imagine
Frillin stupid shitpile of a language!!! AAAAAHHH
see the attached screenshot of production code we've developed at the company for reference.
Disclaimer: I do not stand responsible for any eventual headaches or gauged eyes caused by the named image.
(for those interested, the robot is G1ANT.Robot, https://beta.g1ant.com/)4 -
[long]
When searching for internship via school I found this small startup with this cute project of building a teaching tool for programming. There were back then 2 programmers: the founder and the co-founder.
Then like 1 week before the internship started, the co-founder had a burnout and had to get off the project, while the company was so low on budget the founder, aka my new b0ss, had to work separate jobs to keep the company alive. (quite metal tbh)
It's funny because I'm a junior developer, 100%. I've been coding as a hobby for around 8 years now but I've never worked in a big company before. (No exception to this workplace either)
First project I get: rewrite the compiler. The Python compiler.
"But wait, why not just embed a real compiler from the first case?"
-nanananana it's never simple, as you probably know from your own projects.
The new compiler, as compared to existing embedded compiler solutions out there, needed these prime features:
- Walk through the code (debugger style), but programmatically.
- Show custom exceptions (ex: "A colon is needed at the end of an if-statement" instead of "Syntax error line 3")
- Have a "Did-you-mean this variable?" error for usage of unassigned variables.
- Be able to be embedded in Unity's WebGL build target
All for the use case of being a friendly compiler.
The last dash in the list is actually the biggest bottleneck which excluded all existing open-source projects (i could find). Compliant with WebAssembly I can't use threads among other things, IL2CPP has lots of restrictions, Unity has some as well...
Oh and it should of course be built using test-driven development.
"Good luck!" - said the founder, first day of work as she then traveled to USA for **3 weeks**, leaving me solo with the to-be-made codebase and humongous list of requirements.
---
I just finished the 6th week of internship, boss has been at "HQ" for 3 weeks now, and I just hit the biggest milestone yet for this project.
Yes I've been succeeding! This project has gone so well, and I'm surprising myself how much code I've been pumping out during these weeks.
I'm up now at almost 40'000 lines of source and 30'000 lines of code. ‼
( Biggest project I've ever worked on previously was at 8'000 lines of code )
The milestone (that I finished today) was for loops! As been trying to showcase in the GIF.
---
It's such a giant project and I can honestly say I've done some good work here. Self-five. Over-performing is a thing.
The things that makes me shiver though is that most that use this application will never know the intricates of it's insides, and the brain work put into it.
The project is probably over-engineered. A lot. Having a home-made compiler gives us a lot of flexibility for our product as we're trying to make more of a "pedagogic IDE". But no matter that I reinvented the wheel for the 105Gth time, it's still the most fun I've had with a project to date.
---
Also btw if anyone wants to see source code, please give me good reasons as I'm actively trying to convince my boss to make the compiler open-source.
Cheers!4 -
See, static typing? that shit is for putos. You think you're so cool with your advanced intellisense being able to tell you "yo....dat shit ain't the type you think it is" or your compiler telling you "yo dumbass, you fucked this parameter up in here, you are doing <x> when in reality you should be doing #@$@#$@!<X at line !@#@#$#>"
pfffft static typing. Such a pansy ass thing to worry about.
Picture us, working outside of the safety net of static typing, as jungle explorers, walking slowly, with a machete in hand and our other hand clutched tightly at our hip pistol, not knowing what to shoot at, but eagerly prepared for when shit fucks up because whatever the fuck you did was not properly safeguarded by a compiler to tell you that you fucked up, even if the compiler message is unintelligible (looking at you C and C++)
We is men here, we is brave retarded adventurers.
As our sanity blips into oblivion and we look at our code that has no sort of type checking expecting our shitty intellisense extensions to protect us....
Edit: if you can't understand the sarcasm in here and the plea for sanity then you are obviously a retard and have no place in the world of development21 -
Is it just me who sees this? JS development in a somewhat more complex setting (like vue-storefront) is just a horrible mess.
I have 10+ experience in java, c# and python, and I've never needed more than a a few hours to get into a new codebase, understanding the overall system, being able to guess where to fix a given problem.
But with JS (and also TS for that matter) I'm at my limits. Most of the files look like they don't do anything. There seems to be no structure, both from a file system point of view, nor from a code point of view.
It start with little things like 300 char long lines including various lambdas, closures and ifs with useless variables names, over overly generic and minified method/function names to inconsistent naming of files, classes and basically everything else.
I used to just set a breakpoint somewhere in my code (or in a compiled dependency) wait this it is being hit and go back and forth to learn how the system state changes.
This seems to be highly limited in JS. I didn't find the one way to just being able to debug, everything that is. There are weird things like transpilers, compiler, minifiers, bablers and what not else. There is an error? Go f... yourself ...
And what do I find as the number one tipp all across the internet? Console.log?? are you kidding me, sure just tell me, your kidding me right?
If I would have to describe the JS world in one word, I would use "inconsistency". It's all just a pain in the ass.
I remember when I switcher from VisualStudio/C# to Eclipse/Java I felt like traveling back in time for about 10 years. Everyting seemd so ... old-schoolish, buggy, weird.
When I now switch from java to JS it makes me feel the same way. It's all so highly unproductive, inconsistent, undeterministic, cobbled together.
For one inconveinience the JS communinity seems to like to build huge shitloads of stuff around it, instead of fixing the obvious. And noone seems to see that.
It's like they are all blinded somehow. Currently I'm also trying to implement a small react app based on react-admin. The simplest things to develop and debug are a nightmare. There is so much boilerplate that to write that most people in the internet just keep copying stuff, without even trying to understand what it actually does.
I've always been a guy that tries to understand what the fuck this code actuall does. And for most of the parts I just thing, that the stuff there is useless or could be done in a way more readable way. But instead, all the devs out there just seem to chose the "copy and fix somehow-ish" way.
I'm all in for component-izing stuff. I like encapsulation, I'm a OOP guy by heart. But what react and similar frameworks do is just insane. It's just not right (for some part).
Especially when you have to remember so much stuff that is just mechanics/boilerplate without having any actual "business logical function".
People always say java is so verbose. I don't think it is, there is so few syntax that it almost reads like a prose story. When I look at JS and TS instead, I'm overwhelmed by all the syntax, almost wondering every second line, what the actual fuck this could mean. The boilerplate/logic ration seems way to off ..
So it really makes me wonder, if all you JS devs out there are just so used to that stuff, that you cannot imagine how it could be done better? I still remember my C# days, but I admin that I just got used to java. So I can somehow understand that all. But JS is just another few levels less deeper.
But maybe I'm just lazy and too old ...4 -
Another project with legacy code got just dusted off at work. Shits fucked beyond recognition! We got:
- Rando variable names that mean nothing
- Timers running with a cycle time of 2.5ms if you start them with the multiplier 1.
- An Interrupt routine thats 300 lines long.
- Another interrupt thats starting an ADC conversion and waiting for it to complete before returning.
- For loops that start with one and subtract one from the iterator in the loop
- Every value that would normally be expressed as a regular number is written down in Hex. Eg: if(val==0x05)
- State machine built without writing down which state is which. Its just a number. (In hex obviously!)
- All running on a Microcontroller you cant debug on.
- Using a compiler no one has ever heard of before.
- Weird ass Port manipulations
- 15 different .hex and .elf files with no clue whats in them.
- No version control
- We tried explaining the code to a monkey and it hanged itself.10 -
Currently I'm working on 3D game engine and making a 3D minesweeper game with it.
I have started creating a compiler not long ago using my own implementation (no Lex no tools nothing just raw algorithms application) to hopefully some day I will be able to make a language that works on top of glsl inside my game engine. I have compilers design class this semester which haven't even started yet and made a lexical analyser generator. I also have another class about geographical information systems which I will be using my engine to create some demos for some 3D rendering techniques like level of details or maybe create something similar to arcgis which we will be using.
Oh man I have many stuff I want to do.
Here is a gif showing the state of my minesweeper game. I clearly lack artistic skills lol. One thing I will be making is to model the sphere as squares not triangles.
Finally I want to mention that I months ago saw someone here at devrant making a voronoi diagrams variant of this which inspired me to make this.
I made long post so
TLDR : having fun reinventing the weel and learning 😀 -
Warning: Long rant ahead!
So we built an amazing system for managing swarms of drones, and we have flown hundreds of hours, testing, etc.
Comes a client and says, that he wants to buy our system, but he wants to integrate it in a bigger system that is supposed to orchestrate many small systems.
Sounds like a deal.
So they send me on a week course (see previous rant: https://devrant.com/rants/2049071/...) to learn how to integrate our system in theirs.
I was sure that they have some API or something and it should be a breeze. but apparently they give us an SDK that includes all their files, and we have to build and run their entire system, and then build our own API inside of it!
And the reason we needed a week-long course, was to know all the paths where the XML configuration files exist!
So for the last month, I am hacking away inside this huge program, navigating thousands of files in a language I don't know, in order to build an API for their system, so that I can use it on our side.
Yesterday they informed us that a new version is available.
And sure enough, waiting in my inbox this morning was a link to download a new SDK.
No Changelog, No Instructions, Just a zip file with over 25,000 files.
So I phone my contact in their company to ask how exactly I am supposed to update their files, and his answer was: diff them!
WHAT! 25,000 files, half of them built by the c++ compiler, tens of configuration files scattered in different places, linking all the new libraries from scratch, are they crazy or what?
And then he tells me that they are working for 15 years this way. That's why everyone hates them I guess.
going to have a long day...
P.S. many more rants to come from this integration.4 -
My neural networks journey so far:
Look up tutorials -> see that Python is a popular tool for ML -> install Python -> pip install scipy -> breaks with some weird error involving BLAS library code -> spend half an hour fixing it -> try installing Theano -> breaks because my USERNAME HAS A SPACE IN IT LIKE SERIOUSLY? WTF -> make new account without a space in the name -> repeat till Theano -> run tests, found out that I didn't install CUDA support -> scrap the install and redo with CUDA support -> CUDA libraries take forever to download on shitty internet -> run tests -> breaks with some weird Theano compiler error -> go crying to friend -> friend tells me about Anaconda -> scrap the previous install and download Anaconda over shitty connection -> mess up conda environments because noobishness -> scrap, retry -> YESS I FINALLY GOT IT WORKING TIME TO DO SOME LEARNI-crap it's 4 in the morning already.
I realize that I'm a Python noob (and also, uni computers with GPUs have preconfigured Windows installed only, no Linux), but is installing Python libraries always such a pain? Am I doing something wrong? Installing via Anaconda felt like cheating, tbh.6 -
I spent over a decade of my life working with Ada. I've spent almost the same amount of time working with C# and VisualBasic. And I've spent almost six years now with F#. I consider all of these great languages for various reasons, each with their respective problems. As these are mostly mature languages some of the problems were only knowable in hindsight. But Ada was always sort of my baby. I don't really mind extra typing, as at least what I do, reading happens much more than writing, and tab completion has most things only being 3-4 key presses irl. But I'm no zealot, and have been fully aware of deficiencies in the language, just like any language would have. I've had similar feelings of all languages I've worked with, and the .NET/C#/VB/F# guys are excellent with taking suggestions and feedback.
This is not the case with Ada, and this will be my story, since I've no longer decided anonymity is necessary.
First few years learning the language I did what anyone does: you write shit that already exists just to learn. Kept refining it over time, sometimes needing to do entire rewrites. Eventually a few of these wound up being good. Not novel, just good stuff that already existed. Outperforming the leading Ada company in benchmarks kind of good. At the time I was really gung-ho about the language. Would have loved to make Ada development a career. Eventually build up enough of this, as well as a working, but very bad performing compiler, and decide to try to apply for a job at this company. I wasn't worried about the quality of the compiler, as anyone who's seriously worked with Ada knows, the language is remarkably complex with some bizarre rules in dark corners, so a compiler which passes the standards test indicates a very intimate knowledge of the language few can attest to.
I get told they didn't think I would be a good fit for the job, and that they didn't think I should be doing development.
A few months of rapid cycling between hatred and self loathing passes, and then a suicide attempt. I've got past problems which contributed more so than the actual job denial.
So I get better and start working even harder on my shit. Get the performance of my stuff up even better. Don't bother even trying to fix up the compiler, and start researching about text parsing. Do tons of small programs to test things, and wind up learning a lot. I'm starting to notice a lot of languages really surpassing Ada in _quality of life_, with things package managers and repositories for those, as well as social media presence and exhaustive tutorials from the community.
At the time I didn't really get programming language specific package managers (I do now), but I still brought this up to the community. Don't do that. They don't like new ideas. Odd for a language which at the time was so innovative. But social media presence did eventually happen with a Twitter account that is most definitely run by a specific Ada company masquerading as a general Ada advocate. It did occasionally draw interest to neat things from the community, so that's cool.
Since I've been using both VisualStudio and an IDE this Ada company provides, I saw a very jarring quality difference over the years. I'm not gonna say VS is perfect, it's not. But this piece of shit made VS look like a polished streamlined bug free race car designed by expert UX people. It. Was. Bad. Very little features, with little added over the years. Fast forwarding several years, I can find about ten bugs in five minutes each update, and I can't find bugs in the video games I play, so I'm no bug finder. It's just that bad. This from a company providing software for "highly reliable systems"...
So I decide to take a crack at writing an editor extension for VS Code, which I had never even used. It actually went well, and as of this writing it has over 24k downloads, and I've received some great comments from some people over on Twitter about how detailed the highlighting is. Plenty of bespoke advertising the entire time in development, of course.
Never a single word from the community about me.
Around this time I had also started a YouTube channel to provide educational content about the language, since there's very little, except large textbooks which aren't right for everyone. Now keep in mind I had written a compiler which at least was passing the language standards test, so I definitely know the language very well. This is a standard the programmers at these companies will admit very few people understand. YouTube channel met with hate from the community, and overwhelming thanks from newcomers. Never a shout out from the "community" Twitter account. The hate went as far as things like how nothing I say should be listened to because I'm a degenerate Irishman, to things like how the world would have been a better place if I was successful in killing myself (I don't talk much about my mental illness, but it shows up).
I'm strictly a .NET developer now. All code ported.5 -
literally what the fuck is the point of C++
>takes 3 years to make anything half-functional
>language was made in like fucking 1902 so it's damn near fucking impossible to make anything that works without sifting through bumfuck retarded syntax/libraries
>error messages that tell you absolutely nothing of use and are indecipherable garbage 90% of the time
fuck C, fuck it's retarded downie little brother C++, and fuck the stupid fucking boomers who say you're not a real programmer unless you force yourself to become a masochist by using either one of these stupid fucking languages
"oh but it's fast!!11!1!!" yeah but working with it sure as fuck isn't
half the fucking time if I just stop including certain headers in another file then the compiler throws like literally 400 fucking errors at me even though the thing(s) I excluded had no bearing on whatever the compiler decides it wants to loudly bitch and whine about
"oh but games were made on it!!!!111!" yeah not without fucking horrific spaghetti code and 900000 different libraries and dependancies designed just to make a single fucking window39 -
Here it is: get MythTV up and running.
In one corner, building from source, the granddaddy Debian!
In the other, prebuilt and ready to download, the meek but feisty Xubuntu!
Debian gets an early start, knowing that compiling on a single core VM won't break any records, and sends the compiler to work with a deft make command!
Xubuntu, relying on its user friendly nature, gets up and running quickly and starts the download. This is where the high-bandwidth internet really works in her favor!
Debian is still compiling as Xubuntu zooms past, and is ready to run!
MythTV backend setup leads her down a few dark alleys, such as asking where to put directories and then not making them, but she comes out fine!
Oh no! After choosing a country and language the frontend commit suicide with no error message! A huge blow to Xubuntu as this will take hours to diagnose!
Meanwhile, Debian sits in his corner, quietly chugging away on millions of lines of C++...
Xubuntu looks lost... And Debian is finished compiling! He's ready to install!
Who will win? Stay tuned to find out!4 -
Stop teaching people deprecated bulls*it.
I'm taking a "Web Design" course and the teacher wants us to use html attributes and the <font> tag to format pages. He doesn't allow us to use CSS. Says "We'll get to CSS later, right now I'm teaching you HTML". He thought us the <frameset> thing which isn't even supported in HTML5. And of course no <header>, <footer>, <aside> etc.
Same thing in my C++ course. The computers don't even have a C++11 (or newer) compiler. Just an old version of Code::Blocks we're not allowed to update. It does support C++0x so you can still get some of the features, but still.4 -
I propose that the study of Rust and therefore the application of said programming language and all of the technology that compromises it should be made because the language is actually really fucking good. Reading and studying how it manages to manipulate and otherwise use memory without a garbage collector is something to be admired, illuminating in its own accord.
BUT going for it because it is a "beTter C++" should not constitute a basis for it's study.
Let me expand through anecdotal evidence, which is really not to be taken seriously, but at the same time what I am using for my reasoning behind this, please feel free to correct me if I am wrong, for I am a software engineer yes, I do have academic training through a B.S in Computer Science yes, BUT my professional life has been solely dedicated to web development, which admittedly I do not go on about technical details of it with you all because: I am not allowed to(1) and (2)it is better for me to bitch and shit over other petty development related details.
Anecdotal and otherwise non statistically supported evidence: I have seen many motherfuckers doing shit in both C and C++ that ADMIT not covering their mistakes through the use of a debugger. Mostly because (A) using a debugger and proper IDE is for pendejos and debugging is for putos GDB is too hard and the VS IDE is waaaaaa "I onlLy NeeD Vim" and (B) "If an error would have registered then it would not have compiled no?", thus giving me the idea that the most common occurrences of issues through the use of the C father/son languages come from user error, non formal training in the language and a nice cusp of "fuck it it runs" while leaving all sorts of issues that come from manipulating the realm of the Gods "memory".
EVERY manual, book, coming all the way back to the K&C book talks about memory and the way in which developers of these 2 languages are able to manipulate and work on it. EVERY new standard of the ISO implementation of these languages deals, through community effort or standard documentation about the new items excised through features concerning MODERN (meaning, no, the shit you learned 20 years ago won't fucking cut it) will not cut it.
THUS if your ass is not constantly checking what the scalpel of electrical/circuitry/computational representation of algorithms CONDONES in what you are doing then YOU are the fucking problem.
Rust is thus no different from the original ideas of the developers behind Go when stating that their developers are not efficient enough to deal with X language, Rust protects you, because it knows that you are a fucking moron, so the compiler, advanced, and well made as it is, will give you warnings of your own idiotic tendencies, which would not have been required have you not been.....well....a fucking idiot.
Rust is a good language, but I feel one that came out from the necessity of people writing system level software as a bunch of fucking morons.
This speaks a lot more of our academic endeavors and current documentation than anything else. But to me DEALING with the idea of adapting Rust as a better C++ should come from a different point of view.
Do I agree with Linus's point of view of C++? fuck no, I do not, he is a kernel engineer, a damn good one at that regardless of what Dr. Tanenbaum believes(ed) but not everyone writes kernels, and sometimes that everyone requires OOP and additions to the language that they use. Else I would be a fucking moron for dabbling in the dictionary of languages that I use professionally.
BUT in terms of C++ being unsafe and unsecured and a horrible alternative to Rust I personaly do not believe so. I see it as a powerful white canvas, in which you are able to paint software to the best of your ability WHICH then requires thorough scrutiny from the entire team. NOT a quick replacement for something that protects your from your own stupidity BY impending the use of what are otherwise unknown "safe" features.
To be clear: I am not diminishing Rust as the powerhouse of a language that it is, myself I am quite invested in the language. But instead do not feel the reason/need before articles claiming it as the C++ killer.
I am currently heavily invested in C++ since I am trying a lot of different things for a lot of projects, and have been able to discern multiple pain points and unsafe features. Mainly the reason for this is documentation (your mother knows C++) and tooling, ide support, debugging operations, plethora of resources come from it and I have been able to push out to my secret project a lot of good dealings. WHICH I will eventually replicate with Rust to see the main differences.
Online articles stating that one will delimit or otherwise kill the other is well....wrong to me. And not the proper approach.
Anyways, I like big tits and small waists.14 -
Day 2 in ComSci class (following my last rant)
"Okay, so! All of the schoolwork and homework will be done on paper and pen, submit and I will grade it. Only once, no second chance"
Okay. Okay. This went over my head. What are you gonna do? OCR the code into the compiler, compile it and run to see if we fucked up to give us an F? What are you, god? Here's a brilliant idea, teach them Assembly! Guaranteed error to give us Fs! FUCK YOU3 -
Buckle up, it's a long one.
Let me tell you why "Tree Shaking" is stupidity incarnate and why Rich Harris needs to stop talking about things he doesn't understand.
For reference, this is a direct response to the 2015 article here: https://medium.com/@Rich_Harris/...
"Tree shaking", as Rich puts it, is NOT dead code removal apparently, but instead only picking the parts that are actually used.
However, Rich has never heard of a C compiler, apparently. In C (or any systems language with basic optimizations), public (visible) members exposed to library consumers must have that code available to them, obviously. However, all of the other cruft that you don't actually use is removed - hence, dead code removal.
How does the compiler do that? Well, it does what Rich calls "tree shaking" by evaluating all of the pieces of code that are used by any codepaths used by any of the exported symbols, not just the "main module" (which doesn't exist in systems libraries).
It's the SAME FUCKING THING, he's just not researched enough to fully fucking understand that. But sure, tell me how the javascript community apparently invented something ELSE that you REALLY just repackaged and made more bloated/downright wrong (React Hooks, webpack, WebAssembly, etc.)
Speaking of Javascript, "tree shaking" is impossible to do with any degree of confidence, unlike statically typed/well defined languages. This is because you can create artificial references to values at runtime using string functions - which means, with the right input, almost anything can be run depending on the input.
How do you figure out what can and can't be? You can't! Since there is a runtime-based codepath and decision tree, you run into properties of Turing's halting problem, which cannot be solved completely.
With stricter languages such as C (which is where "dead code removal" is used quite aggressively), you can make very strong assertions at compile time about the usage of code. This is simply how C is still thousands of times faster than Javascript.
So no, Rich Harris, dead code removal is not "silly". Your entire premise about "live code inclusion" is technical jargon and buzzwordy drivel. Empty words at best.
This sort of shit is annoying and only feeds into this cycle of the web community not being Special enough and having to reinvent every single fucking facet of operating systems in your shitty bloated spyware-like browser and brand it with flashy Matrix-esque imagery and prose.
Fuck all of it.20 -
So... C++... Yeah.
> Manage to get a MinGw compiler working in VSCode, and all is "well and good".
> Have difficulties installing SDL, follow tutorial verbatim.
> Compile error.
> 7 hours later no progress.
> 10 hours later no progress.
> 16 hours later no progress.
*Throws laptop at wall*3 -
TL;DR Pluralsight should be ashamed for taking 299 USD a year and writing some very low-quality quizzes.
I've always heard that Pluralsight is a great platform having some high quality courses, so I chose it as a benefit, as our company was giving us some budget for learning purposes. I've paid (or rather the company did it in the end) 299 USD for this year, which, I guess is not much for US standards, but it is a lot for Eastern European standards.
I didn't actually get to the point of watching any of the courses, but I started to use a feature called "Stack up", which is a long series of questions in a specific theme, like Java, Kotlin, C++, etc., accessible once a day. I must say, I'm amazed by the fact, that people pay quite a great amount of money and they get something so poorly made with a lot of errors and stupid questions.
Take the question from the included image for example. Not only that the 2 possible answers are repeated (and thus I failed to select the correct one from 2 equal answers), but the supposedly correct answer is also missing some type specifications. No Java compiler will compile it this way as far as I know. There would be at least 3 ways to fix it.
Then there is today's gem (should be included as first comment) as well, where the answer is wrong in both Chrome 96, Firefox 95 and Node v10. Heck, THIS IS one of the reasons why you should never use `var` in your JavaScript code, but always `let` and `const`!
So the courses on Pluralsight might be good, but I would be ashamed, if I were to release something like this. People might actually try to solidify their knowledge by solving these quizzes but instead of learning something useful, they will be left with some bullshit. I just don't get how could they release a feature with so much incorrect information and I am kind of disappointed, even if I didn't try the courses yet.9 -
So, first time ranting, sorry if I mess anything up.
When I first started my current job and got introduced to the system we were coding in, something seemed a little fishy to me. Didn't like the system anyway, but at least the language is a compiler language, so it runs quite quickly, right?
In theory, yeah. If the lead dev liked the IDE that came with it. But he has to REALLY fucking hate it, because rather than using it, he codes in plaintext. No syntax highlighting, no auto-indent, nothing. And he's built the entire damn system around doing that. Sadly the compiler is only integrated into the IDE, so what do we do there? Copy the code from the plaintext file to the IDE to compile it there? No no, why would you. The language has a function you can use to compile some code at runtime.
And so he does. Every. Single. Fucking. Script. There's a single main script that runs and finds the correct textfile to then runtime-compile and execute. So we effectively made a compiler language into a massively unoptimized interpreter lang.
I even mentioned that this might be a problem, but I was completely dismissed, so at that point it's not my problem anymore and I have then switched to a different system anyway.
Couple weeks later I heard the same guy complaining that the scripts were running almost the whole night so we'd probably need some better hardware or something.
Well if only there was a really obvious solution that would improve the performance by probably about a factor of 20 or so...13 -
wow... no kidding.... so C++ is like a language without a compiler holding ur hands and catching u when u screw up...8
-
So legitimately accidentally started building a compiler... Don't ask how because I don't know...
(No it's not a 'true' compiler that will create executables, it just a compiler to make some data easier for my runtime to read it)2 -
Best:
Really getting into Rust. It has taught me so many things.
1. Null is evil
2. Sum types are amazing
3. Compiler can actually have good error output
4. Multi threading is actually really scary if you don't have a compiler to back you up
Worst:
I had to deal with SSIS. It has also taught me many things:
1. No matter how 'mature' a product is, it can be awful. Simply dump a random error code, the user can figure out what went wrong, no need for good error messages.
2. The modern concept of the database is crap. It's a gigantic global state that is used by everyone and owned by no one.
3. Don't use tools that aren't made to be used with version control.
4. Even when you tell your team that it's bad, you will be ignored. -
finally got TI to cough up their SDK and I noticed there's no compiler or linker or anything. Turns out I need to use TASM.
...TASM is for MS-DOS or compatible. I'm on Linux.
Well, it went poorly, as usual, specifically like this:
- tried to automate building with DOSBox config and Python script: output binary always corrupted. Manually repeated, TASM mangles output on DOSBox every time. No PCem or 86box, and i'm on a Ryzen, so no KVM DOS. Out of luck there.
- TASM Linux build or wrapper? No build, but there is a wrapper! ...wait, it needs... 4 things written by random people to be made from source. I mean, that's not actually that bad... oh, after setting all of them up (and struggling through some autoconf/automake bullshit, one of the programs only had source for a 2.x kernel and autoconf/automake were not happy about it) it fails because one project's been worked on a lot more and dropped support for working with the other 3... goddammit.
- Community SDK? Several options for this... but all of them need .NET 2 to run on Win9x, don't work in Wine, or require... hey look, TASM! GODDAMMIT!
- DOS on a real machine? It's a massive bitch to shuttle files to and from a real DOS machine quickly and I can't take 30 minutes between builds that take me 4 minutes to change enough to need tested again.
why must i suffer like this22 -
By constantly fucking around with things that interest me. If a topic fascinates me i will either lool for shit around youtube, read proper documentacion or buy specialized books for it.
Most recently it has been compiler design. I wanna write my own language, for testing and learning more than anything.
I dunno, it keeps shit fun and interesting. Now, much of that shit ain't applied to what I do in web. But it does help to keep the mind fresh as well as giving me the chance to eventually invent my own language. Write a large system with it, use it at the institution and have them pay me obscene ammounts of money to maintain it.
It will be like VB6 or VbScript, but with {}s, immutable values by default and no looping, cuz I am evil AF -
Im forced to work with c++ on windows for a course.
0) c++ is fucking unusable without a central repo for managing dependencies. Maybe im just too used to maven but you shouldnt be downloading dll files in 2018.
1) visual studio can go suck a fat one. I got a fairly fast pc and it takes fucking forever to load anything. For comparison, eclipse with all my plugins (and i have a lot) loads in ~10 seconds, vs2017 does in 35.
2) why the fuck is there no cross platform compilation for c++? Its supposed to run on everything right? Whats so hard about porting a fucking linux compiler so i dont realixe i have .exe files when i want to work with my laptop on the bus?
3) c++17 (? Or whatevers the newest) syntax is like a deep barf on a hot summer day after eating a whole watermelon. Its fucking unreadable and autopointers simply dont work. And its not even my lack of skill this time, its the code that the other members used and it worked for half of them.6 -
I found this on a wiki with Haskell Humor... it's interesting...
How to Shoot Your Self in the Foot With Haskell: Putting the unsafe in unsafePerformIO!
You shoot the gun, but the bullet gets trapped in the IO monad.
Couldn't match expected type 'Deer' against inferred type 'Foot'.
While compiling your program the compiler produces a type error long enough to overflow a kernel buffer, overwrite the trigger control register and shoot you in the foot.
After trying to decipher the type errors from the compiler, your head explodes.
After you've finally found a way to circumvent the type system and shoot yourself in the foot, Oleg appears out of nothing and shoots you in the foot for coming up with it before him.
You shoot the gun but nothing happens (Haskell is pure, after all).
Your foot is fine, until you try to walk on it, at which point it becomes mangled.
You have a shootFoot function which you've proven correct. QuickCheck validates it for arbitrary you-like values. It will be evaluated only when you end up at the hospital. You hope this doesn't come to pass, as it actually returns a bullet-ridden copy of yourself and you don't want to be garbage-collected.
foreign import ccall "shootparts.h shootfoot" shoot_foot :: Gun -> Programmer -> IO ()
shootSelfInFoot = unsafePerformIO . shoot . foot $ self -- Shoot self in foot 0 or more times depending on evaluation order
No instance for (Target Foot)
arising from use of `shoot' at SelfInflictedInjury.hs:1:0
Possible fix: add an instance declaration for (Target Foot)
In the expression: shoot foot
You go to shoot yourself in the foot but the bullet is in the ST monad and the gun is in the IO monad, so you can't.
You ask Haskell to shoot you in the foot but by the rules of lazy evaluation you don't need the result yet so it doesn't happen.
You decide to shoot yourself in the foot but get distracted devising a ballistics algebra and wondering if you can do the calculations in the type system.
You want to shoot yourself in the foot but realize there is no Gun datatype so use Arrows instead.
You shoot in the direction of your foot, but since you are inside the STM monad you can just retry until you figure out what to do.
You shoot yourself in the foot, but you are perfectly fine as long you just don't evaluate the foot.
You shoot yourself in the foot, but nothing happens unless you start walking.
Don't forget about memory consumption! If you don't look, the bullet causes heap overflow. If you look, the bullet causes stack overflow.
You *appear* to have deliberately shot yourself in the foot, and yet your program actually runs perfectly OK due to lazy evaluation. (So long as you remember to not look at your foot...)
You aim the gun at your foot, pull the trigger and remove the clip. When you look at your undamaged foot, the hammer clicks on an empty barrel.1 -
Coworker: I did not progress much but at least I managed to get rid of all compiler warnings.
Me: That's okay. What were they about?
Coworker: No idea.
Me: How did you get rid of them then??
Coworker: I removed the "Wall" option when I use gcc. -
My two cent: Java is fucking terrible for computer science. Why the fuck would you teach somebody such a verbose language with so many unwritten rules?
If you really want your students to learn about computer, why not C? Java has no pointer, no passed by reference, no memory management, a lots of obscure classes structure and design pattern, this shit is garbage. The student will almost never has contact with the compiler, many don't even know of existence of a compiler.
Java is so enterprise focused and just fucked up for educating purpose. And I say it as somebody who (still) uses it as main language.
If you want your students to be productive and learn about software engineering, why not Python? Things are simple in Python can can be done way easier without students becoming code monkeys (assuming they don't use for each task a whole library). I mean java takes who god damn class and an explicitly declared entry point which is btw. fucking verbose to print something into the console.
Fuck Java.17 -
Me yesterday evening:
"Fuck java, fuck JVM, fuck everything about it, shit doesn't work for some reason, no runtime errors, no compiler errors, no syntax errors, nothing, *turns off computer*".
Me today morning(coffee = false), after comparing the documented example code provided by the API with one someone else made, I've noticed that the one provided by the API was messed up and couldn't work.
"Lemme change that one value in the properties...okay here we go"
Shit works out perfectly.
FUCK FALSELY DOCUMENTED CODE
FUCK DOCUMENTATIONS IN GENERAL2 -
When your new build is compiling and just scooting right along so you think... sure, I could go for some food. No. Nope. Not even. It chooses the exact moment you leave to nope the fuck out completely with the most random compiler errors that you would have never seen had you just been sitting there in the chair. It's like it knows. Maybe next time I leave I'll promise to bring it back a taco.1
-
Day 1 of learning to build interpreters: finished the scripts for basic mathematic operations and beginnings of functions... Spent 4 fucking hours trying to track down why the compiler is treating an end of file token as an addition token... No luck, going to bed with a headache and half a head of torn out hair...7
-
Learning Rust.
Holy brainfucking brain melt, those references, scoping and borrowing and cloning and whatnot, because there is no garbage collector, but also no direct memory management.
It's cool, but also hard for a noob coming from the JVM/Android. The compiler error messages are helpful, but I immediately found some cryptic ones that don't help me at all.9 -
I was stuck at this error for the 4-6 days.. Did lots of research on stackoverflow, Google, YT.. Asked my peers tried like hell. Finally one of friends told me you aren't giving I/p and how can you expect an o/p there is no error neither in the compiler nor in the code..
Me: ;_;10 -
MSbuild makes me want to blow my brains out.
I know it's no longer used in .NET Core and all the lucky people that don't have to deal with .NET Framework can happily move on.
But here I am, a complete idiot. Expecting MSBuild to build the exact same way from the CLI as it does if I run a build in Visual Studio. Expecting the build server to consistently produce the same result as if I built my solution locally.
Demanding meaningful earnings and error messages that don't leave me completely perplexed as to what's actually going on in the compiler.
Fuck me and fuck .NET Framework. Thank you for coming to my TED talk.8 -
We need an open-source alternative to stack overflow. They have fucking monopolizing pieces of ratshit admins there and lame ass bots.
I HAD A FUCKING 450 REP :/ and now i have "reached my question limit"
I mean its okay of you want to keep stackoverflow clean , but straight out rejecting the new queries should be against your god damn principles, if those mofos have any!
If it is so easy to downvote and delete a question for the mods, why can't they create a trash site called dump.stackoverflow.com ? whenever a question is not following their stupid guidelines , downvote it to oblivion. After a certain limit, that question goes to dump space where it will be automatically removed after 30 days. Atleast give us 30 fucking days to gather attention of audience !
And how does a question defines someone's character that you downright ban the person from asking new questions? Is there a phd that we should be doing in our mother's womb to get qualified as legitimate question author?
"No questions are stupid" is what we usually hear in our school/college life. And that's a stretch, i agree. Some questions are definitely stupid. But "Your questions are so stupid we are removing you from the site" is the worst possible way to deal with a question asker.
Bloody assholes.
Now, can anyone tell me that if am passing a parcelable list of objects in an intent before starting a new activity, how can i retrieve it in the new activity without getting any kotlin warnings?
The compiler is saying that the data coming via intent is that of list<Type!> aka list of platform type, so how to deal with this warning?15 -
Fuck this shitty C ecosystem! Multible compilers, one standard complying, one hacked toghether? Only one GPL poisoned standart library, with no real chance of switching it, which prevents me of making staticly linked programs? And then there is microsofts compiler, with fucking ANSI support. Thanks. No dependency handling. Concurrency? pthreads. Are you fucking kidding. JSON? Have fun finding something static. Compile times where you can read entire books. Segfaults without one helpful info, so you have to debug with prints. And every library, every tool, installer, compiler, stdlib, anything is poisoned by GPL. But hey, its fast. And efficient. After you spend many slow and inefficient months developing something. I am so done with this shit.
Well.
Tommorow i will continue working with C on my backup project.
Did i mention that the stdlib has no features? Not even threading? Which is IN THE STANDARD?8 -
Been a few weeks now back at the office after a good four weeks off… still no work to do….
”Guess I’ll write a compiler in C then, a good chance to brush up on it.”
”… hmm, haven’t touched any simple html in ages, maybe I try and do this frontend as vanilla as possible”
”What if I tried remaking this backend with Suave? Haven’t written much F# in a while, here’s a chance to brush up on mah mad skillzors”
Never a dull moment, and while I’m cranking out code like a maniac, I feel very, very unproductive due to no actual work getting done. -
"And in a stunning turn of events, he got it to work!"
But seriously... I've literally been throwing shit at a wall and seeing what would stick.
Fucking DTOs and getting shit out of a database. I need better resources on how to do this properly!
Anyways, I found that just using 'object' and letting the compiler deal with the rest of the bullshit actually allowed my code to work and run. I'm still a little in shock.
I'm over here trying to keep things in a nice one-to-one because that's what my PM recommended... and instead I just get slammed by Type casting nonsense and more errors than I can begin to understand. And unfortunately, Stackoverflow is of no help because everyone's issues are very nuanced and unrelated to my problem... Maybe I'm the problem? 🤷
But here it is working without all that bullshit. I don't know man... This code base is not the rager I was expecting. I'm getting my ass kicked with code that doesn't fall in line with the book I'm learning from.
You know how they say, "forget everything you've read and learned"? I'm feeling that really hard right now.
Constantly fighting the urge to rip everything down and do it based on what my book is recommending, but then the logical natured side of me is like "you ain't got that kind of time to be unfucking someone's work, only to get caught in more trouble. Your ego is not worth it"
Anyways, it's fucking late here and I'm glad enough to not have to think about this issue anymore. Bye.3 -
one of my guys decided to start learning c++ for the fun and fuck of it. We do not use c++ for shit (we web developers in this bitch) and he asked me if in the event of him getting completely fucking stuck he could come to me for guidance, I said sure. I do use c++ for personal game projects....it is mostly very bad C until I need c++, it is horrible seriously, I ain't no expert.
He decides to go with the LLVM. Creates a simple hello world app. Runs clang++ main.cpp -o main.
**QUICK PAUSE**
Done, the CLI returns the prompt back to him. He comes and asks me wtf is going on. I check on my machine(Linux based) and do the exact same thing. Executable comes out.
I check back on his windows machine, try typing the same shit. Nada. It does not throw errors or warnings, and the syntax is fucking fine, can't really fuck up c-outing hello fucking world. FUCKING NADA
I couldn't sit down to troubleshoot since it was still working hours, but this shit is haunting me and I am going ballsack crazy knowing that I won't be able to jump at it until tomorrow.
This just makes me dislike c++, i usually never have issues like that, but then again, I use the microsoft compiler (bitch at me all you want, most game developer tutorials etc use that shit, so does the Cherno, its all i know OK????)
I am going to go crazy sdjkfhasdkjlfghlajkhrfvluidefjbhfksjadhjksdsdsjksdjkl11 -
In my free time I like to compile android ROMs for my device, and I couldn't get my favourite ROM, CarbonROM to compile, it was wining about a c file in a directory and I used a different repo, no sound after compiling but hey, at least it worked right?
Turns out there was a new commit that had messed up the compiler, and this commit was live for about 10 minutes, and I just so happened to be repo syncing at that time.
WHAT. THE. ACTUAL. FUCK. -
The best/worst code comments you have ever seen?
Mine:
//Upload didn't work, have to react:
system.println('no result');
//$Message gives out a message in the compiler log.
{$Message Hint 'Feed the cat'}
//Not really needed
//Closed source - Why even comments?
//Looks like bullshit, but it has to be done this way.
//This one's really fucked up.
//If it crashes, click again.
asm JMP START end; //because no goto XP
catch {
//shit happens
}
//OMG!!! And this works???
asm
...
mov [0], 0 //uh, maybe there is a better way of throw an exception
...
mov [0], 0 //still a strange way to notify of an error
// this makes it exiting -- in other words: unstable !!!!!
//Paranoic - can't happen, but I trust no one.
else {
//please no -.-
sleep(0);
}
//wuppdi
for (int i = random(500); i < 1000 + random(500 + random(250)); i++)
{
// Do crap, so its harder to decompile
}
//This job would be great if it wasn't for the f**king customers.
//TODO: place this peace of code somewhere else...
// Beware of bugs in the code above; I have only proved it correct, not tried it.
{$IFDEF VER93}
//Good luck
{$DEFINE VER9x}
{$ENDIF}
//THIS SHIT IS LEAKING! SOMEONE FIX IT! :)
/* no comment */5 -
Try to convince people that html isn't a programming language and there's no need for a compiler to work with html.3
-
in college ages ago, professor was "teaching" us overloading in C++, he goes something like this:
"so you can overload a function by changing the number of arguments, argument types, or method return type"
I dare put my hand up: "emm .. you can't overload by just changing the return type"
"you can"
"but, but.. how would the compiler know which overload I'm invoking when I call the method?"
pause..
"it depends on the type of the variable receiving the method call result"
"what if I call the method without assigning the result to a variable?"
agitated by now: "ah these are complex compiler concepts that are too complicated blah blah"
although I was unhappy, it was useful to realize no one knows everything5 -
when you have to use one language inside of another, and you basically have to call functions allowing you to call the other's language function within it, and you get the hell confused, since it gets harder and harder to see what is what and who can call who and how, and the compiler ofc. won't say anything about it since it only cares about the main language you are in and not the nesting of the other...
I just have no idea what I'm doing right now, or if my thought process and understanding of this is even close to where it is supposed to be.
D: I'm just confused and insecure about this right now....
time for experiments to figure this out, and get the hang of it13 -
You may know I love to hate tests. Well not the tests actually, what I hate is the TDD culture.
DBMS schema in my app dictates a key can either have a value, or be omitted - it can't be null, and all queries are written with that in mind (also they're checked compile-time against schema). But tester failed to mock schema validation, inserted a bunch of null keys with mock data, actually wrote assertions to check those keys are null (even though they never should be), and wanted me to add "or null" to my "exists" queries.
No, we don't need more tests, and you're not smart with your "edge cases" argument. DBMS and compiler ensure those null values can never exists in our DB, and they're already well tested by their developers. We need you to stop relying on TDD so much you forget about the practical purpose of the code, and to occasionally break from the whole theoretical independent tests to make sure your testing actually aligns with third-party services some code uses.
And no, we don't need more tests to test your mocks, and tests to test those test, and yo dawg, I heard ...5 -
Avoid ACPICA if at all possible. It's one garbage tier cluster fuck of bad design, horrible documentation and downright misleading and wrong code
It's meant to consist of an ASL compiler, disassembler, debugger, dumper, various user space utitilies and a kernel resident OSPM implementation *if* you can figure out what belongs to what. Even just compiling this pile of trash is a mystery in itself. Think you need the source files in source/common? EEEEH, wrong. Well, at least partially since most of them seem to be for the user space stuff..? Other ones *are* needed on the other hand. At least the disassembler and/or debugger and/or dumper components seem to reference them. Not that I could figure out how to compile those anyways. The real path to your goal seems to be to ignore a seemingly arbitrary subset of source and header files until your linker stops complaining
There's also a bunch of configuration defines, some of which *you* define, some defined *for* you, based on again others. Of course most of them do stupid shit. Enabling the debugger automatically enables debug logging. Enabling the disassembler force enables debug allocation tracking... What?
The code itself isn't of much help either. Looking in "os_specific/service_layers" you find what looks to be reference implementations of acpica functions in certain os' like windows and unix. Of course I had a look because AcpiOsReadMemory is supposed to read physical memory and I don't know how I would even implement that. But hey, osunixxf.c (xf for interface... of course) should tell me. I'll let you see for yourself in the attached image. Apparently it does fuck all and just returns AE_OK. No error, no logging, no nothing. Just ok. As you can imagine, AcpiOsWriteMemory doesn't do much more either.
...okay so maybe physical memory accesses aren't actually used and these functions are some sort of relic from past times? Nope! They are absolutely necessary for doing low level device interaction. WTF. So finally I went to the linux source and checked how *they* implemented them, and just as I thought, these functions are anything but no-ops...
...So for what fucking reason do these stupid interface implementations even exist but to purposefully mislead you?? They aren't used for fucking anything! As far as I know Windows doesn't even *use* ACPICA and Linux have their own fork with working implementations... They just sit there, just to tell you how to NOT do it
So that's some of my thoughts about ACPICA. Note that I haven't even used it as a library yet, I just got it to compile and link and it already fucked with me this much.
There's also so much more I didn't mention like that you *have* to modify the acpica source in order to get your own platform header working (else #error) eventhough the docs explicitely instruct you not too but you get the point
Don't use ACPICA if you don't have to. Save your sanity for something that's worth it -
Be me
Newb Ui dev
New job , learn c#
Become xaml pro first
Newb ui dev
Today building menu
It's breaking ree.
Ok I go through an fix
Part fixed
No reee
Commit build for other my senior dev
We have online compiler
Receive build fail
Reeee
My code is good
I'm sweating bullets
I call other dev
Yo I f***** up
Help me
Go figure it out ... reeee
I go spend 40 mins
Don't know what is killing build
Reeee intensifies.
Going to shit diamonds
Reeeeeee
Other dev, lol my bad I turned on somethin that break ur build. Your not fired congrats.
Reeeeeeeeeeeeee3 -
I found a vulnerability in an online compiler.
So, I heard that people have been exploiting online compilers, and decided to try and do it (but for white-hat reasons) so I used the system() function, which made it a lot harder so i decided to execute bash with execl(). I tried doing that but I kept getting denied. That is until I realized that I could try using malloc(256) and fork() in an infinite loop while running multiple tabs of it. It worked. The compiler kept on crashing. After a while I decided that I should probably report the vulnerabilites.
There was no one to report them to. I looked through the whole website but couldn't find any info about the people who made it. I searched on github. No results. Well fuck.7 -
You know shit is going to hit the fan if the sentence "c++ is the same as java" is said because fuck all the underlying parts of software. It's all the fucking same. Oh and to write a newline in bash we don't use \n or so, we just put an empty echo in there. And fuck this #!/bin/bash line, I'm a teacher. I don't need to know how shit works to teach shit. Let's teach 'em you need stdio for printf even tho it compiles fine without on linux (wtf moment number one, asking em leaves you with "dunno..") and as someone who knows c you look at your terminal questioning everything you ever learned in your whole life. And then we let you look into the binaries with ldd and all the good stuff but we won't explain you why you can see a size difference in the compiled files even tho you included stdio in the second one, and all symbol tables show the exact same thing but dude chill, we don't know what's going on either.
Oh and btw don't use different directory names as we do in our examples. You won't find your own path, there is no tab key you can press to auto-fill shit.
But thats not everything. How about we fill a whole semester with "this is how to printf" but make you write a whole game with unity and c#. (not thaught even the slightest bit until then btw)
Now that you half-assed everything because we put you in a group full of fucks who don't even know what a compiler is but want to tell you you don't know shit and show you their non-working unfinished algorithms in some not-even-syntax-correct java...
...how about we finally go on with Algebra II: complex numbers, how they are going to fuck up your life, how we can do roots of negative numbers all of the sudden and let you do some probability shit no one ever fucking needs. BUT WHY DON'T YOU KNOW EVERYTHING ALREADY HMMMMM, IT'S YOUR SECOND LESSON, YOU WENT TO SCHOOL PLS BE A MATH PRO ASAP CUS YOU NEED IT SO MUCH BUT YOU DON'T NEED TO KNOW PROPER SYNTAX, HOW MEMORY MANAGEMENT WORKS, WHAT A REFERENCE IS AND PLS FINALLY FORGET THE WORD "ALLOCATION" IT DOESN'T PLAY A SINGLE ROLE YOU ARE STUDYING SOFTWARE DEVELOPMENT WHY ARE YOU SO BAD AT ECONOMICS IT MAKES NO SENSE I MEAN YOU HAD A WHOLE SEMESTER OF HOW TO GREET SOMEONE IN ENGLISH, MATHS > ECONOMICS > ENGLISH > FUCKING SHIT > CODING SKILL THATS HOW THE PRIORITIES WORK FOR US WHY DON'T YOU GET IT IT MAKES SO MUCH SENSE BRAH4 -
Here comes lots of random pieces of advice...
Ain't no shortcuts.
Be prepared, becoming a good programmer (there are lots of shitty programmers, not so many good ones) takes lots of pain, frustration, and failure. It's going to suck for awhile. There will be false starts. At some point you will question whether you are cut out for it or not. Embrace the struggle -- if you aren't failing, you aren't learning.
Remember that in 2021 being a programmer is just as much (maybe even moreso) about picking up new things on the fly as it is about your crystalized knowledge. I don't want someone who has all the core features of some language memorized, I want someone who can learn new things quickly. Everything is open book all the time. I have to look up pretty basic stuff all the time, it's just that it takes me like twelve seconds to look it up and digest it.
Build, build, build, build, build. At least while you are learning, you should always be working on a project. Don't worry about how big the project is, small is fine.
Remember that programming is a tool, not the end goal in and of itself. Nobody gives a shit how good a carpenter is at using some specialized saw, they care about what the carpenter can build with that specialized saw.
Plan your build. This is a VERY important part of the process that newer devs/programmers like to skip. You are always free to change the plan, but you should have a plan going on. Don't store your plan in your head. If you plan exists only in your head you are doing it wrong. Write that shit down! If you create a solid development process, the cognitive overhead for any project goes way down.
Don't fall into the trap of comparing yourself to others, especially to the experts you are learning from. They are good because they have done the thing that you are struggling with at least a thousand times.
Don't fall into the trap of comparing yourself today to yourself yesterday. This will make it seem like you haven't learned anything and aren't on the move. Compare yourself to yourself last week, last month, last year.
Have experienced programmers review your code. Don't be afraid to ask, most of us really really enjoy this (if it makes you feel any better about the "inconvenience", it will take a mid-level waaaaay less time to review your code that it took for you to write it, and a senior dev even less time than that). You will hate it, it will suck having someone seem like they are just ripping your code apart, but it will make you so much better so much faster than just relying on your own internal knowledge.
When you start to be able to put the pieces together, stay humble. I've seen countless devs with a year of experience start to get a big head and talk like they know shit. Don't keep your mouth closed, but as a newer dev if you are talking noise instead of asking questions there is no way I will think you are ready to have the Jr./Associate/Whatever removed from your title.
Don't ever. Ever. Ever. Criticize someone else's preferred tools. Tooling is so far down the list of what makes a good programmer. This is another thing newer devs have a tendency to do, thinking that their tool chain is the only way to do it. Definitely recommend to people alternatives to check out. A senior dev using Notepad++, a terminal window, and a compiler from 1977 is probably better than you are with the newest shiniest IDE.
Don't be a dick about terminology/vocabulary. Different words mean different things to different people in different organizations. If what you call GNU/Linux somebody else just calls Linux, let it go man! You understand what they mean, and if you don't it's your job to figure out what they mean, not tell them the right way to say it.
One analogy I like to make is that becoming a programmer is a lot like becoming a chef. You don't become a chef by following recipes (i.e. just following tutorials and walk-throughs). You become a chef by learning about different ingredients, learning about different cooking techniques, learning about different styles of cuisine, and (this is the important part), learning how to put together ingredients, techniques, and cuisines in ways that no one has ever showed you about before. -
I'm just frustrated. I wanted a simple, statically-typed language that doesn't get in your way and offers GC. I can't find anything "just perfect".
- Go: enforces a style on you, nono.
- Rust: ownership system. I love it, but it's too low level for what I want.
- Scala: seems to have a bunch of useless and bug-prone features.
- Java: I hate how you have to declare and catch exceptions. Good practice, yes, but the code gets bloated with try-catch statements.
- C and C++: Too low level, no GC.
- C#: maybe? idk
I want to make a back-end for an app but I want it to be easy and fast. I need something with a gentle learning curve, not keep fighting the language. I'm between Java and Rust. Java's easier to use. Rust is rust <3, but it's hard, I haven't learned it properly and I just keep fighting the fucking compiler.39 -
Why is learning a new language from python such a bitch? Like, w h a t t h e f u c k. Syntax can eat my ass with that semi colon no semi colon bullshit. Also fuck the compiler with it always having an error and shit. I was lowkey just trying to compile the shortest shit but cant get through s h i t. Fuck life I swear I'm gonna shoot my computer if I get another error.25
-
There's plenty of literature about how to emulate classes and interfaces flawlessly in JS even without es6, but no, let's make a separate language using 20 extra keywords and several unnecessary concepts called TypeScript with its own compiler.10
-
go fuck yourself with your fucking communities. i went into computing because i like being left alone. who are all those fucking freaks building their communities? this is capitalism mother fuckers, everybody in the world agreed on it, on each person being an independent individual doing their job to the best possible standard, instead these low-skill low-iq oversocialised sheeple started conglomerate into communities and brainwash everybody that this is what it is about. get stuffed alright. all my life i've been introverted, just leave me alone to write code alright? take my library i don't mind i'll take yours no strings attached, just push the code and forget about it. but no, all these degenerate morons without CS degrees have occupied our safe space, pushed us out of it and just can't get enough of using the buzzword "community-driven" "volunteers" volunteer my ass assholes you can't even make software nobody in real industry needs you because you have no skill at all you learn a bit of js which is any 14-15 yo can do and now think you're some kind of prodigies, unsung heros of humanity who selflessly bring the progress. nothing can be further from the truth - because of you we don't have real software, we don't have investment we don't get no respect everybody walks all over software engineers treating us like shit, there's an entire generation of indoctrinated parasitic scum that believes that software tools is grown for them on trees by some development teams that their are entitled to automatically, because some corporation will eventually support those big projects - yeah does it really happen though - look at svelte, the guy is getting 50k a year when he should be earning at least 500k if he had balls to start a real businesses, but no we are all fucking prostitutes, just slaving away for the army of people we never see. are you out of your mind. this shit should be fucking illegal alright it's modern day slavery innit bruh, if a company wants to pay their engineers to work on open source this is fine, i love open source like java or google closure compiler, but it's real software made by real engineers, but who are all these community freaks who can't spend a 10 seconds on stage in their shitty bogus conferences without ringing the "community" buzzer? you're not my community i fucking hate your guts you're all such dumb womenless imbeciles who justify their lack of social skill by telling themselves that you're doing good by doing open source in your free time - mate nobody gives a shit alrite? don't you want money sex power? you've destroyed everything that was good about good olde open source when it was actually fun, today young people are coerced into slavery at industrial scale, it's literally impossible to make a buck from software as indie unless you build something really big and good, and you can't build anything big without investment and who invests in software nowadays? all the ai "entrepreneurs" are getting fucking golden rained with cash while i have to ask for a 5$ donation? what the actual fuck? who sanctions this? the entire industry is in one collective psychotic delusion, spurred by microsoft who use this army of useful idiots to eliminate all hounour dignity of the profession, drive the abundance and bring about poverty of mind, character, as well as wallet as the natural state of things. fucking amatures of course you love your shitty little communities because you can't achieve anything on your own. you literally have no personality, just one homogenous blob of dumb degenerates who think and act all the same. there used to be a tool called adobe flash builder, i could just buy it, then open and make a web app, all from start to finish in one program, using tutorials of adobe experts on youtube, sure it might have had its pitfals but it was a product - today there's literally no fucking product to make websites. do you people get it? i can't buy a tool that i need to do my job and have to insult myself by downloading some shitty scripts from some shitty unemployed devs and hope my computer doesn't blow up in my face in the process because some freak went off his nut and uploaded some dodgy ass exploit on npm in his package. i really don't like. it's not supposed to be like that. good for me i build by own front/back end. this "community" insanity is just a symptom of industrial degeneration, they try to sell it to us like it's the "bright" communist future but things never been worst, i can't give a shit about functional programming alright i just need to get my job done mate leave me alone you add functional because you don't know how to solve the problem properly, e.g., again adobe flex had mxml where elements had ids and i could just program to id, it was alright but today all this unqualified morons filled the whole space after flash blew up and adobe execs axed flash builder instead of adapting it to js runtime, it was a crime against humanity that set us back to 1000s5
-
promises in JavaScript have really spoiled me
it's the most optimal way to do async without leaving much on the table
there's a promises library in rust and the guy who wrote it says it sucks because it spawns new thread every time you execute a bunch of promises
and I finally, through my fogged brain, managed to get the bright idea to write what I want to make in rust in JavaScript and holy hell it's sexy to work with promises. there's no performance left on the table. you do things as fast as possible
but if I take this JavaScript usability code I made and make it possible syntax-wise in rust I don't see how I would be able to do it without starting new operating system threads every time I execute any promises (or set)
I can take the overhead hit but this sounds retarded
and this isn't even touching upon how in rust everything needs to have a predetermined data type. so you can do lambdas and capture variables and send in variables into a thread that way, but to return the return object must be a consistent type (synchronizing the order data was sent in to the data sent out aside, haven't written that yet should be fine though)
which is fine if you are making a threadpool and it'll all be returning one data type
but this means you can't reuse a threadpool you made elsewhere in the program
the only thing that could fix async is to literally be compiler-enabled. it would have to work like generics and automatically make an enum of every type that can return, and only then could you re-use the threadpool23 -
I am a single-pass compiler.
Why?
Well, when I have to do the food shopping for the week, I have a look at the buying list, keep the things in mind, go through the shop exactly once and everytime I see a match with the list, I put it into the shopping trolley.
Efficient and quick.
Soo, on the other hand, my girlfriend is a multi-pass compiler.
What that mean, you ask?
Well, she doesn't have any look at the buying list until she is in the shop. Then, she runs through the whole building until she finally finds the first thing on the list... and repeats with the next one until there's no entry left.
She needs three times longer than me for this, is totally exhausted after it, and, not forgetting, then SHE is angry about ME, because I wanted to have these "special" sweets she had too run through the shop twice for because she couldn't find it at first try.1 -
Simple ANTLR project for compiler class accepted .
Easy money
(btw I had no idea about what antlr was , so i googled everything :D) -
MSVC will sometimes compile our code. Sometimes it throws an error.
No changes. Just a shitty compiler.2 -
When I started, in the early 80's, there was no internet, and books related to programming were hard to come by, so everything had to be learned by going to the library, or reading the manual that came with the compiler. Finally, in the early 90's, I got to attend programmer training in the Air Force. My first successful program was a D&D character generator.5
-
My weirdest dream about programming?
I was sitting with my buddy and we were programming, and literally, verbally arguing with compiler that he should compile, and he was spewing out different errors each time we compiled, and it somehow matched our arguments, so it literally was "replying" with different kind of errors ;-;
I mean, we didnt change code, but tell to compiler "no, no, no, you dont understand. This error is wrong, becouse here and there is this and that and it just should work" **pressed compile again and gets different errror**
Yes, that was after few nights of c++.
Edit:
yes, in that dream compiler was spewing out bullshit errors that didnt made sense.2 -
I can work with Angular, even though it's pain in the but.
My current Angular job is actually the job with the first manager that had decent human values and ethics, I like my team, and yeah, what we building is shit. But it's only 30% shit because of Angular, another 30% are due to SAFe, and the rest is the usual stuff.
Still enjoy my job and respect my team.
But please do not expect me to pretend Angular is on a comparable level to React. Angular hasn't brought any actual innovation in most major versions but releases those breaking major updates still at least twice a year.
Ivy might be awesome, but only because Angular told the world 3 years ago also to have Ivy compatible compile targets for their libs/packages doesn't mean everybody cared.
And the ngcc, the awesome compatibility compiler, mutates node modules in place. So ne parallel stuff, no using yarn2 or pnpm.
At the same time, React brought so many innovations into the frontend world but is basically backwards compatible.
Not sure how the Angular partial compilation and whatever needs to go on works, but it seems like there's hardly anyone that really knows, so you can't use Vite or whatever other new tool.
And sure, if you're really good, you can write Angular without producing memory leaks.
But it's really hard. Do you know what's also quite hard: Producing memory leaks with React!
And for sure, Angular Universal, which isn't used by anyone, it feels like, will still be on a comparable level to an open source product that's used all over the world, builds the basis for an open source company, and is improved by thousand of issues day by day.
And sure, two kinds of change detection are a great idea. And yeah, pretending Angular comes with all included makes it worth it that the API is fucking huge and you're better of knowing nothing, because you have to read up things, than knowing quite a lot, since making assumptions and believing apis work in a similar way and follow similar contentions...
Whatever... I work with it. Like the time. Like the company, even my poss. But please don't expect my lying to you this was a good idea, or Angular is even remotely the same level of React.15 -
Somehow I wrote some code that ended up comparing a string type object against a pointer of an unrelated class. There are NO functions to convert that class to any kind of string representation. Let alone ones that would allow that to happen in C++.
WhyTF did the compiler not pick up on this?5 -
QT Creator and openframeworks on Windows 10 fucking suck!
- Qt creator keeps getting issues with the system. Missing DLLs etc. Fuck you, Qt Creator! They aren't missing. I double checked them. Redownloaded them and installed them.
- Besides of that your inbuilt compiler sucks big time. It takes me a fucking minute to see a complete program with a simple text on a GUI.
Now back to openframeworks.
- OF doesn't use the pre-installed codecs on Windows. You have to install K-Lite codecs to play mp4 n shit.
- If you want to embed a video or an image on the GUI, you keep getting a layer on top of the canvas. Yellow colors turn blue etc. Fucking weird.
- OF isn't a fan of Windows. Tried to install and run OF on VS 2019. It is not supported.
How about we follow the documentation of OF and install it their way? Great. Let's do it.
It says install VS 2017.
Ok, let's try it on VS 2017. Doesn't work.
I realize that they use VS 2015 in the video of their documentation.
Geez. Ok, let us try it with VS 2015.
Tries to download it, but with no success. Microsoft isn't supporting it anymore. Thus no way to download it from the official website.
- How about OF on Code::Blocks?
Not supported. Doesn't work.
I reinstalled everything. Made a Windows update. Rebooted it. Still a big nope.
To both dev teams: Get your fucking shit together, you bloody morons!4 -
Something they don't tell you about c++ development until it's too late: cross-compiler compatibility is an enormous monster.
When I worked with C# creating a DLL and distributing it to others is a completely transparent process, there's no special considerations required at all.
In c++ you basically aren't allowed to use the standard library in many cases. You can't just export a class with a standard string as a member because when another person goes to use your DLL, the string might have a different implementation.8 -
Have some downtime today, so since I lucked out and found some old backups (from before I used Git) of a project I was planning on revisiting, I decided to fire it up and see what I can do to get that going again.
And discovering just how much my coding style has changed since then...
[Code is in PHP, for reference]
* Virtually no documentation (whereas my current style is near-obsessive with PHPdoc blocks)
* Where comments exist, they only use // and are a full tab after the end of the line
* All assignment operators are dutifully aligned on tabs
* Have to update the entire codebase because it relies on deprecated `mysql_*` calls
* Have to flip all of the quotes throughout the codebase because I used double-quotes as my primary at the time instead of single quotes.
* Also relied on magic quotes for injecting variable content into strings
* Associative array practices varied; sometimes the names are encased in double quotes, but I just hit a block where it's all leaving it to the compiler to interpret unquoted string literals
And perhaps the most egregious so far...
* Any time we get database results back the process for cycling through them is to do `$count = mysql_num_rows($result);` (or $count2, etc.), then do a `for ($i = 0; $i < $count; $i++)` (again, or $j, $k, etc.), instead of just a simple `while ($data = $result->fetch_assoc())`2 -
In the lab:
"Look! I have compiled and that gave me no errors! On the first try!"
So I look closer and
"Dude, ehm.., you are compiling the wrong file..."
Then he tries to compile the right class and the compiler returned errors on errors
"You know what? I hate you."
Never laughed that loud -
think the downside to rust is safe is holy shit I haven't even seen passable code
everybody shits on JavaScript developers but I think their code quality is obviously better (cuz otherwise if you make it unreadable or a mess there's no debugging that)
the problem with rust is it's safe so you can write the dumbest shit and if the compiler says it works then it works so you just keep it there
over and over I just see this
90% of this codebase is literally useless moves and abstractions that you could've cut out
to be fair I'm only now learning how to reduce clutter in rust (but I do have literal brain damage)
but I'm not sure I've ran into a codebase not suffering from this
also on the other hand it inspires me to care as little as these guys. the bar is so low you can just ignore the bar. one of us, one of us, one of us. if it compiles it is production ready, ayyo2 -
So I figure since I straight up don't care about the Ada community anymore, and my programming focus is languages and language tooling, I'd rant a bit about some stupid things the language did. Necessary disclaimer though, I still really like the language, I just take issue with defense of things that are straight up bad. Just admit at the time it was good, but in hindsight it wasn't. That's okay.
For the many of you unfamiliar, Ada is a high security / mission critical focused language designed in the 80's. So you'd expect it to be pretty damn resilient.
Inheritance is implemented through "tagged records" rather than contained in classes, but dispatching basically works as you'd expect. Only problem is, there's no sealing of these types. So you, always, have to design everything with the assumption that someone can inherit from your type and manipulate it. There's also limited accessibility modifiers and it's not granular, so if you inherit from the type you have access to _everything_ as if they were all protected/friend.
Switch/case statements are only checked that all valid values are handled. Read that carefully. All _valid_ values are handled. You don't need a "default" (what Ada calls "when others" ). Unchecked conversions, view overlays, deserialization, and more can introduce invalid values. The default case is meant to handle this, but Ada just goes "nah you're good bro, you handled everything you said would be passed to me".
Like I alluded to earlier, there's limited accessibility modifiers. It uses sections, which is fine, but not my preference. But it also only has three options and it's bizarre. One is publicly in the specification, just like "public" normally. One is in the "private" part of the specification, but this is actually just "protected/friend". And one is in the implementation, which is the actual" private". Now Ada doesn't use classes, so the accessibility blocks are in the package (namespace). So guess what? Everything in your type has exactly the same visibility! Better hope people don't modify things you wanted to keep hidden.
That brings me to another bad decision. There is no "read-only" protection. Granted this is only a compiler check and can be bypassed, but it still helps prevent a lot of errors. There is const and it works well, better than in most languages I feel. But if you want a field within a record to not be changeable? Yeah too bad.
And if you think properties could fix this? Yeah no. Transparent functions that do validation on superficial fields? Nah.
The community loves to praise the language for being highly resilient and "for serious engineers", but oh my god. These are awful decisions.
Now again there's a lot of reasons why I still like the language, but holy shit does it scare me when I see things like an auto maker switching over to it.
The leading Ada compiler is literally the buggiest compiler I've ever used in my life. The leading Ada IDE is literally the buggiest IDE I've ever used in my life. And they are written in Ada.
Side note: good resilient systems are a byproduct of knowledge, diligence, and discipline, not the tool you used. -
So I salvaged some computer that was about to be thrown out by IT because it works perfectly fine and would be a waste to lose.
The (current) problem is, there is no built-in wi-fi adapter so I had to order a usb adapter to plug into the machine.
Fortunately enough it supports Linux but cones with a cd with the _source_ of the driver in it and we are supposed to build it. Now what's the problem with that?
First problem: building needs all sorts of build tools, starting from gcc and make. Since it's a fresh install, though, I _cannot_ install those normally because -- you guessed it -- I don't have a WiFi connection, which is why I needed the bloody adapter in the first place, so I spent hours trying to fetch the binaries from the apt register using another computer and bringing them over via USB.
Once that was (more or less) successful, the next problem came around; Second problem: the instructions clearly state to run make, but there is no fucking makefile anywhere so that obviously fails spectacularly. What _is_ there are some bash scripts so I try running those.
Now, just when I think it's finally done (one of the scripts has been running for a while and seems to work) the compiler dies with an error: the fucking driver won't build for the current kernel version. And not just that, but it is clear nobody is using basic things like include guards because gcc kept screaming at me about the same macros being defined over and over due to header file re-inclusion. Like, seriously? Come on!
Long story short the fucking adapter is going back to the seller, let's see if the next one I order more civilized.8 -
markdown is not good enough! the tools aren't there for non-devs and there's no concordance on moving forward *compatibly* for anything other than headers and __possibly__ lists.
md has been around for years and still no consensus on comments, meta data, css, data imports, etc.
i could never in good faith recommend to a non-dev to use markdown, even though every academic and professional writer from legal to journalism should exclusively be using markdown to write and store their documents. the data portability and ease of search, retrieval, collection, distribution, etc of markdown compared to pdf or docx is enormous. markdown is the hex format of text, the perfect layer of data and visual so that the user and the computer can both operate on text as blocks of data rather than weirdly styled paragraphs that need to be reformatted BY HAND for citation-style or journal format, or paper size. FOR EACH SUBMISSION. Academics literally rewrite their 100-page papers to accommodate up to 10 different submission requirements.
They could be clicking MLA vs Chicago and/or using a journal's stylesheet to recompile for its styles.
Today there is some support from zotero et al to take away some of the pain, but it makes ZERO SENSE for writers to have to keep and store and keep up to date, multiple versions of the same document. Git pull does not exist for them. But the worst part is that git isnt the solution to their problem. They need a compiler more than they need version control. But they also desperately need vcs. They ALL literally have a million files named "dumdum.dumFINAL-3084_lastversion \2020, this one.dum".
They dont have git or anything like it, because they need a line-by-line solution like markdown for git to become effective.
All of writing is basically mired in the fact that people cant even roll up their paragraphs and see what the fuck it is theyre saying. Most writing reads like a long scroll through some nonsense that goes nowhere. Like this rant. but the point is that markdown and line-by line editing actually produces more logically sound writing. You start to think in terms of defining ideas in blocks, ... like code.9 -
Compilers should just work for raw C with only static memory allocation. This isn't the bad old days where a couple of dudes wrote a short book explaining how C might probably should possibly work. I hear supposedly we have standards now.
Well, last week I lost 2 days to our compiler randomly forgetting that it wasn't okay to put a globally allocated uint32 at an address ending in 9. What? It had been handling this case without issue for more a year, but now after changing completely unrelated code we have this problem.
I'm not sure how to even deal with this idiocy so no doubt I'll continue working on it this week, too.
Thanks a lot, GCC.1 -
It's one of those days where I have absolutely zero fucks left to give.
Was up all night wrestling with a segfault stemming from compiler internals (assembly, no less - zero debugging symbols). Now I just power-cleaned the apartment and need a bowl. -
!rant Scary Stuff...
Not sure what are the rules on sharing external content, but this story freaked me out and I wanted to share with you.
Pretty scary stuff, maybe something like this is already in the wild? Especially with the NSA and other power groups trying to exploit vulnerabilities and infiltrate everything...
Found it originally on the rational subreddit. Here is the link:
https://teamten.com/lawrence/...
Spoiler alert:
It's about the The Ken Thompson Hack:
"Ken describes how he injected a virus into a compiler. Not only did his compiler know it was compiling the login function and inject a backdoor, but it also knew when it was compiling itself and injected the backdoor generator into the compiler it was creating. The source code for the compiler thereafter contains no evidence of either virus."
How to detect/deal with something like this? better no to think too much about this. -
Okay, so, my company does some stuff around blockchain. I had source for smart contract prepared before and it was on 'todo' queue. So, time for it, time to deploy on Kovan, time to test it on actual chain. Riiiight? Okay compiled no problem, deployed, no problem, i plug into several gui's ABI provided by compiler, and... Well..
I still do not understand why each and every gui prompted me to send view transactions (external view), instead of, well, eval them locally, i checked the ABI manually, it is correct, i stripped it down, it is correct, all up to spec.
I try older version of offline MEW, to have older web3.js with no success that thing works properly.
Every
Single
Web3.js based client
Behaved
Differently
And none behaved correctly.
I would, like, understand, if I didnt use official compiler, but official compiler should for F sakes be compatible with official client.
Today this stole 6 hours of my life, I didnt manage to solve it, and I am legitmitely pissed.
Im getting close to re-implement segment of web3JS to be able to do the tests I need to do.
Its not like I havent done it before.... -
python + rename == nightmare.
I cannot be fully confident every rename is safe. Because there's no compiler check to tell me o.o17 -
No matter what you do the universe just tries to beat and let you down, you just have to let go and trust your wit!1
-
!rant
...so I started learning F#... again, second attempt, first one failed like 3 years ago because I had no real usecase appropriate for the language, so I didn't get it.
...but now i'm trying to make my own language, meaning also (wanting) parser/interpreter/compiler, and I found a lecture where dude shows off THREE he wrote (within 24 hours) for three different languages...
...and it showed me that doing my parser/interpreter/compiler in F#, using pattern matching, is going to be incredibly awesome, as opposed to doing it as string parsing in C#...6 -
Today I realized that compilers are children, and must be treated as such. Generally, you might tend to expect a language to follow the same rules consistently, but oh how wrong you are, my sweet summer child.
I have a framework that I've been reusing across several personal Unity3d projects for a while, and all was well. This week, I was tasked with creating a PoC that combines a web app with Unity WebGL for data visualization. My framework has a ton of useful stuff helped me create the PoC very quickly, and all was well.
Come 3 days ago and there's one last piece that isn't working for some reason. It almost appears that this one bit of code isn't executing at all. Today, after countless hours of swearing at the computer and banging my head against the wall, I realized that the WebGL compiler has a different implementation for the method that checks assignability of types. An implementation that has different rules than everything else. An implementation that has no documentation about this discrepancy anywhere. I have no words.
tl;dr: The language changed the rules on me. Fuck me right?1 -
I literally spent a week fighting scope creep instinctively introduced by myself on a submodule with the nominal role *Read all files the compiler needs to read using the fewest possible additional steps*
I have to keep reminding myself that there's no such thing as a scope too narrow. If its purpose can be described without spelling out the implementation, it can be encapsulated. -
Some compilers give an error message on forgotten type casting. From that it shows good typing style casting. So you also avoid clerical errors that can lead to the program crash in the worst case. With some types it is also necessary to perform type casting comma on others Types, however, do this automatically for the compiler.
In short:Type casting is used to prevent mistakes.
An example of such an error would be:
#include <stdio.h>
#include <stdlib.h>
int main ()
{
int * ptr = malloc (10*sizeof (int))+1;
free(ptr-1);
return 0;
}
By default, one tries to access the second element of the requested memory. However, this is not possible, since pointer calculation (+,-) does not work for a void pointer.
The improved example would be:
int * ptr = ((int *) malloc (10*sizeof (int)))+1;
Here, typecasting is done beforehand and this turns the void pointer into its int pointer and pointer calculation can be applied. Note: If instead of error "no output" is displayed on the sololearn C compiler try another compiler.1 -
I was pissed off beyond all reason yesterday when I realised that the reason my code didnt work for 2 days was because i spelled eForm with an uppercase F in my data model, and a lowercase f in my object classes. There was no way for the compiler to warn me so everything compiled fine but crashed at runtime when I tried to access that property. When I saw it, my head hit the desk....
-
I want legit data on how many times your second build attempt succeeded though you made absolutely no change from the previous build and sort of hope the compiler will be merciful this time around.
It is the part of the brain that still believes in supernatural stuffs I guess.9 -
ok found the object orientated guide but for rust which is functional spaghetti: https://howtocodeit.com/articles/...
it has moved into architecture
... and actually makes a good case for interfaces / traits. generally in languages I just used generics to get around limitations of having to type a lot / duplicate code, and I'd remove interfaces because they're annoying to have to deal with, but I can see this be useful for once now.
like you can start a prototype app with files as a database then move to a small database type then later a more monolithic big data one and all that would be through one trait the whole time. so you could anticipate natural progressions of an app, instead of having to build the last version you can put jank behind interfaces and then switch things in and out to test new technologies which does actually give me a lot of relief for my newfound anxiety of me rewriting my rust codebases because I get some small things wrong. I've been coding in circles due to it and I have several saved files that are out of date now but I don't want to delete and they make the compiler mad cuz I had no interface boundaries as such and now stuff has changed somewhere else in the app and by God pls argh
this also means you can code "top-down". in carl Jung typology that's Te and most programmers are Ti-types so they do the little details and then sort of glue everything together (?) but not everybody thinks this way. I naturally think more top-down, which works for more dynamic languages and is annoying in static languages because then you're just fighting semantics and your earlier work the whole time (actually this is a surprisingly good write-up on the different thinking types: https://bothsidesofthetable.com/the...)
wheeeee -
I'll preface this by saying that TypeScript is a beautiful language.
But also UTTERLY INCOMPLETE.
Here's what I'm trying to do: give the compiler well-defined contextual type information for a decorator's argument (a lambda signature) and for the decorated class method, so the user would not have to toil and type every single argument.
But does that happen? No.
I'm honestly disappointed.2 -
I've been watching hours of Rust programming streams. Looks like no one knows what they're doing. People depend on the compiler to fix their errors but can't write one line without getting an error.7
-
YGGG IM SO CLOSE I CAN ALMOST TASTE IT.
Register allocation pretty much done: you can still juggle registers manually if you want, but you don't have to -- declaring a variable and using it as operand instead of a register is implicitly telling the compiler to handle it for you.
Whats more, spilling to stack is done automatically, keeping track of whether a value is or isnt required so its only done when absolutely necessary. And variables are handled differently depending on wheter they are input, output, or both, so we can eliminate making redundant copies in some cases.
Its a thing of beauty, defenestrating the difficult aspects of assembly, while still writting pure assembly... well, for the most part. There's some C-like sugar that's just too convenient for me not to include.
(x,y)=*F arg0,argN. This piece of shit is the distillation of my very profound meditations on fuckerous thoughtlessness, so let me break it down:
- (x,y)=; fuck you in the ass I can return as many values as I want. You dont need the parens if theres only a single return.
- *F args; some may have thought I was dereferencing a pointer but Im calling F and passing it arguments; the asterisk indicates I want to jump to a symbol rather than read its address or the value stored at it.
To the virtual machine, this is three instructions:
- bind x,y; overwrite these values with Fs output.
- pass arg0,argN; setup the damn parameters.
- call F; you know this one, so perform the deed.
Everything else is generated; these are macro-instructions with some logic attached to them, and theres a step in the compilation dedicated to walking the stupid program for the seventh fucking time that handles the expansion and optimization.
So whats left? Ah shit, classes. Disinfect and open wide mother fucker we're doing OOP without a condom.
Now, obviously, we have to sanitize a lot of what OOP stands for. In general, you can consider every textbook shit, so much so that wiping your ass with their pages would defeat the point of wiping your ass.
Lets say, for simplicity, that every program is a data transform (see: computation) broken down into a multitude of classes that represent the layout and quantity of memory required at different steps, plus the operations performed on said memory.
That is most if not all of the paradigm's merit right there. Everything else that I thought to have found use for was in the end nothing but deranged ways of deriving one thing from another. Telling you I want the size of this worth of space is such an act, and is indeed useful; telling you I want to utilize this as base for that when this itself cannot be directly used is theoretically a poorly worded and overly verbose bitch slap.
Plainly, fucktoys and abstract classes are a mistake, autocorrect these fucking misspelled testicle sax.
None of the remaining deeper lore, or rather sleazy fanfiction, that forms the larger cannon of object oriented as taught by my colleagues makes sufficient sense at this level for me to even consider dumping a steaming fat shit down it's execrable throat, and so I will spare you bearing witness to the inevitable forced coprophagia.
This is what we're left with: structures and procedures. Easy as gobblin pie.
Any F taking pointer-to-struc as it's first argument that is declared within the same namespace can be fetched by an instance of the structure in question. The sugar: x ->* F arg0,argN
Where ->* stands for failed abortion. No, the arrow by itself means fetch me a symbol; the asterisk wants to jump there. So fetch and do. We make it work for all symbols just to be dicks about it.
Anyway, invoking anything like this passes the caller to the callee. If you use the name of the struc rather than a pointer, you get it as a string. Because fuck you, I like Perl.
What else is there to discuss? My mind seems blank, but it is truly blank.
Allocating multitudes of structures, with same or different types, should be done in one go whenever possible. I know I want to do this, and I know whichever way we settle for has to be intuitive, else this entire project has failed.
So my version of new always takes an argument, dont you just love slurping diarrhea. If zero it means call malloc for this one, else it's an address where this instance is to be stored.
What's the big idea? Only the topmost instance in any given hierarchy will trigger an allocation. My compiler could easily perform this analysis because I am unemployed.
So where do you want it on the stack on the heap yyou want to reutilize any piece of ass, where buttocks stands for some adequately sized space in memory -- entirely within the realm of possibility. Furthermore, evicting shit you don't need and replacing it with something else.
Let me tell you, I will give your every object an allocator if you give the chance. I will -- nevermind. This is not for your orifices, porridges, oranges, morpheousness.
Walruses.16 -
Okay why in the world is Console.Readline() in C# such a bitch? So I was working on this small simple chat application using C# and I had a super-freaked-out-ugly-code-vending team mate who volunteered to build the server side code. After trudging through his elaborate and highly complicated plan of working for the server, I decided to make the client accordingly and for close to an hour I had no clue why the program was sending an empty password field. A few debug messages later I realised that a line of code was getting skipped. The compiler was happily ignoring the Console.ReadLine that asked for the password from the user. I swear I felt like one of those parents in the shopping mall with their really disobedient kids.
Btw, I still haven't figured out how to fix the bloody thing.
PS: First rant post woohooo!4 -
Everytime I have to work on some old Asp.Net shit. WebForms/WinForms etc.
Everything with that bullshitass designer. You wanna open a file you've just created? Sorry, error. Restart IDE and maybe...
Restarted website? Sorry. Old instance still hangs somewhere in IIS, so the port is taken...
Seeing code light up red when cleaning the project. Compiler being like "What the fuck is 'void'?"
Or - I know you didnt make any changes, but Im gonna build AppCode folder anyway... Its only gonna take a minute or two, no worries.
Or - You have XML template file to this class (codebehind)? You wanna open the XML? Would be shame if it was opened in the designer view and your entire IDE crashed 'cuz of some unsuported third party UI element.
Or - just unexpected debug session crashes.
And dont make me start on Xamarin...1 -
So I am considering side games to add my main games. Mini games I guess they are called. I thought it might be fun to have random chessboards in game you can actually play. I wanted to actually have a decent chess engine behind the game. Off the bat I found a GPL one. I think it is designed to be communicated externally. So what does that mean for using it in my game? If I communicate to an external process is this violating GPL? I have no intention of making my game open source. Well it seems this use case is very nuanced:
https://opensource.stackexchange.com/...
The consensus on a lot of these discussions is the scope of the use of the program. Are you bundling for convenience or bundling for intrinsic utility? This is fascinating because using a compiler on a Windows platform could be a possibly violation. That is a proprietary program calling a GPL one. This is actually handled in the GPL as far as I know. So, if I use a GPL engine as a mini game is that the same as a full blown chess game? What if I support 10 different engines in a full blown chess game?
Now to play devil's advocate even further. Are proprietary phone apps that communicate to GPL software that serve data intrinsically linked? The app will not function without the server or computer os the server runs on. A lot of the web tech is largely GPL or has large amount of GPL programs. Should the web code be under GPL? Should the phone app be under GPL? This sounds ridiculous to some degree. But is that the same as bundling a GPL app and communicating to it from the program via network or command line? The phone app depends upon this software.
Now to protect myself I will find a decent chess engine that is either LGPL or something more permissive. I just don't want the hassle. I might make the chess engine use a parameter in case someone else might want a better engine they want to add though. At that point it is the user adding it. Maybe the fact that it would not be the only game in town is a factor as well.
I am also considering bundling python as a whole to get access to better AI tools (python is pretty small compared to game assets). It seems everything is python when it comes to AI. The licensing there is much better though. I would love to play with NLP for commanding npcs.
I am not discussing linking at all, btw.3 -
Figure I can simplify the code if I have the compiler handle *some* of the register allocation.
Eh? What do you mean "NP-hard"? Dafuq's an ENN-PEE?
**frantically reads wiki**
I can proudly say that I understood absolutely nothing; CS stands for cocksucker or rather abysmal failure at the most basic forms of communication, I don't just sit here all day expecting you to flawlessly prove my point with every swallow of breath you draw, yet here we are.
Perhaps one factor involved in producing the generalized cluelessness of my colleagues, I mean their "imposter s*ndrome", has a bit to do with how fucking thick you've formulated this glorified bollocks you call theory. Were not for your incompetence, arcane crackheads like me would simply __not__ be capable of rising to the top of this field entirely via determination and a big salami, therefore I owe you both a debt of gratitude as well as every last word and sign of total disrespect.
As interesting as the study of computational complexity can be, if done correctly that is, you idiots are stuck in a mathematician's abstract mindset in a field entirely devoted to application of ideas rather than *just* the ideas themselves.
To answer my own question, it means there's no known efficient solution. That's it. The part about nondeterministic polynomial convolution of an irreductible rectosigmoid junction can apparently be skipped altogether. Anyway, I solved the problem with the computational equivalent of pizza sticks while you were out in the field mentally jacking off to λ.
Lecture is over, now go clean up the ethereal masturbatory residue if you will, I have mystical el Khwarizmi type-shit to solve via further clubbing of abstraction through liverwurst bologna of immense proportions. ^D3 -
some languages completely get lost in minutiae, disposable preciousism that looks pretty but mischievously gobble development cycles. Now, there's no doubt they make for skinnier, trustworthy, low maintenance code, yes, congratulations Haskell. Although, you see, Haskell, not every language out here is defacto an academic one. You hear me, Rust. So, for fuck sakes, Rust dear. You've macros, sis, you don't need a new languages feature every other naughty day. You need prototyping speed, not more complexity. I'm not complaining not really.... It's your fucking language server, your compiler... They can't take this shit no more. Have you seen their overeating problems? Please, Rust, stop picking plastic surgery instead of make-up and use macros instead
--
and google, dear, your auto completion sucks ass1 -
The rear ducking continues. We've built a reliable translator in the dumbest fucking way possible, it's just lovely. I simply reused the structure for feeding data to the VM assembler, an array of arrays, where there's one array of (ins [args]) per node in the parse tree.
It's nice because nodes can be solved out of order without affecting the actual sequence in which the instructions are output. And if one statement (node) equals multiple instructions, you just push multiple entries to the corresponding array, or push nothing if you need to output nothing. Easy as goblin pie.
This is enough to convert an input language to the assembly-like intermediate representation we use for the virtual machine. So then there's doing it backwards: walk the same array of arrays, and map those virtual instructions to a physical architechture. I guess I could do the encoding to native binary myself, it'd certainly be interesting to try, but I'm burnt-out already so I'll just use fasm for now.
Initial test: wrote a test program in my own stupid language, ran the translator, dump output to file, assemble that with fasm, run with r2 -d.
Crashes? No.
Runs fine? Yes and no.
For fuck's sake, I don't have syscalls. Mainly because the VM doesn't have an operating system, lmao. I was testing virtual programs by just freezing state, terminating, then dumping the fucking registers and stack to the console, we have no I/O to speak of. Not even a real 'exit', VM handles that by reading a return value every step like a mentally damaged son of a bitch.
So anyway, I manually paste the linux mambo, you know:
mov rax,60
mov rdi,0
syscall
And NOW our program can end execution without crashing.
Okay then, so does the test code work correctly?
** DRUM ROLL **
Yes.
Ladies and gentlemen, mother fucking PESO is now a compiled language, and going forward I will be expectantly receiving your marriage proposals for reviewing. Oh, but not so fast, we still need a frontend...
Well, we'll handle that in the next few days. I'm just glad to be *nearly* finished with this fucking compiler, I want nothing to do with anything else ever, but we know that's not going to happen, so Lord please end my pain.
No sponsor as this rant has been paid for by tax evasion. -
Programmer: Type type(2);
C++ Compiler: // Okay, I'll use the constructor that takes 1 argument
Programmer: Type type();
C++ Compiler: // I see there is a constructor that takes no arguments, but surely you don't want that. Everybody loves functions, a function shall be declared!
Who, in their right mind, thought this syntax is a good idea?! Syntax inconsistencies drive me crazy...11 -
LLVM AND BISON FIX YOUR FUCKING DOCUMENTATIONS
I've been trying the whole quarantine period to make some small Bison and LLVM snippets because I've been planning to make a compiler for my own language. But I haven't been able to make a SINGLE THING WORK because these projects have the WORST DOCUMENTATION I HAVE SEEN IN MY LIFE FOR AN OSS PROJECT. Seriously, no basic references, no tutorials, no nothing. It's as if they are trying to obscure it all! I'm looking for alternatives now.8 -
C++: the Static Initialisation Order Fiasco. If you have two static instances in separate translation units, there is no way to guarantee their initialisation order, you're at the mercy of the compiler/linker. If one of the instance constructors depends on the other already being initialised, you have a 50% random chance of your program blowing up. The same ordering problem applies to global destruction at program termination time.2
-
The time when I started building my first interpreter. I had no idea about them so I just copied the code from the book but it felt good really good and I learned so much about compiler and interpreter design. I guess copying the code and seeing things connect was the best and badass experience for me.
-
Today, I decided to learn build a c++ project using cmake. Since I've never done a big project in C++ I have no experience with these stuff.
Couple of hours for researching and trying to understand how that thing works, how to specify things, this and that. Wrote a small program for testing.
Everything was fine. Makefile was generated and program was worked.
Then.... Somehow, sublime text started to give me error messages like, 'the header file you included is not found.' I hit the makefile again, the built was successfull... I know that, need to add -I to compiler flag so that it can find the files. But in sublime text constantly refuses my 'possible' solutions.
Even ycm in vim does this. They expected me to write includes like '../thispkcg/include/header.h'
Where did i go wrong ..............
Btw it works like a charm in cLion I don't know why..2 -
When they decided to deprecate the old app that went back to early DOS, they decided to use VB.NET because they'd used some VBA and were familiar with it. Except they had a vague idea that C# was faster and decided to write the OpenGL code in that. Also they had some C++ code and decided to write more of it, accessed by the main program via COM.
I come in and the decision is made to integrate some third-party libs via a C++/CLI layer. On one hand screw COM, but on the other we're now using two non-standard MS C++ extensions. Then we decide we need scripting, so throw in some IronPython.
I'm the build engineer for all this, by the way. No fancy package managers since almost all the third-party dependencies are C++; a few of them are open source with our own hacks layered on top of the regular code, a few are proprietary. When I first started here you couldn't build on a fresh SVN checkout (ugh) without repeatedly building the program, copying DLLs manually, building again, ad nauseum. I finally got sick of being called in to do this process and announced that I was fixing it, which took a solid week of staring at failed compiler output.
Every so often someone wants to update that damn COM library and has to sacrifice a goat to figure out how the hell you get it to accept a new method. Maybe one day I'll do a whole rant just based on COM. -
Why does it have to be so difficult to get unit tests to run? Spent about an hour yesterday trying to get a single test class to run and it kept complaining about a compiler error in a completely different module. Went to the file and there was no error. WTF?!
In the end, checking the “delegate build actions to gradle” box made it go away. why..... -
I still wonder why there's this "a man writes more optimised code than compiler" stuff. Why?
Compiler is automated work, in the worst case it should be able to create multiple e.g. asms and compare the time, right? You can dump all instructions into compiler, it should be able to choose the right one even if it would compile whole days, right? You can't be possibly serious with such a statement.
No "time" arguments, please.2 -
Compile and debug program, no local variables show.
Clean project, debug program, build errors.
Thanks Mr. Compiler -
It's been 2 years since I got a result for an issue while googling. Whenever I post something on SO I get 0 responses because no one knows :(
Highly optimized code, compiler errors and working with "new stuff" ftl :(2 -
Rubber ducking your ass in a way, I figure things out as I rant and have to explain my reasoning or lack thereof every other sentence.
So lettuce harvest some more: I did not finish the linker as I initially planned, because I found a dumber way to solve the problem. I'm storing programs as bytecode chunks broken up into segment trees, and this is how we get namespaces, as each segment and value is labeled -- you can very well think of it as a file structure.
Each file proper, that is, every path you pass to the compiler, has it's own segment tree that results from breaking down the code within. We call this a clan, because it's a family of data, structures and procedures. It's a bit stupid not to call it "class", but that would imply each file can have only one class, which is generally good style but still technically not the case, hence the deliberate use of another word.
Anyway, because every clan is already represented as a tree, we can easily have two or more coexist by just parenting them as-is to a common root, enabling the fetching of symbols from one clan to another. We then perform a cannonical walk of the unified tree, push instructions to an assembly queue, and flatten the segmented memory into a single pool onto which we write the assembler's output.
I didn't think this would work, but it does. So how?
The assembly queue uses a highly sophisticated crackhead abstraction of the CVYC clan, or said plainly, clairvoyant code of the "fucked if I thought this would be simple" family. Fundamentally, every element in the queue is -- recursively -- either a fixed value or a function pointer plus arguments. So every instruction takes the form (ins (arg[0],arg[N])) where the instruction and the arguments may themselves be either fixed or indirect fetches that must be solved but in the ~ F U T U R E ~
Thusly, the assembler must be made aware of the fact that it's wearing sunglasses indoors and high on cocaine, so that these pointers -- and the accompanying arguments -- can be solved. However, your hemorroids are great, and sitting may be painful for long, hard times to come, because to even try and do this kind of John Connor solving pinky promises that loop on themselves is slowly reducing my sanity.
But minor time travel paradoxes aside, this allows for all existing symbols to be fetched at the time of assembly no matter where exactly in memory they reside; even if the namespace is mutated, and so the symbol duplicated, we can still modify the original symbol at the time of duplication to re-route fetchers to it's new location. And so the madness begins.
Effectively, our code can see the future, and it is not pleased with your test results. But enough about you being a disappointment to an equally misconstructed institution -- we are vermin of science, now stand still while I smack you with this Bible.
But seriously now, what I'm trying to say is that linking is not required as a separate step as a result of all this unintelligible fuckery; all the information required to access a file is the segment tree itself, so linking is appending trees to a new root, and a tree written to disk is essentially a linkable object file.
Mission accomplished... ? Perhaps.
This very much closes the chapter on *virtual* programs, that is, anything running on the VM. We're still lacking translation to native code, and that's an entirely different topic. Luckily, the language is pretty fucking close to assembler, so the translation may actually not be all that complicated.
But that is a story for another day, kids.
And now, a word from our sponsor:
<ad> Whoa, hold on there, crystal ball. It's clear to any tzaddiq that only prophets can prophecise, but if you are but a lowly goblinoid emperor of rectal pleasure, the simple truths can become very hard to grasp. How can one manage non-intertwining affairs in their professional and private lives while ALSO compulsively juggling nuts?
Enter: Testament, the gapp that will take your gonad-swallowing virtue to the next level. Ever felt like sucking on a hairy ballsack during office hours? We got you covered. With our state of the art cognitive implants, tracking devices and macumbeiras, you will be able to RIP your way into ultimate scrotolingual pleasure in no time!
Utilizing a highly elaborated process that combines illegal substances with the most forbidden schools of blood magic, we are able to [EXTREMELY CENSORED HERETICAL CONTENT] inside of your MATER with pinpoint accuracy! You shall be reformed in a parallel plane of existence, void of all that was your very being, just to suck on nads!
Just insert the ritual blade into your own testicles and let the spectral dance begin. Try Testament TODAY and use my promo code FIRSTBORNSFIRSTNUT for 20% OFF in your purchase of eternal damnation. Big ups to Testament for sponsoring DEEZ rant.3 -
Fuck you Linux! I thought user password validation would be a piece of cake, like bash one liner. How wrong could I be!
Yeah, it's already ugly to grep hash and salt from /etc/shadow, but I could accept that. But then give me a friggin' tool to generate the hash. And of course the distro I chose has the wrong makepswd, OpenSSL is too old to have the new SHA-512 built in, as it should be a minimal installation I don't want to use perl or python...
And the stupid crypto function that would do me the job is even included in glibc. So it's only one line of C-code to give me all I want, but there is no package that would provide me this dull binary? Instead I will have to compile it myself and then again remove the compiler to keep image small?5 -
"if compiler can infer this, there is no need to add "x ->" , simply use it" ..AAAGHH FUCK YOUUUUU KOTLIN!! what else should i fucking not write? why do't you take a number of my employee and ask his requirements, maybe add a ShoppingKartApp.kt in your compiler next time? it will be completely inferred when i write "Fuck you" in the gradle.
And fucking companies are promoting this! I wonder how those devs are living there
Person A knows only that lambda is
{name:Type,name:Type->code}, and thus writes a clean code.
Person B comes says "This shit suck", writes "{ acc, i -> acc + " " + i }" ,goes away
Person A : "wtf is this shit? why it works?"
Please for the love of god, follow some rules! My first language was python, i love its zen:
- Beautiful is better than ugly.
- Simple is better than complex.
- Readability counts.
- Special cases aren't special enough to break the rules.
- There should be one-- and preferably only one --obvious way to do it.
- If the implementation is hard to explain, it's a bad idea.
-...
I just wish it follows at least one thing from python's zen : "There should be one-- and preferably only one --obvious way to do it."3 -
So I was just thinking scenario wise how if I founded a military organization who’s aim was to depose an insane dictator from power while remaining undetected including from all his insane supporters how I would use Linux
After I took every source package offline and modified and source checked it and disabled the ability for it to use regular tcp ip for anything but tunneling
The reasoning ? I just installed one program and it downloaded 40 some extra packages that I have no idea what are doing
Linux is great but do we actually know what the software is doing ? Same as windows only you can’t compiler that from scratch
It’s either trust a bunch of random people or trust a bunch of random people part of an evil company
Not the best of choices
But oh how beautiful it would be after I had 500 people pick every last package apart with a reasonable deadline of 2 years entirely offline at frozen versions
Then we could fork all the projects
Or only implement very carefully source reviewed patches transported via offline medium To computers that are running vms to house and test all additional patches so if it blows up we just copy our raw frozen image back over it and either scrap or repair the change
As connecting to the internet in general is not an good idea for silent running25 -
> Be me
> Fresh out of school
> Do some volunteer work for 1 year before starting to work
> Start work at local hospital
> One day get assigned new task
> "We have this directory where there is a file for every employee who has a key - File contains legal stuff"
> Current naming scheme "MaxMustermann"
> Desired naming scheme "Max Mustermann"
> Task: rename every file.
> 1974 Files
> OHNONONONO.JPG
> Hol up buddy
> A repetetive automatable task?
> I know this
> Im a hackerman
> Let's write a script....
> *SMASHES WINDOWS BUTTON*
> "Python"
> No results
> I could have guessed that
> *SMASHES WINDOWS BUTTON*
> "Java"
> No Java compiler
> OH no
> *SMASHES WINDOWS BUTTON*
> "Powershell"
> "tHe eXEcUTIon oF poWeRsheLL sCriPts Is dIsAbLeD"
> REEEEEEEE
> *SMASHES WINDOWS BUTTON*
> "cmd"
> "YOu dO noT haAV thE rEqUiReD peRmIsSionS To oPeN tHis proGrAm"
> DAFUQ
> Wait this is windows.
> Windows ships with .NET
> *SMASHES WINDOWS BUTTON*
> "csc"
> No results
> OHHELLONO.gif
> mfw I have to rename 1794 files by hand.
( Please send help )7 -
Make good progress on Orchid, my pet project, the functional programming language that has no syntax apart from what the macros define. A type system, an interpreter and provisions for a compiler would be nice for a start.
Finish my bachelor's degree on some unspecified part of Orchid, at the current pace that would most likely be just the Hindley-Milner algorithm.
Don't get fired from the gem of a job I have, and move to London because I'm a city rat and the only way I can sleep well apparently is with a tram or drunken people screaming under my window.2 -
Scala lang is hard to learn(not saying that sucks), but first I don't want to learn this language, I just wanted to use some functions for a hobby project and this project I found on internet had all I need so I just wanted to translate it to Python, using an online Scala compiler I pasted the functions I needed anddddd error can't compile it it, because the functions had some extra things that were not part in the file where functions were, these things check for null values(?) so I was looking into the project where these "keywords" comes from and I can't find it, so after some grep in the project files I found the "keyword" I was able to compile it, also I weird thing about this language is that there is no return keyword
So yes I find this lang not that intuitive (for me at least)4 -
"X is dead! My project has just gone up in smoke, because docs/programs have been permanently lost."
This time, it's Sun. No one's dumped their compiler package CDs for Solaris, and now you can't order them. Whoops! There's like 5 versions of Solaris that have SDKs and docs that are just gone.
Dump your CDs, you stingy motherfuckers. "oh they're stamped, they have my name in them, i paid $600 for the license" do it anyway, because time is unrelenting and the rot claims us all. we must run faster than it does, and you're just standing still.7 -
context: Python Sanic Backend, Bulma Frontend
*this is a direct repost of my rant on my discord*
UGH WHY IS EVERYTHING TOO COMPLICATED FOR NO FUCKING REASON
I JUST NEED AN INTERACTIVE UI WITHOUT EXPLICITLY DOING IT MYSELF WITH TONS OF BOILERPLATE CODE
React - uses JSX
Angular - uses TypeScript
what's next? some weird fucking thing that's not even necessary for basic needs
And why the fuck does react need node.js or some JSX compiler to make things easier?
None of this makes any fucking sense
Why not just declare actual javascript objects and functions and that's fuckin it
I just need regex validation and sometimes, custom validation based on other things
Then when the user changes something a small modal shows up asking to save changes
None of this bullshit
It's deadass simple
I don't need routing
No need for your JSX fuckery
No need for your TypeScript shit
I barely would even fucking use those
REEE
Fuck react, Fuck angular
React would've been the perfect thing for this shit
but NO
they had to make things 100x worse
Fucking bitch
because react has event hooks
I can just listen to the changes
then display the modal and get done with it
All other processing is done in the backend
IT'S THAT SIMPLE REACT
Validation is provided by the backend, Just fucking use regex in the frontend and that's it
IT JUST NEEDS TO DO SIMPLE THINGS
IT DOESN'T TAKE ROCKET SCIENCE TO DO MINIMAL WORK9 -
I spent the whole damn day trying to setup grpc-web, but this protocol is documented so damn poorly!
You manage to set grpc up for one language and it’s all cool, then you stupidly think that you are free to reuse the compiler you used for the nodejs version for your frontend part but nope! Our web module is now deprecated, please use this module instead!
“Ah yes just clone the repo and check out (…) and you can also check this link whic is in no way highlighted in the middle of a wall of text (…)”
*checking the other page*
Ah yes you need to install a package available only on your unix machine (great! Screw the devs in my team who use windows I guess, they’ll be happy to hear this!) and don’t forget to clone this repo to build your own plugin! And by that I ofc mean to compile it on your own!
- compiler error
After digging for an hour you find a requirement in an obscure issue opened and closed cause “ah yes we have a dependency not stated anywhere” *close issue and never add it to the project*
Fine, fine I can survive this bs
- another compiler error, no solution found after 2 hours
Honestly? Why the fuck do I need to compile this stuff? Just give me a damn npm package I can use? Goddamn it’s just transpiling, you don’t need access to my OS! (Aside for fs to save the files, and which btw is accessible via nodejs)
Now, I COULD download the latest realease as a precompiled, but… honestly?
I give up, I’ll do some shitty rest apis cause the customer’s not paying me enough for even THINKING to go trough this shit again when they’ll ask an iOS app. Or having colleagues asking me to help them understand how to do it.
Side note: also add typescript support to the web-code-generation ffs! Why does node have it and web don’t?5 -
Question for iOS Swift guys:
Since Implicitly Unwrapped Optionals are now dropped for a while, and everything is an optional, hiw can I now declare property that has no value and intializer will not make fuss?
I used to do this:
class Bullet {
var calibre: Double!
}
This way I can avoid initializer which gets useful when there are properties which hold complex types, which get useful when writing tests.
If I remove ! Then compiler complains.
If I put ? Then My code becomes crap of guards and ifs to check for optionals.
Really hate this Optional thing in Swift. Half my time when I jave an issue is related to optionals.
Btw,
let x: Int! = 10
let y = x, yields y: Int? -
time for crowdsourcing awful ideas because bored!
what don't I need? what does literally nobody need? what is a terrible, awful, no good idea that should never exist? let's make it!
I'll go first: a compiler that automatically resolves compilation errors by removing the offending line continuously until it successfully compiles. defaults to quiet mode which does not report which lines were removed.1 -
Why did I go broke?
Because every time I tried to cash in my promises, I’d end up nullifying my income with undefined deductions! I thought I could get by on short functions and quick closures, but in the end, I found myself callbacked into a corner with no scope for improvement.
I tried to debug my financial situation, but my stack overflowed with deferred payments, and I couldn’t even parse where all my money was going. The compiler of my life just kept throwing unexpected "expenses" errors.
In a final attempt, I refactored my entire approach, renaming myself Async to buy some time, but it was too late. My funds were hoisted to the global scope, and before I knew it, I was reduced to Boolean poverty.
Now, I live my life in strict mode, always awaiting the day I’ll finally get a return on my investment... but deep down, I know I’m just an object in a mutable state.
P.S : I'm a JS DEV1 -
well... I really dont know how to explain this error
in the directory where I have my testing.cpp file, I type "clang testing.cpp -o testing"
my result is just supposed to be hello world and I am getting this.
note: clang is my c++ compiler since for some divine reason I can't install GCC on termux.
I checked the github and no one gives this complaint. I honestly can't read that error code, I just want it to go away
I hate coding on android, it's always a sorry case
I could have been a farmer or a teacher or a bus driver or an alien but I chose coding. I am really tired
I took a very long screenshot6 -
Wish the Objective-C compiler had better type checking. There's no reason for it to not error out when I'm migration a property from one type to another.
-
So I'm writing my compiler and I decide to test error handling, see if I'm catching unexpected tokens and whatnot. I try duplicating a semi-colon at the end of a line, for sure it'll give me an error since that's an unexpected token, isn't it? So I run the compiler and... No errors? I start debugging for a few minutes, snoop around, everything seems ok... "Huh, that's weird" and then it dawns on me, a semi-colon only marks the end of a statement. So, technically, it's not an unexpected token if you have an empty statement (which wouldn't break any rules about statements). I decide to try out my theory. I put ;;;;;;;; at the end of a random line in my rust code, hit compile and... it compiles! So that means it is not a bug anymore! I mean, if the big guys that actually know a tad about language design, compilers and all that cool stuff allow it in their languages, why shouldn't it? So I did it, I turned a bug into a feature and now I can go to sleep in peace and stop dreaming about fucking abstract syntax trees (don't mind my kinks >:) ).
Yeah anyways thanks for reading, till next time! Bye!1 -
!rant
If you're into compilers AND AI, check out Glow Compiler.
https://arxiv.org/pdf/...
Explains the idea well, casual read, almost no math just clean code examples and lots of easy reading explaining the ideas and theory behind it.
You can find the project at https://github.com/pytorch/glow and and also https://ai.facebook.com/tools/glow/1 -
What we will miss, if he really softens:
In fact, if the reason is stated as "it makes debugging easier", then I fart in your general
direction and call your mother a hamster.
In short: just say NO TO DRUGS, and maybe you won't end up like the Hurd people.
Of course, I'd also suggest that whoever was the genius who thought it was a good idea to read things ONE F*CKING BYTE AT A TIME with system calls for each byte should be retroactively aborted. Who the f*ck does idiotic things like that? How did they not die as babies, considering
that they were likely too stupid to find a tit to suck on?
Gnome seems to be developed by interface nazis, where consistently the excuse for not doing something is not "it's too complicated to do", but "it would confuse users".
I think the stupidity of your post just snuffed out everything
I think the OpenBSD crowd is a bunch of masturbating monkeys, in that they make such a big deal about concentrating on security to the
point where they pretty much admit that nothing else matters to them.
That is either genius, or a seriously diseased mind. - I can't quite tell which.
Christ, people. Learn C, instead of just stringing random characters together until it compiles (with warnings).
"and anybody who thinks that the above is
(a) legible
(b) efficient (even with the magical compiler support)
(c) particularly safe
is just incompetent and out to lunch.
The above code is sh*t, and it generates shit code. It looks bad, and
there's no reason for it." -
People, help me out.
(first some abstract thoughts)
I am a final year undergrad yet to take steps in the world and i am trying to figure out what to do with my time, what my end goal and next steps should be.
As of now I think my end goal is "relaxation , peace and happiness of me and my loved ones", and to reach there , i need money.
My younger self chose engineering for a particular reason(that i vaguely remember) and weather it was a right or wrong/illogical decision, i guess i am stuck with it and have to use this only to reach my end goal.
Maybe i am regretting this and want to change. Maybe i am just a lazy ass who is bad in his assigned role of an engineer and is running towards glitter in other fields, whatever it is , i am not going against the decision of my past and accepting my identity as an engineer.
I believe once i am able to achieve my goal( that am still not sure about but overall is a good one from general perspective), i guess i will be satisfied
------------------------------------------------
(enough with the deep stuff)
I want to learn how to "learn" . like i am always conflicted about what to do next once the tutor leaves my hand.
for eg, let's say i goto a site abc.
1. They got 1 course each for android , web dev and ai. I choose the web dev course and give my hardworking attention to it
( At this point my choice is usually based on the fact that <A> i should not be stupid to buy all 3 course even if i have money/desire to buy all of em because riding 2 horses is only going to break my ass and <B> some pseudo stats like whichever got more opportunity, which i "like", etc(Point B is usually useless in the long run i guess) )
2. From what i have experienced, these courses usually have a particular list of topic that they cover and apply them to 1 or 2 projects. For eg, say that my web dev course taught me 20 something concepts of basic html/css/js/server and the instructor applied it to blog website
BUT WHAT IS NEXT ?
2.1.
>> Should I make more projects using only those particular list of concepts?
I usually have a ton of ideas that i want to implement now that i know how to build a blog site.
say i got a similar idea to make say url shortner. I start with full enthusiasm but in the middle way there is some new thing that i don't know and when i search the internet, i realize that there are 5 ways to implement such concept, making me wander off towards a whole list of concepts that were not covered in my original 20 concept course. This makes the choice 2. 2
2.2
>> Should I just leave everything , go to docs and start learning concepts from the scratch ??
Usually when i start a project, i soon realize that the original 20 concepts were just the tip of iceberg and there are a ton of things one should know, like how os works, how a particular component interacts with another, how the language is working, how the compiler is executing, etc .
At that point i feel like tearing all my notes away, and learning every associated thing from the scratch. No matter how much my project suffers, i want to know how the things are working from the bottom , like how the requests are being mad, how the routes are working, etc which might not even be relevent for the project.
Why i want to follow approach 2? because of the Goal from abstract thoughts. in theory, having deep knowledge is going to clear my interview thereby getting me a good job.
I will get good money, make projects faster and that will be a happily ever after story.
But in practical this approach is bringing me losses and confusion. every layer of a particular thing i uncover, turns out there is another layer below that. The learning never stops. Plus my original project remained incomplete.
What is your opinon, how do you figure out what to do next?8 -
Ok so that's my plan, find a kernel with HUGE amout of drivers and , high version.
I built a small os based on linux
-- kernel version 5.0.2 from Plop Linux,
many libraries added 'by hand' -- packages from apts of Debian&Ubuntu, and unpacked packages into system with ArchiveManager,
has GUI but it's called xfree86 ( looks strange when a very old app running on Kernel5 )
So, without compiling, i can make a os.
But i found that Plop didn't compile rtl8188eu module which makes linux support some specific network cards.
I have no professional compiler but a tiny C/Cpp compiler called TinyCC (aka. tcc), but for my pc ( CPU freq = 800MHz ), it seems not possible to compile the module by myself.
And then i downloaded a 5.2 kernel with modules from kernel.ubuntu.com, but when i tried to mount my disk ( part. vfat ), i got some errors like IO charset not found, and then i replaced it with Xanmod kernel but also reported an error said Invalid Arguments, but i checked /proc/filesystems, it supports.
So what can i do? Are there any pre-compiled kernel & modules with 'full common supports'?
I tried kernel 4.4 ( from Ubuntu 16.04 LTS ) just now but the driver crashed when wpa_supplicant tried to initialize the device.7 -
Just discovered https://twitter.com/ExpertBeginner1. It's the story of my life. Giant classes, copying and pasting, and architects who create frameworks. It's great when we combine all three: A "framework" created by an architect which is made of giant classes that you copy and paste. Imagine a giant generic class where the generic argument is only used by dead code. Pause for a moment and try to visualize that.
It inherits from a base class with lots of virtual methods called by base methods that throw NotImplementedException, so if you don't need them you have to override them to return empty collections. If you're going to do something so messed up you could just put those default implementations in the base. But no, you can inherit, it compiles, and then it throws a runtime error unless you override methods the compiler doesn't require you to override.
The one method you're required to override has a TODO comment telling you what to put there. Except don't ever do what the comment says because that's the old standard. The new standard says never, ever do that.
Most of the time when I read about copy-and-paste coding it's about devs who copy and paste because they don't know how to write or reuse code. They don't mention the environments where copying and pasting the same classes over and over again is the requirement and you're not allowed to write your own code.
Creating base classes where you just override a method or two can potentially work, but only in the right scenarios and only if you do it right. If you're copying and pasting a class that inherits from the base class and consists entirely of repeated code, why the heck isn't that the base class? It could be a total mess, but at least it would be out of sight and each successive developer wouldn't become responsible for it by including it in their own code.
It's a temporary engagement, but I feel almost violated. I know it's a first-world problem, and I get to work indoors and take vacations. I'm grateful for those things.
Before leaving I had to document the entire process of copying and pasting an entire repo, making a ton of baseline edits that should just be in the template but aren't, and then copying and pasting from other places into the copied and pasted code. That makes me a collaborator. I apologize more than once in the documentation, all 20 pages of it that you have to read and follow before you even get to the part where you write the code for what you actually need it to do.
This architect has succeeded in making every single thing anyone does more about servicing the needs of his "framework" than about writing actual code to do what needs doing. Now that the framework is in and around everything it creates the illusion that it's a critical part of our operations. It's not. It's useless overhead.
Because management is deceived into thinking they need it they overlook the fact that it blows up, big and small, every single day. The log is full of failures that I know no one ever sees. A big chunk of what they think it does fails silently, and they don't even notice until months later when they realize how much data they're missing. But if they lose, say, 25% they'll never notice.
When they do notice they just act like it's normal, go into fire drill mode, and fix it. Doom. You're all doomed. I'm standing on the deck of the Titanic next to my jet ski.1 -
I can work productively and for very long hours with a lot of stuff which many dev considers productivity hurdles:
- single small monitor? No problem (in fact in one occasion in which my roommate accidentally broke my laptop charghing port and I couldn't get a spare I worked on an iPad connected trough SSH to a Linux machine completing one of the hardest tasks I ever did without significant loss of productivity)
- old machine? That's ok as long as I can run a minimal Linux and not struggle with Windows
- noise and chatter around me? A 10€ pair of earbuds are enough for me, no noise cancelling needed
- "legacy" stack/programming language? I'd rather spend my days coding in Swift or Rust but in the end I believe which is the dev and its skill which gets the job done not fancy language features so Java 8 will be fine
- no JetBrains or other fancy IDE? Altough some refactoring and code generation stuff is amazing Neovim or VS Code, maybe with the help of some UNIX CLI tools here and there are more than enough
despite this I found out there is a single thing which is like kryptonite for my productivity bringing it from above average* to dangerously low and it's the lack of a quick feedback loop.
For programming tasks that's not a problem because it doesn't matter the language there's always a compiler/interpreter I can use to quickly check what I did and this helps to get quickly in a good work flow but since I went to work with a customer which wants everything deployed on a lazily put together "private cloud" which needs configurations in non-standard and badly documented file formats, has a lot of stuff which instead of being automated gets done trough slowly processed tickets, sometimes things breaks and may take MONTHS to see them fixed... my productivity took a big hit since while I'm still quick at the dev stuff (if I'm able to put together a decent local environment and I don't depend on the cloud of nightmares, something which isn't always warranted) my productivity plummets when I have to integrate what I did or what someone else did in this "cloud" since lacking decent documentation everything has do be done trough a lot of manual tasks and most importantly slow iterations of trial and error. When I have to do that kind stuff (sadly quite often) my brain feels like stuck on "1st gear": I get slow, quickly tired and often I procrastinate a lot even if I force myself out of non work related internet stuff.
*I don't want this to sound braggy but being a passionate developer which breathes computers since childhood and dedicating part of my freetime on continuously improving my skill I have an edge over who do this without much passion or even reluctantly and I say this without wanting to be an èlitist gatekeeper, everyone has to work and tot everybody as the privilege of being passionate in a skill which nowadays has so much market2 -
Today my 16 yr old cousin asked
me...
"If the compiler knows that..
"semicolon is missing at line no 16
in Helloworld.java", then why it can't
simply put a';' there instead of
telling us..."
He got a point.3 -
rant.author != this
Christ people. This is just sh*t.
The conflict I get is due to stupid new gcc header file crap. But what
makes me upset is that the crap is for completely bogus reasons.
This is the old code in net/ipv6/ip6_output.c:
mtu -= hlen + sizeof(struct frag_hdr);
and this is the new "improved" code that uses fancy stuff that wants
magical built-in compiler support and has silly wrapper functions for
when it doesn't exist:
if (overflow_usub(mtu, hlen + sizeof(struct frag_hdr), &mtu) ||
mtu <= 7)
goto fail_toobig;
and anybody who thinks that the above is
(a) legible
(b) efficient (even with the magical compiler support)
(c) particularly safe
is just incompetent and out to lunch.
The above code is sh*t, and it generates shit code. It looks bad, and
there's no reason for it.
The code could *easily* have been done with just a single and
understandable conditional, and the compiler would actually have
generated better code, and the code would look better and more
understandable. Why is this not
if (mtu < hlen + sizeof(struct frag_hdr) + 8)
goto fail_toobig;
mtu -= hlen + sizeof(struct frag_hdr);
which is the same number of lines, doesn't use crazy helper functions
that nobody knows what they do, and is much more obvious what it
actually does.
I guarantee that the second more obvious version is easier to read and
understand. Does anybody really want to dispute this?
Really. Give me *one* reason why it was written in that idiotic way
with two different conditionals, and a shiny new nonstandard function
that wants particular compiler support to generate even half-way sane
code, and even then generates worse code? A shiny function that we
have never ever needed anywhere else, and that is just
compiler-masturbation.
And yes, you still could have overflow issues if the whole "hlen +
xyz" expression overflows, but quite frankly, the "overflow_usub()"
code had that too. So if you worry about that, then you damn well
didn't do the right thing to begin with.
So I really see no reason for this kind of complete idiotic crap.
Tell me why. Because I'm not pulling this kind of completely insane
stuff that generates conflicts at rc7 time, and that seems to have
absolutely no reason for being anm idiotic unreadable mess.
The code seems *designed* to use that new "overflow_usub()" code. It
seems to be an excuse to use that function.
And it's a f*cking bad excuse for that braindamage.
I'm sorry, but we don't add idiotic new interfaces like this for
idiotic new code like that.
Yes, yes, if this had stayed inside the network layer I would never
have noticed. But since I *did* notice, I really don't want to pull
this. In fact, I want to make it clear to *everybody* that code like
this is completely unacceptable. Anybody who thinks that code like
this is "safe" and "secure" because it uses fancy overflow detection
functions is so far out to lunch that it's not even funny. All this
kind of crap does is to make the code a unreadable mess with code that
no sane person will ever really understand what it actually does.
Get rid of it. And I don't *ever* want to see that shit again. -
*Solve this question*
*Me: Compiler?*
*Question- Fek just solve me :v*
*Me: GCC would give correct ans*
*Question- Fuck no, Mingw ;_; *
#nubCProgrammer ;-;
Sed Loif3 -
Is developing on Windows equivalent to squaring the circle? Yeah, obligatory windows bad circlejerk I know.
I’ve been developing a QT5 application for 2 weeks now on my main Linux system. Now, I wanted to make a Windows port for my friends to try.
I install QtCreator on Windows since it’s what I used on Linux. First time setup, I was forced to create an account; I was kind of pissed off but no biggie, I just put “Fuck you” on every credential possible. That’ll teach em.
Now, I needed a decent compiler. Visual Studio is a no go because why the fuck is it so big; also last I checked this thing barely supports C99. So I went with MinGW64 and MSYS2 and made a kit of it. I also went with that because it was the easiest way to get the latest version of GSL and MathGL without having to compile it. Also, the fact that MSYS2 had pacman was pretty nice.
I couldn’t get the thing to work for the whole day until I realized that my kit was pointing to the wrong compiler, turns out msys64/mingw64/bin/g++ and msys64/usr/bin/g++ are two different things. Ok whatever
Now, I just need to hunt down all the .a files and throw it in the LIBS option to get the libraries to work.
I finally made a successful build. Only to find that the application did absolutely nothing. I went with copy pasting the dlls into where the exe was located and launching it manually only to find the error “Application could not start correctly”
Yeah, I might be a retard but fuck you Windows. All I had to do on linux was just install qtcreator on my package manager and let the library dependencies be handled automatically and I could start doing my work right away.6