Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror

Comment: Re:Casting (Score 1) 757

by ziggystarsky (#49231821) Attached to: Was Linus Torvalds Right About C++ Being So Wrong?

I was able to avoid casting completely for over two years while working in Scala. Certainly, the kind of work I did somehow supported this.

Only lately I had to resort to casting sometimes. But this happened only when dealing with rather complex types that abstract over nearly arbitrary computations. At one point you reach the ceiling of what is achievable with some fixed type system—and then you need casting.

I am now using shapeless for meta-programming, but I think this is the point where you yearn for more a expressive (dependently typed) type system than the one offered by Scala (or even Haskell). I hope the next generation of programming languages will make this practical.

Comment: Casting (Score 3, Insightful) 757

by ziggystarsky (#49228823) Attached to: Was Linus Torvalds Right About C++ Being So Wrong?

Casting is telling the compiler to do what you want. It's like saying "Shut up! I know what I'm doing, this thing is a XY pointer, even if you can't figure it out yourself."

In every language (which supports casting) you can make an error while casting by claiming something that isn't correct. Surprise!

Comment: Super efficient amphibiuous propulsion (Score 1) 73

by ziggystarsky (#49016347) Attached to: Underwater Vehicle Uses a Balloon To Dart Like an Octopus
It sounds like magic! Scientists at Slashdot have invented a mechanism that can propell any vehicle, both under water and on land. The invention works by attaching an external string. An also external human then pulls said string, and the object moves in direction of the string. Youtube video follows.

Comment: Re:This is obviously correct (Score 1) 174

In reality there no such thing as a (formal) proof. You cannot prove the simplest things.

You can prove things based on axioms and hypothesis. This works for theoretical settings like mathematics. In reality, even the most simple statement (like "This is an apple.") cannot be verified with certainty (what IS an apple?). Even if you do a DNA analysis of the genome of the object, you have uncertainty in the analysis, e.g. random misreadings of your equipment.

All you can do is be "pretty certain" about something. But that's not a proof.

Comment: This is obviously correct (Score 0) 174

Is it possible that using secure email services can be construed as an indicator of being a terrorist?

Take the experiment of drawing a random person. Define two events

  • T - the person is a terrorist
  • X - the person uses encrypted internet messaging

If P(T|X) (probability of the person is a terrorist given he uses encryption) is larger than P(T) (probability of the person being a terrorist using no other evidence), I'd call the fact of using encryption an indicator of being a terrorist.

Any objections?

Of course the "indication strength" might be low. But I think the fact of using encryption increases my belief in someone being a terrorist. And taken together with other observations this might be enough to take according action.

Comment: Re:I no longer think this is an issue (Score 1) 258

I strongly disagree. The idea that AI will be based on logics is from the 70ies and plain wrong. If some program will develop something that can be called a conciesness, then this program will be "black box" in the sense that we built it, but have no idea how it is working. It will have goals and motivations, and maybe it will be able to find or reinterpret those goals in a non-inspectable way. Asimovs laws are also not practical because there will be no way to implement them. How would you implement these rules in a human brain?

Comment: Let's compare these advantages to Haskell (Score 2) 62

by ziggystarsky (#48592743) Attached to: Kawa 2.0 Supports Scheme R7RS

It combines the strengths of dynamic scripting languages (less boiler-plate, fast and easy start-up, a REPL, no required compilation step).

Let's see whether the great dynamic scripting language Haskell also fulfills these points.

  • - less boiler-plate: in addition to not requiring type annotations, Haskell even gets rid of parens; check
  • - fast and easy start-up: you can compile it to native; check
  • - REPL: check
  • - no required compilation step: if you use runhaskell it looks like interpreted, check (thouch technically that's a lie, as it is for JITed scripting languages

Now we see Haskell has all the advantages of dynamic scripting languages. How about the advantages of compiled languages?

with the strengths of traditional compiled languages (fast execution, static error detection, modularity, zero-overhead Java platform integration).

  • - fast execution: ghc creates very efficient native code, check
  • - static error detection: uhm, yes; though better than traditional languages, check
  • - modularity: dunno what this means. Since there are modules in Haskell we call it check.
  • - zero-overhead Java platform integration: unfortunately not. But since exactly when is Java-integration zero overhead?

Which proves that Haskell has all the advantages of dynamic scripting languages, and most of the advantages of traditional compiled languages.

Btw., you can do the same using any other modern compiled language. This post wants to show the "advantages of dynamic scripting languages" have nothing to do with the languages being "dynamic" or "scripting", whatever that means.

Comment: Script languages have few concurrency errors (Score 1) 217

by ziggystarsky (#48317195) Attached to: The Effect of Programming Language On Software Quality
See Figure 2. They even stress this in the text:

Among the dynamic languages, only Erlang is more prone to concurrency errors. The regression analysis also shows that projects written in dynamic languages like CoffeeScript, TypeScript, Ruby, and Php have fewer concurrency errors

Now everyone knows that Erlang is bs for doing concurrent stuff, right? I do all my concurrency related programming in Ruby, as every other sane developer would do!

Comment: Re:overqualified (Score 1) 479

by ziggystarsky (#47977389) Attached to: Ask Slashdot: Finding a Job After Completing Computer Science Ph.D?
I know the BS and MS students from India. If the PhDs are the same...

They appear to put enormous work into making their CV look good (like having publications in shitty journals, about shitty pseudo research). But they're not able to get anything done, because they have no skill whatsoever. Only on paper.

Comment: Re:special software client (Score 1) 131

by ziggystarsky (#47977271) Attached to: The Site That Teaches You To Code Well Enough To Get a Job
In particular when other sides manage to do everything within the browser. A good example is hackerrank.com. There, you can edit your code for a multitude of languages (Bash, Brainfuck, Haskell, Scala, Ocaml, Octave, R, ... just to name a few) within the browser. When you hit submit the code is compiled and run on the server.

I don't want to use a stinky client, just because these people can't code their website properly.

"Consequences, Schmonsequences, as long as I'm rich." -- Looney Tunes, Ali Baba Bunny (1957, Chuck Jones)

Working...