Valderman

Members
  • Content count

    4609
  • Joined

  • Last visited

Community Reputation

513 Good

About Valderman

  • Rank
    Contributor

Personal Information

  1. Help choosing tools for development using C and Haskell

    You're going to want to use GHC for Haskell, most likely in the form of the [url="http://hackage.haskell.org/platform/"]Haskell Platform[/url]; Hugs is simply too slow (also, AFAIK it's just a REPL shell and doesn't come with a compiler.)
  2. Starting to hate Google...

    [quote name='Sirisian' timestamp='1320236523' post='4879640'] I was referring to the common implementation of web workers which under the definition of no shared mutable state usually requires the data be duplicated so that it isn't changed on the original thread while the new thread works with it. The alternative is to use a lock statement and lock the resource while it's being used so only one thread may work with it at a time without any overhead. It's usually much more flexible and has higher performance when working with large data sets.[/quote]"Higher performance" doesn't belong in the same sentence as "locks" and "shared state" if we're talking parallellism. [quote]In regard to passing references in a message to a thread I'm not sure what your question is. I never said they're mutually exclusive. How did you imagine working with a reference in a concurrent thread? Say you don't have locks and you just access it then it's no different than what I described as a more flexible system to allow.[/quote]You seem to imply that if threads can have no shared mutable state, then data needs to be copied somewhere to avoid it being modified, that having a reference to a piece of data confers the ability to modify it. I'm trying to figure out if that's actually the case, or if I've misunderstood your point. [quote] That's an extremely naive view of parallel processing. When used correctly the speedup is rather impressive especially on dual and quad-core systems. Using it only as an abstraction is kind of missing the big picture especially when those threads are mapped to kernel threads like in most languages. [/quote]Concurrency doesn't imply parallellism, just as parallellism doesn't necessarily imply concurrency.
  3. Starting to hate Google...

    [quote name='Sirisian' timestamp='1320193865' post='4879467'] [quote name='swiftcoder' timestamp='1320187516' post='4879430'] [quote name='Sirisian' timestamp='1320181677' post='4879386'] Regarding concurrency: [quote]An isolate is a unit of concurrency. It has its own memory and its own thread of control. Isolates communicate by message passing (10.14.4). No state is ever shared between isolates.[/quote] They're just taking the stupid idea of webworkers which was a useless feature and just throwing it into their language instead of implementing actual language locks and mutices.[/quote] I can't agree with you there. The locks & mutices threading model you are talking about is [b]vastly[/b] inferior to Erlang-style concurrency (i.e. message passing, no shared mutable state). Dart's Isolate is likely the result of the work they have done on coroutines in Google's Go - they quite closely resemble one another, although isolate appears to be a little more general (can spawn OS threads as well coroutines). [/quote] Seems like a good idea in theory until you actually do it. Pretend you have a set of data you want to work on with multiple threads. Like for multithreaded pathfinding or image processing. Suddenly you're forced to copy data. (In webworker's case you can't copy more than 1 MB of data). Doesn't matter really though since the time waste copying is so expensive that you've effectively negated any performance increase. That's not even counting the copying of the data back. The alternative is to just pass in a reference and go "hey you 2 threads work on half the data each and get back to me when you're done". No copying overhead. You'll notice in that situation that neither thread even had to touch the other's data at the same time so no lock was needed.[/quote]Care to clarify why you believe references and message passing are mutually exclusive? [quote]The only time it makes sense is when your passing off like a few values or a small array for heavy processing. Then again you lock out the bigger uses of threads that way. The lock and mutex allows everything without restrictions. [/quote]Concurrency is an abstraction, not an optimization; the basic bronze age concurrency primitives are quite obviously useless in this regard, when compared to Erlang-style message passing.
  4. So who is still around these days?

    I've been here for, like, forever, but I doubt I've ever made much of an impression. (Except perhaps as "annoying kid who posts too much" - after being away for several years I [i]still[/i] have more than 1.3 posts per day!)
  5. SDD price trends

    [quote name='Antheus' timestamp='1315315147' post='4858147'] [quote]their oversized music collection that they don't even listen to[/quote] Noise. Power consumption. Form. And even access times, scanning ID3 tags of 5000 files is quite slow on standard HDs. [/quote]Yeah, those are valid concerns. However, the reason quoted for that storage solution is HOLY SHIT THIS IS SO FAST I CAN MAKE FIVE COPIES OF THIS ALBUM IN LIKE NO TIME AT ALL rather than the others. Of course, if that's what you want to do with your money then that's an equally valid reason. Doesn't seem very reasonable to me though.
  6. SDD price trends

    [quote name='irreversible' timestamp='1315309063' post='4858126'] Why? Sample packs and video streaming for editing purposes. Both of these can be ridiculously demanding on storage access and nowadays 200GB no longer cuts it if you want to go with a single dedicated drive (there's always the option to use multiple drives, but using anything smaller than 120GB can leave you picking out your hair and is just plain frustrating for anything sizable). SSDs are a heaven send for multimedia workstations, but sadly not so if you're not running a big studio. [/quote]Yeah, I guess that would rule out the middle way. I know a lot of people who blow crazy money on solid state storage for their oversized music collection that they don't even listen to, so I was curious about whether your use case actually required the speed offered by SSDs or if it was just another case of "SSDs are neat, I need one!"
  7. SDD price trends

    [quote name='irreversible' timestamp='1315305170' post='4858120'] Has anyone been following the market regarding these lately? I've wanted to invest in an SSD setup for a long time, but I need something like half a TB of storage, which is mad expensive to get. Are there any signs that the tech will plummet price-wise any time soonish? It's been up there for a long time now and I gave up keeping an eye on the industry about 8 months ago. [/quote]Assuming that we're talking about a workstation or desktop here, why would you need half a terabyte of ridiculously fast storage? Why not get a 200 GB SSD for everything that needs to be fast and that you're actively using, and a huge mechanical drive for long-time storage?
  8. "Scripting languages"

    [quote name='Antheus' timestamp='1315236300' post='4857857'] [quote name='valderman' timestamp='1315224085' post='4857788'] Also, I wasn't aware that Galois, Jane Street Capital, Firaxis, Blizzard, Standard Chartered, Ericsson, AT&T, Bank of America, Bluespec, Barclays, Credit Suisse, Deutsche Bank, Qualcomm, Facebook, Google, Adobe, EA, Crytek, Relic, Adobe, Cisco and MySQL, among others, don't exist. [/quote] What does this mean? [/quote]I disagree that Erlang, Haskell, O'Caml and Lua aren't used in industry. All the companies I listed use one or more of those four languages. Of course, if your definition of existence goes along the lines of "no technology that makes up less than 10% of its respective field really exists," then I have to agree that they don't exist. But on the other hand, then video games or image manipulation software doesn't exist either.
  9. "Scripting languages"

    Lots of interesting opinions on the subject. Obviously, in the context of a particular game or application, any language is a "scripting language" if it's used to script said game/application, and I guess it could make sense to define a "scripting language" as a language the primary use of which is to provide that sort of functionality for applications. That would still disqualify both Python and PHP from "scripting language" status though. [quote name='Antheus' timestamp='1315065703' post='4857182'] [quote name='valderman' timestamp='1315062514' post='4857167'] So, what exactly is a scripting languages?[/quote] Not C, C++, Java, C#. This is how they are defined. Erlang, Haskell, OCaml, Lua and such do not count, since they do not exist as far as mainstream programming world is concerned. The distinctions here also matter only for commodity programming. There is very little money involved, a fraction of a percent, compared to software industry in general. So the bikeshed principle applies. [/quote]Well, let's pretend for a second that proof-by-shitloads-of-money isn't available; I think that'll make a more interesting discussion. Also, I wasn't aware that Galois, Jane Street Capital, Firaxis, Blizzard, Standard Chartered, Ericsson, AT&T, Bank of America, Bluespec, Barclays, Credit Suisse, Deutsche Bank, Qualcomm, Facebook, Google, Adobe, EA, Crytek, Relic, Adobe, Cisco and MySQL, among others, don't exist.
  10. "Scripting languages"

    The local IT press has recently taken a break from evangelizing cloud computing and "noSQL" as the second coming of Christ to push their new favorite fad: "scripting languages." Allegedly, "scripting languages" are "easier to work with" than "other languages" and are generally awesome in a generic, not-quite-specified way. Of course, I got intrigued about these "scripting languages" - what are they, and why are they so awesome? Evangelists of "scripting languages" tend to name Javascript, PHP and Python as examples of new, awesome scripting languages, relegating Java and the .NET languages to the status as old, boring and "hard to work with." So, what exactly is a scripting languages? At first glance, could it be an interpreted language? Apparently not, because compilers exist for both PHP and Python, and all of the three "scripting language" poster children also have implementations using JIT compilation. Meanwhile, both Java and the .NET languages is commonly executed through bytecode interpretation, and REPL interpreters are integral to working with F# or Haskell. Perhaps it's dynamic typing? After all, dynamic typing is supposed to totally awesome for increasing productivity. Turns out, C# supports dynamic types and Erlang, which I doubt anyone would call a "scripting language," is completely dynamically typed. Weak typing doesn't seem to be it either, as Python employs strong typing. So what I'm trying to say here is that the term "scripting language" annoys me because it seems to be synonymous with "a language I think is cool and modern." Can anyone else come up with a good, consistent definition of "scripting language?"
  11. iPad2

    [quote name='JDX_John' timestamp='1302111474' post='4795130'] [quote name='Gamer Gamester' timestamp='1302071167' post='4794929'] iPads look pretty, but do you really want to support a closed computing platform?[/quote]Maybe it might surprise you to know, most people don't care about this stuff. And anyway Android is more than a little closed.[/quote]Closed as in "not free software" - nobody cares. Closed as in "we decide what programs you can run, we've also intentionally crippled the device in various ways to make it harder to run what you want on it" - a surprising amount of people do care.
  12. iPad2

    [quote name='d000hg' timestamp='1301929828' post='4794231'] [quote name='valderman' timestamp='1301918940' post='4794169'] Cons: it's far worse than a device you either already own or can obtain for a fraction of the price of an iPad for any other task. [/quote]Quite a large fraction, like 80% here in the UK. Far worse is also a difficult position to support since it depends what you think is important. For portability, battery life and weight, it beats even netbooks. But since you are talking about "a device you already own" you probably mean a laptop, which totally sucks on [i]those[/i] metrics. Comparing a laptop with an iPad is like comparing a laptop with a desktop. [/quote]That's great, you can carry it around. However, most people likely already own an object that's great for carrying around, be it a cell phone, a teddy bear or a nicely shaped rock of just the right size. The question is, why would you [i]want[/i] to carry it around? [quote]Does the IPad 2 have proper support for multitasking, so I can keep something actually running in the back ground while I flip to another program to read while I wait for the first to finish?[/quote]Nope.
  13. iPad2

    Pros: you can use it to watch movies while lying face down in bed. Cons: it's far worse than a device you either already own or can obtain for a fraction of the price of an iPad for any other task. Every single iPad I've seen has been used either as a digital photo frame or as an unwieldy way to play games everyone else got bored with in the early 1990s. (Seriously, [i]Angry Birds[/i] is the biggest name on the platform, for crying out loud!)
  14. Can I get Windows 7 to overcommit memory?

    [quote name='Antheus' timestamp='1301230782' post='4790953'] [quote name='valderman' timestamp='1301216527' post='4790915'] They aren't telling the truth, isn't that the definition of lie, regardless of reason?[/quote] How much memory will Word need? ~200MB. Unless the user happens to load a 10,000x10,000 bitmap and inserts it.[/quote]I'm quite aware that the programs don't know how much memory they're going to use. Regardless, allocating a huge chunk of memory just in case, rather than allocating it as needed or in smaller chunks, is rather impolite when the OS doesn't overcommit memory. [quote][quote]A freshly started copy of Eclipse with one three-class project loaded plus Firefox is enough to cause the problem. I don't think they and W7 between them actually touch enough pages to cause memory to run out.[/quote] Then there's something wrong here. New eclipse is around 64MB, it will grow arbitrarily. New Firefox is ~90MB. There is no way to exhaust memory using these.[/quote]Yes, that's quite my point. Java is particularly nasty about allocating huge chunks of memory on startup regardless of how much will actually be needed. [quote]Open task manager, or better yet, ProcessExplorer and see what's consuming all memory.[/quote]W7 claims to use something like a gigabyte or so for cache. That's great, but you'd think the first thing to do when memory is running low would be to drop a few hundred megabytes there. Apparently not. [quote]I've written in another thread about juggling java applications exceeding 4GB of memory with no problem. There must be something else running, either services, perhaps some memory leaking application, antivirus.[/quote]Nothing that shows in task manager at least; I've tallied up everything manually, several times, and it always comes up about half what's reported as used by the task manager. Most likely the per process statistics are based on touched memory pages, and the information about total available memory is based on non-allocated pages. [quote][quote]Of course buying more RAM is a solution, but huge chunks of it are going to remain unused "just in case," which seems like a waste of perfectly good memory to me[/quote] Then turn on the page file. It's precisely what it was made for - the "just in case".[/quote]Not "just in case I need this much memory," but "just in case something with a custom memory allocator actually uses this much memory, which I know it will not." [quote][quote]And physical storage gets allocated on first access to a page? That's the behavior I want to enforce for all allocations, but I guess Windows wouldn't let me? I'm a bit sceptical of the actual performance hit incurred by overcommitting, as you'll only get a page fault the first time you hit a previously untouched page of memory; seems more like a case of "my application is more important than the rest of the system" than actual performance concerns to me.[/quote] Except that application doesn't allocate all the memory it will ever need at start. FF runs for 1 hour, using 150MB and not a byte more. Then user goes to YouTube. Suddely, FF needs to allocate plugin, plugin needs to allocate driver resources for hardware acceleration, windows needs to allocate whatever desktop handles, then images need to be loaded which causes several calls to VirtualAlloc - but some images are of unknown size, so FF uses Heuristic and allocates one 100kb block for file and one 4MB block for unpacked image. Suddenly, FF uses 210MB per process, 20MB for plugin sandbox and 60MB in kernel and driver resources. Applications simply aren't written in a way to know how much they will need. Except for Java VM, which can be limited to min/max values. But each time VirtualAlloc is called, memory is checked. [/quote]What does this have to do with the performance of deferred allocations? The only performance hit you get is a single pagefault per memory page, incurred on first write. If VirtualAlloc requires you to call it time and again, then it doesn't do the same thing.
  15. Random source code from the web. Who gets the cred?

    [quote name='way2lazy2care' timestamp='1301367652' post='4791573'] [quote name='frob' timestamp='1301356226' post='4791538'] [quote name='Daaark' timestamp='1301349836' post='4791509'] Posting random code on the web should be the same as leaving random furniture at the curb. [/quote] Legally you must get permission. For furniture on the curb that means verifying with the owner that they are actually giving it away and weren't moving it to the curb in preparation for loading onto a truck. [/quote] That's not entirely accurate. Once it hits the curb it's either the property of the city or public domain depending on where you live. Different cities have different laws for it, but I don't think any of them in the US leave it as the property of the original owner. [/quote]So basically, stealing a bicycle is perfectly legal in the US if the owner isn't careful about where he parks it? Wow.