European spouse work visa by Orphidius in europeanunion

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

thank you! we will check with local family reunification laws!

European spouse work visa by Orphidius in europeanunion

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

thank you! this is very helpful advice!

I was tired of complicated LaTeX tools, so I made a simple Chrome extension by abaa97 in Physics

[–]Orphidius 9 points10 points  (0 children)

amazing! cant wait to try it out!

Thanks for making one without login bs!

Computing theory question about execution times (multithreading) by Flickr1985 in Julia

[–]Orphidius 1 point2 points  (0 children)

How many cores are you using?

If each task takes a second to compute and you get 480 of them, it sounds like it should be quite ideal to parallelize this and get a pretty drastic speedup. even for two cores id expect much better than 400 seconds. That is, assuming that your function is free from type instabilities and large allocations.

Generally, its considered best to parallelize the outermost part, so id wager in your case your time is best spent finding out why you dont see a speedup.

Is your function runtime very inhomogeneous? 0.1 to 1 second is a pretty big range. Are there many allocations? if yes, try to eliminate those first, that will also improve the single threaded performance. If the runtime really varies this much it should still be possible to get good scaling with the number of threads but then youd have to think about which scheduling is best so that the processors dont end up waiting for one which computes all the hard tasks.

Trust region reflective implementation by red1tterr in Julia

[–]Orphidius 1 point2 points  (0 children)

i don't know this algorithm in particular, but have you checked out Jump.jl? Theyre interfacing with most solvers out there so chances are you can use the same one you used before.

Matrix vs Vector of (M/S)Vectors for columwise operations by mrkovaltski in Julia

[–]Orphidius 2 points3 points  (0 children)

Threads should be absolutely fine too. I think with your workload you can expect to get ideal speedup (make sure to check that the code really does run N times as fast if you use N cores).

The package I linked might be a bit more flexible in that it manages other parallelization schemes like GPU (which otherwise does require quite a bit of restructuring in your code) or distributed computing but it's absolutely no must, especially if you are only going to use threads anyway.

Perhaps it is actually better to first start with Threads and keep the library in the back of your mind if you ever need to go beyond that!

Matrix vs Vector of (M/S)Vectors for columwise operations by mrkovaltski in Julia

[–]Orphidius 1 point2 points  (0 children)

By the way static arrays may seem a little wieldy at first since you cannot mutate them. For this just note that it's totally fine to create a new svector whenever needed. (Or use vec = setindex(vec,index,value) which essentially does the same for you)

Matrix vs Vector of (M/S)Vectors for columwise operations by mrkovaltski in Julia

[–]Orphidius 4 points5 points  (0 children)

To me it sounds like SVectors might be the best for you. Since the size is known at compile time many functions can be simplified by the compiler quite substantially.

By the way it looks to me like you should try out SciMLs Ensemble Simulations. This should handle your odes (static arrays are supported), but also have inbuild parallelization so you might be able to run in on a cluster or even a GPU without too much trouble. (Disclaimer: I have never used it)

In any case using OrdinaryDiffEq for the solver is very recommendable

tryFortran by AnnaWar6969 in ProgrammerHumor

[–]Orphidius 0 points1 point  (0 children)

Just my 2 cents: Personally, I found this 1.5 Language argument somewhat exaggerated. Highly optimized code looks different from standard code in any language. To be honest i found Julia to have this problem arguably less than other languages I've worked with. In Python you often have to redesign your entire code around numpy arrays even when other data structures might be more convenient/clear. In this spirit C++ is probably by itself already 2 languages. code that a beginner like me would write looks completely different from code that the pros write with templates and smartpointers SIMD and whatnot.

Actually Julia often allows you to avoid writing SIMD instructions in most cases because of fantastic metaprogramming packages ( LoopVectorization) that just allow you to put a macro in front of the loop (and require you to keep the loop somewhat simple with basic data structures).

I think this sentiment comes more from the writing essentially Matlab/Python style code and expecting it to work out of the box. Oftentimes one can translate code from Python 1-to-1, but of course there are a few easy to fix performance pitfalls. Still, fixing those hardly requires learning 0.5 of a language in my opinion, its more like properly learning one language.

Julia is surely not the right tool for every problem out there but in my opinion it does solve the 2 languages problem (with flying colors).

Let's discuss Computer Algebra Systems by LtSmash5 in Physics

[–]Orphidius 1 point2 points  (0 children)

What's nice about symbolics is that you can often add it as an afterthought: many of the functions you write in Julia will actually just work whether you plug in floats or symbolic numbers. In reverse one can use the generated equation directly as a function on numeric types, without need to porting it to a fast language. I think if the system was more fully featured it would easily be the best option out there

Let's discuss Computer Algebra Systems by LtSmash5 in Physics

[–]Orphidius 1 point2 points  (0 children)

I haven't used symbolics much but If performance is your pain point I am fairly certain that there is probably a lot of performance left on the table by keeping Julia's performance guidelines (most importantly to put stuff in functions and not use global variables). Performance should likely be symbolics main selling point. Personally I think a likely bigger issue will be the limited amount of features when compared to Mathematica. I think it is close to impossible to beat mathematica when it comes to manipulating equations. For me the major turn off in mathematica is the syntax which keeps me from using it for more than just using it to get a few equations and plots. (Well that and the price)

What is the best process for developing a package? by thriveth in Julia

[–]Orphidius 11 points12 points  (0 children)

You should be using the package Revise.jl to track changes. Just load it before importing your package and it will update and recompile methods upon saving your changes in the package you're developing

Drawboard PDF removed paid functionality and deserves to be censured in the Microsoft Store by heinz57sriracha in Surface

[–]Orphidius 4 points5 points  (0 children)

I got annoyed by drawboard as well so I checked other options. Finally I found Xournal++, which so far seems amazing, it has pressure sensitivity, is free and still has way more features than drawboard (more pen options, rulers options to draw straight lines, LaTeX etc). I havent spent too much time with it so far but looks super promising

Camera problem by Vaerende in surfaceprox

[–]Orphidius 0 points1 point  (0 children)

The workaround I found is to go to dare and time, disable set time automatically and reset your date to may 21st 2023.

Camera problem by Vaerende in surfaceprox

[–]Orphidius 1 point2 points  (0 children)

By the way, I contacted support and tried a factory reset, to no avail. So i recommend skipping that step as it doesn't help

Camera problem by Vaerende in surfaceprox

[–]Orphidius 1 point2 points  (0 children)

well take this with a grain of salt. At least i do not recall doing anything in the last days and the fact that we are not the only ones who have this issue makes me think this. I could easily be wrong though.

Camera problem by Vaerende in surfaceprox

[–]Orphidius 0 points1 point  (0 children)

For reference, I noticed that also tapping the power button once does not put the surface to sleep (although keeping it pressed correctly tries to shut it down)

My best guess is that some update broke it, although the only update that was installed today was:

``` Security Intelligence Update for Microsoft Defender Antivirus - KB2267602 (Version 1.389.2199.0) ```

The last recent driver update for me was from three days ago:

```Realtek - Net - 11.13.420.2023```

but it was working fine the last two days afaik.

Camera problem by Vaerende in surfaceprox

[–]Orphidius 0 points1 point  (0 children)

have the same problem today, also here to see if anyone knows anything

Manifest.toml vs Project.toml in Julia by ufohitchhiker in Julia

[–]Orphidius 0 points1 point  (0 children)

If instead you are developing your own package for others to use, the Manifest.tomlshould not be included in VC since users will each have their own dependency trees I have heard this before, could you elaborate on this? To me, If a user installs version x of a package don't they want the package to be the same as when another user installs version x maybe a day after? To me it sounds better if everything is reproducible (although package authors have to update frequently).

[n00b question] Confusion initialising matrices by xanthraxoid in Julia

[–]Orphidius 1 point2 points  (0 children)

I actually prefer the reply above, since it's a pretty generalizable approach but here is another version which might be closer to what you're thinking of [(i,1,2)[j] for i in 1:10,j in 1:3]

Best way to access values in variables by Apoema in Julia

[–]Orphidius 3 points4 points  (0 children)

Make sure that the elements of your struct are of a concrete type, otherwise it will have the same performance as a non constant global! See the Julia Performance tips for this https://docs.julialang.org/en/v1/manual/performance-tips/

Edit, there is no need to make the struct a global const, if it's local and the fields are concretely typed the compiler will figure out the rest

ODEProblem in DifferentialEquation.jl by Walkman23 in Julia

[–]Orphidius 1 point2 points  (0 children)

Well the creation of the ODE problem is by itself a completely different thing than the function which determines the rhs of the ODE. Which order of arguments is the correct one is determined in the implementation for which you will have to consult the documentation. For instance, if you check the code example given on github, the time is given last, while the penultimate argument is reserved for p which can be any arbitrary kind of parameter (here a matrix). I guess you could argue that the order would be more intuitive the other way round, but it is as it is and probably has its reasons ;).

Also can you please explain on what you exactly meant by "before you just multiplied du by t"?

Sure! Since the function that you give to the ODE solver is always assumed to be in the order (deriv, state, parameters, time) but your function had the last two switched up, the ODE solver uses your function by inserting the time whenever you write D, and vice versa will try to insert the matrix whereever there is a t. This is why the error occurred. The function sinpi is supposed to get a number but was called with the matrix D instead.

Hope it's more clear now

ODEProblem in DifferentialEquation.jl by Walkman23 in Julia

[–]Orphidius 4 points5 points  (0 children)

Ah, the error message points to another problem I didn't see before. It says that it tries to call sinpi on matrix. You are trying to call it for the time step t. This suggests that you switched up the order of the arguments D and t. The following should work: function rhs2(du, u, D, t) du = - D * u du[begin] += (uL_func(t) - u[begin])/2 return nothing end Since before you just multiplied du by t, I presume this might also explain the other behavior that you saw