Sun pensa ad un desktop 3D per Linux

Sun pensa ad un desktop 3D per Linux

Sun ha annunciato lo sviluppo di un sistema desktop 3D per piattaforma Linux

di pubblicata il , alle 17:42 nel canale Programmi
 
36 Commenti
Gli autori dei commenti, e non la redazione, sono responsabili dei contenuti da loro inseriti - info
Andala07 Febbraio 2004, 16:47 #21
Dov'è il broblema in un OS in Java?

Io uso OS/2 Warp 4 che è programmato in Java ed è un razzo.
Ikitt_Claw07 Febbraio 2004, 17:27 #22
Originariamente inviato da Andala
Io uso OS/2 Warp 4 che è programmato in Java ed è un razzo.


Link? Fonte?
HexDEF607 Febbraio 2004, 17:42 #23

Re: Re: x Kralizek...

Originariamente inviato da erupter
<--SNIP-->
Ciò semplicemente significa che il Kernel te lo scordi che lo fanno in .NET, C# o quel che ti pare.
Sarà sempre e comunque in un linguaggio compilato, come C++.


Qualcuno dice che fare un kernel in C++ sia un grave errore (quel qualcuno e' un certo Linus!) molto meglio usare il C.


Altra cosa:
sicome non ne so molto di .net, ma e' un inguaggio interpretato/compilato/ o come java (come si dice? compilato per macchina virtuale?)?
interpretato mi pare impossibile (come fai un kernel interpretato???? devi avere qualcosa che fa girare l'interprete!)
compilato per macchina viruale come java?? (e chi fa girare la macchina virtuale???)

Quindi .net dovrebbe essere compilato (come il C per intenderci).. ma cosa ha in piu' del C o del C++ ???
Grazie per la spiegazione (mi basta una descrizione in due righe, non ho voglia di approfondire)

Ciao!
cdimauro07 Febbraio 2004, 20:23 #24

Re: Re: Re: x Kralizek...

Originariamente inviato da HexDEF6
Qualcuno dice che fare un kernel in C++ sia un grave errore (quel qualcuno e' un certo Linus!) molto meglio usare il C.

Forse ricorderai male: così come l'hai riportata, è un'affermazione un po' troppo azzardata. Il C++ è un linguaggio molto più ricco del C (sintatticamente), e usarlo non vuol dire necessariamente perdere in prestazioni.
Anzi, dovrebbe essere usato per facilitare la scrittura e la leggibilità del codice.
Altra cosa:
sicome non ne so molto di .net, ma e' un inguaggio interpretato/compilato/ o come java (come si dice? compilato per macchina virtuale?)?
interpretato mi pare impossibile (come fai un kernel interpretato???? devi avere qualcosa che fa girare l'interprete!)
compilato per macchina viruale come java?? (e chi fa girare la macchina virtuale???)

Quindi .net dovrebbe essere compilato (come il C per intenderci)..

.NET, che io ricordi, dovrebbe permettere di scegliere fra tre livelli, in quanto ad efficienza del codice generato. Si può lasciare il codice totalmente interpretato (alla Java), oppure compilato molto velocemente, o infine compilato con le migliori ottimizzazioni
ma cosa ha in piu' del C o del C++ ???
Grazie per la spiegazione (mi basta una descrizione in due righe, non ho voglia di approfondire)

Ciao!

Non confonderti: .NET non è un linguaggio, ma un framework. Puoi scegliere il linguaggio che più ti aggrada per lavorare, e generare codice in formato .NET.
erupter07 Febbraio 2004, 20:54 #25
Originariamente inviato da Andala
Dov'è il broblema in un OS in Java?

Io uso OS/2 Warp 4 che è programmato in Java ed è un razzo.



Ha ha
Ma non farmi ridere!
Il java è uguale al .NET: ha bisogno di una macchina virtuale (Java Virtual Machine) per funzionare, in quanto è un linguaggio non compilato, come php o xtml; una volta generato ci deve essere un interprete attivo per eseguire le istruzioni.
Vediamo di non spararne di così grosse, che poi certa gente si rivolta nelle tombe e i becchini sono oberati di lavoro
erupter07 Febbraio 2004, 20:57 #26

Re: Re: Re: x Kralizek...

Originariamente inviato da HexDEF6
sicome non ne so molto di .net, ma e' un inguaggio interpretato/compilato/ o come java (come si dice? compilato per macchina virtuale?)?


.NET è il Java di MS, copia bella e buona anche se ovviamente migliorato e più potente.
Fondamentalmente è una virtual machine che offre funzionalità eccezzionali rapportato al Java.
Dal .NET sono poi stati derivati i linguaggi fondamentali (tipo C#) standalone che incorporano funzioni avanzate di .NET nei compilatori standard.
HexDEF607 Febbraio 2004, 22:23 #27

Re: Re: Re: Re: x Kralizek...

Originariamente inviato da cdimauro
Forse ricorderai male: così come l'hai riportata, è un'affermazione un po' troppo azzardata. Il C++ è un linguaggio molto più ricco del C (sintatticamente), e usarlo non vuol dire necessariamente perdere in prestazioni.
Anzi, dovrebbe essere usato per facilitare la scrittura e la leggibilità del codice.


Io ovviamente non sono un esperto di c e c++ ma ecco qua cosa si dice (parlando del kernel di linux)
Il tutto lo puoi trovare qui:
http://kerneltrap.org/node/view/2067

A recent posting to the lkml requested help in porting the C++ Click Modular Router kernel module from the 2.4 stable kernel to the 2.6 stable kernel. The request was for ideas on fixing C++ related compilation errors, but the thread quickly turned into a lengthy debate on whether or not C++ had a place in the Linux kernel. The issue has been debated many times before, long ago earning its own entry in the lkml FAQ which offers numerous reasons why the kernel is not written in C++.

During the recent discussion, when it was suggested that perhaps the kernel is written in C simply because "we've always done it that way...", Linux creator Linus Torvalds joined in to explain:

"In fact, in Linux we did try C++ once already, back in 1992. It sucks. Trust me - writing kernel code in C++ is a BLOODY STUPID IDEA.

"The fact is, C++ compilers are not trustworthy. They were even worse in 1992, but some fundamental facts haven't changed: 1) the whole C++ exception handling thing is fundamentally broken. It's _especially_ broken for kernels. 2) any compiler or language that likes to hide things like memory allocations behind your back just isn't a good choice for a kernel. 3) you can write object-oriented code (useful for filesystems etc) in C, _without_ the crap that is C++."


Ciao!
cdimauro08 Febbraio 2004, 08:07 #28
Grazie per link: anche se il thread è molto lungo, è stato un piacere leggerlo. Mi spiace che tu abbia riportato il solo commento di Torvalds, perché francamente mi ha molto deluso. T'invito, sei hai tempo, a leggerti bene quel thread per farti un'idea migliore di cosa voglia dire utilizzare il C++ o il C come linguaggio di programmazione per il kernl: i commenti sono molto interessanti. In particolare ne ho scelto uno, che ti riporto, che si trova maggiormente d'accordo con la linea di pensiero sull'argomento:

"Still easy to handle in C++
Insightful comment posted by Anonymous on Thursday, January 22, 2004 - 07:51

This is what set_new_handler() is for, and why you have the placement new syntax (which allows you to provide your own memory, and have the object constructed in it, instead of making the C++ runtime allocate the memory), and why you can override the "new" operator.

Anyone that claims that C++ has unpredictable behavior is high overhead simply doesn't know C++ well enough - the C++ standard was developed according to a very strict guideline: You don't have to pay for what you don't use.

It's perfectly legal in C++ to use C memory management, and you can even instantiate C++ objects in that memory.

If you don't use virtual methods, your objects will take the same space as an equivalent C struct.

If you don't need exceptions, no code to handle them need be generated.

If you don't need (or can't) use iostreams for IO, you can ignore it, and any decent compiler will let you link with your own startup code and C++ runtime if you need to make sure you're not dragging it around.

If you don't need multiple inheritance, don't use it and there will be no thunks or other cruft messing up your code
.

To summarize, you get what you decide is worthwhile for your application, and doesn't pay for the rest.

And you get the same reliability in terms of predictable memory management etc. as you have with C unless you SPECIFICALLY DECIDE TO DO SOMETHING ELSE. Nothing is magically allocated or deallocated in C. The memory management is well defined:
- If you call new, you will either end up in the class operator new, or in the new handler (which you can change with set_new_handler() if you have a particular need) - you have control over which by deciding which of these methods to use - and the default new handler will obtain memory.
- If you need a specific function to be called to obtain memory, you override operator new (if a specific class needs a specific type of memory) or change the new handler. The new handler can be 1-2 lines of code if you have simple needs.
- Objects on the stack are deleted when they go out of scope JUST LIKE IN C. The only difference being that destructors are called IF YOU HAVE DEFINED THEM.
- Objects on the heap are deleted when you call delete, just as if you'd called free() in C. Again destructors are called IF YOU HAVE DEFINED THEM.

Nothing is fundamentally different from C there. You can do all of what C++ does in C (there are still C++ compilers out there that generate C code instead of assembler, which is proof enough), and all of the features that set C++ apart from C are optional - you don't need to use them if they don't give you any benefits.

C++ doesn't assume anything about how it's environment works. Certain functionalities of C++ put specific requirements on the available runtime, but it's up to you whether or not they are suitable for your use, just like you don't go around indiscriminately using C libraries just because they are there, without evaluating if they are appropriate.

As for optimizations, that is a quality of implementation issue with regards to compilers, not a language issue."

Il grassetto e il corsivo li ho aggiunti io. Comunque l'intero post è interessante e spero che aiuti a far riflettere su cosa significhi utilizzare un linguaggio di programmazione piuttosto che un altro. In estrema sintesi il C++ può essere usato esattamente come il C, ma in più offre una serie di strumenti che possono essere utilizzati a seconda della tipologia dei problemi, aiutando nello sviluppo e nel mantenimento del codice. Un buon programmatore C++ sa quali aspetti del linguaggio utilizzare a seconda dello scopo. Ma bisogna, appunto, essere dei buoni conoscitori del linguaggio: altrimenti è facile uscirsene fuori con dei post tendenzialmente falsi e/o sempliciotti come quello che hai riportato (ovviamente non ce l'ho con te )...

Ciao
Andala08 Febbraio 2004, 20:08 #29
Ikitt_Claw
Link? Fonte?


Così c'è scritto sul manuale.

erupter
Ha ha
Ma non farmi ridere!
Il java è uguale al .NET: ha bisogno di una macchina virtuale (Java Virtual Machine) per funzionare, in quanto è un linguaggio non compilato, come php o xtml; una volta generato ci deve essere un interprete attivo per eseguire le istruzioni.
Vediamo di non spararne di così grosse, che poi certa gente si rivolta nelle tombe e i becchini sono oberati di lavoro



Di tutto quello che hai scritto non ho capito nulla.
Intanto Warp 4 lo uso, Java è dentro, va tutto alla grande e ci faccio quasi tutto quello che mi serve, mentre voi rincorrete OS dell'ultimo grido.
cdimauro08 Febbraio 2004, 22:34 #30
Se non hai capito il problema è soltanto tuo...

Quanto al resto, il fatto che ti vada "tutto alla grande" non vuol dire che Java sia la soluzione migliore. La soluzione migliore (prestazionalmente) è rappresentata chiaramente dal codice compilato, e su questo non c'è virtual machine che tenga, sia essa Java o .NET...

Devi effettuare il login per poter commentare
Se non sei ancora registrato, puoi farlo attraverso questo form.
Se sei già registrato e loggato nel sito, puoi inserire il tuo commento.
Si tenga presente quanto letto nel regolamento, nel rispetto del "quieto vivere".

La discussione è consultabile anche qui, sul forum.
 
^