What are you working on, Jow Forums?
Old thread:
/dpt/ - Daily Programming Thread
Other urls found in this thread:
youtube.com
github.com
github.com
twitter.com
Python is a shitlang for amateurs
Rust is for people who write fast, correct and maintainable programs.
go is for retards
The fuck is this supposed to mean? Be a pretty face and fake enthusiasm for something you don't give two shits about?
any virgin lisp vs chad javascript pics
Now gotta start work on decoding MES(message) files.
babysitting job, probably
>write a bunch of classes for existing software behemoth at work
>finally everything works
>application engineer wants to have a buch of values stored between sessions
>np just write them into the ini file
>"yeah I also don't want to have to specify the reference to this other object every time, just store it or something"
>object is accessed through an interface
>can't have direct reference to object in that class because that leads to circular dependencies
Option a: Store the name of the referenced object in my ini file, then fetch the object instance of that name after creating all the objects. Shitty, hacky, error-prone.
Option b: Store the contents of the GUI element the app engie uses. Same as a except the data is stored elsewhere and if someone decides to create the objects in question through means other than the GUI, shit WILL break.
Option c: Learn how to use a monstrous collection of abstract interface containers and introduce 9001 levels of abstraction into my code to make it truly unmaintainable.
FUCKING GUI KIDS
FUCKING OOP
Close enough?
Python is perfect for practical solutions, fast development, easy to maintain web development, daily basis automation or administration scripting and tool creations, hacking, prototyping, and as an addon engine for your infrastructures and applications.
for everything else C, C++ and the web shit languages are needed.
Java/c# are shit tho.
>Syntax highlighting is juvenile. When I was a child, I was taught arithmetic using colored rods. I grew up and today I use monochromatic numerals.
t. Rob Pike
So, have you grown up yet?
No static typing is the antithesis of maintaiability
How do I do this with linq?
newList.Add(list1[list2[j]])
Where j varies from 0 to the size of list2
Rob pike after the world rejected plan9 took on a supervillain alter ego and unleashed go upon the world to take revenge
>correct
Is baby afwaid of a wittwe segfauwt?
Rust is for "people" who write CoCs.
easy to maintain i design, not in code i meant. At least still is better than PHP unless your web has a lot of traffic, but if it has then probably the infrastructure should be built with general purpose programming languages because PHP and Node.js are horrible languages to build apps of any kind.
Good luck user. Are you doing this with a debugger or are you eyeballing it?
It's good to know I'm not the only one actively shitting on Go here.
For some reason it gives me pleasure to go into details on how bad the language is, yet I haven't even used it, only read a book or two. I guess Go is the perfect punching bag of a language.
PHP and Node.js are even worse amateur languages, but if you can spot the flaw in those shitters you should be able to see python for what it is too.
This, but unironically.
There's nothing ironic about my post, go is for utter retards that cannot tell that the emperor is nude
Just a hex editor, and intuition, i guess.
Doing god's work.
The original is posted further up if you want to declare a no-go zone
whats the easiest way i can have a list of things each with their own unique and unchanging key in python?
it means "make sure the kids don't kill themselves while the owner takes a shit"
Also big shoutout to stringly typed languages (python)
Nobody knows what a monad is
Attach GUID keys to these objects and store them in an sqlite db or something.
He was just shitposting, r-right guys?
>Language can do runtime type checks if you really need it to with casting and reflection
>People bitch about a rare use case because its not POO
K
I can give you an explanation, but most monad tutorials are dogshit and I can't give you any guarantee mine will be any better.
The only people who shit on it have never used it because the things everybody cries about are insane fringe cases. Its like when people abuse void pointers in C. You can sure but you probably shouldnt.
Go is beyond poo mate. Pajeets program poo because they live in a country where shitting in the streets is common. You on the other hand chose go even though you had every opportunity to know better.
Are generics an extreme fringe case for you?
I dont write abstract factory factories, so the way go handles interfaces is more than enough genericism for 98% of everything I write. If you've ever used it you would know this.
The lack of generics and sane error handling, idiosyncratic syntax and cultish community aren't some "fringe cases" tho.
89 IQ detected
Interfaces are generic enough.
Handling an error immediately is far more sane than mysterious catch blocks that propogate up 12 stacks before catching
Theres literally nothing wrong with postfix type declarations
>my code is superior because it segaults
said no one ever
>so the way go handles interfaces is more than enough genericism
Except when it's not and you have to use Canadian Aboriginal Syllabics.
Literally nobody except that one insane person does that.
>babysitting
>great for your cv
i should add, i dont really need a full database. what i need is a dictionary or something with a generated key that never changes, so i can add a thousand records to it. i also need to be able to reference them in other structures with just the key and know that any changes to the contents will not corrupt my shit as long as i dont delete the record referenced.
Also the correct way to do what he wants is LITERALLY interfacing. He seems like some insane sepples metatemplate programmer.
You only use Rust if you're so afraid of segfaults that you hamstring yourself from writing any useful programs. Good programmers aren't afraid of segfaults because they write correct code that doesn't cause any.
interface{} is a poor mans generic, lacking type safety. It's the equivalent of void*.
Gophers believe that if you use simple tools to solve a complex problem the solution will be simple, a fallacy that leads to shitty verbose code prone to error and runtime crashes.
>He doesn't know what "generic" means
>He doesn't know what is monadic error handling
>He doesn't know what is type inference
Raw base interface? Yes. That isnt what im talking about though. If you actually implement typed interfaces with known functions its generic and safe.
Interfaces are generic
Nobody knows what a monad is
Other way around
"no u"
You do realize using interface{} for generic code means 1) you lose type safety 2) performance suffers greatly because you have to do all the type checks in runtime. This is why that guy was ready to do anything to get him actual compile-time generics.
Loss of type safety isn't a problem if you've written correct code.
Why don't you use Python then? It's even simpler.
See
What that madman is doing is writing templates and search+replacing to make the packages, insteading of writing the interface and implementing it in the desired types.
this is the single most horrifying picture I've seen on Jow Forums this year, good job
Cniles and gotards are the same breed of retarded.
Even when the gopher himself is forced to admit the absurdity of his chosen language the illusion does not fade.
Thats true for every language.
Then you might as well write perl or php
Wow why do Dmitry, Aleehb and other shitskins get so upset over simple and concise stackoverflow questions without cluttering the question with "what I've tried so far" and why I would want a cleaner solution when mine works
To me, python is the perfect language for building something until you have the time and manpower to convert it into a better language.
Youve clearly never used perl
>until you have the time and manpower to convert it into a better language
when has that ever happened?
No, I avoid shitlangs
learning how to use "circuits" in Rec Room VR
I've used perl, it's a horrible language hard to read and maintain. No wonder it's dead.
Is this educational? Because I've just learned a lot.
The delusions blubbers tell themselves...
Oh ho no no no
That's actually a pretty decent proposal. I do want syntax coloring for certain things, but I would gladly trade much of the coloration for syntactic elements with context information.
Is programming one of the only professions where people regularly argue less quality of life is better?
babby want a bottle??
>high level
>hacking
Kek
>teaching kids scratch
It's just nerds acting like jocks with programming instead of athletics.
Rob "monochromatic is not problematic" Pike
Rob "spare no dollars for syntax colors" Pike
Rob "syntax highlight is a deadly blight" Pike
Rob "grayscale increases your payscale" Pike
ITT: autistic rustfags goofing about things that only other autistic rustfags care about.
itt: pedestrian go programmers too incompetent to see the deficiency of their language and too comfortable with mediocrity to do anything about it.
Is there a decent algorithm for yielding tree nodes in post order without having to compute all nodes in a list?
Scratch is great. Kids can learn flow control and junk before ever needing to learn any kind of syntax. I wish their implementations weren't so all over the place though.
>Nothing is more permanent than a temporary fix
learn what's type safety
casting to interface{} don't lose any information and won't allow you any operation on data unless you cast it back again, which is not type unsafe operation if you can match the type on runtime
dynamic dispatch being bad? yes
loss of type safety? no
You don't modify existing collections or access by index with linq. You create new ones keeping in mind that it will be lazy evaluated.
So, your first option is using a loop which is more concise, second is making your own extension method and the third is the following:
var newList = new List(list2.Count);
//no Linq
list2.ForEach(x => newList.Add(list1[x]));
//or some Linq
newList.AddRange(list2.Select(x => list1[x]));
It's funny how these very same people use arguments like "type safety isn't a problem if you just write it correctly" as if using a retard-language instills any confidence in your ability to write code right.
Pls help my dudes, I'm trying to compile the ps4-dumper for Linux ( github.com
~/ps4/ps4-dumper-vtx-1.8/tool ~/ps4/ps4-dumper-vtx-1.8
gcc -o bin2js bin2js.c
~/ps4/ps4-dumper-vtx-1.8
gcc -c -o build/unpfs.o source/unpfs.c -I/libPS4/include -Iinclude -Os -std=gnu11 -ffunction-sections -fdata-sections -fno-builtin -nostartfiles -nostdlib -Wall -masm=intel -march=btver2 -mtune=btver2 -m64 -mabi=sysv -mcmodel=small -fpie
source/unpfs.c:5:10: fatal error: ps4.h: No such file or directory
#include "ps4.h"
^~~~~~~
compilation terminated.
Makefile:26: recipe for target 'build/unpfs.o' failed
make: *** [build/unpfs.o] Error 1
What language makes you most dosh as a wageslave?
COBOL
you need github.com
>you mong
bit unnecessary, seeing as this wasn't mentioned on the page
all you had to do was open the makefile and see the very first line
Hebrew
In anons defense this sort of thing should be in the readme, not the makefile.
of course but he should be able to figure things like these out himself because lack of documentation is unfortunately a common thing in programming
Yes, but I don't want user to get the idea that this sort of dependency ""management"" is okay.
>no higher-order function composition
Into the garbage it goes
I'm patenting my software and there's nothing you cucks can do about it. :^)