lexi-lambda changed the topic of #racket to: Racket v7.1 has been released: http://blog.racket-lang.org/2018/10/racket-v7-1.html -- Racket -- https://racket-lang.org -- https://pkgs.racket-lang.org -- Paste at http://pasterack.org
ubLIX has joined #racket
jao has quit [Remote host closed the connection]
jao has joined #racket
ubLIX has quit [Quit: afk haggis hunting]
pierpal has quit [Ping timeout: 250 seconds]
pie___ has joined #racket
pie__ has quit [Remote host closed the connection]
jao has quit [Remote host closed the connection]
pera has quit [Ping timeout: 250 seconds]
jao has joined #racket
g00s has joined #racket
gnugnugnu has joined #racket
pera has joined #racket
pera has quit [Client Quit]
acarrico has quit [Ping timeout: 244 seconds]
rnmhdn has joined #racket
dddddd has quit [Remote host closed the connection]
endformationage has quit [Quit: WeeChat 2.3]
pie__ has joined #racket
jao has quit [Remote host closed the connection]
pie___ has quit [Ping timeout: 250 seconds]
_apg has quit [Ping timeout: 250 seconds]
wrycode has joined #racket
rnmhdn has quit [Ping timeout: 246 seconds]
g00s has quit [Quit: Textual IRC Client: www.textualapp.com]
gnugnugnu has quit [Quit: WeeChat 2.3]
jao has joined #racket
rnmhdn has joined #racket
FreeFull has quit []
rnmhdn has quit [Ping timeout: 268 seconds]
Arcaelyx has quit [Ping timeout: 250 seconds]
rnmhdn has joined #racket
jao has quit [Remote host closed the connection]
jao has joined #racket
jao has quit [Ping timeout: 250 seconds]
rnmhdn has quit [Ping timeout: 240 seconds]
Arcaelyx has joined #racket
g00s has joined #racket
_apg has joined #racket
rnmhdn has joined #racket
buyfn has joined #racket
pie___ has joined #racket
pie__ has quit [Remote host closed the connection]
buyfn has quit [Quit: buyfn]
mzan has joined #racket
buyfn has joined #racket
rnmhdn has quit [Ping timeout: 272 seconds]
buyfn has quit [Quit: buyfn]
g00s has quit [Quit: Textual IRC Client: www.textualapp.com]
meepdeew has joined #racket
meepdeew has quit [Remote host closed the connection]
rnmhdn has joined #racket
rnmhdn has quit [Ping timeout: 244 seconds]
dddddd has joined #racket
orivej has joined #racket
iyzsong has joined #racket
pie___ has quit [Remote host closed the connection]
pie___ has joined #racket
orivej has quit [Ping timeout: 250 seconds]
buyfn has joined #racket
jao has joined #racket
buyfn has quit [Quit: buyfn]
jhei has quit [Ping timeout: 260 seconds]
jhei has joined #racket
orivej has joined #racket
rnmhdn has joined #racket
rnmhdn has quit [Ping timeout: 246 seconds]
orivej has quit [Ping timeout: 240 seconds]
<winny> using megaparsack - I get expression/p: undefined; cannot reference an identifier before its definition https://gist.github.com/c0afbb1ebd0b6bc3a0b0c91d04549c25 - i think this is a flaw with how I designed the combiners - is there a proper or better way to defin a grammar like what my code tries to? This is for a hoc implementotion, btw
acarrico has joined #racket
JoshS has quit [Remote host closed the connection]
JoshS has joined #racket
pierpal has joined #racket
<winny> Best idea I have - rewrite the grammer in chomsky normal form, that should work, not sure if that's the simplest or idiomatic
iyzsong has quit [Ping timeout: 268 seconds]
dustyweb has quit [Remote host closed the connection]
<jcowan> Which Chomsky form? Most BNF grammars are type 2, whereas regular expressions are type 3. Algol 68 has a type 1 grammar with its own notation for it. I know of no computer languages that require type 0 grammars.
<winny> I see: I sort of follow, but need to read up on the types. I recall rewriting CFGs in CNF and noticed it remove left-recursive production rules. So I think I could use that here?
<winny> I should probably crack open some book :)
<jcowan> https://en.wikipedia.org/wiki/Chomsky_hierarchy is a decent intro/refresher
<winny> unrelated - wrote the parser with parser-tools/lex, and rather pleased with how simple that is
<winny> s/ parser / lexer /
jao has quit [Remote host closed the connection]
sleepnap has joined #racket
jao has joined #racket
jao has quit [Remote host closed the connection]
jao has joined #racket
rnmhdn has joined #racket
Sgeo_ has joined #racket
<tautologico> Chomsky Normal Form is a specific form for CFGs that have some nice properties
<tautologico> not to be confused with the Chomsky Hierarchy of formal languages
Sgeo has quit [Ping timeout: 240 seconds]
dbmikus has joined #racket
pierpal has quit [Read error: Connection reset by peer]
pierpal has joined #racket
rnmhdn has quit [Ping timeout: 250 seconds]
<gonz_> lexi-lambda: Do you have a post detailing the differences between Racket macros and TH?
mzan has left #racket [#racket]
mzan has joined #racket
jao has quit [Ping timeout: 244 seconds]
ziyourenxiang has quit [Ping timeout: 240 seconds]
<jcowan> tautologico: Ah, thanks. Shoulda checked.
buyfn has joined #racket
orivej has joined #racket
pie__ has joined #racket
buyfn has quit [Quit: buyfn]
pie___ has quit [Remote host closed the connection]
<lexi-lambda> gonz_: I talk about it a little at the end of my Strange Loop talk. I also touched upon it in this comment on /r/haskell from a while back: https://www.reddit.com/r/haskell/comments/6dqf1n/realizing_hackett_a_metaprogrammable_haskell/di54rp8/
<gonz_> lexi-lambda: Thanks. :)
<lexi-lambda> winny: megaparsack provides a lazy/p combinator to defer the evaluation of a parser until it is used, but it looks like I forgot to document it.
<lexi-lambda> winny: Also, your use of only-in + except-in is equivalent to just writing (rename-in data/monad [do :do]).
<winny> lexi-lambda: thanks! I always forgot the source code is always available + easy to browse in most racket-enabled editors :)
<lexi-lambda> It should be documented!
<winny> indeed (:
<winny> just looked at the syntax for lazy/p, a lot simple than i was guessing
jao has joined #racket
<lexi-lambda> It might be better to make lazy/p only evaluate the parser expression at most once, but that wouldn’t really make it much more complicated than it already is.
<winny> that seems like a good idea, i think my approach is abit to naive to be usable
g00s has joined #racket
orivej has quit [Ping timeout: 250 seconds]
notzmv has quit [Ping timeout: 246 seconds]
<cemerick> I have a simple program that appears to be faster under typed racket, but only if its optimizer is turned off. Does that sound remotely plausible?
<lexi-lambda> Does it use any libraries that are written in Typed Racket?
<cemerick> no libraries at all
<cemerick> or, no 3rd party libraries
<lexi-lambda> Then I don’t have any immediate guesses, though I sometimes feel like anything is possible when TR is involved. :)
<lexi-lambda> cemerick: Are you precompiling with `raco make` before running?
<cemerick> lexi-lambda: yes, timings in the README come from running https://github.com/cemerick/silly-shootout/blob/master/run.sh
<cemerick> I'm sure I'm doing something incredibly silly
<lexi-lambda> Well, if you are, I don’t see it. Maybe samth knows.
<lexi-lambda> (Oh, except samth isn’t in the channel at the moment, it seems.)
<cemerick> well at least I'm not alone in my intuitions
<cemerick> happy to take any suggestions / golfed versions from anyone interested, FWIW
<lexi-lambda> cemerick: FWIW, Racket’s I/O system is, I think, known to be pretty slow in general, relative to other things/languages. It wouldn’t explain the TR discrepancy, but it might be a bad thing to benchmark. I’d guess almost all the time is spent doing I/O.
<cemerick> It's intended to be a very brutish gauge of allocation/GC/fn invocation perf. IO?
<cemerick> I mean, if you want to characterize malloc & co as IO, I guess
<lexi-lambda> Yeah, if you’re explicitly benchmarking I/O throughput, then it is reasonable. :)
<lexi-lambda> Instead of specifying gen:custom-write, though, you could probably just use the #:transparent option to struct.
<cemerick> lexi-lambda: thank you, noted.
sauvin has quit [Ping timeout: 250 seconds]
rnmhdn has joined #racket
<cemerick> it's been soooo long since I've racketed, I might as well never have :-P
acarrico has quit [Ping timeout: 246 seconds]
g00s has quit [Quit: Textual IRC Client: www.textualapp.com]
notzmv has joined #racket
rnmhdn has quit [Ping timeout: 268 seconds]
acarrico has joined #racket
<cemerick> now that I've fixed my plain-racket impl, the bigger concern is that TR of any flavour is slower than baseline racket, and not by a little
<jcowan> cemerick: Inevitably so because of the typed<->untyped transitions
<cemerick> jcowan: even if one fully types the program?
dbmikus has quit [Ping timeout: 246 seconds]
Sgeo__ has joined #racket
orivej has joined #racket
Sgeo_ has quit [Ping timeout: 268 seconds]
YuGiOhJCJ has joined #racket
dbmikus has joined #racket
dbmikus_ has joined #racket
dbmikus has quit [Ping timeout: 268 seconds]
FreeFull has joined #racket
mzan has quit [Ping timeout: 250 seconds]
pie___ has joined #racket
pie__ has quit [Ping timeout: 268 seconds]
<jcowan> cemerick: Yes, because the Racket libs you are using are untyped
<cemerick> jcowan: I suppose because the types of various things TR itself depends upon or re-exports can't be expressed
<cemerick> (I'm not actually using any 3rd party libraries, tbc)
<jcowan> I mean the core Racket code: car, cdr, cons, .... is not typed
pierpal has quit [Ping timeout: 240 seconds]
notzmv has quit [Ping timeout: 250 seconds]
dbmikus_ has quit [Read error: Connection reset by peer]
dbmikus_ has joined #racket
YuGiOhJCJ has quit [Quit: YuGiOhJCJ]
dbmikus_ has quit [Ping timeout: 244 seconds]
Fernando-Basso has joined #racket
dbmikus has joined #racket
mzan has joined #racket
Sgeo__ has quit [Ping timeout: 268 seconds]
<lexi-lambda> cemerick, jcowan: There is no overhead for interacting with core untyped Racket libraries (that is, libraries included in `#lang racket`) from TR.
<lexi-lambda> Or, at least, there isn’t supposed to be. :)
<cemerick> lexi-lambda: if that's the case, then I guess I should write to the ML and see what's up
<lexi-lambda> That’s probably a good idea.
<friscosam> cemerick: just a random thought, have you tried it with a different numeric type instead of Float?
<cemerick> friscosam: I happen to actually need floats for the domaun/project in question
<cemerick> Oh, I'm actually using ints for the untyped impl!
<friscosam> I actually thought there were more inexact numeric types in TR that you could try, oh well :)
<cemerick> Yeah, the docs stress using floats in any case
lavaflow has quit [Read error: Connection reset by peer]
lavaflow has joined #racket
<jcowan> lexi-lambda: thanks
jao has quit [Remote host closed the connection]
notzmv has joined #racket
Fernando-Basso has quit [Quit: I quit.]
dbmikus has quit [Quit: WeeChat 2.3]
jao has joined #racket
JoshS has quit [Ping timeout: 250 seconds]
sleepnap has left #racket [#racket]
notzmv has quit [Quit: WeeChat 2.3]
notzmv has joined #racket