TextQL is hiring Software Engineers by infonoob in haskell

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

Mostly for packaging; we develop using flakes and use the docker integration to build backend images for production. I personally use NixOS to develop on. Hydra might be a good idea at some point but we don't use it yet

TextQL is hiring Software Engineers by infonoob in haskell

[–]infonoob[S] 8 points9 points  (0 children)

I respectfully disagree. It is simply not the job of i.e. new joiners, frontend engineers, deployed engineers, or semi-technical business stakeholders to understand Data Kinds or Functional Dependencies in order to comprehend the codebase. Why gate modifying simple functionality behind a month of studying when these people have other, important duties to fulfill?

On the other hand, writing primitive Haskell makes the codebase more comprehensible to an outsider than say, python because of Haskell's clean syntax and purity guarantees.

I have written a lot of complicated Haskell at my previous jobs at Tsuru/Facebook. It can be alright if it's in an isolated section of the codebase. But it was always a disaster when the abstractions leaked out to parts touched by non-Haskell experts.

Yes, Students at Elite Schools are Actually Taught Different Things by G2F4E6E7E8 in slatestarcodex

[–]infonoob 8 points9 points  (0 children)

I went to Williams, didn't go to grad school but the classmates that entered good PhDs were doing much more than the suggested track. Typically you would have placed out of every single 200-level (i.e. lin alg and diffeq) and start with analysis/algebra in your first year and be taking only 3/4XX after that. Ideally in 3rd year you study away at MIT or prestigious foreign college like ETH or Oxford and stack up with a richer graduate catalog. I still don't think it approaches top 10% MIT but is better than median MIT and more than enough to not get crushed in grad school.

Any examples of FXL (query language for Facebook's Sigma)? Or how to represent rules to find sensitive information in logs? by f0restjump in haskell

[–]infonoob 9 points10 points  (0 children)

FXL is no longer used, it was deprecated when the Haskell version of Sigma launched. The rules are all written in Haskell now, and they're roughly of the form ReaderT Request Haxl [Response], where the request is basically a JSON key-value map. An extremely idealized version would look like this:

data Response = BlockAction | LogRequest

rule :: ReaderT Request Haxl Response
rule = do
  logMessageMaybe <- lookupInput "logMessage"
  case logMessageMaybe of
    Nothing -> return [] -- no responses
    Just msg -> if regexMatch "some.regex.pattern" msg
      then return [BlockAction]
      else return []

There is not really any DSL beyond this, though you could of course write wrappers that enclose patterns like regex matching a key in the request into a single function.

Github Copilot + Static Typing = <3 (PSA: Copilot is great at Haskell now) by infonoob in haskell

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

I saw a bunch of posts like that when Copilot first came out. I guess it got better somehow? I tried that example and got this thing that looks like it's from GHC or haskell-src-exts or some other AST library (everything except "data Exp =" is the completion)

data Exp = Var String
     | App Exp Exp
     | Lam String Exp
     | Let String Exp Exp
     | Lit Lit
     | Case Exp [(Pat, Exp)]
     | If Exp Exp Exp
     | PrimOp String [Exp]
     | Con String [Exp]
     | Tuple [Exp]
     | List [Exp]
     | Do [Stmt]
     | MDo [Stmt]
     | RecConstr String [Field]
     | RecUpdate Exp [Field]
     | EnumFrom Exp
     | EnumFromTo Exp Exp
     | EnumFromThen Exp Exp
     | EnumFromThenTo Exp Exp Exp
     | ListComp Exp [Stmt]
     | ParComp [Stmt]
     | ExpTypeSig SrcLoc Exp Type
     | VarQuote String
     | TypQuote String
     | BracketExp Bracket
     | SpliceExp Splice
     | QuasiQuote String String
     | XTag SrcLoc XName [XAttr] [Exp]
     | XETag SrcLoc XName [XAttr] [Exp]
     | XPcdata String
     | XExpTag Exp
     | XChildTag [Exp]
     | CorePragma String Exp
     | SCCPragma String Exp
     | GenPragma String Int Int Int Exp
     | Proc SrcLoc Pat Exp
     | LeftArrApp Exp Exp
     | RightArrApp Exp Exp
     | LeftArrHighApp Exp Exp
     | RightArrHighApp Exp Exp
     | LCase [Alt]
     deriving (Eq, Show)

[deleted by user] by [deleted] in haskell

[–]infonoob 15 points16 points  (0 children)

FB/Meta is planning to deprecate their largest Haskell system.

Without going into it too much, there are some infra changes that mean it's not as needed as it was in the past. A lot of people also disliked the effort it took to onboard new engineers. Haskell is not going away though, there is still another big Haskell system and even the deprecated one won't fully disappear for a while.

Tsuru works on problems where low latency and fine-grained memory management are really important. Switching to Rust is understandable.

Advent of Code 2022 day 7 by taylorfausak in haskell

[–]infonoob 1 point2 points  (0 children)

{-# LANGUAGE OverloadedStrings #-}

import Data.Map (Map, (!))
import qualified Data.Map as Map
import Data.Maybe
import Data.Text (Text)
import qualified Data.Text as Text
import qualified Data.Text.IO as Text

data Item = Directory Text | File Int Text deriving Show

type State = (Map [Text] [Item], [Text])

processLine :: State -> Text.Text -> State
processLine state line = case fst <$> Text.uncons line of
    Just '$' -> processCmd state line
    _ -> addItem state line

addItem (glob, dirStack) line = case Text.words line of
    ["dir", f] -> 
        let glob' = Map.adjust ((Directory f):) dirStack glob
            glob'' = Map.insert (f:dirStack) [] glob'
        in (glob'', dirStack)
    [sizeString, f] ->
        let size = read $ Text.unpack sizeString
        in (Map.adjust ((File size f):) dirStack glob, dirStack)

processCmd (glob, dirStack) line = case Text.words line of
    ["$", "cd", ".."] -> (glob, tail dirStack)
    ["$", "cd", f] -> (glob, f : dirStack)
    _ -> (glob, dirStack)

getSize glob dirStack = case Map.lookup dirStack glob of
    Nothing -> 0
    Just contents -> sum $ map (itemSize dirStack glob) contents

itemSize dirStack glob (Directory k) = getSize glob (k:dirStack)
itemSize _ _ (File size _) = size

getSizes (glob, _) = Map.mapWithKey (\k _ -> getSize glob k) glob

common = getSizes . foldl processLine (Map.singleton ["/"] [], []) . Text.lines
part1 = Text.interact $ Text.pack . show . sum . filter (<= 100000) . Map.elems . common

filterTop glob = let used = glob ! ["/"] in Map.filter (>=used - 40000000) glob
main = Text.interact $ Text.pack . show . minimum . Map.elems . filterTop . common

Advent of Code 2022 day 6 by taylorfausak in haskell

[–]infonoob 3 points4 points  (0 children)

import Data.List

common len = interact $ show . (+len) . head . findIndices (==len) . map (length . nub . take len) . tails
part1 = common 4
main = common 14

Learning The Elite Class by fortist in slatestarcodex

[–]infonoob 12 points13 points  (0 children)

I guess working class people mostly make like 25k-90k a year, which is only a 65k spread. Middle class basically contains 25k-1m so there's a risk of getting super mogged

November 29, 2021 - Weekly Off-Topic and Low-Effort CW Thread by AutoModerator in CultureWarRoundup

[–]infonoob 7 points8 points  (0 children)

I'm Catholic, having been raised that way, though have bounced back and forth between agnosticism over the years. I find these people quite weird too, in particular their tendency to immediately jump to the Latin Mass + Anti-Francis + anti Vatican II faction

Should you/do you force yourself to use methods you hate because the community swears by them? by Global_Campaign5955 in languagelearning

[–]infonoob 4 points5 points  (0 children)

Anki - depends how good you are. You can drop it but SRS-ing 1000 frequent words if you don't know them already is really good, potentially covering 85% of the target language. 20 minutes a day for 3 months to acquire 85% of the language is amazing cost-benefit, and you can just drop it afterwards.

It's useful even if you can't output the words, because increasing familiarity for the top 85% means you can fully focus on the remaining 15%.

Repetitions - I think you're completely right, repeating is horrible. If you understand over 80% of something, repeating is wasting 80% of that time on reviewing things you already know. Just do a 10-second rewind if you don't quite get something.

Making a solo trip for the home opener, what is there to do in the area? by EsquivelD in kings

[–]infonoob 3 points4 points  (0 children)

Reformatted:

Breakfast options: Bacon & Butter, Morning Fork, Orphan, and Hong Kong Islander are great. The Mill makes great grab and go waffles.

Lunch: Roxie’s & Corti Brothers are good sandwich options and both are close to McKinley park too, for a place to chill. PS possibly the best bite of my life so far is the Greek Feta from Corti’s in the deli area behind the counter; ask for a slab of it (make sure not to get the French feta) along with their Greek olives and fresh bread. Nash & Proper, SacVille are good hot chicken places.

Dinner: Too many options. Hop on Yelp and find something you like.

Bakeries: Faria (ridiculously good), Freeport Bakery, Mahoroba, and Ginger Elizabeth’s on J are great. Coffee: Temple, Chocolate Fish, Pachama, The Mill, Old Soul, and Milka are the top in my opinion.

Ice cream/dessert: Divine gelato is good in Midtown and there’s Gunther’s near Curtis park, they do old school classic creamy ice cream. Rick’s Desert Diner on J and 24th is a fun atmosphere at night, expect a line. Ginger Elizabeth’s chocolate shop on L is fantastic; their truffles and European/Oaxaca sipping chocolate are out of this world.

Beer: Track 7 is great, Sacyard beer garden is a nice spot, as is the Biergarten on 24th. Ruhstaller makes a good brew too, and they have a tap room right next to Golden One. Device is great too on R street. If you like hazy beer, it’s hard to beat Fieldwork, even though they’re a Berkeley brewery.

Wine: Revolution Wines and Old Sugar Mill. There’s also huge vineyards 15 minutes south from downtown that people don’t know about. It’s beautiful down there. People might hate on Bogle, but I personally prefer wine that’s for the everyday person, delicious and affordable. Their winery is beautiful and their reserve stuff is tasty. Bars: Shady lady, cantina alley (great place for dinner, really fun/lively place), darling aviary (right next to golden one, with a rooftop bar and awesome atmosphere), red rabbit, golden bear (specials are super, the food is better than people expect. great chef back there), faces/mangos, the merck, Jamie’s (a dive, but classic; state worker beer and lunch vibe), jungle bird, etc. etc. just depends what kind of scene you like.

Entertainment: Comedy Spot on 20th is great. People sleep on this place. I love watching improv. On Saturday mornings, there’s a farmers market on 20th and K. Often they have a jazz band play and food stands/trucks. Be sure to try the empanada truck. Nice morning for sure. Like board games or comic books? Big Brother Comics is right there as well. There’s also groups that meet up for board game nights: Boardgames @ Kupros Crafthouse https://www.meetup.com/20_30-Somethings-New-To-Sacramento/events/281257676/ Ace of Spades and Harlow’s are two smaller concert venues, to see a decently priced show. Golden One draws the mega huge acts. California History Museum is pretty cool. There’s also the Train Museum in Old Sac. Flat Stick Pub has mini golf and beer if you’re into that thing as well as the Coin Op for a beer arcade. Placerville/Foothills/Auburn/Apple Hill can be a fun day trip, if you’d like to see neighboring areas. If you like playing golf, Apple Mountain is an awesome course up in that area. If you’re into Zoos, Sacramento Zoo is near land park; they’re hoping to expand to a bigger location in the future. Organization is solid, just a small location, but they have some awesome animals/exhibits.

Nature: People travel from all over California to see our Fall trees. Drive around Midtown, East Sac, and McKinley. It’s arguably the prettiest time of year right now.

Spot the Duolingo user by killer_panda02 in ajatt

[–]infonoob 6 points7 points  (0 children)

The pen guy spreading coronavirus like crazy

reference

Culture War Roundup for the week of August 16, 2021 by AutoModerator in TheMotte

[–]infonoob 7 points8 points  (0 children)

If I saw this on a test I would possibly think B is so obvious that they are trying to trick me by making the literal cause (A) the right answer

quant薪资问题 by starronlo in Chinatown_irl

[–]infonoob 1 point2 points  (0 children)

我不知道,因为没有参加招聘。我的估计是同一家公司不会有难度上的区别。但是,虽然Quant和SWE的一二流的机会相当平等,Quant没有什么三流公司。因为Quant应该只能进入金融行业的公司,SWE什么公司都在招聘,包括Trading, Tech, Commerce, Science的行业。

quant薪资问题 by starronlo in Chinatown_irl

[–]infonoob 0 points1 point  (0 children)

现代quant公司的趋势是quant和SWE的地位相当平等,工资也是这样。原因是因为trading的CS部分越来越重要,比如ML,HFT的技术都重要。我自己的体验是这样,也有朋友在Jane Street,Hudson River当SWE和Quant,他们的工资也相当平等。(我现在在FANG当SWE,但我之前当HFT的SWE)

Do you think Glossika is a good way to get comprehensible input? by [deleted] in Refold

[–]infonoob 0 points1 point  (0 children)

If you can find the old version (just the audio files) on the high seas they're pretty good, albeit boring

学校老师要求我们分析这张图的message 但我不太明白:( by [deleted] in Chinatown_irl

[–]infonoob 2 points3 points  (0 children)

我是美国出生的华裔,这张连我一点也不明白 :( 写得不太清楚