Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 518 519 [520] 521 522 ... 796

Author Topic: if self.isCoder(): post() #Programming Thread  (Read 908174 times)

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7785 on: September 10, 2015, 01:53:00 pm »

So apparently vim is the Dwarf Fortress of text editors. Is this thing worth learning, or does anybody have a suggestion for a lightweight coding-focused text editor on linux?

Its not bad.  Its usually pre-installed on linux systems, which is handy if you need to ssh somewhere and edit something.  Its a lot different than usual text editors though, so its kind of a pain to learn.

Pretty much this.  I wouldn't want to write much in it, but it works well for editing configs or making small changes when all you have is a terminal connection to something.  By far the worst part is that you'll constantly make mistakes because you think you're in edit mode and end up issuing commands instead.  Maybe years of consistent use fixes that tendency, but sporadic use over the years hasn't completely kept me from still doing it to this day.  In any case, I believe it's a pretty common lowest common denominator and is installed very frequently, so learning it means you'll probably have access to an editor you understand on any Linux system.

If I have a graphical environment then I prefer just about anything else.  I don't know anything about emacs, but I know it's a commonly cited editor to use with an equally steep learning curve.  I've used gedit a lot and it works pretty well for basic text editing, but has no real support for common IDE tasks.  Still, I've written a lot of code in it in many languages.
Logged
Through pain, I find wisdom.

Bauglir

  • Bay Watcher
  • Let us make Good
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7786 on: September 10, 2015, 02:03:41 pm »

This is why I haven't learned any command line text editors yet. Specifically, barring some unforeseeable circumstances in the future, I'll spend more time learning it than it could possibly save me, and I have stuff I want to do now.
Logged
In the days when Sussman was a novice, Minsky once came to him as he sat hacking at the PDP-6.
“What are you doing?”, asked Minsky. “I am training a randomly wired neural net to play Tic-Tac-Toe” Sussman replied. “Why is the net wired randomly?”, asked Minsky. “I do not want it to have any preconceptions of how to play”, Sussman said.
Minsky then shut his eyes. “Why do you close your eyes?”, Sussman asked his teacher.
“So that the room will be empty.”
At that moment, Sussman was enlightened.

LoSboccacc

  • Bay Watcher
  • Σὺν Ἀθηνᾷ καὶ χεῖρα κίνει
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7787 on: September 10, 2015, 02:12:01 pm »

C# is like java except it doesnt suck. :v

thems fightin' words boi

nah no fighting in a sense he's right. but I'm too old to learn new things :V
Logged

Arx

  • Bay Watcher
  • Iron within, iron without.
    • View Profile
    • Art!
Re: if self.isCoder(): post() #Programming Thread
« Reply #7788 on: September 10, 2015, 02:41:33 pm »

I was about to snark about cross-platform support when I realised Mono is now a thing. I really ought to learn C#.
Logged

I am on Discord as Arx#2415.
Hail to the mind of man! / Fire in the sky
I've been waiting for you / On this day we die.

Antsan

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7789 on: September 10, 2015, 03:54:36 pm »

On the topic of compiling itself I'm not sure what false dichotomy you are seeing in my statement. I'm not saying it's impossible that you can find an interpreted language faster than a compiled one, just that the speed boost granted by compilation is large enough to make it improbable. It's like if I pick a bunch of random people and ask them "pick a random number". I think we'll all agree that the vast majority of people are going to pick a low number just due to picking bias. I then divide the results into two random groups, and compare A + 200 against B. The vast majority of the time A +200 is probably going to be higher. Similarly the actual act of compilation gives enough benefits in terms of optimization and running speed with modern compilers that in many cases the benefit gained from that it is going to outweigh any particular speed benefits created by language choice if that language is not compiled. It's not impossible that you could find an interpreted language that is faster than a compiled one, just unlikely, and that benefit would most likely be limited to only handful of processes.

As for SBCL and co., what's going on there is just that you're using a language that can alter how much of the work is done through interpretation (thus allowing for easier code modification and debugging) and how much is done through compilation (for fast running speed). This allows you to perform many operations much faster than purely interpreted competitors (such as Python) and lets you determine exactly what balance between speed and dynamism you want to have (which can be a major advantage to that language).
SBCL does not rely on an interpreter. If you enter something into the REPL it is first compiled and then run. That means if you enter a function definition, the function is compiled and then stored in compiled form for later use. The enhanced debugging is not due to interpretation but due to incremental compilation. That is the false dichotomy I meant.
Any program compiled with SBCL will always be fully compiled. SBCL actually does contain an interpreter, but it is disabled by default and if it has a use, it is probably only to check for semantic differences between interpreted and compiled Common Lisp (unfortunately that kind of stuff is in the standard, but that doesn't concern me when I only use compiled Common Lisp), not interactively running code.

There actually are trade-offs involved in Common Lisp programming regarding optimization, but these are between run-time type checking, whether debugging information is retained, speed and size. It has nothing to do with interactivity.

Quote
Of course really every language is just a tool. My university even occasionally offers a course on "picking the right language for a given task", because every language has it's benefits and drawbacks, and ideally programmers should be familiar enough with as many languages as possible that they can pick the one that works best at their specific given task, instead of just whatever one they happen to be most familiar with. Even esoteric languages like Ante might hypothetically be the best choice if for some reason your need for code obfustication was so high that it outweighed the additional cost of time and debugging ease to actually write the program.
Yes, no argument there.

@Gatleos:
I use emacs, but that is kind of the opposite of lightweight.
Use whatever editor you feel most comfortable with.
Logged
Taste my Paci-Fist

i2amroy

  • Bay Watcher
  • Cats, ruling the world one dwarf at a time
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7790 on: September 10, 2015, 10:39:11 pm »

-snip-
Good to know! I admit to having not much more than a cursory education in all the various variants of LISP, so it's always interesting to here more about it. :)
Logged
Quote from: PTTG
It would be brutally difficult and probably won't work. In other words, it's absolutely dwarven!
Cataclysm: Dark Days Ahead - A fun zombie survival rougelike that I'm dev-ing for.

itisnotlogical

  • Bay Watcher
  • might be dat boi
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7791 on: September 11, 2015, 12:01:19 am »

This is why I haven't learned any command line text editors yet. Specifically, barring some unforeseeable circumstances in the future, I'll spend more time learning it than it could possibly save me, and I have stuff I want to do now.

I don't get the point of command-line text editors, other than that's The Way Things Are Done On Linuxtm. Unless you only have a terminal connection to something as Telgin mentioned, there's no reason to use a whole different set of skills from those involved in, say, Notepad. I don't remember ever seeing a Notepad-like program for Linux, but there's got to be one somewhere.
Logged
This game is Curtain Fire Shooting Game.
Girls do their best now and are preparing. Please watch warmly until it is ready.

alway

  • Bay Watcher
  • 🏳️‍⚧️
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7792 on: September 11, 2015, 12:23:21 am »

This is why I haven't learned any command line text editors yet. Specifically, barring some unforeseeable circumstances in the future, I'll spend more time learning it than it could possibly save me, and I have stuff I want to do now.
Or more specifically, if typing speed is a barrier to how fast you code, you're coding wrong. Save yourself some time by slowing down instead of having a bugs-per-minute speed of 60.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7793 on: September 11, 2015, 12:43:20 am »

I don't remember ever seeing a Notepad-like program for Linux, but there's got to be one somewhere.

gedit

miauw62

  • Bay Watcher
  • Every time you get ahead / it's just another hit
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7794 on: September 11, 2015, 12:54:53 am »

Can you use your mouse in the non-terminal version of vim?
Logged

Quote from: NW_Kohaku
they wouldn't be able to tell the difference between the raving confessions of a mass murdering cannibal from a recipe to bake a pie.
Knowing Belgium, everyone will vote for themselves out of mistrust for anyone else, and some kind of weird direct democracy coalition will need to be formed from 11 million or so individuals.

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7795 on: September 11, 2015, 12:56:57 am »

There's actually plenty of terminal programs in linux where you can use the mouse in the terminal, or even over ssh.
Logged

Antsan

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7796 on: September 11, 2015, 05:48:24 am »

-snip-
Good to know! I admit to having not much more than a cursory education in all the various variants of LISP, so it's always interesting to here more about it. :)
Whew, that was the reaction I was hoping for. I never know when I come across as preachy/defensive.

This is why I haven't learned any command line text editors yet. Specifically, barring some unforeseeable circumstances in the future, I'll spend more time learning it than it could possibly save me, and I have stuff I want to do now.

I don't get the point of command-line text editors, other than that's The Way Things Are Done On Linuxtm. Unless you only have a terminal connection to something as Telgin mentioned, there's no reason to use a whole different set of skills from those involved in, say, Notepad. I don't remember ever seeing a Notepad-like program for Linux, but there's got to be one somewhere.
There's mousepad, standard on Debian with XFCE.
I prefer command-line text editors because not being required to use the mouse is a big boon. It's much faster because I don't need to switch.
Also, Emacs has got a lot of features that are missing in most other text editors while not standing in my way and doing strange hidden stuff like most IDEs. Also it can run the shell and a lisp repl internally, which is awesome, because then I don't even need to use the mouse or multiple terminals to do interactive development.

There's actually plenty of terminal programs in linux where you can use the mouse in the terminal, or even over ssh.
Yeah, the mouse daemon for the terminal is called gdm.
Logged
Taste my Paci-Fist

Telgin

  • Bay Watcher
  • Professional Programmer
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7797 on: September 11, 2015, 07:40:38 am »

All of this discussion on text editors reminds me of how disappointed I was when I first discovered that Notepad++ doesn't have a native Linux port.  I really miss some of its features whenever I work on a Linux workstation and haven't found a text editor that really replaces it yet.  Being able to highlight a variable name and see it highlighted everywhere else, multiline edits, collapsing code blocks, an FTP client and so on are very nice.

Supposedly gedit can come close if you cram enough plugins into it, but my attempts at that were met with pretty mixed results.  Probably the closest thing I've seen so far is a program called Geany that was randomly installed on one of my workstations, but it doesn't have some of syntax highlighting features of Notepad++.

I suppose now people are going to tell me that Emacs can do all of these things if I configure it correctly.  :)  Or I guess I could use a Windows environment simulator of some kind, but I've never tried that before...
Logged
Through pain, I find wisdom.

itisnotlogical

  • Bay Watcher
  • might be dat boi
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7798 on: September 11, 2015, 08:50:20 am »

I suppose now people are going to tell me that Emacs can do all of these things if I configure it correctly

That right there is why I stopped using Linux on my secondary computer. Nearly every thing relating to Linux comes with an "if you configure it correctly" attached. Just once in a while, I enjoy when the default settings and features provide everything I need rather than having to cobble it all together from pieces that have no documentation and haven't been updated since '09.
Logged
This game is Curtain Fire Shooting Game.
Girls do their best now and are preparing. Please watch warmly until it is ready.

Antsan

  • Bay Watcher
    • View Profile
Re: if self.isCoder(): post() #Programming Thread
« Reply #7799 on: September 11, 2015, 09:20:12 am »

I suppose now people are going to tell me that Emacs can do all of these things if I configure it correctly

That right there is why I stopped using Linux on my secondary computer. Nearly every thing relating to Linux comes with an "if you configure it correctly" attached. Just once in a while, I enjoy when the default settings and features provide everything I need rather than having to cobble it all together from pieces that have no documentation and haven't been updated since '09.
Well, the reverse problem is that Windows/Mac just don't provide the kind of configuration I want, like, at all, no matter what I do. Which is why I prefer the situation with Linux, where I at least can reach my desired configuration with some work instead of not at all.

Besides: I don't see which of the features Windows provides isn't available in Debian out of the box. Networking stuff was always easier on Linux than on Windows.
« Last Edit: September 11, 2015, 09:22:32 am by Antsan »
Logged
Taste my Paci-Fist
Pages: 1 ... 518 519 [520] 521 522 ... 796