Simer

203 posts

Simer banner
Simer

Simer

@SimerPlaha

Coder. Engineering Mechanics.

Sydney, Australia Katılım Aralık 2011
156 Takip Edilen167 Takipçiler
Simer
Simer@SimerPlaha·
Analytical solution to the same problem is here #f17-1" target="_blank" rel="nofollow noopener">simer.au/engineering-me…
English
0
0
0
258
Simer
Simer@SimerPlaha·
Functional operations like Array[T].map in Scala transpile to while loops in GLSL
Simer tweet media
English
0
0
0
173
Simer
Simer@SimerPlaha·
I'm writing shaders in #Scala and my transpiler converts Scala code to #GLSL. The best thing about this is that, the shader is fully unit-testable in #ScalaTest. It runs on #JVM, #GPU and browse (compiles with Scala.js). Web demo: simer.au/computational/… Next: compute shaders
Simer tweet media
English
2
0
0
360
Simer
Simer@SimerPlaha·
A derivation of moment of inertia about an arbitrary axis, resulting in a simple matrix-vector form: #moment-of-inertia-about-an-arbitrary-axis" target="_blank" rel="nofollow noopener">simer.au/engineering-me… #EngineeringMechanics #RigidBodyDynamics
Simer tweet media
English
0
0
0
381
Simer retweetledi
Philosophy Of Physics
Philosophy Of Physics@PhilosophyOfPhy·
Math is the only place where truth and beauty mean the same thing.
English
27
29
139
5.5K
Simer
Simer@SimerPlaha·
@codek_tv Probably a typo, but the second linear kinematics equation shouldn't have a time component v_2^2 = V_1^2 + 2aS.
English
0
0
2
266
Code Geek
Code Geek@codek_tv·
Dynamics in Engineering Mechanics
Code Geek tweet media
English
2
205
1.2K
36.7K
Simer
Simer@SimerPlaha·
It enables: - Bi-directional transformation (plaintext ⇆ AST): Needed for tests/debugging and for future implementation of Ralph code formatting. - Patch updates for incremental parsing.
English
0
0
1
626
Simer
Simer@SimerPlaha·
@scala_js Very cool! In my project, it reduced fullOptJS emitted JS from 4.3MB to 4MB for one module, and from 8.5MB to 8.25MB for the other. Awesome optimisation!
English
0
0
3
291
Scala.js
Scala.js@scala_js·
#Scala.js 1.16.0 is here! It contains several improvements to the generated code size, particularly when emitting ES modules. It also consumes a bit less memory. scala-js.org/news/2024/03/1…
English
2
25
85
9.1K
Simer
Simer@SimerPlaha·
@jdegoes @jdegoes how about a "Rust for Scala Developers" course? Not the basics of Rust, but rather a course specifically designed to accelerate learning Rust as a Scala developer.
English
1
0
6
832
John A De Goes
John A De Goes@jdegoes·
For years, I’ve become accustomed to “costly abstraction” in Scala. Take a wrapper (newtype) structure like: case class Box[A](value: A) A simple local expression like `Box(42).value` has much more overhead than you would think: 1. Allocation of 12 bytes on the heap for Box object header + 4 more bytes for a reference 2. Allocation of 12 bytes on the heap for java.lang.Integer object header + 4 more bytes for an integer 3. Invocation of a virtual getter method that Scala quietly generates for the `value` field 4. Invocation of two separate constructors, one for Box and one for java.lang.Integer The heap allocations put pressure on the garbage collector, while the access through getter adds indirection overhead (which, thankfully, the JVM can sometimes optimize on its own), and the constructors add jumps. The net effect of these sources of overhead, but especially the size and quantity of heap allocations, is so significant, that if you’re doing high-performance work in Scala, you have to think long and hard about the costs of abstraction. If you don’t use abstraction, your code is hard to maintain, low-level, and fragile, and fails to take advantage of the type system of Scala. If you do use abstraction, your code becomes easy to maintain, high-level, and robust, fully taking advantage of Scala’s type system, but suffers from unacceptable overhead in some high-performance scenarios. One of the most refreshing facts about Rust is that it’s designed to let you abstract without unnecessary cost. The above structure in Rust looks like this: pub struct Box { pub value: A, } A local expression like `Box { value: 42 }.value` has the following overhead: 1. Allocation of 4 bytes on the stack (not heap). That’s it! Even if you needed the value to live on the heap, it would still just be 4 bytes and not incur the cost of garbage collection. There are no constructors, and accessing the field inside the struct has no indirection whatsoever, because there are no getters. You could also continue wrapping `Box` in other “newtype” structures, and it doesn’t increase overhead at all! Rust gives you the ability to abstract using a powerful type system, but it ensures that you can use this abstraction even in high-performance scenarios without paying unnecessary costs.
English
17
13
145
40.8K
Simer retweetledi
Massimo
Massimo@Rainmaker1973·
#Today, SpaceX tested a Raptor rocket engine, fired at a water-cooled "sandwich" of steel plates, designed to protect the launch pad during liftoff and mitigate the rock tornado experienced during Starship's launch on April 20
English
126
391
3.4K
1.6M
Simer
Simer@SimerPlaha·
@Kordyjan 'Scala Next' kinda implies another major migration, but it's good to hear that it's not :) Is the main focus of 'Scala Next' adding more language features? Based on last year's survey results, hope was that performance, tooling & native support would have been higher priorities.
English
0
0
5
518
Paweł Marks
Paweł Marks@Kordyjan·
Scala 3 will be forever fully backward compatible. I'll repeat: Scala 3 will be forever fully backward compatible. The version number or the codename for the versioning line doesn't change that simple fact.
English
3
12
66
11.6K
Simer
Simer@SimerPlaha·
I've started an online notebook at simer.au for jotting down my solutions to problems in R.C. Hibbeler's books on Engineering Mechanics. At the moment I'm going through Statics #mechanics #engineeringmechanics
English
0
0
2
1.5K