Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
lihaoyi
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
41 ms
·
451.
▲
by
lihaoyi
9y ago
Ammonite ends up loading about 2000 classes to run a cached script (i.e. no compiler required, no parser required, ...) $ cat foo.sc println(12345) $ java -jar -verbose:class $(which amm) foo.sc | wc -l 2015 Hello
452.
▲
by
lihaoyi
9y ago
> Now you could argue this is more a problem that functions and `Int`s have any methods in common at all (toString, equality, etc.) Now that's something that I should have put in the post! But it was already too long... Anyway, I th
453.
▲
by
lihaoyi
9y ago
I don't really buy the "what if the upstream author changes their signatures and downstream code behaves differently". Upstream signatures change all the time, and downstream has to deal with it. That's not unique to the
454.
▲
by
lihaoyi
9y ago
What you say is correct, but I think your mental model isn't the mental model many people work with. One possible way of thinking of things is "methods" and "function values", where you need to eta-expand something
455.
▲
by
lihaoyi
9y ago
I don't see the problem with val b = a b: Int = 1 After all, if you wanted to turn it in a function, you can use `() => a` syntax which everyone is already familiar with.
456.
▲
by
lihaoyi
9y ago
You can `brew install ammonite` too https://github.com/Homebrew/homebrew-core/blob/master/Formul...
457.
▲
Ammonite: Scala Scripting
(lihaoyi.com)
99 points
by
lihaoyi
9y ago
|
32 comments
458.
▲
Four Facets of Good Open-Source Libraries
(vimeo.com)
1 points
by
lihaoyi
10y ago
|
0 comments
459.
▲
Re-Imagining the Online Code Explorer
1 points
by
lihaoyi
10y ago
|
0 comments
460.
▲
Fluent: a seamless online code navigator
(fluentcode.com)
3 points
by
lihaoyi
10y ago
|
0 comments
461.
▲
by
lihaoyi
10y ago
I made a Scalatags library that lets you write your HTML templates in-line in your Scala code (or Scala.js), similar to React's JSX but without the XML syntax: div( h1(id:="title", "This is a title"),
462.
▲
What's Functional Programming All About?
(lihaoyi.com)
3 points
by
lihaoyi
10y ago
|
0 comments
463.
▲
What's Functional Programming All About?
(lihaoyi.com)
10 points
by
lihaoyi
10y ago
|
1 comments
464.
▲
What's Functional Programming All About?
(lihaoyi.com)
4 points
by
lihaoyi
10y ago
|
0 comments
465.
▲
Introducing Type Annotations for Python
(youtube.com)
2 points
by
lihaoyi
10y ago
|
0 comments
466.
▲
Strategic Scala Style: Conciseness and Names
(lihaoyi.com)
1 points
by
lihaoyi
10y ago
|
0 comments
467.
▲
Implicit Design Patterns in Scala
(lihaoyi.com)
5 points
by
lihaoyi
10y ago
|
0 comments
468.
▲
Scala Scripting
(vimeo.com)
2 points
by
lihaoyi
10y ago
|
0 comments
469.
▲
How I learned to stop worrying and love the front end [with Scala.js]
(skillsmatter.com)
5 points
by
lihaoyi
10y ago
|
0 comments
470.
▲
Scala Scripting
(vimeo.com)
1 points
by
lihaoyi
10y ago
|
0 comments
471.
▲
Build your own Command Line with ANSI escape codes
(lihaoyi.com)
2 points
by
lihaoyi
10y ago
|
0 comments
472.
▲
“Old” Design Patterns in Scala
(lihaoyi.com)
1 points
by
lihaoyi
10y ago
|
0 comments
473.
▲
FastParse Binary Parser Combinators in Scala
(lihaoyi.com)
2 points
by
lihaoyi
10y ago
|
0 comments
474.
▲
ScalaFiddle.io: an online playground for writing and sharing Scala code
(scalafiddle.io)
2 points
by
lihaoyi
10y ago
|
0 comments
475.
▲
by
lihaoyi
10y ago
Yes, you are right. These are limitations of the PEG/recursive-descent style of parser-combinators, which FastParse is a member of. If you use a set of parser combinators that use a different execution model (e.g. https://gi
476.
▲
by
lihaoyi
10y ago
The main doc-site has a section on debugging and error reporting http://www.lihaoyi.com/fastparse/#DebuggingParsers
477.
▲
by
lihaoyi
10y ago
There is a short write-up in the main doc-site http://www.lihaoyi.com/fastparse/#Comparisons
478.
▲
by
lihaoyi
10y ago
Yes, there is a `cut` operator, and it does exactly what you expect. It's heavily documented here http://www.lihaoyi.com/fastparse/#Cuts Just because there's a `cut` operator doesn't mean people will use
479.
▲
by
lihaoyi
10y ago
Nope; you need to left-factor them unfortunately. Other parser combinators may have different implementation algorithms, but this one is naive PEG/recursive-descent so you need to help it out manually otherwise it'll just infinite
480.
▲
by
lihaoyi
10y ago
Sure! I didn't mention them in the post because it was already getting a bit long, but here are a few: - Unlimited backtracking means it's really easy to accidentally end up with `O(2^n)` parsing behavior. Most real-life languages
More ›