|
i will also admit i like hemlock, the editor unfortunately it's not useful for very much because it just doesn't have the emacs ecosystem. at any given time, if you boot up hemlock, you are probably the only user on the planet
|
# ? May 3, 2015 05:06 |
|
|
# ? May 27, 2024 17:32 |
|
FamDav posted:last time I tried to get evil mode working in emacs it took like an hour because I couldn't find a single tutorial on emacs that actually just force fed you the primitives instead of expecting me to know every key command as a prereq. did you try the tutorial that was right in front of you built into emacs?
|
# ? May 3, 2015 09:35 |
|
Soricidus posted:did you try the tutorial that was right in front of you built into emacs? it took me a really long time to believe that anything supplied with a piece of software could possibly be useful to read, but emacs really does take that "self-documenting" thing seriously
|
# ? May 3, 2015 12:52 |
|
hypertext and documentation are two of the ways that emacs really does live up to the lisp workstations of yore that poo poo is no joke emacs is also the only good way to browse gnu info pages. all the man pages for gnu tools were written by debian or red hat and are seriously abbreviated. if you want to know the details for e.g. gnu tar, break out emacs and browse the info pages.
|
# ? May 3, 2015 16:52 |
|
haskell! why does "cheapest m t = map (cost m) t" gimme a: Couldn't match type `Double' with `Int' Expected type: [Int] -> Int Actual type: [Int] -> Double In the first argument of `map', namely `(cost m)' it feels like it should work to me im trying to map (cost m) over t and that should work surely? t is a [[Int]], and i assumed itd just pass each [Int] to (cost m)
|
# ? May 3, 2015 17:09 |
|
the signature of cost is cost :: [[Double]] -> [Int] -> Double
|
# ? May 3, 2015 17:11 |
|
actually, duh, im an idiot
|
# ? May 3, 2015 17:14 |
|
does cheapest have the sig-Awia posted:actually, duh, im an idiot oh never mind
|
# ? May 3, 2015 17:16 |
|
gonadic io posted:does cheapest have the sig- yeah, my sig expected a [Int] not a Double like i was outputting
|
# ? May 3, 2015 17:26 |
|
the trouble now is i just get the cost of the journey not the actual journey
|
# ? May 3, 2015 17:30 |
|
that there exists a difference between Integer and Int in haskell will never cease to annoy me how do i declare a list and make it one specific data type? like i have "journey = [1,2,3]" atm but it thinks its a load of Integers not Ints
|
# ? May 3, 2015 17:52 |
|
Awia posted:that there exists a difference between Integer and Int in haskell will never cease to annoy me journey = [1,2,3] :: [Int] (i think)
|
# ? May 3, 2015 17:55 |
|
Awia posted:that there exists a difference between Integer and Int in haskell will never cease to annoy me journey = [1,2,3]::[Int] journey::[Int] = [1,2,3] one of them has to be right
|
# ? May 3, 2015 17:55 |
|
Testiclops posted:journey = [1,2,3] :: [Int] Valeyard posted:journey = [1,2,3]::[Int] Valeyard posted:journey::[Int] = [1,2,3] journey :: [Int] journey = [1,2,3] this has the advantage of letting you do journey = undefined at the beginning while you're still working out the structure of your program which i find immensely useful
|
# ? May 3, 2015 17:58 |
|
Valeyard posted:journey = [1,2,3]::[Int]
|
# ? May 3, 2015 17:59 |
|
Testiclops posted:journey = [1,2,3] :: [Int] this was the one i am not good at haskell
|
# ? May 3, 2015 17:59 |
|
Awia posted:that there exists a difference between Integer and Int in haskell will never cease to annoy me haskell has a bunch of signed and unsigned integer types of different sizes, and integer is basically a bignum
|
# ? May 3, 2015 18:01 |
|
Awia posted:that there exists a difference between Integer and Int in haskell will never cease to annoy me Int is machine dependant, minimum 30 bits. Integer is arbitrary sized, usually called bigints in other langs. usually type inference will make sure that literals are the right type automatically, it's interesting that it doesn't in this case. most library functions work with Ints because they're quite a bit faster and more portable, not to mention traditional. most of these library functions have a version where you prepend `generic' (i.e. genericTake, genericLength) which aren't specialised to Ints but can return any of the integer types.
|
# ? May 3, 2015 18:03 |
|
if you enable -XScopedTypeVariables you can do x :: [Int] = [1,2,3] but you should not do this unless you know you need to. you don't Awia. it is pretty handy for type-driven programming though, like this guy: https://www.youtube.com/watch?v=52VsgyexS8Q
|
# ? May 3, 2015 18:13 |
|
that's neat. given a card number indexed between 0 and 51 i don't need 40 lines of ifs and switches to get the "correct" name for the card number, i can just mod 13 and look it up right in the format functioncode:
Luigi Thirty fucked around with this message at 20:17 on May 3, 2015 |
# ? May 3, 2015 20:15 |
|
that's an ugly rear end lookup table you got there
|
# ? May 3, 2015 20:55 |
|
Bloody posted:that's an ugly rear end lookup table you got there i'm on chapter 4 and googling "doing x but in lisp"
|
# ? May 3, 2015 20:56 |
|
lol, that's one way to do it i guess
|
# ? May 3, 2015 20:59 |
|
someone should write a modal terminal-oriented full-screen editor in Haskell where all of the editing commands are purely functional and directly correlate to operations on the Buffer monad.
|
# ? May 3, 2015 22:09 |
|
eschaton posted:someone should write a modal terminal-oriented full-screen editor in Haskell where all of the editing commands are purely functional and directly correlate to operations on the Buffer monad. and call it chipotle
|
# ? May 3, 2015 22:13 |
|
eschaton posted:someone should write a modal terminal-oriented full-screen editor in Haskell where all of the editing commands are purely functional and directly correlate to operations on the Buffer monad. This might be of interest to you: Stongly Typed Ghci Commands
|
# ? May 3, 2015 22:14 |
|
here's a text editor for you to enjoy http://acme.cat-v.org/ https://www.youtube.com/watch?v=dP1xVpMPn8M
|
# ? May 3, 2015 22:28 |
|
reminds me of when I accidently open stuff up with midnight commander, and then laugh at the name
|
# ? May 3, 2015 22:37 |
|
i dont really know how you would accidentally use midnight commander. but i use it for all my file browser needs because it's much better than the osx finder, which is still the worst part of osx
|
# ? May 3, 2015 22:38 |
|
on the linux distro i use, scientific linux, its part of the default right click context menu
|
# ? May 3, 2015 22:39 |
|
i am really really excited that i get to go back to using linux as my operating system so that i can use xmonad again
|
# ? May 3, 2015 22:43 |
|
i was on itch.io and i thought the games were fun and neat so i downloaded unity and i heard you could use javascript with unity so that would be sweet. so anyway then i read you had to to use semi-colons a lot and i was like i'm out then i loaded up unity cause it was done downloading and wow it looks like photoshop from 2005 it's ugly as hell close call i almost became a game developer
|
# ? May 3, 2015 23:32 |
|
PleasureKevin posted:i heard you could use javascript with ... so that would be sweet. no don't
|
# ? May 3, 2015 23:38 |
|
it's weird i used to hate javascript but now i just don't want to learn anything else so "love" it
|
# ? May 3, 2015 23:42 |
|
javascript starts to seem sane if you use ruby for long enough
|
# ? May 3, 2015 23:44 |
|
i love jquery
|
# ? May 3, 2015 23:45 |
|
suck it off
|
# ? May 4, 2015 00:04 |
|
Valeyard posted:i love jquery it's pretty good. i don't like to use it anymore. but a lot[who?] of javascript people like despise it. and codecademy.com says teaching jquery before javascript is fine but everyone on stack overflow disagrees. anyway, i personally learned jquery first and it introduced me to the whole syntax and all that but with 90% less words and effort, so that's great. then javascript was way easier. anyway bye
|
# ? May 4, 2015 00:09 |
|
PleasureKevin posted:it's weird i used to hate javascript but now i just don't want to learn anything else so "love" it this has been posed as the reason that js has been put in so many stupid places, so glad to see the basis in reality
|
# ? May 4, 2015 00:58 |
|
|
# ? May 27, 2024 17:32 |
|
learning the raw DOM for all the major browsers is a complete waste of time. use jQuery or something similar.
|
# ? May 4, 2015 01:27 |