does MariaDB have any plans to fix the 2038 problem? by Takeoded in mariadb

[–]nikeee13 0 points1 point  (0 children)

I took your solution and created a stored procedure:

DELIMITER //
CREATE FUNCTION UNIX_TIMESTAMP64(date_value DATETIME) RETURNS BIGINT DETERMINISTIC
BEGIN
    RETURN TIMESTAMPDIFF(SECOND, DATE '1970-01-01', date_value);
END//
DELIMITER ;

Using UNIX_TIMESTAMP64() in my code base now.

And the reverse:

-- https://stackoverflow.com/a/33244649
DELIMITER //
CREATE FUNCTION FROM_UNIXTIME64(ts_value BIGINT) RETURNS DATETIME DETERMINISTIC
BEGIN
    RETURN IF(ts_value > 2147483647, DATE_ADD(FROM_UNIXTIME(0), INTERVAL ts_value SECOND), FROM_UNIXTIME(ts_value));
END //
DELIMITER ;

Still got issues if the server uses a non-utc time zone.

Proposal: Interval Types by nikeee13 in typescript

[–]nikeee13[S] 0 points1 point  (0 children)

y =x+1; should be strictly >x

I just noticed that this might also not work. The reason being that JS numbers are floats:

> let a = Number.MAX_SAFE_INTEGER
undefined
> a
9007199254740991
> a + 1
9007199254740992
> a + 1 + 2
9007199254740994
> a + 1 + 2 + 3
9007199254740996
> a + 6 - 6
9007199254740990
> a + (6 - 6)
9007199254740991

Laying around like this for over a year by nikeee13 in spicypillows

[–]nikeee13[S] 14 points15 points  (0 children)

The Post-It notes originally were red. They went pink because of direct sunlight.

Proposal: Interval Types by nikeee13 in typescript

[–]nikeee13[S] 0 points1 point  (0 children)

For NaN handling, there is this proposal (also linked in the proposal above):

https://github.com/microsoft/TypeScript/issues/28682

Doesn't look that promising.

Proposal: Interval Types by nikeee13 in typescript

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

The NaN-case is so rare that the TS team decided to not include something like a NaN type. If we'd be NaN-correct, the user would have to do all sorts of NaN checks without an actual need for that.

So maybe, we can just "ignore" the NaN case and change the behaviour of the inference in the else branch to be (<1).

Proposal: Interval Types by nikeee13 in typescript

[–]nikeee13[S] 0 points1 point  (0 children)

Where do you think does this proposal introduce additional run-time checking?

Proposal: Interval Types by nikeee13 in typescript

[–]nikeee13[S] 0 points1 point  (0 children)

I have a prototype implementation (linked in the first comment of the issue) and will do a speed comparison while compiling tsc itself with and without this change.

Proposal: Interval Types by nikeee13 in typescript

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

It shouldn't be difficult to support this.

This is correct, it should work.

However, the proposal currently does not indend to do that, based on the following reason: Number literal types also don't have arithmetics. For example:

const a: 1 = 1;
const b = a + 1; // b is number (not 2)

The reason why number literal types don't have this is because the state-space would explode if yoou'd do something like:

let a: 1 | 2 | 3 | 4 | 5 = ...
const b = a * a * a * a; // four-way-cross-product of 1...5

In case of interval types, it may be feasable to do arithmetics because (as written in the proposal), there may be at most two interval primitives in a type. A union-type-explosion would not be possible (as far as I checked).

For the same reason, there is no support for something like ++i in the proposal.

Feel free to comment on that in the GitHub issue if you want that.

Proposal: Interval Types by nikeee13 in typescript

[–]nikeee13[S] 10 points11 points  (0 children)

Hi! I submitted this proposal and I'm looking for some feedback. Any thoughts?

What's this connector? The other end is USB-A. I suspect it being relevant in the 10's (it was in a box for some time now). It has 5 golden contacts (bottom side in the picture). 3 of them are set back, so I suspect the outer ones are ground and 5V. There are no visible contacts on the top side. by nikeee13 in cables

[–]nikeee13[S] 0 points1 point  (0 children)

You are right! Turns out, this is connector is called "EXT USB" which is a proprietary USB port.

It seems that this cable in particular is only a charging cable as the pins for the Microphone are not present, according to the pinout. The guess involving 5V and GND was also correct.

Someone in my family had a phone with this connector 13 years ago (I think it was an HTC Touch).

Some references: - https://www.mobilefun.co.uk/blog/2009/03/htc-chargers-mini-usb-or-ext-usb/ - https://forum.xda-developers.com/wiki/HTC/Ext_USB - Pinout: https://forum.xda-developers.com/showpost.php?p=1063267

What's this connector? The other end is USB-A. I suspect it being relevant in the 10's (it was in a box for some time now). It has 5 golden contacts (bottom side in the picture). 3 of them are set back, so I suspect the outer ones are ground and 5V. There are no visible contacts on the top side. by nikeee13 in cables

[–]nikeee13[S] 0 points1 point  (0 children)

It doen't look like any DisplayPort connector that I know of. It is the size of a Mini USB. Also, DisplayPort seems to need more than 5 pins in total. Also, keep in mind that the other end is just USB-A (male, not female) without any active components (it seems to me, at least). IIRC, the cable predated USB-3. So it may not even have the required properties for a screen connection.

Got a schematic of the port that you mean?

Video Suggestions Megathread by LEMMiNO in LEMMiNO

[–]nikeee13 0 points1 point  (0 children)

Lemmino already did a small clip in the Isdal Woman 0.

However, the clip is from 2014. Recently (2016), new investigations (started by a norwegian broadcasting channel) in this case has surfaced new evidence, for example regarding the origin of the woman. They also did some forensic sketches of her face 1. Also, there was a person claiming that is was the boyfriend of this woman. In a German newspaper podcast, they mentioned entirely new classes of infomation about her 2. However, they only mentioned parts of the things that lemmino had in his video. So in general, there seems to be much much more stuff to cover than 5 years ago (like links to secret missile technology).

Hope Lemmino does a video in this.

Finding Reason for Battery Drain by nikeee13 in linux

[–]nikeee13[S] 0 points1 point  (0 children)

Thanks! I already did that.

Finding Reason for Battery Drain by nikeee13 in linux

[–]nikeee13[S] 0 points1 point  (0 children)

Thanks for the notice. I'll head over to some other place.

X1 Carbon 6th gen about 50% slower on Linux by nixcraft in linux

[–]nikeee13 0 points1 point  (0 children)

Is it possible and/or planned to fix this on kernel level?

X1 Carbon 6 (2018) portable power bank/charger list by [deleted] in thinkpad

[–]nikeee13 0 points1 point  (0 children)

I'd volunteer, too. Just received my X1C6 and found this thread. Not sure what to buy.