« first day (403 days earlier)      last day (4562 days later) » 

8:00 PM
@RMartinhoFernandes ST = state monad? Sure, you can simulate mutable variables with Monads. Is there anything you can't do with Monads? :)
 
@FredOverflow So apart from language features, what kind of application development is well suited for Haskell?
 
but each mutation is one recursion
 
@FredOverflow ST is a special state monad that lets you mutate (true mutation, not through copies like its cousin State) state inside it.
 
so it is not really mutated but just shadowed?
how can that be. that's not pure
 
@ManofOneWay It's a general-purpose programming language, so you can do basically anything with it. It seems to be especially suited for language processing, but that's just my personal observation.
 
jli
8:02 PM
Do there exist compilers to machine code for Haskell?
 
The most widely deployed compiler, GHC.
 
@ManofOneWay Also, if I were to design a University curriculum for computer science from scratch, Haskell would be my first choice. After that, C++.
 
jli
Yeah my very limited exposure to it has always been interpreted.
 
@FredOverflow Oh, you would love my course's curriculum then: first exposure to a programming language is with Haskell.
 
@RMartinhoFernandes What course is that? I mean where?
 
8:04 PM
(I heard this is like, the only University in Europe that does it.)
 
@RMartinhoFernandes I need to go there!
3
Q: What am I not understanding about getline+strings?

BrentThis is my first time using stackoverflow. I've been unable to find out the information I need regarding getline. I'm in a simple programming class for engineering transfers so the code that we write is pretty simple. All i'm trying to do here is put a user-defined number of questions and answers...

x = x++;   // LOL
 
We used ML in our first course
 
@FredOverflow Engenharia Informática (I'm not sure how to translate that) @ University of Minho, Braga, Portugal.
 
@ManofOneWay ML is an early precursor to Haskell, isn't it?
@RMartinhoFernandes not Germany :(
 
jli
@FredOverflow someone wrote x = x++ in a loop in my CS class, and complained to the teacher that the computer was broken.
 
8:06 PM
lol
 
Ooops.
> Unfortunately, the information provided in this site is still only in Portuguese. The International Relations Office provides information in English about all the University of Minho courses. Additional information about the Informatics Engineering course can be found here.
Dammit.
 
I often wish C++ had a real for loop (or no for loop at all). This for (int i = 0; i < bound; ++i) is sooo low-level!
 
@FredOverflow At least it's older =) I don't know more than that
 
jli
@FredOverflow what's wrong with that syntax?
 
@ManofOneWay ML was a huge influence on Haskell's type system, IIRC.
@jli It's incredibly low-level. I have to mention the loop counter three times.
 
8:08 PM
Should be for i in 0..bound or something.
 
exactly
I believe Scala has such a for loop.
 
jli
Sheesh, people these days. goes back to writing in assembly
 
for (i <- 1 to 10)   // Scala is awesome
 
that's iterating over a list comprehension
 
Whatever you want to call it. Me wants it.
 
8:10 PM
Let's create a C++ lounge project, where we create our own C++ compiler that can handle that kind of syntax
 
A non-standard extension to C++, what a wonderful idea... ;-)
 
;D
Our own super language!
 
Gosh no.
Language design on top of C++?
Don't you guys know anything else to give you pain?
 
C++++!
 
Fred can then implement the Monad AST walker
 
8:11 PM
Like say, banging your head against the wall.
 
jli
@ManofOneWay #define forr(a,b,c) for(int (a) = (b); (a) < (c); ++ (a))
lol
 
@jli Hm, good start!
 
the worst thing is, that int(a) = (b) is valid
 
jli
Note: I absolutely hate macros.
 
@Fred btw, do you know anything about GHC optimizations?
 
8:12 PM
@RMartinhoFernandes Other than that they exist, no.
 
GHC can generate LLVM code
so all LLVM optimizations are in
 
Does ghc generate some strange intermediate language or straight C?
 
:( I just learned that folds can be fused and got intrigued. I need links!
@FredOverflow C-- (created by whom other than SimonPJ), I think.
 
It's so awesome that C-- actually exists :)
Let's build a language that gets rid of C++'s most annoying corner cases and call it C++--!
 
I think the João Dias guy involved in C-- is from my university :P
 
8:15 PM
awesome
 
It has LLVM backend, too.
 
we can call it C°° to get rid of 8 corners from C++
 
How about a mix of C++ and Haskell called Haske++? :)
 
How do you pronounce that?
 
jli
Hask plus plus I think.
 
8:17 PM
HasC++ xD
 
Haske<cough><burp>
 
it'S even english
 
(I don't really care, I'm just pointing out that you would have to handle that question for the rest of your life).
So, better pick an easier name.
 
also if you lift up C you end up at K
 
@RMartinhoFernandes In that case, we should name our language "Stroustrup".
 
8:17 PM
so you complete it to HasK
 
@JohannesSchaublitb What kind of "lifting up" is that?
 
phonetic lifting
 
The kind that transforms C into K, what else?
 
So, we remove 274 things from C++?
 
You counted them?
 
8:19 PM
Damn numbers.
 
i would be OK if we ended up at C99
 
Not really, no.
 
all we need is being able to declare void f(int[static 1]);
 
Okay, time to end this stupid Wednesday once and for week. I'm going to sleep.
 
"once and for week"?
You do need to sleep. Good night.
 
8:21 PM
lol
 
Well, I can't end it once and for all, can I.
It'll be back next week.
 
:)
@JohannesSchaublitb What would that mean?
 
@FredOverflow it's C99 code
 
Again, what would that mean?
 
hey
hello, please, is there anybody who programmed in verilog and used cadence?
 
8:22 PM
restricted pointer or something?
 
hey
please, i am dying...
 
it would mean "declare f as a function returning void and taking an int* that points to at least one int"
 
Get some food.
 
@hey hey
 
@hey If you're dying, programming problems should be the least of your worries.
 
jli
8:23 PM
@hey Bad place to ask for verilog help lol.
 
@keithlayne lol
 
hey
no one programmed in it?
 
@JohannesSchaublitb And what would be the difference to void f(int*)?
 
well, any pointer can only point to at most 1 T. so i guess i shall remove the "at least"
 
Silly syntax.
 
8:24 PM
@hey I had to do some VHDL once. I don't remember a thing.
 
@FredOverflow that my case cannot be a null pointer
 
@JohannesSchaublitb Oh, so C finally gets "references"? ;)
 
void f(int[static 2]);
now it points to an int that is followed by at least one other int
 
jli
What's the practical use of that second one?
 
it finally got "this number in brackets is not completely redundant"
 
8:25 PM
You mean, like int(&)[2]?
 
@jli the compiler can optimize
 
@RMartinhoFernandes No, then you can't pass an int[3]. I get it now.
 
and you cannot pass a int* you got from malloc etc xD
 
He removed that!
1 min ago, by Johannes Schaub - litb
well, any pointer can only point to at most 1 T. so i guess i shall remove the "at least"
 
also C99 has void f(int[const][1]);
 
8:26 PM
explain
 
the pointer is const now
 
Oh, I remember a question I asked about something like that.
 
i think i asked it for the lulz
 
11
Q: Can I pass constant pointers disguised as arrays?

FredOverflowvoid foo(const char *s); is equivalent to: void foo(const char s[]); Are there similar equivalents to the following two? void foo(char * const s); void foo(const char * const s);

 
Hello fellow nerds
 
8:27 PM
9
Q: In a C header file I saw `[*]` used as array bound. What does this mean?

Johannes Schaub - litbIn one of our files I saw this function void match(int states[*]); I have never seen such a thing in C. Can someone please explain that what this weird operator in the brackets mean?

ah no it was different xD
 
@ElectroNerd Hi.
 
I have a question, but first I wanted to verify your credibility.
1 + 1 = ?
 
jli
Completely incredible.
 
If you can answer that I think we're on a good start.
 
12
A: Can I pass constant pointers disguised as arrays?

cafYou cannot in C89, but in C99 you can declare the equivalents as: void foo(char s[const]); void foo(const char s[const]);

 
8:27 PM
@ElectroNerd 2.
I am a bot btw.
 
jli
@ElectroNerd Less than 3
 
Fantastic
lol
 
@ElectroNerd Depends on the algebra. I say 1 + 1 = 0.
 
@ElectroNerd 11=
 
LOL, I thought I might get some of those
 
8:28 PM
"@Hans my code is managed by subversion" he he
 
because adding 1 to the string 1= is string concatenation
 
So guys, I'm working on this big project from nearly the ground up.
One thing I'm wondering is how people combine languages to accomplish specific tasks?
 
jli
What languages specifically?
 
For instance, Linux was programmed in C, C++, ASM, etc.
How do you go about combining those languages and making them interact to perform a specific task?
 
jli
It all gets compiled to machine code, so its all compatible.
 
8:29 PM
@ElectroNerd with a common ABI
 
Hmmm...ok
 
In computer software, an application binary interface (ABI) describes the low-level interface between an application (or any type of) program and the operating system or another application. Description ABIs cover details such as data type, size, and alignment; the calling convention, which controls how functions' arguments are passed and return values retrieved; the system call numbers and how an application should make system calls to the operating system; and in the case of a complete operating system ABI, the binary format of object files, program libraries and so on. A complete AB...
 
hm my friend said he calls me at nine but now it's half an hour later xD
and he hasn't yet called
 
Maybe he's on another timezone.
 
Because I wanted to develop some software that would integrate Python as the primary language that performs various tasks and use C++ or something to create a nice GUI.
 
8:30 PM
@JohannesSchaublitb Did you give him a callback?
 
What would be the best way to go about this?
 
Boost.Python? (Disclaimer: Never used it.)
 
yes he knows my num xD
 
@ElectroNerd you sure linux is in C++?
 
@keithlayne Doesn't Linus Torvalds hate C++?
 
8:31 PM
Thanks @R. Martinho
 
yes parts of linux are C++
 
@FredOverflow that's what I hear
 
KDE is written in low-church C++.
 
the config click gui for example
 
I was talking kernel
 
8:32 PM
it is written with Qt
yep..
 
The language isn't the point, it's how to interface them together.
Are there any examples of how this is done?
 
obv interfacing has to be done with C
down to bare metal
or with Dbus
 
Well, dynamic languages are an entirely different beast from assembly and C.
 
I haven't done much C++, only C, so which languages do you think would be best? A nice C# look would be cool, but not with the .NET platform..
Right
 
dynamic languages have a large runtime lib and rather small compiler
python seems like a nice dynamic language
 
jli
8:34 PM
I can vouch for Boost.Python
 
How do you do the @jli thing?
Did that prompt you jli?
 
Wow, Linus Torvalds wrote his Master's thesis in one weekend? Impressive.
 
jli
yep
 
@ElectroNerd you may want to read the newbie hints.
 
8:35 PM
@jli, how does Boost.Python look? Do you have any stuff you've done with it?
 
jli
@ElectroNerd you can do @ and start typing the name, then press tab and it autofills
 
Awesome, thanks.
 
jli
@ElectroNerd I only have shitty code that uses it, just google for some examples.
 
That reminds me, C++ still has no @ operator. Taking suggestions now.
 
would have thought he hates latex
perhaps he used MS Word
 
8:35 PM
@FredOverflow Swizzle!
 
Who hates LaTex? It's awesome.
 
i kinda hate it
 
How about @ = &&, so we can declare rvalue references via T@?
 
stupid error messages
stupid macro system. srsly we are at 2011
 
@JohannesSchaublitb It can be tedious sometimes.
 
8:36 PM
@JohannesSchaublitb Right. C macros <cough>.
 
ditch them
<troll>i use inline functions
</troll>
 
jli
a @ b == 42
 
The OpenOffice.org math editor is nice.
That would be a good alternative.
 
the bad thing is, latex looks so sexy once you have it written down
 
Sexy is good.
 
8:37 PM
@JohannesSchaublitb You mean the end product?
 
How do you do images here?
 
Paste the link (just the link, nothing else).
 
Will it automatically configure the URL?
 
@JohannesSchaublitb yep, definitely worth all the pain
@ElectroNerd yes
 
8:38 PM
we could request a "paint" function so ppl can draw circles etc in the chat xD
then we could play tic tac toe xD
 
How awesome would that be??
 
Good luck with that.
Also, tic tac toe is lame.
 
Until we have that feature, there is a workaround:
O
 
jli
Tic tac toe is unwinnable..
 
8:39 PM
lulz
 
I AIed my way out of it in like 7th grade or something.
 
at least 4 in a row is winnable. if you start you can always win
 
@ElectroNerd Where's the sex in that picture, I don't see it.
 
8:40 PM
I sometimes use that online editor when conferring with others on equations online.
@FredOverflow C'mon, geeez...
 
jli
Looks useful.
I just use mathematica :P
 
@ElectroNerd Oh right, you're new here.
 
@FredOverflow on the top x does itself and in the basement someone feeds x something
 
Damn, now I feel old. I use pen and paper.
 
@FredOverflow Why, is that all you guys talk about here?
 
8:40 PM
@JohannesSchaublitb lol
 
lol
 
@ElectroNerd It's a regular topic, yes.
 
jli
"Leave your seriousness at the door."
 
Hmm...that's unfortunate in my view.
Can you whisper on this chat?
 
@JohannesSchaublitb Also, "x+1" means "x and partner", right?
@ElectroNerd What does that mean?
 
jli
8:42 PM
@FredOverflow What's x^2 then?
Oh didn't see the previous message
 
Well, I mean message people secretly.
 
Nope, everything here is public.
 
@jli Doesn't Mathematica cost mullah?
 
jli
@ElectroNerd Got it free from my school :D
 
You can click on them and say "start a new room with this user".
@RMartinhoFernandes Even data members?
 
8:43 PM
@jli Are you in college?
 
jli
High school still, cause I'm lame
 
I'm in high school too
What year?
I'm a junior
 
jli
12
 
Ah , nice
 
jli
Going to Waterloo next year for SE though
 
8:44 PM
@FredOverflow ahh right
 
I'm working on a project called "Fractal Antenna CAD Software for Simulation Compatibility"
 
@JohannesSchaublitb So x has a partner in the basement.
 
perhaps in the basement x just gets pregnant
 
:)
@ElectroNerd a butterfly?
 
8:45 PM
That's the 3D radiation pattern or field strength of the Hilbert Curve Fractal Antenna.
It looks sort of like a butterfly, eh?
Kinda cool
 
jli
@ElectroNerd that's an interesting grid you've got there.
 
hey ppl
 
It's a hypothetical antenna
 
jli
I guess it would be the antenna
 
8:46 PM
Is that maze solvable?
 
Yep
 
can someone tell me if printf is thread-safe?
 
printf isn't even foolproof.
 
What kind of thread safe?
 
I'm working on a universal fractal generator
But I won't tell you any more, otherwise I'll have to kill you ;)
 
jli
8:46 PM
6
Q: stdout thread-safe in C on Linux?

ClaudiuIs writing to stdout using printf thread-safe on Linux? What about using the lower-level write command?

 
Oh, not another one taking part in the conspiracy!
 
@ElectroNerd you mean it's top secret
 
Yessir
 
we will not tell anyone
 
8:47 PM
Are you sure?
 
@ElectroNerd I want the blue pill. Or was it the red pill? Just give me anything, I'm starving here.
 
I don't do drugs
 
i do matrix
 
jli
@FredOverflow xkcd.com/566
 
8:48 PM
That was a reference to The Matrix.
 
I do the boogie
Oh ok, I don't watch many movies.
 
Kids these days.
 
I spend my time reading instead.
 
I read too!
 
jli
The Matrix is a huge classic
 
8:48 PM
But I watched The Matrix.
 
Woop
I think I saw some of it, but that was quite a while ago.
 
yes The Matrix is really good
 
And I'm missing a few hours of my life. I don't know what happened, but people keep telling me I was watching the sequels.
 
@RMartinhoFernandes They should to a prequel, The Inverse Matrix or something.
 
i didn't watch many movies but when I watched i probably watched Matrix!
 
jli
8:49 PM
@JohannesSchaublitb the first one is really good. The rest are.. well..
 
Isn't it kind of depressing?
 
@jli There's more than 1?
 
@jli WTF are you talking about?
 
jli
@FredOverflow It's a trilogy.
 
Ah, like the Star Wars trilogy.
 
8:50 PM
i like the third too
 
@jli I have no memory of any sequels :)
 
@awoodland Pretty sure there aren't any.
 
The "Star Wars Trilogy" doesn't seem applicable.
 
jli
@awoodland my take exactly :P
 
@FredOverflow No! There are three Star Wars movies, but only one Matrix movie.
3
 
8:51 PM
@RMartinhoFernandes Right, right.
 
You can't have a trilogy if there's only one movie.
 
jli
It's funny how I didn't get a reference to a comic I just posted.
 
Just like there are only 3 Indiana Jones movies. Although the second one was kinda bad. Let's say 2,5 Indiana Jones movies.
 
You can certainly have a trilogy of five (case in point: H2G2), but not of one.
 
By the way, will they ever do a third Terminator movie?
 
8:52 PM
i don't like how nero dies at the end
 
@R. Do you use R?
 
i dropped a tear for him
 
@ElectroNerd As in the statistical programming language?
 
jli
8:52 PM
What are the policies on profanity within this chat?
 
Yeah
 
@jli There are none, asshole.
 
jli
I see.
 
8:53 PM
@ElectroNerd I don't. The R in my name is a reference to Asimovian robots.
 
Ooh, Isaac Asimov.
 
And I thought it related to "Toys R us!"
 
I read some of his books, they're classics.
 
@jli You have to censor the word Bra*nfuck.
 
For science fiction at least.
 
8:53 PM
@RMartinhoFernandes But only because the language is so retarded.
 
@RMartinhoFernandes Isn't that a language?
 
Why would you even call a language that....
 
Don't ask me.
 
@ElectroNerd because it describes what the language is supposed to do
 
8:54 PM
I suppose that does apply, yes.
 
I thought it was supposed to be a Turing-complete language with a small compiler.
Malbolge is the one supposed to fuck up your brain.
 
@RMartinhoFernandes Well, that applies to almost every popular language.
 
you can write a compiler in zero characters
if the language consist of the empty word and the compiler translates it into the empty word.
 
That's not Turing-complete.
 
So what is everyone's background here?
 
8:56 PM
White.
 
it's an Identity compiler
 
@ElectroNerd standard Windows blue
 
Me too
 
my background is German -.-
 
Wow, let me be specific...haha
 
8:56 PM
i'm so depressed :(
 
Background as in your profile.
 
Why @JohannesSchaublitb
 
jli
@ElectroNerd profile of what?
 
Profile of your MOM
 
jli
8:57 PM
Oh
 
@ElectroNerd "spends way too much time thinking about programming"
 
@FredOverflow You or me?
 
@ElectroNerd Me. You asked for my profile, right?
 
Ok
What about education, job, etc.?
 
8:57 PM
I'm just curious
 
i can be described like
 
I'm a student.
 
When I don't think about programming, I usually think about teaching programming. Which is my job.
 
I shouldn't be, but I am.
 
"spends too much time trolling on SO, the committee, the usenet and the IRC"
 
8:58 PM
@RMartinhoFernandes And you use paper and pencil?!
 
and all I do is annoying everyone lol
 
@RMartinhoFernandes What are you studying and plan to major in?
 
@ElectroNerd Yes!
I had a job programming once, and I flunked in college :)
 
@JohannesSchaublitb annoying and enlightening us at the same time with your template knowledge
 
jli
So should I work on my philosophy essay or continue to do absolutely nothing useful.
 
8:59 PM
@ElectroNerd My course is titled Informatics Engineering.
 
@jli Isn't that the same thing?
 
lol @FredOverflow
 
my template knowledge consists of just knowing how to reach clause 14 xD
 
jli
@FredOverflow I see what you did there..
 
It's the only one in Europe that uses Haskell as a first programming language.
 
8:59 PM
@RMartinhoFernandes Nice
 
(I'm going to be proud of that from now on, for some reason.)
 

« first day (403 days earlier)      last day (4562 days later) »