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
Presto
Nov 22, 2002

Keep calm and Harry on.

redleader posted:

jq is like "what if xpath but bad"

This is like saying "what if black hole but blacker"

Adbot
ADBOT LOVES YOU

ShimaTetsuo
Sep 9, 2001

Maximus Quietus

Twerk from Home posted:

You ever experience the thrill of handling Norway in yaml?

the other day I accidentally passed the special missing value NA_character_ to a 3rd party R package we pay good money for (lmao) and it straight up replied that it couldn't find any data about namibia

redleader
Aug 18, 2005

Engage according to operational parameters

MrMoo posted:

Like why would one think it is a good idea to reply to that conversation in public?

just letting my ceo incorrectly poo poo talk all my work in public

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Private Speech posted:

thinking about it sure it's super dumb depending on what their policies are like on company secrets and social media use and such, but maybe that's how lax it was at twitter

someone said twitter had explicit rules allowing their employees to do that, which werent updated when elon took over

seems like a pretty good labor case to me, but i live in a developed nation so ymmv

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice

MrMoo posted:

Like why would one think it is a good idea to reply to that conversation in public?

not everyone is a bootlicker and these particular people are not gonna be hurting for work. i would not be surprised if they are financially independent.

i'm sure some of their colleagues that can't stand up to elon appreciate the gesture

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

MrMoo posted:

Like why would one think it is a good idea to reply to that conversation in public?

Publicly telling horrible bosses to shut the gently caress up makes the world a better place.

animist
Aug 28, 2018

DELETE CASCADE posted:

jq is good in json-brain, xpath is good in xml-brain

by which i mean, if you dislike xpath, you probably don't like xml to begin with. an xmler would feel the same way about jq

xpath is rad :hmmyes:

MrMoo
Sep 14, 2000

jsonpath is a thing too

pseudorandom name
May 6, 2007

MrMoo posted:

jsonpath is a thing too

I like how it is defined in terms of XPath and every single example has the XPath equivalent and the JSONPath version is obviously worse.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

goddamn right you do

Powerful Two-Hander
Mar 10, 2004

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


god drat does the Elastic Search documentation suck. I've got two instances with a logger writing to each one, on one the index template has been correctly auto created and has 94 fields, on the other it only has 28 and poo poo doesn't get published properly.

why is this? Who knows! API keys on both should be the same but you can't query the permissions an API key has so you just have to guess! Oh but the docs day you can but the query doesn't work! so maybe I can export the mapping from one instance to the other? Nope that fails!

Sapozhnik
Jan 2, 2005

Nap Ghost
Use Loki op

Destroyenator
Dec 27, 2004

Don't ask me lady, I live in beer
aren’t the auto fields are based on the first document (log entry) that has something in that field? so which logs hit the index first will determine what gets detected

you’re better off specifying them if you can. get a dump of the current one that’s close and edit it and push it to a new index

Powerful Two-Hander
Mar 10, 2004

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


Destroyenator posted:

aren’t the auto fields are based on the first document (log entry) that has something in that field? so which logs hit the index first will determine what gets detected

you’re better off specifying them if you can. get a dump of the current one that’s close and edit it and push it to a new index

yeah that's what I thought as well, but also that the templates could get modified by later entries as long as the API key granted overwrite permissions.

good point though maybe I'll just export a document from one to the other or something like that.

then again it doesn't make sense that one instance has it set up correctly but not the other because both are running the same process to bootstrap a new index pattern

Powerful Two-Hander
Mar 10, 2004

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


hmm when I query items in the index in the console they look the same and both state they use ECS 1.5.0, so this might just be kibana being a pile of poo poo

distortion park
Apr 25, 2011


Destroyenator posted:

aren’t the auto fields are based on the first document (log entry) that has something in that field? so which logs hit the index first will determine what gets detected

you’re better off specifying them if you can. get a dump of the current one that’s close and edit it and push it to a new index

at an old job we shoved all our logs into a single daily index. the schema was defined by the first log entry(s) to hit it that day, every day. gotta hope you didn't name your structured logging field the same as someone else!

distortion park
Apr 25, 2011


especially bad for error logs that don't normally happen

Destroyenator
Dec 27, 2004

Don't ask me lady, I live in beer
you will always get the same looking documents out (unless you've configured some remappings or something) because it doesn't modify the documents, it just indexes them incorrectly. you should try calling this one for each index https://www.elastic.co/guide/en/elasticsearch/reference/8.5/indices-get-mapping.html to see what it has created. you can manually edit the response to clean up any datatypes that are incorrect and then use the update (put) versions of that api to create new indices with the correct mapping, and not rely on the auto mapping detection

unless whatever ingestion you're doing it creating a correct mapping for you and they both match, then idk

Destroyenator
Dec 27, 2004

Don't ask me lady, I live in beer
if you add new fields later i don't know how it will react though, that approach applies more for consistent documents

Powerful Two-Hander
Mar 10, 2004

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


thx I'll try that. the indexes are pushed from Serilog behich uses the elastic common schema, so mappings etc are supposed to be loaded from the xpack or whatever because they conform to the logs-* pattern, and the API key has cluster privileges to push templates (and Serilog is configured to update/overwrite mappings) and this worked fine on one instance

honestly though the docs *suck* stuff just randomly working or not between versions or things you'd expect to be there just not, or being named in such a weird way you can't find them

it's worse than goddamn technet

MrQueasy
Nov 15, 2005

Probiot-ICK

Destroyenator posted:

you will always get the same looking documents out (unless you've configured some remappings or something) because it doesn't modify the documents, it just indexes them incorrectly. you should try calling this one for each index https://www.elastic.co/guide/en/elasticsearch/reference/8.5/indices-get-mapping.html to see what it has created. you can manually edit the response to clean up any datatypes that are incorrect and then use the update (put) versions of that api to create new indices with the correct mapping, and not rely on the auto mapping detection

unless whatever ingestion you're doing it creating a correct mapping for you and they both match, then idk

just be warned that if you’re trying to dump a bunch of different docs into one soup, then there IS a field limit

titaniumone
Jun 10, 2001

I've never used it but I've been curious about cuelang instead of json or yaml

is it any good?

Achmed Jones
Oct 16, 2004



it's for use on computers, so no

AnimeIsTrash
Jun 30, 2018

Dijkstracula posted:

awk owns, we should have an awk appreciation thread

this

titaniumone
Jun 10, 2001

Achmed Jones posted:

it's for use on computers, so no

gottem

12 rats tied together
Sep 7, 2006

titaniumone posted:

I've never used it but I've been curious about cuelang instead of json or yaml

is it any good?

ive inherited a lot of structured configuration that we have a burgeoning json-schema commitment to, and this looks extremely better than that, so i will try it out and let you know in a week or so

MrMoo
Sep 14, 2000

early paper from Amazon, interesting read:

https://www.allthingsdistributed.com/2022/11/amazon-1998-distributed-computing-manifesto.html

Powerful Two-Hander
Mar 10, 2004

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


oh my god

OH MY GOD

this loving elastic logging problem was nothing to do with the index templates at all! It was that I'd moved a goddamn statement close in the logger init so the first log target would get added, log a message saying "I'm initialised", thenthe second one was getting added and overwriting the whole config instead of adding to the source list of the existing one

so the logger looked like it started but was actually being shut down on whatever the first defined target was. it was only when I thought to flip the log target config I realised what was happening

gently caress!

Cold on a Cob
Feb 6, 2006

i've seen so much, i'm going blind
and i'm brain dead virtually

College Slice

Powerful Two-Hander posted:

oh my god

OH MY GOD

this loving elastic logging problem was nothing to do with the index templates at all! It was that I'd moved a goddamn statement close in the logger init so the first log target would get added, log a message saying "I'm initialised", thenthe second one was getting added and overwriting the whole config instead of adding to the source list of the existing one

so the logger looked like it started but was actually being shut down on whatever the first defined target was. it was only when I thought to flip the log target config I realised what was happening

gently caress!

lol computers are a hell gently caress

Ciaphas
Nov 20, 2005

> BEWARE, COWARD :ovr:


you hate to see it

sb hermit
Dec 13, 2016






hell, :same:

Antigravitas
Dec 8, 2019

Die Rettung fuer die Landwirte:

Powerful Two-Hander posted:

oh my god

OH MY GOD

this loving elastic logging problem was nothing to do with the index templates at all! It was that I'd moved a goddamn statement close in the logger init so the first log target would get added, log a message saying "I'm initialised", thenthe second one was getting added and overwriting the whole config instead of adding to the source list of the existing one

so the logger looked like it started but was actually being shut down on whatever the first defined target was. it was only when I thought to flip the log target config I realised what was happening

gently caress!

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
owned

aside from that, anyone knows if there's any good books for c++20? i learned c++11 by going through "the c++ programming language" by stroustrop when the updated c++11 version came out and that was pretty comprehensive, but there doesn't seem to be a new edition for c++20. i don't think i'm gonna find anything as comprehensive, but anything that goes into the language in some depth would be welcome

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

The C++ thread in SH/SC would know better, I'm sure, but I imagine for the major features like stripped-down concepts ("template constaints") and the new memory model, going to the published papers is likely a better resource. I know the "Concepts Lite" paper is fairly old but I'm fairly sure it's only now getting integrated into the actual standard, for instance. As for the memory model, I'm not actually sure what they settled on for c++20/23 but going to Viktor Vafeiadis' and Derek Dreyer's work in the space might be a good intro.

Twerk from Home
Jan 17, 2009

This avatar brought to you by the 'save our dead gay forums' foundation.

Deep Dish Fuckfest posted:

owned

aside from that, anyone knows if there's any good books for c++20? i learned c++11 by going through "the c++ programming language" by stroustrop when the updated c++11 version came out and that was pretty comprehensive, but there doesn't seem to be a new edition for c++20. i don't think i'm gonna find anything as comprehensive, but anything that goes into the language in some depth would be welcome

The new tour of C++ book is probably the best place to start

https://www.stroustrup.com/tour3.html

jony neuemonic
Nov 13, 2009

Deep Dish Fuckfest posted:

owned

aside from that, anyone knows if there's any good books for c++20? i learned c++11 by going through "the c++ programming language" by stroustrop when the updated c++11 version came out and that was pretty comprehensive, but there doesn't seem to be a new edition for c++20. i don't think i'm gonna find anything as comprehensive, but anything that goes into the language in some depth would be welcome

I read the c++17 version, but Marc Gregoire’s Professional C++ was good and I think there’s an updated edition out now.

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
someone in the sh/sc c++ thread suggested this http://cppstd20.com/ and it seems more or less exactly what i was looking for. there's a c++17 version too and i think i'll start there since they really seem to cover only the new stuff and nothing else in each of the books

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

nice, that looks good, ty for reporting back :shobon:

Poopernickel
Oct 28, 2005

electricity bad
Fun Shoe
as a reminder: c++ is so complex that there’s an entire book on how the = operator works (cppmove.com)

Really let that sink in

Adbot
ADBOT LOVES YOU

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal
yeah but if you use it for long enough you literally go insane and it starts making a lot of sense

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