Anyone know javascript

Recommended Videos

Zombie_Fish

Opiner of Mottos
Mar 20, 2009
4,584
0
0
DoPo said:
Wat? Is...is Malbolge the name of somebody's cat and this is what was produced after it spent a day walking on the keyboard?
Malbolge is named after the eighth circle of Hell. It's basically encrypted assembly language; when you run Malbolge it puts the code through a hash function and then runs the resulting assembly in an emulator. There's a lot more about it in its Wikipedia article [https://en.wikipedia.org/wiki/Malbolge] including a Hello World program, but in essence it is one of the hardest languages in existence.

EDIT: I use the word 'basically' far too much.
 

DoPo

"You're not cleared for that."
Jan 30, 2012
8,665
0
0
Zombie_Fish said:
DoPo said:
Wat? Is...is Malbolge the name of somebody's cat and this is what was produced after it spent a day walking on the keyboard?
Malbolge is named after the eighth circle of Hell. It's basically encrypted assembly language; when you run Malbolge is basically runs the code through a hash function and then runs the resulting assembly in an emulator. There's a lot more about it in its Wikipedia article [https://en.wikipedia.org/wiki/Malbolge] including a Hello World program, but basically it is one of the hardest languages in existence.
I somehow doubt it has widespread usage. Or...you know, usage. Looks like assembly scraped off from bathroom walls in hell.

Malbolge has eight instructions. Malbolge figures out which instruction to execute by taking the value at [c], adding the value of c to it, and taking the remainder when this is divided by 94. The final result tells the interpreter what to do:
...yeah. It's like that language that consisted of whitespaces - more for fun rather than usefulness. I hope I'm not wrong. Apparently MUMPS [http://thedailywtf.com/Articles/A_Case_of_the_MUMPS.aspx] exists and is actually used in industry.

LINES: important syntactic entities. Multiple statements per line are idiomatic. Scope of IF and FOR is "remainder of current line."

GLOBAL ARRAYS: arrays that start with a caret symbol. Stored on disk, available to all processes, persist when process terminates. This is M's main "database" mechanism.
And actually, if you don't even look at anything else, the featured comment might be enough to know about the language. Enough to kno whtat I never want to touch it

Build in obfuscation? oO

Appendix 7: An example of "traditional" M coding style



%DTC

%DTC ; SF/XAK - DATE/TIME OPERATIONS ;1/16/92 11:36 AM

;;19.0;VA FileMan;;Jul 14, 1992

D I 'X1!'X2 S X="" Q

S X=X1 D H S X1=%H,X=X2,X2=%Y+1 D H S X=X1-%H,%Y=%Y+1&X2

K %H,X1,X2 Q

;

C S X=X1 Q:'X D H S %H=%H+X2 D YMD S:$P(X1,".",2) X=X_"."_$P(X1,".",2)

K X1,X2 Q

S S %=%#60/100+(%#3600\60)/100+(%\3600)/100 Q

;

H I X<1410000 S %H=0,%Y=-1 Q

S %Y=$E(X,1,3),%M=$E(X,4,5),%D=$E(X,6,7)

S %T=$E(X_0,9,10)*60+$E(X_"000",11,12)*60+$E(X_"00000",13,14)

TOH S

%H=%M>2&'(%Y#4)+$P("^31^59^90^120^151^181^212^243^273^304^334","^",%M)+%D

S %='%M!'%D,%Y=%Y-141,%H=%H+(%Y*365)+(%Y\4)-(%Y>59)+%,%Y=$S(%:-

1,1:%H+4#7)

K %M,%D,% Q

;



[...]

From http://www.faqs.org/faqs/m-technology-faq/part2/

Actually, it also works as anti-plagiarism measure now that I think about it. I somehow doubt it'd work if you copy/paste this (unless you quote me, of course)
 

iphonerose

New member
May 20, 2011
365
0
0
Zombie_Fish said:
Thanks for your response. I was using the two functions in order to display specific error messages. I probably could have done it all in one function and specified which errors to display in which case but I thought I almost had it with the approach I was taking and was hoping to get it working


DoPo said:
Thanks so much for all your help. I need to do some research on reg exp's and mess around with a few different types. I don't know if I would ever have spotted the parameter issue so kudos for that too! No worries about the assumption, it didn't matter. I just....was correcting you for no reason :) I think it's refined enough for me now anyway!

Hagi said:
I'll definitely look into jQuery in the near future. Just thought I'd try and code as much myself to try and show I put more effort in than the other candidates...and purpose of the exercise was to "display coding knowledge". So that was my reason for opting not to use jQuery for this time alone

Let's hope I get now!!
 

DoPo

"You're not cleared for that."
Jan 30, 2012
8,665
0
0
iphonerose said:
DoPo said:
Thanks so much for all your help. I need to do some research on reg exp's and mess around with a few different types. I don't know if I would ever have spotted the parameter issue so kudos for that too! No worries about the assumption, it didn't matter. I just....was correcting you for no reason :) I think it's refined enough for me now anyway!
No problems. Best of luck with getting that internship. If you need additional pointers, you know where to find us :)
 

Hagi

New member
Apr 10, 2011
2,741
0
0
iphonerose said:
Hagi said:
I'll definitely look into jQuery in the near future. Just thought I'd try and code as much myself to try and show I put more effort in than the other candidates...and purpose of the exercise was to "display coding knowledge". So that was my reason for opting not to use jQuery for this time alone

Let's hope I get now!!
That works, doing it all yourself and throwing in a few regular expressions definitely shows a solid understanding of the basics.

Definitely don't delay using JQuery and other third party software though, a part of web development is in quickly finding and adapting existing material for your own use. They give you a lot of options and functionality that you otherwise wouldn't have the skill and/or time to develop yourself.

Not sure if design is part of the assignment but if you want to make it look sleek and awesome with a minimum of effort I'd take a look at bootstrap here: http://twitter.github.io/bootstrap/

Lots of cool stuff to be found there (and other places).
 

Zombie_Fish

Opiner of Mottos
Mar 20, 2009
4,584
0
0
DoPo said:
I somehow doubt it has widespread usage. Or...you know, usage. Looks like assembly scraped off from bathroom walls in hell.
Yeah. It's an Esoteric Programming Language, like Brainfuck or Whitespace as you mentioned in your post. There's a whole load of them in that 99 Bottles of Beer website; I would give a list of the ones I know but it would be too long to be interesting.

Actually, it also works as anti-plagiarism measure now that I think about it. I somehow doubt it'd work if you copy/paste this (unless you quote me, of course)
Apparantly Google's Closure Compiler [https://developers.google.com/closure/compiler/] is a good way of obfuscating JavaScript if you don't want people to copy your code. I've never tried it myself but it's something that looks pretty cool.

iphonerose said:
Thanks for your response. I was using the two functions in order to display specific error messages. I probably could have done it all in one function and specified which errors to display in which case but I thought I almost had it with the approach I was taking and was hoping to get it working
Fair enough. You could probably compress it all into one function anyway if you want to still have specific error messages while reducing function calls.

Also, good luck with the Internship application. As DoPo said, you know who you can speak to, both about specific programming issues and more general things with the application process - I had to apply to six companies before being accepted this summer. =D
 

DoPo

"You're not cleared for that."
Jan 30, 2012
8,665
0
0
Zombie_Fish said:
Apparantly Google's Closure Compiler [https://developers.google.com/closure/compiler/] is a good way of obfuscating JavaScript if you don't want people to copy your code. I've never tried it myself but it's something that looks pretty cool.
Hey, thanks for that link. Looks...interesting. I don't know how or why I'd need code obfuscation with JS (if there is security involved, I wouldn't do it in JS to begin with), however the analysis and minification sounds interesting. I might actually find a use for that somewhat soon-ish, too.
 

iphonerose

New member
May 20, 2011
365
0
0
Zombie_Fish said:
Fair enough. You could probably compress it all into one function anyway if you want to still have specific error messages while reducing function calls.

Also, good luck with the Internship application. As DoPo said, you know who you can speak to, both about specific programming issues and more general things with the application process - I had to apply to six companies before being accepted this summer. =D
Got the internship :)
 

DoPo

"You're not cleared for that."
Jan 30, 2012
8,665
0
0
iphonerose said:
Got the internship :)
This calls for a celebration


Well done =)

EDIT: Broken'd gifs removed... :/
 

iphonerose

New member
May 20, 2011
365
0
0
DoPo said:
iphonerose said:
Got the internship :)
This calls for a celebration


Well done =)

EDIT: Broken'd gifs removed... :/
Haha thanks! I knew what a couple of them were supposed to do ;) appreciate the fresh prince one thrown in-bitta the 90s :)
 

Zombie_Fish

Opiner of Mottos
Mar 20, 2009
4,584
0
0
iphonerose said:
Got the internship :)
Sorry for not responding sooner; my course is a bit deadline-happy right now.

Anyway, congrats. Will the Internship be more Web Design like this project, or something else programming related?
 

iphonerose

New member
May 20, 2011
365
0
0
Zombie_Fish said:
iphonerose said:
Got the internship :)
Sorry for not responding sooner; my course is a bit deadline-happy right now.

Anyway, congrats. Will the Internship be more Web Design like this project, or something else programming related?
No worries at all! The internship is for a mobile app development company. I'm doing a lot of the server side stuff now. I'm just getting pieces of code to work on a browser and giving it to a co-worker who slots it into his code for the mobile app. I don't really know if 'internship' is what it should be called. There's no training whatsoever, they're just basically telling me to do things. I don't know how to do them. I google. The cycle goes on :/