« first day (1431 days earlier)      last day (3516 days later) » 

9:00 PM
@BartekBanachewicz See? You have the exact same state here. You use the most recently defined function name when creating your Assignment AST node.
 
@Puppy but... yeah, but...
 
@JerryCoffin Your dangling clause is awful :Þ
 
I could write it as simple function chain
 
the only difference is that the most recently used access specifier/whatever isn't right there in the grammar for the parser to know you need it.
 
I think it's a pretty substantial difference
internal state used inside of the function doesn't make it stateful
used outside though...
 
9:01 PM
@LucDanton If you don't want a yes/no answer, don't ask a question to which one would be a complete answer. :-)
 
right, but it's not a stateful function just because you pass an extra argument to it.
 
@JerryCoffin I’m referring to the fact that Icon did not have pattern matching before ML existed (unless I got the wrong Icon). SNOBOL however…
 
@Puppy I find comparing my approach to yours rather hard, TBH
each of those functions is stateless.
they represent a monadic parser computation
 
@BartekBanachewicz It's kinda difficult to know what the ramifications are of using that approach when the grammar you're parsing was intentionally designed to be parsed by utter simpletons.
and by that I don't mean you, I mean, strictly LL-only mechanical parsers.
 
@Puppy yeah, I know that Lua is simple; I ultimately would like to do it for Haskell, but I figured I better start simple
I'm pretty new to this language construction thing
 
9:04 PM
well, parsing is a pretty trivial part of it
 
I ultimately want a completely different execution model from original Lua though
 
how do you mean#
 
@LucDanton No, Icon (per se) didn't. The Icon/SNOBOL languages were developed (more or less) in parallel with the ML/Haskell family. Icon predates Haskell, but not ML. SNOBOL dates back to something like 1961 though...
 
@Puppy Original Lua is based on a mutable register VM. I want a completely pure, transparent implementation (even if that means not having some functionality (like actual IO from Lua))
 
user1804599
Yay I got something working! ideone.com/9ShI1G
6
 
9:06 PM
I don't think the mutable register thing is really that critical
it's a VM implementation detail.
 
I am not sure.
 
LLVM doesn't have mutable registers either.
LLVM IR is SSA-form.
 
user3010322
SSA-form ?
 
user1804599
Stack-based VM is easy to implement in Haskell.
 
9:08 PM
single static assignment.
 
@ThePhD single static assignment
 
LLVM IR is SSA, but you still see mutable variables in most languages built on it
 
they have a mutable memory model
 
I would need to learn more about it
 
9:09 PM
then an optimization pass to move alloca'd values into registers if possible
 
thankfully it will take some until I reach this point
 
not really thankfully.
you should move on to semantics and code generation right away, even if it's only for some simple constructs.
like I said, parsing is pretty trivial.
 
@Puppy You seem pretty sure about that. Why is this important?
 
user1804599
I think I will write my compiler in Scala.
 
@BartekBanachewicz Because it's the part that's actually remotely difficult.
 
9:10 PM
Also my parser apparently can't parse function calls :D
@Puppy welp
 
although Lua is, of course, a pretty simple language in every respect, including semantics.
 
but to put things in perspective
Wide has 500 lines of lexer, 1250 lines of parser, 11,500 lines of analyzer, and half a million lines of LLVM as code generator
 
user1804599
@BartekBanachewicz I am disappoint.
 
@ThePhD I wonder what the use would be
 
user1804599
9:14 PM
Hmm. If I use both PCRE and ICU, will I have the Unicode database twice in my program? :v
 
user3010322
@sehe To basically share all the data ever.
 
That makes zero sense
You can share all the data ever by linking ~/WinHome your windows $HOME just the same (and vice versa)
 
--screw it, do it live
fromRight :: Either a b -> b
fromRight (Right b)= b
you gotta love the original author
@sehe so obviously it was suggested by PhD
 
The point is you can share everything on purpose, no need to do so "accidentally". With the same effort
 
lol apparently he modeled "call" as "assignment to nothing"
what the hell
 
9:20 PM
sounds like an odd AST choice but a valid semantic choice.
 
I think making it separate will make it clearer without much hassle in using it
 
personally I usually make my AST as source-representative as possible.
 
user1804599
 
there are a couple constructs where it's not worth the hassle though
 
@rightfold "if me let you help"
 
user1804599
@EtiennedeMartel "for a day of 15 minutes"
 
Ell
is make_array in c++14?
or 11?
 
@rightfold I also write like a college from time to time
 
user1804599
He's extraterrestrial!
 
@BartekBanachewicz I couldn't help but notice that it is basically completely lacking in source location data.
@Ell No.
 
9:22 PM
@Puppy true.
 
@rightfold Also, "write like a graduate college"
TIL that colleges can write.
Also, a college can graduate.
 
Ell
@Puppy well that sucks
 
@Ell Not really.
 
Ell
Why not?
 
@Puppy I'd like to build a semantically aware editor on that. Line numbers aren't very meaningful there.
 
Ell
9:23 PM
I guess I'm supposed to use uniform intiailzetion instead
 
Well, sometimes I am ashamed of my english.
 
you edit functions and modules, not files and lines
 
@BartekBanachewicz You need filename, line, column, and offset, at least so far that I've seen.
 
But I am pretty sure I still speak/write better than whoever wrote the add.
 
@BartekBanachewicz Sure, but the result is viewed in terms of files and lines.
 
Ell
9:24 PM
I think lines are meaningful for sure
 
errors are issued in terms of files and lines, both semantically and parse errors.
 
@Puppy not necessarily
 
Ell
aw man clang can't do #include <array> for me
 
I'd like to experiment with alternative code representations.
 
you still need to support "text file".
 
9:25 PM
as an input to the system, yes.
 
although just for reference
 
after that, it would be stored as an AST
I'd like to version it as an AST too
 
the Wide structures are pretty arbitrary
you can set whatever you want as those values if you're using the API.
 
yay fixed the call parse
all green
 
user1804599
 
user1804599
9:29 PM
dat last sentence.
 
uh oh
I've just realized I parse t[x] as FieldRef (Var "t") (Var "x")
which itsefl isn't that bad, but... t.x is parsed exactly the same :S
 
Xeo
9
A: Can returning a local variable by value in C++11/14 result in the return value being constructed by rvalue when no copy/move is involved?

T.C.The rule for this situation changed between C++11 and C++14. The compiler should treat localB as an rvalue in C++14. The applicable rule for return statements is found in §12.8 [class.copy]/p32, which reads in C++14 (quoting N3936, emphasis mine): When the criteria for elision of a copy/move...

 
and in this case x is not a variable; it's an something expression used to index the table
 
Xeo
This is so great
 
actually it's just a string
 
Xeo
9:35 PM
and now, time to sleep
 
I wish I did backup the right things...
 
well t.x and t["x"] are semantically equivalent so you could be forgiven for parsing them into the same AST.
 
Ell
is there a way to uniform initialize a union?
with a particular member
 
@Puppy no t.x and t[x] though.
 
uniform initialization sucks donkey cock.
@BartekBanachewicz Quite true.
 
9:37 PM
Also @Puppy apparently Parsec is able to provide "SourcePos" automagically.
 
@MohammadAliBaydoun can you have invalid memory in Haskell?
 
it's a predefined type
 
@rightfold Yay I got something working too! coliru.stacked-crooked.com/a/ba3774d587fa796c
 
Bartek is it possible in the sense of likely to have invalid memory in Haskell?
 
> The abstract data type SourcePos represents source positions. It contains the name of the source (i.e. file name), a line number and a column number.
 
user1804599
9:38 PM
@sehe :D
 
it's really lexer-provided
 
@LoïcFaure-Lacroix not if you aren't using low-level primitives
 
but offset into a hypothetical buffer is useful too for editor operations
 
I am not sure how to provide that in the test though :S
 
> BOOST_FUSION_DEFINE_STRUCT(, User, (string,name)(bool,ismoron))
 
9:39 PM
@LoïcFaure-Lacroix did you backup the ring?
 
gotta love that (,
 
I'd need to check how to tell HSpec to ignore some fields
 
@Griwes I was trying to match the terseness. Of course I could have written out the struct + ~3 traits
 
@sehe obviously not but that's not the matter here. I did backup something with games and videos... but most of my code projects are gone
 
@Griwes It's the namespace. I admit, I'll favour
struct User { std::string name; bool ismoron; };
BOOST_FUSION_ADAPT_STRUCT(User, (string,name)(bool,ismoron))
@LoïcFaure-Lacroix I should sell you an Acronis product right now, I fear
 
9:41 PM
damn
hard.
 
Found this funny thing in an old answer i.imgur.com/CNkxFD0.png
 
It seems like a lot of game companies like to develop in c++ why is that ?
 
No idea.
 
@DougRay because reasons
 
9:47 PM
I doubt they like it
 
LOl
 
there's a lot of game companies that develop in Objective-C, C#, JS and Lua too
 
user1804599
@sehe lol
 
user1804599
@BartekBanachewicz Python!
 
I even heard some companies even made games partly in Scheme for the playstation
 
9:48 PM
figured i would ask for fun, python ftw ?
 
user1804599
EVE server is written in Python.
 
Mount'n'Blade is written in Python
 
your written in python !
 
user1804599
Erlang is used for MW2 matchmaking server IIRC.
 
@DougRay your grammar isn't apparently.
 
9:49 PM
Mar 5 '12 at 12:56, by Tony The Lion
@CatPlusPlus when you write "lol", with a capital "L" you are breaking the symmetry of the letters, and it looks ugly. My eyes hurt everytime you write "Lol" instead of "lol" or "LOL".
 
ouch straight to the feelz T_T
 
@BartekBanachewicz his mom is his grammar
 
@DougRay Game programmers are idiots.
 
Wait. That didn't work. I don't know how to mom joke
 
ah sweet.
There's just getPosition I can use to obtain the position
creating a source-annotated AST should be fairly easy @Puppy
 
9:51 PM
@sehe Your momma doesn't know how to mom joke.
 
I'm pretty sure she doesn't
 
which still doesn't solve my problem of specifying the test :S
 
user1804599
Your mom is a mom.
 
@BartekBanachewicz I don't.
 
ah great
shouldSatisfy
 
9:54 PM
all the Wide tests are end-to-end.
 
end-to-end?
 
from input source file to resulting executable code behaviour.
 
OIC
I think testing smaller components could also be useful
 
honestly I didn't find it to be that great.
 
depending on how hard it would be to test them. Considering that all of my code is pure...
 
9:55 PM
you don't catch bugs where it's the communication between components that doesn't work, instead of any individual component.
not too unlikely between AST modifications and analyzer changes.
and honestly, it's a lot easier to test all components in one go
 
@Puppy both integration tests and unit tests are useful vOv
@Puppy purity is not overrated :)
 
@BartekBanachewicz All of those Wide components are pure.
 
oh well
(from source to AST)
 
the only impure components I have are the drivers
 
 
9:58 PM
Dunno, I'll go with just full tests right now
also thanks chat for transactions ^
 
@sehe I'm waiting for a gif of an elder man scrolling a page
 
haven't found one yet
 
I'm really in a royal fuckup with that table syntax sugar
damn.
 
@AlexM. make one
 
10:00 PM
whom do I film?
 
I think I've made enough progress for today anyway
 
@R.MartinhoFernandes: Fuck you. Ever since you linked me to 3RFTS, I've done nothing but watch it. It's like TVTropes but so much worse.
 
@sehe Now I'm scared. Not only do most of those look familiar, but some of them don't seem old at all...
 
Ell
okay yay I caused a SIGSEGV in the JVM from c++
 
So, apparently one of my chat posts got starred, how to check which one?
 
10:04 PM
 
@JerryCoffin half of them are current style Java L&Fs. ANother is the dominant OSX style, AFAICT
 
Ell
@Nooble the starred posts are on the right
 
@AlexM. an elder
 
Ell
none of them appear to be yours :S
 
Err check show all 32201
Then search my name
 
10:05 PM
it was probably unstarred because it was only starred by accident
 
Having a hard time understanding how my post "I'm in school because I'm school" got starred
No it's there.
Just have to check all of them
*"I'm in school because I'm cool"
 
@Nooble Congratulations, you're now a one-star lounger. Soon to be at least a 3-star C programmer, I'm quite sure.
 
That's a lot of stars.
My expectations can't go that high, I'm afraid.
 
Wow. Running DOOM on... a printer. And by installing it over the internet exploiting a vulnerability. WHOA
7
7 hours ago, by Nooble
I'm in school, because I'm cool.
That's how it's done
 
How do I quote it?
 
10:11 PM
@Nooble Probably want to check on those 3-star C programmers before you decide that's a high expectation.
 
I was kidding...
 
good
nobody should want to be a 3-star C programmer
it's like wanting to be a dishwasher
 
But dishwashers, are cool!
 
Ell
woo my JNI wrapper worked
 
user3010322
:l
 
user3010322
10:22 PM
Library doesn't define any kind of EXPORT macro
 
user3010322
all of its functions are just plain functions
 
user3010322
there's a special hell reserved for project writers like this. :l
 
Ell
what is wrong with that? o.O
 
user3010322
Everything
 
user3010322
Statically Linking is the devil.
 
10:23 PM
Really?
Why...?
 
Why?
 
I like statically linking, this way I don't have to ship with a .dll
 
I prefer static linking
 
user3010322
Because when you work with GPL-like code there's specific exceptions for library linking that only apply when the code is compiled as a separate dynamic library that is not embedded in the actual source itself.
 
and also that EXPORT stuff is only necessary for Windows so many libraries skip it.
 
Ell
10:26 PM
@ThePhD You can still dynamically link it
 
@ThePhD The "devil" here is the GPL-like license, not the static linking.
 
@AlexM. I know it's not what you asked for, but I think it's working well enough :)
 
close enough
 
Was originally going to do something with that stroller :
 
Ell
10:40 PM
@JerryCoffin meh I don't think it's the devil
 
@sehe That's not a stroller. Look at that robe--that's clearly an imperial walker!
 
Ell
While I do think I should have the freedom to remove my freedom
 
Ell
I don't tihnk I should have the freedom to remove freedom from other people's work
 
@AlexM. I hope you appreciate the amount of care that went into selecting a font, making it scale, blur it a bit, wobble it slightly and adding some noise to the signage :)
 
user3010322
10:41 PM
typedef int hb_bool_t;
 
user3010322
Fuck my life.
 
user3010322
All of the "performance warning" things I'm getting.
 
thanks, but I prefer to insert my penis into female humans
 
Yeah. If you're gonna do Hungarian, make it expressive: typedef int phd_bool_t;
@Puppy ew
 
user3010322
@sehe It's not me, it's this library. ;~;
 
10:43 PM
uhuh. for a friend
 
user3010322
Maybe I can change the typedef to bool.
 
user3010322
But what if the author of this library depends on it being an int in places... bleerrrrch. <_>
 
Haha. ThePhD: violating ABI and ODR without qualms
 
user3010322
Does C99 introduce a "bool" type?
 
_Bool
 
10:44 PM
I believe it does define a stdbool.h header
@Puppy Did C99 have that style [sic] already?
 
yes.
 
Ell
there is no way to get a std::function from a function pointer is there?
or a lambda (with captures)
 
you mean, apart from "Just construct it"?
 
Ell
oops. I'm stupid
what I meant was, there's no way to get a function pointer from a std::function is there?
I need to write my own dispatch function I'm p sure
using void* userdata
 
ew
 
Ell
10:46 PM
I'm interfacing with C, it's okay! :D
 
target

obtains a pointer to the stored target of a std::function
(public member function)
not this?
 
NO BAD DON'T BAD BOY DEFINITELY NOT
absolutely not.
target() is a useless function that does nothing like what everyone seems to believe it does.
 
@sehe it looked legit enough for me to think it was a prankster's work IRL :D
 
Hah
@Ell I'm a lumberjack...
 
Ell
haha
 
10:58 PM
Did I say something wrong?...
Did I have a point of view...
Oops. I didn't know I couldn't about night all !
 
Ell
Night :)
 
As an observer from the USA, I wonder if Scotland becomes interdependent, do all of its people also become independent?
 
11:17 PM
Hey guys? There was once a question asked by some 30k rep user about why his Boost.Asio code was segfaulting.
The answer involved the order of declaration of members in one of his classes.
 
user3010322
@Ell Are... you writing a lua wrapper?
 
Does anyone recall this question? I need a link ;_;
 
user3010322
Holy shit.
 
3
Q: Boost.Asio segfault, no idea why

nightcrackerThis is a SSCCE from my Boost.Asio project based on the examples. It took me about an hour to track the bug down to this: #include <boost/bind.hpp> #include <boost/asio.hpp> #include <boost/shared_ptr.hpp> class Connection { public: Connection(boost::asio::io_service& io_service) : socket(...

Found it!
 
user3010322
THis si what Behdad calls "engineering excellence" ?
 
user3010322
11:20 PM
This thing fills my entire screen with all kinds of warnings, even when I turn off the crappy _CRT_SECURE_NO_WARNINGS ones.
 
user3010322
I don't even understand
 
_CRT_SECURE_NO_WARNINGS and its friends are just plain eww
 
how i imagine @AlexM.'s room
 
user3010322
If uses bool in the codebase,
 
user3010322
but when it comes time he defines hb_bool_t as an integer
 
user3010322
11:22 PM
..... whhhhhhhhhhyyyyyyy
 
Can I blame C?
 
doesn't seem like u'd be able to do much with that sewing machine
 
user3010322
I don't know, C has a boolean type
 
user3010322
It's probably ABI compatibility.
 
It didn't always AFAIK
 
user3010322
11:23 PM
Fuckin' damnit.
 
What are the benefits of using std::array over a normal C array?
Can't seem to find anything substantial.
 
@Nooble it's more a question of the reverse
 
user3010322
easily-attained iterators along with the same .data() and .size() analagous to std::vector
 
Thanks, it seems like you have an article for everything :D
 
Haha xD
It's those member functions that are so lovely
 
11:25 PM
is there a standard c++ array size template function?
 
?
 
Does he mean size()?
 
like
 
@Nooble possibly, depends on which sort of array is being used
 
user3010322
std::size_of<std::array<int, 4>>::value; // 4
 
user3010322
11:26 PM
Do you mean that?
 
template <class T, int N> int count_of((T[N])&){return N;}
although i forget the syntax for passing an array by reference
 
user3010322
There should be one.
 
user3010322
I forgot if it's like std::extent
 
user3010322
or something else...
 
Just use sizeof(array) / sizeof(type)
 
11:27 PM
i mean it's a one liner anyways, just forgot if there's a standard name for it
 
and make it some constexpr function
or just use std::array :D
@ThePhD I didn't know there was an std::size_of!
just thought there was sizeof
 
user3010322
Nah.
 
user3010322
I was just making shit up.
 
Ah was gunna say
madness
 
user1646075
@Borgleader yeah the poor thing was having a sads last night, thinks a developing beer gut is disqualification from intimacy.
 
user3010322
11:29 PM
 
user3010322
@CatPlusPlus ^ All the dependencies!
 
user3010322
And thankfully, all the dependencies in my repo too.
 
user3010322
No more reason to cart around a fat Furrovine++.Vendor.zip
 
I'm glad I see someone using the dark color preference too :)
 
user3010322
I have to personally curate and update Harfbuzz
 
user3010322
11:31 PM
Since it's got a bunch of shitty autogen'd stuff from Linux as part of its build cycle.
 
user3010322
But that only happens when they patch something outside of the regular files.
 
user3010322
> This fixes a 13-year old bug.
 
user3010322
Hot damn, Freetype.
 
Those ultrasonic proximity sensors makes it look like Wall-E
 
Ell
@thephd I forgot why you're not using pango?
 
11:40 PM
@ThePhD Sounds like the usual high quality C we have all become accustomed to.
 
user3010322
@Ell Not easy to build under Windows at all.
 
Ell
Doesn't it ship binaries?
 
Why not just compile the source?
 
11:59 PM
@aclarke No, that's being a programmer
 

« first day (1431 days earlier)      last day (3516 days later) »