<the_drow>
I know crystal_ruby and it looks nice (although not done yet and it needs help)
<the_drow>
I'm talking about porting the module itself to crystal
Oliphaunte has quit [Ping timeout: 240 seconds]
onethirtyfive has quit [Remote host closed the connection]
pawnbox_ has joined #crystal-lang
pawnbox has quit [Ping timeout: 264 seconds]
<jhass>
the_drow: As I noted we already have HTML.escape
<jhass>
and URI.escape and URI.unescape
<jhass>
so I guess you'd be missing HTML.unescape?
<FromGitter>
<mosop> @jhass thanks!!
<BlaXpirit>
any way to find out if `initialize` is being called from code or from a side effect like `new` or `super` ?
<jhass>
doesn't the compiler just inject method definitions for new?
<BlaXpirit>
well i'm more concerned about `super`
<BlaXpirit>
nope, this makes absolutely no sense and i shouldn't be doing this
<the_drow>
jhass, Oh really? Cool. Yes I am I guess
<jhass>
should be easy enough to add, give it a shot?
<jhass>
the hardest part will be parsing the &#; entity stuff
<BlaXpirit>
ugh, need to hardcode a list of entities?
Oliphaunte has joined #crystal-lang
<jhass>
well, for the "pretty" names, I don't see a way around it
Oliphaunte has quit [Ping timeout: 260 seconds]
<the_drow>
jhass, I might later on. I'll update the issue anyway
sardaukar has joined #crystal-lang
onethirtyfive has joined #crystal-lang
onethirtyfive has quit [Remote host closed the connection]
pawnbox_ has quit [Remote host closed the connection]
Philpax has joined #crystal-lang
Redfoxmoon has quit [Read error: Connection reset by peer]
Redfoxmoon has joined #crystal-lang
soveran has joined #crystal-lang
soveran has joined #crystal-lang
soveran has quit [Changing host]
pawnbox has joined #crystal-lang
soveran has quit [Remote host closed the connection]
soveran has joined #crystal-lang
soveran has quit [Changing host]
soveran has joined #crystal-lang
soveran has quit [Read error: Connection reset by peer]
soveran has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Read error: Connection reset by peer]
Raimondi^1 has joined #crystal-lang
Raimondii has quit [Ping timeout: 240 seconds]
Raimondi^1 is now known as Raimondi
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Ping timeout: 250 seconds]
RinkanaZ has joined #crystal-lang
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 240 seconds]
Raimondii is now known as Raimondi
<FromGitter>
<Rinkana> How can i run a function on a var if the var is not nil. I've tried ```@example.call(data) unless @example.nil?``` but it still throws errors
<FromGitter>
<Rinkana> Nvm, found it: ```@example.try &.call(data)```
<BlaXpirit>
well this is sad. can't have two `crystal run` or `crystal eval` running at the same time
<BlaXpirit>
files get overwritten
soveran has quit [Remote host closed the connection]
<FromGitter>
<sdogruyol> @BlaXpirit what are you trying to achieve?
<BlaXpirit>
run two crystal programs and see the diff of their outputs
<BlaXpirit>
tried running them in parallel to save time
<FromGitter>
<sdogruyol> tough one
<FromGitter>
<sdogruyol> :)
RinkanaZ has quit [Ping timeout: 250 seconds]
soveran has joined #crystal-lang
soveran has quit [Remote host closed the connection]
Oliphaunte has joined #crystal-lang
the_drow has quit [Quit: This computer has gone to sleep]
Oliphaunte has quit [Ping timeout: 240 seconds]
<crystal-gh>
[crystal] jeromegn opened pull request #3108: Can't parse enum from upcase word (master...patch-1) https://git.io/v63QK
<jhass>
BlaXpirit: well, that should be fixable
<jhass>
just gotta randomize the temp dir
<BlaXpirit>
well it's a cache dir, not a temp dir, part of the point is that the dir has a reproducible name
<BlaXpirit>
to speed up next compilation
<jhass>
guess we could just hash the fullpath and append
<BlaXpirit>
for crystal run it definitely should be randomized and then removed
<BlaXpirit>
for crystal eval it definitely should be randomized and then removed
<BlaXpirit>
for run not sure
<jhass>
well, eval just writes to a tempfile and then fallsthrough to run iirc
<BlaXpirit>
yes but it always creates a folder named 'eval' in the cache folder, whereas all the other names are absolute paths
<BlaXpirit>
kinda solved this for myself by specifying a custom cache folder
<BlaXpirit>
(a different one for each of the runs)
the_drow has joined #crystal-lang
the_drow has quit [Quit: This computer has gone to sleep]
<FromGitter>
<GuneshRaj> Apparently in ElCapitan, soft linking a path to /usr/lib is non permitted
<FromGitter>
<GuneshRaj> So, I had a include the link in the clang compile command -L
<FromGitter>
<GuneshRaj> dl -L/usr/lib -L/usr/local/lib -L/usr/local/mysql/lib/ ⏎ Undefined symbols for architecture x86_64: ⏎ "_main", referenced from: ⏎ implicit entry/start for main executable ⏎ ld: symbol(s) not found for architecture x86_64 [https://gitter.im/crystal-lang/crystal?at=57a74f87483751d50f310902]
<FromGitter>
<GuneshRaj> gives me this error after adding the path:
A124 has joined #crystal-lang
<FromGitter>
<Rinkana> That's quite odd
<FromGitter>
<GuneshRaj> Its running the latest MySQL Community and has the 64bit dylib as well.
<FromGitter>
<Rinkana> It is indeed the El Capitan security "feature"
<FromGitter>
<Rinkana> You can disable that feature if you want but it is better if you submit an issue and request that not /usr/lib is used but /usr/local
sardaukar has joined #crystal-lang
<FromGitter>
<GuneshRaj> I don't mind these features but crystal does not seem to allow -L type flags in the build command, kinda makes it hard to maintain 2 different variables for Lib Path
<FromGitter>
<GuneshRaj> Im curious, what do you use Crystal for @Rinkana ?
<FromGitter>
<Rinkana> General testing applications. For me there is no need for DB connections
<FromGitter>
<Rinkana> And most DB connectors are third party atm
<FromGitter>
<GuneshRaj> cool, Im just building a case to migrate from Go to Crystal
Oliphaunte has quit [Remote host closed the connection]
<FromGitter>
<Rinkana> Ah great
Oliphaunte has joined #crystal-lang
Oliphaunte has quit [Remote host closed the connection]
<FromGitter>
<Rinkana> What kind of case are you building if i may ask?
<FromGitter>
<GuneshRaj> We are planing to rebuild some of our systems / platforms. we started to migrate from Java to Go-Lang about a year ago.
<FromGitter>
<GuneshRaj> I feel Crystal may be a better fit, well until it hits 1.0
<jhass>
GuneshRaj: Crystal should respect the LIBRARY_PATH environment variable and you can pass the -L flag via the --link-flags option to crystal build
<jhass>
we're really just calling your system linker
pawnbox has quit [Remote host closed the connection]
the_drow has quit [Quit: This computer has gone to sleep]
pawnbox has joined #crystal-lang
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #crystal-lang
Oliphaunte has joined #crystal-lang
william__ has joined #crystal-lang
<william__>
does crystal emit code at some level before llvm that is deterministic? like: if you compile the same program twice, you get the same object code file exactly?
<FromGitter>
<williamsharkey> I think the main reason to not add something like example based typing for empty arrays is that it adds complexity without adding much value. I think that it is equally as precise and logical as anything else that uses type inference, though. I wouldn't be surprised if there are instances where typing the out the type signature of an empty array is tedious, and it would be easier to use examples that are in scope, but it
<FromGitter>
... would be up to me to find an example. Thanks for the feedback.
<BlaXpirit>
williamsharkey, well i showed you how to do it "example based"
<DeBot>
BlaXpirit: no overload matches 'Pointer(Int32 | String | Nil)#[]=' with types Int32, Bool - https://carc.in/#/r/16fp
<FromGitter>
<williamsharkey> Thanks, Blaxprit, I did not understand originally. It is exactly what I had in mind. Thanks
<FromGitter>
<williamsharkey> It speaks to the power of this language that my random request is fulfilled so naturally. brillant
<FromGitter>
<williamsharkey> Is there a common workflow that is used when someone wants inspect emitted code? Like if I want to test two alternate syntaxes and confirm that they compile to the same thing? Do people inspect llvm or is there a more human readable way to do it?
<BlaXpirit>
inspect llvm
<FromGitter>
<Rinkana> You can also do ```crystal play```
<BlaXpirit>
i don't think it's relevant
<FromGitter>
<Rinkana> You can enter the code in your browser and it will tell you the compile time info
<RX14>
jhass, re #3075, what do you mean by false positive?
<jhass>
123::0:3000 parsed as {"123::0", 3000}
<RX14>
whats so wrong about that?
Oliphaunte has joined #crystal-lang
<FromGitter>
<sdogruyol> isn't that a wrong address by itself?
tim has joined #crystal-lang
<jhass>
nope
<RX14>
well you could create a valid example
<jhass>
it's actually valid
<BlaXpirit>
jhass, it is not valid
<jhass>
not just assigned
<jhass>
just not*
<jhass>
2001::0:3000 if you feel any better then
<RX14>
regardless, i don't think it's an issue
<jhass>
it's easy enough to prevent
<RX14>
eh i dunno
the_drow has quit [Quit: This computer has gone to sleep]
<RX14>
maybe check the host fragment contains : and doesn't start with [, if so return the raw host string?
jhass has quit [Excess Flood]
<RX14>
is that enough?
jhass has joined #crystal-lang
<jhass>
sounds like you need to run twice through it, or once anyway, like I currently do in the worst case
<jhass>
what's the problem with checking it really?
<RX14>
just seems excessive
<RX14>
more complex code to maintain
<RX14>
if you delegate to URI, speed issues
<RX14>
if you use regex, holy speed issues
<jhass>
in my code it's unless index; ...; else return; end; instead of ...;