Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
Does o365 work for collaboration at all

It's kind of astounding that microsofts state of the art way to collaborate on docs is still "email them around"

Adbot
ADBOT LOVES YOU

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

gonadic io posted:

All those dynamic "scripting" langs that start with a p. Perl, python, php, ruby

pjavascript

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
it's really cool that for some reason when otherwise reasonable programmers get into that FP Good poo poo they suddenly forget all about the concept of "reasonable function or variable names" or "comments" and nobody's expected to blnk an eye

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
also keep up the yospos canon such as
- 6.5 figgies means whatever you want it to mean above 100k
- don’t admit to using an anroid (lol)
- everybody is a terrible programmer double especially those who think they’re good at it
- computers were probably a mistake and Turing deserved death not for being gay but for creating them

(USER WAS PUT ON PROBATION FOR THIS POST)

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
Sorry, that was in poor taste. I apologize.

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
it's just loving tedious and easy to screw up and still has a similarly abstracted machine model as c. you don't think about cache in x86 assembler, usually. you're still dealing with virtual memory. the only difference is it it's now a massive pain to do any flow control and it's a massive pain to deal with types above machine word size. hooray

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
unless you go hard into the types of multi access intrinsics like memory or instruction barriers or you are trying to not just get it working in assembler but get it working as fast as possible by digging into the isa farther than just how to do logic you probably won't get much out of it other than remembering some garbled letters for load double word to butthole register and fart

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Peeny Cheez posted:

"Either the Object-Oriented Paradigm goes or I do!"

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
I firmly believe everyone should know enough c to read it if only to know why other things are better

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Slurps Mad Rips posted:

one of the least well known features of C++: using try blocks as function bodies

C++ code:
template <class... Args>
expected<invoke_of_t<Args...>> safe_invoke (Args&&... args) noexcept try {
  return std::invoke(std::forward<Args>(args)...);
} catch (...) { return std::current_exception(); }

struct T { int x; };

auto x = safe_invoke([] { throw &T::x; });

holy god

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Xarn posted:



Basically, you should have a positive reason to use a pointer, instead of placing the object directly onto stack/making it direct part of the object's layout.

yeah i think when most people say "always use smart pointers" i think they mean "for owning references that are dynamically allocated rather than using raw pointers", not instead of reference types or stack allocations

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
come talk about being terrible programmers in discord: https://discord.gg/EYJc6d2

the difference here is that this is actually already a discord that exists that people post in! mostly from coc. it’s good, come chat, we can add general channels and stuff too

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

VikingofRock posted:


(and no, I can't use std::filesystem from c++17, since it's been an uphill struggle making sure that I can count on c++11 being present on all the machines I want to run this on)

also i'm pretty sure cpp17 std::filesystem is just boost::filesystem



i think this behavior is kind of correct though? i guess my go to comparison is python: the copy operation (and unlink operation) are in os, but copying or removing trees are in shutil - and they have a couple different variants for surprising behavior like symlinks or attributes (or xattrs in the case of OSX). it's a filesystem library, not a shell library.

Phobeste fucked around with this message at 16:06 on Oct 20, 2018

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

prisoner of waffles posted:

If a boost library could provide a "perfect granular control of everything" API but also a "common use cases, do what I mean" API, there's an abnormally good chance they'll leave the latter as an exercise for the library consumer

e: blah blah blah burden of trying to be header-only

yeah, it's annoying. also boost fs isn't even header only

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Symbolic Butt posted:

I'm trying to learn of good ways to debug embedded C lately, it's kicking my rear end

debug pins and a logic analyzer, the print statements of embedded

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

ratbert90 posted:

lol, look at this guy with his fancy poo poo.

toggle a spare pin on the processor and watch it on the oscilloscope (because no LED's or buzzers were available on the board)

yes, that would be what i said. try using a logic analyzer like a saleae though it's a little better at the digital workloads and long capture times

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

cinci zoo sniper posted:

EVERY MORNING I WAKE UP AND OPEN PALM SLAM A VHS INTO THE SLOT. ITS ENTERPRISE DATA MANAGEMENT AND RIGHT THEN AND THERE I START DOING THE MOVES ALONGSIDE WITH THE MAIN CHARACTER, SINGLE SOURCE OF TRUTH. I DO EVERY MOVE AND I DO EVERY MOVE HARD. MAKIN WHOOSHING SOUNDS WHEN I SLAM DOWN SOME OF THEIR NUMBERS OR EVEN WHEN I MESS UP OUR NUMBERS. NOT MANY CAN SAY THEY ESCAPED THE GALAXY’S LONGEST SKYPE CALL WITH 25 PEOPLE. I CAN. I SAY IT AND I SAY IT OUTLOUD EVERYDAY TO PEOPLE IN MY OPEN OFFICE AND ALL THEY DO IS PROVE PEOPLE IN PROFESSIONAL ENVIRONMENT CAN STILL BE IMMATURE JERKS. AND IVE LEARNED ALL THE LINES AND IVE LEARNED HOW TO MAKE MYSELF AND MY INBOX LESS LONELY BY TYPING EM ALL. 2 HOURS INCLUDING WIND DOWN EVERY MORNING. THEN I LIFT

powerful

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Asleep Style posted:

So I want to learn C++. Does anyone have any book recommendations for modern C++? I'm worried if I just start googling and trying things that I'll end up writing C with classes and my code will be posted to this thread for eternity.

there’s a book called “modern c++” that I think is good idk I never read it

once you have a basic command of the language read and follow these

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

The_Franz posted:

it's you

you're the reason why text editors take 30 seconds to start on machines massively more powerful than 30 years ago on which they took 30 milliseconds

some people* take the whole premature optimization is the root of all evil to mean never think about performance at all

* web devs

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

prisoner of waffles posted:

in other news, I'm falling in love with MATLAB.

no

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
I mean yeah matlab is great and a big part of that is the ide and the way it strikes a nice balance between being an ide and a repl and everything and plots are nice and the math works and is good but at this point I’d rather jump through several annoying hoops to get python

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

thank you so much this is exactly what I was fruitless googling

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

pokeyman posted:

you don’t rewrite poo poo, kotlin-java interop is excellent, just write new stuff in kotlin

and if you’re about to rewrite more than 30% of a java file for some reason you click "convert to kotlin" first

so you're advocating for mixing languages in a single source file huh. please don't come back and fishmechfully reel off all the other situations in which one does this because they're never actually good

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Arcsech posted:

what

1) that’s not what they said and
2) you can’t do that in Java/Kotlin anyway. you CAN mix them in the same project, but not the same file.

there’s a button in IntelliJ to auto convert a java file into a Kotlin file, which is what they were referring to. it’s not bad because Kotlin is basically java with some extra syntax sugar

oh whoops misunderstood sorry

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
This all seems like a slightly roundabout and unnecessarily complex way of summoning tef

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Maximum Leader posted:

its not impossible because razor components is server-side blazor which sends javascript and html to the client. I checked out a blazor client-side demo and mono + mscorlib is over 2mb lol, server-side is probably a good idea

sounds about right

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Aramoro posted:

I mean sure if you're a terrible programmer

buddy have I got news for you

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

carry on then posted:

how many containers do you have for blowing your own horn

in the context of SA we usually call them threads

e: and lots

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

brap posted:

honestly I don’t find “there’s a single huge file” that compelling of a horror. complicated things are complicated and files aren’t always the necessary unit of code organization. learn to navigate a source file and you can get by.

the engineering effort of determining an appropriate way to split things and actually doing it while lots of people on a team might be working with that file in different release trains is not necessarily that much bang for buck.

this is true in theory but in practice no 30kloc single source file (that isn’t an intermediate, etc etc, don’t fishmech this) has ever been good

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Slurps Mad Rips posted:

c tp s: I'm trying to (desperately) make sure I never have to touch CMake again (this is a lie, but if it means I have to touch it less often then its worth it) by writing a library that does the common operations everyone does in CMake automatically. Even a few of the maintainers are keeping an eye on it. This means I've been deep into CMake and know it to a degree that the average mere mortal is nowhere near understanding. So here's a small "Everything you never wanted to know about CMake" post

  • contrary to popular belief variables in cmake can be any valid unicode byte sequence the hard part is dereferencing said variable. Want to get the value out of it? You'll need to escape each non-alphanumeric non "-./_" byte. This means you can have variables named 💩that can be set as booleans (since an if() dereferences automatically), but can't actually be dereferenced unless you do some magic byte poo poo and that's error prone.
  • this rule of what constitutes a valid identifier also applies to properties, cache vars, you name it except commands. (macros/functions)
  • add_library(whatever::dude::gently caress::it INTERFACE IMPORTED) is basically how you can have namespaced dictionary types in cmake. These exist at the directory scope (the old pre-CMake 2.8 default scope) and are available anywhere below their definition, but not available above.
  • cmake actually supports "destructors" so you can fire events off at the very end of its configure step. just call variable_watch on CMAKE_CURRENT_DIR and when its set to an empty string you'll know you're done configuring.
  • because cmake treats lists as strings separated by semicolons, a lot of the core cmake devs resort to its internal lovely regex engine for escaping. I said "gently caress that" and decided to do string replacements using the old ascii control code separator units of FS,GS,RS, and US. This allowed me to take the above "dictionary" types and then serialize them to disk. vim and emacs render these files in a not terrible way so the data is still readable.
  • remember above when I said "any valid unicode sequence"? I lied. Properties also permit invalid byte sequences, so I can have a key named INTERFACE_${c0} where c0 is the invalid byte C0 and you can't loving stop me.
  • there are more than just ${variable} style variable references in CMake. There is also CACHE{VAR} and ENV{VAR} references for the CMakeCache.txt and environment variables respectively. You can also make custom variable references like the ones found in the ExternalData module. So I said "Well, what if I had a variable syntax to represent a git repository or a zip file or archive?", so now I can do fetch(HUB{catchorg/catch2@v2.6.0}) because gently caress you
  • generator expressions combined with file(GENERATE) allow you to do things like
    • generate a response file for use in some other target
    • generate a custom toolchain that is invisible to the average person because you injected a custom target_sources command
    • generate a pch which the developers of cmake has said would be hard and impossible to do because they are cowards unwilling to enter into a dark contract with an eldritch demon named "Grant"
    • never have to touch grpc or protobuf's bullshit cmake garbage ever again
    • generate unity builds on a per directory basis

How am I getting this loving shitshow of a library out to people? They put a FetchContent call at the top of their build file and watch the fireworks. You'll only ever use like 5, maybe 6, commands unless you're doing some wacky poo poo like generating an ar script as a hack or whatever.


I loving hate cmake

this whips rear end, i hate cmake

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

DONT THREAD ON ME posted:

i easily manage this with the reset method i mentioned. i just craft multiple commits instead of a single commit.

aren't you an emacs guy? if you're an emacs user and not using magit you're loving up. tbh it's legit to install emacs only to use magit, also

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

gonadic io posted:

balena.io (formerly resin.io) have a cool thing where when you push to their remote (that's how you send them your code to build and flash onto devices) it'll run the docker build step as part of the commit hook and show you the stdout

honestly i'm pretty impressed with them. they started out as just an arm port of docker but now they offer a (v expensive) full rpi level hosted thing. they take care of: deploying code, updating devices, deploying secrets, OS setup (you base your dockerfile from one of their arm base images), ssh, public ip, logs, restarts, etc

saved us probably hundreds of manhours setting all this poo poo up.

i think they offer some kind of self-hosted poo poo too to cut down on costs but idk anything about that

it’s ok. we used them but it was a bad idea because it flat out doesn’t function if you break the model of “100% of devices are or can easily be connected to the internet”. also it’s super expensive.

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

TNG s8e14: Q has a never ending list of things for Picard to do, each seemingly more important than the last. Geordi installs a blockchain on Data so he can get high sniffing the androids farts.

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
rat bert is about to recommend using boost python. as a knowledgeable bystander I can tell you: you’re allowed to murder him preemptively

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

Powerful Two-Hander posted:

what is the programming equivalent of rolling coal?

edit: im going to throw in "mongo" as a starter for 10

shipping an electron/react native desktop app

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

gonadic io posted:

Shipping an electron/react native desktop app running inside a js docker implementation running in another electron/react native desktop app on OSX

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

animist posted:

the more i attempt to use c++ metaprogramming the more i can feel my brain dribbling out my ears

c++ metaprogramming is incredibly good but unfortunately it requires a lovely perfectly smooth brain. marble-like, hard as a rock. this is enlightenment

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
dev targeting react gets tripped up by responsive design, news at 11

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
no it's when they take their mediocre to lovely architecture choices personally and get really mad when you correct them

Adbot
ADBOT LOVES YOU

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man

gonadic io posted:

Wait I thought we were talking about juniors, not seniors

turns out it’s invariant across experience

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply