#haskell - Mon 19 Feb 2007 between 19:47 and 20:01

NY Lost Funds



sorear"difference lists"
for a concrete example:
maukecollect the pieces and concat them
sorearthat works too
jerhrmmm ok
sorear> let allNums low hi xs = if (low == hi) then xs else show low ++ " " ++ xs in allNums 1 10 ""
lambdabot"1 "
chessguyjer, can you give us a concrete example of something you'd like to be able to do?
jerchessguy, i'm building up assembly language peice by peice, and for instance; i'm checking if the type of a label is an object/data/subroutine/etc and applying the appropriate .type <name>,@object/@function then sticking in the function alignment based on a flag, and then inserting the label name afterwards
i could give some code, but it's not done yet =]
chessguyjer, well, there's a lot of different approaches to building up strings in haskell, just like there's a lot of ways to do it in imperative languages
function composition is important: e.g., (foo . bar) myString
functions like words, filter, map, and all the other [a] -> Foo functions
of course concatenation
jerright; i was more looking for a suggested way because i feel like i'm abusing haskell =]
(and infact, i was told this by a friend too heh)
chessguywell, haskell is inherently high-level
so you may have to abuse it to do something so low-level
on the flip-side, domain-specific languages and parsers are its specialty
or one of them anyway
jeri have generally done all my DSL stuff in Io (the antonym of Haskell i must say)
sorearHaskell is a reaserch language that accidentally found a niche.
It shouldn't be at all practical.
jerhighly dynamic, unable to reason about a program w/o seeing the whole program, pure object-oriented, ast manipulation at runtime... all the "fun" stuff =D
sorearbut it is ...
chessguysorear, what are you talking about?
sorearHaskell
sendarkhello there
chessguy"It shouldn't be at all practical. but it is..."?
edwinbpractical? pah.
Some people seem to think you want to run programs after you write them too.
mbishophow can I get the time in seconds since the epoch in haskell?
chessguythat doesn't even make sense
smjer: how about printf
mbishop?hoogle time
lambdabotSystem.Time :: module
Time :: module
System.Locale.time12Fmt :: TimeLocale -> String
sorearmbishop: System.Time, getEpochTime (I think)
?hoogle+

Page: 3 10 17 24 31 38 45 52 59 66 73 80 87 

IrcArchive

NY Lost Funds