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
Jabor
Jul 16, 2010

#1 Loser at SpaceChem
was it actual (in-place) quicksort, or was it the silly "vaguely looks like quicksort but without the desireable performance properties" that's really easy to define in a functional language?

Adbot
ADBOT LOVES YOU

Bloody
Mar 3, 2013

probably the latter

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Bloody posted:

code:
hello :: (Integral a) => a -> String
hello x
	| mod x 15 == 0 = "fizzbuzz"
	| mod x 3 == 0 = "fizz"
	| mod x 5 == 0 = "buzz"
	| otherwise = show x
it seems that the issue arises from the last case

you forgot to mention that a needs to implement Show

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

hello :: (Integral a, Show a) => a -> String
hello x
| mod x 15 == 0 = "fizzbuzz"
| mod x 3 == 0 = "fizz"
| mod x 5 == 0 = "buzz"
| otherwise = show x

Bloody
Mar 3, 2013

fart simpson posted:

you forgot to mention that a needs to implement Show

ohh right of course. i assumed for some reason that Integral implemented show

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

i wish everything implicitly derived Show

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

Bloody posted:

ohh right of course. i assumed for some reason that Integral implemented show

Integral doesnt implement anything, it can only be implemented. it is itself a typeclass.

the part that confused you is probably that every built in type that implements Integral also implements Show, but the part haskell is complaining about is that this just happens to be the case and there's nothing actually requiring that. you could make a new type of your own that only implements Integral

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

if you had specified any concrete numeric type there like Int instead of trying to get clever with your Integral a stuff, it would have worked

fart simpson
Jul 2, 2005

DEATH TO AMERICA
:xickos:

also the error messages arent great but it did tell you how to fix it if you dig through it:

Could not deduce (Show a) arising from a use of ‘show’
from the context (Integral a)
bound by the type signature for hello :: Integral a => a -> String
at fizz.hs:1:10-36
:siren:Possible fix:
add (Show a) to the context of
the type signature for hello :: Integral a => a -> String:siren:
In the expression: show x
In an equation for ‘hello’:
hello x
| mod x 15 == 0 = "fizzbuzz"
| mod x 3 == 0 = "fizz"
| mod x 5 == 0 = "buzz"
| otherwise = show x

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



LeftistMuslimObama posted:

ok, so with wpf, the basic way to dynamically populate lists, trees, etc is just to bind them to a collection, then have that collection throw off the right events when they change? that feels too god damned easy. like, can i seriously filter my list of items by a particular metadata by just clearing the collection my listview is bound to and then repopulating the collection using a query against my sqlite database on that metadata? this can't be real, it feels too sane. i have to be missing something.

That sounds basically like how react does it if I'm reading you right

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

piratepilates posted:

That sounds basically like how react does it if I'm reading you right

my poor tortured mind can't accept that there's not some kind of minefield hiding behind this simple premise

JawnV6
Jul 4, 2004

So hot ...

Bloody posted:

oh gotcha. yeah everything i do is very slow so its never ever been a concern
this is in that other article too "it's great! it's even faster without calculating timing!"

why are u using a fpga/asic anyway, just throw a 100mhz micro in there and call it a day

Bloody
Mar 3, 2013

JawnV6 posted:

this is in that other article too "it's great! it's even faster without calculating timing!"

why are u using a fpga/asic anyway, just throw a 100mhz micro in there and call it a day

would deffo not work unfortunately. whack rear end custom serial protocols and some reasonably fast ADCs and a bunch of other poo poo and, some day, pretty harsh power constraints that microsemi fpgas stand a chance of meeting and if they don't well we can just spin it to an asic

Bloody
Mar 3, 2013

fart simpson posted:

also the error messages arent great but it did tell you how to fix it if you dig through it:

Could not deduce (Show a) arising from a use of ‘show’
from the context (Integral a)
bound by the type signature for hello :: Integral a => a -> String
at fizz.hs:1:10-36
:siren:Possible fix:
add (Show a) to the context of
the type signature for hello :: Integral a => a -> String:siren:
In the expression: show x
In an equation for ‘hello’:
hello x
| mod x 15 == 0 = "fizzbuzz"
| mod x 3 == 0 = "fizz"
| mod x 5 == 0 = "buzz"
| otherwise = show x

yeah now that i know the issue the error makes sense

9-Volt Assault
Jan 27, 2007

Beter twee tetten in de hand dan tien op de vlucht.
If you are serious about learning Haskell (or even F#/Ocaml/ML), this is the best, but quite expensive, book for learning it.

brap
Aug 23, 2004

Grimey Drawer

LeftistMuslimObama posted:

my poor tortured mind can't accept that there's not some kind of minefield hiding behind this simple premise

wpf is good as long as you are doing things the way Microsoft thinks you should. which you probably will do for a while, but won't be able to do for the whole length of your project.

also some of the stuff predates generics like IValueConverter ughhhhh some of the wpf poo poo is seriously cumbersome

Illusive Fuck Man
Jul 5, 2004
RIP John McCain feel better xoxo 💋 ðŸ™Â
Taco Defender
someone sent an email that started with "bikeshedding time!" and im absolutely tearing poo poo up in there. amazing honeypot. what's the bikeshed version of "scrum master" or "thought leader" or whatever because that's me right now.

or maybe I changed the conversation into discussion of important issues? it's impossible for me to tell.

Jerry Bindle
May 16, 2003
somewhat unironic lifehack, spend more time criticizing other people's computer codes than you spend writing your own computer codes. its more fun, and people who don't know any better will think you're really smart.

be sure to ask why they used this design pattern. and why didn't they use this other design pattern? ask where the architecture document is. don't read it! ask where the design document is. don't read this either! ask circuitous questions that could be answered by reading one of those two documents, then see if the in-person answer agrees with the documents. if they don't agree, use this as further ammunition to yosemite-sam your way up the software career ladder.

Jerry Bindle fucked around with this message at 19:25 on Mar 16, 2016

distortion park
Apr 25, 2011


LeftistMuslimObama posted:

ok, so with wpf, the basic way to dynamically populate lists, trees, etc is just to bind them to a collection, then have that collection throw off the right events when they change? that feels too god damned easy. like, can i seriously filter my list of items by a particular metadata by just clearing the collection my listview is bound to and then repopulating the collection using a query against my sqlite database on that metadata? this can't be real, it feels too sane. i have to be missing something.

you can also filter, group, and sort the data within wpf using CollectionView (I think)

jesus WEP
Oct 17, 2004


Barnyard Protein posted:

somewhat unironic lifehack, spend more time criticizing other people's computer codes than you spend writing your own computer codes. its more fun, and people who don't know any better will think you're really smart.

be sure to ask why they used this design pattern. and why didn't they use this other design pattern? ask where the architecture document is. don't read it! ask where the design document is. don't read this either! ask circuitous questions that could be answered by reading one of those two documents, then see if the in-person answer agrees with the documents. if they don't agree, use this as further ammunition to yosemite-sam your way up the software career ladder.
this is the passive aggressive dipshit i hired last year

Valeyard
Mar 30, 2012


Grimey Drawer
We had an "internal mobility" session today for teams in our line of business, where teams that are hiring pop down to people seeking prospective moves.

I jumped down, and of course my manager is there talking to people about the available positions in our team, and I'm there cutting about talking to other teams about their positions lol

I just wanted to find out what other stuff was going on in our area, I hope i didn't show him up by being there. He's pretty cool, so I'm thinking he won't take it as some kind of weird passive aggressive thing...hopefully

Jerry Bindle
May 16, 2003

Valeyard posted:

We had an "internal mobility" session today for teams in our line of business, where teams that are hiring pop down to people seeking prospective moves.

I jumped down, and of course my manager is there talking to people about the available positions in our team, and I'm there cutting about talking to other teams about their positions lol

I just wanted to find out what other stuff was going on in our area, I hope i didn't show him up by being there. He's pretty cool, so I'm thinking he won't take it as some kind of weird passive aggressive thing...hopefully

woah, thats really cool that internal moves are so open there. at my place its a cloak and daggers operation where people's' feelings get hurt :/

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer

pointsofdata posted:

you can also filter, group, and sort the data within wpf using CollectionView (I think)

that's pretty sweet. i dont think ill use that, though, because im anticipating potentially hundreds of thousands of items being indexed so to keep memory consumption down i'd probably just load in the things the user has requested at that moment. not that the data being stored about each item is that much (location and tags basically), but why chew up memory you don't need to?

Valeyard
Mar 30, 2012


Grimey Drawer
Yeah they definetly encourage you to move sround and get exposure to different areas and different tech. Unsurprisingly internal moves is a pretty informal process, probably just your current manager talking to new manager in a lot of cases.

I don't think people ever successfully block transfers, but that's just speculation

gonadic io
Feb 16, 2011

>>=

Bloody posted:

yeah now that i know the issue the error makes sense

Yep, that's haskell!

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder

Charlie Mopps posted:

If you are serious about learning Haskell (or even F#/Ocaml/ML), this is the best, but quite expensive, book for learning it.

that's really not too bad. for a 1000 page book

JawnV6
Jul 4, 2004

So hot ...

Valeyard posted:

I don't think people ever successfully block transfers, but that's just speculation

i had an internal transfer blocked at bigco, it was pretty ugly

VikingofRock
Aug 24, 2008




Thanks everyone for the blogging advice. I hadn't really considered using tumblr, but that's actually a pretty good idea because it's so easy (and not a shitshow like wordpress). I'm gonna look a little more into github pages and static site generators, too.

Charlie Mopps posted:

If you are serious about learning Haskell (or even F#/Ocaml/ML), this is the best, but quite expensive, book for learning it.

My one quibble about this book is that it starts off with a very dry chapter about lambda calculus. IMO lambda calculus is important for understanding functional languages at a deep level, but you don't really need it to get started and I feel like that chapter starts the book off on the wrong foot. Lambda calculus can seem pretty intimidating, and starting the book with a chapter on it makes Haskell seem more intimidating than it is.

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



also give medium a try, I see it a lot in my Twitter feed

or just do github pages + Jekyll + disqus, simple and does everything you need it to

Bloody
Mar 3, 2013

consider html

VikingofRock
Aug 24, 2008




piratepilates posted:

also give medium a try, I see it a lot in my Twitter feed

or just do github pages + Jekyll + disqus, simple and does everything you need it to

Both good suggestions. I've asked about Jekyll before in this thread, and it seems like most of its supposed problems come from the fact that it doesn't have incremental compilation, so compilation can take a long time for large websites. But this is a blog, so it probably wouldn't really matter for that.

Bloody posted:

consider html

This is really what I should do, but I don't really trust my own ability to make things look pretty and clean. That's why a static site generator would be nice--it could make all of those decisions for me!

Bloody
Mar 3, 2013

write some content then worry about how it looks

brap
Aug 23, 2004

Grimey Drawer
I'm about to redo my portfolio/blog site to use Jekyll. gently caress comments though. I'll just be like "comment on HN" because of course I will link all my blog posts on the most sophisticated forum on the net.

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope
if you have to have comments on your site, use this https://github.com/tessalt/echo-chamber-js

The MUMPSorceress
Jan 6, 2012


^SHTPSTS

Gary’s Answer
oh hey, lets just store literally everything for an x12 835 file in an array named %v, pass it around as an assumed global variable, and use 400 subscripts with hard coded string names that arent documented anywhere so you have to read the entire file generation code from beginning to end every time you want to do something. thanks whoever wrote this crap.

oh no blimp issue
Feb 23, 2011

Valeyard posted:

Yeah they definetly encourage you to move sround and get exposure to different areas and different tech. Unsurprisingly internal moves is a pretty informal process, probably just your current manager talking to new manager in a lot of cases.

I don't think people ever successfully block transfers, but that's just speculation

internal transfers here just kind of happen afaict, you go "id like to work over there instead" and as long as your project has enough people to carry on fine without you, you move

DONT THREAD ON ME
Oct 1, 2002

by Nyc_Tattoo
Floss Finder
my ~ significant other ~ is going to be going to law school i nthe next year so i'm just going to use that as an excuse to go remote and then vanish from the corporeal plane

Xarn
Jun 26, 2015

Jabor posted:

was it actual (in-place) quicksort, or was it the silly "vaguely looks like quicksort but without the desireable performance properties" that's really easy to define in a functional language?

Honestly, the haskell tutorial quicksort is reasonable. its the "erastothenes sieve" tutorial example that makes me genuinely mad.

Valeyard
Mar 30, 2012


Grimey Drawer

Awia posted:

and as long as your project has enough people to carry on fine without you, you move

even this wont stop anyone here

Adbot
ADBOT LOVES YOU

HappyHippo
Nov 19, 2003
Do you have an Air Miles Card?
how easy is it to switch a javascript project over to typescript?

  • Locked thread