« first day (1211 days earlier)      last day (3753 days later) » 

4:07 PM
@DeadMG to not add "count" at the end of every enum
@rightfold interesting.
 
@BartekBanachewicz Yes, but why would you add "count" at the end?
 
@DeadMG sometimes it's important/necessary.
 
...
that's terrifically vague.
 
@DeadMG when you have to iterate over all enum fields
 
and why would you need to do that?
 
4:10 PM
hmm
guys
 
@DeadMG "why would you need reflection"
 
I don't commonly require reflection.
 
fuck if anyone cares what you require
 
@rightfold how would you implement it?
 
didn't you accuse me of continually being a dick?
and now you're randomly like, "WELL JUST FUCK YOU THEN".
 
4:13 PM
eh, that was overreacting, but I hate people who say "I don't need it so it's useless"
 
I didn't say that it was useless.
merely that as far as I can tell, it has limited use.
 
everything has limited use
 
adding a language feature like std::enum_count or something would have a non-zero cost.
 
please don't say the f word
 
so you'd need more than "Sometimes reflection good".
 
4:14 PM
@JohannesSchaub-litb if you want to tell me to not say "fuck" you should at least spell it out
@DeadMG I think that explaining uses of something to someone is pretty much the same as explaining it itself.
what's going on with the stars
 
well, that's clearly not correct, since it's easy to say "It would count the number in the enumeration", and it's less obvious as to why you'd ever actually want to do that.
 
Ell
I think reflection is very useful
for serialisation
 
that's pretty much the only use case anyone ever quotes.
 
Come on, not all of those stars should've vanished. :F
 
i did star them all
 
4:17 PM
not twice
that's for sure
 
Ell
@deadmg its still a use case though
also it would be useful for the visitor pattern
 
@Ell Yes, but do I need to serialize so goddamn many enumerations that I absolutely must have a core language feature for this purpose?
 
hi
 
4:18 PM
@JohannesSchaub-litb not starring!
2
 
@DeadMG to use that value at runtime for something (like allocating memory for every possible type of something) or displaying possible values in UI
 
Displaying possible values in UI?
 
Ell
Well I think for c++ its pretty difficult to put in, but for a new language I would see no reason to not put it in
 
black_car is a great way to put shit in a UI.
 
@R.MartinhoFernandes yep. Imagine I have, say,
 
Ell
4:19 PM
Wil you have compile/runtime reflection in wide?
 
English is not written with C++ identifier rules.
No other spoken language is, I'm willing to bet.
Not even dead languages like Latin or artificial languages like Klingon.
Please stop making shitty UIs, kthxbye.
 
@BartekBanachewicz what?
 
Usable Interfaces plz
 
52 mins ago, by Bartek Banachewicz
let's play "spot the bug" then
 
@Ell I will have compile-time reflection and I will look into run-time reflection later.
 
4:22 PM
I have a headache.
 
@R.MartinhoFernandes well you could have another thing to map the ids to readable names
 
That has to be written by hand anyway.
 
and use enumerations to restrict some possible values from a bigger set
I am probably making stuff up that doesn't make sense so I'll shut up now
 
what does "Who were we again" mean
 
> The primary purpose of Wide is to enale a migration path from C++. It is intended to embody many of the same principles, without much of the historical baggage.
 
4:23 PM
but I remember needing this "count" thingy multiple times for something
 
> Wide's primary advantage is interoperation with C++.
Can't anybody else spot the irony?
 
well built-in FFI is a different thing
 
it's really not the same as what C++ did with C.
 
I'm not saying it is. I'm just saying it sounds ironic.
 
i don't see the irony
 
4:25 PM
is there a chatroom where I can ask about programming in CL for as400/iseries and/or rpg
 
@Hellovart what
 
im wondering if there is a channel on stackoverflow for as400
 
i think you are sayig that interoperability with things you migrate from is ironic or something
 
4:26 PM
@sehe he he :) I like that
 
Use the tag.
 
yeah ill try that
 
do not ask to ask!
 
i'm pretty dumb didn't think of that
 
A good example of a typical CL command is the Change Program (CHGPGM) command below:

CHGPGM MYPGM OPTIMIZE(*FULL) RMVOBS(*BLKORD *PRCORD) TEXT('My program.')
oh god
it's shouting at me
 
4:27 PM
@Jefffrey How so?
 
Ow, my head.
 
Thakn you very much. But I still have a question. Why I modify my code like yours, it says error, but when I just copy your code and paste, then it will pass the compile. I swear I type the right code! This kind of error really driving me crazy. — Xie 39 mins ago
 
user1804599
@Jefffrey using magic.
 
4:29 PM
^ Gets more and more atonal, sort of. Was cleaner some years ago but still nice.
Oh, "atonal": that's YouTUbe playing at the same time. Hm.
 
@DeadMG I bet C++ primary advantage when it first came out was interoperation with C. Which in turn became its main disadvantage. And you are trying to fix that, by adding interoperation with C++. I know it's different because you have to use the cpp function(?) and it's not directly embedded into Wide, but still...
 
@Jefffrey there's no "but still"
 
@BartekBanachewicz you know CL?
 
@Jefffrey There's no such thing as "but still", it's just totally different.
 
4:30 PM
@Hellovart I don't. I copied it from wikipedia
 
@Jefffrey the sepeation is key. How often are you inconvenienced by the fact that C++ supports assembly?
 
damnit
 
"but still..." it's a funny symmetry
 
The C++ is leaking anyway.
2
 
well, it's not really symmetrical act all because it's totally different.
 
4:31 PM
BTW @R.M how are we gonna decide if we do it on 22nd or 23rd? So far everyone is free on both
 
@R.MartinhoFernandes How so?
 
@BartekBanachewicz Dunno. Don't want to think about it. Splitting headache.
 
@DeadMG the whole interoperational thing is symmetrical. Not how you implement it.
 
C# is interoperable with C, but there's nothing ironic about that.
or even symmetrical.
C++'s issues relating to how it chose to handle C interoperation are specific to the implementation.
nobody who uses a different implementation will run into the same issues.
 
@DeadMG because C# does not claim its goal is to move away from the C baggage?
 
4:33 PM
well, it clearly is a quite separate and different language in pretty much all cases except C interoperation.
so whether they state it or not, that is what they have done.
 
> The primary purpose of Wide is to enable a migration path from C++. It is intended to embody many of the same principles, without much of the historical baggage.
 
@R.MartinhoFernandes take a break from the PC for half an hour and take some pill
 
> Wide's primary advantage is interoperation with C++.
 
Yay! Saints 2-2 Stoke, and pundits 'You can't see a winner at St Mary's. Both sides are struggling to create with defences well on top.' I've a bet on the draw - in 15 min, I should be £68 and change better off:)
 
these two phrases sounds ironic to me
that's all
 
4:35 PM
@Jefffrey they don't.
 
they're not ironic at all.
 
from a "I don't know shit about Wide" point of view
 
from any point of view.
 
okay then
 
@Jefffrey many of the same principles and without the historical baggage are primarily syntactical
that made more sense before I typed it
I swear
 
SAM
4:36 PM
Higuys!
 
lol
 
SAM
Why a '?' today..?
 
I mean
right now I can't really name any choices I would have made differently if I did not want to be compatible with C++.
 
that'S a good indicator that all the project has failed
 
how so?
 
4:40 PM
i see that a "lord" entry has been added to that doodle vote
because you have no learned stuff. otherwise you would have known what you did wrong
everyone makes mistakes
 
er
 
@JohannesSchaub-litb cleared :v
 
wat
 
Ell
He doesn't mean wrt mistakes
 
maybe I did make a mistake, it just wasn't because I wanted to be compatible with C++.
 
Ell
4:41 PM
he means if his goals were changed
 
@BartekBanachewicz nice, quick
 
and maybe the fixed version is still compatible with C++.
 
@Ell this
 
Ell
Did you ever come on mumble, Jefffrey?
 
yes, at 3am this morning
 
Ell
4:43 PM
Aww I was asleep by then
I want a game jam!
 
you'll have to wait two weeks it seems
unless you want to start grinding old CDs into paste and spreading them on toast.
 
Don't give him ideas.
 
Ell
Heh
 
i've recently started mixing up milk to foam and putting them onto toast :)
tasty
 
Is it okay to use a raw pointer in the iterator, if my collection uses unique_ptr internally?
hm that sounds like an SO question
 
4:46 PM
sounds like unique_ptr is the wrong choice, i would then go with shared_ptr
 
@JohannesSchaub-litb hmm, not necessarily
@BartekBanachewicz yeah, why not
 
@JohannesSchaub-litb I think that I'd rather break iterators on incorrect usage
 
@BartekBanachewicz Yep.
typically, iterators are non-owning and you'd want them to break if the container is destructed and then the user attempts to access them.
AFAIK the only reason to share ownership of anything between container and iterator is for debug iterator validation.
 
then the better choice would seem to be weak-ptr + shared_ptr no?
with unique_ptr + raw pointer he can't detect the breakage
 
er, no, why would you do that instead of using unique_ptr?
@JohannesSchaub-litb Which is just fine for the typical iterator.
you only want to spend cycles detecting it for debug iterators.
 
4:49 PM
@JohannesSchaub-litb so that iterators (elements of the collection) can outlive the collection?
 
i agree with you
@Jefffrey i disagree with you
 
... okay.
 
what @DeadMG says sounds most sensible
 
that sounds interesting too
> Technically, the C++ standard places almost no requirements on a default-constructed iterator, so if
we were really concerned with efficiency, we could’ve written the default constructor to leave m_node
uninitialized.
 
Cat Plus Plus, this add-on is really awesome
 
user1804599
4:51 PM
> libc++abi.dylib: Pure virtual function called!
 
user1804599
loloops?
 
yeah
 
is it true that macos is faster on displaying PDFs than other OSes because macos has the PDF support "built in" into the OS ?
 
@Jefffrey You really don't need that. If you want the elements to stick around, keep the collection around.
 
a friend of me said that
 
4:54 PM
so, another, perhaps a bit more localized question
can I create an abstract base iterator class deriving from iterator base (providing common dereference, for example)
and specify the increment and stuff in derived iterators?
 
@DeadMG yeah, that's my point. I mean, if you use shared_ptr in the iterator, it can happen that if you have an iterator that is "alive" and your collection is "dead", you have a valid pointer to an element of the non-existing-collection (no errors, no nothing), which is not exactly a great idea.
 
@BartekBanachewicz CRTP
 
@JohannesSchaub-litb that's precisely what I'm on about. Could I forward the actual derived type to the facade (templating on the base)?
 
otherwise, if you wanna have virtual functions, you need to use java iterators i guess
 
no virtuals.
 
4:57 PM
like Dude d; while(d.hasNext()) do(d.next());
 
user1804599
Oh.
 
with "alive" = "in scope" and "dead" = "deallocated"
 
user1804599
Pure virtual function called in TBB. How fun.
 
@BartekBanachewicz i have not understood what "to the facade (templating on the base)" means
 
user1804599
Ah. Race condition.
 
user1804599
4:57 PM
Oops.
 
class AbstractIterator :
        public boost::iterator_facade<
            AbstractIterator,   // CRTP
            T,          // Value type
            boost::bidirectional_traversal_tag
        >
    {
        Node* node;
 
we had quite a lot of fun on work when we discovered that qt4.8 has its QThread::sleep function implemented as get system time, add X, sleep until that time has reached
 
@JohannesSchaub-litb could I template this ^ to derive from it?
 
when we had sudden program lockups while changing the system time
 
@BartekBanachewicz of course, why not?
 
4:59 PM
@DeadMG sanity check :)
 
@BartekBanachewicz on what template parameter?
on T ?
sure..
 
on AbstractIterator
 
ah sure again
 
T is just the value type for the whole collection
great.
 
Thank you Stoke, Southampton and Bet365:-)))
 
5:02 PM
@sehe I had to use workaround for g++ 4.8.2
    template< class... Values >
    auto small_set( Values const... values )
        -> Small_set< typename Head_T_< Values... >::T >
    { return { values... }; }
 
user1804599
boost::thread_group is nice.
 
hm, I have another interesting problem, but I'll try to solve this one myself
 
I wish Apple would alter their drivers to warn with an OK/Cancel box when installing an unsupported hardware/software combo. Right now it simply fails altogeather
wait, frick. I was trying to install x64 drivers on an x86 OS. Nevermind preceeding comment.
 
5:19 PM
uh, it doesn't seem to work
dang it why
error C2039: 'dereference' : is not a member of 'Collection<int>::RegularOrderIterator' c:\dev\boost_1_55_0\boost\iterator\itera‌​tor_facade.hpp:514
 
clang it why?
 
dang != clang lol
 
i think we may be into keming here
 
@BartekBanachewicz I get it now.
 
like, kemingham and ritchie
 
5:22 PM
@BartekBanachewicz Iterator Facade? That reminds me of a joke: What's worse than a Design Pattern? Two Design Patterns combined.
 
@FredOverflow this one is not a DP though
 
It sure sounds like one though.
 
it's just a helper to aid you in writing iterators
but apparently my evil plan won't work which is huge suckage
@LightnessRacesinOrbit you found the bug? :)
 
  template <class Facade>
  static typename Facade::reference dereference(Facade const& f)
  {
      return f.dereference();
  }
 
5:24 PM
why not make that an operator*
 
@Cheersandhth.-Alf because it creates one for me
 
is it just me or is this documentation very unclear? github.com/maksimr/vim-jsbeautify
 
@BartekBanachewicz no
@Crowz it's not just you
 
I hate googling things to find out how something works ._.
 
user1804599
Should I feel bad if I use std::uintptr_t?
 
5:36 PM
@rightfold What is that? A pointer to an unsigned int?
 
user1804599
@FredOverflow It is an integer type that can be cast to and from pointer.
 
@FredOverflow Why would it be that?
 
user1804599
I use it to represent literals in Styx bytecode.
 
user1804599
std::uintptr_t addr;
std::memcpy(&addr, ip(), sizeof(addr));
ip() += sizeof(addr);
auto& symbol = *reinterpret_cast<symbol*>(addr);
 
2
A: Using intptr_t instead of void*?

PerryNo, you can't be guaranteed that any particular type is a reasonable way of storing both pointers and integers, and besides, it makes your code confusing. There is a better way. If you want to store an integer and a pointer in the same object, the clean and portable method is to use a union, vis...

Is this bullshit? I forget.
i.e. do int and void* have a common initial subsequence?
 
user1804599
5:39 PM
> libc++abi.dylib: libc++abi.dylib: libc++abi.dylib: libc++abi.dylib: terminatingterminatingterminatingterminating
 
user1804599
Dat race condition.
 
@LightnessRacesinOrbit what do you mean by "initial subsequence"?
 
@Jefffrey there is an exception to the normal union rules allowing simultaneous storage in more than one member, but only for some cases
 
hmm
 
Ell
@lightness because its unit with ptr_t appended, like uint32_t is the type of uint32, a unitptr_t would be the type of a pointer to a unit
 
5:43 PM
@Ell Er... no.
 
@Ell you never heard of intptr_t then
 
Ell
Well if you've never heard of it then that's the first thing youd think of right?
 
I agree that it's kind of logical
but you run into the immediate problem that different uint types would have different uintptr types, and they don't.
there's only one uintptr_t.
 
@Ell It's uint, not unit.
 
but no such thing as uint- they're a family of types, not one single type.
 
5:46 PM
uint
unit
 
Ell
Also just realised i type unit instead of uint
 
See the difference?
 
Ell
Auto correct :P
 
auto correct = FAIL;
 
Ell
@deadmg well I would assume a uint is an unsigned int
 
5:48 PM
> error: 'FAIL' was not declared in this scope
 
[H:\]
> fail
'fail' is not recognized as an internal or external command,
operable program or batch file.

[H:\]
> _
^ Failure is just not an option.
 
@rightfold what does it "do"?
 
user1804599
@sehe exception-safe thread collection.
 
Ubuntu has many more options:
sehe@desktop:~$ fail
No command 'fail' found, did you mean:
 Command 'mail' from package 'mailutils' (universe)
 Command 'fal' from package 'dnet-progs' (universe)
 Command 'fai' from package 'fai-client' (universe)
 Command 'qail' from package 'qmail' (universe)
 Command 'tail' from package 'coreutils' (main)
 Command 'sail' from package 'bsdgames' (universe)
fail: command not found
sehe@desktop:~$
 
user1804599
HOERA.
 
5:52 PM
it seems there's a new "lord" entry in that doodle list
 
@rightfold So basically it's the thing that you were doing manually earlier (std::vector<std::thread>)?
 
@rightfold And I thought threads would become extinct in the year 2014.
 
user1804599
Now I can write compiler.
 
user1804599
@sehe Yeah, but without the exception-unsafety.
 
5:53 PM
mmm? I thought that was what you were fixing right there. ISTR.
Anyhoops, what /kind/ of exception safety do you mean? (ctro/dtor or even any exceptions thrown in the thread?)
 
I have an "Office 2013" cd key, but no cd, and downloading it is harder than I expected. I also don't know what version the key is for
 
I guess
 
user1804599
@sehe thread creation fails but existing threads not joined in dtor because dtor not invoked.
 
that if the constructing function was pure and not too expensive, then you could support wait-free lazy init.
 
user1804599
Well, let’s add integers first.
 
user1804599
6:00 PM
And then spawning of threads.
 
@chris it's getting lots of matches requiring /equally bad/ implicit conversions. Welcome to C++ hell :) — sehe 4 secs ago
@rightfold Yeah, you know, that's what I told you back then. You still need to join joinables even if the constructor experiences exceptions :/ I have a vivid recollection of this
 
Thanks a lot you scumbag childish troll.
 
user1804599
Yay.
 
user1804599
Integer addition works.
 
@R.MartinhoFernandes Who, me?
Jan 10 at 22:12, by sehe
And if you do this in a constructor, be sure to join the threads that had been created and swallow exceptions on joining. Yup.
^ That one. Actually I said it immediately after you introduced chat.stackoverflow.com/transcript/message/14001464#14001464
@chris It would suck a lot harder if it wasn't conforming to the language specs... — sehe 4 secs ago
@chris remember - operator>> is just a function! You can define void operator>>(std::ostream const&, int) {} just fine... — sehe 4 secs ago
ITT @chris not really getting it :)
 
user1804599
6:16 PM
I think it is time to implement a garbage collector.
 
user1804599
new sucks.
 
Feb 8, 2014 7:03 PM
Participation of Xeo has been deleted.
Feb 8, 2014 7:03 PM
Participation of Martin James has been deleted.
Feb 8, 2014 7:03 PM
Participation of Jefffrey has been deleted.
Feb 8, 2014 7:04 PM
Participation of lord has been deleted.
Feb 8, 2014 7:04 PM
Participation of Bartek has been deleted.
Feb 8, 2014 7:04 PM
Participation of edemartel has been deleted.
Feb 8, 2014 7:04 PM
Participation of rightfold has been deleted.
Feb 8, 2014 7:16 PM
Participation of woof has been changed.
Not funny.
 
user1804599
Ugh.
 
@R.MartinhoFernandes ??
 
… I thought the whole day that the new Olympics logo was intentional.
 
6:24 PM
@Borgleader Someone went through doodle.com/qs9y26zfcyunw998 acting like a six-year-old.
 
@R.MartinhoFernandes not to mention someone screwed up the remaining ones too
on 22 and 23 everybody were available
 
I know. I have a screenshot.
There's someone in particular that I'm suspicious of, but being public, it could have been anyone.
 
vlad?
 
Oh, thanks for trying to fix it. But we really don't need it now.
It's quite clear when it should take place.
 
6:39 PM
can't you protect it with a password?
 
Passwords don't protect things :/ Especially not when shared
 
@sehe void?
 
or especially when the password would be shared in the same place where they got the link in the first place
 
@R.MartinhoFernandes gah really -.-
 
6:48 PM
@Ell halp. I did the tutorial bit and I get an infinite loading screen after the "escape to tamriel" thing :/
when I eventually give up and log in again, I spawn in the prison thing in mid-air and fall to my death :E
 
alright... can someone inform me of how to make this NOT use pointers?
 
#define * ABORT()
 
it has a method signature like doStuff(long a, long b, long &output_a, long &output_b); and it seems to set output_a and output_b in in the method
 
refactor the method so it's not like that.
 
I see no pointers
 
6:54 PM
yeah I just don't get these "output parameters". Are they actually necessary? What is the easy work around?
 
return stuff?
 

« first day (1211 days earlier)      last day (3753 days later) »