Autor Beitrag
JayEff
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mo 09.04.07 01:37 
Morgeen.
Ich hab mir einen Codegenerator für Brainfuck geschrieben, nachdem ich mich eine Weile mit der ziemlich genialen IDE hier beschäftigt hab.
Mein Generator gibt einen seeehr suboptimalen Code aus, der aber erfreulicherweise lauffähig ist :)
Hier mal "Hello world!":
ausblenden Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
>+++[>+++[>++++++++<-]<-]<                        'field1:= 72'
++++[>++++[>>>+++++++<<<-]<-]                     'field2:= 112'
>>>.<<<                                           'field1: 72; field2: 112'
>>>>-----------.<<<<                              'field1: 72; field2: 101'
>>>>+++++++.<<<<                                  'field1: 72; field2: 108'
>>>>.<<<<                                         'field1: 72; field2: 108'
>>>>+++.<<<<                                      'field1: 72; field2: 111'
>>>----------------------------------------.<<<   'field1: 32; field2: 111'
>>>>++++++++.<<<<                                 'field1: 32; field2: 119'
>>>>--------.<<<<                                 'field1: 32; field2: 111'
>>>>+++.<<<<                                      'field1: 32; field2: 114'
>>>>------.<<<<                                   'field1: 32; field2: 108'
>>>>--------.<<<<                                 'field1: 32; field2: 100'
>>>+.<<<                                          'field1: 33; field2: 100'


Dann mal viel Spaß beim Gehirn ..ähm.. verwirren? :roll:

Edit: Für alle, die Brainfuck noch nicht kennen: de.wikipedia.org/wiki/Brainfuck
Einloggen, um Attachments anzusehen!
_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.


Zuletzt bearbeitet von JayEff am Mo 09.04.07 01:50, insgesamt 2-mal bearbeitet
BenBE
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 8721
Erhaltene Danke: 191

Win95, Win98SE, Win2K, WinXP
D1S, D3S, D4S, D5E, D6E, D7E, D9PE, D10E, D12P, DXEP, L0.9\FPC2.0
BeitragVerfasst: Mo 09.04.07 01:42 
Durch ein wenig Logik und Überlegen ließe sich der Code-Generator noch etwas Intelligenter machen ^^

_________________
Anyone who is capable of being elected president should on no account be allowed to do the job.
Ich code EdgeMonkey - In dubio pro Setting.
JayEff Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2971

Windows Vista Ultimate
D7 Enterprise
BeitragVerfasst: Mo 09.04.07 01:48 
user profile iconBenBE hat folgendes geschrieben:
Durch ein wenig Logik und Überlegen ließe sich der Code-Generator noch etwas Intelligenter machen ^^

Ja ne, is klar!
user profile iconJayEff hat folgendes geschrieben:
Mein Generator gibt einen seeehr suboptimalen Code aus

So extrem suboptimal wie der ist, *muss* er ja auf simple Art und Weise verbesserbar sein! :mrgreen:

_________________
>+++[>+++[>++++++++<-]<-]<++++[>++++[>>>+++++++<<<-]<-]<<++
[>++[>++[>>++++<<-]<-]<-]>>>>>++++++++++++++++++.+++++++.>++.-.<<.>>--.<+++++..<+.
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5284
Erhaltene Danke: 27

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Di 10.04.07 20:59 
lustigerweise bekomme ich beim starten immer folgenden fehler:
Zitat:

---------------------------
BFCG.exe - Komponente nicht gefunden
---------------------------
Die Anwendung konnte nicht gestartet werden, weil qtintf70.dll nicht gefunden wurde. Neuinstallation der Anwendung könnte das Problem beheben.
---------------------------
OK
---------------------------


ich kenne den fehler, der trat oftmals auf, wenn ich programme unter delphi7 geschrieben und auf anderen pcs getestet habe.

und kompilieren kann ich net, weil mir QClipbrd fehlt

(mit kleiner anpassung läuft das jetzt ;) )

cool wäre natürlich wenn der optimieren könnte. oder konstrukte wie for schleifen übersetzen kann, so als programmierhilfe.

mfg
Marco D.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 2750

Windows Vista
Delphi 7, Delphi 2005 PE, PHP 4 + 5 (Notepad++), Java (Eclipse), XML, XML Schema, ABAP, ABAP OO
BeitragVerfasst: Di 10.04.07 21:16 
Diese Fehlermeldung tritt bei mir dann auf, wenn ich die Unit QControls unter uses eingebunden habe. Kannst ja mal schauen, ob du das hast. ;) Vielleicht hat QClipbrd damit was zu tun. Was hat dieses Q eigentlich zu bedeuten? :gruebel:

_________________
Pascal keeps your hand tied. C gives you enough rope to hang yourself. C++ gives you enough rope to shoot yourself in the foot
jakobwenzel
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 1889
Erhaltene Danke: 1

XP home, ubuntu
BDS 2006 Prof
BeitragVerfasst: Di 10.04.07 21:30 
Das liegt wohl daran, dass da VCL und CLX gemischt wird. :wink:

_________________
I thought what I'd do was, I'd pretend I was one of those deaf-mutes.