<FromGitter>
<Blacksmoke16> debating if it would be worth making some of this more type safe or if that would fit better into its own thing and leave this to just be quick/easy querying
<FromGitter>
<watzon> Yay me! Marionette hit 100 stars.
<FromGitter>
<Blacksmoke16> \o/
<FromGitter>
<mixflame> congratz
<FromGitter>
<Blacksmoke16> ran a little benchmark versus granite
<FromGitter>
<Blacksmoke16> granite (without using bulk inserts, even tho thats what you should be using if you need to do this) took ~21s to insert 10k records
<FromGitter>
<Blacksmoke16> granite has me beat on memory, might be able to optimize that maybe
<FromGitter>
<Blacksmoke16> caching the metadata brought it down to `42256032`, good enough for me for now
sagax has joined #crystal-lang
_whitelogger has joined #crystal-lang
f1reflyylmao has joined #crystal-lang
f1refly has quit [Ping timeout: 264 seconds]
chachasmooth has quit [Ping timeout: 260 seconds]
chachasmooth has joined #crystal-lang
zorp has quit [Ping timeout: 246 seconds]
sagax has quit [Ping timeout: 246 seconds]
<FromGitter>
<Blacksmoke16> how do you guys handle naming your files within namespaces? The style guide says to do like `HTTP::WebSocket is defined in src/http/web_socket.cr.`
<FromGitter>
<Blacksmoke16> but say you have like `MyApp::Sequencing::Generators::Interface`, feels kinda strange to call it just `interface.cr`, but also naming it `generator_interface.r` is kinda redundant...
<FromGitter>
<watzon> I find there are two different ways to do it. Either call the file `interface.cr`, put it in `src/my_app/sequencing/generators/interface.cr`, and namespace it under `MyApp::Sequencing::Generators::Interface` or call the file `interface_generator.cr`, put it in the same location, and namespace it under `MyApp::Sequencing::InterfaceGenerator`. It really just depends on personal preference.
<FromGitter>
<watzon> > @watzon you remember what the fix was for the long Codegen (bc+obj) compile times? ⏎ ⏎ I don't actually
<FromGitter>
<Blacksmoke16> no worries
<FromGitter>
<Blacksmoke16> yea im leaning towards the former
sorcus has quit [Quit: WeeChat 2.9]
sorcus has joined #crystal-lang
Rounin has quit [Ping timeout: 260 seconds]
zorp has joined #crystal-lang
zorp has quit [Ping timeout: 260 seconds]
Rounin has joined #crystal-lang
sagax has joined #crystal-lang
<FromGitter>
<j8r> @Blacksmoke16 How your proposal can be done, about adding a constant to a object through an annotation?
f1reflyylmao has quit [Ping timeout: 240 seconds]
<FromGitter>
<benphelps> if I create an alias of String, how would I go about using that to define constants ?
<FromGitter>
<Blacksmoke16> would be a neat feature to have i think, have `String#gsub(Regex)` that returns an enumerable/iterable
duane has quit [Ping timeout: 256 seconds]
<oprypin>
oh. crystal build --debug is borked? > Module validation failed: Instruction does not dominate all uses!
<FromGitter>
<dorianmariefr> I can't seem to fix an error: ⏎ ⏎ ``` abstract class Statement ⏎ class Expression < Statement``` ⏎ ⏎ so it should work as it's a subclass, any idea why it's not working? [https://gitter.im/crystal-lang/crystal?at=5f27155536563560f2bbcddc]
<oprypin>
dorianmariefr, `Expression < Statement` but not `Array(Expression) < Array(Statement)`
<oprypin>
when creating the array u need to create it as Array(Statement) directly
<FromGitter>
<Blacksmoke16> versus parsing all the annotation data and calling `.new` directly with all that stuff at compile time, which essentially does the same thing but a lot less readable
<FromGitter>
<j8r> wow, that's a lot of arguments
<FromGitter>
<Blacksmoke16> yea i have a todo about that... `# TODO: Maybe break these out to share with a type for migrations/generation?` :P
<FromGitter>
<Blacksmoke16> they all have defaults/are optional so its not like the user needs to provide all of them, nor will they be working directly with this type anyway
<FromGitter>
<j8r> that's still ok though, but you won't have much room like adding twice more
<FromGitter>
<Blacksmoke16> not sure what other options i have versus breaking the DDL side of things into their own type and passing that in
<FromGitter>
<j8r> what is PK?
<FromGitter>
<Blacksmoke16> primary key
<FromGitter>
<j8r> and FK would be foreign key?
<FromGitter>
<Blacksmoke16> eya
<FromGitter>
<Blacksmoke16> yea
<FromGitter>
<Blacksmoke16> still unsure how im going to handle associations
<FromGitter>
<Blacksmoke16> like is it possible to instantiate two objects from the same result set?
<FromGitter>
<Blacksmoke16> i guess if the columns are selected in order, like one object columns, then another could just keep consuming the same result set
<oprypin>
can someone remind me how to append stuff to constants at compile time and then use it
<FromGitter>
<Blacksmoke16> prob have to wrap it in a `macro finished` hook
<oprypin>
wait what somehow i forgot to actually push the variable. xD
<FromGitter>
<Blacksmoke16> that would do it
<oprypin>
hmmmm so i want to make a macro that adds a variable to a module and then refers to it
<oprypin>
or more to the point:
<oprypin>
i want every invocation of a macro to define some global storage for itself and get transformed into an accessor of that global storage. but the point is that i want the ability to modify that value from elsewhere
<FromGitter>
<Blacksmoke16> probably because that doesnt happen until runtime so the value wouldnt exist at compile time yet
<oprypin>
Blacksmoke16, well no, of course all code exists at compile time :)
<oprypin>
i suspect this is because this code effectively gets put into main() and everything happening through there is after even every macro finished