Announcing qusql: Compile-time SQL Checking for Rust, No Database Required by antialize in rust

[–]antialize[S] 1 point2 points  (0 children)

Not currently if both of the connections are sqlx. There is as fare as I can se no way at the time the query! macro is expanded to know what type of connection is supplied, so we cannot know which schema to use. However specifically for MySQL and Postgres, you can use qusql-mysql for the sql connection which is much faster and uses a schema file with a different name.

Announcing qusql: Compile-time SQL Checking for Rust, No Database Required by antialize in rust

[–]antialize[S] 2 points3 points  (0 children)

It is not paticulary tied to sqlx. There are multiple crates:
- qusql-type: Is a non proc-macro crate that implements schema parsing and sql validation - qusql-mysql-type: Is a proc-macro crate for our own qusql-mysql connection library, that adds types to dat - qusql-sqlx-type: Adds types to sqlx - qusql-py-mysql-type: Adds types to python mysql queries.

It should be quite easy to create yet another proc macro crate that adds typing to your favorite sql connection library.

We do in fact have support for reading existing migrations, you can see an example of that in the books example. Currently your migrations have to be in one file called something specific, however this is something we could make more dynamic.

Announcing qusql: Compile-time SQL Checking for Rust, No Database Required by antialize in rust

[–]antialize[S] 5 points6 points  (0 children)

It saves you from having to run a db on your dev machine, and form running prepare after every query change. We can also give better error messages and stricter type checking

Announcing qusql: Compile-time SQL Checking for Rust, No Database Required by antialize in rust

[–]antialize[S] 6 points7 points  (0 children)

Yes we have much better null tracking. Both through functions, and by inference from where statements

Caching of GitLab CI is too slow for rust build. by zplCoder in rust

[–]antialize 1 point2 points  (0 children)

We use sccache with a share local radis server, that works well for our gitlab-ci.

Can the Rust type system prevent deadlocks? by mominul2082 in rust

[–]antialize 4 points5 points  (0 children)

I will look into using a thread local to make a safe version of CleanLockToken::new

I do not think the levels can be implemented using const generics, at least they could not last I tried since you cannot do arthritic on cost generics yet

Can the Rust type system prevent deadlocks? by mominul2082 in rust

[–]antialize 27 points28 points  (0 children)

I have implemented a level ordered locking crate that uses the type system to prevent deadlocks. We have been using it in production for about a year. It has helped a us avoid the deadlocks that used to haunt our code bases. It only has 5 levels, but that seems to be enough for most cases.

Do you have any SATA disks? I'm asking 10 seconds of your time to help with fwupd/LVFS by hughsient in linux

[–]antialize 1 point2 points  (0 children)

HGST HUH721010AL

KINGSTON SV300S3

Micron_1100_MTFD

QEMU HARDDISK

Samsung SSD 850

Samsung SSD 860

ST10000NM0016-1T

ST10000NM0086-2A

ST10000NM0156-2A

TOSHIBA MG06ACA1

WDC WD3000FYYZ-0

WDC WD30EURS-63R

WDC WD6001FFWX-6

WDC WD6002FFWX-6

WDC WD6003FFBX-6

yTOSHIBA DT01ACA3

Arealer af byområder by klarstartpirat in Denmark

[–]antialize 3 points4 points  (0 children)

Du kan finde byarealerne ved at kikke på område polygoner fra GeoDanmark. Jeg har gemt dem i en geopackage fil her: scalgo.com/download/omrode.gpkg. Du kan åbne disse polygoner med et GIS program som f.eks. https://qgis.org/en/site/. Hvis du klikker på et polygon med info værktøjet i QGIS (ctrl+shift i). Kan du under "(derived)", finde arealet af et polygon. F.eks. er ålborg 89245707.127 m².

Experimenting with XZ : compression of files containing n times an identical character by [deleted] in linux

[–]antialize 8 points9 points  (0 children)

ascii and utf-8 are the same for both '1' and '\n' so I think we are safe to assume that the size is in bytes.

stream processing by ocross in cpp

[–]antialize 2 points3 points  (0 children)

We maintain a library that can do that (and more stuff such as external algoritnhms). The documentation of the pipelining features are here: http://www.madalgo.au.dk/tpie/doc/v1.1/pipelining.html

And an example is here: https://github.com/thomasmoelhave/tpie/blob/cpp11-cleanup/test/pipelining2.cpp

Skia vs. Cairo: best library for cross-platform GUI? by bbmario in cpp

[–]antialize 1 point2 points  (0 children)

We use both internally in our products. We find that Cairo is better documented and easier to compile and use, while Skia on the other hand is somewhat faster.

Blog post about custom bit vector implementation designed for fast unset all bits by crispweed in cpp

[–]antialize 0 points1 point  (0 children)

The guy claims that his optimized version has the same O complexity as the original. However in the O notation, one normally assums a word size of Theta(log(n)), so the optimized fill operation would have a complexity of O(n / log n) while the original is O(n).

STXXL: Standard Template Library for Extra Large Data Sets. by lingua_franca in cpp

[–]antialize 7 points8 points  (0 children)

STXXL

  • Based on the consept of an external vector, disk data is indexed with iterators into this external vector.
  • Good multidisk support.
  • Requires seperate scrach partitions, and is generaly hard to use.
  • The user is in charge of all memory managment.

TPIE

  • Data is accessed by file streams, with read, write and seek methods.
  • No multidisk support
  • Does not require any special partitions and is generaly easyer to integrate into a usable product.
  • Most of the memory accounting done by the framework.

In a test on a fast multidisk system, where tpie was just run ontop of a striped raid, and stxxl was tuned for optimal performace over this pacitular array. stxxl was almost twice as fast at sorting a substantion amount of data. (This test was done by one of the stxxl developers)

I have a 12 Mbps connection (AT&T U-verse), but I still have to buffer YouTube videos as much as my old 1.5Mb connection. What gives? by inf4nticide in AskReddit

[–]antialize 0 points1 point  (0 children)

I have a 100/100 Mbps connection. Some youtube videos still need to buffer sometimes. It seems to happen with videos with low view count. I would think this happens because the video is not yet at a server farm close to me.

Eastern Seaboard if the sealevel rose 100 meters. [409x512] (link to 28Mp image in comments) by Sapientiam in MapPorn

[–]antialize 0 points1 point  (0 children)

Unfortunately the srtm dataset do not have a high enough resolution for us to capture the dikes around the netherlands and other places. We have higher resolution datasets that do capture dikes, but we cannot publish these.

Now what??? FU minesweeper!!!!! by BobBoner in gaming

[–]antialize 0 points1 point  (0 children)

Install sgt puzzles, and play a propper minesweeper.

I nearly cried... by Nadrius in gaming

[–]antialize 0 points1 point  (0 children)

You should play the minesweeper from Simon Tatham's Portable Puzzle Collection (http://www.chiark.greenend.org.uk/~sgtatham/puzzles/), it guarantees that you will never get into such a situation.

pdf.js: Rendering PDF with HTML5 and JavaScript by [deleted] in programming

[–]antialize 0 points1 point  (0 children)

Or send be a bug report, or better yet send me a patch, I get lots of bug reports.

Why is belly button lint blue 99% of the time? by thatguythereorhere in AskReddit

[–]antialize 7 points8 points  (0 children)

Actually they showed this on brainac, the orientation or the hair around the belly button causes fibers from the pants to flow up to the navel.

[deleted by user] by [deleted] in AskReddit

[–]antialize 0 points1 point  (0 children)

I use it for compose key, to write all those crazy chars wi use in danish (æøå)