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
akadajet
Sep 14, 2003

DELETE CASCADE posted:

snowflake and bigquery also pretty good, but in different ways

good ways to burn a lot of your employers cash

Adbot
ADBOT LOVES YOU

DELETE CASCADE
Oct 25, 2017

i haven't washed my penis since i jerked it to a phtotograph of george w. bush in 2003
nah it's cheap as gently caress bro. if you don't actually have "big data" then the pricing is lmao compared to a live relational db

Radia
Jul 14, 2021

And someday, together.. We'll shine.
necc0 here really likes mongodb but i dont think ive ever spent the time sitting down designing mongo schema, and that feels.. i dunno, "antithetical" somehow to the way it's advertised.

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.

MrQueasy posted:

Example != Canonical

it literally is in this case. other similar things have other names

MrQueasy
Nov 15, 2005

Probiot-ICK

pokeyman posted:

it literally is in this case. other similar things have other names

Perhaps I would agree if vanilla markdown via the perl file had ever caught on.

However, the pl file has no tests, no examples, no clarifications on why some of the bugs are the way they are. Nowadays, the web mostly use github-markdown, stackoverflow-markdown, or one of the children of php-markdown. It's more of a toy example rather than an exhaustive implementation of the original spec that will never be updated.

Soricidus
Oct 21, 2010
freedom-hating statist shill
markdown not only doesn’t have a canonical implementation, it doesn’t even have a canonical spec

I am baffled that anyone thinks this is a good thing

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
it means you can nih up your own implementation and nobody's allowed to tell you that you did it wrong

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


I "inherited" (aka last owner got made redundant) an ancient wiki platform at work that uses regexes and xslt to convert markdown into html inside an asp classic wrapper

bob dobbs is dead
Oct 8, 2017

I love peeps
Nap Ghost
why dont you hire nice peeps of your preferred gender with whips and nipple clamps like a normal person

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


bob dobbs is dead posted:

why dont you hire nice peeps of your preferred gender with whips and nipple clamps like a normal person

Hmm that would probably meet some diversity goals

pokeyman
Nov 26, 2006

That elephant ate my entire platoon.
what is so hard about "the spec is whatever Markdown.pl outputs"

I was gonna say the best thing about markdown (and the only good thing I'll say about john gruber) is a refusal to tinker with it. but the other good part is how mad that decision makes people

maybe the other other good part is its superficial simplicity turning into nightmarish complexity, but seemingly only after you commit to reimplementing it. good lesson about nih and why proper specs exist

Corla Plankun
May 8, 2007

improve the lives of everyone
GitHub markdown is really good for quickly crapping out docs that you know drat well your stupid PO is never going to read but insists on you writing, and having them look professional enough that they won't send them back

maybe use mermaid to make some quick block diagram svgs to make it even more impressive looking during the first and only glance they will ever get

mystes
May 31, 2006

pokeyman posted:

maybe the other other good part is its superficial simplicity turning into nightmarish complexity, but seemingly only after you commit to reimplementing it. good lesson about nih and why proper specs exist
This always happens with "simple" poo poo like markdown and yaml

12 rats tied together
Sep 7, 2006

yaml is an interesting case because there has always been a proper spec, the spec was just already nightmarishly complex, and instead of dealing with it many people just chose not to implement it

CPColin
Sep 9, 2003

Big ol' smile.
CommonMark has a spec AND tests. It was nice to stumble on when I was looking for a Markdown library to use.

redleader
Aug 18, 2005

Engage according to operational parameters

Powerful Two-Hander posted:

regexes and xslt to convert markdown into html

:psyduck:

i just

how do you come up with that in the first place

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


redleader posted:

:psyduck:

i just

how do you come up with that in the first place

it was a rip of something called openwiki circa 2005 I think. All the pages are stored as text columns in an SQL database with some hierarchy system I can't be bothered to work out.

I'm in the process of killing it by locking off entire sections and sticking horrible 'this will be removed banners into every page via xslt injection

MrQueasy
Nov 15, 2005

Probiot-ICK
To be fair, regexes and stuff is basically how the original Markdown Perl script worked.

sb hermit
Dec 13, 2016





to think that a perl script is the reference implementation of something as widespread as markdown

sb hermit
Dec 13, 2016





I wrote perl in order to add spamassassin modules and even I cannot completely understand what I wrote unless I write copious amounts of comments

outhole surfer
Mar 18, 2003

sb hermit posted:

I wrote perl in order to add spamassassin modules and even I cannot completely understand what I wrote unless I write copious amounts of comments

the perl interpreter is a utility that translates line noise into book stores

Sapozhnik
Jan 2, 2005

Nap Ghost
love to work at a place where people don't have a solid grasp of the difference between "configuration" and "string constants"

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


Sapozhnik posted:

love to work at a place where people don't have a solid grasp of the difference between "configuration" and "string constants"

lol one of my tasks next week is I gotta write up the architecture principal for config management across the division

Sapozhnik
Jan 2, 2005

Nap Ghost
configuration is all the stuff that differs between deployment environments

not "let's make this string configurable at runtime just in case"

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


Sapozhnik posted:

configuration is all the stuff that differs between deployment environments

not "let's make this string configurable at runtime just in case"

oh sorry I read that as people using string constants as configuration

which I mean...does happen.

CPColin
Sep 9, 2003

Big ol' smile.

Sapozhnik posted:

configuration is all the stuff that differs between deployment environments

not "let's make this string configurable at runtime just in case"

My predecessor at my current job did this all over the place. I'm guessing they had a vague idea that magic values were bad, but didn't know how one is supposed to avoid them. This resulted in a really long configuration file full of values like the name of the XML element we expect in some API responses and various other values that will break everything if they're ever changed so they don't match values in database views, vendor software, etc.

And of course, the importance of those values being what they are is not documented. I keep having to add comments that say stuff like, "It doesn't matter what this value is, as long as it matches these other places (...)"

No Pants
Dec 10, 2000

Sapozhnik posted:

configuration is all the stuff that differs between deployment environments

not "let's make this string configurable at runtime just in case"

i had a senior guy up in my pull request asking me why I didn't make an environment variable name configurable

:(

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

No Pants posted:

i had a senior guy up in my pull request asking me why I didn't make an environment variable name configurable

:(

Should have made it configurable via environment variable

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Powerful Two-Hander posted:

oh sorry I read that as people using string constants as configuration

which I mean...does happen.

it can be a decent choice if you go full greybeard on it.

quote:

Customisation

dwm is customised by editing config.h, a C language header file.

What is config.h?

config.h is a source code file which is included by dwm.c, the main dwm source code module. It serves as the configuration file for all of dwm's features, e.g., application placement, tags, and colours. A vanilla download of dwm will contain a file called config.def.h, a template you can use to create your own config.h file.

To start customising dwm, simply copy config.def.h into config.h before you run make.

How do I modify config.h?

config.h can be edited just like any other C source code file.

so it's still basically a configuration file, it just happens to be in C header format

it's not great but i've definitely seen xml and yaml files that were way less readable than this:

C code:
/* appearance */
static const unsigned int borderpx  = 1;        /* border pixel of windows */
static const unsigned int snap      = 32;       /* snap pixel */
static const int showbar            = 1;        /* 0 means no bar */
static const int topbar             = 1;        /* 0 means bottom bar */
static const char *fonts[]          = { "monospace:size=10" };
static const char dmenufont[]       = "monospace:size=10";
static const char col_gray1[]       = "#222222";
static const char col_gray2[]       = "#444444";
static const char col_gray3[]       = "#bbbbbb";
static const char col_gray4[]       = "#eeeeee";
static const char col_cyan[]        = "#005577";
static const char *colors[][3]      = {
	/*               fg         bg         border   */
	[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
	[SchemeSel]  = { col_gray4, col_cyan,  col_cyan  },
};

/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };

static const Rule rules[] = {
	/* xprop(1):
	 *	WM_CLASS(STRING) = instance, class
	 *	WM_NAME(STRING) = title
	 */
	/* class      instance    title       tags mask     isfloating   monitor */
	{ "Gimp",     NULL,       NULL,       0,            1,           -1 },
	{ "Firefox",  NULL,       NULL,       1 << 8,       0,           -1 },
};

/* layout(s) */
static const float mfact     = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster     = 1;    /* number of clients in master area */
static const int resizehints = 1;    /* 1 means respect size hints in tiled resizals */
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */

distortion park
Apr 25, 2011


i think I've realized why I don't like "reduce" a lot of the time it's used - it's often doing some combination of other functions all at once (e.g. filter and group by) in a way that is harder to understand just by looking at the top level of the code

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

NihilCredo posted:

it can be a decent choice if you go full greybeard on it.

so it's still basically a configuration file, it just happens to be in C header format

it's not great but i've definitely seen xml and yaml files that were way less readable than this:

C code:
/* appearance */
static const unsigned int borderpx  = 1;        /* border pixel of windows */
static const unsigned int snap      = 32;       /* snap pixel */
static const int showbar            = 1;        /* 0 means no bar */
static const int topbar             = 1;        /* 0 means bottom bar */
static const char *fonts[]          = { "monospace:size=10" };
static const char dmenufont[]       = "monospace:size=10";
static const char col_gray1[]       = "#222222";
static const char col_gray2[]       = "#444444";
static const char col_gray3[]       = "#bbbbbb";
static const char col_gray4[]       = "#eeeeee";
static const char col_cyan[]        = "#005577";
static const char *colors[][3]      = {
	/*               fg         bg         border   */
	[SchemeNorm] = { col_gray3, col_gray1, col_gray2 },
	[SchemeSel]  = { col_gray4, col_cyan,  col_cyan  },
};

/* tagging */
static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };

static const Rule rules[] = {
	/* xprop(1):
	 *	WM_CLASS(STRING) = instance, class
	 *	WM_NAME(STRING) = title
	 */
	/* class      instance    title       tags mask     isfloating   monitor */
	{ "Gimp",     NULL,       NULL,       0,            1,           -1 },
	{ "Firefox",  NULL,       NULL,       1 << 8,       0,           -1 },
};

/* layout(s) */
static const float mfact     = 0.55; /* factor of master area size [0.05..0.95] */
static const int nmaster     = 1;    /* number of clients in master area */
static const int resizehints = 1;    /* 1 means respect size hints in tiled resizals */
static const int lockfullscreen = 1; /* 1 will force focus on the fullscreen window */

Throwing that in a header will duplicate the constants across translation units. Swapping the static for extern and splitting declaration from definition while hiding definition behind a define you set prior to inclusion in one of your TUs will condense the space used.

Zlodo
Nov 25, 2006

leper khan posted:

Throwing that in a header will duplicate the constants across translation units. Swapping the static for extern and splitting declaration from definition while hiding definition behind a define you set prior to inclusion in one of your TUs will condense the space used.

fanciful cutting edge technology such as *check notes* "parsing text files at runtime" will also do that, and you don't even need to recompile!

NihilCredo
Jun 6, 2011

iram omni possibili modo preme:
plus una illa te diffamabit, quam multæ virtutes commendabunt

Zlodo posted:

fanciful cutting edge technology such as *check notes* "parsing text files at runtime" will also do that, and you don't even need to recompile!

dwm is like 2000 lines of c. i don't think the authors are fan of such scandalous bloat as configuration files.

heck, even the "plugin system" is just a collection of diffs to apply.

quote:

dwm has no Lua integration, no 9P support, no shell-based configuration, no remote control, and comes without any additional tools, such as for printing the selection or warping the mouse.

dwm is only a single binary, and its source code is intended to be kept small.

dwm doesn't distinguish between layers: there is no floating or tiled layer. Whether or not the clients of currently selected tag(s) are in tiled layout, you can rearrange them on the fly. Popup and fixed-size windows are always floating, however.

dwm is customized through editing its source code, which makes it extremely fast and secure - it does not process any input data which isn't known at compile time, except window titles and status text read from the root window's name. You don't have to learn Lua/sh/ruby or some weird configuration file format (like X resource files), beside C, to customize it for your needs: you only have to learn C (at least in order to edit the header file).

Because dwm is customized through editing its source code, it's pointless to make binary packages of it. This keeps its userbase small and elitist. No novices asking stupid questions. There are some distributions that provide binary packages though.

dwm reads from the root window's name to print arbitrary status text (like the date, load, battery charge). That's much simpler than larsremote, wmiir and what not...

dwm creates a view for each Xinerama screen.

MrMoo
Sep 14, 2000

I just read up on StandardJS being a thing, i.e. a fairly randomly chosen set of rules to format JavaScript. The best thing is to deliberately ignore it just to wind up the authors. I love how the tooling just breaks on almost anything, completely defeating any goal of improving productivity.

sb hermit
Dec 13, 2016





so, one guy just decided that they know the best way to format javascript and is now finding the best way to force their personal style on the biggest number of people possible... which is the wet dream of many egomaniacs. the writing style certainly doesn't help their case

I wonder how it runs on minifiers

sb hermit
Dec 13, 2016





Frankly, all I ask of devs is to stick to four space indents and otherwise follow the coding style that is already in the source file.

Given that we write a lot of python, the indent thing is never a problem

bob dobbs is dead
Oct 8, 2017

I love peeps
Nap Ghost
gofmt is the only serious innovation of go. its a good and productive innovation tho. just get peeps to shut the gently caress up about this sorta thing upfront as a lang

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Zlodo posted:

fanciful cutting edge technology such as *check notes* "parsing text files at runtime" will also do that, and you don't even need to recompile!

I'm trying to minimize the computation costs on the deployed hardware to maximize my billable hours. This suggestion is harmful to both of these goals.

distortion park
Apr 25, 2011


MrMoo posted:

I just read up on StandardJS being a thing, i.e. a fairly randomly chosen set of rules to format JavaScript. The best thing is to deliberately ignore it just to wind up the authors. I love how the tooling just breaks on almost anything, completely defeating any goal of improving productivity.

they say "no .eslintrc" to manage but j clicked on a random faq question and they describe how to add some config to your package.json

Adbot
ADBOT LOVES YOU

akadajet
Sep 14, 2003

they decided to go with a bunch of dumb rear end rules like no semicolons which means that this “standard” style is just obnoxious if you’re used to idiomatic js

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