File tree Expand file tree Collapse file tree 5 files changed +18
-9
lines changed
Expand file tree Collapse file tree 5 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,8 @@ pub fn readInput() ![]const u8 {
5252 defer std .process .argsFree (global_allocator , args );
5353 const file_name = if (args .len > 1 ) args [1 ] else "25000_in" ;
5454 const file = try std .fs .cwd ().openFile (file_name , .{});
55- const reader = std .io .bufferedReader (file .reader ()).reader ();
55+ var buffered_reader = std .io .bufferedReader (file .reader ());
56+ const reader = buffered_reader .reader ();
5657 { // skip past first lines starting with '>'
5758 var i : u8 = 0 ;
5859 while (i < 3 ) : (i += 1 ) {
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ fn offset_momentum(bodies: []Body) void {
3636 var pos = vec3 { 0 , 0 , 0 };
3737 for (bodies ) | b | pos += scale (b .vel , b .mass );
3838 var sun = & bodies [0 ];
39- sun .vel = - scale (pos , 1 / solar_mass );
39+ sun .vel = - scale (pos , 1.0 / solar_mass );
4040}
4141
4242fn advance (bodies : []Body , dt : f64 ) void {
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ problems:
3838 - 1.zig
3939 - name : nsieve
4040 source :
41- - 1.zig
41+ # - 1.zig
4242 - 2.zig
4343 - name : mandelbrot
4444 source :
@@ -49,9 +49,9 @@ problems:
4949 - name : json-serde
5050 source :
5151 - 1.zig
52- - name : coro-prime-sieve
53- source :
54- - 1.zig
52+ # - name: coro-prime-sieve
53+ # source:
54+ # - 1.zig
5555 - name : knucleotide
5656 source :
5757 - 1.zig
@@ -66,6 +66,14 @@ environments:
6666 version : latest
6767 docker :
6868 include : zig
69- build : zig build -Dcpu=broadwell --verbose-llvm-cpu-features
69+ build : zig build -Dcpu=broadwell -fno-stage1 - -verbose-llvm-cpu-features
7070 out_dir : zig-out/bin
7171 run_cmd : app
72+ # - os: linux
73+ # compiler: zig/stage1
74+ # version: latest
75+ # docker:
76+ # include: zig
77+ # build: zig build -Dcpu=broadwell -fstage1 --verbose-llvm-cpu-features
78+ # out_dir: zig-out/bin
79+ # run_cmd: app
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ dependencies {
3030 // implementation(kotlin("stdlib"))
3131 // implementation("org.slf4j:slf4j-api:1.7.36")
3232 implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" )
33- implementation(" org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3 " )
33+ implementation(" org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.0 " )
3434 val ktor_version = " 2.1.0"
3535 implementation(" io.ktor:ktor-server-core:$ktor_version " )
3636 // implementation("io.ktor:ktor-server-netty:$ktor_version")
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ kotlin {
2525 implementation(libs.kbignum)
2626 // implementation("com.ionspin.kotlin:bignum:0.3.1")
2727 implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" )
28- implementation(" org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.3 " )
28+ implementation(" org.jetbrains.kotlinx:kotlinx-serialization-json:1.4.0 " )
2929 }
3030 }
3131 }
You can’t perform that action at this time.
0 commit comments