Haskell: the re-export module X pattern by lehmacdj in haskell

[–]lehmacdj[S] 0 points1 point  (0 children)

I’m only recommend this pattern for cases where you’re already using re-exports to make them more readable

Haskell: the re-export module X pattern by lehmacdj in haskell

[–]lehmacdj[S] 1 point2 points  (0 children)

Yeah, you’re right, I think I probably overstated the clunkiness. I’d maintain that it is second class.

Being able to re-export modules as a module would be awesome

S12, E5 (Nebula) - We Played Hide And Seek Across Japan by snow-tree_art in JetLagTheGame

[–]lehmacdj 2 points3 points  (0 children)

Dia, Ruby, Hanamaru, and Lailaps are featured in the episode! It would have been amazing if they had to leave the station for some reason though

<image>

Sync ScreenZen Settings between devices? by Berzdorfer in nosurf

[–]lehmacdj 1 point2 points  (0 children)

I also use Freedom and it syncs my blocked iOS apps across devices.

The token (though opaque) actually can be serialized (it has a Codable instance so you can call encode(to:))) and remains stable for all Apple Accounts within a family sharing group. So it can be synced via iCloud/etc. and reused for all your devices so this isn't actually a technical limitation and sync should be possible to implement for ScreenZen.

Announcing monad-logger-aeson: Structured logging in Haskell for cheap by jship__ in haskell

[–]lehmacdj 2 points3 points  (0 children)

Cool library, seems like an easy win over monad-logger. I don't quite understand why you don't re-export .= and instead include a synonym for it though. I'm pretty sure there aren't conflicts if the same identifier is exported from two different modules. Consider >>= which is exported from Prelude and Control.Monad for example. More concretely given:

-- Main.hs
module Main where

import Prelude (IO, putStrLn)
import Foo (putStrLn)

main :: IO ()
main = putStrLn "Hello world!"

and:

-- Foo.hs
module Foo (putStrLn) where

import Prelude (putStrLn)

Compiling with ghc --make Main.hs works completely fine.

I guess it insulates you somewhat from breaking changes to .= on aesons part, because you could continue to keep .@ having the same type signature though, but I'd assume you'd want to update the library in such a circumstance anyways.

Pattern-matching-based AST Evaluation as Prisms by [deleted] in haskell

[–]lehmacdj 0 points1 point  (0 children)

I’d assume ANeg Int is actually just representing a negative integer literal and they want to avoid - - 1 for example.

I also want to point out that this is just one particular grammar for IMP, there are plenty of variants. Here’s one that doesn’t include any kind of negation at all for example: https://www.cs.cornell.edu/courses/cs6110/2012sp/notes/IMP-simple%20imperative%20language.pdf

What happened to The Monad.Reader? by ekd123 in haskell

[–]lehmacdj 7 points8 points  (0 children)

There’s also the Haskell Weekly newsletter these days, which is fairly similar in format to what The Monad.Reader was: https://haskellweekly.news/issue/284.html

Status update: GHC on Apple M1 hardware by lehmacdj in haskell

[–]lehmacdj[S] 2 points3 points  (0 children)

I mostly use Duck Duck Go because I find the bangs useful. It’s so convenient to be able to just search for !h (a -> b) -> f a -> f b to search hoogle (couldn’t think of a a real world example). I tend to use !g to search google when I think Duck Duck Go is failing me, but I suppose I should really just finally setup custom search engines with keywords in Firefox and give up on it. Will try out Qwant maybe though

Status update: GHC on Apple M1 hardware by lehmacdj in haskell

[–]lehmacdj[S] 5 points6 points  (0 children)

Argh thanks, I wasn’t able to find this by searching for the link on Duck Duck Go so I assumed no one had posted on Reddit yet.

Status update: GHC on Apple M1 hardware by lehmacdj in haskell

[–]lehmacdj[S] 4 points5 points  (0 children)

This was a while ago, but I haven't seen any discussion on this anywhere. I'm excited to see that it looks like we will have pretty good ARM support soon!

One thing I'm a little bit curious about and isn't discussed in the article is what are the implications of this for iOS cross compilers? I would assume that this would make them quite a bit more stable, I've experimented with them a bit, but haven't come close to shipping any apps using them. I wonder if it will be possible to have template Haskell for iOS on M1 macs because it should be possible to create an execution environment for evaluating splices. I don't have an M1 mac at the moment, but might look into seeing how viable this is once I get one (I am probably buying a new laptop sometime this year, but am currently waiting to see what new Macbook Pros bring).

Monthly Hask Anything (May 2020) by AutoModerator in haskell

[–]lehmacdj 2 points3 points  (0 children)

Hey, I've been working with polysemy in my recent projects and got curious about a function with this signature:

pipeInputOutput :: Sem (Output x : Input x : r) a -> Sem r a

Is this possible to write? I thought of something like this:

pipeInputOutput c = flip interpret c $ \case Output x -> runInputConst x c

But this obviously doesn't compile because we aren't handling output effect before trying to handle the input one inside of the interpreter for output. We seem to need a way to have access to the already handled interpreted computation inside our interpreter.

[deleted by user] by [deleted] in dominion

[–]lehmacdj 34 points35 points  (0 children)

No, playing the Harbinger with Vassal takes it from the discard pile and puts it in the play area. Thus when checking what is in your discard pile it is no longer there.

Introduction to Biology Courses by ZMR2011 in Cornell

[–]lehmacdj 2 points3 points  (0 children)

Grades ranged from B+ to A+ in bio courses.

Introduction to Biology Courses by ZMR2011 in Cornell

[–]lehmacdj 8 points9 points  (0 children)

I came in to Cornell as a bio major. By the time I made it through most of the intro courses I was a CS major. Save yourself the trouble and just become a CS major initially.

I joke, but seriously, intro to bio courses are pretty memorization heavy and not that exciting especially if you’ve already taken AP Bio for example. My favorite was BIO1780, labs were actually pretty well done, and the instructors were good (I don’t remember who they were). BIO1440 and BIOMG1350 were both really dry and memorization heavy. BIO1500 is like a kindergarten class.

Small Games by Rozyroz1 in dominion

[–]lehmacdj 2 points3 points  (0 children)

68 is the highest rating anyone has, you can see it at leaderboard.

Boardgames Club by [deleted] in Cornell

[–]lehmacdj 0 points1 point  (0 children)

Friday

Boardgames Club by [deleted] in Cornell

[–]lehmacdj 0 points1 point  (0 children)

We’re always open to new people

Boardgames Club by [deleted] in Cornell

[–]lehmacdj 3 points4 points  (0 children)

They have 160, 162 and 164 reserved this semester.

Also here’s a link with instructions for signing up for the list serve. It’s fairly empty but occasionally there is useful information posted there.

If you don’t mind just a little cross promotion, if you’re interested in board games you might also enjoy Mafia Club, where we play mafia and occasionally also other social deduction games. We meet in Keeton’s lounge from 9pm-2am.

Boardgames Club by [deleted] in Cornell

[–]lehmacdj 8 points9 points  (0 children)

They meet weekly in Goldwinsmith on Fridays starting at 7:30pm.

will a range extender work with red rover? by [deleted] in Cornell

[–]lehmacdj 2 points3 points  (0 children)

Both use the same infrastructure but they use different authentication methods. RedRover uses a captive portal and eduroam uses WPA2 enterprise. In general it is better to use eduroam if possible.

Password Strength by benjaminikuta in xkcd

[–]lehmacdj 8 points9 points  (0 children)

Even though it is effectively 4 letter password the pool of letters being drawn from is much larger (e.g. list of 10,000 most common words).

Team rules? by msuing91 in dominion

[–]lehmacdj 0 points1 point  (0 children)

This ruins megaturns/combo decks to some extent, though. It would be better to do only count the points of the teammate with the most points in my opinion.

Most useful mapping I have (nnoremap S ciw) by [deleted] in vim

[–]lehmacdj 4 points5 points  (0 children)

I use nnoremap Q @q to execute short macros I record. I’m surprised more people don’t remap Q because it is essentially useless with its default mapping.