|
jsonpath is a thing too
|
# ¿ Nov 16, 2022 16:36 |
|
|
# ¿ Apr 26, 2024 14:17 |
|
early paper from Amazon, interesting read: https://www.allthingsdistributed.com/2022/11/amazon-1998-distributed-computing-manifesto.html
|
# ¿ Nov 21, 2022 15:56 |
|
Xarn posted:People who like C, wtf is wrong with you? It is simple and not much can go wrong. Anything else and there are always language bugs and severe limitations. All the classics: string handling & UTF-8, memory management, networking, threading, and multi-processing.
|
# ¿ Dec 1, 2022 11:31 |
|
The language itself has minimal scope for errors, obviously anything a developer creates above is going to be super 💩 C++ almost guarantees developers making super 💩 above.
|
# ¿ Dec 1, 2022 18:26 |
|
According to Luke from Floatplane, OpenAI just releases their GPT3 beta, and it’s impressive. Ask anything in text form, being aware the training set is 2 years old. Writing stories about anything, writing short programs, finding and fixing security bugs, recipes, mending things, etc. https://chat.openai.com/ Sign up and go back to this chat URL for thread mode, in this mode you can ask more questions and refine the answers until you “reset thread” via the menu. Also, it has content filters but they are apparently easy to bypass. If you find something it doesn’t know you can train it in a thread and it can then answer. quote:Write a program to render “420” with THREE.js quote:Have the scene slowly rotate on the z-axis Also, it apparently does rather well at Advent of Code. MrMoo fucked around with this message at 14:21 on Dec 4, 2022 |
# ¿ Dec 4, 2022 13:30 |
|
I think IBM has some software for that.
|
# ¿ Dec 18, 2022 17:32 |
|
is this the new webdev thing, to just gas light now: https://www.conventionalcommits.org/en/v1.0.0/
|
# ¿ Dec 22, 2022 16:36 |
|
https://www.businessinsider.com/self-driving-car-developer-george-hotz-resigns-from-twitter-internship-2022-12
|
# ¿ Dec 22, 2022 19:24 |
|
redleader posted:nothing as gaslighting as wanting a standard format for commits in a project It's the "conventional commits" presumptuous naming, much like "standard js". If they chose some more suitably dull it may be ok.
|
# ¿ Dec 23, 2022 00:38 |
|
JavaScript tooling is absolutely a poo poo stain on webdev, which is saying something for webdev. I had to manually import a library and fix up the code to get Jest (a Facebook authored test framework) to run. I just 🤷🏻♀️. TSC works fine, but TS-Jest (because apparently we need flavours of Jest) flips its nut with a gigantic error page of no value. idk why Jest thinks I would care about using Babel? (another TypeScript compiler) It’s the weird keeping onto some legacy trait whilst abandoning everything else. To rub it in, the library is written in TypeScript itself, I cannot believe such a fast moving industry still hasn't dropped ES5 and all the turd that is AMD, CommonJS, and UMD, various random methods of importing libraries. The errors I see are about ES6M syntax (modules) being unsupported, either in flavours of the "import" command, but also at times, the "export" command. NodeJS is still only "experimental mode" support for ES6 modules, and that's not even attempting to look at testing in a browser with the plethora of additional components to get there. I expect problems with Node versus Browser environment, and there's plenty of weird issues there, from the tooling support of globals, to the random inconsistencies that NodeJS loves to present with almost all new HTML5 APIs. MrMoo fucked around with this message at 20:05 on Dec 31, 2022 |
# ¿ Dec 31, 2022 19:25 |
|
if they’re old they should be using non-GNU make, then almost nothing useful is implemented.
|
# ¿ Jan 6, 2023 16:03 |
|
you know this happens a lot, abusing free tier services: https://bootcamp.uxdesign.cc/how-a-single-developer-dropped-aws-costs-by-90-then-disappeared-2b46a115103a
|
# ¿ Jan 11, 2023 15:45 |
|
Just noted TypeScript and VS Code still has no support for Web Workers? That's somewhat impressive. Probably more poo poo on the ES6M pile, as Workers have no support for import maps at all and that's still quite 💩 Slap the VS Jest team for their work too. If I force "color" output, at least I can scroll in the terminal the output, but it's not really parsed to any useful effect. "less -R" doesn't work at all in a terminal, so some improvement at least. If I disable forcing the colour output then the VS Code extension just gobbles up all the output and hides it unless you run in debug mode. So many questions. It would be nice if VS Jest only ran the tests for code that changes, maybe it's trying to do that 🤷♂️ I hate webdev tooling. and webdev.
|
# ¿ Jan 18, 2023 19:06 |
|
abraham linksys posted:the current vs code jest "team" appears to be some person on github who doesn't even have an employer listed on their profile who is not being paid for their work but sure go off king White knighting Facebook project spinoffs? Of all the companies to choose from. All the significant work should be in the core Jest project, passing JSON objects back and forth, and just being a thin visual wrapper is all that is asked.
|
# ¿ Jan 18, 2023 20:24 |
|
That’s a somewhat elitist and toxic attitude to take. I may indeed do a patch, whatever, this is day one obvious issues with the software.
|
# ¿ Jan 18, 2023 22:31 |
|
Just reviewing some basic code calculating the astronomical season. It's very weird as it normalizes the year to 2000 for some reason, so clearly a Stackoverflow copy pasta, but no attribution. Paste a line into Google and find the original. It's the answer with 0 points and many bugs. Amazing. https://stackoverflow.com/a/68500498 JavaScript code:
MrMoo fucked around with this message at 22:58 on Jan 23, 2023 |
# ¿ Jan 23, 2023 22:55 |
|
it’s pretty simple from another answer, using Luxon DateTime:JavaScript code:
|
# ¿ Jan 24, 2023 01:32 |
|
Its a Rolex posted:is it normal to not document an API and instead tell someone to use the inspect element tool to deduce what the JSON you POST is? Well I've had a "professional" of multiple decades say they have never written a JSON schema in their entire career, and they write APIs every day for new customers. Not specifically the "JSON schema", as in any reasonably complete detail of JSON contents that an API produces.
|
# ¿ Jan 25, 2023 00:28 |
|
Tencent spent a lot of effort making a platform for Mysql: https://main.qcloudimg.com/raw/document/intl/product/pdf/tencent-cloud_236_5146_en.pdf They also have their own “performance” fork: https://www.tencentcloud.com/products/dcdb So you were using the latter as it’s targeted for doing everything (tm) MrMoo fucked around with this message at 11:53 on Jan 27, 2023 |
# ¿ Jan 27, 2023 11:50 |
|
I hate reading technical white papers but I also do not enjoy reading other peoples code. My ask was for a Raft algorithm to elect a leader in a cluster, and all I can do is lose brain cells. I guess the Raft Consensus paper could be worse, but its nice to have a general structure for starting from without having to reinvent the wheel, etc. I bookmarked several of the implementations listed, in C++20, Rust, JavaScript, and TypeScript. They all appear to follow the adage of novices making things more complicated than it needs to be. From a core logic of barely 100 lines, these projects run into 1,000s across many modules. The target for some appears to be flexibility in integration, but perversely they end up with the opposite as they hard code to particular external entities. The most impressive so far has been https://github.com/unshiftio/liferaft, off to a great start: quote:liferaft is an JavaScript implementation of the Raft consensus algorithm. So one creates an instance of a Raft class to contain all the magic, then call the join() API to add nodes in the Raft cluster. All good so far. However, instead of having a simple array of nodes by name, it creates a new instance of the class and sets a few properties. It's a really weird pattern. https://github.com/unshiftio/liferaft/blob/master/index.js#L772 JavaScript code:
Honorable mentions to https://github.com/matthewaveryusa/raft.ts/blob/master/src/state.ts JavaScript code:
C code:
|
# ¿ Feb 12, 2023 19:42 |
|
I implemented broadcast over a WebRTC mesh network using Raft protocol for leader election and WebSockets for SDP (SSL credentials for peer connections) relay. The goal is to have a network of digital signage TVs run synchronised content pulling from a third party, whilst being resilient to both upstream and individual TV outages. Network outages are quite common, along with terrible performance, and TVs can randomly overheat, and quite frequently just crash out and need daily restarting. The elected leader is the one to pull from the third party API and broadcast out to everyone else. This seems the least stupid approach. WebRTC allows multiple data channels over a single peer connection, due to its SCTP foundation. Thus the Raft protocol can communicate over one channel, the broadcast over another, etc. Ultimately the solution would be better with a local HTTP server on each TV to enable local bootstrapping of the swarm, i.e. retrieve SDP of one TV, then build up a full mesh via peer forwarding. Also, outside of Safari, the RTCDataChannel is stuck in the renderer thread, which isn't really great. It would be sensible to move it to a Web Worker. MrMoo fucked around with this message at 23:59 on Feb 12, 2023 |
# ¿ Feb 12, 2023 19:54 |
|
tef posted:If it wasn't a third party api, i'd be tempted to suggest "mesh nodes all connect to websocket upstream, but the first one to connect wins and the server just tells the others to connect elsewhere" I'm using the leadership steps of the Raft protocol (requestVote RPC, and vote reply), without the log, which probably clears up the confusion. As it's digital signage, one knows explicitly the number of TVs in a group, and their IDs. The Raft "append" heartbeats by the leader ensure consistent leadership. As it it web protocols, all the timeouts have to be relaxed, certainly not running at 50ms. Without the log replication, Raft becomes a really simple protocol. MrMoo fucked around with this message at 17:25 on Feb 13, 2023 |
# ¿ Feb 13, 2023 17:21 |
|
MononcQc posted:leader election even in raft is trickier than it looks like and for years the protocol had a bug where in case of asymmetric netsplits where a caller asks for the leader but the leader’s response can’t make it back (while being visible to other cluster members) would end up having that one semi-isolated node constantly call for new elections and could paralyze the whole cluster. I've been checking the etcd raft and Hashicorp raft history and it appears preVote has been dropped but checkQuorum kept? etc used to have both. What is odd is that etcd has a "preVote" parameter, presumably for historical compatibility, but not plumbed to any function. The Hashicorp tracker has a request to add preVote, but sitting idle. Reading Go source code is not fun, especially when the developers insist on making all the variables and function names shorter and shorter. Go code:
|
# ¿ Feb 15, 2023 14:57 |
|
I just had to mock a ES6 module Web Worker in TypeScript, and just JavaScript code:
|
# ¿ Feb 16, 2023 18:28 |
|
Those are just there after way too long trying different combinations to get the thing to be called. I love having to crawl the bug trackers to find any useful information about doing anything, with all the main documentation being out of date. It is ironic webdevs chasing the latest fad are still struggling to implement ECMAScript 6 , 2015 everyone, that is 8 years ago. I put a lot of this on Microsoft, launching TypeScript but no testing apparatus? The entire goal of TypeScript is safer programming, but firing the QA department wasn't enough I guess?
|
# ¿ Feb 16, 2023 20:50 |
|
Postgres has a daemon to incrementally update materialized views, it’s shipping with v15; https://pganalyze.com/blog/5mins-postgres-15-beta1-incremental-materialized-views-pg-ivm MrMoo fucked around with this message at 12:00 on Feb 17, 2023 |
# ¿ Feb 17, 2023 11:55 |
|
ah, as an extension since PG 13 though: https://www.postgresql.org/about/news/pg_ivm-15-released-2583/
|
# ¿ Feb 17, 2023 13:37 |
|
smackfu posted:“Maybe the materialized view is current” doesn’t seem like a good thing? You can always just call it "stale view" instead of "materialized view", what are the origins of the unusual naming anyway?
|
# ¿ Feb 17, 2023 15:28 |
|
If the ID should be non-predictable, use bijection. Public presentation should almost always be UUIDs, for convenience the first 7 characters can be used for lookup, like a Git commit. Silly optimization is to present the UUID in base 85 or whatever.
|
# ¿ Feb 24, 2023 18:07 |
|
Doom Mathematic posted:Use Base65536. Instead of "0b9a39c2-eb59-4e31-91f7-c2e565d50d00", simply write "𢀋𤠹-軫-晎-𧶑-𦯂𥭥㐍". oh my, quote:Base2048 is a binary encoding optimised for transmitting data through Twitter. This JavaScript module, base2048, is the first implementation of this encoding. Using Base2048, up to 385 octets can fit in a single Tweet. Compare with Base65536, which manages only 280 octets. https://github.com/qntm/base2048 and, base131072 quote:We need 131,586 "safe" characters for this encoding, but as of Unicode 9.0 only 108,397 exist. However, future versions of Unicode may add enough safe characters for this to become possible. https://github.com/qntm/base131072 Meanwhile, YouTube manages to cope with half-UUIDs with 11 character base64 encodes as the video ID. Of course stack exchange has a gigantic essay on the topic: https://webapps.stackexchange.com/a/101153/279163 MrMoo fucked around with this message at 21:10 on Feb 24, 2023 |
# ¿ Feb 24, 2023 20:35 |
|
Zlodo posted:Things like different cores running at different frequencies giving out different results with no way to correct for it and such. We have core clock independent TSC now, HPET was always a joke. Funniest is still Win32 API that doesn't have a monotonic clock API. The Boost project just slapped their Chrono compatibility implementation around a non-monotonic API and didn't bother to document it. Check the MS C++ implementation of Chrono, and guess what, they hook into an undocumented API.
|
# ¿ Mar 3, 2023 16:48 |
|
I've seen waves of various random bug reports. From basic GCC bumps in RHEL, to "reproducible builds", and various assembler best practice. It's unusual, but good input. I have a package in RHEL, Ubuntu, and flavours, on life support for 10+ years
|
# ¿ Mar 14, 2023 16:45 |
|
tef posted:stripped out protobufs from python code and made them go faster and smaller with gzipped json (very string heavy data) Outside of C/C++ this is almost always going to be the case. Every serialization performance test, no matter how flawed, will show JSON performing faster than others. The gotcha is the size of the message and the transit costs that means, so say using a reverse proxy to transparent `gzip` and if the client is a browser, you get "free" decompression.
|
# ¿ Mar 17, 2023 21:23 |
|
It should not be read literally, what happens in higher level languages is that you end up with a dual level of serialization, between internal format to JSON, then to text. Thus in JavaScript land, objects are already JS objects thus that eliminates an entire stage of the pipeline in comparison. "Products" like MsgPack try to benefit from the lower memory usage in encoded form. Ultimately with encoded messages there is a massive performance and convenience trade off. Random access to a field is an incredibly expensive operation and usually means (1) conversion to a map, or (2) reparsing on each access. The highest performance is given by single pass through a structure. However this only means something if your language has direct access to unpacked fields, any slow interpreted language is likely to require a map to simply access any variable, ideally JITs eliminating this.
|
# ¿ Mar 17, 2023 23:48 |
|
Do I get extra points for working on the JFK AirTrain map system and also getting lost when trying to use it. JFK signage is terrible, avoid public transport for T1 for a bit.
|
# ¿ Mar 27, 2023 18:27 |
|
quote:Elon Musk and Apple cofounder Steve Wozniak among over 1,100 who sign open letter calling for 6-month ban on creating powerful A.I. https://fortune.com/2023/03/29/elon-musk-apple-steve-wozniak-over-1100-sign-open-letter-6-month-ban-creating-powerful-ai/ That reads like bad losers to the AI race and simple jealousy to OpenAI. What could remotely be achieved in 6 months of babble. If anything it is overly pro-communist as it definitely gives China more time to bribe and steal the technology.
|
# ¿ Mar 29, 2023 20:44 |
|
champagne posting posted:i don't get this joke I think it’s in reference to the NPM package author(s) that overwrote old versions to break them. This happened with uWebSockets,
|
# ¿ Apr 3, 2023 21:49 |
|
Just a Moron posted:literal spaghetti code. I’m sure someone has done this already, pics please.
|
# ¿ Apr 6, 2023 14:15 |
|
Share Bear posted:maybe more of a confessions thing but i honestly dont know why oop took over as the dominant programming paradigm, It's clear, because in large developer groups it creates a demarcation between each developers work. As whomever said, a project of x people makes for x modules. What is ironic is that JavaScript programming with ECMAScript modules allows people to write procedural code in a module but without OOP, and webdev land loves that.
|
# ¿ Apr 14, 2023 16:26 |
|
|
# ¿ Apr 26, 2024 14:17 |
|
sb hermit posted:do people use glib for their own random linux event based daemons? There are not many comprehensive options, only a pick-and-mix for specific functionality, e.g. libuv.
|
# ¿ Apr 15, 2023 06:21 |