As I really like programming in Javascript, sometimes it makes me really angry. And one of the things is that the typing can (or cannot in some areas) make a real mess.
I do not really care about the ability to use numbers wrapped as string, as it is really easy to make numbers from string just by multiplying it by one, but the typing also has some big disadvantages.
The biggest problem, for me, are arrays.
Which can be arrays, but without any casting they can be also strings, which is sometimes really mess. And the biggest problem, is some kind of auto-casting on background, which is really mysterious, if you are not able to go really deep and discover the reason, whi that happens.
This is one of the really weird examples:
[] * [] // -> returns 0
This is weird..
[8] * [8] // returns 64
This is even more weird..
[8,1] * [8,1] // return NaN
And this is then the peak of weirdness
And the reason?
Yup.. it really has a reason
And the reason?
Yes... there is a reason.
Before multiplication, the variables (arrays) are passed internally through ...
Continue reading →
As I really like programming in Javascript, sometimes it makes me really angry. And one of the things is that the typing can (or cannot in some areas) make a real mess.
I do not really care about the ability to use numbers wrapped as string, as it is really easy to make numbers from string just by multiplying it by one, but the typing also has some big disadvantages.
The biggest problem, for me, are arrays.
Which can be arrays, but without any casting they can be also strings, which is sometimes really mess. And the biggest problem, is some kind of auto-casting on background, which is really mysterious, if you are not able to go really deep and discover the reason, whi that happens.
This is one of the really weird examples:
''
[] * [] // -> returns 0
''
This is weird..
''
[8] * [8] // returns 64
''
This is even more weird..
''
[8,1] * [8,1] // return NaN
''
And this is then the peak of weirdness
And the reason?
Yup.. it really has a reason
And the reason?
Yes... there is a reason.
Before multiplication, the variables (arrays) are passed internally through .toString(). And as ...
Continue reading →
I have been tinkering with a new media centre box for my living room for ages. Now I finally have the hardware to do it. It is a micro case DELL computer, I hoped it would fit under my TV but it is 2mm higher than the space under the TV.
I am now temporarily using a RaspberryPi 4 running RecallBOX. I have it for retro gaming and emulation, but it has an old version of KODI, so I use it for multimedia purposes. However, it has many disadvantages, such as problematic cooling and, above all, the lack of a power button. So to turn it on I have to flip the switch on the power socket, and to turn it off I have to wait for it to shut down, go to the TV and flip the switch on the power socket behind the TV again.
So the plan is to install a Linux distribution (still to be chosen), make KODI autorun and set up a samba server to copy downloaded films to drives.
As a sideline to this piece of hardware, would some custom services, maybe some bots for my projects? I will see...
Continue reading →
New toy arrived!
My friend sent me his PDA, which he used to use for geocaching. It runs Windows Mobile and is in perfect condition. He took care of the battery, so even though he hasn't used it in years, he still charges it from time to time to keep it alive. All the plastics are perfect and it looks brand new. Such a beautiful piece of electronics.
So I did some research, downloaded a few things and prepared a set of games I wanted to try running.
Firstly, I checked that the machine was still able to connect to WiFi, as it knows relatively new protocols, so its ok. However, it is unable to open almost any web page as it does not trust the certificates. However, this should be solved by downloading Opera Mini and using its VPN service... I will see later.
So I downloaded some archives of .cab installer files for games, Opera Mini and Total Commander and prepared an SD card. Fortunately, the device is able to read SDHC cards, so I can use the 4GB one I have. As I went through the installation of the games, deciding just by their names, I stopped ...
Continue reading →
I finally won something, even though it was not a competition. I was the first to respond to a free Lenovo 80NR offer on an IT forum. I replied within 10 minutes of the offer being posted. Second post was one minute after me. So... I got it
At first I wanted it for collection purposes, but when it arrived and I tried it, everything changed. It only has 2GB of RAM and an Atom processor, but it is a great piece of hardware.
It is a tablet and a netbook in one. The screen can be detached from the keyboard, so it can work as a tablet, or you can attach the keyboard and use it as a terminal, for programming or writing.
And it is addictive. I never liked the Android tablets because they are completely useless. The phone screens are big enough to have another touch device, and it is useless for any kind of productive work. But this is an absolute game changer. I can surf the web, gather ideas and resources in tablet mode only, and then switch to productive mode by attaching a keyboard. I really love ...
Continue reading →
I got a micro arcade machine for Christmas. It is based on a NES emulation and it looks cool. It contains around 240 NES games.
Looking more closely at the list of games, I thought it contained mostly unknown NES games, just with different names. The only game I have successfully recognised is Lunar Pool, but only called "Super Pool".
However, it contains simple games from various genres. Some car and boat races, bomber games, platformers etc.
The controls are not very intuitive and ergonomic. The priority is the design and not the ergonomics. However, it looks really cool and you can play it for tens of minutes before your hand starts to hurt, which is enough.
Some of the games are really crap, some are good, so maybe I would take some time to go through them all and try to find some that are worth playing in depth.
Continue reading →
After getting the Blackberry up and running and finding a way to sideload applications, I enjoyed a few "native" games and then thought about some emulators. I found the retroarch and PPSSPP should work. So first try was the Retro Arch.
There are a lot of systems that are supposed to work. My first attempt was with the SNES, but I am still not able to load any ROMs, because the emulator still sees only empty folders instead of a list of ROMs.
I did try the NES emulator though, and surprisingly it works. So I downloaded an archive with lots of ROMs sorted by genre and am going through it now, but it seems to be working fine and I have not found any problems with any games. So I will play with NES for a bit and then I will try some other emulators, or maybe I will try to get more involved with SNES and try to get it to work.
By the way, I tried Tetris and spent almost two hours with it... so... don't try running emulators unless you want to kill time.
Continue reading →
I received a very special delivery today. It is a Blackberry Classic with Blackberry OS 10.3. I have never had a Blackberry phone before, so this is my first one and it is fantastic.
It is in perfect condition, with no cracks or scratches on the screen.
So I was really looking forward to turning it on. However... as support has ended and the Blackberry servers are down, there is a bit of a problem getting through the initial setup.
So, the way to go through the setup is as follows.
When the phone is turned on, it must not have a SIM card in it, so in the setup, skip the question about the cellular connection. Then move on to the WiFi setup, which is necessary. I was able to successfully connect to my wifi, but then the setup got stuck on the wifi setup screen, as if it was not connected, but the green text next to my wifi said it was, and I got stuck. The next step is to scroll to the bottom of the list and select "Hotspot Login". This took me to a screen with some information and the Blackberry logo at the top. Now ...
Continue reading →
Finally, I set up my server to serve my photo archive in a "civilised" way.
I started building a photo archive as it was a general purpose buyin server. So I sort it by my own, just by samba shares, and sort all the photos into folders manually to keep it under control.
I was still wondering about a way to deploy any media server to access photos in a better way than just directory listing. I always wanted to get Photoprism working on my TrueNAS, but I was unable to deploy it properly as it always got stuck while deploying the app container. I tried it for at least the tenth time just in case it would work, and now it accidentally worked. So I deleted it and tried again, as the try was with default setups. So I set up the "originals" folder at the root of my photo library and made it read-only to make sure it would not corrupt my files. The thumbnails and other stuff is stored on the system disc as it is not needed. Photoprism is now indexing the folders and photos, but it looks like it is working and the photos are starting to ...
Continue reading →
I got a Lenovo Yoga 300 a few weeks ago. My friend sent it to me in exchange for a broken 3D printer I gave him.
Despite the fact that the post office completely destroyed its plastics during shipping, I decided to make it work. Initially there were some problems with the battery and the drive. The drive looked OK when I got it, but the battery was .... tricky. It was caused by a broken connector. So I disassembled the connector from the motherboard, and carefully pinned all the wires from the battery directly to it.
After some tinkering it looked like it was working. So I moved on to installing the system. I decided to install Xubuntu. After a few tries I managed to get it to boot from USB and installed the system. After rebooting and unplugging the USB it said "no bootable devices detected". So another installation with different BIOS settings, another reboot and the same result...
It took me about three hours, but I finally found a solution to get it working.
But I was disappointed again. I wanted to use the notebook to take notes with a pen. I thought the touch screen was good enough, as ...
Continue reading →