[{"data":1,"prerenderedAt":334},["ShallowReactive",2],{"project-26537734":3},{"id":4,"name":5,"line":6,"line_source":7,"title":8,"url":9,"domain":5,"maker":10,"posted_at":11,"year":12,"points":13,"comments":14,"rank_in_year":15,"shown_in_year":16,"top":17,"tier":18,"category":19,"subcategory":20,"format":21,"keywords":22,"reception":28,"sentiment":29,"stance_mix":30,"scored_comments":34,"aspects":35,"strip":43,"post_text":45,"what":46,"said":92,"maker_in_thread":188,"shape":194,"grid":198,"attempts":295,"same_week":296,"maker_shows":32,"maker_hidden":326,"reader_version":327,"card":328},"26537734","compiler.org","Regular expression compilation visualized","title","Show HN: Regular expression compilation visualized","https:\u002F\u002Fcompiler.org\u002Freason-re-nfa\u002Fsrc\u002Findex.html","JoelJacobson",1616397530,2021,219,38,198,2533,8,"notable","learning_science","regex visualization","web_app",[23,24,25,26,27],"regular expression","nfa","finite automata","regex compiler","llvm","mixed",0.219,{"positive":31,"neutral":31,"mixed":32,"critical":33},6,1,3,16,{"design":36,"docs":38,"performance":39,"idea":40,"execution":42},{"positive":32,"critical":37},0,{"positive":32,"critical":37},{"positive":37,"critical":37},{"positive":41,"critical":41},2,{"positive":32,"critical":32},[44,37,44,37,33,33,37,37,37,44,37,37,37,37,37,33,44,37,37,33,32,33,32,37,37,37,37,37,37,37,44,33,32,37,37,37,44,33],5,null,{"problem":47,"audience":61,"pricing":45,"motivation":73,"time_to_build":45,"stack":78,"openness":89,"stage":90,"team_size":91},{"value":48,"source":49,"evidence":50},"Shows how regular expressions are compiled step by step into NFA\u002FDFA state machines and code","inferred",[51,55,58],{"id":52,"by":53,"text":54},"26551667","allanrbo","This is an amazing interactive learning tool. Kudos! I vaguely remember from a \"computer science modelling\" course at uni, learning how to do this process by hand, from the…",{"id":56,"by":10,"text":57},"26551818","Thanks for the kind words. I made it for fun during a compiler course held by professor Christian Schulte at the Royal Institute of Technology here in Sweden. My original plan…",{"id":59,"by":10,"text":60},"26554544","Author here. The generated LLVM IR at the bottom actually make uses of vector instructions, which will make LLVM generate SIMD instructions if supported by the CPU. For instance,…",{"value":62,"source":49,"evidence":63},"Students and programmers learning regular expressions and automata",[64,65,69],{"id":52,"by":53,"text":54},{"id":66,"by":67,"text":68},"26552429","lprd","This is really neat! I've been putting off learning regex's for some time now, guess I need to add it to my tool belt.",{"id":70,"by":71,"text":72},"26555724","zokier","Real regular expressions are hardly useless, I speculate that majority of real world uses of regexp are actually regular. Many of state of art regex engines (re2, hyperscan, rust…",{"value":74,"source":75,"evidence":76},"Made for fun during a compiler course, inspired by Christian Schulte's course","maker",[77],{"id":56,"by":10,"text":57},[79,85],{"value":80,"source":75,"evidence":81},"ReasonML",[82],{"id":83,"by":10,"text":84},"26552537","Heh, the idea was to put more things on it, would be cool to visualize more algorithms. Too bad ReasonML became such a mess, I really liked the coding experience in it. Now I…",{"value":86,"source":75,"evidence":87},"LLVM",[88],{"id":59,"by":10,"text":60},"unknown","launched","solo",{"praise":93,"objections":115,"requests":134,"questions":147,"alternatives":166},[94,104],{"value":95,"source":96,"evidence":97},"Amazing interactive learning tool","commenter",[98,99,100],{"id":52,"by":53,"text":54},{"id":66,"by":67,"text":68},{"id":101,"by":102,"text":103},"26552369","stelf","In all DM books. Kudos!",{"value":105,"source":96,"evidence":106},"Useful for understanding regex internals",[107,111],{"id":108,"by":109,"text":110},"26555489","burntsushi","> It feels to me like it shouldn’t be compilation to a program that processes one character at a time High performance regex engines do use SIMD in various places. Others have…",{"id":112,"by":113,"text":114},"26551892","filterfish","I would like to echo @allanrbo kind words I to think it's a great way to understand regular expressions and their various implementations. I was a little confused about how to…",[116,126],{"value":117,"source":96,"evidence":118},"Only supports academic regular expressions, lacks Unicode and backreferences",[119,123],{"id":120,"by":121,"text":122},"26555379","bmn__","Too many to enumerate, already the utter lack of Unicode is a killer. The tool supports only the academic interpretation of regular expressions that are strictly equivalent to…",{"id":124,"by":121,"text":125},"26556702",">> Too many to enumerate I take back my previous claim, this is a wrong exaggeration. > The tool could be extended to support Unicode Not an easy task. There are some things in…",{"value":127,"source":96,"evidence":128},"Perl-style regex features like lookaround are not supported",[129,130],{"id":124,"by":121,"text":125},{"id":131,"by":132,"text":133},"26554719","unhammer","Only regular expressions[0] can compile to FST's; Perl-style regexes aren't regular. [0] https:\u002F\u002Fen.wikipedia.org\u002Fwiki\u002FRegular_language",[135,142],{"value":136,"source":96,"evidence":137},"Show the generated code after each optimization step",[138],{"id":139,"by":140,"text":141},"26553492","JD557","I guess this might be hard, but it would be pretty cool to be able to \"stop\" the optimizations at some point and see the resulting code. Say \"give me the generated code for the…",{"value":143,"source":75,"evidence":144},"Support more algorithms from the compiler course",[145,146],{"id":83,"by":10,"text":84},{"id":56,"by":10,"text":57},[148,159],{"value":149,"source":96,"evidence":150},"How do SIMD and ILP apply to regex compilation performance",[151,155,158],{"id":152,"by":153,"text":154},"26554246","dan-robertson","I wonder what the state of the art is in regex compilation? It feels to me like it shouldn’t be compilation to a program that processes one character at a time as you’ll be doing…",{"id":156,"by":71,"text":157},"26554413","Many high-performance regex libraries use SIMD these days. Hyperscan might be the most prominent example of that, being made by Intel and all.",{"id":59,"by":10,"text":60},{"value":160,"source":96,"evidence":161},"What are the limitations compared to Python's re module",[162],{"id":163,"by":164,"text":165},"26554777","pansa2","What are the limitations of regular expressions compiled in this way, compared to things like Python’s `re` module? Is it just that they can’t support backreferences?",[167,174,178,182],{"value":168,"source":96,"evidence":169},"regex101.com",[170],{"id":171,"by":172,"text":173},"26557570","savrajsingh","Regex101.com is the super-lite version of this, also worth a look if you haven’t tried it",{"value":175,"source":96,"evidence":176},"Hyperscan",[177],{"id":156,"by":71,"text":157},{"value":179,"source":96,"evidence":180},"RE2",[181],{"id":108,"by":109,"text":110},{"value":183,"source":96,"evidence":184},"Emacs rx",[185],{"id":186,"by":132,"text":187},"26554749","See also https:\u002F\u002Fwww.emacswiki.org\u002Femacs\u002Frx",{"comments":189,"answered":41,"key":190},4,[191,192,193],{"id":56,"text":57},{"id":59,"text":60},{"id":83,"text":84},{"commenters":195,"max_depth":31,"maker_replies":189,"first_comment_mins":196,"lifespan_hours":197},24,1380,240,[199,201,203,205,209,211,212,214,217,219,223,225,228,230,233,234,236,240,241,245,247,249,251,252,256,258,260,261,263,265,267,270,275,280,284,285,288,290],[52,37,44,200,53,37],"project\u002Fpositive\u002Fdesign",[56,37,37,202,10,32],"maker\u002Fpositive\u002Fnone",[112,37,44,204,113,37],"maker\u002Fpositive\u002Fdocs",[206,37,37,207,208,37],"26657681","other\u002Fneutral\u002Fnone","sitkack",[152,32,33,210,153,37],"project\u002Fneutral\u002Fperformance",[156,32,33,210,71,37],[59,32,37,213,10,32],"maker\u002Fneutral\u002Fperformance",[215,32,37,216,132,37],"26554689","other\u002Fneutral\u002Fperformance",[108,32,37,218,109,37],"commenter\u002Fneutral\u002Fperformance",[220,41,44,221,222,37],"26552457","project\u002Fpositive\u002Fidea","lionkor",[83,41,37,224,10,32],"maker\u002Fneutral\u002Fnone",[226,41,37,207,227,37],"26553874","Ciantic",[229,41,37,224,10,32],"26554490",[231,33,37,232,71,37],"26553498","other\u002Fneutral\u002Fidea",[186,33,37,232,132,37],[139,189,33,235,140,37],"project\u002Fmixed\u002Fidea",[237,44,44,238,239,37],"26556912","project\u002Fpositive\u002Fexecution","mdzn",[171,31,37,207,172,37],[242,243,37,232,244,37],"26557498",7,"eevilspock",[163,17,33,246,164,37],"project\u002Fneutral\u002Fidea",[120,17,32,248,121,37],"project\u002Fcritical\u002Fidea",[250,17,33,246,164,37],"26555673",[124,17,32,248,121,37],[253,17,37,254,255,37],"26557400","commenter\u002Fneutral\u002Fidea","abecedarius",[257,17,37,254,121,37],"26559939",[259,17,37,232,53,37],"26557696",[70,17,37,254,71,37],[262,17,37,254,121,37],"26556703",[264,17,37,254,71,37],"26557597",[266,17,37,254,121,37],"26561085",[66,268,44,269,67,37],9,"project\u002Fpositive\u002Fnone",[271,272,33,273,274,37],"26558206",10,"project\u002Fneutral\u002Fexecution","c1ccccc1",[276,277,32,278,279,37],"26554576",11,"project\u002Fcritical\u002Fexecution","avereveard",[281,277,37,282,283,37],"26554626","commenter\u002Fneutral\u002Fexecution","yakubin",[131,277,37,254,132,37],[286,277,37,207,287,37],"26555025","Cthulhu_",[101,289,44,221,102,37],12,[291,292,33,293,294,37],"26553028",13,"project\u002Fneutral\u002Fdesign","chovybizzass",[],[297,302,307,311,316,321],{"id":298,"name":299,"points":300,"category":301},"26568014","Practical Go Lessons",919,"languages",{"id":303,"name":304,"points":305,"category":306},"26503572","Sorted CSS Colors",559,"dev_tools",{"id":308,"name":309,"points":310,"category":306},"26554451","PyWebIO",200,{"id":312,"name":313,"points":314,"category":315},"26503715","LitiHolo",180,"hardware",{"id":317,"name":318,"points":319,"category":320},"26573930","Arc",175,"data",{"id":322,"name":323,"points":324,"category":325},"26527268","Papercups",148,"web_saas",false,"v2",{"id":329,"name":5,"line":6,"ai":326,"cat":19,"year":12,"points":13,"comments":14,"rec":28,"s":330,"top":17,"kw":331,"maker":10,"domain":5,"tier":18,"attempts":37,"strip":332,"url":9,"mix":333,"praise":95,"objection":117,"sub":20},26537734,0.22,[23,24,25,26,27],"50503300050000035003131000000053100053",[31,31,32,33],1794036604750]