Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • Mar 03 2017 15:52
    @dom96 banned @Octopoda7
  • Feb 12 2017 23:57
    @dom96 banned @zzz125
  • Dec 23 2016 19:43
    @dom96 banned @Izrab
From IRC (bridge bot)
<Zoom[m]> Hey, I thought I've caught up with AOC. How is it it's still Dec the 5th but the 6th day is already on?
<Zoom[m]> That's a real 🤦‍♂️moment. That's the timer counting to the 6th day...
From IRC (bridge bot)
<disruptek> i think i hate all languages zevv uses equally.
<sschwarzer> disruptek: Which languages were you talking about?
<disruptek> languages zevv uses.
<sschwarzer> disruptek: oookay. I meant, which languages specifically?
<disruptek> just the ones he uses.
<disruptek> if he uses it, i think i hate it.
<sschwarzer> disruptek: I see. Everything's crystal clear now. Thank you very much! ;⁠-)
From IRC (bridge bot)
<sschwarzer> Is it possible to store an AST for later processing at runtime? For example, in https://play.nim-lang.org/#ix=2GLd , I would like to store the AST that can be visualized with dumpTree in a const or let "variable". Somehow I think this should be easy, but don't see how.
<disruptek> why not?
<sschwarzer> disruptek: You mean why it shouldn't be easy? Or why I don't see it? :⁠)
<sschwarzer> I mean, how can I do it in Nim?
<FromDiscord> <InventorMatt> Do you want to store it as a string?
<disruptek> what is it you want to store? nim nodes? a string representing the code? or just the semantic relationships?
<sschwarzer> InventorMatt: No, I want to store it as a tree, similar to JSON or XmlNodes
<sschwarzer> I want to store the AST data structure.
<sschwarzer> The same that a macro in place of dumpTree would see.
<FromDiscord> <InventorMatt> Its possible to store it but only during compile time.
<disruptek> you can't store a ref as a const. or maybe timmy got his wish and now you can.
<sschwarzer> disruptek: good point. I'd also be fine with storing it with let as ref.
<disruptek> i think you can let refs now.
<disruptek> as a hack, you could de/serialize it with frosty.
From IRC (bridge bot)
<FromDiscord> <dom96> disruptek: who's timmy?
<disruptek> timothee
<FromDiscord> <fwsgonzo> is there a nim executable option to make the name of the nimcache .json file a known filename?
<FromDiscord> <fwsgonzo> (edit) "is there a nim executable option to make the name of the nimcache .json file a known filename? ... " added "it'"
<FromDiscord> <fwsgonzo> (edit) "it'" => "it's a little bit annoying to have to translate x.nim into x.json"
<disruptek> dude, keep us posted on your work. it's pretty interesting.
<disruptek> there's a proc to change a file extension. i think it's called changeFileExt.
From IRC (bridge bot)
<sschwarzer> disruptek: What dude and work?
<disruptek> gonzo is doing some pretty interesting stuff with cache vms.
<disruptek> maybe i can find the medium posts.
From IRC (bridge bot)
<sschwarzer> disruptek: thanks
<disruptek> clyybber: ^
<disruptek> we should probably have a bloom filter package. i will improve this one and if no one wants to maintain it, i guess i will.
From IRC (bridge bot)
<FromDiscord> <fwsgonzo> sent a code paste, see https://play.nim-lang.org/#ix=2GLn
<FromDiscord> <fwsgonzo> Just to clarify, the above is working code
<disruptek> i mean, there are really great ways to do this in nim.
<disruptek> you can make a macro that produces a unique symbol that is shared by both pieces of code but won't be clobbered by anything else.
<disruptek> macros are perfect for setting up complex compile-time logic, but you can even use a template for something this simple.
From IRC (bridge bot)
<hmmm> wtf happened :⁠o
From IRC (bridge bot)
<Prestige> hmmm: hmm?
<lain> is the order of macro evaluation well-defined in nim?
<disruptek> yes.
From IRC (bridge bot)
<lain> is it just the order they're encountered in (so, top-down, left-to-right?)
<disruptek> it depends on whether their inputs are typed or not; untyped passes can be evaluated earlier than typed passes.
<lain> ah right
From IRC (bridge bot)
<FromDiscord> <Digitalcraftsman> sent a long message, see http://ix.io/2GMn