id
int64
2
42.1M
by
large_stringlengths
2
15
time
timestamp[us]
title
large_stringlengths
0
198
text
large_stringlengths
0
27.4k
url
large_stringlengths
0
6.6k
score
int64
-1
6.02k
descendants
int64
-1
7.29k
kids
large list
deleted
large list
dead
bool
1 class
scraping_error
large_stringclasses
25 values
scraped_title
large_stringlengths
1
59.3k
scraped_published_at
large_stringlengths
4
66
scraped_byline
large_stringlengths
1
757
scraped_body
large_stringlengths
1
50k
scraped_at
timestamp[us]
scraped_language
large_stringclasses
58 values
split
large_stringclasses
1 value
42,016,544
ziddoap
2024-11-01T13:03:05
Microsoft wants $30 if you want to delay Windows 11 switch
null
https://www.bleepingcomputer.com/news/microsoft/microsoft-wants-30-if-you-want-to-delay-windows-11-switch/
8
10
[ 42016726, 42016677, 42016801, 42022824, 42016903, 42016607 ]
null
null
null
null
null
null
null
null
null
train
42,016,545
pongogogo
2024-11-01T13:03:09
AI-Assisted Assessment of Coding Practices in Modern Code Review
null
https://arxiv.org/abs/2405.13565
2
1
[ 42016546 ]
null
null
no_error
AI-Assisted Assessment of Coding Practices in Modern Code Review
null
[Submitted on 22 May 2024]
Authors:Manushree Vijayvergiya, Małgorzata Salawa, Ivan Budiselić, Dan Zheng, Pascal Lamblin, Marko Ivanković, Juanjo Carin, Mateusz Lewko, Jovan Andonov, Goran Petrović, Daniel Tarlow, Petros Maniatis, René Just View PDF HTML (experimental) Abstract:Modern code review is a process in which an incremental code contribution made by a code author is reviewed by one or more peers before it is committed to the version control system. An important element of modern code review is verifying that code contributions adhere to best practices. While some of these best practices can be automatically verified, verifying others is commonly left to human reviewers. This paper reports on the development, deployment, and evaluation of AutoCommenter, a system backed by a large language model that automatically learns and enforces coding best practices. We implemented AutoCommenter for four programming languages (C++, Java, Python, and Go) and evaluated its performance and adoption in a large industrial setting. Our evaluation shows that an end-to-end system for learning and enforcing coding best practices is feasible and has a positive impact on the developer workflow. Additionally, this paper reports on the challenges associated with deploying such a system to tens of thousands of developers and the corresponding lessons learned. Submission history From: Rene Just [view email] [v1] Wed, 22 May 2024 11:57:18 UTC (621 KB)
2024-11-07T17:55:17
en
train
42,016,555
gessha
2024-11-01T13:04:35
Make it Yourself: 1000 Useful Things to Make [video]
null
https://www.youtube.com/watch?v=TSFJ2OH1PQA
1
0
null
null
null
null
null
null
null
null
null
null
train
42,016,556
null
2024-11-01T13:04:37
null
null
null
null
null
null
[ "true" ]
null
null
null
null
null
null
null
null
train
42,016,564
azhenley
2024-11-01T13:05:29
Implementing Raft: Key/Value Database
null
https://eli.thegreenplace.net/2024/implementing-raft-part-4-keyvalue-database/
2
0
null
null
null
no_error
Implementing Raft: Part 4 - Key/Value Database
null
null
This is Part 4 in a series of posts describing the Raft distributed consensus algorithm and its complete implementation in Go. Here is a list of posts in the series: Part 0: Introduction Part 1: Elections Part 2: Commands and log replication Part 3: Persistence and optimizations Part 4: Key/Value database (this post) In this part, we're going to use our Raft module to implement a simple but realistic application - a replicated key / value database with strong consistency semantics. All the code for this part is located in this directory. Key / value database as a state machine First of all, what's a key / value database (KV DB)? Think of it as a Go map, or as an extremely simple version of NoSQL databases like Redis or CouchDB. The basic operations our KV DB supports are: PUT(k,v): assign value v to key k GET(k): retrieve the value associated with key k CAS(k, cmp, v): atomic compare-and-swap. First, it reads curV - the current value associated with key k. If curV==cmp, assigns value v to k instead; otherwise, it's a no-op. In any case, curV is returned. For example, suppose the commands in some Raft log are (in order from left to right): PUT(x,2) PUT(y,3) PUT(x,4) PUT(z,5) CAS(x,4,8) CAS(z,4,9) Applied to an empty DB, this log will result in these keys / values: System diagram In this part we're going to build a complete KV DB system - including the service and a client library: The diagram presents a cluster with 3 replicas [1]. Each replica is a KV DB service. A KV service contains a Raft Consensus Module (the diagram doesn't show the log, assuming it's just part of the CM), and a data store module that implements the actual database. The Raft CM of each replica is connected to the others via RPCs - these are the Raft protocol RPCs discussed extensively in previous parts. The KV service presents a REST API to the external world; clients can send HTTP commands to the service and get results. "KV Client" is a client library with a convenient API that encapsulates the HTTP interactions with KV services. This is also part of our demo, and we'll discuss it later in the post. KV service architecture The KV service consists of several key components: An instance of a Raft server; as described back in Part 1, a Raft Server wraps a consensus module with some RPC scaffolding. In this part we reuse our final Raft server code from Part 3, without any modifications. An underlying "data store". For our demonstration, a simple mutex-protected Go map will do; this is implemented in kvservice/datastore.go. This data store implements the Get, Put and CAS commands described earlier. All keys and values are Go strings (naturally, anything can be encoded in a string value). An HTTP server for the REST API of the service exposed to the external world. Commands If you recall from Part 2, we submit new commands to the Raft cluster with the ConsensusModule.Submit method. A Command is an arbitrary any value; whenever the Raft cluster reaches consensus on a log entry, it sends a "commit entry" with this command on the commit channel. Commands are application-specific, and since we're working on a concrete application now, it's time to define our command for the KV service: // Command is the concrete command type KVService submits to the Raft log to // manage its state machine. It's also used to carry the results of the command // after it's applied to the state machine. These are the supported commands: // // CommandGet: queries a key's value // // * Key is the key to get, Value is ignored // * CompareValue is ignored // * ResultFound is true iff Key was found in the store // * ResultValue is the value, if Key was found in the store // // CommandPut: assigns value to the key // // * Key,Value are the pair to assign (store[key]=value) // * CompareValue is ignored // * ResultFound is true iff Key was previously found in the store // * ResultValue is the old value of Key, if it was previously found // // CommandCAS: atomic compare-and-swap, performs: // // if Store[Key] == CompareValue { // Store[Key] = Value // } else { // nop // } // // * Key is the key this command acts on // * CompareValue is the previous value the command compares to // * Value is the new value the command assigns // * ResultFound is true iff Key was previously found in the store // * ResultValue is the old value of Key, if it was previously found type Command struct { Kind CommandKind Key, Value string CompareValue string ResultValue string ResultFound bool // id is the Raft ID of the server submitting this command. Id int } type CommandKind int const ( CommandInvalid CommandKind = iota CommandGet CommandPut CommandCAS ) For simplicity, I chose to include fields for several commands in the same struct instead of using an algebraic data type here. One important thing to note is that the service's Raft cluster ID is part of the command; it will soon become clear why this is needed. Life of a PUT request to the service Before we dive deep into the code, let's examine the journey a successful PUT request makes through the system: A client sends a PUT("k", "v") request to a service, via HTTP. Let's assume it reaches the service which is currently the Raft cluster leader (we'll discuss what happens if it reaches a follower later on). The service's HTTP handler receives the request, constructs a Command of kind CommandPut representing it and submits it to its Raft CM. At this point, the HTTP handler waits; it can't reply to the client until it knows that the command was properly replicated to the Raft cluster and committed by the CM. Once the command it submitted appears on the commit channel, the HTTP handler can return a success status to the client. Meanwhile, a process in the service watches its commit channel for new commands that reached consensus by the cluster, and updates the underlying data store. At the same time, the other services in the cluster - the followers - are also watching their commit channels and update their own replicas of the data store with the new PUT command. Note that steps 2.2 and 3 happen concurrently. One process (in the sense of CSP) handles a client request, while another process takes care to execute commands arriving on the commit channel. In fact, there's more concurrency here than meets the eye. Our service can handle multiple concurrent requests, each with its own command - and it should all just work. This kind of concurrency is natural in Go - and now it's time to see how it works. KV service code walk-through All the code described in this section is located in kvservice/kvservice.go. Here's the struct defining the service: type KVService struct { sync.Mutex // id is the service ID in a Raft cluster. id int // rs is the Raft server that contains a CM rs *raft.Server // commitChan is the commit channel passed to the Raft server; when commands // are committed, they're sent on this channel. commitChan chan raft.CommitEntry // commitSubs are the commit subscriptions currently active in this service. // See the createCommitSubsciption method for more details. commitSubs map[int]chan raft.CommitEntry // ds is the underlying data store implementing the KV DB. ds *DataStore // srv is the HTTP server exposed by the service to the external world. srv *http.Server } Don't worry about understanding exactly what each field means right now; note the correlation to the descriptions in "KV service architecture", though. A service holds a Raft server, a datastore, and an HTTP server. Other entities, like the commit channel, should be familiar by now. A new service is created with this constructor: // New creates a new KVService // // - id: this service's ID within its Raft cluster // - peerIds: the IDs of the other Raft peers in the cluster // - storage: a raft.Storage implementation the service can use for // durable storage to persist its state. // - readyChan: notification channel that has to be closed when the Raft // cluster is ready (all peers are up and connected to each other). func New(id int, peerIds []int, storage raft.Storage, readyChan <-chan any) *KVService { gob.Register(Command{}) commitChan := make(chan raft.CommitEntry) // raft.Server handles the Raft RPCs in the cluster; after Serve is called, // it's ready to accept RPC connections from peers. rs := raft.NewServer(id, peerIds, storage, readyChan, commitChan) rs.Serve() kvs := &KVService{ id: id, rs: rs, commitChan: commitChan, ds: NewDataStore(), commitSubs: make(map[int]chan raft.CommitEntry), } kvs.runUpdater() return kvs } We'll get back to what runUpdater is a little later; for now, let's look at how the HTTP server is launched: // ServeHTTP starts serving the KV REST API on the given TCP port. This // function does not block; it fires up the HTTP server and returns. To properly // shut down the server, call the Shutdown method. func (kvs *KVService) ServeHTTP(port int) { if kvs.srv != nil { panic("ServeHTTP called with existing server") } mux := http.NewServeMux() mux.HandleFunc("POST /get/", kvs.handleGet) mux.HandleFunc("POST /put/", kvs.handlePut) mux.HandleFunc("POST /cas/", kvs.handleCAS) kvs.srv = &http.Server{ Addr: fmt.Sprintf(":%d", port), Handler: mux, } go func() { kvs.kvlog("serving HTTP on %s", kvs.srv.Addr) if err := kvs.srv.ListenAndServe(); err != http.ErrServerClosed { log.Fatal(err) } kvs.srv = nil }() } This should be familiar if you've written Go HTTP servers before. Listening is done in a goroutine to enable clean shutdown of the HTTP server specifically and the whole service in general; check out the Shutdown method for more details. In the previous section, I mentioned that multiple HTTP requests can be handled concurrently; this is just the nature of the standard Go HTTP server. Here we see the handleXXX handlers registered with the server; each handler is invoked in a separate goroutine, and our code has to account for this. To understand what this means in practice, let's look at the updater goroutine. // runUpdater runs the "updater" goroutine that reads the commit channel // from Raft and updates the data store; this is the Replicated State Machine // part of distributed consensus! // It also notifies subscribers (registered with createCommitSubsciption). func (kvs *KVService) runUpdater() { go func() { for entry := range kvs.commitChan { cmd := entry.Command.(Command) switch cmd.Kind { case CommandGet: cmd.ResultValue, cmd.ResultFound = kvs.ds.Get(cmd.Key) case CommandPut: cmd.ResultValue, cmd.ResultFound = kvs.ds.Put(cmd.Key, cmd.Value) case CommandCAS: cmd.ResultValue, cmd.ResultFound = kvs.ds.CAS(cmd.Key, cmd.CompareValue, cmd.Value) default: panic(fmt.Errorf("unexpected command %v", cmd)) } // We're modifying the command to include results from the datastore, // so clone an entry with the update command for the subscribers. newEntry := raft.CommitEntry{ Command: cmd, Index: entry.Index, Term: entry.Term, } // Forward this entry to the subscriber interested in its index, and // close the subscription - it's single-use. if sub := kvs.popCommitSubscription(entry.Index); sub != nil { sub <- newEntry close(sub) } } }() } The updater goroutine is responsible for implementing step (3) described in the "Life of..." section. It watches the commit channel for new committed commands, applies these commands to the datastore and then notifies "subscribers" about it. The first two tasks is what we'd expect from an implementation of a Raft-based replicated state machine; the last task needs some elaboration. Recall step 2.1 from the "Life of..." section; once an HTTP handler submits a command to the Raft cluster, it has to wait and see if this command was properly committed. The way we implement it is: The handler submits a command to the Raft CM, and keeps note of the log index the command is placed in. The handler than registers a "subscription" with the updater, telling it: "hey, if you see a command submitted for this index, let me know". The subscription is implemented with a channel. The handler can then wait on the channel. Here's the code of handlePut, demonstrating this in action: func (kvs *KVService) handlePut(w http.ResponseWriter, req *http.Request) { pr := &api.PutRequest{} if err := readRequestJSON(req, pr); err != nil { http.Error(w, err.Error(), http.StatusBadRequest) return } kvs.kvlog("HTTP PUT %v", pr) // Submit a command into the Raft server; this is the state change in the // replicated state machine built on top of the Raft log. cmd := Command{ Kind: CommandPut, Key: pr.Key, Value: pr.Value, Id: kvs.id, } logIndex := kvs.rs.Submit(cmd) // If we're not the Raft leader, send an appropriate status if logIndex < 0 { renderJSON(w, api.PutResponse{RespStatus: api.StatusNotLeader}) return } // Subscribe for a commit update for our log index. Then wait for it to // be delivered. sub := kvs.createCommitSubsciption(logIndex) // Wait on the sub channel: the updater will deliver a value when the Raft // log has a commit at logIndex. To ensure clean shutdown of the service, // also select on the request context - if the request is canceled, this // handler aborts without sending data back to the client. select { case entry := <-sub: // If this is our command, all is good! If it's some other server's command, // this means we lost leadership at some point and should return an error // to the client. entryCmd := entry.Command.(Command) if entryCmd.Id == kvs.id { renderJSON(w, api.PutResponse{ RespStatus: api.StatusOK, KeyFound: entryCmd.ResultFound, PrevValue: entryCmd.ResultValue, }) } else { renderJSON(w, api.PutResponse{RespStatus: api.StatusFailedCommit}) } case <-req.Context().Done(): return } } The code is well-commented, but I want to specifically call out a few important points: When kvs.rs.Submit is called with the command, it returns -1 if the current Raft CM is not the leader. In this case, we return a special status to the client - "I'm not the leader" - and abort the handler. We'll see what the client does about this further down in the post. For a leader, Submit returns the log index at which the command was submitted. This is the index used to subscribe to notifications from the commit channel. The handler waits on a receive on this channel. This can be canceled if the HTTP request is canceled by the client (e.g. timeout); otherwise, we just wait. In practice, with the optimizations in Part 3, it takes just a handful of milliseconds to fully commit new commands in a functioning Raft cluster. In case of problems (disconnections, crashes etc.) this may take longer, but our application prioritizes consistency over availability (see Part 0 on fault tolerance in Raft and the CAP theorem). When notified that a commit was made for this log index, there's still an important safety check to make! Is it actually our command that was committed there? This is what the id field on the command is for. Consider the following case: peer A is the leader, and a client submits a command. A places it in log index 42, but gets disconnected before it manages to tell followers about it. After a while, C becomes the new leader; C is unaware that A placed something in its log at index 42. Therefore, when C receives a new command from another client, it commits it at index 42 (since this is still the "next index for entries" for all connected cluster members). At some point later, A gets reconnected to the cluster, becomes a follower (since its term is out of date), and sees the commit from C at index 42. At this point it realizes that it failed to commit its own command (because the ID doesn't match), and replies with a "failed commit" status to the client. I'll leave figuring out the mechanics of channel subscriptions to you as an exercise. Just read the createCommitSubscription and popCommitSubscription methods - they're fairly straightforward. Consistency guarantees I wrote in detail about linearizable semantics recently. Our KV service is linearizable based on that definition, due to the nature of Raft consensus. An operation only becomes visible to clients after it's committed; and it's committed by cluster consensus, at a "moment in time" relative to other operations in the Raft log. Moreover, it's also serializable for transactions like CAS: these are performed by a single service (the leader) atomically, so clients can never observe the results of sub-operations in isolation. By being both linearizable and serializable, our service is strict serializable, which is the strongest consistency guarantee for distributed systems. As discussed before, this strong consistency comes at the expense of availability in the face of network partitions (as it must, due to the CAP theorem limits). It's a "CP" system; the following diagram is from Wikipedia: What are such services good for? Though it can serve as a NoSQL database, it won't be very performant - every operation has to reach consensus among multiple peers before being considered "done". Instead, such strict serializable services are used as the very bottom layer of large distributed systems. For example, it can be used to coordinate distributed locks, elect leaders (these are fairly easy to build on top of our CAS primitive) or store some critical low-volume configuration data for a complex system. Plumbing read-only operations through the Raft log You'll note that all the commands our KV service supports - PUT, GET and CAS - are implemented fairly consistently and follow the sequence described in the "Life of..." section. This raises an important question: is this really necessary for the read-only GET operations? After all, they don't really change the state machine, so why add them as Raft log commands? While it's true that a stray GET command won't harm the integrity of the internal data store, it may result in stale reads or other events inconsistent with the linearizable semantics of our service. To see why, let's work by contradiction; assume we don't plumb GET through the Raft log, but instead let leaders immediately reply to GET requests based on their local datastore. Here's what can happen: The KV DB has the key-value pair k=v. A used to be a leader, but got disconnected from its peers; after a suitable election timeout, C was elected as the new leader. A still thinks it's the leader, however. At some point, a client contacts C and submits PUT(k,v2). C successfully replicates this command to the remaining connected peers. A bit later, another client sends GET(K) to C and gets the correct response v2. Then, a different client sends GET(k) to A (perhaps the client remembered that the previous time it contacted the service, A was the leader [2]). Since A still thinks it's the leader, it will happily reply with the value v to the client's request. This sequence of events breaks the linearizability guarantees of our service! The read GET(K) --> v is stale, since another client already read the value as v2. There is no single-threaded history in which this sequence of events is possible. This problem is explicitly called out in Section 8 of the Raft paper. The canonical solution is what our service is doing: plumb all commands - even the read-only ones - through the Raft log [3]. A service won't respond to a client's request unless it was able to successfully commit this command to the Raft log. Since we plumb GET commands through the Raft log, in our example the problem in the last step couldn't happen, because A would not respond to its client while disconnected from the cluster. Instead, it would have to wait to be reconnected, and at that point would discover that it's no longer the leader. The client would then ask the real leader and get the right response. However, even if due to additional disconnections or crashes A resumed leadership, it would have to process the PUT(k,v2) before processing the client's GET(k), since the state machine is updated in log order. KV client Now it's time to discuss the final piece of our system - the KV client library. Since the KV service API is just REST, we don't necessarily need a client library - we could just use curl calls or any other way to generate HTTP requests to interact with it. However, a convenient, idiomatic client library goes a long way in improving the quality of life of users - and it will be particularly useful in this case because it encodes some essential logic - finding and keeping track of the cluster leader. So far, everything in our system has been replicated by N, which is the Raft cluster size (typically 3 or 5). The client is a single entity - just user code that wants to use the KV service. All the client code is in kvclient/kvclient.go; let's walk through how a single request works, starting with the type and constructor: type KVClient struct { addrs []string // assumedLeader is the index (in addrs) of the service we assume is the // current leader. It is zero-initialized by default, without loss of // generality. assumedLeader int clientID int32 } // New creates a new KVClient. serviceAddrs is the addresses (each a string // with the format "host:port") of the services in the KVService cluster the // client will contact. func New(serviceAddrs []string) *KVClient { return &KVClient{ addrs: serviceAddrs, assumedLeader: 0, clientID: clientCount.Add(1), } } // clientCount is used internally for debugging var clientCount atomic.Int32 To create a client, we have to provide it with a list of addresses for the KV services that constitute a cluster; before the client sends its first request, the services should be launched and listening on these addresses. All client requests follow the same steps; let's use Put as an example: // Put the key=value pair into the store. Returns an error, or // (prevValue, keyFound, false), where keyFound specifies whether the key was // found in the store prior to this command, and prevValue is its previous // value if it was found. func (c *KVClient) Put(ctx context.Context, key string, value string) (string, bool, error) { putReq := api.PutRequest{ Key: key, Value: value, } var putResp api.PutResponse err := c.send(ctx, "put", putReq, &putResp) return putResp.PrevValue, putResp.KeyFound, err } Types like PutRequest and PutResponse are defined in api/api.go (you may have noticed them in the service code as well); they're trivial, so I won't spend more time on them. All the client logic is encapsulated in the send method: func (c *KVClient) send(ctx context.Context, route string, req any, resp api.Response) error { // This loop rotates through the list of service addresses until we get // a response that indicates we've found the leader of the cluster. It // starts at c.assumedLeader FindLeader: for { // There's a two-level context tree here: we have the user context - ctx, // and we create our own context to impose a timeout on each request to // the service. If our timeout expires, we move on to try the next service. // In the meantime, we have to keep an eye on the user context - if that's // canceled at any time (due to timeout, explicit cancellation, etc), we // bail out. retryCtx, retryCtxCancel := context.WithTimeout(ctx, 50*time.Millisecond) path := fmt.Sprintf("http://%s/%s/", c.addrs[c.assumedLeader], route) c.clientlog("sending %#v to %v", req, path) if err := sendJSONRequest(retryCtx, path, req, resp); err != nil { // Since the contexts are nested, the order of testing here matters. // We have to check the parent context first - if it's done, it means // we have to return. if contextDone(ctx) { c.clientlog("parent context done; bailing out") retryCtxCancel() return err } else if contextDeadlineExceeded(retryCtx) { // If the parent context is not done, but our retry context is done, // it's time to retry a different service. c.clientlog("timed out: will try next address") c.assumedLeader = (c.assumedLeader + 1) % len(c.addrs) retryCtxCancel() continue FindLeader } retryCtxCancel() return err } c.clientlog("received response %#v", resp) // No context/timeout on this request - we've actually received a response. switch resp.Status() { case api.StatusNotLeader: c.clientlog("not leader: will try next address") c.assumedLeader = (c.assumedLeader + 1) % len(c.addrs) retryCtxCancel() continue FindLeader case api.StatusOK: retryCtxCancel() return nil case api.StatusFailedCommit: retryCtxCancel() return fmt.Errorf("commit failed; please retry") default: panic("unreachable") } } } There's some context subtlety going on here - hopefully the comments make that clear enough. The client keeps track of the last service it saw that accepted a command as a leader. When asked to send a new command to the service, this is the service it starts from. If its request to the assumed leader times out, or that service says it's no longer the leader, the client retries to the next service in the cluster. During normal operation, the leader will typically be stable, each client will quickly discover who it is and from that point on will address the leader directly. When there's a cluster disruption, the client will spend a bit of time looking for the leader - but this can be optimized if needed [4]. If a client can't find a leader, it will just keep trying; since we use the Go context idiom, this can always be controlled by the user - by imposing a timeout on client operations, or canceling them for other reasons. Future work The KV service presented in this post provides strong consistency guarantees, as discussed. However, keeping systems linearizable all the way through the client is notoriously tricky, and the simple client we presented in this post is not immune to issues. The problem is with its retry logic; when a client sends a PUT command to a leader and the request times out, what is the right thing to do? Our client just retries, looking for a different leader. Is this the right approach? Not necessarily! Consider what happens if the leader committed the command, but crashed before responding to the client. If the client now retries, the command may end up duplicated in the log. While it may seem like this shouldn't be a problem because PUT is idempotent [5], it can in fact cause non-linearizable behavior to be observed, if some other client managed to PUT another value for the same key in-between the replies. This isn't a trivial problem; in fact, it's also mentioned in section 8 of the Raft paper. We'll spend the next part in the series discussing this problem in detail, presenting one potential solution and talking about how real-world distributed KV services deal with it. [1]For the terms used in this description, refer to Part 0. [2]This is exactly how our client implementation works, as we'll see soon. [3]The paper also discusses some ideas for optimizations of this process. Since this optimizes the uncommon path (when crashes and disconnections disrupt the normal operation of the Raft cluster), I leave this out of my implementation. [4]Here's an exercise: the AppendEntries RPC sent by leaders to followers contains a "leader ID" field; so followers know who the current leader is. We already have it in our Raft implementation; try to plumb this information all the way through to the client. When a follower sends a "I'm not a leader" response to the client, it can include the ID of the service it thinks is the current leader; this can reduce the search time somewhat. [5]Applying PUT(k1, v1) right after another PUT(k1,v1) doesn't affect the correctness of the DB. For comments, please send me an email.
2024-11-08T11:45:43
en
train
42,016,574
LinuxBender
2024-11-01T13:06:58
Malware operators use copyright notices to lure in businesses
null
https://www.scworld.com/news/malware-operators-use-copyright-notices-to-lure-in-businesses
3
0
[ 42016603 ]
null
null
null
null
null
null
null
null
null
train
42,016,579
simplegeek
2024-11-01T13:07:10
The Beautiful Simplicity of the Gentzen System
null
https://wyounas.github.io/cs/2024/10/29/gentzen-system/
2
0
null
null
null
no_error
The Beautiful Simplicity of the Gentzen System
null
null
Oct 29, 2024Gentzen system, created by German mathematician Gerhard Gentzen, is a deductive system which can be used to prove propositional formulas. I recently learned about it while I was reading Ben-Ari’s fantastic book on mathematical logic [1] and I like its simplicity.Should we care about the Gentzen system? Let’s say you’re a programmer, why should you care about logic or mathematical reasoning?I recently started learning more about mathematical logic, and I’ve realized that, just as writing can clarify your thoughts, formal mathematical reasoning can bring coherence to your thinking. If parts of your reasoning lack logical soundness, you won’t be able to construct a coherent argument as a whole—mathematical reasoning helps prevent this.I’ve been programming for a while now, mostly self-taught, and I’ve observed that while learning mathematical formalism isn’t necessary for most programming jobs, it definitely helps you think more carefully about the correctness of your code. It helps you reason through problems with greater precision.Now let’s dive into the Gentzen system, starting with a scenario.Imagine you’re a detective trying to solve a robbery. To prove that a certain person committed the crime, you gather and connect key pieces of evidence. You see this person entering the house on a video camera on the day of the robbery, and you later find a receipt showing them selling items belonging to the homeowner. While real detective work is rarely this clear-cut, this simplified example highlights the deductive process of assembling truths and making logical inferences to build a case. In a similar way, a deductive system like the Gentzen system starts from basic truths and uses logical rules to reach sound conclusions.In a deductive system, you start with basic statements assumed to be true, known as axioms, and you also apply inference rules to build a logical case. The Gentzen system stands out for its simplicity: it has just one axiom and a few inference rules, yet it can prove complex formulas. There’s a certain beauty in seeing how such a simple setup—just one axiom and a few rules—can tackle complex problems with logical precision.Gentzen’s Genius: A Single Axiom and a Few Inference RulesFor me, what makes the Gentzen System elegant is its minimalism. Gentzen system’s approach is surprisingly simple: one axiom and just a handful of inference rules. And then you can use it to prove complex propositional formulas.Let’s see how Gentzen system can be used to prove a propositional formula (Please note that I am teaching myself these concepts by learning from this wonderful book [1]. Any errors are my own, and I’m happy to correct anything you find incorrect. I’m writing this to reinforce my own understanding, following Confucius’ advice: “I hear and I forget. I see and I remember. I do and I understand.”).A little context about propositional logic and formulas: A propositional formula, like $ p \lor q $ (which is basically ‘p or q’, a logical disjunction), uses atomic propositions. The atomic propositions in $ p \lor q $ are $ p $ and $ q $. The atomic propositions can be assigned values $ \text{true} $ or $ \text{false} $. If $ p $ is $ \text{true} $, then $ \neg p $ (not $ p $) is $ \text{false} $. A complementary pair is a pair containing both $ p $ and $ \neg p $.And now the axiom and a few words about inference rules.The Axiom: Gentzen system starts with only one axiom: a complementary pair, e.g., $ p $ and $ \neg p $. That’s the only axiom in the Gentzen system.The Inference Rules: The system also provides inference rules. These rules, alongside the one axiom, allow us to prove new things. There are two types of inference rules: $ \alpha $ (alpha) and $ \beta $ (beta). Here are some details about each of them:$ \alpha $ inference rules: Think of these rules as ways to shape two logical formulas into a propositional formula. Let’s say you have two propositional formulas, $ A1 $ and $ A2 $, then you can combine them into a single $ \alpha $ formula. There are a few $ \alpha $ rules, but for simplicity, I’m not including them all here—they are all in Ben-Ari’s book. Let’s look at two $ \alpha $ inference rules as we will use these both in a proof below.If you have two formulas, $ A1 $ and $ A2 $, then you can write them as $ A1 \lor A2 $.If you have $ \neg A1 $ and $ A2 $, then you can write them as $ A1 \rightarrow A2 $ (A1 implies A2).$ \beta $ inference rules: There are also a few $ \beta $ rules. Like $ \alpha $ rules, you can use them to simplify two $ \beta $ formulas. Here is one inference rule we’ll use in a proof below.If you have $ \neg B1 $ and $ \neg B2 $, then you can write them as $ \neg (B1 \lor B2) $.Now, let’s try to construct a proof using the above axiom and inference rules.We want to prove $ (p \lor q) \rightarrow (q \lor p) $ using the Gentzen system.Basically, in such proofs, you proceed step by step, using the outcome of each step to derive the next one, eventually leading to the proof.Prove: $ (p \lor q) \rightarrow (q \lor p) $Here is the proof (sorry for the extra text due to the added explanation):We start by examining the propositional formula we want to prove. Which atomic propositions does it invovle? Well, $ p $ and $ q $. For p, we apply the axiom, giving us both $ p $ and $ \neg p $. We then combine this with $ q $, so the outcome of the first step is: $ p, \neg p, q $.Next, we apply the axiom again, this time for $ q $. This gives us both $ q $ and $ \neg q $. So, after the second step, we have: $ \neg q, q, p $.Now, we can apply a $ \beta $ inference rule to the results of the first two steps. We have $ \neg p $ from the first step and $ \neg q $ from the second step. According to the $ \beta $ inference rule, if we have $ \neg B1 $ and $ \neg B2 $, we can combine them into $ \neg (B1 \lor B2) $. So, we treat $ \neg p $ as B1 and $ \neg q $ as B2. Applying the rule gives us $ \neg (p \lor q) $. The result of this third step is $ \neg (p \lor q) $, with p and q carrying over from the first two steps. Now, to explain the carryover: when we use $ \neg p $ and $ \neg q $ to form $ \neg (p \lor q) $, the remaining elements, $ p $ and $ q $, from both steps are combined with $ \neg (p \lor q) $. Since we are working with sets, we only keep unique elements, so the outcome of previous two steps is $ \neg (p \lor q), p, q $.In this step, we apply an $ \alpha $ rule. According to this rule, if we have A1 and A2, we can combine them into $ A1 \lor A2 $. From step 3, we have $ q $ and $ p $. Applying the alpha rule to these two propositions gives us $ q \lor p $. Importantly, $ \neg (p \lor q) $ is unchanged, so it carries over. The result of this step is: $ \neg (p \lor q), (q \lor p) $.Now, let’s look at what the result of step 4. Can we apply a rule to get the formula we set out to prove? Yes! We can use another $ \alpha $ rule, which says if we have $ \neg A1 $ and $ A2 $, we can form $ A1 \rightarrow A2 $ (A1 implies A2). In step 4, we have $ \neg (p \lor q) $ as $ \neg A1 $ and $ (q \lor p) $ as $ A2 $. Using this rule, we arrive at $ (p \lor q) \rightarrow (q \lor p) $, which is exactly what we set out to prove. Voila!Here is a brief summary of the above steps. In the first two steps of the proof below, we start with axioms. Then, in the third step, we apply the $ \beta $ inference rule on the the outcome of the first and second step. Then, on the result of the third step, we apply an $ \alpha $ inference rule. Finally, on the outcome of the fourth step, we apply another $ \alpha $ rule, and we are be able to prove what we set out to prove.At first, I didn’t understand this by just reading it—it seemed too clever (as the author also hinted that it seemed clever). I had to solve it a couple of times using pen and paper.This can also be presented in the tree form. In the screenshot below, the top nodes are axioms, the internal nodes are inference rules, and the node at the bottom is the formula that needed to be proved:There is an inexplicable beauty in the idea that you start with only one established truth and a few inference rules, and using them, you can prove complex propositional formulas.Creating a system with just one axiom and a few inference rules that can prove complex propositional formulas is a sign of elegance. The idea that we can take basic truths and use them to prove more complex things has a certain elegance. The idea that we can discipline our thinking in steps, with each rule application or inference bringing us closer to our goal while maintaining a coherent structure, also embodies elegance. This kind of elegance can inspire us to learn and master complexity in other fields.Please email or tweet with questions, ideas, or corrections.References:Mathematical Logic for Computer Science by Mordechai Ben-Ari, 3rd edition.← Back to all articles
2024-11-08T10:20:14
en
train
42,016,597
deivid
2024-11-01T13:09:50
Make It Yourself
null
https://makeityourself.org/
661
93
[ 42019167, 42018701, 42018642, 42025558, 42018479, 42025939, 42018593, 42020845, 42026176, 42027810, 42023816, 42023603, 42020116, 42024610, 42020073 ]
null
null
null
null
null
null
null
null
null
train
42,016,598
XzetaU8
2024-11-01T13:09:51
The miseries that remain may yet be alleviated
null
https://www.pnas.org/doi/10.1073/pnas.2314207121
2
0
null
null
null
null
null
null
null
null
null
null
train
42,016,605
speckx
2024-11-01T13:10:43
Proxmox VE Helper-Scripts project maintainer tteck enters hospice care
null
https://github.com/tteck/Proxmox/discussions/4009
117
5
[ 42018960, 42022527, 42021103 ]
null
null
null
null
null
null
null
null
null
train
42,016,615
KalepaInsurance
2024-11-01T13:12:07
null
null
null
1
null
[ 42016616 ]
null
true
null
null
null
null
null
null
null
train
42,016,632
surprisetalk
2024-11-01T13:14:25
Finding the grain of creative coding in 2002
null
https://www.davepagurek.com/blog/creative-coding-2002/
1
0
null
null
null
null
null
null
null
null
null
null
train
42,016,639
brianzelip
2024-11-01T13:15:47
Ink: React for interactive CLI apps
null
https://github.com/vadimdemedes/ink
164
106
[ 42018723, 42019109, 42018884, 42019162, 42019092, 42020894, 42018287, 42018426, 42019089, 42018483, 42019633, 42018189, 42018769, 42019001, 42018870, 42018710, 42018539, 42019991, 42025703, 42019180, 42018515, 42018488 ]
null
null
no_error
GitHub - vadimdemedes/ink: 🌈 React for interactive command-line apps
null
vadimdemedes
React for CLIs. Build and test your CLI output using components. Ink provides the same component-based UI building experience that React offers in the browser, but for command-line apps. It uses Yoga to build Flexbox layouts in the terminal, so most CSS-like props are available in Ink as well. If you are already familiar with React, you already know Ink. Since Ink is a React renderer, it means that all features of React are supported. Head over to React website for documentation on how to use it. Only Ink's methods will be documented in this readme. Note: This is documentation for Ink 4 and 5. If you're looking for docs on Ink 3, check out this release. Install Usage import React, {useState, useEffect} from 'react'; import {render, Text} from 'ink'; const Counter = () => { const [counter, setCounter] = useState(0); useEffect(() => { const timer = setInterval(() => { setCounter(previousCounter => previousCounter + 1); }, 100); return () => { clearInterval(timer); }; }, []); return <Text color="green">{counter} tests passed</Text>; }; render(<Counter />); You can also check it out live on repl.it sandbox. Feel free to play around with the code and fork this repl at https://repl.it/@vadimdemedes/ink-counter-demo. Who's Using Ink? GitHub Copilot for CLI - Just say what you want the shell to do. Cloudflare's Wrangler - The CLI for Cloudflare Workers. Linear - Linear built an internal CLI for managing deployments, configs and other housekeeping tasks. Gatsby - Gatsby is a modern web framework for blazing fast websites. tap - A Test-Anything-Protocol library for JavaScript. Terraform CDK - CDK (Cloud Development Kit) for HashiCorp Terraform. Specify CLI - Automate the distribution of your design tokens. Twilio's SIGNAL - CLI for Twilio's SIGNAL conference. Blog post. Typewriter - Generates strongly-typed Segment analytics clients from arbitrary JSON Schema. Prisma - The unified data layer for modern applications. Blitz - The Fullstack React Framework. New York Times - NYT uses Ink kyt - a toolkit that encapsulates and manages the configuration for web apps. tink - Next-generation runtime and package manager. Inkle - Wordle game. loki - Visual regression testing for Storybook. Bit - Build, distribute and collaborate on components. Remirror - Your friendly, world-class editor toolkit. Prime - Open source GraphQL CMS. Splash - Observe the splash zone of a change across the Shopify's Polaris component library. emoj - Find relevant emojis. emma - Find and install npm packages. npm-check-extras - Check for outdated and unused dependencies, and run update/delete action over selected ones. swiff - Multi-environment command line tools for time-saving web developers. share - Quickly share files. Kubelive - CLI for Kubernetes to provide live data about the cluster and its resources. changelog-view - View changelogs. cfpush - An interactive Cloud Foundry tutorial. startd - Turn your React component into a web app. wiki-cli - Search Wikipedia and read summaries. garson - Build interactive config-based command-line interfaces. git-contrib-calendar - Display a contributions calendar for any git repository. gitgud - An interactive command-line GUI for Git. Autarky - Find and delete old node_modules directories in order to free up disk space. fast-cli - Test your download and upload speed. tasuku - Minimal task runner. mnswpr - Minesweeper game. lrn - Learning by repetition. turdle - Wordle game. Shopify CLI - Build apps, themes, and storefronts for Shopify. ToDesktop CLI - An all-in-one platform for building Electron apps. Walle - Full-featured crypto wallet for EVM networks. Sudoku - Sudoku game. Contents Getting Started Components <Text> <Box> <Newline> <Spacer> <Static> <Transform> Hooks useInput useApp useStdin useStdout useStderr useFocus useFocusManager API Testing Using React Devtools Useful Components Useful Hooks Examples Getting Started Use create-ink-app to quickly scaffold a new Ink-based CLI. npx create-ink-app my-ink-cli Alternatively, create a TypeScript project: npx create-ink-app --typescript my-ink-cli Manual JavaScript setup Ink requires the same Babel setup as you would do for regular React-based apps in the browser. Set up Babel with a React preset to ensure all examples in this readme work as expected. After installing Babel, install @babel/preset-react and insert the following configuration in babel.config.json: npm install --save-dev @babel/preset-react { "presets": ["@babel/preset-react"] } Next, create a file source.js, where you'll type code that uses Ink: import React from 'react'; import {render, Text} from 'ink'; const Demo = () => <Text>Hello World</Text>; render(<Demo />); Then, transpile this file with Babel: npx babel source.js -o cli.js Now you can run cli.js with Node.js: If you don't like transpiling files during development, you can use import-jsx or @esbuild-kit/esm-loader to import a JSX file and transpile it on the fly. Ink uses Yoga - a Flexbox layout engine to build great user interfaces for your CLIs using familiar CSS-like props you've used when building apps for the browser. It's important to remember that each element is a Flexbox container. Think of it as if each <div> in the browser had display: flex. See <Box> built-in component below for documentation on how to use Flexbox layouts in Ink. Note that all text must be wrapped in a <Text> component. Components <Text> This component can display text, and change its style to make it bold, underline, italic or strikethrough. import {render, Text} from 'ink'; const Example = () => ( <> <Text color="green">I am green</Text> <Text color="black" backgroundColor="white"> I am black on white </Text> <Text color="#ffffff">I am white</Text> <Text bold>I am bold</Text> <Text italic>I am italic</Text> <Text underline>I am underline</Text> <Text strikethrough>I am strikethrough</Text> <Text inverse>I am inversed</Text> </> ); render(<Example />); Note: <Text> allows only text nodes and nested <Text> components inside of it. For example, <Box> component can't be used inside <Text>. color Type: string Change text color. Ink uses chalk under the hood, so all its functionality is supported. <Text color="green">Green</Text> <Text color="#005cc5">Blue</Text> <Text color="rgb(232, 131, 136)">Red</Text> backgroundColor Type: string Same as color above, but for background. <Text backgroundColor="green" color="white">Green</Text> <Text backgroundColor="#005cc5" color="white">Blue</Text> <Text backgroundColor="rgb(232, 131, 136)" color="white">Red</Text> dimColor Type: boolean Default: false Dim the color (emit a small amount of light). <Text color="red" dimColor> Dimmed Red </Text> bold Type: boolean Default: false Make the text bold. italic Type: boolean Default: false Make the text italic. underline Type: boolean Default: false Make the text underlined. strikethrough Type: boolean Default: false Make the text crossed with a line. inverse Type: boolean Default: false Inverse background and foreground colors. <Text inverse color="yellow"> Inversed Yellow </Text> wrap Type: string Allowed values: wrap truncate truncate-start truncate-middle truncate-end Default: wrap This property tells Ink to wrap or truncate text if its width is larger than container. If wrap is passed (by default), Ink will wrap text and split it into multiple lines. If truncate-* is passed, Ink will truncate text instead, which will result in one line of text with the rest cut off. <Box width={7}> <Text>Hello World</Text> </Box> //=> 'Hello\nWorld' // `truncate` is an alias to `truncate-end` <Box width={7}> <Text wrap="truncate">Hello World</Text> </Box> //=> 'Hello…' <Box width={7}> <Text wrap="truncate-middle">Hello World</Text> </Box> //=> 'He…ld' <Box width={7}> <Text wrap="truncate-start">Hello World</Text> </Box> //=> '…World' <Box> <Box> is an essential Ink component to build your layout. It's like <div style="display: flex"> in the browser. import {render, Box, Text} from 'ink'; const Example = () => ( <Box margin={2}> <Text>This is a box with margin</Text> </Box> ); render(<Example />); Dimensions width Type: number string Width of the element in spaces. You can also set it in percent, which will calculate the width based on the width of parent element. <Box width={4}> <Text>X</Text> </Box> //=> 'X ' <Box width={10}> <Box width="50%"> <Text>X</Text> </Box> <Text>Y</Text> </Box> //=> 'X Y' height Type: number string Height of the element in lines (rows). You can also set it in percent, which will calculate the height based on the height of parent element. <Box height={4}> <Text>X</Text> </Box> //=> 'X\n\n\n' <Box height={6} flexDirection="column"> <Box height="50%"> <Text>X</Text> </Box> <Text>Y</Text> </Box> //=> 'X\n\n\nY\n\n' minWidth Type: number Sets a minimum width of the element. Percentages aren't supported yet, see facebook/yoga#872. minHeight Type: number Sets a minimum height of the element. Percentages aren't supported yet, see facebook/yoga#872. Padding paddingTop Type: number Default: 0 Top padding. paddingBottom Type: number Default: 0 Bottom padding. paddingLeft Type: number Default: 0 Left padding. paddingRight Type: number Default: 0 Right padding. paddingX Type: number Default: 0 Horizontal padding. Equivalent to setting paddingLeft and paddingRight. paddingY Type: number Default: 0 Vertical padding. Equivalent to setting paddingTop and paddingBottom. padding Type: number Default: 0 Padding on all sides. Equivalent to setting paddingTop, paddingBottom, paddingLeft and paddingRight. <Box paddingTop={2}>Top</Box> <Box paddingBottom={2}>Bottom</Box> <Box paddingLeft={2}>Left</Box> <Box paddingRight={2}>Right</Box> <Box paddingX={2}>Left and right</Box> <Box paddingY={2}>Top and bottom</Box> <Box padding={2}>Top, bottom, left and right</Box> Margin marginTop Type: number Default: 0 Top margin. marginBottom Type: number Default: 0 Bottom margin. marginLeft Type: number Default: 0 Left margin. marginRight Type: number Default: 0 Right margin. marginX Type: number Default: 0 Horizontal margin. Equivalent to setting marginLeft and marginRight. marginY Type: number Default: 0 Vertical margin. Equivalent to setting marginTop and marginBottom. margin Type: number Default: 0 Margin on all sides. Equivalent to setting marginTop, marginBottom, marginLeft and marginRight. <Box marginTop={2}>Top</Box> <Box marginBottom={2}>Bottom</Box> <Box marginLeft={2}>Left</Box> <Box marginRight={2}>Right</Box> <Box marginX={2}>Left and right</Box> <Box marginY={2}>Top and bottom</Box> <Box margin={2}>Top, bottom, left and right</Box> Gap gap Type: number Default: 0 Size of the gap between an element's columns and rows. Shorthand for columnGap and rowGap. <Box gap={1} width={3} flexWrap="wrap"> <Text>A</Text> <Text>B</Text> <Text>C</Text> </Box> // A B // // C columnGap Type: number Default: 0 Size of the gap between an element's columns. <Box columnGap={1}> <Text>A</Text> <Text>B</Text> </Box> // A B rowGap Type: number Default: 0 Size of the gap between element's rows. <Box flexDirection="column" rowGap={1}> <Text>A</Text> <Text>B</Text> </Box> // A // // B Flex flexGrow Type: number Default: 0 See flex-grow. <Box> <Text>Label:</Text> <Box flexGrow={1}> <Text>Fills all remaining space</Text> </Box> </Box> flexShrink Type: number Default: 1 See flex-shrink. <Box width={20}> <Box flexShrink={2} width={10}> <Text>Will be 1/4</Text> </Box> <Box width={10}> <Text>Will be 3/4</Text> </Box> </Box> flexBasis Type: number string See flex-basis. <Box width={6}> <Box flexBasis={3}> <Text>X</Text> </Box> <Text>Y</Text> </Box> //=> 'X Y' <Box width={6}> <Box flexBasis="50%"> <Text>X</Text> </Box> <Text>Y</Text> </Box> //=> 'X Y' flexDirection Type: string Allowed values: row row-reverse column column-reverse See flex-direction. <Box> <Box marginRight={1}> <Text>X</Text> </Box> <Text>Y</Text> </Box> // X Y <Box flexDirection="row-reverse"> <Text>X</Text> <Box marginRight={1}> <Text>Y</Text> </Box> </Box> // Y X <Box flexDirection="column"> <Text>X</Text> <Text>Y</Text> </Box> // X // Y <Box flexDirection="column-reverse"> <Text>X</Text> <Text>Y</Text> </Box> // Y // X flexWrap Type: string Allowed values: nowrap wrap wrap-reverse See flex-wrap. <Box width={2} flexWrap="wrap"> <Text>A</Text> <Text>BC</Text> </Box> // A // B C <Box flexDirection="column" height={2} flexWrap="wrap"> <Text>A</Text> <Text>B</Text> <Text>C</Text> </Box> // A C // B alignItems Type: string Allowed values: flex-start center flex-end See align-items. <Box alignItems="flex-start"> <Box marginRight={1}> <Text>X</Text> </Box> <Text> A <Newline/> B <Newline/> C </Text> </Box> // X A // B // C <Box alignItems="center"> <Box marginRight={1}> <Text>X</Text> </Box> <Text> A <Newline/> B <Newline/> C </Text> </Box> // A // X B // C <Box alignItems="flex-end"> <Box marginRight={1}> <Text>X</Text> </Box> <Text> A <Newline/> B <Newline/> C </Text> </Box> // A // B // X C alignSelf Type: string Default: auto Allowed values: auto flex-start center flex-end See align-self. <Box height={3}> <Box alignSelf="flex-start"> <Text>X</Text> </Box> </Box> // X // // <Box height={3}> <Box alignSelf="center"> <Text>X</Text> </Box> </Box> // // X // <Box height={3}> <Box alignSelf="flex-end"> <Text>X</Text> </Box> </Box> // // // X justifyContent Type: string Allowed values: flex-start center flex-end space-between space-around See justify-content. <Box justifyContent="flex-start"> <Text>X</Text> </Box> // [X ] <Box justifyContent="center"> <Text>X</Text> </Box> // [ X ] <Box justifyContent="flex-end"> <Text>X</Text> </Box> // [ X] <Box justifyContent="space-between"> <Text>X</Text> <Text>Y</Text> </Box> // [X Y] <Box justifyContent="space-around"> <Text>X</Text> <Text>Y</Text> </Box> // [ X Y ] Visibility display Type: string Allowed values: flex none Default: flex Set this property to none to hide the element. overflowX Type: string Allowed values: visible hidden Default: visible Behavior for an element's overflow in horizontal direction. overflowY Type: string Allowed values: visible hidden Default: visible Behavior for an element's overflow in vertical direction. overflow Type: string Allowed values: visible hidden Default: visible Shortcut for setting overflowX and overflowY at the same time. Borders borderStyle Type: string Allowed values: single double round bold singleDouble doubleSingle classic | BoxStyle Add a border with a specified style. If borderStyle is undefined (which it is by default), no border will be added. Ink uses border styles from cli-boxes module. <Box flexDirection="column"> <Box> <Box borderStyle="single" marginRight={2}> <Text>single</Text> </Box> <Box borderStyle="double" marginRight={2}> <Text>double</Text> </Box> <Box borderStyle="round" marginRight={2}> <Text>round</Text> </Box> <Box borderStyle="bold"> <Text>bold</Text> </Box> </Box> <Box marginTop={1}> <Box borderStyle="singleDouble" marginRight={2}> <Text>singleDouble</Text> </Box> <Box borderStyle="doubleSingle" marginRight={2}> <Text>doubleSingle</Text> </Box> <Box borderStyle="classic"> <Text>classic</Text> </Box> </Box> </Box> Alternatively, pass a custom border style like so: <Box borderStyle={{ topLeft: '↘', top: '↓', topRight: '↙', left: '→', bottomLeft: '↗', bottom: '↑', bottomRight: '↖', right: '←' }} > <Text>Custom</Text> </Box> See example in examples/borders. borderColor Type: string Change border color. Shorthand for setting borderTopColor, borderRightColor, borderBottomColor and borderLeftColor. <Box borderStyle="round" borderColor="green"> <Text>Green Rounded Box</Text> </Box> borderTopColor Type: string Change top border color. Accepts the same values as color in <Text> component. <Box borderStyle="round" borderTopColor="green"> <Text>Hello world</Text> </Box> borderRightColor Type: string Change right border color. Accepts the same values as color in <Text> component. <Box borderStyle="round" borderRightColor="green"> <Text>Hello world</Text> </Box> borderRightColor Type: string Change right border color. Accepts the same values as color in <Text> component. <Box borderStyle="round" borderRightColor="green"> <Text>Hello world</Text> </Box> borderBottomColor Type: string Change bottom border color. Accepts the same values as color in <Text> component. <Box borderStyle="round" borderBottomColor="green"> <Text>Hello world</Text> </Box> borderLeftColor Type: string Change left border color. Accepts the same values as color in <Text> component. <Box borderStyle="round" borderLeftColor="green"> <Text>Hello world</Text> </Box> borderDimColor Type: boolean Default: false Dim the border color. Shorthand for setting borderTopDimColor, borderBottomDimColor, borderLeftDimColor and borderRightDimColor. <Box borderStyle="round" borderDimColor> <Text>Hello world</Text> </Box> borderTopDimColor Type: boolean Default: false Dim the top border color. <Box borderStyle="round" borderTopDimColor> <Text>Hello world</Text> </Box> borderBottomDimColor Type: boolean Default: false Dim the bottom border color. <Box borderStyle="round" borderBottomDimColor> <Text>Hello world</Text> </Box> borderLeftDimColor Type: boolean Default: false Dim the left border color. <Box borderStyle="round" borderLeftDimColor> <Text>Hello world</Text> </Box> borderRightDimColor Type: boolean Default: false Dim the right border color. <Box borderStyle="round" borderRightDimColor> <Text>Hello world</Text> </Box> borderTop Type: boolean Default: true Determines whether top border is visible. borderRight Type: boolean Default: true Determines whether right border is visible. borderBottom Type: boolean Default: true Determines whether bottom border is visible. borderLeft Type: boolean Default: true Determines whether left border is visible. <Newline> Adds one or more newline (\n) characters. Must be used within <Text> components. count Type: number Default: 1 Number of newlines to insert. import {render, Text, Newline} from 'ink'; const Example = () => ( <Text> <Text color="green">Hello</Text> <Newline /> <Text color="red">World</Text> </Text> ); render(<Example />); Output: <Spacer> A flexible space that expands along the major axis of its containing layout. It's useful as a shortcut for filling all the available spaces between elements. For example, using <Spacer> in a <Box> with default flex direction (row) will position "Left" on the left side and will push "Right" to the right side. import {render, Box, Text, Spacer} from 'ink'; const Example = () => ( <Box> <Text>Left</Text> <Spacer /> <Text>Right</Text> </Box> ); render(<Example />); In a vertical flex direction (column), it will position "Top" to the top of the container and push "Bottom" to the bottom of it. Note, that container needs to be tall to enough to see this in effect. import {render, Box, Text, Spacer} from 'ink'; const Example = () => ( <Box flexDirection="column" height={10}> <Text>Top</Text> <Spacer /> <Text>Bottom</Text> </Box> ); render(<Example />); <Static> <Static> component permanently renders its output above everything else. It's useful for displaying activity like completed tasks or logs - things that are not changing after they're rendered (hence the name "Static"). It's preferred to use <Static> for use cases like these, when you can't know or control the amount of items that need to be rendered. For example, Tap uses <Static> to display a list of completed tests. Gatsby uses it to display a list of generated pages, while still displaying a live progress bar. import React, {useState, useEffect} from 'react'; import {render, Static, Box, Text} from 'ink'; const Example = () => { const [tests, setTests] = useState([]); useEffect(() => { let completedTests = 0; let timer; const run = () => { // Fake 10 completed tests if (completedTests++ < 10) { setTests(previousTests => [ ...previousTests, { id: previousTests.length, title: `Test #${previousTests.length + 1}` } ]); timer = setTimeout(run, 100); } }; run(); return () => { clearTimeout(timer); }; }, []); return ( <> {/* This part will be rendered once to the terminal */} <Static items={tests}> {test => ( <Box key={test.id}> <Text color="green">✔ {test.title}</Text> </Box> )} </Static> {/* This part keeps updating as state changes */} <Box marginTop={1}> <Text dimColor>Completed tests: {tests.length}</Text> </Box> </> ); }; render(<Example />); Note: <Static> only renders new items in items prop and ignores items that were previously rendered. This means that when you add new items to items array, changes you make to previous items will not trigger a rerender. See examples/static for an example usage of <Static> component. items Type: Array Array of items of any type to render using a function you pass as a component child. style Type: object Styles to apply to a container of child elements. See <Box> for supported properties. <Static items={...} style={{padding: 1}}> {...} </Static> children(item) Type: Function Function that is called to render every item in items array. First argument is an item itself and second argument is index of that item in items array. Note that key must be assigned to the root component. <Static items={['a', 'b', 'c']}> {(item, index) => { // This function is called for every item in ['a', 'b', 'c'] // `item` is 'a', 'b', 'c' // `index` is 0, 1, 2 return ( <Box key={index}> <Text>Item: {item}</Text> </Box> ); }} </Static> <Transform> Transform a string representation of React components before they are written to output. For example, you might want to apply a gradient to text, add a clickable link or create some text effects. These use cases can't accept React nodes as input, they are expecting a string. That's what <Transform> component does, it gives you an output string of its child components and lets you transform it in any way. Note: <Transform> must be applied only to <Text> children components and shouldn't change the dimensions of the output, otherwise layout will be incorrect. import {render, Transform} from 'ink'; const Example = () => ( <Transform transform={output => output.toUpperCase()}> <Text>Hello World</Text> </Transform> ); render(<Example />); Since transform function converts all characters to upper case, final output that's rendered to the terminal will be "HELLO WORLD", not "Hello World". When the output wraps to multiple lines, it can be helpful to know which line is being processed. For example, to implement a hanging indent component, you can indent all the lines except for the first. import {render, Transform} from 'ink'; const HangingIndent = ({content, indent = 4, children, ...props}) => ( <Transform transform={(line, index) => index === 0 ? line : ' '.repeat(indent) + line } {...props} > {children} </Transform> ); const text = 'WHEN I WROTE the following pages, or rather the bulk of them, ' + 'I lived alone, in the woods, a mile from any neighbor, in a ' + 'house which I had built myself, on the shore of Walden Pond, ' + 'in Concord, Massachusetts, and earned my living by the labor ' + 'of my hands only. I lived there two years and two months. At ' + 'present I am a sojourner in civilized life again.'; // Other text properties are allowed as well render( <HangingIndent bold dimColor indent={4}> {text} </HangingIndent> ); transform(outputLine, index) Type: Function Function which transforms children output. It accepts children and must return transformed children too. children Type: string Output of child components. index Type: number The zero-indexed line number of the line currently being transformed. Hooks useInput(inputHandler, options?) This hook is used for handling user input. It's a more convenient alternative to using useStdin and listening to data events. The callback you pass to useInput is called for each character when user enters any input. However, if user pastes text and it's more than one character, the callback will be called only once and the whole string will be passed as input. You can find a full example of using useInput at examples/use-input. import {useInput} from 'ink'; const UserInput = () => { useInput((input, key) => { if (input === 'q') { // Exit program } if (key.leftArrow) { // Left arrow key pressed } }); return … }; inputHandler(input, key) Type: Function The handler function that you pass to useInput receives two arguments: input Type: string The input that the program received. key Type: object Handy information about a key that was pressed. key.leftArrow key.rightArrow key.upArrow key.downArrow Type: boolean Default: false If an arrow key was pressed, the corresponding property will be true. For example, if user presses left arrow key, key.leftArrow equals true. key.return Type: boolean Default: false Return (Enter) key was pressed. key.escape Type: boolean Default: false Escape key was pressed. key.ctrl Type: boolean Default: false Ctrl key was pressed. key.shift Type: boolean Default: false Shift key was pressed. key.tab Type: boolean Default: false Tab key was pressed. key.backspace Type: boolean Default: false Backspace key was pressed. key.delete Type: boolean Default: false Delete key was pressed. key.pageDown key.pageUp Type: boolean Default: false If Page Up or Page Down key was pressed, the corresponding property will be true. For example, if user presses Page Down, key.pageDown equals true. key.meta Type: boolean Default: false Meta key was pressed. options Type: object isActive Type: boolean Default: true Enable or disable capturing of user input. Useful when there are multiple useInput hooks used at once to avoid handling the same input several times. useApp() useApp is a React hook, which exposes a method to manually exit the app (unmount). exit(error?) Type: Function Exit (unmount) the whole Ink app. error Type: Error Optional error. If passed, waitUntilExit will reject with that error. import {useApp} from 'ink'; const Example = () => { const {exit} = useApp(); // Exit the app after 5 seconds useEffect(() => { setTimeout(() => { exit(); }, 5000); }, []); return … }; useStdin() useStdin is a React hook, which exposes stdin stream. stdin Type: stream.Readable Default: process.stdin Stdin stream passed to render() in options.stdin or process.stdin by default. Useful if your app needs to handle user input. import {useStdin} from 'ink'; const Example = () => { const {stdin} = useStdin(); return … }; isRawModeSupported Type: boolean A boolean flag determining if the current stdin supports setRawMode. A component using setRawMode might want to use isRawModeSupported to nicely fall back in environments where raw mode is not supported. import {useStdin} from 'ink'; const Example = () => { const {isRawModeSupported} = useStdin(); return isRawModeSupported ? ( <MyInputComponent /> ) : ( <MyComponentThatDoesntUseInput /> ); }; setRawMode(isRawModeEnabled) Type: function isRawModeEnabled Type: boolean See setRawMode. Ink exposes this function to be able to handle Ctrl+C, that's why you should use Ink's setRawMode instead of process.stdin.setRawMode. Warning: This function will throw unless the current stdin supports setRawMode. Use isRawModeSupported to detect setRawMode support. import {useStdin} from 'ink'; const Example = () => { const {setRawMode} = useStdin(); useEffect(() => { setRawMode(true); return () => { setRawMode(false); }; }); return … }; useStdout() useStdout is a React hook, which exposes stdout stream, where Ink renders your app. stdout Type: stream.Writable Default: process.stdout import {useStdout} from 'ink'; const Example = () => { const {stdout} = useStdout(); return … }; write(data) Write any string to stdout, while preserving Ink's output. It's useful when you want to display some external information outside of Ink's rendering and ensure there's no conflict between the two. It's similar to <Static>, except it can't accept components, it only works with strings. data Type: string Data to write to stdout. import {useStdout} from 'ink'; const Example = () => { const {write} = useStdout(); useEffect(() => { // Write a single message to stdout, above Ink's output write('Hello from Ink to stdout\n'); }, []); return … }; See additional usage example in examples/use-stdout. useStderr() useStderr is a React hook, which exposes stderr stream. stderr Type: stream.Writable Default: process.stderr Stderr stream. import {useStderr} from 'ink'; const Example = () => { const {stderr} = useStderr(); return … }; write(data) Write any string to stderr, while preserving Ink's output. It's useful when you want to display some external information outside of Ink's rendering and ensure there's no conflict between the two. It's similar to <Static>, except it can't accept components, it only works with strings. data Type: string Data to write to stderr. import {useStderr} from 'ink'; const Example = () => { const {write} = useStderr(); useEffect(() => { // Write a single message to stderr, above Ink's output write('Hello from Ink to stderr\n'); }, []); return … }; useFocus(options?) Component that uses useFocus hook becomes "focusable" to Ink, so when user presses Tab, Ink will switch focus to this component. If there are multiple components that execute useFocus hook, focus will be given to them in the order that these components are rendered in. This hook returns an object with isFocused boolean property, which determines if this component is focused or not. options autoFocus Type: boolean Default: false Auto focus this component, if there's no active (focused) component right now. isActive Type: boolean Default: true Enable or disable this component's focus, while still maintaining its position in the list of focusable components. This is useful for inputs that are temporarily disabled. id Type: string Required: false Set a component's focus ID, which can be used to programmatically focus the component. This is useful for large interfaces with many focusable elements, to avoid having to cycle through all of them. import {render, useFocus, Text} from 'ink'; const Example = () => { const {isFocused} = useFocus(); return <Text>{isFocused ? 'I am focused' : 'I am not focused'}</Text>; }; render(<Example />); See example in examples/use-focus and examples/use-focus-with-id. useFocusManager() This hook exposes methods to enable or disable focus management for all components or manually switch focus to next or previous components. enableFocus() Enable focus management for all components. Note: You don't need to call this method manually, unless you've disabled focus management. Focus management is enabled by default. import {useFocusManager} from 'ink'; const Example = () => { const {enableFocus} = useFocusManager(); useEffect(() => { enableFocus(); }, []); return … }; disableFocus() Disable focus management for all components. Currently active component (if there's one) will lose its focus. import {useFocusManager} from 'ink'; const Example = () => { const {disableFocus} = useFocusManager(); useEffect(() => { disableFocus(); }, []); return … }; focusNext() Switch focus to the next focusable component. If there's no active component right now, focus will be given to the first focusable component. If active component is the last in the list of focusable components, focus will be switched to the first active component. Note: Ink calls this method when user presses Tab. import {useFocusManager} from 'ink'; const Example = () => { const {focusNext} = useFocusManager(); useEffect(() => { focusNext(); }, []); return … }; focusPrevious() Switch focus to the previous focusable component. If there's no active component right now, focus will be given to the first focusable component. If active component is the first in the list of focusable components, focus will be switched to the last component. Note: Ink calls this method when user presses Shift+Tab. import {useFocusManager} from 'ink'; const Example = () => { const {focusPrevious} = useFocusManager(); useEffect(() => { focusPrevious(); }, []); return … }; focus(id) id Type: string Switch focus to the component with the given id. If there's no component with that ID, focus will be given to the next focusable component. import {useFocusManager, useInput} from 'ink'; const Example = () => { const {focus} = useFocusManager(); useInput(input => { if (input === 's') { // Focus the component with focus ID 'someId' focus('someId'); } }); return … }; API render(tree, options?) Returns: Instance Mount a component and render the output. tree Type: ReactElement options Type: object stdout Type: stream.Writable Default: process.stdout Output stream where app will be rendered. stdin Type: stream.Readable Default: process.stdin Input stream where app will listen for input. exitOnCtrlC Type: boolean Default: true Configure whether Ink should listen to Ctrl+C keyboard input and exit the app. This is needed in case process.stdin is in raw mode, because then Ctrl+C is ignored by default and process is expected to handle it manually. patchConsole Type: boolean Default: true Patch console methods to ensure console output doesn't mix with Ink output. When any of console.* methods are called (like console.log()), Ink intercepts their output, clears main output, renders output from the console method and then rerenders main output again. That way both are visible and are not overlapping each other. This functionality is powered by patch-console, so if you need to disable Ink's interception of output but want to build something custom, you can use it. debug Type: boolean Default: false If true, each update will be rendered as a separate output, without replacing the previous one. Instance This is the object that render() returns. rerender(tree) Replace previous root node with a new one or update props of the current root node. tree Type: ReactElement // Update props of the root node const {rerender} = render(<Counter count={1} />); rerender(<Counter count={2} />); // Replace root node const {rerender} = render(<OldCounter />); rerender(<NewCounter />); unmount() Manually unmount the whole Ink app. const {unmount} = render(<MyApp />); unmount(); waitUntilExit() Returns a promise, which resolves when app is unmounted. const {unmount, waitUntilExit} = render(<MyApp />); setTimeout(unmount, 1000); await waitUntilExit(); // resolves after `unmount()` is called clear() Clear output. const {clear} = render(<MyApp />); clear(); measureElement(ref) Measure the dimensions of a particular <Box> element. It returns an object with width and height properties. This function is useful when your component needs to know the amount of available space it has. You could use it when you need to change the layout based on the length of its content. Note: measureElement() returns correct results only after the initial render, when layout has been calculated. Until then, width and height equal to zero. It's recommended to call measureElement() in a useEffect hook, which fires after the component has rendered. ref Type: MutableRef A reference to a <Box> element captured with a ref property. See Refs for more information on how to capture references. import {render, measureElement, Box, Text} from 'ink'; const Example = () => { const ref = useRef(); useEffect(() => { const {width, height} = measureElement(ref.current); // width = 100, height = 1 }, []); return ( <Box width={100}> <Box ref={ref}> <Text>This box will stretch to 100 width</Text> </Box> </Box> ); }; render(<Example />); Testing Ink components are simple to test with ink-testing-library. Here's a simple example that checks how component is rendered: import React from 'react'; import {Text} from 'ink'; import {render} from 'ink-testing-library'; const Test = () => <Text>Hello World</Text>; const {lastFrame} = render(<Test />); lastFrame() === 'Hello World'; //=> true Check out ink-testing-library for more examples and full documentation. Using React Devtools Ink supports React Devtools out-of-the-box. To enable integration with React Devtools in your Ink-based CLI, first ensure you have installed the optional react-devtools-core dependency, and then run your app with DEV=true environment variable: Then, start React Devtools itself: After it starts up, you should see the component tree of your CLI. You can even inspect and change the props of components, and see the results immediatelly in the CLI, without restarting it. Note: You must manually quit your CLI via Ctrl+C after you're done testing. Useful Components ink-text-input - Text input. ink-spinner - Spinner. ink-select-input - Select (dropdown) input. ink-link - Link. ink-gradient - Gradient color. ink-big-text - Awesome text. ink-image - Display images inside the terminal. ink-tab - Tab. ink-color-pipe - Create color text with simpler style strings. ink-multi-select - Select one or more values from a list ink-divider - A divider. ink-progress-bar - Progress bar. ink-table - Table. ink-ascii - Awesome text component with more font choices, based on Figlet. ink-markdown - Render syntax highlighted Markdown. ink-quicksearch-input - Select component with fast quicksearch-like navigation. ink-confirm-input - Yes/No confirmation input. ink-syntax-highlight - Code syntax highlighting. ink-form - Form. ink-task-list - Task list. Useful Hooks ink-use-stdout-dimensions - Subscribe to stdout dimensions. Examples The examples directory contains a set of real examples. You can run them with: npm run example examples/[example name] # e.g. npm run example examples/borders Jest - Implementation of basic Jest UI (live demo). Counter - Simple counter that increments every 100ms (live demo). Form with validation - Manage form state using Final Form. Borders - Add borders to <Box> component. Suspense - Use React Suspense. Table - Render a table with multiple columns and rows. Focus management - Use useFocus hook to manage focus between components. User input - Listen to user input. Write to stdout - Write to stdout bypassing main Ink output. Write to stderr - Write to stderr bypassing main Ink output. Static - Use <Static> to render permanent output. Child process - Render output from a child process. Maintainers Vadim Demedes Sindre Sorhus
2024-11-08T07:53:19
en
train
42,016,645
surprisetalk
2024-11-01T13:16:34
Generating images from CSS-doodle code
null
https://yuanchuan.dev/generating-images-from-css-doodle-code
2
0
null
null
null
null
null
null
null
null
null
null
train
42,016,659
zhengiszen
2024-11-01T13:18:06
Six senators tell Biden administration UN cybercrime treaty must be changed
null
https://therecord.media/un-cybercrime-treaty-democratic-senators-seek-changes
5
0
null
null
null
null
null
null
null
null
null
null
train
42,016,674
healthypunk
2024-11-01T13:19:50
null
null
null
1
null
null
null
true
null
null
null
null
null
null
null
train
42,016,682
pavandeore
2024-11-01T13:20:33
The Ultimate Python Programmer Practice Test
null
https://www.udemy.com/course/the-ultimate-python-programmer-practice-test-series/?couponCode=KEEPLEARNING
1
0
null
null
null
null
null
null
null
null
null
null
train
42,016,712
FergusArgyll
2024-11-01T13:23:56
Saddam Husseins Unfinished Mosques
null
https://www.amusingplanet.com/2016/12/saddam-husseins-unfinished-mosques.html
2
0
null
null
null
null
null
null
null
null
null
null
train
42,016,718
jarsin
2024-11-01T13:24:27
Google employees pressure execs at all-hands meeting for clarity on cost cuts
null
https://www.cnbc.com/2024/11/01/google-employees-pressure-execs-at-all-hands-for-clarity-on-cost-cuts.html
53
87
[ 42017822, 42017707, 42017694, 42017728, 42017624, 42017089, 42018522 ]
null
null
null
null
null
null
null
null
null
train
42,016,738
mikexstudios
2024-11-01T13:27:38
Requiem for Raghavan
null
https://www.wheresyoured.at/requiem-for-raghavan/
2
0
null
null
null
null
null
null
null
null
null
null
train
42,016,741
cannibalXxx
2024-11-01T13:28:25
ask HN:Has anyone used Pinterest to attract traffic? what strategy did you use?
null
null
1
0
null
null
null
null
null
null
null
null
null
null
train
42,016,785
belter
2024-11-01T13:34:26
Campaign Security with [Redacted]
null
https://securitycryptographywhatever.com/2024/10/13/campaign-security/
1
0
null
null
null
null
null
null
null
null
null
null
train
42,016,790
aminerman
2024-11-01T13:35:08
Kinesis.js – Easily create interactive animations
null
https://kinesisjs.com/
2
1
[ 42016791 ]
null
null
null
null
null
null
null
null
null
train
42,016,804
XzetaU8
2024-11-01T13:37:46
They Are Scrubbing the Internet
null
https://brownstone.org/articles/they-are-scrubbing-the-internet-right-now/
7
1
[ 42016899 ]
null
null
no_error
They Are Scrubbing the Internet Right Now ⋆ Brownstone Institute
2024-10-30T15:33:19+00:00
Jeffrey A. Tucker, Debbie Lerman
Instances of censorship are growing to the point of normalization. Despite ongoing litigation and more public attention, mainstream social media has been more ferocious in recent months than ever before. Podcasters know for sure what will be instantly deleted and debate among themselves over content in gray areas. Some like Brownstone have given up on YouTube in favor of Rumble, sacrificing vast audiences if only to see their content survive to see the light of day. It’s not always about being censored or not. Today’s algorithms include a range of tools that affect searchability and findability. For example, the Joe Rogan interview with Donald Trump racked up an astonishing 34 million views before YouTube and Google tweaked their search engines to make it hard to discover, while even presiding over a technical malfunction that disabled viewing for many people. Faced with this, Rogan went to the platform X to post all three hours. Navigating this thicket of censorship and quasi-censorship has become part of the business model of alternative media. Those are just the headline cases. Beneath the headlines, there are technical events taking place that are fundamentally affecting the ability of any historian even to look back and tell what is happening. Incredibly, the service Archive.org which has been around since 1994 has stopped taking images of content on all platforms. For the first time in 30 years, we have gone a long swath of time – since October 8-10 – since this service has chronicled the life of the Internet in real time. As of this writing, we have no way to verify content that has been posted for three weeks of October leading to the days of the most contentious and consequential election of our lifetimes. Crucially, this is not about partisanship or ideological discrimination. No websites on the Internet are being archived in ways that are available to users. In effect, the whole memory of our main information system is just a big black hole right now. The trouble on Archive.org began on October 8, 2024, when the service was suddenly hit with a massive Denial of Service attack (DDOS) that not only took down the service but introduced a level of failure that nearly took it out completely. Working around the clock, Archive.org came back as a read-only service where it stands today. However, you can only read content that was posted before the attack. The service has yet to resume any public display of mirroring of any sites on the Internet. In other words, the only source on the entire World Wide Web that mirrors content in real time has been disabled. For the first time since the invention of the web browser itself, researchers have been robbed of the ability to compare past with future content, an action that is a staple of researchers looking into government and corporate actions. It was using this service, for example, that enabled Brownstone researchers to discover precisely what the CDC had said about Plexiglas, filtration systems, mail-in ballots, and rental moratoriums. That content was all later scrubbed off the live Internet, so accessing archive copies was the only way we could know and verify what was true. It was the same with the World Health Organization and its disparagement of natural immunity which was later changed. We were able to document the shifting definitions thanks only to this tool which is now disabled. What this means is the following: Any website can post anything today and take it down tomorrow and leave no record of what they posted unless some user somewhere happened to take a screenshot. Even then there is no way to verify its authenticity. The standard approach to know who said what and when is now gone. That is to say that the whole Internet is already being censored in real time so that during these crucial weeks, when vast swaths of the public fully expect foul play, anyone in the information industry can get away with anything and not get caught. We know what you are thinking. Surely this DDOS attack was not a coincidence. The time was just too perfect. And maybe that is right. We just do not know. Does Archive.org suspect something along those lines? Here is what they say:Last week, along with a DDOS attack and exposure of patron email addresses and encrypted passwords, the Internet Archive’s website javascript was defaced, leading us to bring the site down to access and improve our security. The stored data of the Internet Archive is safe and we are working on resuming services safely. This new reality requires heightened attention to cyber security and we are responding. We apologize for the impact of these library services being unavailable.Deep state? As with all these things, there is no way to know, but the effort to blast away the ability of the Internet to have a verified history fits neatly into the stakeholder model of information distribution that has clearly been prioritized on a global level. The Declaration of the Future of the Internet makes that very clear: the Internet should be “governed through the multi-stakeholder approach, whereby governments and relevant authorities partner with academics, civil society, the private sector, technical community and others.”  All of these stakeholders benefit from the ability to act online without leaving a trace.To be sure, a librarian at Archive.org has written that “While the Wayback Machine has been in read-only mode, web crawling and archiving have continued. Those materials will be available via the Wayback Machine as services are secured.”When? We do not know. Before the election? In five years? There might be some technical reasons but it might seem that if web crawling is continuing behind the scenes, as the note suggests, that too could be available in read-only mode now. It is not.Disturbingly, this erasure of Internet memory is happening in more than one place. For many years,  Google offered a cached version of the link you were seeking just below the live version. They have plenty of server space to enable that now, but no: that service is now completely gone. In fact, the Google cache service officially ended just a week or two before the Archive.org crash, at the end of September 2024.Thus the two available tools for searching cached pages on the Internet disappeared within weeks of each other and within weeks of the November 5th election.Other disturbing trends are also turning Internet search results increasingly into AI-controlled lists of establishment-approved narratives. The web standard used to be for search result rankings to be governed by user behavior, links, citations, and so forth. These were more or less organic metrics, based on an aggregation of data indicating how useful a search result was to Internet users. Put very simply, the more people found a search result useful, the higher it would rank. Google now uses very different metrics to rank search results, including what it considers “trusted sources” and other opaque, subjective determinations.Furthermore, the most widely used service that once ranked websites based on traffic is now gone. That service was called Alexa. The company that created it was independent. Then one day in 1999, it was bought by Amazon. That seemed encouraging because Amazon was well-heeled. The acquisition seemed to codify the tool that everyone was using as a kind of metric of status on the web. It was common back in the day to take note of an article somewhere on the web and then look it up on Alexa to see its reach. If it was important, one would take notice, but if it was not, no one particularly cared.This is how an entire generation of web technicians functioned. The system worked as well as one could possibly expect.Then, in 2014, years after acquiring the ranking service Alexa, Amazon did a strange thing. It released its home assistant (and surveillance device) with the same name. Suddenly, everyone had them in their homes and would find out anything by saying “Hey Alexa.” Something seemed strange about Amazon naming its new product after an unrelated business it had acquired years earlier. No doubt there was some confusion caused by the naming overlap.Here’s what happened next. In 2022, Amazon actively took down the web ranking tool. It didn’t sell it. It didn’t raise the prices. It didn’t do anything with it. It suddenly made it go completely dark. No one could figure out why. It was the industry standard, and suddenly it was gone. Not sold, just blasted away. No longer could anyone figure out the traffic-based website rankings of anything without paying very high prices for hard-to-use proprietary products.All of these data points that might seem unrelated when considered individually, are actually part of a long trajectory that has shifted our information landscape into unrecognizable territory. The Covid events of 2020-2023, with massive global censorship and propaganda efforts, greatly accelerated these trends. One wonders if anyone will remember what it was once like. The hacking and hobbling of Archive.org underscores the point: there will be no more memory. As of this writing, fully three weeks of web content have not been archived. What we are missing and what has changed is anyone’s guess. And we have no idea when the service will come back. It is entirely possible that it will not come back, that the only real history to which we can take recourse will be pre-October 8, 2024, the date on which everything changed. The Internet was founded to be free and democratic. It will require herculean efforts at this point to restore that vision, because something else is quickly replacing it. Jeffrey Tucker is Founder, Author, and President at Brownstone Institute. He is also Senior Economics Columnist for Epoch Times, author of 10 books, including Life After Lockdown, and many thousands of articles in the scholarly and popular press. He speaks widely on topics of economics, technology, social philosophy, and culture. View all posts Debbie Lerman, 2023 Brownstone Fellow, has a degree in English from Harvard. She is a retired science writer and a practicing artist in Philadelphia, PA. View all posts
2024-11-08T12:46:43
en
train
42,016,816
userbinator
2024-11-01T13:39:21
Programming NetBIOS on OS/2
null
https://www.os2museum.com/wp/programming-netbios-on-os-2/
52
0
[ 42040136 ]
null
null
null
null
null
null
null
null
null
train
42,016,819
jimhi
2024-11-01T13:39:37
Show HN: Hunt NYC subway art with AI
null
https://mta.darefail.com
2
0
null
null
null
null
null
null
null
null
null
null
train
42,016,825
belter
2024-11-01T13:40:24
Vodafone NL fined 2M EUR for not properly securing the tapping infrastructure
null
https://www.rdi.nl/actueel/nieuws/2024/10/22/aftapvoorziening-vodafone-niet-voldoende-beveiligd
1
0
null
null
null
null
null
null
null
null
null
null
train
42,016,827
DrHughes
2024-11-01T13:40:27
null
null
null
1
null
null
null
true
null
null
null
null
null
null
null
train
42,016,828
jueodnkfndk
2024-11-01T13:40:45
null
null
null
1
null
[ 42016829 ]
null
true
null
null
null
null
null
null
null
train
42,016,843
lyricsongation
2024-11-01T13:42:14
null
null
null
1
null
null
null
true
null
null
null
null
null
null
null
train
42,016,864
belter
2024-11-01T13:44:34
null
null
null
1
null
null
null
true
null
null
null
null
null
null
null
train
42,016,876
ReadCarlBarks
2024-11-01T13:46:11
Address Bar Updates – Now Live in Firefox Nightly
null
https://connect.mozilla.org/t5/discussions/address-bar-updates-now-live-in-firefox-nightly/m-p/76176#M29221
3
0
null
null
null
null
null
null
null
null
null
null
train
42,016,878
valyala
2024-11-01T13:46:43
null
null
null
1
null
null
null
true
null
null
null
null
null
null
null
train
42,016,885
belter
2024-11-01T13:47:16
Competition on Software Verification (SV-Comp)
null
https://sv-comp.sosy-lab.org/
1
0
null
null
null
null
null
null
null
null
null
null
train
42,016,886
impish9208
2024-11-01T13:47:33
Sugar rationing in the first 1000 days of life protected against chronic disease
null
https://www.science.org/doi/10.1126/science.adn5421
4
0
null
null
null
null
null
null
null
null
null
null
train
42,016,887
tjmcdonough
2024-11-01T13:47:35
Shall I open source my no code tool?
I am thinking about making my no-code tool open sourced as we are running out of money. Myself and two others have been working on it for a year and a half. We have paying customers. The tech stack is React, Next.js &amp; Node.js. How should I start building a community of developers?
null
1
2
[ 42016916 ]
null
null
null
null
null
null
null
null
null
train
42,016,904
alecco
2024-11-01T13:49:43
How to Train Yourself to Go to Sleep Earlier
null
https://www.sleepfoundation.org/sleep-hygiene/how-to-go-to-sleep-earlier
263
161
[ 42021337, 42025716, 42026043, 42025647, 42022516, 42022109, 42024248, 42017013, 42020547, 42017106, 42017006, 42025636, 42017051, 42025687, 42026052, 42026901, 42027732, 42025863, 42020288, 42025849, 42026031, 42034011, 42020823, 42028313, 42026624, 42019829, 42027283, 42026111, 42031389, 42030345, 42017010, 42026633, 42021340, 42025730 ]
null
null
null
null
null
null
null
null
null
train
42,016,908
null
2024-11-01T13:50:30
null
null
null
null
null
null
[ "true" ]
true
null
null
null
null
null
null
null
train
42,016,915
fortran77
2024-11-01T13:52:15
New Warning as Gmail 2FA Attacks Ongoing
null
https://www.forbes.com/sites/daveywinder/2024/11/01/new-warning-as-gmail-2fa-attacks-ongoing-how-to-stop-the-hackers/
3
1
[ 42017691 ]
null
null
no_error
New Gmail 2FA Attack Warning—Stop The Email Hackers Now
2024-11-01T07:29:25-04:00
Davey Winder
Hackers are bypassing Gmail 2FA security protectionsSOPA Images/LightRocket via Getty Images Your Google account is the gateway to most everything the average criminal hacker could want, including access to your Gmail inbox and the treasure trove of sensitive information it contains. Protecting your Google account is critical in the war against hacking and the use of two-factor authentication remains one of the most recommended weapons in the Gmail defense armoury. A new warning has now been issued by law enforcement as cybercriminals are actively bypassing that 2FA account protection to gain unfettered access to email data. Here’s everything you need to know and, most importantly, how to stop the 2FA-bypass hackers. New Gmail Warning As 2FA Bypass Attacks Underway The Federal Bureau of Investigation published an October 30 public alert relating to the theft of what are known as session cookies by cybercriminals in order to bypass 2FA account protections.The FBI Atlanta division’s warning stated that hackers are “gaining access to email accounts by stealing cookies from a victim’s computer.” Gmail, being the world’s biggest free email service with more than 2.5 billion active accounts, according to Google, is naturally a prime target for these ongoing attacks. ForbesGoogle Confirms Why Gmail Emails Have Been Vanishing For 3 YearsBy Davey Winder The FBI warning comes in addition to the awareness campaign I have been engaged upon when it comes to the dangers of 2FA bypass attacks and session cookie theft for Gmail users, as well as those of other web email platforms, over the last year or so. That these types of attacks are a prime method for cybercriminals looking to compromise Gmail accounts is now a given, so let’s cut straight to the chase and look at the best ways to mitigate the threat. Mitigating The Gmail 2FA Bypass Attack Threat Let’s start with the mitigation advice presented by the FBI in Atlanta, which is sound but breaks the boundary between usability and security, which is so important. If a security measure makes something more complicated to use, people will ignore it. The advice is to “recognize the risks of clicking the “Remember Me” checkbox when logging into a website.” Session cookies can be generated when you log in to a site, and you opt to tick the “remember this device” checkbox to save you the hassle of having to log in, complete with 2FA, every time you return. I’d file this advice under sensible and nice to have but ultimately destined to be ignored by most users. ForbesGoogle Warns Of New Android And Windows Cyber Attack—1 Thing Stops ItBy Davey Winder Awareness and staying alert to the risk of attack remain the primary mitigations when it comes to session cookie theft. Most such attacks start with a phishing email or message that aimed to redirect you to a cloned Google account login page. You are asked to complete the username and password entry as you would expect and, in order to both install trust that this is a genuine page and to initiate the cookie theft itself, then presented with what will look like a genuine 2FA challenge. The attackers will actually be looking to intercept the response in order to bypass the security measures by capturing the session cookies to reuse when accessing your account. A Google spokesperson has said that there are “numerous protections to combat such attacks, including passkeys, which substantially reduce the impact of phishing and other social engineering attacks.” That’s probably the best advice I can offer, use a passkey rather than a code that is sent by SMS or even an authentication application generated one. “Google research has shown that security keys provide a stronger protection against automated bots, bulk phishing attacks, and targeted attacks than SMS, app-based one-time passwords, and other forms of traditional two-factor authentication,” the Google spokesperson said. If you use Google Chrome as your web browser, then you are also protected, as from version 127, by app-bound encryption. Chrome encrypts data tied to identity in much the same way as macOS users experience with Keychain protection. This prevents any app running as the logged-in user from gaining access to secrets such as session cookies. Add the fact that Google also provides protections such as safe browsing, device-bound session credentials and Google’s account-based threat detection feature. As long as you are careful what you click, then most Gmail users, most of the time, will stay secure from the 2FA bypass threat.ForbesNew Gmail Security Warning As 10-Second Hackers StrikeBy Davey WinderFollow me on Twitter or LinkedIn. Check out my website or some of my other work here. 
2024-11-08T10:47:30
en
train
42,016,918
null
2024-11-01T13:52:26
null
null
null
null
null
null
[ "true" ]
null
null
null
null
null
null
null
null
train
42,016,923
kay61
2024-11-01T13:52:58
KRS Docker Extension Is Now Available on Docker Desktop
null
https://kubetools.io/krs-docker-extension-now-available-on-docker-desktop/
1
0
[ 42016924 ]
null
null
null
null
null
null
null
null
null
train
42,016,931
retskrad
2024-11-01T13:53:32
Apple's M4 Max chip is the fastest single-core performer in consumer computing
null
https://twitter.com/LeakerApple/status/1852280766471999661
359
528
[ 42023627, 42017126, 42017082, 42017166, 42017260, 42022519, 42017105, 42017452, 42022038, 42017326, 42018360, 42021422, 42028899, 42017223, 42017244, 42021752, 42017276, 42026150, 42017439, 42017828, 42017176, 42023163, 42024880, 42017079, 42019312, 42021927, 42017111, 42024997, 42017695, 42025004, 42017073, 42017424, 42025556, 42017301, 42017411, 42021253, 42017234 ]
null
null
null
null
null
null
null
null
null
train
42,016,932
Unbandit
2024-11-01T13:53:36
Show HN: CapySettings, a new way to look at config files
null
https://github.com/Unbandit2006/CapySettings
1
0
null
null
null
null
null
null
null
null
null
null
train
42,016,933
carlyayres
2024-11-01T13:53:42
RISD's AI Software Design Studio: Teaching Students to Ship Code with LLMs
null
https://carly.substack.com/p/reimagining-design-education-in-the
1
1
[ 42016934 ]
null
null
null
null
null
null
null
null
null
train
42,016,949
willemlaurentz
2024-11-01T13:56:00
Host your own calendar and contacts server (CalDAV/CardDAV)
null
https://willem.com/blog/2020-02-28_your-own-addressbook-and-calendar-cloud/
3
0
null
null
null
null
null
null
null
null
null
null
train
42,016,956
vegancap
2024-11-01T13:56:46
null
null
null
1
null
null
null
true
null
null
null
null
null
null
null
train
42,016,966
austinallegro
2024-11-01T13:58:10
A short history of the All-Ireland Poc Fada competition
null
https://www.rte.ie/brainstorm/2024/0803/1462990-poc-fada-competition-gaa-cooley-mountains-co-louth/
1
0
null
null
null
null
null
null
null
null
null
null
train
42,016,989
Qem
2024-11-01T14:01:33
Battle of Cuito Cuanavale
null
https://en.wikipedia.org/wiki/Battle_of_Cuito_Cuanavale
2
0
null
null
null
null
null
null
null
null
null
null
train
42,016,994
belter
2024-11-01T14:03:12
The AI Scientist: Towards Automated Open-Ended Scientific Discovery
null
https://arxiv.org/abs/2408.06292
2
0
null
null
null
no_error
The AI Scientist: Towards Fully Automated Open-Ended Scientific Discovery
null
[Submitted on 12 Aug 2024 (v1), last revised 1 Sep 2024 (this version, v3)]
View PDF Abstract:One of the grand challenges of artificial general intelligence is developing agents capable of conducting scientific research and discovering new knowledge. While frontier models have already been used as aides to human scientists, e.g. for brainstorming ideas, writing code, or prediction tasks, they still conduct only a small part of the scientific process. This paper presents the first comprehensive framework for fully automatic scientific discovery, enabling frontier large language models to perform research independently and communicate their findings. We introduce The AI Scientist, which generates novel research ideas, writes code, executes experiments, visualizes results, describes its findings by writing a full scientific paper, and then runs a simulated review process for evaluation. In principle, this process can be repeated to iteratively develop ideas in an open-ended fashion, acting like the human scientific community. We demonstrate its versatility by applying it to three distinct subfields of machine learning: diffusion modeling, transformer-based language modeling, and learning dynamics. Each idea is implemented and developed into a full paper at a cost of less than $15 per paper. To evaluate the generated papers, we design and validate an automated reviewer, which we show achieves near-human performance in evaluating paper scores. The AI Scientist can produce papers that exceed the acceptance threshold at a top machine learning conference as judged by our automated reviewer. This approach signifies the beginning of a new era in scientific discovery in machine learning: bringing the transformative benefits of AI agents to the entire research process of AI itself, and taking us closer to a world where endless affordable creativity and innovation can be unleashed on the world's most challenging problems. Our code is open-sourced at this https URL Submission history From: Christopher Lu [view email] [v1] Mon, 12 Aug 2024 16:58:11 UTC (11,109 KB) [v2] Thu, 15 Aug 2024 15:42:50 UTC (11,110 KB) [v3] Sun, 1 Sep 2024 00:41:18 UTC (11,112 KB)
2024-11-08T02:31:13
en
train
42,017,004
peutetre
2024-11-01T14:04:50
Elon Musk snaps at Zoox co-founder over critical Tesla FSD comments
null
https://electrek.co/2024/10/31/elon-musk-snaps-at-zoox-co-founder-over-critical-tesla-fsd-comments/
4
0
null
null
null
null
null
null
null
null
null
null
train
42,017,008
impish9208
2024-11-01T14:05:20
Potsdam Giants: Prussian regiment of tall soldiers
null
https://en.wikipedia.org/wiki/Potsdam_Giants
2
0
null
null
null
null
null
null
null
null
null
null
train
42,017,012
AlexeyBrin
2024-11-01T14:05:47
Pascal deserves a second look
null
https://timcoatesinsights.wordpress.com/2024/10/31/why-pascal-deserves-a-second-look/
58
61
[ 42017131, 42017656, 42017091, 42017459, 42017201, 42024001, 42017390, 42019310, 42017239, 42017573, 42017465, 42018718, 42017603, 42017218, 42017152, 42017421, 42017205, 42017109, 42022398, 42017498, 42017492, 42017124, 42017365 ]
null
null
null
null
null
null
null
null
null
train
42,017,017
codebydom
2024-11-01T14:06:27
AI Forecasting Web App with 45 Models and Excel Integration
null
https://roadmap-tech.com/trailblazer/
1
0
[ 42017018 ]
null
null
null
null
null
null
null
null
null
train
42,017,023
mindaslab
2024-11-01T14:06:54
null
null
null
1
null
null
null
true
null
null
null
null
null
null
null
train
42,017,028
thethingcreator
2024-11-01T14:07:30
The High Cost of Low Prices
null
https://webcull.com/blog/2024/10/the-high-cost-of-low-prices
1
0
null
null
null
null
null
null
null
null
null
null
train
42,017,029
rbanffy
2024-11-01T14:07:34
Invention Is Always Being Reinvented
null
https://spectrum.ieee.org/inventions
1
0
null
null
null
null
null
null
null
null
null
null
train
42,017,031
croes
2024-11-01T14:07:45
Valencia Flood Disaster
null
https://www.esa.int/ESA_Multimedia/Images/2024/10/Valencia_flood_disaster
2
0
null
null
null
null
null
null
null
null
null
null
train
42,017,032
jsheard
2024-11-01T14:07:56
null
null
null
1
null
null
null
true
null
null
null
null
null
null
null
train
42,017,048
og_kalu
2024-11-01T14:10:07
TokenFormer: Rethinking Transformer Scaling with Tokenized Model Parameters
null
https://arxiv.org/abs/2410.23168
173
32
[ 42017601, 42020432, 42019519, 42020695, 42026750, 42019701, 42020745, 42020976, 42021430, 42020816, 42025814, 42019937 ]
null
null
no_error
TokenFormer: Rethinking Transformer Scaling with Tokenized Model Parameters
null
[Submitted on 30 Oct 2024]
View PDF HTML (experimental) Abstract:Transformers have become the predominant architecture in foundation models due to their excellent performance across various domains. However, the substantial cost of scaling these models remains a significant concern. This problem arises primarily from their dependence on a fixed number of parameters within linear projections. When architectural modifications (e.g., channel dimensions) are introduced, the entire model typically requires retraining from scratch. As model sizes continue growing, this strategy results in increasingly high computational costs and becomes unsustainable. To overcome this problem, we introduce TokenFormer, a natively scalable architecture that leverages the attention mechanism not only for computations among input tokens but also for interactions between tokens and model parameters, thereby enhancing architectural flexibility. By treating model parameters as tokens, we replace all the linear projections in Transformers with our token-parameter attention layer, where input tokens act as queries and model parameters as keys and values. This reformulation allows for progressive and efficient scaling without necessitating retraining from scratch. Our model scales from 124M to 1.4B parameters by incrementally adding new key-value parameter pairs, achieving performance comparable to Transformers trained from scratch while greatly reducing training costs. Code and models are available at \url{this https URL}. Submission history From: Haiyang Wang [view email] [v1] Wed, 30 Oct 2024 16:19:00 UTC (671 KB)
2024-11-08T11:32:49
en
train
42,017,049
yamrzou
2024-11-01T14:10:37
Bennett Scale (Developmental Model of Intercultural Sensitivity)
null
https://en.wikipedia.org/wiki/Bennett_scale
1
0
null
null
null
no_error
Bennett scale
2007-10-21T13:14:01Z
Contributors to Wikimedia projects
From Wikipedia, the free encyclopedia The Bennett scale, also called the Developmental Model of Intercultural Sensitivity (DMIS), was developed by Milton Bennett.[1] The framework describes the different ways in which people can react to cultural differences.[1] Bennett's initial idea was for trainers to utilize the model to evaluate trainees' intercultural awareness and help them improve intercultural sensitivity, also sometimes referred to as cultural sensitivity, which is the ability of accepting and adapting to a brand new and different culture.[2] Organized into six stages of increasing sensitivity to difference, the DMIS identifies the underlying cognitive orientations individuals use to understand cultural difference. Each position along the continuum represents increasingly complex perceptual organizations of cultural difference, which in turn allow increasingly sophisticated experiences of other cultures. By identifying the underlying experience of cultural difference, predictions about behavior and attitudes can be made and education can be tailored to facilitate development along the continuum. The first three stages are ethnocentric as one sees his own culture as central to reality. Climbing the scale, one develops a more and more ethnorelative point of view, meaning that one experiences one's own culture as in the context of other cultures. By the fourth stage, ethnocentric views are replaced by ethnorelative views.[1][2][3][4] Developmental model of intercultural sensitivity (Six stages of Bennett scale)[edit] 1-3 stages reflect ethnocentrism in cross-cultural communication. During these three phases, a person sees their original culture as the most superior one and takes it as the criteria to judge other cultures.[2] Denial of difference Individuals experience their own culture as the only "real" one, while other cultures are either not noticed at all or are understood in an undifferentiated, simplistic manner.[3] People at this position are generally uninterested in cultural difference, but when confronted with difference their seemingly benign acceptance may change to aggressive attempts to avoid or eliminate it.[3] Most of the time, this is a result of physical or social isolation, where the person's views are never challenged and are at the center of their reality.[3] Members of dominant culture are more likely to have a denial orientation towards cultural diversity.[4] Defense of difference Differences are acknowledged, but they are denigrated rather than embraced.[2] Rather, one' s own culture is experienced as the most "evolved" or best way to live.[3] This position is characterized by dualistic us/them thinking and frequently accompanied by overt negative stereotyping.[4] They will openly belittle the differences among their culture and another, denigrating race, gender or any other indicator of difference. People at this position are more openly threatened by cultural difference and more likely to be acting aggressively against it.[3] Minimization of difference People recognize superficial cultural differences in food, customs, etc. and have somewhat positive view about cultural differences.[2] But they still emphasize human similarity in physical structure, psychological needs, and/or assumed adherence to universal values.[2][3] People at this position are likely to assume that they are no longer ethnocentric, and they tend to overestimate their tolerance while underestimating the effect (e.g. “privilege”) of their own culture.[3] They usually assumes that our own set of fundamental behavioral categories are absolute and universal.[1] Acceptance of difference One's own culture is experienced as one of a number of equally complex worldviews.[3] People at this position appreciate and accept the existence of culturally different ways of organizing human existence, although they do not necessarily like or agree with every way.[2][3] They can identify how culture affects a wide range of human experience and they have a framework for organizing observations of cultural difference.[3] We recognize people from this stage through their desire to be informed or proactively learn about alien cultures, and not to confirm prejudices.[2] Adaptation to difference Individuals are able to expand their own worldviews to accurately understand other cultures and behave in a variety of culturally appropriate ways.[3] In this stage, multicultural participants start to develop intercultural communication skills, change their communication styles, and effectively use empathy or frame of reference shifting, to understand and be understood across cultural boundaries.[3][2] At this stage, one is able to act properly outside of one's own culture.[3] Integration of difference One's experience of self is expanded to include the movement in and out of different cultural worldviews.[3] People at this position have a definition of self that is "marginal" (not central) to any particular culture, allowing this individual to shift rather smoothly from one cultural worldview to another.[3] At this point, a will to comprehend and adopt various beliefs and norms begins to emerge, demonstrating a high level of intercultural sensitivity.[2] 4-6 stages reflect ethnorelativism in cross-cultural communication. During these three phases, a person gradually treats all culture as reasonable and try to understand every behavior from the aspect of cultures behind.[2] Evolutionary strategies[edit] In his theory, Bennett describes what changes occur when evolving through each step of the scale. Summarized, they are the following:[3] From denial to defense: the person acquires an awareness of difference between cultures From defense to minimization: negative judgments are depolarized, and the person is introduced to similarities between cultures. From minimization to acceptance: the subject grasps the importance of intercultural difference. From acceptance to adaptation: exploration and research into the other culture begins From adaptation to integration: subject develops empathy towards the other culture. Application of Bennett scale for the study of various topics[edit] Diversity in education[edit] Schools play an important role in shaping the multicultural perspective of students.[5] A study published in 2011 by Frank Hernandez and Brad W. Kose found that the Bennett Scale provides a robust measure of principals' cultural competence in terms of how they understand differences.[6] Principals' DMIS orientation how they could influence their understanding of social justice and further make them implement different leadership practices for diverse schools.[6] Specifically, the researchers provided various explanations of the pervasive performance gap that sees white children outperforming their black or Latino classmates on standardised tests, academics, and school completion based on the Bennett Scale as a theoretical framework.[6] Education professionals may rationalize school policies and activities for cultural diversity and help achieve cultural equality in the educational environment by determining which of the six phases of intercultural sensitivity the particular principal is in. For instance, a principal in minimization phase may organize international cuisine festivals in the school, or use cultural and heritage festivals as opportunities for intercultural education.[7] But since it overlooks cultural distinctions, the school might not consider to launch a multicultural program or make curriculum changes that respect students' cultural nuances.[6] Another study applied Bennett Scale to the curriculum of university general education courses.[8] In the current context of globalization and growing diversity in schools, experiencing and learning about cultural differences in the school environment is an important instructional method.[9] This study used Bennett Scale as an analytical model, coded and quantitatively analyzed data of cross-cultural sensitivity among 48 students from multicultural backgrounds receiving university general education.[8] According to the findings, a diversity curriculum that motivates students to share and practice their viewpoints on social issues is more likely to foster empathy and raise levels of cross-cultural sensitivity than one that only emphasizes information comprehension with assignments including material reading and essay writing.[8] Intercultural communication[edit] Bennett Scale has mostly been applied to analysis on people's cross-cultural sensitivity, but some scholars have expanded its application to organizational communications. Informed by Bennett Scale and Botan's Five steps in Issue Management model, Radu Dumitrascu developed a new corporate adaption model and follow-up intercultural communication approaches for international business.[10] According to how they handle cultural diversity and cultural affiliations and localize themselves through communication, structural adjustments, strategies, and tactics, five types of organizations are defined: denying/intransigent, minimizing/resistant, minimizing/cooperative, adaptive/cooperative, integrative.[10] Critiques of Bennett scale[edit] Bennett Scale is recognized for defining clear ethnocentric and ethnorelative stages, however, it is also considered by some scholars to be too idealistic to be practiced in the reality.[citation needed] Primary critiques include:[11] Does not apply to short-term cultural adaptation because of its progressive nature Neglect the relationship between interculturality and language Assume monocultural origin and no previous contact with other cultures, which does not take into account people from multicultural backgrounds Besides, several researchers report a struggle to determine participants' orientation within the six stages of Bennett Scale due to the lack of transitional middle ground between stages.[12][13] The model is also critiqued for working well in nations where multiculturalism is easily embraced, like the United States, but its practical applicability in isolated or undeveloped nations where people have little exposure to other cultures is still questioned.[citation needed] ^ a b c d Bennett, Milton J. (1986-01-01). "A developmental approach to training for intercultural sensitivity". International Journal of Intercultural Relations. Special Issue: Theories and Methods in Cross-Cultural Orientation. 10 (2): 179–196. doi:10.1016/0147-1767(86)90005-2. ISSN 0147-1767. ^ a b c d e f g h i j k Littlejohn, Stephen W. (2021). Theories of human communication. Karen A. Foss, John G. Oetzel (Twelfth ed.). Long Grove, Illinois. ISBN 978-1-4786-4667-9. OCLC 1259328675.{{cite book}}: CS1 maint: location missing publisher (link) ^ a b c d e f g h i j k l m n o p q Bennett, Milton J. (2017-06-27). "Developmental Model of Intercultural Sensitivity". The International Encyclopedia of Intercultural Communication: 1–10. doi:10.1002/9781118783665.ieicc0182. ISBN 9781118783948. S2CID 151315097. ^ a b c Hammer, Mitchell R.; Bennett, Milton J.; Wiseman, Richard (July 2003). "Measuring intercultural sensitivity: The intercultural development inventory". International Journal of Intercultural Relations. 27 (4): 421–443. doi:10.1016/s0147-1767(03)00032-4. ISSN 0147-1767. ^ Best practices, best thinking, and emerging issues in school leadership. William A. Owings, Leslie S. Kaplan. Thousand Oaks, Calif.: Corwin Press. 2003. ISBN 0-7619-7862-3. OCLC 50803476.{{cite book}}: CS1 maint: others (link) ^ a b c d Hernandez, Frank; Kose, Brad W. (July 2012). "The Developmental Model of Intercultural Sensitivity: A Tool for Understanding Principals' Cultural Competence". Education and Urban Society. 44 (4): 512–530. doi:10.1177/0013124510393336. ISSN 0013-1245. S2CID 144580919. ^ Beyond heroes and holidays : a practical guide to K-12 anti-racist, multicultural education and staff development. Enid Lee, Deborah Menkart, Margo Okazawa-Rey, Teaching for Change (2nd ed.). Washington, D.C.: Teaching for Change. 2002. ISBN 1-878554-17-4. OCLC 51074343.{{cite book}}: CS1 maint: others (link) ^ a b c Mahoney, Sandra L.; Schamber, Jon F. (2004). "Exploring the Application of a Developmental Model of Intercultural Sensitivity to a General Education Curriculum on Diversity". The Journal of General Education. 53 (3): 311–334. doi:10.1353/jge.2005.0007. ISSN 1527-2060. S2CID 144856538. ^ Educating citizens : preparing America's undergraduates for lives of moral and civic responsibility. Anne Colby (1st ed.). San Francisco, CA: Jossey-Bass. 2003. ISBN 978-0-7879-6515-0. OCLC 50858910.{{cite book}}: CS1 maint: others (link) ^ a b Dumitrascu, Radu (2008-07-09). Corporate-Adaptation in International Public Relations (Thesis thesis). ^ Liddicoat, Anthony J; Papademetre, Leo; Scarino, Angela; Kohler, Michelle (2003). Report on intercultural language learning. Canberra: Department of Education, Science and Training. ^ Kashima, T. (2006). Phenomenological research on the intercultural sensitivity of returned Peace Corps volunteers in the Athens community (Doctoral dissertation, Ohio University). ^ Turner, D. A. (1991). Assessing the intercultural sensitivity of American expatriates in Kuwait.
2024-11-07T22:37:12
en
train
42,017,057
exeSkins
2024-11-01T14:11:22
null
null
null
1
null
[ 42017058 ]
null
true
null
null
null
null
null
null
null
train
42,017,063
bluemooner
2024-11-01T14:12:02
Show HN: Zidezi.app – A Wordle-Like app for language learning
Hi HN! I built this app to help me stay consistent with learning a new language. It’s like &quot;Wordle&quot; but for language learning, with daily articles adapted to the user&#x27;s level. The app uses ChatGPT to generate fresh articles daily, and users can click on any unfamiliar word for an instant explanation. My goal was to keep it smooth and minimal — no clutter, just learning by discovery.<p>Each language has a distinct article, adapted to three levels: beginner, intermediate, and advanced. So all levels get the same topic, but the vocabulary and the grammar scale to match. I started with intermediate Spanish but moved to advanced over a few weeks as I progressed.<p>I’m thinking of adding features like an audio mode, more detailed grammar explanations (like verb conjugations and noun declensions), and spaced repetition to reinforce vocabulary you click on. The long term plan is to introduce ways to practice not only reading, but also listening and speaking. As it stands, you need a basic understanding of the language to use the app, so definitely not something for complete beginners. I&#x27;d love to hear any feedback or ideas!
https://zidezi.app/
2
0
null
null
null
null
null
null
null
null
null
null
train
42,017,064
thunderbong
2024-11-01T14:12:03
Typesetting Engines: A Programmer's Perspective (LaTeX vs. Typst vs. HTML)
null
https://blog.ppresume.com/posts/on-typesetting-engines
5
0
null
null
null
null
null
null
null
null
null
null
train
42,017,065
pattle
2024-11-01T14:12:07
Simpsons in CSS (2013)
null
https://pattle.github.io/simpsons-in-css/
2
0
null
null
null
null
null
null
null
null
null
null
train
42,017,072
nickt
2024-11-01T14:13:08
Recreating my '80s dev system
null
http://www.breakintoprogram.co.uk/hardware/recreating-my-80s-dev-system-part-1
2
1
[ 42018961 ]
null
null
no_error
Recreating my '80s dev system (Part 1) - L Break Into Program, 0:1
2024-09-29T16:14:39+00:00
Break Into Program
My first job after leaving college was as a games developer at Software Creations, a small UK games company based in Manchester. Up until the early ’90s they were using Tatung Einsteins as the source machine for developing games on the Sinclair Spectrum, Amstrad CPC and Commodore 64. The workflow was quite simple, yet a massive improvement on my home rig, which was a single 48K ZX Spectrum with an Interface 1, two microdrives, and the Zeus Z80 assembler. The source code (Z80 or 6502) was edited and assembled on the Tatung Einstein. The resultant binary code was piped to the target machine via a serial or parallel interface. A small boot loader on the target machine would receive the binary and write it to memory. Once loaded, the code would automatically execute. On the 8-bit micros memory was at a premium, so not having the assembler and source code resident on the target machine was an advantage. On my home system these would be overwritten every time I assembled and ran the game and I’d have to load them in again. With this workflow, all the developer had to load back in was the boot loader. I was employed as the Amstrad CPC developer. The first couple of days was spent copying the Spectrum parallel transfer board and making it work on the Amstrad. Mike Webb gave me a bag of components and some Veroboard and basically said: “How’s your soldering?”. The board was relatively straightfoward to build – an 8255 PIO chip and maybe a single logic chip for lazy address decoding. Needless to say I got it working more or less first time and used it for my Amstrad CPC conversions. I think it may have even survived our move to using PCs as source development machines. The proposed Spectrum Z80 PIO board As an aside, I think Mike Webb used 8255 chips because they were cheap and readily available from the Maplins next door to the Software Creations office on Oxford Road in Manchester (opposite the BBC building). So, what’s the plan?? I’m an exhibitor at RetroFest 2024 in November and have decided to recreate this development system. I’ve already got a Tatung Einstein, several Spectrums, and Ste Ruddy’s editor/assembler for the Einstein. The only thing missing is the parallel transfer board. I’ve decided to modify the original build slightly and use a Z80 PIO chip instead – this will match the chip in the Einstein and is (IMHO) slightly easier to interface with the Spectrum in terms of hardware and software. It is also fitting, in honour of the end of production of the Z80 CPU and peripheral chips. In addition to using the PIO I’ll be adding some blinkenlights, partly to help debug, but mostly because everyone loves them. Starting the project I’ve created a schematic for the stripboard on Fritzing as it is quite good at breadboard/stripboard layouts. This is loosely based upon a reference design in The Spectrum Hardware Manual by Adrian Dickens. I’ve added a couple of line drivers for the LEDs that are connected to the data and handshaking lines so that I don’t source too much current from its data lines. It seemed like a good idea to test the Tatung User I/O port was still working after 40-odd years. It is directly connected to Port B of its Z80 PIO chip (Port A is used by the parallel printer interface), and could easily be damaged. A short BBC BASIC for Z80 program and a simple interface board connected to my mixed-signal oscilloscope proved all was working as expected. The BBC BASIC program – note PUT in this context outputs a value to a Z80 port. 10 PUT &33,&CF : REM Set the I/O port to mode 3 20 PUT &33,0 : REM Set all 8 pins to output 30 FOR A%=0 TO 255 40 PUT &32,A% : REM Output the value on Port B 50 PRINT A% 60 NEXT 70 GOTO 30 So we’re all set on the Tatung side, and I’ve got a rough idea what I’m going to do on the Spectrum side. Next steps I need to build the Spectrum Z80 PIO board, at least connecting the PIO chip to the Spectrum bus, and test that it works on my stunt Spectrum using a similar method to how I tested the PIO on the Tatung. I think I’ve got all the parts in I need – got a couple of Z80 PIOs in stock and have purchased an edge connector from eBay. Once that is done I’ll need to finish off the board, test-connect the Spectrum to the Tatung then write the bootloader, probably initially in Sinclair BASIC, then once I’m happy it works I’ll port it to Z80 assembler. I’ve got a deadline – ideally by end of October – but think I’m in a good position to finish before then. Gallery The Tatung Einstein User I/O port Running the ribbon cable over the top Connecting it to my scope Everything is working fine! Close-up of the oscilloscope trace
2024-11-08T02:04:51
en
train
42,017,083
peutetre
2024-11-01T14:14:47
Bold Hyundai Initium concept is first look at new Nexo
null
https://www.autocar.co.uk/car-news/new-cars/bold-hyundai-initium-concept-first-look-new-nexo
1
0
null
null
null
missing_parsing
Bold Hyundai Initium concept is first look at new Nexo | Autocar
null
by Charlie Martin
Hyundai has unveiled the Initium concept, a hydrogen fuel cell SUV that is all but confirmed to showcase the styling and technology of the next-generation Nexo. Intended to demonstrate the brand’s commitment to hydrogen power, it packs a new powertrain that’s said to offer much greater performance than the one in the existing Nexo. Its single electric motor puts out up to 201bhp, 40bhp more than the outgoing car's, and it is said to provide a smoother drive at motorway speeds. Hyundai said it is targeting a range of more than 404 miles between fill-ups, which is on a par with the official 414-mile figure for the Nexo. It also has vehicle-to-load functionality, allowing the car’s batteries to power external devices. In addition to the technical developments, the Initium ushers in a new design language called ‘Art of Steel’.  It is said to be “solid and safe”, having been created in response to customer demand for SUVs. The plus-shaped graphic on the front daytime-running lights and rear lights is new and will be used to distinguish Hyundai’s hydrogen models from those with battery-electric and internal-combustion powertrains.  The Initium also has a notably more rakish roofline than Hyundai’s other SUVs, hinting at how aerodynamics have been prioritised in its design. Hyundai said the Initium previews a production fuel cell car that’s due to be unveiled by next summer. This is most likely to be the successor to the current Nexo, given its design closely mirrors that of prototypes previously spotted testing on public roads around Europe. However, the brand has yet to announce whether that car will come to the UK and the current version has struggled to generate much impact: fewer than 50 Nexos have been sold here since it arrived five years ago.
2024-11-08T20:43:06
null
train
42,017,085
croes
2024-11-01T14:15:03
AI's "Human in the Loop" Isn't
null
https://pluralistic.net/2024/10/30/a-neck-in-a-noose/
5
0
null
null
null
null
null
null
null
null
null
null
train
42,017,093
bookofjoe
2024-11-01T14:16:14
Repeated plague infections across six generations of Neolithic Farmers
null
https://www.nature.com/articles/s41586-024-07651-2
2
0
null
null
null
body_too_long
null
null
null
null
2024-11-08T08:39:38
null
train
42,017,102
scubakid
2024-11-01T14:17:03
Get SoC 2 certified as an indie hacker
null
https://news.tonydinh.com/p/get-soc-2-certified-as-an-indie-hacker
1
0
null
null
null
null
null
null
null
null
null
null
train
42,017,104
Brajeshwar
2024-11-01T14:17:52
New satellite tool scans for plastic pollution on beaches
null
https://www.abc.net.au/news/2024-11-01/algorithm-to-help-clean-up-plastic-waste-from-space/104551662
4
1
[ 42021500 ]
null
null
null
null
null
null
null
null
null
train
42,017,110
Brajeshwar
2024-11-01T14:18:23
Countries pay close attention to India's whole-of-society AI approach
null
https://fortune.com/2024/11/01/countries-ai-indias-whole-of-society-approach-tech-politics/
2
0
null
null
null
null
null
null
null
null
null
null
train
42,017,116
Brajeshwar
2024-11-01T14:18:49
Bird Flu Is Step Closer to Mixing with Seasonal Flu and Becoming a Pandemic
null
https://www.scientificamerican.com/article/h5n1-detected-in-pig-highlights-the-risk-of-bird-flu-mixing-with-seasonal/
8
0
[ 42017583 ]
null
null
null
null
null
null
null
null
null
train
42,017,118
Brajeshwar
2024-11-01T14:18:58
null
null
null
1
null
null
null
true
null
null
null
null
null
null
null
train
42,017,122
jcrona28
2024-11-01T14:19:24
null
null
null
1
null
null
null
true
null
null
null
null
null
null
null
train
42,017,135
Apocryphon
2024-11-01T14:20:26
null
null
null
1
null
null
null
true
null
null
null
null
null
null
null
train
42,017,156
abe94
2024-11-01T14:22:12
A year on, Intel's touted AI-chip deals have fallen short
null
https://www.reuters.com/technology/artificial-intelligence/year-intels-touted-ai-chip-deals-have-fallen-short-2024-11-01/
2
0
null
null
null
null
null
null
null
null
null
null
train
42,017,161
sharjeelsidd
2024-11-01T14:22:48
Show HN: A Tool to Estimate Chatbot Costs Based on Your Project Requirements
I built a Chatbot Cost Calculator to bring more transparency to chatbot pricing. Pricing for chatbot development often varies widely based on the complexity of features, integrations, and custom requirements, which can be hard for clients and developers to estimate accurately.<p>With this calculator, you can answer a few project-specific questions and get an immediate cost estimate based on common factors in chatbot development.<p>The goal is to streamline the decision-making process by giving clients a ballpark figure upfront and helping developers communicate costs more effectively.
https://bothook.com/cost/
1
0
null
null
null
no_error
Know how much chatbots cost by answering simple questions
null
Bothook
ChatbotCalculator Find out how much it cost to build a chatbot Designed & Developed at BotHook Chatbot Cost Calculator Choose the platforms Chatbots can be built on wide variety of platforms. The advantage about building a chatbot on an already popular platform is the less aqiuistion cost. Deploy your chatbot where your audience are already active or deploy it independently to take control. Chatbot Cost Calculator Do you want integration in your bot? Integration in a bot allows to take advantage of a third party solutions to do different tasks. For eg: You can integrate with HubSpot/SalesForce/Zoho CRM/MailChimp. For example: If someone leaves an email on your chatbot, that information can be sent over to your preferred CRM. Chatbot Cost Calculator Do you want users to login from chatbot? You can enable users to login on your chatbot. Give access depending on the scope of user permission. Chatbot Cost Calculator Would you like your chatbot to have database functionality? This feature enables your chatbot to store and retrieve important information, enhancing its ability to provide personalized responses and maintain context across conversations. Chatbot Cost Calculator What kind of dashboard do you want? Dashboard can give the opportunity to gain insights that help perform the chatbot better. Depending on the complexity, it can provide an easy to understand, objective view of current performance and can effectively serve as a foundation for further dialogue. Basic Dashboard: a. User Engagement: Track the number of users interacting with the chatbot and their level of engagement. b. Response Rate: Monitor the chatbot's response time and the percentage of queries it can handle without human intervention. c. Chat Volume: Analyze the total number of conversations the chatbot handles daily, weekly, or monthly. Chatbot Cost Calculator What kind of bot? Bots come in different shapes and sizes. But there are two most prominent types of bots out in the market. Chatbot Cost Calculator Choose level of AI to be integrated? Adding AI to your bot lifts it to another level. Bot can understand the meaning of words in different combinations, ask questions to create context and intent, and perform tasks for users. No AI: The Chatbot will not use any AI. This option provides a straightforward, rule-based chatbot experience. The chatbot will respond based on exact keyword matches or predefined patterns. Chatbot Cost Calculator Collect payment from bot? If you plan to sell something through chatbot then collecting payment is the most important feature to have. Chatbot Cost Calculator Do you want your bot to have its own API? There are thousands of services who keep their API open. In fact, you can have your own API created for other developers to take advantage of it. Chatbot Cost Calculator The estimated cost of your chatbot is Chatbot Cost Calculator Our Other Awesome Chatbots Chanun Bot Chanun is a Facebook Messenger chatbot where you can easily chat with your friends anonymously. Confess, Share secrets or simply confuse them on who you are. Ace2Three Bot Test your Rummy skills and compete against the best Rummy players in India. Discover tourneys based on your preference to compete and win big prizes! EX Bot Exbot is a trading platform based on a chatbot where you can exchange bitcoins for a fiat currency and it provides wallet services of utilities bill payments all within the chatbot.
2024-11-08T07:59:47
en
train
42,017,162
cainxinth
2024-11-01T14:22:51
NIH BioArt Source: 2k free science and medical art visuals
null
https://bioart.niaid.nih.gov/
2
0
null
null
null
null
null
null
null
null
null
null
train
42,017,163
peutetre
2024-11-01T14:22:53
Analyzing Go Build Times (2023)
null
https://blog.howardjohn.info/posts/go-build-times/
13
0
[ 42017986 ]
null
null
null
null
null
null
null
null
null
train
42,017,171
CrankyBear
2024-11-01T14:23:43
Stacklok Donates Minder Security Project to OpenSSF
null
https://thenewstack.io/stacklok-donates-minder-security-project-to-openssf/
2
0
null
null
null
null
null
null
null
null
null
null
train
42,017,180
muchheaven
2024-11-01T14:25:03
null
null
null
1
null
[ 42017181 ]
null
true
null
null
null
null
null
null
null
train
42,017,186
rbanffy
2024-11-01T14:25:47
New Intel Diamond Rapids Patch for GCC Confirms AVX10.2-512, APX, Other Features
null
https://www.phoronix.com/news/Intel-Diamond-Rapids-APX-AVX10
1
0
null
null
null
no_error
New Intel Diamond Rapids Patch For GCC Confirms AVX10.2-512, APX & Other ISA Features
null
Written by Michael Larabel in Intel on 1 November 2024 at 07:00 AM EDT. 6 Comments
Intel software engineers have been very busy recently with upstreaming various elements of support into the Linux kernel, open-source compilers and more for the next-generation Xeon Diamond Rapids processors. Following the recent GCC prep patches for Diamond Rapids to work on the ISA additions around AMX-AVX512, AMX-FP8, AMX-FP32, and others, a new patch was posted today for actually exposing the "-march=diamondrapids" compiler target and in turn confirming all of the new ISA capabilities. Intel Diamond Rapids is looking quite exciting on the CPU ISA front. In addition to the many Advanced Matrix Extensions (AMX) additions coming with Diamond Rapids, we now have solid confirmation with today's patch that Diamond Rapids will be supporting AVX10.2-512 as the latest of AVX10. Plus this Friday patch confirms Diamond Rapids as having the previously disclosed Advanced Performance Extensions (APX) functionality. AVX10 and APX were widely assumed for Diamond Rapids while this GNU Compiler Collection patch today confirms it plus the other ISA features. The documentation portion of the patch notes: "Intel Diamond Rapids CPU with 64-bit extensions, MOVBE, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2, POPCNT, CX16, SAHF, FXSR, AVX, XSAVE, PCLMUL, FSGSBASE, RDRND, F16C, AVX2, BMI, BMI2, LZCNT, FMA, MOVBE, HLE, RDSEED, ADCX, PREFETCHW, AES, CLFLUSHOPT, XSAVEC, XSAVES, SGX, AVX512F, AVX512VL, AVX512BW, AVX512DQ, AVX512CD, PKU, AVX512VBMI, AVX512IFMA, SHA, AVX512VNNI, GFNI, VAES, AVX512VBMI2, VPCLMULQDQ, AVX512BITALG, RDPID, AVX512VPOPCNTDQ, PCONFIG, WBNOINVD, CLWB, MOVDIRI, MOVDIR64B, ENQCMD, CLDEMOTE, PTWRITE, WAITPKG, SERIALIZE, TSXLDTRK, UINTR, AMX-BF16, AMX-TILE, AMX-INT8, AVX-VNNI, AVX512FP16, AVX512BF16, AMX-FP16, PREFETCHI, AMX-COMPLEX, AVX10.1-512, AVX-IFMA, AVX-NE-CONVERT, AVX-VNNI-INT16, AVX-VNNI-INT8, CMPccXADD, SHA512, SM3, SM4, AVX10.2-512, APX_F, AMX-AVX512, AMX-FP8, AMX-TF32, AMX-TRANSPOSE, MOVRS, AMX-MOVRS and USER_MSR instruction set support." Or the new additions with Diamond Rapids compared to current Granite Rapids comes down to AMX-COMPLEX, AVX10.1-512, AVX-IFMA, AVX-NE-CONVERT, AVX-VNNI-INT16, AVX-VNNI-INT8, CMPccXADD, SHA512, SM3, SM4, AVX10.2-512, APX_F, AMX-AVX512, AMX-FP8, AMX-TF32, AMX-TRANSPOSE, MOVRS, AMX-MOVRS, and USER_MSR. Great seeing Intel with their very timely support for enabling new CPU ISA features and the CPU family "-march=" targets for both GCC and LLVM/Clang. The patches can be found on the GCC mailing list. These patches in turn will be found with GCC 15 that will see its stable release in the form of GCC 15.1 around March~April, well ahead of Xeon Diamond Rapids processors shipping and allowing time for this major compiler update to be packaged up by various Linux distribution vendors.
2024-11-08T13:36:34
en
train
42,017,197
assbuttbuttass
2024-11-01T14:26:35
Show HN: I created a minimalist pastebin clone using Go, Htmx, and PostgreSQL
null
https://notepad.moe/ADbo2GZ31EtQjnWvrP0h6Id3
2
1
[ 42017198 ]
null
null
http_404
Not Found
null
null
/ADbo2GZ31EtQjnWvrP0h6Id3 was not found
2024-11-08T01:57:26
null
train
42,017,206
cainxinth
2024-11-01T14:26:59
How the U.S. military lost a $250M war game in minutes
null
https://www.washingtonpost.com/investigations/2024/10/30/usa-war-military-money-report
7
1
[ 42018746 ]
null
null
no_error
How the U.S. military lost a $250 million war game in minutes
2024-10-30T11:00:00.647Z
Nate Jones
As a U.S. Navy carrier battle group entered the Persian Gulf, it came under surprise attack by adversaries launching missiles from commercial ships and radio-silent aircraft that quickly overwhelmed its missile defense systems. Nineteen U.S. ships, including the aircraft carrier, were destroyed and sunk within 10 minutes.Fortunately for U.S. forces, this scenario was only a simulation in a massive, $250 million war game named Millennium Challenge 2002. After the unexpected and humbling “loss” in July 2002, military officials at Joint Forces Command in Norfolk paused the war game, “refloated” the ships and restarted the exercise. They also imposed limits on enemy tactics. After the restart, the U.S. forces defeated their adversaries in a more conventionally fought simulation.
2024-11-08T05:13:56
en
train
42,017,213
nsagheen
2024-11-01T14:27:37
null
null
null
1
null
null
null
true
null
null
null
null
null
null
null
train
42,017,215
louthy
2024-11-01T14:27:53
Monkeys will never type Shakespeare, study finds
null
https://www.bbc.com/news/articles/c748kmvwyv9o
10
3
[ 42019150, 42018498, 42017988, 42017571 ]
null
null
null
null
null
null
null
null
null
train
42,017,229
thunderbong
2024-11-01T14:28:33
Election Silence
null
https://en.wikipedia.org/wiki/Election_silence
4
0
[ 42017568 ]
null
null
null
null
null
null
null
null
null
train
42,017,249
giJMm3
2024-11-01T14:29:46
null
null
null
1
null
null
null
true
null
null
null
null
null
null
null
train
42,017,252
mooreds
2024-11-01T14:30:03
What My Job Search Taught Me About Networking
null
https://www.besidescode.com/p/what-my-job-search-taught-me-about
1
0
null
null
null
null
null
null
null
null
null
null
train
42,017,256
peutetre
2024-11-01T14:30:28
AMD EPYC 9655 Benchmarks Show the Terrific Generational Gains with 5th Gen EPYC
null
https://www.phoronix.com/review/amd-epyc-9655
5
0
[ 42017566 ]
null
null
null
null
null
null
null
null
null
train
42,017,265
stale2002
2024-11-01T14:31:28
Hate and harassment have no place on Twitch
null
https://blog.twitch.tv/en/2024/11/01/hate-and-harassment-have-no-place-on-twitch/
3
0
[ 42017563 ]
null
null
null
null
null
null
null
null
null
train
42,017,267
byyoung3
2024-11-01T14:32:01
New robot can do your laundry
null
https://wandb.ai/byyoung3/ml-news/reports/This-new-robot-can-do-your-laundry---Vmlldzo5OTgyODA4
1
0
null
null
null
null
null
null
null
null
null
null
train
42,017,269
samvher
2024-11-01T14:32:16
Ask HN: Best of publicly available CS/engineering courses?
Courses on EdX&#x2F;Coursera are already fairly well indexed. There is a lot on OCW as well, but much of it is outdated, and often materials come without answer models making it hard to check your understanding. The below courses are (1) high quality, (2) publicly available, (3) have automated tests &#x2F; answer models for the majority of materials allowing you to check yourself.<p>Programming Parallel Computers (U of Helsinki): https:&#x2F;&#x2F;ppc-exercises.cs.aalto.fi&#x2F;courses<p>Operating Systems Engineering (MIT): https:&#x2F;&#x2F;pdos.csail.mit.edu&#x2F;6.1810&#x2F;2024&#x2F;schedule.html<p>Distributed Systems (MIT): https:&#x2F;&#x2F;pdos.csail.mit.edu&#x2F;6.824&#x2F;schedule.html<p>Database Systems (MIT): https:&#x2F;&#x2F;dsg.csail.mit.edu&#x2F;6.5830&#x2F;sched.php<p>I would love to extend this list with more great courses, any suggestions? (Bonus points for hands-on courses involving probabilistic ML, NUMA or LLVM!)
null
3
0
[ 42017557 ]
null
null
null
null
null
null
null
null
null
train
42,017,271
321k
2024-11-01T14:32:20
Most popular BI tools for Fintechs in 2024
null
https://erikedin.com/2024/10/31/the-most-popular-bi-tools-for-fintechs-in-2024/
1
0
null
null
null
null
null
null
null
null
null
null
train
42,017,281
Pooge
2024-11-01T14:33:34
Ask HN: Beginner Blogger Looking for "Proofreaders"
Hello everyone, I&#x27;m hosting my own blog and starting to write. However, I don&#x27;t feel confident publishing without having at least a few people&#x27;s opinions.<p>Considering many HN users are often reading blogs, articles or essays I thought it would be a fine place to ask for help. I would like to get in touch with some people that would kindly proofread my work and give honest opinions. My first article is only a 5-minute read but after receiving opinions I might rewrite it or, who knows, discard it.<p>Anyway, I&#x27;m a noob writer asking for help from fellow readers or writers!<p>Please get in touch with me via my email address (see my profile).
null
1
3
[ 42019216, 42017773 ]
null
null
null
null
null
null
null
null
null
train
42,017,296
cxr
2024-11-01T14:34:52
Notes for an annotation SDK (2021)
null
https://blog.jonudell.net/2021/09/03/notes-for-an-annotation-sdk/
21
1
[ 42021101, 42018163 ]
null
null
null
null
null
null
null
null
null
train
42,017,312
napsterbr
2024-11-01T14:35:47
Avoiding recompilation hell in Elixir with mix xref
null
https://r.ena.to/blog/avoiding-recompilation-hell-in-elixir-with-mix-xref/
38
0
[ 42051307 ]
null
null
null
null
null
null
null
null
null
train
42,017,338
rbanffy
2024-11-01T14:38:47
What is happening with Boeing's Starliner spacecraft?
null
https://arstechnica.com/space/2024/11/nearly-two-months-after-starliners-return-boeing-remains-mum-on-its-future/
1
0
[ 42017553 ]
null
null
no_error
What is happening with Boeing’s Starliner spacecraft?
2024-11-01T11:15:26+00:00
Eric Berger
Boeing's Starliner spacecraft safely landed empty in the New Mexico desert about eight weeks ago, marking a hollow end to the company's historic first human spaceflight. The vehicle's passengers during its upward flight to the International Space Station earlier this summer, Butch Wilmore and Suni Williams, remain in space, awaiting a ride home on SpaceX's Crew Dragon. Boeing has been steadfastly silent about the fate of Starliner since then. Two senior officials, including Boeing's leader of human spaceflight, John Shannon, were originally due to attend a post-landing news conference at Johnson Space Center in Houston. However, just minutes before the news conference was to begin, two seats were removed—the Boeing officials were no-shows. In lieu of speaking publicly, Boeing issued a terse statement early on the morning of September 8, attributing it to Mark Nappi, vice president and program manager of Boeing's commercial crew program. "We will review the data and determine the next steps for the program," Nappi said, in part. And since then? Nothing. Requests for comment from Boeing have gone unanswered. The simple explanation is that the storied aviation company, which has a new chief executive named Kelly Ortberg, remains in the midst of evaluating Boeing's various lines of business. Figuring out what to do with Starliner "There are probably some things on the fringe there that we can be more efficient with, or that just distract us from our main goal here. So, more to come on that," Ortberg said during his first quarterly earnings call last week. "I don't have a specific list of things that we're going to keep and we're not going to keep. That's something for us to evaluate, and the process is underway." Also last week, The Wall Street Journal reported that Boeing is considering putting some of its space businesses, including Starliner, up for sale. This suggests that if Boeing can get a return on its investment in Starliner, it probably would be inclined to take the money. To date, the company has reported losses of $1.85 billion on Starliner. As a result, Boeing has told NASA it will no longer bid on fixed-price space contracts in the future.
2024-11-08T02:06:59
en
train
42,017,339
ruckfool
2024-11-01T14:38:51
null
null
null
1
null
[ 42017550 ]
null
true
null
null
null
null
null
null
null
train
42,017,340
superlucky84
2024-11-01T14:38:51
null
null
null
1
null
[ 42017341 ]
null
true
null
null
null
null
null
null
null
train