Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
JawnV6
Jul 4, 2004

So hot ...
does anyone still use flex/bison or is that like announcing i know punchcards

Adbot
ADBOT LOVES YOU

gonadic io
Feb 16, 2011

>>=

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

oh no blimp issue
Feb 23, 2011

had to use gdb today, it was grim
how did anyone used to get anything done?

MeruFM
Jul 27, 2010
i find it kinda like vim. It's not much worse once you get used to it.

Bloody
Mar 3, 2013

nah vim is good and gdb is bad

Jerry Bindle
May 16, 2003

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.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
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

oh no blimp issue
Feb 23, 2011

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

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

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.

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

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

Shaggar
Apr 26, 2006
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.

Bloody
Mar 3, 2013

oh, c#'s ?. is a monad isnt it

Bloody
Mar 3, 2013

or at least works like >>= on maybes which is monadic

Shaggar
Apr 26, 2006
log4j 1.x sucks rear end. I haven't used log4j 2 yet, tho.

gonadic io
Feb 16, 2011

>>=

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 ?.

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal

Awia posted:

had to use gdb today, it was grim
how did anyone used to get anything done?

gdb is fine

what else am i supposed to use for debugging on linux anyhow?

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Bloody posted:

oh, c#'s ?. is a monad isnt it

:gerty: u got it

MrMoo
Sep 14, 2000

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.

oh no blimp issue
Feb 23, 2011

YeOldeButchere posted:

gdb is fine

what else am i supposed to use for debugging on linux anyhow?

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

Bloody
Mar 3, 2013

why do people pretend monads are complicated or tricky or somehow can't be explained

oh no blimp issue
Feb 23, 2011

Bloody posted:

why do people pretend monads are complicated or tricky or somehow can't be explained

what is a monad?

Bloody
Mar 3, 2013

http://learnyouahaskell.com/a-fistful-of-monads

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Awia posted:

what is a monad?

:munch:

oh no blimp issue
Feb 23, 2011

that's cheating

AWWNAW
Dec 30, 2008

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?

Bloody
Mar 3, 2013

oh yeah good point

gonadic io
Feb 16, 2011

>>=
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.

Deep Dish Fuckfest
Sep 6, 2006

Advanced
Computer Touching


Toilet Rascal

Awia posted:

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

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

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

Bloody posted:

why do people pretend monads are complicated or tricky or somehow can't be explained

to feel superior

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

Blinkz0rz posted:

i loving hate how ruby allows optional parens

gently caress you ruby, i want to know at first glance if you're a goddamn method rather than searching the entire codebase

everything in ruby is a method

Valeyard
Mar 30, 2012


Grimey Drawer

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

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

Plorkyeran posted:

everything in ruby is a method

shut up

VikingofRock
Aug 24, 2008




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.

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

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?

Valeyard
Mar 30, 2012


Grimey Drawer
But then you have the weird case of IO being a monad, when it shouldn't be by definition

hackbunny
Jul 22, 2007

I haven't been on SA for years but the person who gave me my previous av as a joke felt guilty for doing so and decided to get me a non-shitty av

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

gonadic io
Feb 16, 2011

>>=

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

Bloody
Mar 3, 2013

im gonna attempt to proceed with megaparsec

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed

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?

gonadic io
Feb 16, 2011

>>=

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.

Adbot
ADBOT LOVES YOU

Plorkyeran
Mar 22, 2007

To Escape The Shackles Of The Old Forums, We Must Reject The Tribal Negativity He Endorsed
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?

  • Locked thread