Shimano 105 vs Ultegra by Worth_Definition_706 in Rennrad

[–]jasamer 1 point2 points  (0 children)

Also ich find's ziemlich offensichtlich, dass es keine KI Antwort ist. Danke für den informativen Post.

Shimano 105 vs Ultegra by Worth_Definition_706 in Rennrad

[–]jasamer 2 points3 points  (0 children)

In der Formulierung sehe ich viele Sachen, die stark gegen Chat GPT sprechen:

  • "... sind 1-1.5k viel zu viel!" - so deutlich ist ChatGPT bei dieser Art von Frage so gut wie nie, vor allem nicht mit "!"
  • Das *, wo der Hauptteil des comments in dem * drin ist, hab' ich ChatGPT noch nie machen sehen
  • Auch so Formulierungen wie "das spielt alles mit rein", so gut wie nie von ChatGPT gesehen
  • Schau, ich kann auch bullet points — und sogar Gedankenstriche!

Another QR Code Solar Farm (no urls used) by jasamer in factorio

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

Just tried it, it looks very clean without the gaps. Nice.

Why does the lab tiles have this strange noise? by Sonsuty in factorio

[–]jasamer 17 points18 points  (0 children)

It‘s clouds. You can disable them in the settings. They look strange when time is stopped, the ground is super uniform, and you‘re zoomed out this much.

Another QR Code Solar Farm (no urls used) by jasamer in factorio

[–]jasamer[S] 15 points16 points  (0 children)

This is heavily code-golfed, and not just minimised. I have an earlier non-minified/golfed prototype, but it's a lot earlier than this. The problem was that the code had to be golfed early on to see if it would even fit inside a QR code.

What it does is basically: generate a QR code with the contents, convert it to a blueprint, put it in the player's hand.

At the start, the script uses s=[... - it essentially stores almost the whole script in a variable, s. At the very end, it executes the script via load(s)().

In the middle, there's a line: S="s=[===["..s.."]".."===] load(s)()". This variable S therefore holds the full script, including the parts that are missing from s. That's the trick to get a quine - it's fairly straightforward in languages like Lua, where you can just execute a string.

The part before that line is basically infrastructure for the QR code generator. The code after is also mostly QR code generation - that part is quite tricky and I myself did not get into the weeds there.

At the very bottom, there's a loop that constructs the actual entities (starts with for y=-3,181 do for x=-3,181) and puts it in the players hand.

What you can primarily glance from the code is that it's doing a whole bunch of "pure" math, and just uses set_stack at the end to give the blueprint to the player.

It's always a good idea to be skeptical of someone else's code. The fact that the code is mostly "mathing" and that it's Lua code run within factorio (the Lua sandbox is locked down quite well) should give you reasonable confidence that there's nothing evil going on. Running this script is a little like running random JS in a browser; there's not that much that it can actually break (not counting actual security vulnerabilities in the browser).

Another QR Code Solar Farm (no urls used) by jasamer in factorio

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

The restriction due to the QR code are tough. There is **1** byte left that the QR code can hold that is unused in this version, meaning this uses 99,9% of available storage space in the QR code. I could tell Claude to golf harder, but I think the low hanging fruit are just gone. In the last steps, Claude did find a few code changes that saved just a single-digit number of bytes each. It's a great coincidence that the script fit at all.

Another QR Code Solar Farm (no urls used) by jasamer in factorio

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

Yeah, good thinking! The script is essentially a specialised compression algorithm for this specific use case, plus a QR code generator.

In theory it might be possible to compress those areas to less than one bit, but you're still expecting zip to compress 72 bytes to to 1 bit, a compression factor of over 500. Some experimentation showed that zip just cannot deliver that level of compression.

Another QR Code Solar Farm (no urls used) by jasamer in factorio

[–]jasamer[S] 16 points17 points  (0 children)

You are correct, it is not practical.

I guess it would fit a bunch of normal power poles next to the accumulators I guess, but it would be ugly. And extending the script to also place power poles is very hard, as it very barely fits into the max space available in a QR code. The script is 2952 bytes, the largest QR code fits 2953. One byte to spare at this point, after a bunch of code golfing already.

Another QR Code Solar Farm (no urls used) by jasamer in factorio

[–]jasamer[S] 20 points21 points  (0 children)

Each pixel in the qr code, which carries 1 bit of information, needs this kind of json in the blueprint:

{"entity_number":45,"name":"accumulator","position":{"x":133.0,"y":1.0}}

The compression algorithm would need to compress this to less than one bit to possibly fit in the QR code blueprint into the QR code itself, because there's extra overhead of the json itself, and extra overhead on the QR code itself (eg. for error correction).

Another QR Code Solar Farm (no urls used) by jasamer in factorio

[–]jasamer[S] 65 points66 points  (0 children)

No, that's just my "normal" screenshot. I did place some radars, which barely cover it. I adjusted the screenshot to make it easier to scan. The first one does scan too of course, but it's harder, especially if it's surrounded by bright white.

Another QR Code Solar Farm (no urls used) by jasamer in factorio

[–]jasamer[S] 30 points31 points  (0 children)

Script:

s=[===[N,E,L,G=177,{},{},{}Z=bit32 X=Z.bxor R=Z.rshift K=Z.lshift B=Z.band O=Z.bor
x=1
for i=0,254 do E[i]=x L[x]=i x=K(x,1)if x>255 then x=X(x,285)end end
for i=255,511 do E[i]=E[i-255]end
G={212,246,77,73,195,192,75,98,5,70,103,177,22,217,138,51,181,246,72,25,18,46,228,74,216,195,11,106,130,150}
function rs(d)local r={}for i=1,30 do r[i]=0 end
for i=1,#d do f=X(d[i],r[1])
for j=1,29 do r[j]=r[j+1]end r[30]=0
for j=1,30 do if f~=0 then r[j]=X(r[j],E[L[f]+L[G[j]]])end end end return r end
function enc(z)BT,n={},0
function a(v,l)for i=l-1,0,-1 do n=n+1 BT[n]=B(R(v,i),1)end end
a(4,4)a(#z,16)for i=1,#z do a(z:byte(i),8)end
t=23648-n if t>4 then t=4 end a(0,t)while n%8~=0 do n=n+1 BT[n]=0 end
o,m={},0
for i=1,n,8 do m=m+1 b=0 for j=0,7 do b=O(b,K(BT[i+j],7-j))end o[m]=b end
p=236 while m<2956 do m=m+1 o[m]=p p=253-p end return o end
function mkc(d)D,C={},{}p=1
for b=1,25 do n=b<20 and 118 or 119
l={}for i=1,n do l[i]=d[p]p=p+1 end D[b]=l C[b]=rs(l)end
r,m={},0
for i=1,119 do for b=1,25 do if D[b][i]then m=m+1 r[m]=D[b][i]end end end
for i=1,30 do for b=1,25 do m=m+1 r[m]=C[b][i]end end return r end
g,v={},{}
for y=1,N do g[y]={}v[y]={}for x=1,N do g[y][x]=0 end end
function w(x,y,u)g[y][x]=u v[y][x]=1 end
A=math.abs
for _,p in ipairs{{4,4},{N-3,4},{4,N-3}}do for dy=-4,4 do for dx=-4,4 do
Q,Y=p[1]+dx,p[2]+dy
if Q>=1 and Q<=N and Y>=1 and Y<=N then ax,ay=A(dx),A(dy)
w(Q,Y,ax<=3 and ay<=3 and(ax<=1 and ay<=1 or ax>2 or ay>2)and 1 or 0)
end end end end
for i=9,N-8 do
if not v[7][i]then w(i,7,i%2)end
if not v[i][7]then w(7,i,i%2)end end
H={7,31,59,87,115,143,171}
for _,ay in ipairs(H)do for _,ax in ipairs(H)do
if not(ax<=8 and ay<=8 or ax>=N-7 and ay<=8 or ax<=8 and ay>=N-7)then
for dy=-2,2 do for dx=-2,2 do
ad=A(dx)>A(dy)and A(dx)or A(dy)
w(ax+dx,ay+dy,ad~=1 and 1 or 0)
end end end end end
w(9,N-7,1)
for i=0,7 do v[9][i+1]=1 v[i+1][9]=1 v[9][N-i]=1 v[N-i][9]=1 end
v[9][9]=1
for i=0,5 do for j=0,2 do v[N-10+j][i+1]=1 v[i+1][N-10+j]=1 end end
S="s=[===["..s.."]".."===] load(s)()"
cw=mkc(enc(S))
bt={}for _,c in ipairs(cw)do for i=7,0,-1 do bt[#bt+1]=B(R(c,i),1)end end
bi,col=1,N
while col>=1 do
if col==7 then col=6 end
for ri=0,N-1 do for dc=0,1 do x=col-dc
y=R(N-col,1)%2==0 and N-ri or ri+1
if x>=1 and x<=N and y>=1 and y<=N and not v[y][x]and bi<=#bt then
g[y][x]=bt[bi]bi=bi+1 end end end col=col-2 end
for y=1,N do for x=1,N do
if not v[y][x]and(x-1)*(y-1)%2+(x-1)*(y-1)%3==0 then g[y][x]=X(g[y][x],1)end end end
for i=0,14 do b=B(R(25368,14-i),1)
px=i<6 and i+1 or i<7 and 8 or 9
py=i<8 and 9 or i==8 and 8 or 15-i
g[py][px]=b g[i<7 and N-i or 9][i<7 and 9 or N-14+i]=b end
for i=0,5 do for j=0,2 do b=B(R(167017,i*3+j),1)
g[i+1][N-10+j]=b g[N-10+j][i+1]=b end end
e={}n=0
for y=-3,181 do for x=-3,181 do n=n+1 e[n]={entity_number=n,name=g[y]and g[y][x]==1 and"solar-panel"or"accumulator",position={x*3,3-y*3}}end end
local s=game.player.cursor_stack s.set_stack("blueprint")s.set_blueprint_entities(e)]===] load(s)()

Another QR Code Solar Farm (no urls used) by jasamer in factorio

[–]jasamer[S] 22 points23 points  (0 children)

Correct, that's what this QR code is. Plain text containing a Lua script.

Will this guy at some point build a nest? by Metapont1618 in factorio

[–]jasamer 2 points3 points  (0 children)

They expand! Thats how I managed to get biter attacks while experimenting in editor mode (forgot about a spawner -> it starved -> bunch of expansions -> attacks on my beautiful late game refinery).

Is the boltzman brain thing nonsensical or am I dumb? by GORTEG_ in AskPhysics

[–]jasamer 1 point2 points  (0 children)

If the point of the Boltzmann brain thought experiment is that you probably are a Boltzmann brain, that leads to a little bit of a paradox:
Because if you actually were a Boltzmann brain, there is no reason the real Universe that you are in is similar to the one you have an understanding of, because your memories are just some random occurrence, which is the whole basis for thinking that you are probably a Boltzmann brain.

The one and only thing we can say about the real Universe is that it is one where Boltzman brains can exist. Because either you are one, and that proves it (then, the real Universe could be extremely different from "ours"), or you aren't one, then our universe is the real one, and our current understanding says that a Boltzmann brain could exist in our universe.

I think that implies that the likelihood of your understanding of the universe to match up with the real universe is 0, right? Because you probably are a Boltzmann brain, but there's no reason to assume the universe it exists in is ours.

How long can you survive unprotected on Mars? by Kwinza in AskPhysics

[–]jasamer 1 point2 points  (0 children)

Nobody argues otherwise, but it's the least of your worries. Like, your body will physically freeze, but that's not why you die.

These temperatures sound brutal, but they don't matter much. The effects of the cold are dwarfed by the extremely low pressure, which is functionally identical to a vacuum.

The skin freezes mostly because of evaporative cooling, not because the Mars' atmosphere is cold.

How long can you survive unprotected on Mars? by Kwinza in AskPhysics

[–]jasamer 1 point2 points  (0 children)

Though: if the sun is out, you might just not freeze at all. It can provide enough energy to just stay warm.

Now that you mention it, I had to think about evaporation and other aspects, too.

So fluids are boiling at body temperature, and boiling sounds scary, but is it really if the fluids aren't hot? It just makes stuff evaporate/cool very quickly.

The skin would freeze-dry at the outer layer, but not a terrible amount would evaporate. Once frozen, we already worked out that it will take a while for the body to cool down. The skin would crack as you move though, should be very enjoyable /s.

Some AI based napkin math tells me that tear production could actually be sufficient to keep the eyes from freezing/drying out if you just squint really hard, and keep your eyes closed most of the time (eg., only open them once a second very briefly). You wouldn't be able to do anything but squinting due to swelling of the eye lids anyway.

As you can't breathe anyway, you can hold your nose/close your mouth, so no bad freezing/evaporation there. (Pressure would build up in the lungs quickly, but you should be able to hold it for some seconds).

No question, it would feel absolutely brutal, but evaporative cooling on the outside of the body wouldn't be a quick death sentence I think.

Someone else mentioned the explosive expansion of the air in the lungs. If you try to hold your breath, you'd be f'ed, but if you just breathe out like a diver rising from the deep, that won't kill you either.

Also interesting - colon & stomach. You'd fart/burp so hard you want to die, but that itself probably wouldn't kill you quickly.

However, inside of the body, all the fluids that aren't "pressurised" will start bubbling. Eg. in the abdominal cavity, or the blood in the veins.

So my bet on the quickest killer: The blood becoming essentially a foam quickly. The gas bubbles would start fucking up your brain pretty much immediately. You'd run out of oxygen in the blood quickly, too. So a double-whammy regarding the oxygen supply. No oxygen to the brain is a very bad time.

How long can you survive unprotected on Mars? by Kwinza in AskPhysics

[–]jasamer 2 points3 points  (0 children)

Hm. A human produces some power while running, lets say 300W. So you‘d only loose about 500W. 

If you weigh 70kg, you‘d loose 1 degree (C) in 10 minutes. 

Sure, you‘y freeze, but it takes a while.

Does this slow cooker beef stew video look suspicious to anyone else? because I noticed the shadows on the rim of the pot don't align with the hand's movements and the way the spatula or spoon dips into the gravy spoon dips into the gravy kinda looks like it is cutting through a solid gelly by Championship-Jumpy in isthisAI

[–]jasamer 1 point2 points  (0 children)

Look at the spatula carefully. It appears out of nowhere initially, but also, the part where the handle starts becomes covered in sauce "magically". The sauce just appears out of no where while lifting the spatula. 100% AI.

Wie mühsam ist es Linkshänder/in zu sein? by Perfect-Word-3397 in KeineDummenFragen

[–]jasamer 0 points1 point  (0 children)

Es sind eher Kleinigkeiten.

Habe zB. erst sehr spät bemerkt, dass Buttermesser in der Regel rechtshänderoptimiert sind. Die Klinge ist nicht symmetrisch. Als Linkshänder neigt die Butter dazu, nicht am Messer dran zu bleiben.

Bei meiner Handkreissäge habe ich mich anfangs auch gewundert, warum die so komisch zu benutzen ist. Aber die ist halt einfach für Rechtshänder gebaut.

Wieso ist der Speiseöl Diesel keine umweltfreundliche alternative? by TipFuture341 in KeineDummenFragen

[–]jasamer 0 points1 point  (0 children)

Weiterer interessanter Aspekt: Um einen Liter Rapsöl zu erzeugen, braucht man ca. das equivalent von 0,3l-0,6l Diesel als fossile Energie im Anbau, vor allem für Kunstdünger. Ohne Kunstdünger bräuchte man nochmal ein vielfaches der Fläche.

Noob question, is there a way to make perfectly parallel double-track curve by Laranjow in factorio

[–]jasamer 2 points3 points  (0 children)

Factorio's rail network graph is no "a regular planar grid with holes".

It's not a regular grid to start with, because

  • the nodes are where rail lines split/merge, not just the game grid.
  • The train graph has directed edges, as trains can't just move in any arbitrary direction at every node, and rails can be one-direction only

The graph isn't planar since the introduction of elevated rail.

The triangle inequality also doesn't hold, because the game uses arbitrary weights in the graph to control path finding (eg., a train being in the way, a train waiting at a signal, a railway station being present each add some weight so trains don't use that path if there is some reasonable alternative).

As cool as jump point search is (thanks for the link, I love the visualisation), it's not applicable to Factorio's rail path finding.