El Fubu

Welcome to a low in KB page (Except for Video Thumbnails)

CLI Recommendations - 2018-05-11 20:51:09

Lately I have been using a lot CLI (Command Line Interface) applications for everything, mainly because they enhance the just keyboard user expirence along with a great functionallity with a low resource footprint. Yes, it may be harder to use them and harder to configure, but I think the outcome is satisfiying.

I will introduce a bit the applications and where to start without much detail, because there’s a lot of documentation already available :).

Connecting to modern Instant Messaging services with an MSX - 2018-04-08 20:11:15

Hello!

It has been a while since the last post. Yes I’m alive.

So, in this post I will introduce you to two marvelous concepts:

  • BitlBee
  • IRC on an MSX with an TCP/IP UNAPI compatible network card.

Let’s begin…

Introduction

Why would you do that? I mean, there are more efficient ways to communicate with other people that require less effort, right?

Well, here are my two cents for the first point, BitlBee. BitlBee is a service that acts as a gateway for several instant messaging services, e.g. Facebook Messenger, Google Hangouts or Slack. Ok, but… a gateway to what? IRC, of course.

MSX2 Sony HB-F5: SCART to Japanese21 - 2017-09-30 18:10:15

We have adapted a standard European SCART cable to use it with an MSX2 HB-F5. You have to change the pins of one of the ends (the connector that will be on the MSX) as follows:

**SCART – Japanese21

** X means not connected.

  • 1 – X
  • 2 – 6
  • 3 – X
  • 4 – 3
  • 5 – 8
  • 6 – 2
  • 7 – 20
  • 8 – X
  • 9 – 7
  • 10 – X
  • 11 – 19
  • 12 – X
  • 13 – 13
  • 14 – 14
  • 15 – 15
  • 16 – 16
  • 17 – 17
  • 18 – 18
  • 19 – X
  • 20 – 10

Z80 For Loop - 2017-07-05 08:10:27

WHILE - FOR:

We usually use B as counter. The main trick here is that DJNZ decrements the counter in B and then checks, so that you don’t need to do two operations.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
LD C, 5
LD A, 0
LD B, 100

.NEXT2:
push BC
LD B, 10
  
.NEXT:
ADD A, C
DJNZ .NEXT
pop BC
      
DJNZ .NEXT2

SparkR gapply mess - 2017-05-12 08:56:31

Hello,

Do not assume anything. Never. Ever. Specially with SparkR (Apache Spark 2.1.0).

When using the gapply function, maybe you want to return the key to mark the results in a function as follows:

countRows <- function(key, values) {
    df <- data.frame(key=key, nvalues=nrow(values))
    return(df)
}   

count <- gapplyCollect(data, "keyAttribute", countRows)
countRows <- function(key, values) {
    df <- data.frame(key=key, nvalues=nrow(values))
    return(df)
}   
count <- gapplyCollect(data, "keyAttribute", countRows)

SURPRISE. You can’t.

You should get this error:

Error in match.names(clabs, names(xi)): names do not match previous names

Well, that’s weird. Why is this happening?