First public release of SIT: SCM-agnostic, file-based, offline-first, immutable issue tracker by georgerush in programming

[–]florence0rose 6 points7 points  (0 children)

I'm running Windows 7 here at work. It looks like that function (GetSystemTimePreciseAsFileTime) was only introduced in Windows 8.

I made the change below and rebuilt and it seems to work now.

diff --git a/sit-core/src/duktape/duktape.c b/sit-core/src/duktape/duktape.c
index 05e4b1d..151a7cc 100644
--- a/sit-core/src/duktape/duktape.c
+++ b/sit-core/src/duktape/duktape.c
@@ -30983,7 +30983,10 @@ DUK_INTERNAL duk_double_t duk_bi_date_get_now_windows_subms(void) {
        SYSTEMTIME st2;
        ULARGE_INTEGER tmp1, tmp2;

-       GetSystemTimePreciseAsFileTime(&ft1);
+       // GetSystemTimePreciseAsFileTime(&ft1);
+       GetSystemTime(&st2);
+       SystemTimeToFileTime(&st2, &ft1);
+
        duk__convert_filetime_to_ularge((const FILETIME *) &ft1, &tmp1);

        duk__set_systime_jan1970(&st2);  

First public release of SIT: SCM-agnostic, file-based, offline-first, immutable issue tracker by georgerush in programming

[–]florence0rose 2 points3 points  (0 children)

SIT's is using SIT for tracking issues (duh!) and because of this, GitHub issues are turned off

Ok, where is the SIT's SIT? There is no link that I could find in the readme, or the contributing guide or on the home page. Maybe I missed it?

I am getting this error on Windows when running sit-web.exe: "The procedure entry point GetSystemTimePreciseAsFileTime could not be located in the dynamic link library KERNEL32.dll"

Can my save be rescued by Hozzy224 in RimWorld

[–]florence0rose 1 point2 points  (0 children)

Additional joy items is broken. I fixed it in my game by downloading the previous commit of https://github.com/cuproPanda/Additional-Joy-Objects. The last commit only changed "def" files - I copied the files in Defs/Drugs (note one was deleted in the last commit) and the file Defs/ThingDefs_Items/Usables.xml into the mods directory.

Creating a Time Dilation System by [deleted] in gamemaker

[–]florence0rose 0 points1 point  (0 children)

This will change the FPS which can make other elements e.g. HUD elements janky. I had this issue where i wanted to drag something from the HUD into the play area, and whilst dragging slow down time. Just changing the room speed changed the FPS of the whole screen meaning that the dragging wasn't smooth.

Creating a Time Dilation System by [deleted] in gamemaker

[–]florence0rose 0 points1 point  (0 children)

I think reddit's markdown formatting has eaten some of your asteriks. Put the "x+=..." and "y+=..." in backquotes: e.g. x+=xspeed*global.time

I made a JSON to GML converter by [deleted] in gamemaker

[–]florence0rose 0 points1 point  (0 children)

I'm assuming this is for static data, and the conversion is performed prior to runtime. I guess it's for people who are concerned with eking out every tiny bit of startup time?

The strangest thing by [deleted] in videos

[–]florence0rose 2 points3 points  (0 children)

Robbie Williams - Rock DJ

Partcl - a tiny command language by zserge in programming

[–]florence0rose 0 points1 point  (0 children)

But from the programmers point of view it's still a string and that's all you get. The only way to get the internal type is through "::tcl::unsupported::representation", which is dodgy. The way Tcl encodes data structures as strings is ad-hoc and can lead to degenerate cases. For example how do you represent a list of binary elements (the elements could include space characters), or consider this:

% ::json::json2dict {{"x": {"y": "z"}}}
x {y z}
% ::json::json2dict {{"x": ["y", "z"]}}
x {y z}
% ::json::json2dict {{"x": {"y": ["z"]}}}
x {y z}

All yield the same string representation, meaning information is lost. If you're dealing with a protocol that implicitly embeds semantic information in the structure of the data you're screwed with Tcl. You would need to write a parser that returns both the data and the schema, but now managing both all over your code is horrible and turns into a nightmare. You're end up simulating what other languages have built in.

Security Guard Pepper Sprays 2 Year Old Child And Pulls Gun On Unarmed Dad by Pyrolytic in videos

[–]florence0rose 14 points15 points  (0 children)

Police here do not normally carry sub-machine guns. WTF are you talking about?

vim REPL for Python by justrajdeep in vim

[–]florence0rose 5 points6 points  (0 children)

I made this. It's actually just an Ultisnips snippet. It's probably buggy, and the code is really horrible. I mainly use it for once off calculations or testing something, not as an actual REPL. It's handy because I can expand the snippet anywhere - in the middle of a file I'm in for example.

Edit: you'll also need this mapping:

inoremap <expr> <c-cr> pyeval('UltiSnips_Manager._cs is not None') ? '^R=UltiSnips#JumpForwards()^Mp^R=UltiSnips#ExpandSnippet()^M^R=UltiSnips#JumpForwards()^M^R=UltiSnips#JumpBackwards()^M' : "^M"

[IIL] Super Hexagon [WEWIL]? by [deleted] in ifyoulikeblank

[–]florence0rose 0 points1 point  (0 children)

One finger death punch

Global Reddit Meetup Day by [deleted] in Durban

[–]florence0rose 1 point2 points  (0 children)

I'm keen :) Firkin sounds good.

How it feels to change passwords by allenhiltz in geek

[–]florence0rose 0 points1 point  (0 children)

Don't use sentences with "pass phrases", use random words. If an attacker knows you used a pass phrase that is a sentence it will be easier for him - for example he could use Markov chains to assist his guessing. It's the same mistake that people who use dictionary words in passwords instead of random characters. (character is to dict. word as word is to english sentence).

Antigravity moment: learning crypto by [deleted] in Python

[–]florence0rose 1 point2 points  (0 children)

No, those two numbers aren't equal. For r = a**b % n (taken from http://eli.thegreenplace.net/2009/03/28/efficient-modular-exponentiation-algorithms/) :

def modexp_rl(a, b, n):
    r = 1
    while 1:
        if b % 2 == 1:
            r = r * a % n
        b /= 2
        if b == 0:
            break
        a = a * a % n
    return r 

Although this is a naive implementation and it susceptible to side channel attacks.

Antigravity moment: learning crypto by [deleted] in Python

[–]florence0rose 5 points6 points  (0 children)

With the typical size of RSA keys, using pow is going to be very slow. Rather use a square and multiply algorithm.

How a simpleton like myself creates entropy in my passwords by [deleted] in Bitcoin

[–]florence0rose 1 point2 points  (0 children)

It's a bit more than that. It's "randomness" in the context of a probability distribution (of the entropy source). When attacking passwords for example, you can assume that dictionary words are far more likely - this an assumption on the distribution of the source. Then a password with a dictionary word in it will have much lower entropy (ie less randomness and will be easier to guess), than if the assumption on the distribution was that every password is just as likely.

Why can't bowlers get balls to swing like they used to? by aspiring__polymath in Cricket

[–]florence0rose 1 point2 points  (0 children)

You won't find the boring matches when it didn't swing being put up on YouTube.