HNHacker News
TopNewBestAskShowJobs

longemen3000

122 karma · joined May 14, 2019

submissionscomments
longemen3000··on Floating point numbers, and why they suck
In Julia, there is the `isapprox` function to inexactly compare 2 numbers. (you can use it in infix form: `x≈y`. By default, two numbers are approximately equal if their relative tolerance is less than `sprt(eps(typeof(x))` (around 1e-8 for 64bit Floating point numbers)

Using equality to compare 2 floating point numbers doesn't get you anywhere, specially if you are using mathematical functions (the implementation of `sin` or `exp` could vary with operating systems or software versions)

longemen3000··on PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)
JET.jl it's an interesting case indeed. Its being used retroactively in the Julia base code to look for any undesirable dynamic type situations
longemen3000··on PyTorch: Where we are headed and why it looks a lot like Julia (but not exactly)
Just to be clear Julia is "AOT-JIT", that means that the methods are compiled when used the first time. With Revise.jl (a package for interactive development) you can make a fully interactive Julia process, rewriting things on the fly, while benefiting from fast code
longemen3000··on NansAreNumbers – An esoteric data type built of NaNs
nice!. one thing about NaN is that, because the specification only mentions the exponent part, you have all the mantissa bits free for use, this is the idea behind signalling NaNs, that if you return a NaN for an operation, that value should have some helpful debug information
longemen3000··on Show HN: A dot matrix rendered using Braille characters
Nice!, in Julia there is a library to do plots with a similar technique, https://github.com/Evizero/UnicodePlots.jl
longemen3000··on 0x7FDE623822FC16E6: A magic constant for double float reciprocal (2011)
i remembered when i wanted to implement sqrt(x) by myself. before concluding that the LLVM instruction was the fastest, i came with this: https://gist.github.com/longemen3000/72b2d18761d1a89fd31a7aa...
longemen3000··on Show HN: Kalk, A calculator with math syntax, complex numbers
Maybe the derivation could be done by the complex step trick, if programing an AD system is too hard
longemen3000··on 1700 Cascadia Earthquake
I was near the epicenter of the Chilean earthquake of 2010 (8.8),and my grandfather was in the 1960 one. The main mayority of the casualties in both earthquakes were caused by tsunamis (its really a bummer that Chile is basically a long strip of coast) we were lucky (in 2010)because the nearest big coastal population center was inside a bay, so the wave didn't hit directly. the 1960 earthquake has a very interesting history, one day before (Saturday) , there was one big earthquake(8 1-8.3, X in mercalli m) 400 km North (city of Concepción) , that cut the communications and roadways from the capital to the south of the country. On Sunday, a second earthquake of similar magnitude struck, that finished destroying the remaining buildings in the location,but nobody died on that second earthquake because everyone was outside,for obvious reasons. Finally, the big one started not on Valdivia (300 km South) but the fault line extended 1000 km reaching Valdivia and beyond, 135 people died on Japan, Valdivia itself sunk permanently 2.7 meters (8 feet) ,one chain of lakes got their exit rivers blocked, so the water level was rising rapidly and if overflowed, it would flood again the same areas affected by the earthquake, so a joint operation between military and private parties were set up to try to unblock the whole system (they succeeded), there was a case of human sacrifice, trying to calm the fury of the gods that caused such destruction, it was wild
longemen3000··on Reversible Computing
In Julia there is a package for a reversible computing DSL, with excelent examples https://giggleliu.github.io/NiLang.jl/dev/
longemen3000··on Fast Inverse Square Root
Nice, i was looking at this, but for sqrt (basically the same integer trick)
longemen3000··on Fast Inverse Square Root
It clearly depends on the workload. If you have tons of 3d articles or polygons on a screen, one of the most repeated operations are the calculation of norms (x/sqrt(sum(x)). John carmack came to the fast inverse sqrt root explicitly for this speed advantage
longemen3000··on JuliaCon2020: Julia Is Production Ready
One of the discussions on Juliacon was exactly this! How to index various things. This was one of the documents produced during the discussion : https://docs.google.com/document/d/1imBX3k0EEejauWVyXONZDRj8...
longemen3000··on ICQ New
I wanted that domain for "ingeniería civil quimica" (chemical engineering), before it was from a gym
longemen3000··on The Parallelism Blues: when faster code is slower
Yeah, I'm waiting for that PR haahah
longemen3000··on The Parallelism Blues: when faster code is slower
In Julia, where the paralleization options are explicit (SIMD, AVX, threads or multiprocessing), it always depends on the load, for small operation (around 10000 elements) a single thread is faster only for the thread spawning time (around 1 microsecond). And there is the issue of the independent Blas threaded model, where the Blas threads sometimes interfere with Julia threads... In a nutshell, parallelization is not a magical bullet, but is a good bullet to have at your disposal anyway
longemen3000··on PandaPy has the speed of NumPy and the usability of Pandas
I saw in implementation (CSV parser in Julia) were the sentinel value was randomly assigned at read time (if a value in the input was equal to the sentinel value, change randomly).after parsing, the sentinel value would be converted to the appropriate data type (Julia Missing)
longemen3000··on Measure code execution time accurately in Python
https://arxiv.org/abs/1608.04295 this paper is the statistical basis of time measuring in Julia. It is, at least a good read when trying to measure the execution of some program seriously at low level. It uses also a predictor of the estimate number of evaluations via a logistic function
longemen3000··on How to Exit Vim
In Julia slack, when talking about Julia IDEs, this came. The solution : a hardware VIM kill switch https://github.com/caseykneale/VIMKiller/blob/master/README.... I strongly suggest donating the suggested amount to the project
longemen3000··on Machine Learning Can't Handle Long-Term Time-Series Data
I remembered that neural differential equations are better suited to represent time series data, I saw them being used a lot in pharmacological processes, any additional idea or insight related to this?
longemen3000··on The Higher States of Bromine
nice to know! well, so it enters in the same category of a lot of elements, good in small quantities, can kill you if you eat it too much.
longemen3000··on The Higher States of Bromine
Yeah, the bromine ion has half life in the body of some weeks, and can cause some neurologic problems,but the body eventually expels it away. I would be worried, but is, not in my primary list of food risk
longemen3000··on When your data doesn’t fit in memory: the basic techniques
Im following closely the development on an alternative to data.frame that works on disk (disk.frame),using the same API
longemen3000··on Nim: Scripting Ease in a Compiled Language
there is this great discussion about the Nim Language on Julia Discourse: https://discourse.julialang.org/t/version-1-0-released-of-ni...
longemen3000··on Timsort, the Python sorting algorithm
other sorting algorithm, taking advantage of SIMD instructions and being cache-aware, chipsort: https://github.com/nlw0/ChipSort.jl
longemen3000··on Timsort, the Python sorting algorithm
maybe you shouldn't supply invalid comparisons in the first place. but if you do, crashing seems like an appropriate response
longemen3000··on Chile’s attempts to move up the lithium value chain are not working
i'm a chemical engineer from chile, so at least i have to know something about local minery, right?
longemen3000··on Chile’s attempts to move up the lithium value chain are not working
It's important to note the difference between the two main sources of lithium. Chile and Bolivia has lithium in the form of brines (mainly Lithium Cloride, high concentration, relatively easy to extract) and ores (pegmatite, hard to extract, as requires mechanical work to grind the rock). the region of the north of Chile, Bolivia and Argentina has the mayority of reserves of the world, following by Afghanistan. Australia has a lot of pegmatite.
longemen3000··on Chile’s attempts to move up the lithium value chain are not working
Another advantage is the short distance between a production source (solar panels in the desert) and a storage solution (Andes Mountains, ideal for a Hydroelectric energy storage. there is aproyect looking to exploit this fact (http://valhalla.cl/)
longemen3000··on Be wary of functions which take several parameters of the same type
Using key-value pairs? (Julia) `copy(src=>dest)` The advantage of that notation in this case is that expresses an explicit non-conmutability of the arguments.
longemen3000··on Nim 1.0
IN PARTICULAR,I DO NOT LIKE A PROGRAMMING LANGUAGE SCREAMING AT ME.(well, the last versions seem calmer)
← PreviousPage 2 of 3Next →