Haskell

467 readers
6 users here now

founded 2 years ago
MODERATORS
51
52
53
54
55
56
57
58
59
 
 

Joachim Breitner and David Christiansen interview John MacFarlane, a professor of philosophy at UC Berkeley, but also the author of the popular pandoc document conversion tool, which has been around half as long as Haskell itself. He also explains the principle of uniformity as a design goal for lightweight markup languages, the relationship between philosophy and programming, and along the way he helps David with his markdown difficulties.

60
61
62
63
 
 

This is a spot where you can ask anything that you feel doesn't deserve its own post, no matter how small or simple it is!

64
 
 

On /r/Haskell there was a pinned, monthly thread so that people could ask questions without creating a new top-level post.

  • I'd like to increase traffic to here (or some other Haskell Fediverse threaded-conversation group). Do you think a thread like that might help?
  • Does pinning work here? It's probably not necessary given the posts/month currently, but I suppose it's something to keep in mind.
  • Anyone got a link to Lemmy/KBin/ActivityPub Haskell library that I could use to write a bot, or some other way to schedule a post for yyyy-mm-01T00:00:00Z ?
65
 
 

cross-posted from: https://programming.dev/post/5838448

I came across this semi-randomly by using Search Marginalia to find information on functional programming courses.

I also very much enjoyed the two articles referenced in the footnotes.

66
67
 
 

cross-posted from: https://kbin.social/m/haskell/t/592680

News about the Haskell programming language from 2023-11-02.

68
 
 

cross-posted from: https://kbin.social/m/haskell/t/572329

News about the Haskell programming language from 2023-10-26.

69
 
 

cross-posted from: https://kbin.social/m/haskell/t/552503

News about the Haskell programming language from 2023-10-19.

70
 
 

cross-posted from: https://kbin.social/m/haskell/t/533616

News about the Haskell programming language from 2023-10-12.

71
2
CSV Parsing (mander.xyz)
submitted 1 year ago* (last edited 1 year ago) by mrh@mander.xyz to c/haskell@programming.dev
 
 

New-ish to Haskell. Can't figure out the best way to get Cassava (Data.Csv) to do what I want. Can't tell if I'm missing some haskell type idioms or common knowledge or what.

Task: I need to read in a CSV, but I don't know what the headers/columns are going to be ahead of time. The user will provide input to say which headers from the CSV they want processed, but I won't know where (index-wise) those columns will be in the CSV, nor how many total columns there will be (either specified by the user or total). Say I have a [String] which lists the headers they want.

Cassava is able to read CSVs with and without headers.

Without headers Cassava can read in entire rows, even if it doesn't know how many columns are in that row. But then I wouldn't have the header data to filter for the values that I need.

With headers Cassava requires(?) you to define a record type instantiating its FromNamedRecord typeclass, which is how you access parts of the column by name (using the record fields). But in order for this to be well defined you need to know ahead of time everything about the headers: their names, their quantity, and their order. You then emulate that in your record type.

Hopefully I'm missing something obvious, but it feels a lot like I have my hands tied behind my back dealing with the types provided by Cassava.

Help greatly appreciated :)

72
 
 

cross-posted from: https://infosec.pub/post/3538345

Found on Mastodon. NOT crypto.

73
 
 

Utilizing Functional Reactive Programming, FRP - with the reactive-banana Library to create a terminal animation using termbox-banana.

74
75
 
 

cross-posted from: https://infosec.pub/post/2175721

Abstract. Formal languages are commonly used to model the seman- tics of instruction set architectures (e.g. ARM). The majority of prior work on these formal languages focuses on concrete instruction execu- tion and validation tasks. We present a novel Haskell-based modelling approach which allows the creation of flexible and versatile architecture models based on free monads and a custom expression language. Con- trary to existing work, our approach does not make any assumptions regarding the representation of memory and register values. This way, we can implement non-concrete software analysis techniques (e.g. sym- bolic execution where values are SMT expressions) on top of our model as interpreters for this model. In contrast to prior work, our modelling approach is therefore explicitly focused on the creation of custom ISA in- terpreters. We employ our outlined approach to create an abstract model and a concrete interpreter for the RISC-V base instruction set. Based on this model, we demonstrate that custom interpreters can be implemented with minimal effort using dynamic information flow tracking as a case study.

view more: ‹ prev next ›