« first day (290 days earlier)      last day (90 days later) » 

1:06 PM
hello
dunno if anyone's here.
I'm starting to learn Haskell, and there's something weird there.
:t []
[] :: [a]
in ghci
I don't get why [] gives [a] :|
I'm reading this right now: learnyouahaskell.com/types-and-typeclasses
 
[] can be an empty list for any list type.
 
yeah
so what does a represent there?
 
It's a type variable.
 
oh, looks like I went too far before reading the entire tutorial, they're talking about it.
my bad :]
 
 
8 hours later…
8:43 PM
and if some people wouldn't mind to explain some things, that'd be great
 
8:57 PM
What can we help you with today?
 
With Haskell!
 
:D
hold on
finishing a game of gg2
best game ever.
 
Woman: "Would you like to have sex?"
Man: "Why yes!!"
Woman: "Hold on, finishing a game of gg2" (whatever gg2 is, never heard of it)
 
ok first question
with ghc
is haskell first compiled into C as intermediate code?
 
Why does it matter?
 
9:04 PM
no, just wondering :)
 
I think it is compiled into C--, but not source code, some intermediate form. Let me check.
 
Why does Google Imaging for “haskell wallpaper” yield pictures of hot chicks?
Is Haskell that hot?
 
> GHC compiles Haskell code either directly to native code or using LLVM as a back-end. GHC can also generate C code as an intermediate target for porting to new platforms.
 
ok thanks
 
9:06 PM
The C-- backend is also still shipped.
 
Ah, so I wasn't dreaming.
 
What's C--?
 
Guess.
 
C without using any of the "fancy" stuff?
like strict ANSI C or something
 
C-- (pronounced "see minus minus") is a C-like programming language. Its creators, functional programming researchers Simon Peyton Jones and Norman Ramsey, designed it to be generated mainly by compilers for very high-level languages rather than written by human programmers. Unlike many other intermediate languages, its representation is plain ASCII text, not bytecode or another binary format. Design C-- is a "portable assembly language", designed to ease the task of implementing a compiler which produces high-quality machine code by having the compiler generate C-- code, delegating t...
 
9:10 PM
is there any "common" haskell IDE?
 
emacs
Do you have any actual Haskell language questions? :)
 
setting up on a new PC
trying ghc out for the first time
so today, probably not :)
 
I almost never use ghc, most of the time, I use ghci.
Just so I can try things out and inspect types and stuff.
 
@FredOverflow I have to admit that, either I suck at vim (I don't think so), or emacs really beats the crap out of vim for Haskell.
 
@R.MartinhoFernandes I think both vim and emacs are completely unusable. But then again, I'm a noob to the computing scene. Maybe I just don't get how marking text with strange commands instead of shift+cursor makes you more productive.
 
9:23 PM
The point is, shift+cursor is dumb. aw is a smart way of select "a word".
 
I would probably get productive with VIM
if I had the time and will to start using it
and also to get over the interface =/
 
How do you quit vim again? :#@$! or something?
 
:q, :wq or :q!
 
Or ZZ if you want to save.
@RadekSlupik Amateur.
 
9:26 PM
I never use Vim.
Emacs > Vim.
 
Anyway, I prefer Alt+F4 :)
 
$ killall vim
 
But the editor doesn't matter that much for productivity. Most of the time, when I'm programming, I stare at the monitor and think. I almost never write code when I program. If I could somehow write 10 times faster with a good editor, my productivity would probably not increase by more than 10 percent.
 
I rarely think while programming, and then I type in crappy code like this:
tags = Prelude.map (\k -> pack $ "${" ++ k ++ "}") $ Map.keys params
 
Why do you say Prelude.map? What other maps do you have in scope?
 
9:29 PM
Data.Text.map
And Map.map. :P
 
Maybe you should import those qualified
 
Probably.
I'll abandon this code anyway, was just testing some things.
 
import qualified Data.Map as M
^ seems to be idiomatic
 
Done. Here is the code now, one big mess. gist.github.com/3166349 :P
But it works.
 
What is the point of the program?
 
9:33 PM
Reading in a file and substituting ${...} with text. The ...s are given to template, like so: template "foo.html" $ Map.fromList [("message", toDyn "hello"), ("name", toDyn "Fred")].
If foo.html's contents are ${message}, ${name}! the program will print "hello, Fred!".
 
Ah okay. Examples are always good.
 
I still have to get familiar with data.
It's kinda strange (what isn't in Haskell? :)).
 
@RadekSlupik I find "if then else" un-strange :)
 
9:48 PM
hehe
I think many are confused with return, which doesn't necessarily “quit” the function.
 
But apart from that, yeah... almost every aspect of Haskell is strange in one way or another.
@RadekSlupik count me in
 
But you know, if you learnt Haskell as first language all the other languages would be strange.
 
My University uses Haskell as first language.
It's only one in Europe doing that.
 
My college uses PHP as first language. :<
 
@R.MartinhoFernandes You lucky bastard. Which one was that again?
@RadekSlupik You mean your colleague uses PHP as his first language, right? No college would use PHP at all.
 
9:53 PM
@FredOverflow uminho.pt
It wasn't my first language btw. My first language was Pascal.
 
@FredOverflow school. Whatever the English term is.
 
@RadekSlupik: but you're in high school, not university right?
high school programming is such a joke =/
on my school its creating a drag and drop interface
for a "calculator"
 
@R.MartinhoFernandes I don't speed Portuguese :(
@R.MartinhoFernandes Pascal was my third language, I loved it :)
 
there are three fields. Two input fields and a output field. the output field must be the sum of the two input fields
...
 
@FredOverflow There's a language switch on the top right corner.
 
9:56 PM
@nightcracker I’m just done with high school. Next year I'll attend college/university/school.
 
I hope next year it won't be PHP
 
My degree is this one: di.uminho.pt/ensino/licenciaturas/lei/…, which sadly doesn't have an English site up yet.
 
@nightcracker I once wrote a homework assignment for high school in Haskell. gist.github.com/269e7ea8fcdc0b1c80ee
We could choose any language we liked, but VB or PHP were obviously preferred.
 
@R.MartinhoFernandes No I meant I cannot possibly work at your University as a Haskell tutor if I can't speak (not speed :) Portuguese.
 
10:19 PM
 

« first day (290 days earlier)      last day (90 days later) »