|
does anyone still use flex/bison or is that like announcing i know punchcards
|
# ? Mar 21, 2016 18:25 |
|
|
# ? May 25, 2024 13:09 |
|
fart simpson posted:functors in haskell are endofunctors. do you know what functor is yet? The best part about haskell cribbing complicated names from maths is that it doesn't get them right, the haskell constructs are only approximations anyway Just give elm type classes and them import that whole system to haskell tia
|
# ? Mar 21, 2016 18:41 |
|
had to use gdb today, it was grim how did anyone used to get anything done?
|
# ? Mar 21, 2016 18:42 |
|
i find it kinda like vim. It's not much worse once you get used to it.
|
# ? Mar 21, 2016 18:44 |
|
nah vim is good and gdb is bad
|
# ? Mar 21, 2016 18:46 |
|
MeruFM posted:i find it kinda like vim. It's not much worse once you get used to it. the human mind is incredible in its ability to become inured to terrible circumstances. its the reason innocent men can be sent to prison for life and feel that its the best thing that could have happened to them.
|
# ? Mar 21, 2016 18:46 |
|
i can't get tomcat, or rather our project, to output debug-level logging. it's stuck on info-level. i just don't get which of the numerous .properties files i should edit. i mean i guess i can just use info level logging where i want to use debug level and then delete or lower the level before committing the changes, but holy poo poo i have wasted the whole day on a problem that should have not taken more than a few of hours, because i got sidetracked by this thing
|
# ? Mar 21, 2016 18:47 |
|
Barnyard Protein posted:the human mind is incredible in its ability to become inured to terrible circumstances. its the reason innocent men can be sent to prison for life and feel that its the best thing that could have happened to them. gdb is like wrongful incarceration
|
# ? Mar 21, 2016 18:48 |
|
Wheany posted:i can't get tomcat, or rather our project, to output debug-level logging. it's stuck on info-level. i just don't get which of the numerous .properties files i should edit. lol yeah i have danced with this. it might be in etc, it might be in usr/share, it might be in tomcat. xml, it might be in Catalina. xml. that kinda poo poo is why i don't like working with java despite java being good
|
# ? Mar 21, 2016 18:54 |
|
what are you using for logging? I would suggest switching to logback+slf4j since its a lot more sane than log4j (if that's what you're using). if you're already invested in log4j or another logger or if you have 3rd party libs with their own logging that you want to go to the same place, there are adapter libraries like log4j-over-slf4j and gcl-over-slf4j that replace the original logging libs and proxy their calls to slf4j. then you can use logback to manage all your output which is way way easier. if you still want to stick w/ log4j (that's what im assuming you're using) check the log4j docs because they have the search order specifics for which config files are used. iirc it looks for a system property first, then does a classpath search, and then some other places. You also may be loading the correct log4j.properties, but you may have your loggers configured wrong.
|
# ? Mar 21, 2016 18:55 |
|
oh, c#'s ?. is a monad isnt it
|
# ? Mar 21, 2016 18:55 |
|
or at least works like >>= on maybes which is monadic
|
# ? Mar 21, 2016 18:56 |
|
log4j 1.x sucks rear end. I haven't used log4j 2 yet, tho.
|
# ? Mar 21, 2016 18:57 |
|
Bloody posted:oh, c#'s ?. is a monad isnt it Yes. You can use do notation with Maybes in Haskell and because it chains >>= it behaves exactly the same way as chaining ?.
|
# ? Mar 21, 2016 19:03 |
|
Awia posted:had to use gdb today, it was grim gdb is fine what else am i supposed to use for debugging on linux anyhow?
|
# ? Mar 21, 2016 19:03 |
|
Bloody posted:oh, c#'s ?. is a monad isnt it u got it
|
# ? Mar 21, 2016 19:04 |
|
Shaggar posted:log4j 1.x sucks rear end. I haven't used log4j 2 yet, tho. log4j2 is pretty sweet, turn on async logging and hit 1 million rows per second to any destination and be able to change the logging configuration without restarting the app.
|
# ? Mar 21, 2016 19:05 |
|
YeOldeButchere posted:gdb is fine i dont know, something not arse backwards coming from the land of visual studio where debugging is a pleasure it was very strange im going to assume graphical debuggers are a thing on linux and you should use those instead
|
# ? Mar 21, 2016 19:06 |
|
why do people pretend monads are complicated or tricky or somehow can't be explained
|
# ? Mar 21, 2016 19:07 |
|
Bloody posted:why do people pretend monads are complicated or tricky or somehow can't be explained what is a monad?
|
# ? Mar 21, 2016 19:07 |
|
http://learnyouahaskell.com/a-fistful-of-monads
|
# ? Mar 21, 2016 19:08 |
|
Awia posted:what is a monad?
|
# ? Mar 21, 2016 19:08 |
|
that's cheating
|
# ? Mar 21, 2016 19:08 |
|
Bloody posted:why do people pretend monads are complicated or tricky or somehow can't be explained have you ever read any CS white paper on any subject?
|
# ? Mar 21, 2016 19:09 |
|
oh yeah good point
|
# ? Mar 21, 2016 19:11 |
|
also in my experience the majority of people who say that are either repeating stuff they heard about haskell or saying the endofunctor ""joke"" (which amounts to the same thing. Maybe I'm no-true-scotsmanning here but I've never heard anybody say "man I think I just about get monads now, poo poo that was hard and complicated". And I've taught lots of beginner haskell so have heard that expressed about pattern matching and haskell's syntax in general plenty of times.
|
# ? Mar 21, 2016 19:20 |
|
Awia posted:i dont know, something not arse backwards i used both gdb and the vs debugger at work, and at one point i was honestly starting to think that i preferred gdb. maybe because i'd gone crazy, but probably because typically the bugs i would have to track down in vs were stuff where someone filed a bug report that said "things are broken!!!", while gdb was used when dealing with core dumps or live (non-prod) servers where there was more technical info about what the problem might be in the first place. so my time with gdb felt a whole lot more productive even if the bugs often had to do with distributed system stuff which is usually pretty painful to debug in the first place
|
# ? Mar 21, 2016 19:20 |
|
Bloody posted:why do people pretend monads are complicated or tricky or somehow can't be explained to feel superior
|
# ? Mar 21, 2016 19:31 |
|
Blinkz0rz posted:i loving hate how ruby allows optional parens everything in ruby is a method
|
# ? Mar 21, 2016 19:36 |
|
Bloody posted:alternately: is this a reasonable thing to do in haskell and if so is it possible to reuse these antlr grammars i found i dont want to write my own grammar Yes, as gonadic io will remember, I pretty much had a whole class dedicated to using Haskell and parsec to do some hokey Fortran source parser
|
# ? Mar 21, 2016 19:37 |
|
Plorkyeran posted:everything in ruby is a method shut up
|
# ? Mar 21, 2016 19:43 |
Bloody posted:oh, c#'s ?. is a monad isnt it Pretty much; you've got the right idea and intuition. I haven't used C# before but from what I've read in this thread I think ?. isn't technically a monad because if you do foo?.bar() there's no restriction that bar() has to return something that's nullable, whereas if you do foo >>= bar where foo is a Maybe then bar has to return a Maybe.
|
|
# ? Mar 21, 2016 19:44 |
|
VikingofRock posted:Pretty much; you've got the right idea and intuition. I haven't used C# before but from what I've read in this thread I think ?. isn't technically a monad because if you do foo?.bar() there's no restriction that bar() has to return something that's nullable, whereas if you do foo >>= bar where foo is a Maybe then bar has to return a Maybe. is this where haskell's lazy evaluation comes in? like, the last element in the chain returns whatever default, but each element implements maybe so it can be chained further?
|
# ? Mar 21, 2016 19:48 |
|
But then you have the weird case of IO being a monad, when it shouldn't be by definition
|
# ? Mar 21, 2016 19:51 |
|
JawnV6 posted:does anyone still use flex/bison or is that like announcing i know punchcards I never liked the lexer/parser pipeline. in a lot of languages/protocols tokens are contextual, or the grammar isn't based on tokens at all YeOldeButchere posted:i used both gdb and the vs debugger at work, and at one point i was honestly starting to think that i preferred gdb. maybe because i'd gone crazy, but probably because typically the bugs i would have to track down in vs were stuff where someone filed a bug report that said "things are broken!!!", while gdb was used when dealing with core dumps or live (non-prod) servers where there was more technical info about what the problem might be in the first place. so my time with gdb felt a whole lot more productive even if the bugs often had to do with distributed system stuff which is usually pretty painful to debug in the first place you want a technical windows debugger with an arcane command language, try windbg. it's not as nice as vs, it's only really good for debugging native code where vs will let you debug scripts and tsql and .net and whatnot, but it's super low level, in some regards lower than even gdb. it has surprising uses too, like you can use it as a disassembler (by loading an executable as a crash dump), you can debug the live kernel (can't set breakpoints ofc) to read low level system data, you can diagnose bsods by loading crash dumps and using the !analyze extension. it used to be available as a standalone but it seems nowadays you have to download the whole driver development kit to get it
|
# ? Mar 21, 2016 20:01 |
|
Blinkz0rz posted:is this where haskell's lazy evaluation comes in? like, the last element in the chain returns whatever default, but each element implements maybe so it can be chained further? Haskell's lazy evaluation is purely an implementation detail (though an extremely important one) and has nothing to do with the type system. Ps Bloody, I don't know of anything that'd let you use an antlr grammar in Haskell but happy is the closest you'll get. Parsec (whichever variant you use) is nicer is every way though, I hated Happy when I had to use it. I am pretty depressed though so ymmv
|
# ? Mar 21, 2016 20:02 |
|
im gonna attempt to proceed with megaparsec
|
# ? Mar 21, 2016 20:03 |
|
VikingofRock posted:Pretty much; you've got the right idea and intuition. I haven't used C# before but from what I've read in this thread I think ?. isn't technically a monad because if you do foo?.bar() there's no restriction that bar() has to return something that's nullable, whereas if you do foo >>= bar where foo is a Maybe then bar has to return a Maybe. no, if bar returns int then foo?.bar() and foo >>= bar both return int?
|
# ? Mar 21, 2016 20:04 |
|
Valeyard posted:But then you have the weird case of IO being a monad, when it shouldn't be by definition io is literally the reason that monads exist in haskell. I wasn't following it then, but there was a system before monads used to delimit io and stop you using io unsafely. Then somebody suggested monads and we've never looked back.
|
# ? Mar 21, 2016 20:05 |
|
|
# ? May 25, 2024 13:09 |
|
like the whole point of ?. and >>= is to let you call a function from A -> B on a value of A? and get a result of B?
|
# ? Mar 21, 2016 20:06 |