Follow TV Tropes

Following

Coding/Programming

Go To

Tzetze DUMB from a converted church in Venice, Italy Since: Jan, 2001
DUMB
#26: Jan 15th 2011 at 10:11:44 AM

Is Haskell that difficult? I think I'm going to learn it at some point if only so I can figure out what the hell a monad is.

[1] This facsimile operated in part by synAC.
Ponicalica from facing Buttercup Since: May, 2010
#27: Jan 15th 2011 at 10:53:34 PM

It's difficult mostly because of stuff like monads IIRC.

the future we had hoped for
Tzetze DUMB from a converted church in Venice, Italy Since: Jan, 2001
DUMB
#28: Jan 15th 2011 at 10:55:34 PM

I know. >_>

I like the type system, I've begun thinking of things in those terms  *

, not so much the hacks to get around the type system to do shit, i.e., monads. Oh well.

[1] This facsimile operated in part by synAC.
Ponicalica from facing Buttercup Since: May, 2010
#29: Jan 15th 2011 at 11:03:01 PM

You could try some variety of ML. It has the type system, but not the purity.

edited 15th Jan '11 11:03:12 PM by Ponicalica

the future we had hoped for
Pykrete NOT THE BEES from Viridian Forest Since: Sep, 2009
NOT THE BEES
#30: Jan 15th 2011 at 11:05:54 PM

Haskell is basically one of the most ass-backwards languages I can think of off the top of my head, and I'm pretty sure my TI-89 has objectively better programming capacity. The main issue with it is it just abstracts things too far. I mean sure you can make functions that output functions that output functions and even do it in relatively few lines, but there are generally more easily-conceivable ways of going about it that are less likely to go to hell along the way.

edited 15th Jan '11 11:07:49 PM by Pykrete

Tzetze DUMB from a converted church in Venice, Italy Since: Jan, 2001
DUMB
#31: Jan 15th 2011 at 11:07:39 PM

This is what I know about Haskell's use. Abstractions, eh? Lol category theory

And ML would be good too. A ton of papers seem to use OCaml.

How's Haskell backwards exactly, though?

edited 15th Jan '11 11:08:05 PM by Tzetze

[1] This facsimile operated in part by synAC.
SpookyMask Since: Jan, 2011
#32: Jan 15th 2011 at 11:07:43 PM

=/ Its kinda hard to learn to learn to Program when I can't anymore remember how my friend made the programs run.. I just remember that it was in rather complex way x-x;

Tzetze DUMB from a converted church in Venice, Italy Since: Jan, 2001
SpookyMask Since: Jan, 2011
#34: Jan 15th 2011 at 11:10:11 PM

Didn't work if you don't remember =P

Tzetze DUMB from a converted church in Venice, Italy Since: Jan, 2001
DUMB
#35: Jan 15th 2011 at 11:12:18 PM

Oh I do remember, and I'd rather not try to walk you through using the command prompt again, if you don't mind. That was really tedious.

Maybe get WingIDE or something instead.

edited 15th Jan '11 11:12:31 PM by Tzetze

[1] This facsimile operated in part by synAC.
JackMackerel from SOME OBSCURE MEDIA Since: Jul, 2010
#36: Jan 15th 2011 at 11:15:40 PM

Uh... my high school had to learn Java. It sucked, but most of us - a bunch of lazy schlubs more interested in talking than listening - still got it.

Then again, it was basic, bare essential crap. Before we could learn hard stuff that meant something.

Half-Life: Dual Nature, a crossover story of reasonably sized proportions.
Pykrete NOT THE BEES from Viridian Forest Since: Sep, 2009
NOT THE BEES
#37: Jan 15th 2011 at 11:16:48 PM

How's Haskell backwards exactly, though?

reading endless threads about how to subvert Haskell's type system to accomplish basic shit you can do in other languages.

Basically, it's a language seemingly designed around compressing the actual text of the code, which is by far the absolute least important part. You might as well do it in C++ for a fraction of the grief and watch it run faster while you're at it.

edited 15th Jan '11 11:23:24 PM by Pykrete

Tzetze DUMB from a converted church in Venice, Italy Since: Jan, 2001
DUMB
#38: Jan 15th 2011 at 11:21:16 PM

Ah. I thought it was designed to kowtow to typing.

It is interesting in that it has similar syntax to the language from (the 1966) «The Next 700 Programming Languages». Of course, so does ML, so I'll just learn that instead, I guess tongue

edited 15th Jan '11 11:23:24 PM by Tzetze

[1] This facsimile operated in part by synAC.
SpookyMask Since: Jan, 2011
#39: Jan 15th 2011 at 11:21:16 PM

@Tzetze: Yeah =P It would have been better to use Skype or something XD

Jk~ But yeah, I guess I have to ask my friend how he did it -_-; But seriously annoying, why the heck I need to write much longer thing to run programs than other people?...

Pykrete NOT THE BEES from Viridian Forest Since: Sep, 2009
NOT THE BEES
#40: Jan 15th 2011 at 11:22:56 PM

"Ah. I thought it was designed to kowtow to typing."

It was, but most OO languages do it about as well with generics, so short code is about the only advantage my prof could field.

Tzetze DUMB from a converted church in Venice, Italy Since: Jan, 2001
DUMB
#41: Jan 15th 2011 at 11:24:17 PM

I lurve generics. Gotta use 'em more. Maybe it's just the return types I like.

But seriously annoying, why the heck I need to write much longer thing to run programs than other people?...

I have no idea what you're trying to say, sorry.

edited 15th Jan '11 11:24:38 PM by Tzetze

[1] This facsimile operated in part by synAC.
Tangent128 from Virginia Since: Jan, 2001 Relationship Status: Gonna take a lot to drag me away from you
#42: Jan 20th 2011 at 5:26:37 PM

Started learning MIPS assembler for architecture class. High time I knew some form of assembly...

Do you highlight everything looking for secret messages?
Tzetze DUMB from a converted church in Venice, Italy Since: Jan, 2001
DUMB
#43: Jan 23rd 2011 at 10:44:42 PM

^Good luck with that. ...I always think of assembly languages in terms of the consoles using them. You're learning ps1

also definitely getting the haskell thing now

[1] This facsimile operated in part by synAC.
melloncollie Since: Feb, 2012
#44: Jan 23rd 2011 at 10:47:46 PM

Hay guys. How do you make booleans in Scheme? I mean like, do you have to put in (print 'true) or am I doing it wrong

Tzetze DUMB from a converted church in Venice, Italy Since: Jan, 2001
DUMB
#45: Jan 23rd 2011 at 10:50:14 PM

What do you mean make?

In code they're just #t and #f.

[1] This facsimile operated in part by synAC.
melloncollie Since: Feb, 2012
#46: Jan 23rd 2011 at 10:59:34 PM

Er...

I mean, make a function that returns #f and #t. I've been using (print 'true) so far, but that doesn't feel right.

Also, I'm having trouble using recursion with stuff involving strings. If you use a function like (butfirst argument), it returns something in parentheses, and other functions count the parentheses as being part of the word. just bugs me

Tzetze DUMB from a converted church in Venice, Italy Since: Jan, 2001
DUMB
#47: Jan 23rd 2011 at 11:02:40 PM

In Scheme the return value of a function is just the last thing that's uh... there. So if you have, say

(define lessthanfour
  (lambda (x)
    (if (< x 4)
      #t
      #f)))

it returns the value properly.

[1] This facsimile operated in part by synAC.
melloncollie Since: Feb, 2012
#48: Jan 23rd 2011 at 11:05:18 PM

What the... what

We haven't gotten to lambda yet. Or maybe I'm dumb. I dunno.

What we do usually looks like this:

(define (lessthanfour num)
(if (< num 4) (print 'true)
(print 'false)
) )

Okay yes I am dumb. Technically they're the same things (lambda vs (blah blah), I mean). Oh well, I learned things today. smile

edited 23rd Jan '11 11:08:34 PM by melloncollie

Taelor Don't Forget To Smile from The Paths of Spite Since: Jul, 2009
Don't Forget To Smile
#49: Jan 23rd 2011 at 11:07:08 PM

That's just printing "True" and "False" on the screen.

(< num 4) will return either true or false. That's all you need.

You could define it as:

(define (lessthanfour num) (< num 4))

Note: I'm mainly a common lisp programmer, so it's possible I'm talking completely out of my ass.

edited 23rd Jan '11 11:13:47 PM by Taelor

The Philosopher-King Paradox
Tzetze DUMB from a converted church in Venice, Italy Since: Jan, 2001
DUMB
#50: Jan 23rd 2011 at 11:08:36 PM

(define (something args) whatever) is shorthand for (define something (lambda (args) whatever)), sorry.

^And yeah, that.

edited 23rd Jan '11 11:08:58 PM by Tzetze

[1] This facsimile operated in part by synAC.

Total posts: 1,462
Top