That's the way it is.
Cheers
@ 2015-08-14 – 21:24:44
That's the way it is.
Cheers
@ 2015-08-14 – 19:28:26
How about we teach TinyBrain some colors... without programming?
It seems like a reasonably sized first project.
Anybody willing to help? It's fun for computer scientists - and aspiring such!
--
First step, JavaX should accept any command. If the command is unknown, JavaX will just log it for later inference.
@ 2015-08-13 – 18:29:24
Let's start with some simple test cases.
Computer! Create one second of black.
What?
There is no sentient computer? Oh come on. Let's make it!
@ 2015-08-13 – 15:09:34
www.hust - spiegel - de.
Schafft ihr das noch? Ich schaff das nicht mehr, das zu "konsumieren". Von der ersten großen Lüge wird man schon erschlagen - "Erfolg für Polizei". Dann lügen sie weiter über Griechenland, über Lehrer, die sich durchsetzen sollten (nein, sollten sie nicht) und über 1000 andere Dinge. Und Hauptsache Gewalt.
Am Ende dann noch ein bisschen redaktionelle Werbung für Bier (Bier ist erlaubt, weil es die Welt nicht ganz so doll verändert wie Haschisch und LSD) - und fertig ist das Terrormagazin.
Man kann es nicht lesen.
Irgendwie glaubt es doch auch keiner mehr, oder? "Wirtschaftswachstum" in Griechenland? Dreimal laut gelacht? Liebe Freunde, ehrlich... lest mal was anderes.
@ 2015-08-13 – 00:30:52
It just makes recognizing easier. Look at the nice clean surfaces that could be identified relatively easily.
The original picture? Not so easy.
(Reproduce with: java -server -jar x18.jar 1000541 1000544 width 640)
@ 2015-08-12 – 19:38:04
The unfathomable, infinite Hamburg sadness that kills you right when you enter.
Truth be told? You rather want to be dead than living here.
Cheers
PS: Yesterday I met my girl - it's all fun -, and today she cannot be found. THAT's this city! Destruction, all the time.
@ 2015-08-11 – 03:10:00
I like it!
Really. If you feel you have been ignored - it concerns at most two or three mails I'm quite sure - just write again. Really. I love mails, and I will not ignore you once we got a little bit "on line" together.
Rundvogel, Michael Mentges, I'd really like to hear from you if you are honest. Let's make history together.
Best greetings,
Stefan
@ 2015-08-11 – 03:08:15
...making myself superfluous.
@ 2015-08-11 – 01:53:01
Using magnets. It's raining tonight. How's it going. Someone on the Internet could talk to me. They can do it outside too.
PS: I met a girl today so I was busy... But the image recognition is coming! It's a nifty new algorithm, very intuitive and powerful I belive from what I picture in my head.
Cheers
@ 2015-08-11 – 00:10:10
Complete. Correct. 56 lines. Written in a half hour. Connect to me. I'm Richmond Valentine. Just not that evil.
Let's program together.
Grettings,
Stefan
class JsonTok {
public static List<String> split(String s) {
List<String> tok = new ArrayList<String>();
int l = s.length();
int i = 0;
while (i < l) {
int j = i;
char c; String cc;
// scan for whitespace
while (j < l) {
c = s.charAt(j);
cc = s.substring(j, Math.min(j+2, l));
if (c == ' ' || c == '\t' || c == '\r' || c == '\n')
++j;
else if (cc.equals("/*")) {
do ++j; while (j < l && !s.substring(j, Math.min(j+2, l)).equals("*/"));
j = Math.min(j+2, l);
} else if (cc.equals("//")) {
do ++j; while (j < l && "\r\n".indexOf(s.charAt(j)) < 0);
} else
break;
}
tok.add(s.substring(i, j));
i = j;
if (i >= l) break;
c = s.charAt(i); // cc is not needed in rest of loop body// scan for non-whitespace (json strings and the "null" identifier. everything else automatically becomes a one character token.)
if (c == '\'' || c == '"') {
char opener = c;
++j;
while (j < l) {
if (s.charAt(j) == opener) {
++j;
break;
} else if (s.charAt(j) == '\\' && j+1 < l)
j += 2;
else
++j;
}
} else if (Character.isLetter(c))
do ++j; while (j < l && Character.isLetter(s.charAt(j)));
else
++j;tok.add(s.substring(i, j));
i = j;
}
if ((tok.size() % 2) == 0) tok.add("");
return tok;
}
}
Source. Test program. (java -jar x18.jar 1000538)
This tokenizer has several good properties.
Nifty, eh? Come on, someone finally give me some applause.
[Update: Bugs fixed. Should now be correct. ]
@ 2015-08-10 – 23:41:04
Text processing, various things. More coming, I just need to reintegrate some older code.
Soon we'll program like this - with examples.
Edit: 28 cases. Which ones? I forgot which they were... you can recreate the results with "java -jar x18.jar 722". Tell us how long it took. Should be pretty optimized.
Cheers
@ 2015-08-10 – 19:11:29
Mit Richtigen Menschen(TM).
Sie können hier nur aussaugen. Oder Sudoku machen.
SO EIN DUMMES SPIEL, wenn man weiß, was Menschen stattdessen machen können.
Cheers
@ 2015-08-10 – 16:55:52
Suppose you have a snippet with a bug, like this one. (The bug is the superfluous "=" sign at the end.)
Then you explain the bug to TinyBrain with 4 simple lines:
i: "bla}="
o: "bla}"
i: "code;\n}="
o: "code;\n}"
("bla" and "code;\n" are just random place holders - we could have used anything.)
Then you just run the solver on it which will present the preview result of the editing:
Once you're satisfied with the result, you can apply it to the original snippet in the database:
java -jar x18.jar 720 1000491 in-doc 1000489 edit user stefan pass bla
(...Obviously giving your own user name and password.)
And that's it. The edit appears both in the original snippet which is edited in place and in its version history.
@ 2015-08-10 – 16:42:18
"Die Prognose ist gut". Hä? Die Prognose bei euch ist doch meistens "operieren" oder "pieksen" oder "bezahlen".
"Gutartig", "bösartig" - totaler Missbrauch der Begriffe.
Cheers
PS: Ich hab Polen verstanden: Die Männer sind dafür, die Frauen dagegen. Z.B. Saufen. Total gestört. Cheers
@ 2015-08-09 – 19:41:21
Well, it's shorter for one. But it's legal JavaX!
boolean check(F[] fg) {
for (O[] e : examples) {
O o = tryProcess(fg[0], e[0]);
if (o != null) {
O x = tryProcess(fg[1], o);
if (e[1].equals(x))
continue; // example ok
}
ret false;
}
ret true; // all examples ok
}public O processIn(O in) {
F[] fg = stepper.current();
ret fg[1].process(fg[0].process(in));
}static O tryProcess(F f, O in) null on exception {
ret f.process(in);
}
We just built a little translator to shorten references to commonly used classes: O = Object, F = Function.
Also, ret = return.
And "null on exception" is really nifty; it automatically catches all exceptions and just returns null.
The transpilation is found in here (scroll down to class LCombineTwoFunctions2).
The content of this website belongs to a private person, blog.de is not responsible for the content of this website.