News for hackers. Stuff that matters.

kummappp

I love PyTorch API design

I have to say that adding CUDA acceleration to a studying project https://github.com/kummahiih/pyqbit was a pleasure thanks to PyTorch obvious design principle. Result is here https://github.com/kummahiih/pytorchqbit

( Read More... | 1 comment | on HN )
Re:Bitcoin as a Battery on Sunday March 28, 2021 @12:27PM (#26611632)
Crypto currencies offer non-repudiation and that is it. https://en.wikipedia.org/wiki/Non-repudiation
That is a great youtube channel there. The fall of the city of Ur was also a good one
Re:Visualizing binaries with space-filling curves (2011) on Sunday October 18, 2020 @05:00AM (#24816447)
Also one thing that works is bits to -1, +1 signal and then taking auto-correlation of it.
Re:Visualizing binaries with space-filling curves (2011) on Sunday October 18, 2020 @04:58AM (#24816438)
What a nice way to make 1d -> 2d. I made my MSc thesis about data visualization and the thing I found useful was excess entropy, which means how well you can you predict the next bit better, if you take one bit more into the sliding window you use to predict the next bit/byte. That is usually really dependent about the sliding window size. Imagine what happens with text written in 8 bit characters. With that trick one could make a 3d visualization.
Re:A Plea for Lean Software (1995) [pdf] on Wednesday August 05, 2020 @09:54AM (#24060751)
But I bet Python has a loopholes in the type system as well. I mean you can take the stack, and modify the running code in every way possible at runtime, but it is a slightly mad thing to do.
Re:A Plea for Lean Software (1995) [pdf] on Wednesday August 05, 2020 @09:49AM (#24060695)
Yeah I did mix them. Thanks.
Re:A Plea for Lean Software (1995) [pdf] on Wednesday August 05, 2020 @09:18AM (#24060439)
Yeah, the type system helps in that, but for a unit testable product you need factory methods, which produce some valid and invalid cases. If you write simple tests for those it is a type checker on it's own and the type checker is just overhead. If I could choose my next project from two similar implementations where the other would be type checked and the other unit tested with basic datatype factors (at least) I would choose the unit tested one.

I would use typed API's though, because it saves documentation reading time and makes the editor autocomplete to work like magic.

Re:A Plea for Lean Software (1995) [pdf] on Wednesday August 05, 2020 @08:36AM (#24060109)
'strongly typed language increases the productivity' How was this tested? Was there a control group? I would argue that currently Javascript and Python have been greatly improving the productivity. The type system works well in the maintenance, API definitions and 'no unit tests' scenarios, but when you have to do something you don't have yet any clue about -for exmple at the start of a years long app development project, the type system is just in the way.
Re:Pareto Front Sort for Python on Saturday July 11, 2020 @12:41PM (#23803439)
Thanks. The 'Non-dominated sorting' was the magic phrase for google i was missing.
Re:Pareto Front Sort for Python on Saturday July 11, 2020 @12:39PM (#23803426)
Oh, it is a bug. I'll fix it. How embarrassing and thanks. I have mainly used the None means the whole row is inferior -thing.
Re:Pareto Front Sort for Python on Sunday June 28, 2020 @05:48AM (#23667714)
I did not find pareto front sorting library so I made one. It took a weekend. Save your weekend and use my module instead.
Sorry. My bad.
Please test your library with the c10-archive test suite https://www.ee.oulu.fi/research/ouspg/PROTOS_Test-Suite_c10-...
Re:F# Pipeline Operator in JavaScript with Babel on Tuesday February 04, 2020 @11:01AM (#22237078)
if you add multiplication functionality, identity and termination symbols to it, you get something that is closer to a proper category like done in this: https://github.com/kummahiih/python-category-equations

f1(?) |> ( f2(?), I ) |> f3(?) == f1(?) |> f2(?) |> f3(?) , f1(?) |> f3(?)

it just feels natural that way

Show HN: Computer-Aided Software Design

I have been making tools for software design as a hobby project, because the tools I have seen all look like some sort of point and click game. Is that how you would design for example a bypass filter?Here is my attempt to make module design to look more like Mathlab: https://github.com/kummahiih/python-grapheq-exampleThe example uses a library with which you can represent domain models as...

( Read More... | no comments | 2 points | on HN )
Re:Does gravity happen, because the space is lazy? on Saturday July 06, 2019 @03:47AM (#20368519)
And if you think how wood turns twisted, when it grows faster on the other side and slower on the other, it is not that big leap to think how a wave function would turn if it is evaluated faster on some side. I am proposing here, that the wave function evaluation speed differential causes the gravity.
Re:Does gravity happen, because the space is lazy? on Friday July 05, 2019 @04:09PM (#20365453)
Yep anthropomorphization is the caveman talking in me. No its not lost, on less dense regions the interactions go on faster.

Does gravity happen, because the space is lazy?

In a computer games you usually experience lag on crowded places because, the game can not handle the exponentially growing amount of interactions between all the players on the a area. If you want to get quickly to the other side of such a crowd, the shortest way is not directly through. Does this sound familiar? Is it not how light particle behaves when bending on the gravity? So in a...

( Read More... | 3 comments | 4 points | on HN )
I mean the notion here is of type "connect this source to this sink". Source -> Sink. That kind of setting is called category in mathematics, but the notation is a bit clumsy and can be made a bit more clear by introducing those copy 'I' and terminate 'O' -symbols to the mix. The python library above does that and it could be perhaps possible to plug it into this syntax easily.
Nice. If you would combine '->' operator with copy element 'I' and terminator element 'O' you could manipulate the syntax with category equations ( pure impelementation here https://github.com/kummahiih/python-category-equations and if you like to think as cats and balls, then usage example here: https://github.com/kummahiih/python-domain-equations ).
Re:Parsing: a timeline on Tuesday April 17, 2018 @01:21PM (#16860331)
How about not making the grammar non deterministic in the first place? I think that 'attractive new syntax' -comment means that there is no usable ports for Marpa. I guess I could try to help with that .. :)
Re:Parsing: a timeline on Tuesday April 17, 2018 @12:55PM (#16860079)
The PEG comments seems to be a bit bitter and I would like to hear the story behind the frustration.
Related stuff has been here earlier ( https://johncarlosbaez.wordpress.com/2018/03/26/seven-sketch... and https://bartoszmilewski.com/2014/10/28/category-theory-for-p... ). I wanted also invest some of my time with the subject and tried to make a library which is easy to understand and take into use. Any ideas how to make this on some other imperative language? ( C# + roslyn comes into my mind at least)