« first day (1456 days earlier)      last day (3493 days later) » 

user1804599
5:00 PM
So the type descriptor contains a pointer to the recursive marked setter.
 
"needs to be downcasted" or "needs to be downcast"?
 
also I think I see a slight problem here
 
(English question)
 
if you store the members as styxrt::Object*, then you'll have to cast to the correct type every time you access it.
 
downedcasted
 
5:01 PM
and you'll lose LLVM IR's type system safety (not that it's tremendously strong)
if you store them as the more derived class, you can't point to them safely.
I think that it would be better to drop the notion of having a pointer to the member pointer
instead maybe generate a function which sets the new values if you moved them.
 
@CatPlusPlus syndrom_cast
 
user1804599
@Puppy styxrt::Object* is only used to access the vtable, marked and pin count.
 
user1804599
As for e.g. accessing integer values from the runtime library, may I need that, I can generate LLVM functions that do that.
 
user1804599
Come to think of it, I could write all such accessors in LLVM IR.
 
marked and pin count stored per-object?
 
user1804599
5:04 PM
Works for now. vOv
 
because that would still be unsafe.
you'd have to guarantee that the styxrt::Object base is at offset 0 of every class for it to be safe.
 
user1804599
It is.
 
user1804599
It's never subclassed.
 
user1804599
I could make it final.
 
I see
and for multiple inheritance?
 
user1804599
5:05 PM
Multiple inheritance implies subclassing.
 
no, wait
 
user1804599
Its sole purpose is that I can access the object's metadata from the runtime which is written in C++.
 
what I was thinking of would only be a problem if you could store other classes by value.
but if you can only store them by reference then there would be no problem
 
user1804599
I current store all members as pointers to objects.
 
no, wait, don't you still have a problem with any inheritance, not just inheritance from styxrt::Object?
 
user1804599
5:07 PM
Except from some primitive types like int and double because it cannot be done that way, but to the runtime they aren't members (it doesn't have to collect them because they're not on the heap separately).
 
if you have class A {};, then A must have a styxrt::Object, and class B : A {};, then both A and B must have distinct styxrt::Object, unless you do the virtual inheritance fun dance (in which case it's still not guaranteed at offset 0).
 
user1804599
I.e. {%type*, i8, i32, i64} for a Styx Long. The first three members correspond with styxrt::Object in C++.
 
I mean, you may not classify them as inheriting from styxrt::Object, but in terms of object layout/pointers/etc, that is exactly what is happening.
 
user1804599
Styx struct Foo {x: String, y: Int} would in LLVM IR be {%type, i8, i32, {%type, i8, i32, i32*, i64}*, {%type, i8, i32, i32}*}. Maybe I add unboxed representation of integers later.
 
user1804599
I don't support inheritance.
 
user1804599
5:11 PM
It's not a language feature.
 
oh, my, fucking, gawd.
honestly I've never realized that the destructor of an object with automatic storage duration is not executed unless you end up in a catch-block somewhere (if something throws an exception), I guess I've just been mad lucky before (and written such code, not knowing it was required for the behavior I was expecting)
 
user1804599
The destructor is invoked if it goes out of scope, exception or not.
 
@rightføld this vs this
 
on this can it says the tomatoes have been peeled off but it seems the idiots left the skin inside the can wtf
I had to hunt for skins in the pot
so gross
 
user1804599
@FilipRoséen-refp buffering fail
 
5:17 PM
@rightføld if you don't end up in a catch-block, the destructor of object with automatic storage duration won't be called
 
user1804599
Are you sure you are talking about automatic storage duration?
 
user1804599
Because I have no idea how any of this relates to your example.
 
@rightføld std::lock_guard has automatic storage duration, that's the relevance
I could have written it in another manner, leaving out the lock_guard (ofc)
 
user1804599
Oh wait ok.
 
user1804599
huh wat weird.
 
user1804599
What if you by reference capture a local variable and dereference it in the destructor? UB?
 
it's not weird, it's legit according to the standard
@rightføld [except.ctor]p3 says "The process of calling destructors for automatic objects constructed on the path from a try block to a throw-expression is called "stack unwinding", and [except.ctor]p1 is even more explicit "As control passes from a throw-expression to a handler, destructors are invoked for all automatic objects constructed since the try block was entered"
so, TIL ^
 
user1804599
Ah, ok. It's fine.
 
user1804599
The captured local variable is of course also destroyed only when catching.
 
5:24 PM
yeah, but I had no idea that the dtor isn't run until when you enter a handler (which seems silly now, but before.. well.. yeah, damn it)
now I need to figure out if the behavior shown in my application is due to a bug in the compiler or not, because it's not as trivial as the example snippet
 
aaand, it's done
 
A bug in a mod to a game from an unrelated universe sounds about as far from canon as you can get... — Izkata 19 hours ago
 
lol'ed
 
Bah of course Space Engineers wiki must be down right now
Poor planning
 
5:49 PM
I'm still pondering whether or not there's a huge difference in terms of taste between canned and fresh mushrooms
the difference is definitely there, but I'm not sure if it's worth the extra work
 
@FilipRoséen-refp All exceptions end up in a catch block, unless you do something dumb and throw out of main.
which is either UB or terminate IIRC.
 
user1804599
Okay, I almost have type descriptors working now, except from object size. :|
 
user1804599
 
it's just %1 = T* gep null, 1, i64 = sub %1, 0.
 
user1804599
Yeah but I want it as a constant.
 
user1804599
6:02 PM
Otherwise I need a global ctor.
 
LLVM Constant*s are constants at link time.
but you can init a variable/value/whatever from a Constant*.
also if you just want to know the size of a type and you know your target platform, you can just ask the llvm::DataLayout to tell you.
or calculate it yourself, it's not that hard.
 
user1804599
@Puppy Ah ok.
 
user1804599
Ugh, jllvm supports only LLVM 3.2.
 
there's not that many IR changes.
 
@Puppy if the exception propagates out of main std::terminate will be called, and it's implementation specific whether stack unwinding takes place (and as shown earlier, gcc doesn't give a crap about unwinding the stack in such code)
@Puppy it doesn't matter if the exception is from within main, or some nested function call further down
 
6:10 PM
hola
 
@FilipRoséen-refp That is what I meant by throwing out of main.
 
@Puppy but it's not "UB or std::terminate", it's well-defined and the stack unwinding is implementation specific
 
It makes sense that objects are not destroyed until a catch. How could you log stuff that identifies a bug if the stuff has been destroyed?
 
well, it is UB or std::terminate, since std::terminate is in fact called.
 
@MartinJames it makes a lot of sense, it was just a case of "oh, I've never thought about that"
@Puppy UB != implementation-defined
 
6:17 PM
yes, I know that.
 
@FilipRoséen-refp I've noticed the behaviour while debugging, but not really thought that much about it:(
 
clearly, the behaviour falls under the std::terminate branch of the or.
 
@Puppy why are you using "UB" when there is no undefined-behavior in the case we are talking about? that's what I'm getting at.
 
I said UB or std::terminate.
or.
 
@Puppy but there is no UB
 
6:19 PM
so what?
the semantics of "or" do not require both branches to be true.
 
oh, I read your message wrong then I guess. I thought you meant "[it's either] A or B [depending on the implementation], IIRC" and not "it's A, or B, IIRC"
oxford comma FTW!
 
We are now starting storage maintenance on the #stackexchange SQL Servers - yummy 2TB NVMe PCIe SSDs are going in.
 
"I had a sandwich with eggs and coffee this morning" (weird sandwich) vs "I had a sandwich with eggs, and coffee, this morning" (oh yeah, right)
 
user1804599
Fucking Google.
 
user1804599
6:22 PM
I search for "how to override finalize" in the first result is a Stack Overflow question asking why not how.
 
I didn't have any eggs.
 
user1804599
Finalize, not fertilise.
 
fartalize
 
6:36 PM
@JohanLarsson Perl' Regexp::Common module suggests this for real number: (?:(?i)(?:[-+]?)(?:(?=[.]?[0123456789])(?:[0123456789]*)(?:(?:[.])(?:[012345678‌​9]{0,}))?)(?:(?:[E])(?:(?:[-+]?)(?:[0123456789]+))|))
 
nice formatting :)
 
@VáclavZeman cant you shorten this a lot by replacing 0123456789 by \d ?
 
'i don't want disalbe power control, just prevent from shutting down'. Can anyone else understand that?
http://stackoverflow.com/questions/26317786/is-it-possible-to-prevent-windows-from-shutting-down-programmatically
 
@Borgleader You cannot.
 
why not?
 
6:38 PM
^ this
 
'gay cancer', over 30 years ago.
 
buh, visual studio is weird. Is DirectX easier to learn than OpenGL?
 
depends who you ask
 
@Borgleader At least in Perl, \d matches any Unicode code point that is considered a numeric digit. \d is a superset of [0123456789].
 
eh...
 
6:45 PM
@Borgleader Try perl -Mutf8 -we '$_ = "৪"; print +(/\d/ ? "true" : "false"), "\n";'
The ৪ is "Bengali Digit Four U+09EA"
 
@VáclavZeman I won't taint my PC by installing Perl ;)
 
@Borgleader Well, you could try it in Java or such.
Hmm, in Java, \d is strictly [0-9]: ideone.com/GkAZgg
 
Is there no badge for C++11 anymore?
 
perl is, IIRC, pretty good about supporting Unicode in regular expressions.
 
user1804599
Woo.
 
user1804599
6:56 PM
clang++ -Wl,-all_load $(llvm-config --libs all) -shared -o libllvm.dylib
 
user1804599
I only had static libraries. :v
 
7:09 PM
The web tier memory upgrades are complete, up to 48 GB from 32 GB per server - SQL data is copying to the shiny new SSDs now
 
user1804599
Yaaay
 
I'll have to work with PERL this year.
 
user1804599
implicit val context = new llvm.Context
val module = new llvm.Module("main")
val main = new llvm.Function(module, "main", llvm.functionType(llvm.intType(32), Seq(llvm.intType(32)), isVarArg = false))
module.dump()
 
user1804599
@Sofffia Perl is a great language. Have fun! :D
 
7:14 PM
Is that sarcastic? :/
 
@JohanLarsson It looks kinda disgusting.
 
user1804599
No?
 
Oh ok.
 
@Puppy look again :)
 
I looked again and now I'm even more disgusted.
 
7:15 PM
@JohanLarsson s/again/away/
 
pointless totally-not-class? check.
using reflection to do the compiler's job? check.
 
meh, that merely demonstrates that the IDE integration is somewhat nice.
 
@Puppy ^ the output. The test written that way asserts that all types : IUnit can be converted roundtrip
 
KiloNewtons?
Aren't those 1000 Gu.Units.Newtons?
 
7:17 PM
@JohanLarsson Yes, I got that part.
 
@Sofffia I hope, at least I hope they will be. :)
 
@JohanLarsson Does that mean that 1 and 1000 newtons are going to have two different types? Why?
 
Metres or Meters? (Plural right?)
@Sofffia I use small structs very much like enums
not sure the design is good
 
Why don't you just define Meters, Newtons and Seconds? With those you can express every other, no?
 
7:21 PM
Maybe define a factory function that builds hours, minutes, kilo newtons in terms of their respective data type.
 
@Sofffia You don't need newtons.
1 Newton is the force required to accelerate 1 kg by 1 m/s^2.
 
Then you needs Grams
Or whatever the international system defines for grams.
I think it's Kilograms, but I'm not sure.
 
I'm pretty sure that kilograms is the basic unit for some reason.
 
yeah think so too
 
There you go
 
7:23 PM
4 mins ago, by Johan Larsson
Metres or Meters? (Plural right?)
 
Meters I'd say, but I'm in no way expert. Ask lightness.
Or Puppy
 
They are BRe so prolly metre guys
 
@rightføld nice trick
 
@JohanLarsson Google translates my "metri" (italian) into "metres".
 
@Sofffia Though @rightføld prefers perl v5 over v6. Silly of course
 
user1804599
7:26 PM
Well, there is an actual working implementation of it.
 
user1804599
And I like v5's sigils better.
 
user1804599
But I'm very excited about v6' other features.
 
Surprisingly our professor seems to be aware that technology tends to change during the years. In fact she is obsesses with HTML5 and CSS3, which... I guess, is a good thing. So we'll probably go with Perl v6.
 
much better.
er, I think I'm missing a () => on line 16.
 
7:32 PM
> styx / compiler / src / main / scala / org / rightfold / styx / compiler / llvm / binding.scala
WTF path
 
@Puppy the nice thing about it was that it produced nice output when running the tests
It is a helper in the testproject with sole purpose to enable [TestCaseSource(typeof(UnitTypeProvider))]
 
Maybe styx/src/scala/org/rightfold/styx/compiler/llvm/binding.scala?
 
user1804599
@sehe One v6 feature I really want to try out is junctions.
 
@rightføld mmm. would need to know what that is (suspect async/coroutine related?)
 
Rightfold Inc.
 
user1804599
7:44 PM
@Griwes it's pretty much two things: 1) how SBT and Maven work, and 2) a non-issue
 
user1804599
@sehe if $x == 1 | 2 | 3 { … }
 
@rightføld oh that. Yeah that's good stuff
 
user1804599
Or if $x & $y & z > $a | $b | c { … }.
 
Everything that makes manual control flow obsolete, is nice
 
Manual control flow?
What's automatic control flow?
 
user1804599
7:47 PM
s/manual/explicit/
 
Upgrade of one SQL server is complete. We will now fail over to it so we can upgrade the other. Sites will be unavailable for just a moment.
 
user1804599
my int @ints[4;2]; woot they even got multidemensinoal arrays right.
 
@rightføld yeah thanks
 
user1804599
Hmm, speaking of @experimental attribute.
 
user1804599
Might just look at the module's version instead.
 
7:52 PM
> Not everybody library has the benefit of using exceptions, especially performance critical code.
 
user1804599
I thought of semantic versioning with optional /… suffix for bindings. E.g. an Styx binding for LLVM 3.5 could have a version 2.1.3/3.5.
 
@AlexM. this might interest you
 
@Puppy you want in on the lib?
 
@rightføld Except it's horrible.
 
Not sure how to represent composite units like mm^2
One alternative is SquareUnit<T> CubeUnit<T>, ... not very nice
 
7:55 PM
Failover complete - all sites are back online.
 
want to be able to constrain on it
 
user1804599
Just make units values.
 
Maybe PowerUnit<Unit> that has public readonly int Power;
more flexible but not sure it will work with generics
 
user1804599
I like polymorphism.
 
no polymorphism with structs
 
user1804599
8:01 PM
You can surely do polymorphism with structs.
 
user1804599
void F<T>(T x) where T : struct { … }
 
ok, meant no inheritance
 
@JohanLarsson Want in on what lib?
 
the unit thing
 
what, the disgusting shit you linked?
thanks but no thanks
 
8:05 PM
haha #mentor
 
mentor what?
the code you linked is, at best, overly convoluted.
 
Parsing tightly coupled with the core is ew
 
TIL windows 8 has a virtual disk mount utility built in, that's actually pretty handy
 
@CatPlusPlus what does it mean?
@Puppy do you use nUnit at work?
 
so this is now the kind of question that can be asked of puppies too
 
8:12 PM
Gonna see where this leads
 
Units have XML and parsing stuff in them what for
 
they are structs with readonly fields
nontrivial to make it compatible with the XmlSerializer
doing a huge hack to set the readonly field, boxing them and setting it with reflection in the box
 
I don't find compatibility with a crappy serialiser to be worth polluting the type design :v
Besides this can probably be done externally
 
I don't love it either
 
Class wrappers or something if someone really wants XmlSerializer stuff
 
8:15 PM
Hey, said crappy serializer happens to be one of the few things I like that BCL does OotB
 
Beh
I'd redo all the serialisation in BCL
 
@CatPlusPlus That's a different matter indeed
 
@sehe same here, very convenient to use them.
Also annoying when they don't work
 
@CatPlusPlus Oh, sure. But it's one of the things I like not having to think about (90% of the time)
 
The code in XmlSerializer is not very nice when peeking it
 
8:16 PM
I deal enough with long-term storage serialisation that I can't not think about it :v
It's just a bad framework, and some of the behaviours are rather annoying (e.g. no support for computed properties)
 
I think this will be beautiful from the outside if I manage to finish it
 
Dunno if you've seen Boost.Units
 
nope, never
seen F#'s units o measure though
 
@JohanLarsson No idea.
 
You write unit tests right?
 
8:23 PM
@Sofffia lol
 
no idea.
 
I'm working on a greenfield subproject which doesn't really call for a lot of code.
 
man. Is it a bad idea to integrate C++ related stuff to other languages? I kinda want to write tests in python but I feel like that's probably dumb.
 
Not worth it for tests
 
8:25 PM
@Cat did you find the [TestCaseSource(typeof(UnitTypeProvider))] thing ugly?
 
I don't really care much about how pretty test code is
I liked xUnit better than NUnit though
 
I just like the Coverage package that you can get with python
 
That won't measure C++ coverage at all
 
@CatPlusPlus they have identical features with different names, no out-of-the-box R# integration with xUnit though
 
xUnit felt cleaner dunno
 
8:28 PM
yeah xunit is nice
I think the same guys wrote both
 
user1804599
Yay segfault.
 
I don't agree that testcode can be a mess though, less stringent but still has to be readable
 
Dunno what that TestCaseSource thing is really
I'd probably just write it the straightforward way
 
it is a workaround for [TestCase(MustBeCompiletimeConstant)]
ok I'm not trying to sell it
 
@Puppy Perl is reasonably good with unicode in general:
@ʞɔɐɯɹoↃɔW sǝɯɐſ: No idea how to do it using Microsoft, but it’s totally trivial with the latest Perl release: perl -Mv5.14 -MUnicode::UCD=num -CSA -E 'say "$_ is ",num($_) for @ARGV' "४५६७" "໓໑໔໑໕໙" prints out ४५६७ is 4567 ໓໑໔໑໕໙ is 314159. That means all you need to do for digit strings is grab them with /(\d+)/ and call the Unicode::UCD::num function on it. I don’t know how good Microsoft’s international support is, but it has to be better than Java’s. — tchrist May 26 '11 at 15:06
 
8:35 PM
I dunno
it's hard to see who's the winner in "More Fucked Up: Microsoft or Java?"
 
Too bad Perl isn't reasonably good at being a programming language
3
 
user457812
Whoever wins, we lose?
 
@Puppy rubby
 
pretty sure that Ruby is neither Microsoft nor Java
 
Still wins
 
8:38 PM
I wonder if Perl6 is ever going to be as viable as Perl5 is.
 
Beh I'm getting broken connections dunno what's up with that
I wonder if Perl6 is ever going to be, too
 
Failover failed over
@CatPlusPlus it already is, in much the same vein as Python3
 
wow
Also I need a better deployment strategy
 
user1804599
Ugh wtf.
 
user1804599
> Assertion failed: ((i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"), function init, file /Users/rightfold/llvm/lib/IR/Instructions.cpp, line 281.
 
user1804599
8:41 PM
Must useful error message ever.
 
@CatPlusPlus deployment fetishism
 
user3010322
Aww, Xeo isn't here.
 
user3010322
Guess I'll figure it out on my own.
 
HEH I forgot to add backups to cron
 
@ThePhD You probably will
 
8:48 PM
@rightføld Welcome to LLVM asserting on domain error- one of the most annoying things.
 
user1804599
Turned out I passed the basic block instead of the result of alloca to llvm.gcroot. :P
 
lol
 
hey
 
hey
 
> It transcends the limits imposed by other bulletin board software, allowing you to create a truly unique community on your website. From it's extensive template and skins features to it's complete multi-lingual support, your members will keep coming back for more.
lol
 
8:58 PM
TIL that std::bitset has so many odd issues because it was defined very early in the standardization process. E.g. before function templates could have non-type template parameters, before explicit constructors and even before the bool type!
 
discourse?
 
when all those language features came along, the interface was already frozen
 
No, something older
 

« first day (1456 days earlier)      last day (3493 days later) »