Visual Studio cross platform is now released, and free!!!
Re: Visual Studio cross platform is now released, and free!!
In Python we can do inline C/ASM or even invoke compiled libs such as libc using ctypes. Enter the Matrix. Do you choose the red pill or the blue pill? :-)eriksank wrote:Yes, coreutils for native bricks. But then again, only the inner loop of things needs to be done in native code. Everything else can be scripted. For that, we have a good core in C: kernel, libC, and tools that run directly on top of that. For my work, I rarely need to add to the native core. Most of the times, that work has been done by someone already.
Code: Select all
>>> from ctypes import *
>>> libc.printf
<_FuncPtr object at 0x...>
>>> print windll.kernel32.GetModuleHandleA
<_FuncPtr object at 0x...>
I hope languages like C get replaced by memory safe languages soon, but that's another discussion.
By the way, OD, have you ever considered learning Haxe? I think you might appreciate it. http://haxe.org/
Re: Visual Studio cross platform is now released, and free!!
Every scripting engine needs to be able to expose C functions. That mechanism must always exist somewhere, because otherwise the scripting engine would not have access to the libC and therefore also not to the kernel. That is why it is always possible to expose C functions that allow to do this on the fly, such as libffi or dyncall:BOFH wrote:In Python we can do inline C/ASM or even invoke compiled libs such as libc using ctypes.
https://github.com/atgreen/libffi
http://www.dyncall.org
There are other alternatives, but these are certainly the most popular ones. Apparently, according to its source code, python has implemented ctypes using libffi:
https://github.com/python/cpython/tree/ ... pes/libffi
Of course, the other scripting engines also wrap and expose libffi:
nodejs/javascript: https://github.com/node-ffi/node-ffi
lua: https://github.com/jmckaskill/luaffi
...
As I said, it is always possible to expose libffi (or similar) from any scripting engine, simply because the engine must always be able to expose C functions.
C is not memory-unsafe. C is: refusing to make a memory management choice. This is normal. Memory management is a set of functions. Why impose a set of functions to all programs, while different programs have to meet different requirements? Something that runs as a browser extension has other memory issues than something that runs as a kernel module. Furthermore, nothing prevents anybody from appointing a garbage collector, such as libgc, and stop worrying about memory management altogether. But then again, garbage collection is not suitable for all possible situations. Therefore, this kind of decisions has been left as an option. In other words, what you are proposing is to remove the choice of memory management from the C programmer. That will never be accepted, if only, because it is not needed.BOFH wrote:I hope languages like C get replaced by memory safe languages soon, but that's another discussion.
It seems like a weird idea in which they use an optionally-statically-typed language to mostly target dynamically-typed languages. Furthermore, it does not sound like an attractive idea to, for example, debug javascript errors in haxe. Furthermore, it does not really fulfil a real need, because any such need has obviously already been fulfilled by the target languages themselves. Imagine that you want an algorithm in both C++ and javascript? We already have that, with projects like emscripten. What is typical, is that they obviously consider haxe to be a "better" language than the target languages, but why? Why would it be better? They never show an example for that. So, it is clear that they believe Haxe to be better on grounds of unspoken ideologies in language design. So, programmers would have to adopt haxe, based on some kind of unchallengeable manifest of the one and only true communist party.BOFH wrote:By the way, OD, have you ever considered learning Haxe? I think you might appreciate it. http://haxe.org/
Re: Visual Studio cross platform is now released, and free!!
Yes, but not every scripting engine enables you to load any shared object and invoke its functionality. Especially not as beautifully as Python ctypes. PHP has been mentioned repeatedly in this thread. To extend a single PHP source file with a custom C library a developer needs to compile a module for the whole interpreter and enable it in all code. It's more of a nightmare solution than wet dream.eriksank wrote:Every scripting engine needs to be able to expose C functions.
Being able to do != doing.eriksank wrote:As I said, it is always possible to expose libffi (or similar) from any scripting engine, simply because the engine must always be able to expose C functions.
Wrong. C is not memory safe. C supports deallocation, casting and arbitrary pointers. The definition of memory safe is reached in languages that don't.eriksank wrote:C is not memory-unsafe. C is: refusing to make a memory management choice. This is normal. Memory management is a set of functions. Why impose a set of functions to all programs, while different programs have to meet different requirements? Something that runs as a browser extension has other memory issues than something that runs as a kernel module. Furthermore, nothing prevents anybody from appointing a garbage collector, such as libgc, and stop worrying about memory management altogether. But then again, garbage collection is not suitable for all possible situations. Therefore, this kind of decisions has been left as an option. In other words, what you are proposing is to remove the choice of memory management from the C programmer. That will never be accepted, if only, because it is not needed.
Why? Buffer overflows, stack overflows, double frees, you know, the usual C stuff. I'm not advocating browser extensions over kernel modules. I am not proposing the removal of choice of memory management from C programmers. I am simply expressing my taste for languages like OCaml. MirageOS and OCaml is the future and it makes me wet in my pants.
You are right though. C isn't unsafe. C is a beautiful language which enables developers to make many mistakes. And mistakes they do. Those developers would be far better in OCaml. Join the dark side.
Good luck writing Flash without ActionScript. Now run the same as .NET. That's why: Haxe.eriksank wrote:What is typical, is that they obviously consider haxe to be a "better" language than the target languages, but why? Why would it be better? They never show an example for that. So, it is clear that they believe Haxe to be better on grounds of unspoken ideologies in language design. So, programmers would have to adopt haxe, based on some kind of unchallengeable manifest of the one and only true communist party.
Not sure about your ranting parts about "having to adopt" and "true communist party". Haxe is literally a choice. Nobody has to do anything.
Re: Visual Studio cross platform is now released, and free!!
The FFI solution in PHP is indeed quite silly. PHP is a language that will never win a beauty contest. It became originally popular because it gave the impression that "everybody" could now do some programming. That was obviously some kind of false promise. In the meanwhile, they have changed their mind, though.BOFH wrote:To extend a single PHP source file with a custom C library a developer needs to compile a module for the whole interpreter and enable it in all code. It's more of a nightmare solution than wet dream.
I did not say that C is necessarily safe. I said that C is not necessarily unsafe. It just requires a bit of skill not to do the wrong things.BOFH wrote:Wrong. C is not memory safe.
C is a portable assembler, meant for programming at the lowest layers of code facing the bare metal. It is excellent at that.BOFH wrote:I am simply expressing my taste for languages like OCaml. MirageOS and OCaml is the future and it makes me wet in my pants.
I do not believe in the manifest of the one and only true communist party of ocaml.BOFH wrote:Those developers would be far better in OCaml. Join the dark side.
I do not write ActionScript because I will never do Flash projects. I do not write C# because I will never do .NET projects (again). That is indeed why Haxe is a waste of time for me.BOFH wrote:Good luck writing Flash without ActionScript. Now run the same as .NET. That's why: Haxe.
-
- Expatriate
- Posts: 129
- Joined: Mon Jun 09, 2014 8:45 pm
- Reputation: 22
Re: Visual Studio cross platform is now released, and free!!
If putting together the boiler plate code for a "Hello World" app would take any more than five minutes without an IDE then you're using the wrong language.
Coding C#, Java, ActionScript apps without an IDE is a nightmarex, I agree. Pro tip: don't code anything in those languages ever!
IDE's for show, VIM for pro's.
Coding C#, Java, ActionScript apps without an IDE is a nightmarex, I agree. Pro tip: don't code anything in those languages ever!
IDE's for show, VIM for pro's.
-
- Site Admin
- Posts: 4193
- Joined: Fri May 02, 2014 8:05 pm
- Reputation: 17
Re: Visual Studio cross platform is now released, and free!!
Sure, but you're not all.... we'll get to that in a moment below....BOFH wrote:I don't use any "robust IDE". I'm quite happy with vim and general cli tools.OrangeDragon wrote:They don't use VS, but they ARE using robust IDEs... just none really compare with it for power and usability (though PHPStorm isn't too bad). To imagine to yourself that they don't is naive. IntelliJ, Eclipse, PHPStorm. Though for C,C++ I've certainly met more than a few who use VS for them. Even a few PHP developers who used VS with the PHP add-on.
Doesn't really apply... it's an admin level interface, meaning they're already logged in with full credientials. How would a fuzz test against a logged in mysql terminal fare? About the same idea. This was just more user friendly.BOFH wrote:Wonder what a 30 second fuzz test would say about that.OrangeDragon wrote:I have done proof of concept development using some of the built in systems in VS with C# that literally allowed me to point it to a completed database and it generated a full UI for a semi-rich CRUD interface. The kind of interface you could shove at an accountant or admin just to "get the job done" without too much bitching. Literally 30 seconds and it was done.
Then why the kneejerk reactions without considering imapct for users not you? Your statements so far have generalized everyone who develops against the linux platform as people writing the same kinds of applications as you are... thus with the same needs.BOFH wrote:This shouldn't surprise anyone. The two main products of Berkeley, CA, is UNIX and LSD. Portions of the hippie movement went to Cyberdelia[1]. Like Timothy Leary said: PC is the LSD of the 1990s. I personally find computerized freedom not only utopic but also wonderful and beautiful, but I can see how it scares some.OrangeDragon wrote:Amazing how much linux developers often sound like luddite hipsters, lol.
1: https://en.wikipedia.org/wiki/Cyberdelic
We are not luddite. We just like to use logic and reason for changing our views and behavior. We are probably more driven by the idea that don't fix what's not broken. What's even more beautiful is that we are decentralized not only in behavior but also in code.
Invoking went out with C++... in C# you just have refereances that closely resemble a python import statement. So no more difficult that doing it with a bunch of imported python libraries. And with visual studio intellisense lets you organize it all into concise and semantic name spackes without having to mentally track (or go search through) 150 different namespaces to remember where anything is.BOFH wrote:Yes, we do different things. Therefore we will have different problems, views and solutions. Besides natural language processing obviously, sentimental analysis is fun. I can't imagine how painful it must be to do with those invoked DLLs.OrangeDragon wrote:Currently my principal project is web, however quite often I'm developing actual productivity software. Accounting, management, analytics type stuff. Even a nice semantic engine once that does some pretty amazing shit with detecting the "mood" of the internet in relation to a set of search terms in near realtime. None of it is drivers, though I've gotten into drivers on a project that involved a proprietary IR receiver... not a fan.
Ah, I see what you're getting at. Yes, VS has a console as well. Shares the screen even so you can view it processing/its results while working on your code above.BOFH wrote:vim has shell access, you can tcpdump from it.OrangeDragon wrote:And you don't "tcpdump in Visual Studio"... its like asking if vi can tcpdump. No, but if you're writing code in vi you can have it do so... just like the code in VS can do.
You can, and sometimes need to, but overall most of it has been simplified down to the point it's unnecessary. I've worked with a genome company that was processing and searching plant DNA strands using a lot of the lower level algoryhmic functionality on the bits. Same goes for the more complex cryptography applications. Just stuff I generally avoid (to the point, the reason I'm not in LA anymore actually... as that was the company I was working for there).BOFH wrote:So it's safe to say that you don't touch internals with VS?OrangeDragon wrote:And yes, you can do it in C# (and presumably VB). The win 16/32 separation doesn't really exist for C#. The language and framework deals with it. In C++/C you still have to deal with it yourself.
Have you ever taken the time to actually use an IDE? Without doing so, isn't that statement an assumption?BOFH wrote: I'm much more comfortable a few notches down in the OSI and that does not make me unproductive.
I wasn't using Wordpress so much as an example of linux programmers... just as how interoperation can get VERY messy when all of the parts are so disconnected yet dependant. To your second paragraph... this is the "get to it later" i was talking about above. This is more of you assuming the work you do is ALL the work anyone does on linux. Lunix developers are becoming more involved with UI and GUI as linux desktop platforms become more and more a "thing" and the demand for applications that run in that space increases. For those developers, if nothing else, this will be a benefit. Though again, having never done your low level coding I can't properly speak on the benefit... just as having never tried it with an IDE (sometimes you don't know something IS broken until someone comes along and fixes it) you can't truely speak on it's impact to your productivity. I will agree that .net for linux solves problems linux doesn't have... other than a shrinking community of business solution developers (or ones relying purely on PHP... which is worse in my opinion). But discounting VS because you don't feel YOU have a need for it and ignoring the rest of the linux community who ARE working with subpar IDEs for GUI development (and why much of the linux GUI looks like utter shit) is just silly.BOFH wrote:
Frankly, in the UNIX philosophy, we don't see this at all. You can't really point at WordPress development and use it as an example in this case. I don't think that anybody in this thread will disagree with you on the point that WordPress and its developers are crap.
The only benefit in VS and .NET coming to Linux lays in people like yourself finding an easier transition to develop on those platforms. It doesn't help Linux developers develop on Linux, it helps Windows developers develop on Linux. As a Linux developer for nearly two decades, I think this is a mistake and the wrong way of approaching the platform. The more you use VS and .NET on Linux the more time you waste, time which could have been spent on developing on the platform by actually interacting with it rather than staying on Microsoft's desperate bridge to market share. There's a reason why only Windows developers are excited. I repeat myself, VS and .NET for Linux solves problems we don't have
- vladimir
- The Pun-isher
- Posts: 6077
- Joined: Mon May 12, 2014 6:51 pm
- Reputation: 185
- Location: The Kremlin
Re: Visual Studio cross platform is now released, and free!!
One day, programme creation will be speech-generated.
I want a program written to do X
A minute later, we will have it, written by the computer and infinitely tailored to suit our unique needs
I'm so far behind here, it's probably already been done.
I want a program written to do X
A minute later, we will have it, written by the computer and infinitely tailored to suit our unique needs
I'm so far behind here, it's probably already been done.
Jesus loves you...Mexico is great, right?
Re: Visual Studio cross platform is now released, and free!!
Aww, you dodged my bait!eriksank wrote:I do not write ActionScript because I will never do Flash projects. I do not write C# because I will never do .NET projects (again). That is indeed why Haxe is a waste of time for me.
Agree with everything else in your post, except the part where you called me a communist.
You should see the amount of people going to war ready to die in the name of OOP over trivial things like Hello World.starkmonster wrote:If putting together the boiler plate code for a "Hello World" app would take any more than five minutes without an IDE then you're using the wrong language.
Give me access and I'll show youOrangeDragon wrote:Doesn't really apply... it's an admin level interface, meaning they're already logged in with full credientials. How would a fuzz test against a logged in mysql terminal fare? About the same idea. This was just more user friendly.
Look at the software that people use. Not a single popular (for our platform) project is written in what you propose. I think that speaks heaps. Not many Linux developers care about your Visual Studio or .NET, to be harsh even less of them matter. That doesn't mean that I don't find it beautiful that developers can write such things. At the same time I find it beautiful that developers can write in Brainfuck[1]. Doesn't mean that I consider Brainfuck a serious language or would ever consider using it.OrangeDragon wrote:Then why the kneejerk reactions without considering imapct for users not you? Your statements so far have generalized everyone who develops against the linux platform as people writing the same kinds of applications as you are... thus with the same needs.
1: https://en.wikipedia.org/wiki/Brainfuck
So, the IDE helps you track your own namespace. That's another one of those problems I don't have.OrangeDragon wrote:Invoking went out with C++... in C# you just have refereances that closely resemble a python import statement. So no more difficult that doing it with a bunch of imported python libraries. And with visual studio intellisense lets you organize it all into concise and semantic name spackes without having to mentally track (or go search through) 150 different namespaces to remember where anything is.
That's neat. screen[2] and tmux[3] has had split screen functionality for decades, so vim doesn't need such bloat. Do One Thing and Do It WellOrangeDragon wrote:Ah, I see what you're getting at. Yes, VS has a console as well. Shares the screen even so you can view it processing/its results while working on your code above.
2: http://www.gnu.org/software/screen/manual/screen.html
3: http://www.openbsd.org/cgi-bin/man.cgi/ ... tmux&sec=1
I was forced to use Eclipse because a manager thought that forcing everybody into the same environment and chaining them up for pair programming would do wonders for the project. Long story short I murdered the manager and uninstalled Eclipse.OrangeDragon wrote:Have you ever taken the time to actually use an IDE? Without doing so, isn't that statement an assumption?
IDEs have a learning curve. All of them have their own learning curve. I don't need to learn how to use an editor. I can already write my code. Learning to navigate VS is a waste of precious coding time.
Not when input and output follows what's expected. Everything being a file, pipes et all, the core of the UNIX philosophy has addresses this mess. By nature you can pass arguments to sed and awk the same way, you know what goes in and goes out, messy or not. Trust in thy shell.OrangeDragon wrote:I wasn't using Wordpress so much as an example of linux programmers... just as how interoperation can get VERY messy when all of the parts are so disconnected yet dependant.
Much of GUI on Linux look like shit because that's how QT looks. I agree, we haven't had a whole lot of attention in this area. Personally, this is another thing I don't really care about. I use mutt for emailing. My instant messaging is mainly a screened irssi[5] with Bitlbee[6]. My volume controller is alsamixer[7], my web browser is mainly Lynx[8] (unless I want images). For text editing and coding I use vim, usually I have around 5 detached shell sessions running in the background which I resume on demand (screen/tmux) and my whole graphical setup (if I use one) is a tiling window manager[9].OrangeDragon wrote:To your second paragraph... this is the "get to it later" i was talking about above. This is more of you assuming the work you do is ALL the work anyone does on linux. Lunix developers are becoming more involved with UI and GUI as linux desktop platforms become more and more a "thing" and the demand for applications that run in that space increases. For those developers, if nothing else, this will be a benefit. Though again, having never done your low level coding I can't properly speak on the benefit... just as having never tried it with an IDE (sometimes you don't know something IS broken until someone comes along and fixes it) you can't truely speak on it's impact to your productivity. I will agree that .net for linux solves problems linux doesn't have... other than a shrinking community of business solution developers (or ones relying purely on PHP... which is worse in my opinion). But discounting VS because you don't feel YOU have a need for it and ignoring the rest of the linux community who ARE working with subpar IDEs for GUI development (and why much of the linux GUI looks like utter shit) is just silly.
As you can see, I spend most of my time staring at plaintext. Most time of my life I've spent without any graphical interface. If I can't use something from a command line then it's broken to me. I don't like using the mouse and nagivate everything on my computer with my keyboard, including the rare times that I find myself using Windows. To some my setup may seem unproductive, but I have not yet met someone who can navigate their computer faster than I can navigate mine. Typing speed included.
Would my setup work for many others? Probably not. But it's my setup and VS or other IDEs you recommend I try can never compete with it. They simply do different things differently.
4: https://en.wikipedia.org/wiki/Mutt_%28email_client%29
5: https://en.wikipedia.org/?title=Irssi
6: https://wiki.bitlbee.org/
7: https://en.wikipedia.org/wiki/Alsamixer
8: https://en.wikipedia.org/wiki/Lynx_%28web_browser%29
9: https://en.wikipedia.org/wiki/Tiling_window_manager
No.vladimir wrote:One day, programme creation will be speech-generated.
- vladimir
- The Pun-isher
- Posts: 6077
- Joined: Mon May 12, 2014 6:51 pm
- Reputation: 185
- Location: The Kremlin
Re: Visual Studio cross platform is now released, and free!!
Why not?
Thoeretically, it's possible.
You can tell a programmer: 'I want this'. , and he/she does it.
Replace programmer with AI, and away you go.
Thoeretically, it's possible.
You can tell a programmer: 'I want this'. , and he/she does it.
Replace programmer with AI, and away you go.
Jesus loves you...Mexico is great, right?
Re: Visual Studio cross platform is now released, and free!!
You will have to pronounce all unique needs in all gory details. For example, a button has a foreground and a background color. It could have an image too. For each of the gazillion buttons, you may have to pronounce these details unless you find a way to pronounce a generalization. The number of details in a real-life application is astonishing.vladimir wrote:One day, programme creation will be speech-generated. I want a program written to do X. A minute later, we will have it, written by the computer and infinitely tailored to suit our unique needs. I'm so far behind here, it's probably already been done.
Furthermore, all your pronouncements must be non-contradictory. You can't say something and then twenty pages later the opposite. Every bug is in fact just a contradiction, and programs tend to be full of them. Preventing people from saying contradictions is not a solution either. In that case, they may not be able to say anything at all.
There is another problem. If your pronouncement constitutes a program and if what the computer returns to you is an equivalent program, Alonzo Church proved that there exists no computable function which could decide for two given programs whether they are equivalent or not. In other words, there is no guarantee whatsoever that what you have pronounced and the program that you have received will do the same thing.
This very problem was raised in 1928 by David Hilbert as the Entscheidungsproblem. The groundwork for the solution was laid in 1931 by Kurt Gödel in his Incompleteness Theorems and simultaneously but independently solved by Alan Turing and Alonzo Church in 1936 in their models for computability.
So, yes, we have known the fundamental limitations of math, science, and computing and every other type of knowledge for almost a hundred years now.
-
- Similar Topics
- Replies
- Views
- Last post
-
- 16 Replies
- 5307 Views
-
Last post by Clemen
-
- 1 Replies
- 2593 Views
-
Last post by AndyKK
-
- 19 Replies
- 5008 Views
-
Last post by daeum_tnaot
-
- 33 Replies
- 3895 Views
-
Last post by Jerry Atrick
-
- 6 Replies
- 2640 Views
-
Last post by Freightdog
Who is online
Users browsing this forum: No registered users and 174 guests