Search found 170 matches

by fips
Fri Sep 13, 2024 7:12 pm
Forum: Photography Talk
Topic: When the lighting and composition just click
Replies: 0
Views: 582

When the lighting and composition just click

This is one of those ordinary places you pass by every day. But one day the lighting and composition just click. And I feel that this was that day. I'm sure I'll be taking pictures at this place again and again, but I suspect it will be hard to top this moment. I feel humbled by this realization. Le...
by fips
Sat Jul 13, 2024 2:59 pm
Forum: Photography Talk
Topic: Leica M rangefinder patch horizontal adjustment
Replies: 0
Views: 3857

Leica M rangefinder patch horizontal adjustment

All of a sudden, after 7 months of daily use of my Leica M11-P , the rangefinder patch got out of alignment at infinity. Additionally, I could no longer focus properly even at shorter distances, which was particularly noticeable when shooting my Voigtländer Nokton 75mm f/1.5 . Luckily, I found that ...
by fips
Sun May 19, 2024 8:49 pm
Forum: Photography Talk
Topic: Leica M11 / M11-P waiting for a definitive firmware update (in 2024)
Replies: 0
Views: 6243

Leica M11 / M11-P waiting for a definitive firmware update (in 2024)

Long before I decided to buy a Leica M camera, I was aware of all the glitches and bugs reported by current M11 owners. This made me wait even longer and postponed my buying decision until the M11-P was released. I somehow expected the M11-P to be just a polished version of the M11, but unfortunatel...
by fips
Fri Dec 01, 2023 10:55 pm
Forum: Photography Talk
Topic: My wishes for the upcoming Fujifilm X-Pro4
Replies: 0
Views: 24007

My wishes for the upcoming Fujifilm X-Pro4

After selling my X-H2s , which was undoubtedly a great camera from a technical point of view, but boring and cumbersome at the same time. I'm sticking with my X-E4 for now. There are only 2 cameras in the future Fujifilm's lineup that I'm interested in: X-E5 and X-Pro4 . Here is what I think we will...
by fips
Thu Apr 13, 2023 12:15 pm
Forum: Photography Talk
Topic: Is it now a good time to get the Leica Q2?
Replies: 1
Views: 18190

Is it now a good time to get the Leica Q2?

With the Leica Q3 announcement just around the corner ( April 14th May 26? ), it might even be tempting to consider getting the current Leica Q2 now, instead of waiting for the new Q3. Not only is the price of the Q2 falling in the anticipation of the Q3, but even if you do decide to go all in and w...
by fips
Thu Apr 06, 2023 2:59 pm
Forum: Photography Talk
Topic: Do I want a viewfinder or tilting screen in the next Ricoh GR?
Replies: 0
Views: 23038

Do I want a viewfinder or tilting screen in the next Ricoh GR?

I start to think that heaving either a viewfinder or a tilting screen in the next Ricoh GR IV? would ruin the GR experience for me. Let me explain, I use my GR III mostly as an extension of my hand, I don't have to think twice before snapping a picture. In my mind, there's only one way to compose a ...
by fips
Mon Nov 07, 2022 4:44 pm
Forum: Photography Talk
Topic: My thoughts on the upcoming Fujifilm X-T5
Replies: 0
Views: 24136

My thoughts on the upcoming Fujifilm X-T5

I'm kind of excited about the new Fujifilm X-T5 , here's what I like about it compared to my X-E4 : In-body image stabilization (IBIS) Two-axis tilt screen Better viewfinder HEIF and TIFF support Better battery What I don't like: Centered SLR-like viewfinder placement Overall SLR-like aesthetics, wi...
by fips
Thu Jul 28, 2022 9:35 pm
Forum: Photography Talk
Topic: My Ricoh GR III settings (with the firmware 1.60)
Replies: 0
Views: 27831

My Ricoh GR III settings (with the firmware 1.60)

The Ricoh GR III firmware update version 1.60 brought a couple of great new features. Besides "Snap Distance Priority Mode", which I'll talk about later, I've just noticed that there's also the new option "Enable AF" under "Shutter Button Setting", which is described as...
by fips
Thu Jul 28, 2022 9:05 pm
Forum: Photography Talk
Topic: ★ Welcome to "Photography Talk" (read first)
Replies: 0
Views: 24231

★ Welcome to "Photography Talk" (read first)

Welcome! Let's talk about photography... Check out my gallery at photos.4fips.com . Browse the existing topics in this forum. In order to post messages here, you have to become a member of the forums. Please understand that this is important to prevent spam. The membership is free and the registrat...
by fips
Sun Sep 12, 2021 9:18 am
Forum: Photography Talk
Topic: The story of my street photography gear
Replies: 0
Views: 32931

The story of my street photography gear

I've been enjoying street photography for a couple of years now. You can check out my work here , or on Instagram under @street4fips . Over the years, I've been trying out different camera systems on streets, and I'll talk about those a bit in the below paragraphs, mostly as a tribute to the cameras...
by fips
Fri Jul 02, 2021 3:16 pm
Forum: Computer Talk
Topic: Encrypted backups using 'duplicity' on Windows via WSL
Replies: 0
Views: 31861

Encrypted backups using 'duplicity' on Windows via WSL

Luckily, the Windows Subsystem for Linux (WSL) has made it really simple to use all kinds of Linux command-line tools on Windows. One of such useful tools is an open-source backup package called duplicity . It's robust, feature-rich and can be deployed and used in just a few steps, like shown below:...
by fips
Sun Sep 29, 2019 9:10 pm
Forum: Computer Talk
Topic: Checking out CppCon 2019 videos
Replies: 0
Views: 32004

Checking out CppCon 2019 videos

Although I'm not closely following the development of C++ any more, it's still worth checking out some of the videos from the latest CppCon . People like Sean Parent and Andrei Alexandrescu always shine in their talks and provide relevant info, moreover their presentations are not that much C++ rela...
by fips
Mon May 28, 2018 10:34 pm
Forum: Computer Talk
Topic: Controlling the TP-Link HS110 smart plug with Domoticz
Replies: 15
Views: 156959

Re: Controlling the TP-Link HS110 smart plug with Domoticz

Thanks for sharing this. Actually, adding authentication right to the HTTP request seems to be the preferred solution. I was thinking about something similar.
by fips
Mon May 28, 2018 8:06 pm
Forum: Computer Talk
Topic: Controlling the TP-Link HS110 smart plug with Domoticz
Replies: 15
Views: 156959

Re: Controlling the TP-Link HS110 smart plug with Domoticz

Hi Viriathus, I guess I haven't encountered the 401 myself because I don't use any authentication (I use Domoticz only locally, so there is no need for me). However, once I enabled the authentication via defining Username/Password, the 401 started to show up. I looked though the System Setup and fou...
by fips
Sun May 27, 2018 11:49 am
Forum: Computer Talk
Topic: Optimizing web for large high-res displays (4K and beyond)
Replies: 0
Views: 32244

Optimizing web for large high-res displays (4K and beyond)

After buying a 32-inch 4K display a couple of months ago, I started to notice that all my photos at PHOTOS.4FIPS.COM were slightly blurry when viewed in the web browser. One of the reasons I had created a dedicated photo gallery in the first place was to have absolute control over how the photos are...
by fips
Tue Apr 17, 2018 8:50 pm
Forum: Computer Talk
Topic: TTGO ESP32 (OLED + 18650) running MicroPython
Replies: 0
Views: 42098

TTGO ESP32 (OLED + 18650) running MicroPython

Although I've been more than happy with a bunch of ESP8266 development boards scattered around my house all running Lua -based NodeMCU , I couldn't resist to try out the new even more powerful and feature-packed ESP32 . I've decided to order this super convenient module on eBay marketed as ' TTGO ES...
by fips
Tue Apr 10, 2018 9:21 pm
Forum: Computer Talk
Topic: Controlling the TP-Link HS110 smart plug with Domoticz
Replies: 15
Views: 156959

Re: Controlling the TP-Link HS110 smart plug with Domoticz

HTTP Error 401 means UNAUTHORIZED , which is strange if you are running locally... As a last resort, try to paste this url to your web browser: http://192.168.1.24:8080/json.htm?type=command&param=udevice&nvalue=0&idx=28&svalue=123;456 (double check ' 192.168.1.24:8080 ' and idx= 28 ...
by fips
Tue Apr 10, 2018 9:02 pm
Forum: Computer Talk
Topic: Why I can't output a PWM signal using an ATTiny84
Replies: 3
Views: 48197

Re: Why I can't output a PWM signal using an ATTiny84

Sorry, I've never played with PWM modes on ATtiny, so I can't help much. However, after a bit of research, I've come across this page: ATtiny2313 PWM – Pulse Width Modulation It shows how to implement LED fading on ATtiny2313 (which I believe is similar to ATtiny84) using PWM. BTW, I don't think it'...
by fips
Fri Apr 06, 2018 8:34 pm
Forum: Computer Talk
Topic: Controlling the TP-Link HS110 smart plug with Domoticz
Replies: 15
Views: 156959

Re: Controlling the TP-Link HS110 smart plug with Domoticz

I believe you are very close to success. There seems to be a networking problem when sending data to Domoticz ('connection timed out' is quite strange on a local network, I would try to run the script a couple of times to see if the problem persists). I have tested your script (with changed IPs, por...
by fips
Fri Apr 06, 2018 3:02 pm
Forum: Computer Talk
Topic: Controlling the TP-Link HS110 smart plug with Domoticz
Replies: 15
Views: 156959

Re: Controlling the TP-Link HS110 smart plug with Domoticz

Try to replace this:

Code: Select all

except urllib2.URLError, e:
   print e.code
With this:

Code: Select all

except urllib2.HTTPError, e:
    print e.code
except urllib2.URLError, e:
    print e.args
This should give better info about the error.

(I'm going to try your script over the weekend...)
by fips
Thu Apr 05, 2018 10:43 pm
Forum: Computer Talk
Topic: Controlling the TP-Link HS110 smart plug with Domoticz
Replies: 15
Views: 156959

Re: Controlling the TP-Link HS110 smart plug with Domoticz

I went through your steps quickly and it looks good to me. I would try to run the script directly (without crontab) to see if it produces any error (you can also uncomment the print statements to see how the script progresses). python /home/pi/domoticz/scripts/python/test.py If there are no errors i...
by fips
Wed Apr 04, 2018 9:59 pm
Forum: Computer Talk
Topic: Controlling the TP-Link HS110 smart plug with Domoticz
Replies: 15
Views: 156959

Re: Controlling the TP-Link HS110 smart plug with Domoticz

Hi, Unfortunately, I haven't tried to propagate the consumption info from HS110 into Domoticz yet, although it's on my list for some time. However looking at this thread it seems it shouldn't be that difficult (there's even a Python script included). A small annoyance is that Demoticz is unable to q...
by fips
Fri Mar 09, 2018 9:47 pm
Forum: Computer Talk
Topic: Aliasing structs with pointers for const transitivity (C)
Replies: 0
Views: 32678

Aliasing structs with pointers for const transitivity (C)

This is just a quick brain dump, something I've been experimenting a lot recently in my toy C project. The code below shows how to compose two aliasing views (constant and mutable) on the same object, which is mostly useful for structs with pointers. The motivation behind this construct is to get fu...
by fips
Sat Feb 03, 2018 4:44 pm
Forum: Computer Talk
Topic: Using rotary encoders for keyboard emulation (RPi)
Replies: 0
Views: 38813

Using rotary encoders for keyboard emulation (RPi)

I've been using the official Raspberry Pi 7" touchscreen display as a home dashboard (running Domoticz in Chromium kiosk mode ) for a couple of years now, overall with great success. Recently, however, the capacitive touchscreen started to act up, and gradually became totally unresponsive. This...
by fips
Wed Jan 24, 2018 10:02 pm
Forum: Computer Talk
Topic: Home automation with Domoticz, ESP8266 and BME280
Replies: 11
Views: 103075

Re: Home automation with Domoticz, ESP8266 and BME280

Hi, The ESP8266 module I used for this project is called "NodeMCU DEVKIT V1.0". If you are using the same module, you can check out this pin definition . Connect SDA to D1 pin, and SCL to D2 pin. If you are using another module, you will need to find the relevant schematics, but the pins s...
by fips
Sun Oct 01, 2017 9:04 pm
Forum: Computer Talk
Topic: Controlling the TP-Link HS110 smart plug with Domoticz
Replies: 15
Views: 156959

Controlling the TP-Link HS110 smart plug with Domoticz

Although there are plenty of smart plugs currently available on the market, my choice was, as usual, hugely constrained by the requirement of maximum hackability of such a device. So I've decided to pick up the TP-Link HS110 smart plug, mainly because of this article: Reverse Engineering the TP-Link...
by fips
Sun Sep 24, 2017 8:45 pm
Forum: Computer Talk
Topic: Exploring the Rust programming language
Replies: 0
Views: 34659

Exploring the Rust programming language

I have finally found some time to learn more about the Rust programming language, which has been under my radar for a couple of years now, but I had no chance to get my hands dirty until recently. There's a great book to start with, called: The Rust Programming Language , which is very well written ...
by fips
Tue Aug 08, 2017 6:27 pm
Forum: Computer Talk
Topic: A portable Raspberry Pi Zero W companion computer
Replies: 0
Views: 37889

A portable Raspberry Pi Zero W companion computer

As smart phones and tablets evolve, they become more and more useful as productivity tools, offering a great deal of convenience especially for those who enjoy traveling light without carrying too much additional equipment. Although today's mobile devices are capable of performing even the most dema...
by fips
Wed Apr 19, 2017 9:28 pm
Forum: Computer Talk
Topic: Home automation with Domoticz, ESP8266 and BME280
Replies: 11
Views: 103075

Re: Home automation with Domoticz, ESP8266 and BME280

Good to hear it now works for you! Regarding the PIR motion sensor, it should be pretty easy to hook it up to ESP8266. It uses just one pin named OUT to report its state. Basically, each time motion is detected the OUT pin goes HIGH. So it should be enough to just monitor changes on the pin, somethi...
by fips
Mon Apr 03, 2017 9:19 pm
Forum: Computer Talk
Topic: Home automation with Domoticz, ESP8266 and BME280
Replies: 11
Views: 103075

Re: Home automation with Domoticz, ESP8266 and BME280

Also, check the i2c address of your BME280 sensor. It seems that the NodeMCU firmware expects that the address is either 0x76 or 0x77 ( BME280_I2C_ADDRESS ). I can imagine there might be a BME280 sensor with a different address in which case bme280.temp() would return nil to indicate unsuccessful re...
by fips
Fri Mar 31, 2017 1:58 pm
Forum: Computer Talk
Topic: Home automation with Domoticz, ESP8266 and BME280
Replies: 11
Views: 103075

Re: Home automation with Domoticz, ESP8266 and BME280

It seems there is a problem with getting data from the sensor. The Lua script panics (crashes) because the call to the function bme280.temp() returns nil , and nil / 10 results in the arithmetic error: PANIC: unprotected error in call to Lua API (init.lua:45: attempt to perform arithmetic on a nil v...
by fips
Thu Mar 30, 2017 7:34 pm
Forum: Computer Talk
Topic: Home automation with Domoticz, ESP8266 and BME280
Replies: 11
Views: 103075

Re: Home automation with Domoticz, ESP8266 and BME280

Hi Pino, For the above Lua script select these 6 modules: bme280, file, http, tmr, uart, wifi After the build is complete you will get something like this: nodemcu-master-6-modules-2016-12-18-20-22-54-integer.bin When flashing, it is a good idea to also flash esp_init_data_default.bin (check out thi...
by fips
Mon Mar 27, 2017 10:18 pm
Forum: Computer Talk
Topic: Home automation with Domoticz, ESP8266 and BME280
Replies: 11
Views: 103075

Re: Home automation with Domoticz, ESP8266 and BME280

Hi Pino, It looks like you are using the same NodeMCU module like me, connect it to BME280 like this: NodeMCU BME280 ------------------ D1 ....... SDA D2 ....... SCL 3V3 ...... VCC GND ...... GND Regarding the NodeMCU firmware, I use the nodemcu-build.com service that lets me build a custom firmware...
by fips
Mon Dec 26, 2016 11:01 am
Forum: Computer Talk
Topic: Home automation with Domoticz, ESP8266 and BME280
Replies: 11
Views: 103075

Home automation with Domoticz, ESP8266 and BME280

I've been thinking about how to approach home automation for some time. I wanted something simple, open and easy to deploy with low maintenance cost. I was even considering developing my own custom solution but then came across the Domoticz home automation system, which turned out to satisfy pretty ...
by fips
Wed Nov 23, 2016 10:22 pm
Forum: Computer Talk
Topic: A simple circular buffer with reverse iterator (Lua)
Replies: 0
Views: 38168

A simple circular buffer with reverse iterator (Lua)

This is just a small code snippet showing a simple circular buffer with reverse iterator that I've coded up for my forthcoming IoT NodeMcu -based project. Its purpose is to provide fixed and efficient storage for data coming from sensors, so in my case it basically represents history of N most recen...
by fips
Sat Sep 17, 2016 3:43 pm
Forum: Computer Talk
Topic: Simple declarative UI layout engine in Python
Replies: 0
Views: 43718

Simple declarative UI layout engine in Python

http://forums.4fips.com/2016/4fips.com_declarative_ui_layout_engine_python.gif When it comes to rapid prototyping, Python is the go-to tool for me these days. It's fully equipped, very expressive and portable across desktop and even mobile platforms / iOS , so it represents a perfect fit for writin...
by fips
Sun Apr 03, 2016 3:19 pm
Forum: Computer Talk
Topic: Interactive Arduino menu system over serial line
Replies: 0
Views: 48715

Interactive Arduino menu system over serial line

There is a simple and convenient way to interact with an Arduino board via serial line using a terminal application, such as PuTTY , which supports ANSI escape codes . This makes it super easy to serve the user with an interactive menu like this one: http://forums.4fips.com/2016/4fips.com_arduino_in...
by fips
Sat Oct 24, 2015 9:31 am
Forum: Computer Talk
Topic: CppCon 2015 videos, part 4
Replies: 0
Views: 49270

CppCon 2015 videos, part 4

CppCon 2015: Lawrence Crowl "Comparison is not simple, but it can be simpler" CppCon 2015: Kevin P. Fleming "What is Open Source, and Why Should You Care?" CppCon 2015: Howard Hinnant "A C++14 approach to dates and times" CppCon 2015: Kate Gregory "Stop Teaching C...
by fips
Sun Oct 18, 2015 5:29 pm
Forum: Computer Talk
Topic: CppCon 2015 videos, part 3
Replies: 0
Views: 44597

CppCon 2015 videos, part 3

CppCon 2015: Marshall Clow "string_view" CppCon 2015: Patrik Huber "3D Face Tracking and Reconstruction using Modern C++" CppCon 2015: Michael VanLoon "STL Algorithms in Action" CppCon 2015: John Lakos "Value Semantics: It ain't about the syntax!, Part I" Cpp...
by fips
Sun Oct 18, 2015 5:29 pm
Forum: Computer Talk
Topic: CppCon 2015 videos, part 2
Replies: 0
Views: 43527

CppCon 2015 videos, part 2

CppCon 2015: Stephan T. Lavavej "functional: What's New, And Proper Usage" CppCon 2015: Michael Caisse "Using Spirit X3 to Write Parsers" CppCon 2015: "Grill the Committee" CppCon 2015: Kevin Kostrzewa & Johm Wyman "Organizational Leadership with Modern C++&qu...
by fips
Sun Oct 04, 2015 2:36 pm
Forum: Computer Talk
Topic: CppCon 2015 videos, part 1
Replies: 0
Views: 44028

CppCon 2015 videos, part 1

CppCon 2015: Bjarne Stroustrup "Writing Good C++14" CppCon 2015: Herb Sutter "Writing Good C++14... By Default" CppCon 2015: Sean Parent "Better Code: Data Structures" CppCon 2015: Chandler Carruth "Tuning C++: Benchmarks, and CPUs, and Compilers! Oh My!" Cpp...
by fips
Thu Dec 04, 2014 10:09 pm
Forum: Computer Talk
Topic: A simple hex/dec binary data dumper (Python)
Replies: 0
Views: 45625

A simple hex/dec binary data dumper (Python)

After using all kinds of ad hoc hacks to help me dump binary data in Python, I've finally decided to write a little helper to address all my usual needs. It's nothing fancy, but it's configurable enough to allow me both: to print a nice visual hex dump with an optional text column, and also format a...
by fips
Thu Oct 09, 2014 6:23 pm
Forum: Computer Talk
Topic: Yet another way to design binary protocols (Python/C++)
Replies: 0
Views: 45478

Yet another way to design binary protocols (Python/C++)

I've been quite obsessed by forming & memory mapping of binary data structures in C/C++ for some time and wrote quite a lot about this topic in the past. So no wonder, I'm always eager to try new approaches in this area. This time, I've come across a Python library called Construct , described a...
by fips
Mon Sep 29, 2014 6:38 pm
Forum: Computer Talk
Topic: Joining multiple H.264 MOVs using AviSynth and QTSource
Replies: 0
Views: 41850

Joining multiple H.264 MOVs using AviSynth and QTSource

I've finally decided to make my friends happy and provide them with the video I took during our summer holidays a few months ago. I didn't want to spend much time editing it, so came up with an idea just to quickly join the individual clips together, rescale them and encode the resulting video back ...
by fips
Fri Aug 29, 2014 9:43 pm
Forum: Computer Talk
Topic: Vector font rasterization using MSAA (C++/OpenGL)
Replies: 0
Views: 44996

Vector font rasterization using MSAA (C++/OpenGL)

I've been recently playing with OpenGL graphics a bit and needed a simple way to print text. Instead of spending days and weeks implementing a proper bitmap font renderer, I decided to go quick and dirty this time with minimal effort. So I took Simplex - A freely available vector font, and in a coup...
by fips
Mon Aug 25, 2014 9:58 pm
Forum: Computer Talk
Topic: Arduino kitchen timer using Nokia 5110 LCD and Pro Mini
Replies: 1
Views: 73174

Arduino kitchen timer using Nokia 5110 LCD and Pro Mini

A couple of months ago, I promised to give more details about my Arduino-based kitchen timer project, which I had presented in this video: Kitchen Timer (An Arduino Project by FipS, 1080p) I've been quite busy recently, so this is just a little update showing the schematics and code. It should provi...
by fips
Tue Apr 01, 2014 9:30 pm
Forum: Computer Talk
Topic: Hello Triangle! using Emscripten & CMake (C++/WebGL)
Replies: 0
Views: 69188

Hello Triangle! using Emscripten & CMake (C++/WebGL)

I've been intrigued by the idea of trying Emscripten for cross-compiling C++ code into JavaScript for some time. So I've decided to give it a try and also involved CMake to help me set up a testing pipeline for bringing an OpenGL/GLUT-based application (Hello Triangle! in this case) from C++ to Java...
by fips
Tue Dec 17, 2013 10:03 pm
Forum: Computer Talk
Topic: Polymorphism involving objects with value semantics (C++)
Replies: 0
Views: 50152

Polymorphism involving objects with value semantics (C++)

A few months ago, I really enjoyed two very interesting C++ talks (1) (2) given by a very clever guy named Sean Parent . I was immediately enchanted by his approach to polymorphism involving objects with value semantics, which makes virtual dispatch and dynamic memory allocation just an implementati...
by fips
Sun Nov 17, 2013 8:32 pm
Forum: Computer Talk
Topic: Connecting Nokia 5110 LCD (Philips PCD8544) to Arduino Nano
Replies: 1
Views: 95210

Connecting Nokia 5110 LCD (Philips PCD8544) to Arduino Nano

I've spent a couple of days figuring out how to connect the legendary Nokia 5110 LCD (84 x 48) to my Ardurino Nano . Although I've encountered a bunch of tutorials covering this topic around the internet, none of them seemed as straightforward as I would expect, so I decided to create my own one to ...
by fips
Thu Oct 10, 2013 9:12 pm
Forum: pfQuizzz Community Forum
Topic: Spaced repetition algorithm ?
Replies: 5
Views: 98220

Re: Spaced repetition algorithm ?

Hi Mahi, Thanks for you feedback. I agree that it would be convenient to have a special line breaker to allow better formatting. Although I haven't release a new version of pfQuizzz for some time as I find it more or less finalized, I should consider making at least one more update to address minor ...
by fips
Fri Jul 05, 2013 1:00 pm
Forum: Computer Talk
Topic: Lone Ranger on iOS & Android is finally out!
Replies: 0
Views: 44861

Lone Ranger on iOS & Android is finally out!

The Lone Ranger mobile game is finally out, check it out on: The App Store (iOS) or Google Play (Android) . It was made by Disney Mobile , Prague Studio. I was part of the effort, involved in the game engine powering the game. The Lone Ranger Mobile Game Official Trailer The Lone Ranger - iOS Gamepl...
by fips
Wed Jun 12, 2013 6:53 pm
Forum: Computer Talk
Topic: Render/update thread synchronization (C++11)
Replies: 0
Views: 51023

Render/update thread synchronization (C++11)

Following the previous post , I'm going to demonstrate a simple way to synchronize two interactive threads, using just the means of the C++11 standard, namely std::thread , std::mutex and std::condition_variable . The image below shows the setup. Both threads (update and render) run concurrently in ...
by fips
Mon May 27, 2013 8:09 pm
Forum: Computer Talk
Topic: Programming ATtiny85 using Arduino Nano as ISP
Replies: 0
Views: 92413

Programming ATtiny85 using Arduino Nano as ISP

I've recently needed to reprogram my trusty little time-lapse camera trigger , which is based on the ATtiny85 microcontroller and found out that the tutorial I followed last time isn't quite complete. So I've decided to create a step-by-step guide on how to program ATtiny85 using an Arduino Nano and...
by fips
Sat May 18, 2013 11:16 am
Forum: Computer Talk
Topic: Designing a flexible GPU abstraction (C++/OpenGL)
Replies: 0
Views: 44647

Designing a flexible GPU abstraction (C++/OpenGL)

The image below shows a GPU abstraction that I use in my pet project. It gives a great flexibility as it's BLOB driven (to reduce API complexity together with the internal bookkeeping cost) and completely decouples the client from the GPU as the whole system interacts with the GPU at just a single w...
by fips
Sun May 12, 2013 7:18 pm
Forum: Computer Talk
Topic: Biped Arduino project (FIPS-BOT-1), part 5 of n
Replies: 0
Views: 50306

Biped Arduino project (FIPS-BOT-1), part 5 of n

Part1 Part2 Part3 Part4 Part5 I've been working on the electronics for a couple of days now, finding the best layout for the components and wiring things together. There's an ultrasonic sensor , Bluetooth module , buzzer , and of course the Arduino Nano itself. Everything is on board now! http://Fo...
by fips
Sat May 04, 2013 6:39 am
Forum: Computer Talk
Topic: Designing portable PODs & BLOBs (C++)
Replies: 0
Views: 45678

Designing portable PODs & BLOBs (C++)

It's hard to beat the beauty of PODs like this: struct Foo or struct Bar { { uint8_t a; uint16_t num_foos; uint8_t b; Foo foos[1]; // (num - 1) follow uint8_t c; }; uint32_t x; }; As I discussed earlier, I use such PODs to form more complex BLOBs that then serve as a standard means of data exchange ...
by fips
Thu Mar 14, 2013 8:43 pm
Forum: Computer Talk
Topic: A fixed-size string buffer, String_buf (C++)
Replies: 0
Views: 54189

A fixed-size string buffer, String_buf (C++)

I've been very satisfied with my String_ref class, which represents a non-owning reference to a string (something similar to boost::string_ref , llvm::StringRef or StringPiece ), but I've soon realized that there's still one important piece missing in the puzzle. That piece is a stack-allocated stri...
by fips
Thu Mar 07, 2013 10:30 pm
Forum: Computer Talk
Topic: Memory-mapped BLOBs in action (C++/Python)
Replies: 0
Views: 46646

Memory-mapped BLOBs in action (C++/Python)

I've spent some more time playing with memory-mapped BLOBs with very satisfactory results. Not only It's a great win in terms of performance, but it also helps one to appreciate pure data rather than various code-driven dynamic data structures and other complicated abstractions . This change in mind...
by fips
Sat Mar 02, 2013 6:07 pm
Forum: Computer Talk
Topic: Biped Arduino project (FIPS-BOT-1), part 4 of n
Replies: 0
Views: 44997

Biped Arduino project (FIPS-BOT-1), part 4 of n

Part1 Part2 Part3 Part4 Part5 Despite being very busy recently, I've found some time to advance the project to the next stage. The battery has just arrived (it's Gens ace 800 mAh, LiPo 7.4 V ), so I've made a small platform for it, and finally been able to play a bit with robot's balance. So far, e...
by fips
Sat Feb 09, 2013 9:16 pm
Forum: Computer Talk
Topic: Biped Arduino project (FIPS-BOT-1), part 3 of n
Replies: 0
Views: 50742

Biped Arduino project (FIPS-BOT-1), part 3 of n

Part1 Part2 Part3 Part4 Part5 This is just a quick update on my biped Arduino robot project. I've cut and attached ski-like sheet metal bands to form robot's feet. I'll tune it later to establish good balance. http://Forums.4FipS.com/2013/FipS_20130206_3484_Biped_Robot_Arduino_TowerPro_9g_Mini_Serv...
by fips
Sun Feb 03, 2013 11:02 pm
Forum: Computer Talk
Topic: Memory-mapped game resources (C++/Python)
Replies: 0
Views: 44909

Memory-mapped game resources (C++/Python)

So far, I've been pretty happy with Google Protocol Buffers when it comes to serializing game resources. However, one can do much better performance-wise if willing to sacrifice some flexibility. What can be faster than to eliminate the process of serialization completely by using the same data stru...
by fips
Tue Jan 29, 2013 10:57 pm
Forum: Computer Talk
Topic: Biped Arduino project (FIPS-BOT-1), part 2 of n
Replies: 0
Views: 44453

Biped Arduino project (FIPS-BOT-1), part 2 of n

Part1 Part2 Part3 Part4 Part5 I've just received a Bluetooth Serial Port Wireless Module , which I'm going to use to control my robot . It's a pretty cheap $8 module from DX , nevertheless, instantly working without any problems. So I've made a quick setup involving a Putty Terminal allowing me to ...
by fips
Sat Jan 19, 2013 3:49 pm
Forum: Computer Talk
Topic: Explicit template instantiation (C++)
Replies: 0
Views: 43128

Explicit template instantiation (C++)

Writing generic code using C++ templates brings many inconveniences. I've recently decided to tackle 2 of them that irritates me the most: The namespace pollution caused by bringing to much dependencies into header files, and the necessity of recompiling the whole project after changing even a sligh...
by fips
Sun Jan 13, 2013 4:18 pm
Forum: Computer Talk
Topic: Biped Arduino project (FIPS-BOT-1), part 1 of n
Replies: 0
Views: 44226

Biped Arduino project (FIPS-BOT-1), part 1 of n

Part1 Part2 Part3 Part4 Part5 I've finally started working on my Arduino robot project. Originally, I wanted to build a four-legged robot, but later decided to make a simple biped instead. I rather wanted a robot with a strong personality :), which such a human-like creature might hopefully become....
by fips
Sat Jan 05, 2013 8:49 pm
Forum: Computer Talk
Topic: Using the std::weak_ptr as a handle (C++)
Replies: 0
Views: 44084

Using the std::weak_ptr as a handle (C++)

Although I'm a committed fan of handle-based systems when it comes to managing resources in the context of game development, I wanted to try another approach this time, something more resembling the contemporary C++ style. All that effort just for the sake of curiosity to see how it would compete. S...
by fips
Fri Dec 21, 2012 3:02 pm
Forum: Computer Talk
Topic: Nemo's Reef on iOS & Android is finally out!
Replies: 0
Views: 43194

Nemo's Reef on iOS & Android is finally out!

The Nemo game is finally out, check it out on: The App Store (iOS) or Google Play (Android) . It was made by Disney Mobile , Prague Studio. I was part of that team, mostly involved in the game engine running the game. I designed and implemented the Isometric framework which, among other cool things,...
by fips
Sun Dec 02, 2012 9:29 pm
Forum: Computer Talk
Topic: Yet another glOrtho, glFrustum & gluPerspective (OpenGL)
Replies: 0
Views: 45907

Yet another glOrtho, glFrustum & gluPerspective (OpenGL)

I've done a little bit of clean-up in my OpenGL projection routines and put the resulting source code here (see below). You might find it handy if you are looking for a replacement for glOrtho , glFrustum or gluPerspective , especially if you've just switched from the fixed to programmable graphics ...
by fips
Mon Nov 19, 2012 8:37 pm
Forum: Computer Talk
Topic: Blender 3D, Protocol Buffers, Python 2.x/3.x & PyCollada
Replies: 0
Views: 44204

Blender 3D, Protocol Buffers, Python 2.x/3.x & PyCollada

I've recently had this 'great' idea that I would pump nicely structured 3D data directly from Blender 3D into my Application using Google Protocol Buffers . Although it sounds incredibly simple and elegant it has its own big fat BUT ... Since the version 2.5, Blender 3D has been switched to Python 3...
by fips
Tue Nov 06, 2012 8:39 pm
Forum: Computer Talk
Topic: Passing data using the Array_ref wrapper (C++)
Replies: 0
Views: 45130

Passing data using the Array_ref wrapper (C++)

In C++ , It's been always a bit of dilemma for me how to pass arrays , raw data and strings around, especially if they come from a single compiled BLOB (as is quite common in the context of game development ) with a lifetime long enough that it outlives all the operations one needs to perform on it....
by fips
Sun Sep 30, 2012 4:52 pm
Forum: Computer Talk
Topic: Yet another string Tokenizer (C++)
Replies: 0
Views: 48275

Yet another string Tokenizer (C++)

There's certainly room for yet another C++ string Tokenizer , something lightweight and efficient for those who don't need the full power of the Boost.Tokenizer with all its pros and cons, something that can be easily plugged into an existing project without bringing too much dependencies . As I nee...
by fips
Sun Sep 16, 2012 1:56 pm
Forum: Computer Talk
Topic: Google Protocol Buffers in action (C++)
Replies: 0
Views: 65667

Google Protocol Buffers in action (C++)

I ran across Google Protocol Buffers quite some time ago in my regular pursuit of having a simple to use and efficient data exchange format that I would widely use in all my applications and tools . PB seemed quite promising in concept at that time, but I was too lazy to actually test it properly as...
by fips
Fri Aug 24, 2012 7:51 pm
Forum: Computer Talk
Topic: Record_pool - Sharing with explicit ownership (C++)
Replies: 0
Views: 46447

Record_pool - Sharing with explicit ownership (C++)

When designing a framework or piece of software in C++ , one has to make a fundamental decision right at the early stage of the project, which is: How to deal with object sharing? This is of critical importance as the chosen approach irreversibly affects the whole codebase. I recognize 3 major shari...
by fips
Mon Aug 06, 2012 9:58 pm
Forum: Computer Talk
Topic: Exposing object sequences via public data interfaces (C++)
Replies: 0
Views: 46749

Exposing object sequences via public data interfaces (C++)

More and more often, I design my code around object sequences rather than around individual objects. Having a single interface that manages the whole sequence brings a lot of flexibility and optimization opportunities on the implementation side. That’s exactly where the usual OOP methodology fails a...
by fips
Thu Jul 26, 2012 7:12 am
Forum: Computer Talk
Topic: Don't set, just swap! (C++)
Replies: 0
Views: 46513

Don't set, just swap! (C++)

There's still a bunch of people around who just love bringing tons of setters() , getters() and resetters() to type interfaces . It's certainly welcomed by the type users, but it brings hell to their maintainers, mainly due to the growing number of unmanageable execution paths that ultimately transf...
by fips
Tue Jul 24, 2012 8:09 pm
Forum: Computer Talk
Topic: C++ reflection - The simplest way
Replies: 0
Views: 46535

C++ reflection - The simplest way

First, I’m not going to show anything super-sophisticated here. Have a look at Boost Fusion if you are looking for a robust industrial solution for reflection in C++ . I’d rather talk about something simple and efficient, for those who appreciate keeping their code-base clean and flexible, without e...
by fips
Mon May 14, 2012 8:23 pm
Forum: Computer Talk
Topic: Evolution of the ultimate time-lapse machine
Replies: 0
Views: 58000

Evolution of the ultimate time-lapse machine

After buying my first digital SLR a few years ago, I found a great new use for my previous compact camera Canon Digital Ixus 400 . I quickly realized that Ixus could actually serve me as a perfect camera for Time-lapse photography. During the past few years, I had been more that satisfied with its i...
by fips
Wed Apr 11, 2012 8:15 pm
Forum: Computer Talk
Topic: PIMPL using std::unique_ptr with incomplete types (C++)
Replies: 0
Views: 51885

PIMPL using std::unique_ptr with incomplete types (C++)

I've been using the PIMPL idiom with great success in various scenarios, ranging from minimizing dependencies and speeding up compilation to hiding platform specific types on the implementation side. For example, all my OpenGL resources like Vertex Buffers, Textures, etc. lives peacefully behind PIM...
by fips
Mon Apr 09, 2012 4:03 pm
Forum: Computer Talk
Topic: Non-copyable, movable types in C++11
Replies: 0
Views: 49168

Non-copyable, movable types in C++11

I've just started to take advantage of the move semantics that C++11 offers. What I find especially convenient is the fact that I'm now able to define Non-copyable , movable types. So it's finally possible to pass by value without the fear of copy overhead. This technique also significantly reduces ...
by fips
Thu Mar 01, 2012 4:46 pm
Forum: Computer Talk
Topic: FontForge binaries for Windows and OSX
Replies: 0
Views: 43887

FontForge binaries for Windows and OSX

I've been recently doing some batch processing of TrueType fonts and came across FontForge , which is a really nice font editor with powerful scripting possibilities, exactly the kind of program one needs. It's all great except one thing: FontForge is distributed in the form of source code . It's to...
by fips
Mon Feb 27, 2012 9:49 pm
Forum: Computer Talk
Topic: C++0x / C++11 - Online resources
Replies: 1
Views: 52611

C++0x / C++11 - Online resources, cont.

GoingNative 2012 (Channel 9 Videos, msdn.com): Day 1: ● Day 1 Keynote - Bjarne Stroustrup: C++11 Style ● Threads and Shared Variables in C++11 (Hans Boehm) ● STL11: Magic && Secrets (Stephan T. Lavavej) ● Variadic Templates are Funadic (Andrei Alexandrescu) ● Interactive Panel: The Importan...
by fips
Wed Feb 01, 2012 10:48 pm
Forum: Computer Talk
Topic: Embedding Lua into executables using LuaJIT/FFI
Replies: 0
Views: 45386

Embedding Lua into executables using LuaJIT/FFI

I've been recently doing a bit of research on various Lua / C binding possibilities and came across LuaJIT with its pretty nice FFI library. I've been immediately impressed by how simple it is to expose C functions and datatypes directly to Lua without the need of writing a single line of C code or ...
by fips
Sun Jan 29, 2012 11:50 pm
Forum: Computer Talk
Topic: Data-oriented design & programming - A simple benchmark
Replies: 0
Views: 54010

Data-oriented design & programming - A simple benchmark

Since I've been recently very interested in Data Oriented Design (DOD) and wanted to have some real numbers at hand, I've decided to write a simple benchmark that compares the Object and Data Oriented approaches in a fictive particle system. Basically, I'm trying to measure the processing speed (sys...
by fips
Fri Jan 27, 2012 10:17 pm
Forum: Computer Talk
Topic: Reading time from the high-resolution performance counter
Replies: 0
Views: 43197

Reading time from the high-resolution performance counter

Since I've been recently in an urgent need of having a precise time source on Windows, I wrote the routine blow involving QueryPerformanceCounter . Luckily, I had recalled the problems of reading from the counter across multiple cores and resolved the issue as shown below: double time_sec() { static...
by fips
Mon Jan 16, 2012 10:45 pm
Forum: Computer Talk
Topic: Qt 4.8 / Visual Studio 2010 integration
Replies: 2
Views: 48567

Re: Qt 4.8 / Visual Studio 2010 integration

I've had my first negative experience with Qt (4.8) today. QFileSystemModel seems to be seriously broken. It takes 2 seconds to just load my home directory (on a Windows machine), and when connected to a QTreeView (through a QSortFilterProxyModel ), it slows UI response down considerably (e.g. when ...
by fips
Sun Jan 15, 2012 6:51 pm
Forum: Computer Talk
Topic: Qt 4.8 / Visual Studio 2010 integration
Replies: 2
Views: 48567

Re: Qt 4.8 / Visual Studio 2010 integration

I also like how is the UI glue code, generated by Qt Designer, hidden in its own class in the Ui namespace, so it doesn't interfere with my hand written code that drives the UI logic. Thanks to that my code stays clean and untouched by the generator and is very easy to refactor. Hurray! #include &qu...
by fips
Sun Jan 15, 2012 3:01 pm
Forum: Computer Talk
Topic: C++0x / C++11 - Online resources
Replies: 1
Views: 52611

C++0x / C++11 - Online resources

Here's a bunch of C++0x/11 online resources that I've collected recently. It would be nice to have here all the various materials that I came across in the past but I hadn't managed to make a proper list early. So this is an attempt to fix my failure... The list will hopefully grow soon: ● C++11 (wi...
by fips
Wed Jan 11, 2012 10:45 pm
Forum: Computer Talk
Topic: Qt 4.8 / Visual Studio 2010 integration
Replies: 2
Views: 48567

Qt 4.8 / Visual Studio 2010 integration

I am pretty impressed how simple it is to integrate Qt with Visual Studio 2010 . After installing Qt SDK and Visual Studio Add-in the only necessary manual step is to setup Qt Version by going to a newly created VS menu: Qt / Qt Options / Qt Versions / Add and pointing the version to: c:\<QtSDK>\Des...
by fips
Sat Oct 08, 2011 11:51 pm
Forum: Photography Talk
Topic: Nikon D7000 JPEG fine vs. JPEG basic evaluation
Replies: 0
Views: 50740

Nikon D7000 JPEG fine vs. JPEG basic evaluation

I like shooting both NEF + JPEG. Why JPEGs you might ask. Well, there are two reasons for that. First, I use JPEGs as a quick preview after downloading pictures from my camera, they also come in handy when I need to quickly send pictures to my friends in a zipped package or each time I need a single...
by fips
Fri Sep 23, 2011 7:13 pm
Forum: Computer Talk
Topic: The making of Another World
Replies: 2
Views: 44629

Another World - The 20th anniversary

by fips
Fri Sep 09, 2011 3:02 pm
Forum: Computer Talk
Topic: FipS' C++ coding style
Replies: 0
Views: 43173

FipS' C++ coding style

After all the years of coding in C++ and experiencing all the possible C++ coding styles in both commercial and hobby programming I've come to the conclusion that it's time to make things simple. So I've decided to get rid of both the camelAndPascalCase (we are not chemists , Right?!) for it's incon...
by fips
Thu Sep 08, 2011 4:25 pm
Forum: Computer Talk
Topic: Recursive C header guard generator in Python
Replies: 2
Views: 48009

Recursive C include to lower-case convertor

And here's another one that converts C includes (the part between quotes) to lower-case: #!/usr/bin/env python # Recursive C include to lower-case convertor, ver 1.0 # (c) 2011 Filip STOKLAS (FipS), http://www.4FipS.com # THIS CODE IS FREE - LICENSED UNDER THE MIT LICENSE import sys import os import...
by fips
Wed Sep 07, 2011 10:16 pm
Forum: Computer Talk
Topic: Recursive C header guard generator in Python
Replies: 2
Views: 48009

Recursive C header guard generator in Python

Here's a piece of Python code that I've put together today to help me automatically generate C header guards (I'm too tired of wasting my time by managing them manually, I don't want to do that any more!). Anyway, the script basically goes through the project structure and recursively scans header f...
by fips
Tue Aug 09, 2011 3:06 pm
Forum: Computer Talk
Topic: OpenGL ES 2.0 shader setup
Replies: 0
Views: 42620

OpenGL ES 2.0 shader setup

As I've found myself not remembering all this stuff, I've decided to put together a piece of pseudo code showing a typical command sequence for OpenGL ES 2.0 shader initialization and drawing. (Note that there's an alternative way to obtain vertex attribute locations using glGetAttribLocation(), but...
by fips
Mon Aug 08, 2011 6:20 pm
Forum: Computer Talk
Topic: QuakeCon 2011 - John Carmack's keynote
Replies: 0
Views: 44776

QuakeCon 2011 - John Carmack's keynote

There’re really some interesting points in the talk, mainly regarding the importance of the static code analysis and issues with interpreted languages and scripting in general. "Script interpreters are bad!, from performance / debugging / development perspective. We don't want people that are n...
by fips
Wed Jul 27, 2011 7:03 pm
Forum: Computer Talk
Topic: Missing ATOM feeds icon in phpBB 3.0.6
Replies: 1
Views: 48361

The ATOM feeds icon in phpBB 3.0.9

Note that in phpBB 3.0.9, Line1 & Line2 have been slightly modified: Put the code below between the two highlighted lines: (Line 1)<dt title="{forumrow.FORUM_FOLDER_IMG_ALT}"... <!-- IF S_ENABLE_FEEDS and forumrow.S_FEED_ENABLED --><a class="feed-icon-forum" title="{L_F...
by fips
Sun May 29, 2011 9:35 am
Forum: Computer Talk
Topic: Alice modelling reference (Project Alice #1)
Replies: 1
Views: 43289

Re: Alice modelling reference (Project Alice #1)

I quite like the approach they took with dark Alice in Madness Returns . It's a nice blend between Alice in Wonderland and Silent Hill . Well done! Alice: Madness Returns - Official Teaser Trailer Alice: Madness Returns - Beautiful Insanity Official Trailer Alice: Madness Returns Video Preview
by fips
Sat May 21, 2011 10:14 pm
Forum: Computer Talk
Topic: THOR: Son of Asgard for iPhone/iPod/iPad is out!
Replies: 0
Views: 42403

THOR: Son of Asgard for iPhone/iPod/iPad is out!

That's it! Thor is out, you can get it here . It was a painful job to meet the deadline, but we managed it (of course with a bit of crunching ;) I worked mainly on the engine side of the project, but also put my hands on a few game systems, and finally spent the last month or two by working on the m...
by fips
Sat May 21, 2011 9:21 pm
Forum: Computer Talk
Topic: phpBB - Integration of the new Facebook like button
Replies: 0
Views: 42005

phpBB - Integration of the new Facebook like button

I've just followed these few steps and managed to add the new Facebook Like button (the one with a number of likes). You can check the resulting button above, just below the topic. The whole procedure is pretty easy and takes aprox. 5 minutes.