|
Ciaphas posted:Alright, what's a non terrible build system? cmake? trick question they're all terrible
|
# ? Jan 10, 2017 22:41 |
|
|
# ? May 10, 2024 04:51 |
|
Guess I'll start with cmake then, i'm sure i'll be back with questions I suppose my first one is why Makefiles are supposedly terrible, one of our other projects uses them and works just fine, just gotta add source files to the appropriate section. Though it's only compiling one executable, not multiple, so I guess that's a factor
|
# ? Jan 10, 2017 22:46 |
|
Plorkyeran posted:trick question they're all terrible well this is the right thread for it then!!!!!!!!!!!!
|
# ? Jan 10, 2017 22:47 |
|
it sucks that c# list<T>'s ToArray performs a copy. i know its got an array backing it, just gimme a reference to that directly somehow please had to refactor a buncha stuff to use array[]s instead of Lists because of this today and well it performs a lot better thanks to way less random poo poo gettin copied around but its also ugly
|
# ? Jan 10, 2017 22:52 |
|
cmake is markedly worse than make terrible programmers don't like make because it's one of those tools you have to *learn* how to *use* (also it's p easy to shoot yourself in the foot with a make abomination, but what is that not true of?)
|
# ? Jan 10, 2017 22:55 |
|
VOTE YES ON 69 posted:cmake is markedly worse than make well now i'm just confused and annoyed
|
# ? Jan 10, 2017 22:56 |
|
maven is the only good build tool
|
# ? Jan 10, 2017 22:58 |
|
Plorkyeran posted:trick question they're all terrible
|
# ? Jan 10, 2017 23:00 |
|
c tp s: I know basically nothing about macros, but I want a macro that expands into a bunch of conditional preprocessor logic and directives. Possible, Y/N? (I know it's not sane )
|
# ? Jan 10, 2017 23:02 |
|
what language? c?
|
# ? Jan 10, 2017 23:03 |
|
eschaton posted:sounds like a challenge to me https://brandur.org/postgres-queues so this talks about some of the problems you'll have if you did it in postgres although it might apply to any mvcc system that stores multiple versions (rather than say undo records) so yeah if you're looking for a challenge you'll need to start on 9.6 by default you're going to need use a partitoned table, and this ain't totally automatic yet so you don't take out autovacuum for deleting jobs collecting subtables is going to be fun, but you could tie it to re-delivery of jobs that failed, but you're going to need some sort of epoch/worker leases i thnk a brin index might help too when you're scanning over the subtables working out where the next job is too open a transaction, find the job entry and delete it/update it without commiting (or select for update), and use SKIP LOCKED when scanning for a new job on the other hand, this might be a bad idea if you have to have a lot of transactions open it might be easier to scan another table, flush into a UNLOGGED table, workers enqueue by deleting the first entry they find, but you'll still need to do the partitioning bollocks and yeah so then your worker will need some way to automate and hand out the work, like using a table lock over the partitioned tables but honestly it's always going to be a terrible fit because a b-tree is the wrong sort of index for this
|
# ? Jan 10, 2017 23:11 |
|
Xarn posted:c tp s: I know basically nothing about macros, but I want a macro that expands into a bunch of conditional preprocessor logic and directives. Possible, Y/N? (I know it's not sane ) yes of course. what's your lisp dialect of choice?
|
# ? Jan 10, 2017 23:12 |
|
ynohtna posted:yes of course. what's your lisp dialect of choice? ZetaLisp no, Common Lisp no, FUTURE-COMMON-LISP aieeeeee
|
# ? Jan 10, 2017 23:18 |
|
Bloody posted:it sucks that c# list<T>'s ToArray performs a copy. i know its got an array backing it, just gimme a reference to that directly somehow please needing to call .ToArray on a List in the first place is weird. I'm assuming it was third party code that demanded an array? if not, refactor that to take an IEnumerable / IList / IReadOnlyList e: if you do need to work a lot with plain old arrays, extension methods are their best friends NihilCredo fucked around with this message at 23:24 on Jan 10, 2017 |
# ? Jan 10, 2017 23:22 |
|
Bloody posted:it sucks that c# list<T>'s ToArray performs a copy. i know its got an array backing it, just gimme a reference to that directly somehow please ew no they should not just vomit out access to their backing store on demand, that'd be terrible. why do you even want to do that?
|
# ? Jan 10, 2017 23:24 |
|
Bloody posted:maven is the only good build tool
|
# ? Jan 10, 2017 23:31 |
|
is maven something that'll be on a basically-stock RHEL install because i have cmake but dunno about maven, i'll have to go back and check tomorrow before i left i got cmake to put together a program consisting of a single src/ and include/ directory but i'm a bit confused on how to do it when there's multiple modules/directories i.e. where A and B need to compile to make my final program, and A needs modules A1 and A2 to compile, etc. pre:A |-A1 |-A2 B |-B1 |-B2 |-B3
|
# ? Jan 10, 2017 23:35 |
|
Ciaphas posted:Guess I'll start with cmake then, i'm sure i'll be back with questions make is a basically good idea (a build system is a dependency graph plus a set of commands to produce each file given its dependencies). it has some relatively superficial problems that frustrate a lot of people (make the language that you specify your dependency graph with is a bad language with bad syntax), but it also has some deeper problems. it fundamentally doesn't support having a build command which produces multiple output files. it's very easy to have a makefile which will occasionally fail when built on a 12-core machine but always work on a 4-core machine because you're missing a single edge somewhere in your dependency graph. it doesn't handle dynamic dependency graphs. normally you don't explicitly specify header dependencies for source files and instead have your compiler emit a makefile that specifies them based on which files it included. this breaks when you have things like generated headers: when you first add a new generated header the source file won't already depend on it, so there's nothing that'll make make decide to build the header before the source file, and you have to run the build twice. it composes poorly. calling itself recursively on subdirectories is basically the only way to import an independent make build system into your build system, and while that's very elegant in a sense we figured out that it was fundamentally broken and a bad idea a few decades ago. it scales poorly. (some) modern build tools are dramatically faster for large projects. i feel i should repeat again that make-the-language is very bad. a large chunk of what automake does are things which can be done in plain make, but is awful because make-the-language is bad.
|
# ? Jan 10, 2017 23:42 |
|
Ciaphas posted:is maven something that'll be on a basically-stock RHEL install because i have cmake but dunno about maven, i'll have to go back and check tomorrow maven is java specific
|
# ? Jan 10, 2017 23:54 |
|
NihilCredo posted:needing to call .ToArray on a List in the first place is weird. ya its some of the uglier parts of the .net api
|
# ? Jan 11, 2017 00:18 |
|
raminasi posted:ew no they should not just vomit out access to their backing store on demand, that'd be terrible. why do you even want to do that? std::vector can do it!!!
|
# ? Jan 11, 2017 00:18 |
|
I'm not sayin itd be a good thing its just annoying that one dumb but necessary library function that only takes arrays has infected much of my code with arrays where I used to be using ienumerables and lists
|
# ? Jan 11, 2017 00:19 |
|
Pie Colony posted:what's wrong with that? i've used file system based queues before and they worked alright. atomic mv and all that nothing except the part where a windows service serializes and deserializes into some roll-your-own format and oh by the way the settings are managed through a web app but the settings are only read on service start. if you changed settings while the service was running the service would overwrite the files thereby clobbering your changes because oh yeah the settings are stored in the files, too. on top of all that the job types are organized in the very shittiest of inheritance hierarchies so LOL if you want to change or extend anything.
|
# ? Jan 11, 2017 00:27 |
|
Bloody posted:maven is the only good build tool
|
# ? Jan 11, 2017 01:04 |
|
Bloody posted:i gently caress up whiteboard interviews like this all the drat time. i get up there and completely forget what the hell the * actually does and stuff. its awful try just using an indecipherable scribble for every character worked for me
|
# ? Jan 11, 2017 04:08 |
|
raminasi posted:ew no they should not just vomit out access to their backing store on demand, that'd be terrible. why do you even want to do that? they should return a transparently copying array so that if the backing store changes, only then does the array that was handed out turn into a copy
|
# ? Jan 11, 2017 04:17 |
|
Plorkyeran posted:it scales poorly. (some) modern build tools are dramatically faster for large projects. anyone interested in building software should watch A New Architecture for Building Software from the most recent LLVM dev meeting: quote:Clang was written in part to deliver fast compile times for C & C++ code. However, the traditional way C compilers integrate with build systems places many limitations on how efficiently that can be done. This talk introduces llbuild -- a new framework for building build systems -- which was designed to help solve this problem, and envisions a new architecture for compiling software which would allow us to significantly improve compilation times for large software projects. and then of course send me any comments you have to pass along to Daniel, or just email him directly if you want eschaton fucked around with this message at 06:41 on Jan 11, 2017 |
# ? Jan 11, 2017 04:23 |
|
eschaton posted:they should return a transparently copying array so that if the backing store changes, only then does the array that was handed out turn into a copy What you're describing isn't an array, it's a List. If he was able to pass a List around he wouldn't have this problem in the first place.
|
# ? Jan 11, 2017 04:30 |
|
eschaton posted:This talk introduces llbuild -- a new framework for building build systems yo dawg
|
# ? Jan 11, 2017 05:03 |
|
St Evan Echoes posted:maven is java specific nope https://github.com/maven-nar/nar-maven-plugin
|
# ? Jan 11, 2017 07:30 |
|
Bloody posted:what language? c? Yeah. (C++ actually and it needs to work with whatever bugs MSVC has ) The desired result is that instead of having something like this C++ code:
ynohtna posted:yes of course. what's your lisp dialect of choice? I was trying to think up a "C preprocessor is the lispiest dialect" joke, but I got nothing. Xarn fucked around with this message at 09:55 on Jan 11, 2017 |
# ? Jan 11, 2017 09:00 |
|
first, use your language's metaprogramming to bootstrap a lisp then use that lisp to make a better lisp, with macros and objects
|
# ? Jan 11, 2017 09:26 |
|
https://github.com/eudoxia0/cmacro
|
# ? Jan 11, 2017 10:43 |
|
Lisp was the first plang
|
# ? Jan 11, 2017 14:30 |
|
Finster Dexter posted:lol lovely co-worker quit today... not even 2 weeks notice so I'm stuck on the team until they get a backfill trained on all the poo poo that was this guy's pet projects that he aggressively defended from any and all collaboration. haha fml
|
# ? Jan 11, 2017 15:10 |
|
Sapozhnik posted:Lisp was the first plang i dunno, plangs are very occasionally used to write something useful
|
# ? Jan 11, 2017 16:09 |
|
I could use feces to paint a beautiful picture but it will still smell like poo poo.
|
# ? Jan 11, 2017 16:28 |
|
regarding stupid idiot access to the array backing a list, you can definitely do some inappropriate bullshit with:code:
|
# ? Jan 11, 2017 16:50 |
|
Bloody posted:regarding stupid idiot access to the array backing a list, you can definitely do some inappropriate bullshit with: uh those are both reference types
|
# ? Jan 11, 2017 17:04 |
|
|
# ? May 10, 2024 04:51 |
|
think I'm getting a better handle on cmake, and i like how (once I worked out the syntax) it lets me easily do that project split by module/library thing for unit testing purposes problem is it's made me realize how coupled my code is already, like i have libraries A and B and A has libraries A1 and A2 but both depend on at least including B's .h files I guess to unit test A1 and A2 i'd have to write stubs for B in the unit test program? Is that right? i've only put together single makefile monolithic builds before and haven't ever really been responsible for formal testing
|
# ? Jan 11, 2017 19:43 |