|
Theres no vim thread so I thought I'd ask here. I am trying to get gVim working in Windows but for some reason colorscheme doesn't seem to be actually using 256 colors. I ran a script to convert gVim colors into console vim colors, but that only made it worse. Is there something I need to do to get it so that Windows will display more than the generic 16 color default it seems to load with? Edit: OK nevermind, I think I mean the normal console version of vim in Windows. Seems gVim works but vim messes up the colors. Anyone know why vim isn't getting it right but gVim is?
|
# ? Mar 29, 2012 07:03 |
|
|
# ? Jun 3, 2024 10:26 |
|
Strong Sauce posted:Theres no vim thread so I thought I'd ask here. I believe gvim is using it's own custom console in order to get those full colors. The windows command line really doesn't support all the colors. However, you can install a new windows console that has full color support. Personally, I use Console2 for just this purpose. It has some other nice features like tabs that makes it much more usable than the windows default.
|
# ? Mar 29, 2012 07:25 |
|
Strong Sauce posted:Edit: OK nevermind, I think I mean the normal console version of vim in Windows. Seems gVim works but vim messes up the colors. Anyone know why vim isn't getting it right but gVim is? try in a better console, like the native rxvt from cygwin?
|
# ? Mar 29, 2012 11:38 |
|
Strong Sauce posted:Theres no vim thread so I thought I'd ask here. In Linux you get this problem because some terminals support 16 colors and some support 256. I would guess the Windows cmd.exe or whatever only supports 16 colors.
|
# ? Mar 29, 2012 13:00 |
|
As part of my job, I essentially need to build a Linux distribution-on-a-distribution (think OpenCSW, Solaris folks) and I'm really interested in continuous integration for regression-testing RPM package updates. When I update a package in our local repository, I'd like to systematically rebuild all packages that depend on it and ensure they build cleanly and pass their defined tests. Looking around, it seems like the most popular open-source CI packages are Jenkins and Continuum, with some others like BuildBot being used by a couple of higher-profile projects. Can anyone comment on what seems like the best solution for what I'm trying to do?
|
# ? Mar 29, 2012 14:51 |
|
I need some Regex help. I am trying to write a regex that will match one or more sets of numbers of length 2 or 3 if the string starts with L as different match groups, but stop matching once the match failscode:
I have code:
|
# ? Mar 29, 2012 16:46 |
|
How's this?code:
|
# ? Mar 29, 2012 17:22 |
|
Bob Morales posted:In Linux you get this problem because some terminals support 16 colors and some support 256. I would guess the Windows cmd.exe or whatever only supports 16 colors. Yeah looks like Powershell supports only 16 colors, I think I'll just stick with gVim for now since it seems to be loading themes properly.
|
# ? Mar 29, 2012 17:39 |
|
qntm posted:How's this? That was EDIT: Actually it's not working. For items where there are three or more matches to make it's only getting the first item and the last item. gariig fucked around with this message at 18:34 on Mar 29, 2012 |
# ? Mar 29, 2012 17:50 |
|
gariig posted:That was I am not an expert on regex but I don't think it's going to work with just regex since the regex itself is only looking for 2 matches so it will never be able to pick up 4 matches for a line with 4 numbers. You need to use a programming language to split out on \s+\d{2,3}
|
# ? Mar 29, 2012 19:02 |
|
If you do something like (\d\d )+ depending on the regex library you'll be able to get multiple captures for a single grouped subexpression.
|
# ? Mar 29, 2012 19:05 |
|
How about this?code:
code:
Sedro fucked around with this message at 19:14 on Mar 29, 2012 |
# ? Mar 29, 2012 19:06 |
|
Thank you Sedro the second one worked perfectly. Having to match everything at the end (.*) makes it so the L## at the end won't match.
|
# ? Mar 29, 2012 19:58 |
|
Correct, and that .* stops at a newline, although that might be implementation specific/configurable in which case you add [\n$] (match newline or end of string) to the end and/or change it to .*? to make it ungreedy.
|
# ? Mar 29, 2012 22:13 |
|
Sedro posted:Edit: That will fail on something like `L12 23 GOON RANCH L123` code:
|
# ? Mar 30, 2012 20:07 |
|
I don't know if this is the right thread. But I'm looking to implement video chat in a cross platform application I'm working on (using Objective-C on mac and C# on Windows). Does anyone know of any resources that will help or libraries I could use? The only thing remotely close to what I'm looking for that I've found so far is SkypeKit. My C++ is pretty poor so I'd rather not have to use that. If it's the only option I guess I'll battle through somehow.
|
# ? Mar 30, 2012 22:44 |
|
Jethro posted:Why not
|
# ? Mar 30, 2012 23:33 |
|
Sedro posted:Because that will only match the beginning of the string (only the first line) and AFAIK there is no "beginning of line" anchor. What goofy regex environment are you in that isn't splitting up lines for you? "undef $\"?
|
# ? Mar 30, 2012 23:39 |
|
So I downloaded Visual C++ 2010 Express because I've mostly programmed in PHP and Javascript these last years. The only really static, compiled work I ever did was in Borland Delphi. I'm beginning to think that Visual C++ was a horrific choice. All the C++ tutorials I can find relate to the console-style C++ which makes a lot of sense. Apart from pointers and type casting, it's very similar to PHP, and I'm not struggling at all with it. However, the visual side to it (IE: Managed C++ / .NET) seems to be so difficult to incorporate unmanaged code into. Additionally, when I create an event handler, it sticks it in the header file for the form?! What? I thought the majority of app code went into cpp files? This weirdness of code location confuses me. I'm trying to write a basic winsock client, which is simple enough in a console app. Now I wanna incorporate it into a more managed project for easier threading / class handling etc, but all the tutorials I can find seem to be for C++ rather than Visual Studio's mixture. Should I give up and use QT? Or are there any good tutorials in Visual Studio C++, because I can't find them. For reference, my client code is adapted from here
|
# ? Apr 1, 2012 12:52 |
|
Fruit Smoothies posted:So I downloaded Visual C++ 2010 Express because I've mostly programmed in PHP and Javascript these last years. The only really static, compiled work I ever did was in Borland Delphi. If you're using .Net you probably want to use C# if possible; it's a lot easier to learn and there's not as many ways to shoot yourself in the foot. If you really want it to be C++, you have to decide if you want to gently caress with managed code (which limits you to .Net/maybe Mono), or if you want to go with fully native code, in which case another library like QT or GTKmm might be better.
|
# ? Apr 1, 2012 13:58 |
|
C# in particular will give you intellisense which would be incredibly helpful if you have only the vaguenest sense. It doesn't work with C++/CLI in VS10 so it makes learning a bit rough. Overall most of the syntax is similar.
|
# ? Apr 1, 2012 14:18 |
|
Look Around You posted:If you really want it to be C++, you have to decide if you want to gently caress with managed code (which limits you to .Net/maybe Mono), or if you want to go with fully native code, in which case another library like QT or GTKmm might be better. GTKmm is a pain to deal with properly. Just stick to the C API for GTK+ if you're going to go that route.
|
# ? Apr 1, 2012 15:58 |
|
I have no idea what I want to be honest. Just a nice, happy, flexible language. I wish everything was like PHP / Javascript. But I'm probably alone in my thoughts, and also wrong. Is C# the way, then?
|
# ? Apr 1, 2012 16:37 |
|
Fruit Smoothies posted:I wish everything was like PHP / Javascript. First time I've heard that in CoC...
|
# ? Apr 1, 2012 16:38 |
|
Fruit Smoothies posted:I have no idea what I want to be honest. Just a nice, happy, flexible language. I wish everything was like PHP / Javascript. But I'm probably alone in my thoughts, and also wrong. C# gives me the fewest "what the gently caress were these idiots thinking" moments of any language I've ever used.
|
# ? Apr 1, 2012 17:22 |
|
Fruit Smoothies posted:I have no idea what I want to be honest. Just a nice, happy, flexible language. I wish everything was like PHP / Javascript. But I'm probably alone in my thoughts, and also wrong. If you want "a nice, happy, flexible language" and are jonesing for some static typing, C# is a decent choice. Personally I prefer Scala, which has a bit more of a functional-programming feel to it, but it's a fair bit more complex as well. If you'd rather go the dynamic typing route, Python is an excellent choice, and if you already know PHP and Javascript a lot of the concepts will be familiar.
|
# ? Apr 1, 2012 18:00 |
|
etcetera08 posted:First time I've heard that in CoC... If you're not being sarcastic... Literally, you want a function, just create it. Anonymous functions. Want a string? Fine, make a string, none of this char array nonsense. You want an integer from a string? (int)$string. Done. Also, pointers?! In both PHP and JS, you parse a variable, and it assumes you're parsing the location of that data. Want to loop? foreach() or for(var index in array) {}. Even with pascal / delphi - which I knew pretty well, most of my time was spent converting various objects and data types (streams arghhh) to get things to work with other things. With PHP / Javascript, most of my time is spent writing the logic. In fact, looking at PHP / javascript, the logic is often a lot easier to see than looking at stricter languages, even like pascal. With the web languages, you don't have endless conversions, pointers and data types to work with. Just go go go. Of course, their tasks are different, which probably influences their language. Like I said, I think I'm alone in this view I honestly can not believe that we still have to tell a compiler whether our variable is a string or int! I'm going to check out C# and see how I get on.
|
# ? Apr 1, 2012 18:48 |
|
Fruit Smoothies posted:If you're not being sarcastic... You're going to love C# if those are the things you want.
|
# ? Apr 1, 2012 19:26 |
|
Fruit Smoothies posted:If you're not being sarcastic... Follow the Coding Horrors thread. PHP is often featured as a horror in and of itself.
|
# ? Apr 1, 2012 20:38 |
|
Fruit Smoothies posted:So I downloaded Visual C++ 2010 Express because I've mostly programmed in PHP and Javascript these last years. The only really static, compiled work I ever did was in Borland Delphi. "Visual C++" is just what Microsoft calls its IDE for C++. It doesn't have to create GUI-based programs. You can create console applications with the correct project settings, but it sounds like you don't really want C++ anyway.
|
# ? Apr 1, 2012 20:56 |
|
Fruit Smoothies posted:If you're not being sarcastic... C# can do just about everything on your list with the exception of maybe* (int)$string. It has anonymous methods/classes, foreach iterators, a distinct lack of pointers outside of special cases like COM/Win32 interop, no header files, strings as a native primitive type, and the keyword 'var' that tells the compiler to figure out the type if you don't care to specify it. Basically C# was designed to let you concentrate on the logic of your own problem instead of fiddling around with low-level specifics. It's more strict than PHP, but in an appropriate way that keeps you out of trouble. * I say maybe because I'm not sure what (int)$string means in your case. If you mean 'parse $string into it's integer equivalent' then int i = int.Parse(someString) would do want you want it to. If you mean 'interpret the bits in $string as if they were an integer and cast then you'd have to write your own extension method for the string class since there's many different ways to interpret that.
|
# ? Apr 1, 2012 22:41 |
|
PDP-1 posted:* I say maybe because I'm not sure what (int)$string means in your case. If you mean 'parse $string into it's integer equivalent' then int i = int.Parse(someString) would do want you want it to. If you mean 'interpret the bits in $string as if they were an integer and cast then you'd have to write your own extension method for the string class since there's many different ways to interpret that. (int)$string was a simple example. I have to use parseInt() in Javascript so I'm OK with that. I'm downloading V Studio Express now to gently caress around with. It sounds promising. Concentrating on the logic is one of the main reasons I love PHP and Javascript, despite their limitations / faults.
|
# ? Apr 1, 2012 23:06 |
|
Fruit Smoothies posted:If you're not being sarcastic... All the stuff you like about PHP is a standard feature of any modern high-level language. This doesn't really sound like you like PHP and JavaScript, so much as that you like high-level programming and PHP and JS are the only HLLs you've used so far. And that is a view you are definitely not alone in. That said, PHP is a pretty poo poo language all around. Check out C#, Python, Scala, Lua, perhaps Scheme/Clojure, Haskell, Go, and F# once you want to get a bit funkier. The reason PHP gets constantly shat on here is that most of the people making GBS threads on it have used some of these languages, and know you can have a high-level language without a terribly written interpreter and inconsistent and insecure standard library - and that there are more options than "procedural, statically typed, low-level" and "object-oriented, dynamically typed, high-level". quote:I honestly can not believe that we still have to tell a compiler whether our variable is a string or int! Any modern statically typed language will have a type-inferring compiler that can automatically determine the types of your variables based on their usage.
|
# ? Apr 2, 2012 02:52 |
|
ToxicFrog posted:Any modern statically typed language will have a type-inferring compiler that can automatically determine the types of your variables based on their usage. And we write out our type names anyway, because even if we don't have to tell Mr. Compiler, we still have to tell other developers.
|
# ? Apr 2, 2012 03:44 |
shrughes posted:And we write out our type names anyway, because even if we don't have to tell Mr. Compiler, we still have to tell other developers. And even then I like my compiler yelling at me, sometimes: "You meant that to be an int? Yeah well it obviously ain't, so fix your poo poo. (Then thank me, cuz' I just saved you a headache debugging.)"
|
|
# ? Apr 2, 2012 04:06 |
|
Fruit Smoothies posted:If you're not being sarcastic... Pretty much any modern high level language will give you all of that and more, in a more consistant, secure, sane package: Python (thread) is an awesome dynamically typed, interpreted programming language with strong support built in for lists, tuples and dictionaries (key:value data structure), as well as a good class-based object system with multiple inheritance. It's got a really clean, readable syntax too. Lua is another dynamically typed language that is essentially interpreted (it can be precompiled to C code though). It works extremely well interfacing with C code and is pretty fun to use. It's also got first class functions, anonymous functions, and it's table data structure should be somewhat familiar as it works sort of like a beefed up PHP array. Lua doesn't provide explicit OOP, but it provides all of the tools with metatables and the tbl:fn() notation which implicitly passes the table to the function's first argument as a "self" variable. OOP in Lua is also prototype-based, like Javascript. Go (thread) is a newer "mid" level language that just had it's first major stable release. It was designed by Ken Thompson and Rob Pike among others. It's got static typing with a pretty good type inference system, first class and anonymous functions, and lightweight interfaces that don't need to be declared to be implemented. It's also got slices, which are really awesome as a replacement for pointers in C. It's got a good concurrency model with lightweight threads/coroutines that they call "goroutines", and a built in channel datatype that allows for efficient, safe information sharing between goroutines. Scala (thread) is a statically typed, compiled multiparadigm language that runs on the JVM. It's got good type inference with a strong type system (this isn't a bad thing!), and has a strong functional bias with standard OOP still available. It also has first class and anonymous functions, and immutable values for safer functional programming. Haskell is a slightly more esoteric modern language, which is a really awesome compiled purely functional language. It has an amazing type system, and has really good referential transparency. There's no variables in it, everything is a value. I/O isn't even done by directly changing variables, instead you use monads to represent it. You can also use them to represent state, among other things. Looping is done by recursion in Haskell. Functional programming is really awesome and even if you never use Haskell in a work environment it's still a fun language to learn. Also I just realized that we don't actually have a Haskell thread... does someone want to make one since I made the lisp thread? If not I'll get on it later tonight or tomorrow.
|
# ? Apr 2, 2012 05:54 |
|
What, no love for Objective-C?
|
# ? Apr 2, 2012 08:01 |
|
Now's my chance to be a negative nancy. And sometimes a positive pansy.Look Around You posted:Python (thread) is an awesome dynamically typed, interpreted programming language with strong support built in for lists, tuples and dictionaries (key:value data structure), as well as a good class-based object system with multiple inheritance. It's got a really clean, readable syntax too. Python has disturbingly weird scoping rules, is really slow, and is especially bad at multithreading, and is too verbose for shell scripting. quote:Lua is another dynamically typed language that is essentially interpreted (it can be precompiled to C code though). It works extremely well interfacing with C code and is pretty fun to use. It's also got first class functions, anonymous functions, and it's table data structure should be somewhat familiar as it works sort of like a beefed up PHP array. Lua doesn't provide explicit OOP, but it provides all of the tools with metatables and the tbl:fn() notation which implicitly passes the table to the function's first argument as a "self" variable. OOP in Lua is also prototype-based, like Javascript. Also it has a very small runtime, which is very non-annoying to embed, especially in a multithreaded C/C++ application. (Compare this to the horrible javascript engines.) quote:Go (thread) is a newer "mid" level language that just had it's first major stable release. It was designed by Ken Thompson and Rob Pike among others. It's got static typing with a pretty good type inference system, first class and anonymous functions, and lightweight interfaces that don't need to be declared to be implemented. It's also got slices, which are really awesome as a replacement for pointers in C. It's got a good concurrency model with lightweight threads/coroutines that they call "goroutines", and a built in channel datatype that allows for efficient, safe information sharing between goroutines. Go's "goroutines" are not special, userland m:n threading already exists in a bunch of languages. It's very elegant compared to C or C++, not elegant at all considering that it's a garbage collected memory-safe programming language with a C-like type system. It has a bad garbage collector. If I were to choose one language for doing some systems programming that wasn't performance sensitive enough to need to avoid garbage collection, Go would be a contender. Its type system is weak, though, you can't define your own generic data structures, which would be useful. The designers are too blind to the benefits of C++, or maybe just conservative. quote:Scala (thread) is a statically typed, compiled multiparadigm language that runs on the JVM. It's got good type inference with a strong type system (this isn't a bad thing!), and has a strong functional bias with standard OOP still available. It also has first class and anonymous functions, and immutable values for safer functional programming. It's the only statically typed language that runs on the JVM that doesn't completely suck. It's actually the most advanced type system in any practicality-oriented language right now. It also has slow compiles and a lot of whiners. Generally speaking it's useful, despite the option of writing sane Java. If Java was as expressive as C++98 there would not be much reason for Scala. quote:Haskell is a slightly more esoteric modern language, which is a really awesome compiled purely functional language. It has an amazing type system, and has really good referential transparency. There's no variables in it, everything is a value. I/O isn't even done by directly changing variables, instead you use monads to represent it. You can also use them to represent state, among other things. Looping is done by recursion in Haskell. Functional programming is really awesome and even if you never use Haskell in a work environment it's still a fun language to learn. Haskell's a great language that'll make you smarter, an infuriating language if you want to get performance out of it for big programs. You see people writing Haskell web frameworks and on certain benchmarks the process doesn't finish because the server went into swap. This is because it's lazily evaluated, and that's a bad thing. Looping is usually done using combinators. The compiler has been known to make optimizations that affects the big-O performance of your code positively or negatively. The community is a bunch of navel-gazing category theorists, plus several cool people. A big problem with functional programming is the code is less editable than C-style languages. You can't just add a debug statement, or walk through your code in any intelligible order, or add a feature or change something without reindenting everything manually or having to thread a new variable through to a bunch of different functions. quote:Also I just realized that we don't actually have a Haskell thread... does someone want to make one since I made the lisp thread? If not I'll get on it later tonight or tomorrow. We had a Haskell thread once.
|
# ? Apr 2, 2012 09:20 |
|
shrughes posted:Go's "goroutines" are not special, userland m:n threading already exists in a bunch of languages. It's very elegant compared to C or C++, not elegant at all considering that it's a garbage collected memory-safe programming language with a C-like type system. It has a bad garbage collector. If I were to choose one language for doing some systems programming that wasn't performance sensitive enough to need to avoid garbage collection, Go would be a contender. Its type system is weak, though, you can't define your own generic data structures, which would be useful. The designers are too blind to the benefits of C++, or maybe just conservative. There's features that could be implemented that aren't because the designers believe it will lead to confusing user code, so an observer would need to dig deep into to it to understand. Function/operator overloading are the two things I most miss having, as without them custom types such as big.Int are clumsy to work with in numerous ways. To compound the problem the developers seem intent on not adding endless methods to classes - which is good I guess - but it means there are no big.Int methods to add ints or int64s to an existing big.Int, just the Add method that takes big.Ints as arguments. Doing any math with types like this makes it a necessity to convert everything 1) from source type to int64 (as new big.Ints can only be created empty or from int64 or string) 2) from int64 to big.Int 3) finally, whatever math is required can be performed. An optimal accumulator in go using a big.Int (emulating x++) looks like: code:
code:
I'll end by saying it's not a bad language to use, and what it supports works great, but it is irritating as hell if your usage falls outside the developers vision. shrughes posted:It's the only statically typed language that runs on the JVM that doesn't completely suck. It's actually the most advanced type system in any practicality-oriented language right now. It also has slow compiles and a lot of whiners. Generally speaking it's useful, despite the option of writing sane Java. If Java was as expressive as C++98 there would not be much reason for Scala. The Gripper fucked around with this message at 12:11 on Apr 2, 2012 |
# ? Apr 2, 2012 11:58 |
|
|
# ? Jun 3, 2024 10:26 |
|
shrughes posted:Python has disturbingly weird scoping rules, is really slow, and is especially bad at multithreading, and is too verbose for shell scripting. It's a really nice "get poo poo done"-language, for those problems that require a bit more than a compact shellscript but a bit less than an application. (I just used it to do some array-of-heatmaps-with-other-junk-hung-on-the-side visualization for work). It's a useful niche, but not an end-all/be-all.
|
# ? Apr 2, 2012 14:10 |