Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Additional programming languages

This thread is locked; no one can reply to it. rss feed Print
Additional programming languages
Matthew Leverton
Supreme Loser
January 1999
avatar

bamccaig said:

When I visit your Web site it better not affect my computer

Beyond that, what if the device has no file system? How do you write an application with super privileges without any idea of what platform you are targeting?

With source code (that is to be compiled), you have a messy set of conditional #ifdef blocks and you generally only target a few platforms like OS X 10.6+ or Windows.

The current HTML5 sandbox already solves these problems. Regarding files, you can save to local key/value storage, local databases, and config (cookies). Of course you cannot specify a specific path, but that concept is not portable.

So you end up needing to build a sandbox for your new language that does the same thing, and...

axilmar said:

I already told you: a) incompatibilities between browsers, and b) the slow development of the standards.

... you still end up with those two problems. Not every sandbox will be the same (some people will enhance theirs, or leave features out), and new APIs will be slow to be developed.

Specter Phoenix
Member #1,425
July 2001
avatar

Wow, that debate has gone on longer than I thought it would. Figured he would have gave up on his point by now about it being a programming language. I know it isn't a programming language (otherwise it would be HTPL instead of HTML), but never knew someone would actually argue making something fairly simple and completely useless in programming into a programming language :o.

Trezker
Member #1,739
December 2001
avatar

But you can write to file. I think it's called cookies...

I much rather have the website store everything serverside though, until I actively choose to download it.

The only information from a website that should be stored on my computer automatically should be a session id. And even that should be deleted when I close the browser.

Really, why should cookies even need to exist? I think the browser could just store session ids in memory instead.

bamccaig
Member #7,536
July 2006
avatar

Trezker said:

Really, why should cookies even need to exist? I think the browser could just store session ids in memory instead.

  • They allow you to store site specific settings without a user account or login.

  • They allow logins to persist for unlimited amounts of time, across reboots and shutdowns.

Matthew Leverton
Supreme Loser
January 1999
avatar

Session cookies aren't saved to disk.

Jonatan Hedborg
Member #4,886
July 2004
avatar

Trezker said:

The only information from a website that should be stored on my computer automatically should be a session id. And even that should be deleted when I close the browser.

Most browsers have this option. Enjoy logging in 200 times per day!

Trezker
Member #1,739
December 2001
avatar

I only restart my browser when it breaks down too badly. So I'd only have to log in like once a week or thereabouts.

I searched Firefox and couldn't find any option to only allow storage of session cookie.

Matthew Leverton
Supreme Loser
January 1999
avatar

network.cookie.lifetimePolicy=2

SiegeLord
Member #7,827
October 2006
avatar

I use the CookieSafe to control the lifetimes of my cookies (websites that I trust can place long term cookies... everbody else either gets no cookies at all, or those that get deleted at the end of a session).

"For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18
[SiegeLord's Abode][Codes]:[DAllegro5]:[RustAllegro]

flowbsd
Member #13,650
October 2011

I set the firefox to store the cookies until I close firefox and clear everything when I exit firefox. I would like to type login information everytime.

____________________________________
3D Egg | OpenGL Forum

jhuuskon
Member #302
April 2000
avatar

These days I find myself using only C#, G-code and RAPID. And the occasional Visual Basic.

You don't deserve my sig.

Specter Phoenix
Member #1,425
July 2001
avatar

I have messed with tons of languages over the years (some programming, some scripting, and some web dev). C, C++, C#, Java, Python, Perl, Ruby, Visual Basic, PHP, HTML, CSS, Javascript, BASIC, Assembly, Haskell, Erlang, J#(think that was it), Scheme, Common Lisp, ASP.NET, D, and God knows what else I've played with in the past that I may have forgot.

[REVISION]
Bored and playing with XML and CSS right now. http://twitpic.com/8y3t1y (added)

axilmar
Member #1,204
April 2001

With canvas + JavaScript you can do anything you want within the sandbox that the browser provides.

Canvas + Javascript is a very inefficient solution. That's why someone earlier said that doing your own font rendering engine is for masochists.

Quote:

You can complain about what that sandbox provides, but your solution is the same thing... just using slightly different tools.

No, my solution is not the same thing at all, because the API the browser would provide would be more lower-level than what it currently has. And a more lower level API would open for more possibilities.

Quote:

And, by the way, compiling source code can lead to incompatibilities ... look at gcc vs Visual C++. You're just trading one set of problems for a similar set.

Not if the language is well-defined.

Quote:

For ing good reason. >:( When I visit your Web site it better not affect my computer in any ing way.

That's what the sandbox is for. The web page you download already affects your computer anyway.

Beyond that, what if the device has no file system?

There are no devices that I know of that have no filesystem. Care to show us one?

Quote:

How do you write an application with super privileges without any idea of what platform you are targeting?

Why should you need to write a web application with super privileges? that's not part of the discussion we are having anyway.

Quote:

With source code (that is to be compiled), you have a messy set of conditional #ifdef blocks and you generally only target a few platforms like OS X 10.6+ or Windows.

That concerns C and C++. If you make the downloaded code in C or C++, then you deserve to get that.

But there are other possibilities out there. Even (*gasp*) new programming languages.

Quote:

The current HTML5 sandbox already solves these problems.

My proposal did not introduce those problems anyway.

Quote:

Regarding files, you can save to local key/value storage

If you are talking about web storage, that's very limited and inefficient (due to storing strings only), and not yet a standard.

Quote:

, local databases

Nope. Not part of the web specification, as far as I know.

>, and config (cookies).

Terrible solution.

Quote:

So you end up needing to build a sandbox for your new language that does the same thing, and...

A better sandbox that opens new capabilities.

Quote:

... you still end up with those two problems. Not every sandbox will be the same (some people will enhance theirs, or leave features out), and new APIs will be slow to be developed.

Not if the browser API contains better primitives than it currently supports.

It's not the same to provide, let's say, a text box, and the means to implement said text box. The former is fixed functionality, the latter is not. There is a great difference.

Matthew Leverton
Supreme Loser
January 1999
avatar

axilmar said:

Canvas + Javascript is a very inefficient solution.

VMWare recently announced a real time remote desktop over HTML5 with canvas. WebGL gives you 3D support.

Quote:

not yet a standard.

Semantics. When there is a paper that standardizes something and all the major players adapt it, I consider it a feature. On the contrary, you can publish your superior work as a final standard, but nobody will implement it. De facto standards are all that ever have mattered on the web.

I don't really care to reply point-by-point. I'll just leave it as I agree that the current web technologies are sloppy, but I don't think anything you are suggesting is at best anything but minor, incremental improvements.

axilmar
Member #1,204
April 2001

VMWare recently announced a real time remote desktop over HTML5 with canvas. WebGL gives you 3D support.

We will see how it goes, and which browsers run it in good speed.

Quote:

Semantics ... De facto standards are all that ever have mattered on the web.

That's valid if all players adopt it. Otherwise, one has to account for the players that have not adopted it yet.

Quote:

I don't really care to reply point-by-point. I'll just leave it as I agree that the current web technologies are sloppy, but I don't think anything you are suggesting is at best anything but minor, incremental improvements.

By all means, let's hear your suggestions.

Matthew Leverton
Supreme Loser
January 1999
avatar

If you're talking about practical suggestions given the current state of things, then I don't really think there are many.

The main problem has always been getting companies (Microsoft, Google, Apple, etc) to work together to implement the same things at the same time, and to get end users to stay up-to-date. Java was well defined (and similar to what you are describing), yet that didn't stop Microsoft from doing its own thing.

verthex
Member #11,340
September 2009
avatar

Anyone notice how the op of this thread has not once chimed in...

Specter Phoenix
Member #1,425
July 2001
avatar

verthex said:

Anyone notice how the op of this thread has not once chimed in...

Well the OP did say:

In addition to C and C++, what languages do you find useful on a regular or niche basis in your life as a programmer, and why?

Guess it didn't apply to him as he never answered.

MiquelFire
Member #3,110
January 2003
avatar

Maybe deathwish is up to his old ways again.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

Specter Phoenix
Member #1,425
July 2001
avatar

Maybe deathwish is up to his old ways again.

What? Huh? Who? Maybe Chris just wanted to get everyone's take on other languages to give him an idea on what to do next? Just guessing though. Could just be he made a 'what the hell' thread in that he did it just to get forum activity up more? ???

decepto
Member #7,102
April 2006
avatar

I've been addicted to Lua for the past 9 months or so.

LuaJIT's ffi bindings and native C callbacks is what really sold it for me. Not to mention that LuaJIT is blazing fast. The argument of "Use Lua, but write performance critical code in C/C++" holds a lot less water these days.

--------------------------------------------------
Boom!

Specter Phoenix
Member #1,425
July 2001
avatar

I've looked into LUA and Python but never messed with C++/LUA or C++/Python together.

decepto
Member #7,102
April 2006
avatar

but never messed with C++/LUA

That's the beauty of the ffi bindings. You don't have to write bindings. LuaJIT can call functions directly from a library. All you need to do is let Lua know which library you want to use, and what the function signature is.

local some_defs = "unsigned int My_Long_Ass_C_Function_That_Does_everything( int are_you_awesome );"

ffi.cdef( some_defs )

local my_library = ffi.load( "my_library.dll" or "my_library.so", etc )

print( my_library.My_Long_Ass_C_Function_That_Does_everything( true ) )

Any library out there that's written in C is instantly usable, so long as you provide the header file (i.e., function signatures) to Lua. Imagine the possibilities!

--------------------------------------------------
Boom!

Specter Phoenix
Member #1,425
July 2001
avatar

Can't even remember if I have LUA installed in Ubuntu. I know I have a butt load of languages installed on my Vista box, but lately I only boot to it for games. I stay under Ubuntu for coding (whatever I get bored and decide to kick out).

[REVISION]
Waiting for my book to come. Was supposed to be here today, but think it will be here tomorrow.

bamccaig
Member #7,536
July 2006
avatar



Go to: