« first day (1623 days earlier)      last day (3308 days later) » 

11:00 AM
@райтфолд I guess...
well... no
 
hmm... maybe
both kinda make sense
 
user1804599
No, it should be a function echo.
 
user1804599
In Mill you'll be able to embed sh code and interpolate expressions, like this:
 
user1804599
let greeting = "Hello";
io::writeln([sh(capture: stdout)| echo "#{greeting}, $(whoami)"'!' |]);
 
11:03 AM
@thecoshman not bad
@райтфолд except that it's not reliable with stdin/stdout!
 
@райтфолд oh God
 
user1804599
@sehe I want to communicate with a subprocess.
 
3
Q: Strange exception throw - assign: Operation not permitted

darennI want to do asynchronous read from cin therefore I have a piece of code client.h ... boost::asio::posix::stream_descriptor input; boost::asio::streambuf input_buffer client.cpp Client::Client(int argc, char **argv, boost::asio::io_service &io_service) : tcp_socket(io_service) , udp...

 
user1804599
Classical pipe-fork-dup2-exec machinery.
 
user1804599
Should work fine with Boost.Asio.
 
11:04 AM
Yes it will
 
user1804599
@Griwes hey at least it's a library feature :P
 
Just good to be aware of the fact that it will not work with regular files
 
user1804599
@sehe No, I use Boost.Asio file APIs for that.
 
user1804599
They do async file I/O on a separate thread.
 
user1804599
Or was that libuv?
 
user1804599
11:06 AM
I don't know anymore.
 
@райтфолд it seems so
@райтфолд You're getting old, buddy
 
@BartekBanachewicz GHC 7.10 is not a problem I guess.
 
It's a solution.
 
@Jefffrey great. So both users said yes :D
it's nice to be able to contact 100% of your users
 
lol
 
user1804599
11:13 AM
@sehe what if the process dup2s stdout to file?
 
user1804599
Wait.
 
user1804599
That won't affect my process lol.
 
user1804599
Original stdout will be closed.
 
0
A: delete[] an array of objects

TamasI disable one core of the core 2 duo. Since than it does not crash. But why? I use mingw32.

what the...?
 
user1804599
@FredOverflow But why?
 
11:17 AM
obvious troll is obvious
 
@BartekBanachewicz What is Hate?
 
user1804599
Also downvoted top answer for using new[].
 
user1804599
wtf am I doing with my keyboard
 
@райтфолд WTF are you doing in general?
 
11:24 AM
No! Don't use std::vector blindly as a substitute for arrays! That's like saying "I have a transportation need, so I'll use a car." Sometimes it's the right answer, but sometimes you need to go next door, and sometimes you need to go from Montreal to Moscow. In many cases where an array is close to the right answer but you want a standard-library, std::valarray is what you want. And in many cases an array is, in fact, the right answer. — Brooks Moses Mar 21 '10 at 5:53
 
@Jefffrey oh hi Jefffrey
 
@Jefffrey Oh, is that Interstellar movie worth watching?
 
user1804599
@wilx I downvote all answers that demonstrate new[] and delete[] when the question isn't about language lawyering.
 
Hi
@FredOverflow Yes
 
11:25 AM
I really find it hard to remember to take a pill each day :\
Even harder to remember if I've even done it in one day
 
@thecoshman You need the pill...case (?) with small compartments for each day.
 
Google might reveal some tricks to help you remember.
 
user1804599
And "I can't use std::vector<T>" questions are too localized but for some idiotic reason that closing reason was removed from the system.
 
@FredOverflow 2010
 
@wilx I'll only forget to fill it up
 
11:27 AM
I like your edit, @райтфолд
 
it's only allergy tabs, so no big deal
 
user1804599
@sehe Thanks, me too.
 
@FredOverflow sounds a bit painful
 
@FredOverflow much death
 
user1804599
11:28 AM
symphonic black metal
 
user1804599
it's nice
 
user1804599
Alright, go parameters are my greatest invention ever.
 
@wilx It's @BartekBanachewicz haskell game engine, I think.
 
@Nooble aka shite :P
@райтфолд I did it first
 
@wilx my graphics framework
 
11:30 AM
@райтфолд Symphonic Epic Hollywood Metal
 
@thecoshman lmao
 
@BartekBanachewicz Hmm, I know nothing about graphics. I thought I could fork it and release improved version named "Burning Hate" :D
 
user1804599
I should implement that.
 
No! Don't use std::vector blindly as a substitute for arrays! That's like saying "I have a transportation need, so I'll use a car." Sometimes it's the right answer, but sometimes you need to go next door, and sometimes you need to go from Montreal to Moscow. In many cases where an array is close to the right answer but you want a standard-library, std::valarray is what you want. And in many cases an array is, in fact, the right answer. — Brooks Moses Mar 21 '10 at 5:53
 
11:33 AM
@Jefffrey That sounds off to me.
 
@BartekBanachewicz what about the aesthetics though?
 
> know nothing
> improved version
hm hm
 
@BartekBanachewicz Hence the past tense "thought I could." Also, joke.
 
@BartekBanachewicz I can't find it.
It seems it's buried below all the broken hearts and anguish C++ has caused people.
But seriously where is it?
 
0
A: Ban LMGTFY (let me google that for you) links

Lightness Races in OrbitYour question may be summarised thus: I knew that I shouldn't have posted the question, but I posted it anyway, because I wanted a quick solution to my problem with no regard for the value of anyone else's time. Then someone pointed out that I shouldn't have done so. I found that "rude a...

tough love of the day
 
11:36 AM
@райтфолд That... is not exactly readable.
 
user1804599
@R.MartinhoFernandes a flight from Rotterdam to Warsaw is cheaper than a train ticket from Roosendaal to Amsterdam.
 
His face reminds me of meat
 
Hm...
Are smart pointers and object pools doable together?
I once tried to create a mini GUI framework with the factory method and kept the pooling closed and private but still...
There has to be a better way of doing such a thing.
 
@Cinch find what, Hate?
 
@BartekBanachewicz YEah.
 
@R.MartinhoFernandes I thought they were gonna talk about how to compare and put the nuggets in order :(
 
@Mgetz It's just windows being windows.
 
@BartekBanachewicz Oh I get it.
But it's Haskell? Kinky.
 
11:51 AM
@khajvah no it's not, it's idiots being idiots and not running updates on the second Tuesday of the month as they should have
 
Cool!
 
@Mgetz Dude, it is not supposed to do stuff without you telling it to do.
 
user1804599
@Mgetz lol
 
> [Update 7pm CT:] Siedel did not say that the laptop would be replaced by an Apple laptop.
lol
 
@khajvah They tried that once. Users are idiot. So they have to force it now.
 
11:53 AM
@khajvah really so I should have to tell it to switch programs in the background, and to communicate with each device myself?
 
@khajvah It is. According to MS :)
 
it's called an Operating System for a reason
 
user1804599
@EtiennedeMartel Or rather, update in the background and don't require reboots, like any sane OS.
 
@райтфолд coming allegedly in win 10
 
@khajvah Telling it to automatically install updates counts as telling it to do that, no?
 
11:54 AM
@Mgetz not there yet, though.
 
user1804599
Fuck reboots.
 
@melak47 it's not like that's completely trivial, even linux can't do it without ksplice
 
@R.MartinhoFernandes Except, it doesn't ask, it just does whatever it wants by default
 
@khajvah Except, it does.
 
So, from what I can gather, every Dutch person travels on a bike, wears clogs and plants fields of tulips.
 
11:55 AM
@Mgetz well, they could just take the easy way out and NOT FORCE A REBOOT after preparing the update.
 
@khajvah Keep that in mind next time you install it.
 
@khajvah Accepting the defaults is a choice.
 
@R.MartinhoFernandes Yeah, sure. It says, I am gonna update in 10 minutes if you don't prevent me of doing it.
 
@melak47 so they should just let you keep running around with your pants down with a sign that says 'RAPE ME' on your back?
 
Are we seriously talking about Hockey Windows updates in Lounge?
 
11:56 AM
it's not like they don't give you the option to delay
 
@Cinch I am not writing hobby C++ anymore.
 
@Mgetz how long do you go without rebooting? Most I've done is a month, on my laptop where I hibernate a lot...
 
@khajvah I didn't mean that, but those warnings are days earlier.
 
@khajvah Windows' philosophy is that you can't trust your users with their own security.
 
@BartekBanachewicz Oh I see.
Why not work with Pygame or something then?
 
11:56 AM
@melak47 I update on update tuesday, so yes about a month
but I know when and how I'll reboot
 
@райтфолд if the question reads "deleting an array" - you don't have to be smoking a lot of weed to answer it as such. Maybe you should get your weed from the shop that jamesdin goes to :) — sehe 39 secs ago
 
user1804599
They are related. — kingsmasher1 40 secs ago
 
@EtiennedeMartel That's fair enough, considering how many idiots use it
 
@EtiennedeMartel s/plants/smokes/
 
@melak47 There was no forced reboot, btw. Well, there was, but it was done by the users.
@khajvah It's fair enough considering they have users.
 
11:58 AM
@sehe Oh, so that's what coffee shops are about.
 
@R.MartinhoFernandes "An update is going to be installed at 00:00, reboot now or save your work?"
 
@melak47 Did you even read the story?
 
what story :/
 
lol
 
Guess that's a no.
 
11:59 AM
Windows.
 
@Cinch Why would I work with Pygame or something?
 
@BartekBanachewicz idk you have Hate over here idk
 
@Cinch yes I wrote it
if my goal was to write a framework, using a ready-made one hardly meets it
 
What I meant was to contribute to it but nvm
 
Morning
 
12:00 PM
But I guess most contributing is pretty much maintenance.
 
I see no point in contributing to a game framework I'm probably never going to use
 
@AndyProwl Morning
 
user1804599
> I wanted to execute a string
 
Python is dynamically typed and hence rather uninteresting.
Love2D meets all my prototyping needs when it comes to that
 
user1804599
tail "abc" -- execution by decapitation
 
12:00 PM
Question: should pkg-config make its way into MinGW?
 
@райтфолд Grrr, death penalty.
 
@BartekBanachewicz Fuckin this
 
okay I am getting some weird results here. ideone.com/nb8DlP
 
@R.MartinhoFernandes hmph, well I guess if you set updates to automatic, and then unexpectedly reboot, you get stuck with the updates installing :p
 
user1804599
I don't mind dynamic typing. I mind lack of specification and checks.
 
12:01 PM
@Cinch MinGW is a compiler collection. If you want a package manager use MSYS or Cygwin
 
user1804599
(Which is also commonplace in Python.)
 
Ah... I see.
 
@BartekBanachewicz pkg-config is not a package manager.
 
Python is a pretty language but idk whether it's really... good?
 
@Cinch Normative, rejected
 
12:03 PM
Obviously it is but I've been stuck in C++-world for the past year.
 
Python is really good as a dynamic language
 
@khajvah Does it have support for static?
 
@Cinch It gets shit done.
 
@Cinch Not as much static as your contribute to this chat
 
Le zing.
 
12:04 PM
@Cinch support?
 
> your contribute
 
@Cinch Nah, it's totally evil.
 
@khajvah Yeah I just Googled it and at face value it doesn't seem to have a formal typing system or framework to use.
 
@Cinch It's made by a Dutch guy, so no.
 
@Cinch or what
 
12:05 PM
it is using duck-typing, if that is what you want
 
@Cinch why don't you try and form your own opinion
 
@Cinch "formal type system"? "framework"?
 
@BartekBanachewicz Because I'm focusing on other stuff and asking questions from other people for direction on future thoughts.
For example, I'm fixing a bit of libRocket.
 
I don't think this conversation is going to help you in future.
 
@Cinch so you think asking a question on the internet chat can give you a valuable answer to a question of "is a language good" in 5 minutes
 
user1804599
12:08 PM
Fuck dynamic duck typing.
 
@BartekBanachewicz No, obviously Python is good. I'm just asking about static typing.
 
@райтфолд It is interesting sometimes.
 
user1804599
Static duck typing is nice.
 
@Cinch it's dynamically typed
it has some static typing extensions that aren't widely used
 
@BartekBanachewicz Ah I see.
 
12:10 PM
it has some support for strong typing though
inb4 ambiguous terminology
 
I don't know which to go with.
 
damn
I really need a higher dose
 
user1804599
It has Booleanness for non-Booleans.
 
user1804599
Fuck Python.
 
I'm trying to choose a scripting language to become my dev langauge.
 
12:10 PM
lol scripting language
 
user1804599
Just wait for Mill.
 
As in I'll write a base framework in C++ and then bind to Lua or Python.
 
user1804599
Try Elixir.
 
user1804599
Elixir is very nice.
 
@райтфолд Interesting.
The microthreading or whatever seems attractive.
 
12:12 PM
@Cinch You just can't go wrong with python.
 
@khajvah Yes, but I was worried because of Boost.Python.
I already have Sol which is a header-only library
 
What about boost.python?
 
Everyone's writing a framework again?
 
@R.MartinhoFernandes No, it's just for education.
 
@Cinch Everybody tries it; nobody produces anything worth the effort.
 
12:14 PM
@Puppy I don't care. I've already learnt so much by doing it I'm not stopping.
 
@R.MartinhoFernandes Only the people not writing their own language
 
@khajvah Boost.Python needs to be compiled which would cause problems the more builds I need to do.
 
user1804599
@Cinch it allows for async I/O with blocking API
 
user1804599
blocking API is the only good API
 
@райтфолд I don't know what "blocking API" really is or why it's good.
I'm gonna guess locks and concurrency
 
12:15 PM
@Cinch Well I have to say that I did a bunch of similarly stupid things when I started out.
the main benefit I derived from it was learning that they were, in fact, stupid.
so all I'm saying is that you could shortcut here if you wanted to.
 
@Puppy Shortcut to what?
 
@Cinch What is that framework supposed to do anyways?
 
What else would you have me do?
 
but I personally learn a lot more from doing myself and whilst I retain the right to be very sarcastic, I totally understand.
@Cinch The end result.
 
@khajvah Oh, I was just going to create a light GUI manager and framework for SFML or something.
 
12:16 PM
the end result of writing a framework in C++ and then exposing it to Lua is that you learn that this is a dumb thing to do
so you could just accept that it's a dumb thing to do and derive all the benefit without having to put in the work.
 
@Puppy But why is it so dumb?
 
because
it's a tremendous amount of shitting around and you don't really gain anything in the end.
 
@Cinch You mean yes, then.
 
Lua and Python are fine for 200-line scripts, but actually developing an application in them is a completely separate story.
for example, dynamic typing really doesn't help anything.
 
@Cinch just do it
 
12:18 PM
@Puppy Oh, that wasn't the point.
 
@Puppy Python is good for big projects too, actually.
 
@chmod711telkitty I'm going to do it... Once i have enough time lol
 
I certainly wasted plenty of time in Lua until I realized the source of the bug was the difference between 1 and '1', which a static typing system would have caught immediately.
 
@Puppy lol ===
 
Lua doesn't have === and even if it did, that would not have helped.
 
12:19 PM
@khajvah EVE Online is written in Stackless Python.
 
that... really isn't meaningful.
 
There's a list of good apps that were or are written in Python.
 
that's also not meaningful.
 
?
 
first, you'd have to demonstrate that they are of equal or superior quality to other apps of a similar nature.
 
12:20 PM
How is that not meaningful? Use is a big part of programming languages.
 
and then you'd have to demonstrate that this is because they were written in Python.
as opposed to, say, the devs wrote it in Python because it was hip and now they really wish they hadn't.
adoption by people is a giant mile from being useful, good, or the right thing to do.
 
Python is a very quick dev language from what I hear and quite flexible.
 
Unless the speed is critical, python is ok for anything, really
 
you can't draw a line from "People use Python" to "Python is good"
 
@khajvah Except maybe embedded. But even then that might not bee too bad lol
 
12:21 PM
not that Python isn't good, it's just not good for some kinds of things.
 
@Puppy Well I don't care so much right now.
 
@Puppy like kernel development?
 
Some people say 'I can do xxx, but I have not got around to it'. A lot of the times, I don't think that they can, because they don't have the drive. Talent & knowledge only get you so far, without drive you wouldn't accomplish anything great in your life. Oops, I don't think I should crash their illusion of 'I can do xxx'
 
@chmod711telkitty Yeah I know.
I've done a part of that GUI framework before in SDL and it did work decently.
 
@khajvah Admittedly, Python would probably be a poor choice for developing a kernel in.
 
12:22 PM
But the question is whether there are any Python header-only C++-binds
 
@Puppy What I mean is, python will be fine for almost anything.
 
If not, I'm going with Lua because it's too damn easy to say 'no' to.
 
hmm
I'm not really sure if I prefer Python or Lua for embedding, but Lua's API is tremendously shit.
it's probably the worst API I've ever worked with
 
@Puppy I'm using @Rapptz/Sol, so that's remedied.
 
RIP Lundi
you were my love
 
user1804599
12:26 PM
@Cinch it means you don't have to deal with terribly crap like futures or callbacks.
 
user1804599
Instead, you just use normal return values just like all other APIs.
 
and kitties
 
user1804599
So you have a uniform way of receiving values, which in turn allows for nice generic APIs and algorithms that don't have to be rewritten to work with async I/O.
 
user1804599
Because async I/O is an implementation detail like it should be.
 
asynchronicity isn't really an implementation detail
 
12:28 PM
@райтфолд Interesting.
But is it header-only?
 
Elixir is a language if I recall
not a library.
also, what's the deal with header-only?
 
WTF is this obsession with header-only? (Says the guy that makes everything header-only)
 
inb4 the robot
 
user1804599
@Cinch Elixir is not header-only.
 
Use Biicode~
 
user1804599
12:30 PM
But the Erlang native interface provides headers, if you're into that!
 
I don't really get what void_t buys us
 
@райтфолд Aw.
But yeah, I'm pretty obsessed with header-only.
 
so that its included in the library
 
I think I'll just go ahead with Lua or something.
 
@Veritas What is that?
(It makes a void that is dependent on the given type parameter)
 
12:33 PM
@BartekBanachewicz it's kinda good actually, they're sponsoring lots of conventions here in Italy
 
user1804599
What to implement first, destructors or conditional expressions?
 
user1804599
Wait, destructors require protocols. Fuck that for now.
 
People, a question-- What is the difference between logical address and physical address? (memoryrelated)
 
the italian C++ group is called ++It (italiancpp.org). I collaborate with them sometimes. Such a group should have been founded years ago.. but whatever. At least there's one now.
 
12:35 PM
but it looks kind of useless to me, it only saves maybe a line or two tops.
 
3 mins ago, by R. Martinho Fernandes
(It makes a void that is dependent on the given type parameter)
 
@райтфолд Is this kind of assembly language manual?
 
user1804599
13:37
 
yes I know what it does but it's proposed for template metaprogramming and my point is that it doesn't help that much.
 
@Veritas What's the alternative?
 
12:38 PM
20
A: How does x86 paging work?

Ciro Santilli 六四事件 法轮功Version of this answer with a nice TOC. I will correct any error reported. If you want to make large modifications or add a missing aspect, make them on your own answers to get well deserved rep. Minor edits can be merged directly in. General facts Paging translates linear addresses ( what i...

 
@MarcoA. Grrreat, thank you
 
@khajvah logical addresses are the first step. In x86 bootloaders they are of the form segment selector:offset and operating with them sucks big time.
e.g. real mode only stuff
 
user1804599
@MarcoA. dat answer
 
yep, kinda long.. I had to scroll a lot to get the "share answer" link :D
@khajvah to get to the physical addresses you have to go through segmentation and paging (logical -> linear -> physical)
x86 OSes usually deal with that for you and provide virtual addresses that you can use
 
@R.MartinhoFernandes ideone.com/tYGIjK
 
user1804599
12:41 PM
 
user1804599
ITT NASA can predict the weather for the entire year.
 
user1804599
And my sleep cycle.
 
@Veritas That requires an extra struct, btw.
You want to make your traits inherit from false_type and true_type.
 
@MarcoA. So, shouldn't an address simpy be a number? Why is logical address composed of offset and whatever?
 
They have extra members that are useful.
 
12:43 PM
Good night
 
this makes aliases to std::true_type and std::false_type
 
@Veritas Yes, but it doesn't make a traits type.
 
user1804599
All this stuff reminds me of Ruby's silly crap:
 
user1804599
irb(main):001:0> true.class
=> TrueClass
irb(main):002:0> false.class
=> FalseClass
irb(main):003:0> [true, false].map(&:class).map(&:superclass)
=> [Object, Object]
irb(main):004:0> Boolean
NameError: uninitialized constant Boolean
 
It's not good enough for a public interface.
It also has a lot more boilerplate, so I don't know why you would prefer it. More boilerplate, less features?
 
12:46 PM
@khajvah It is just a number.
half the point of virtual addresses is that they're a simple flat address space.
 
user1804599
btw pups what are address spaces in LLVM? I couldn't find any documentation on them. Are they for GPU/Harvard stuff?
 
essentially
you won't need them if you're generating just CPU-side ccode.
 
user1804599
Nice.
 
I think they may also have some uses in kernelspace or something
 
the boilerplate is like 2 lines and the solution is general. On the other hand try to use void_t for variadic traits like have_common_type
 
12:48 PM
@Puppy One more question: when you are doing assembly programming, are the addresses that you see, actually logical(or virtual) addresses?
 
yes.
all userspace code uses virtual addresses.
on relevant hardware, of course.
 
ok, thanks, I think I got it
 
@khajvah old stuff, segmentation used to work with a selector and offset. And the maximum amount of contiguous memory was 64k (otherwise you'd need to change the segment registers)
 
@Veritas Er. template <typename...> void_t {}?
 
at least for old processors
 
12:49 PM
I mean in usage
 
you don't have to know or care about segments or segmentation anymore.
 
void_t<thingy...>?
 
I don't know other history details but backward compatibility is a nasty business
 
@Puppy So, the MMU directly maps logical address physical ones?
 
not exactly
 
12:50 PM
Not what I am saying. How would you use void_t for a variadic trait?
 
effectively, the OS can make a virtual address map to pretty much anything it wants.
 
1 min ago, by R. Martinho Fernandes
void_t<thingy...>?
 
registers, I/O, the memory space of other hardware devices, etc.
there's no guarantee that a logical address has an associated physical address.
 
@khajvah en.wikipedia.org/wiki/… might also help
 
user1804599
Indirection solves all problems1
 
12:51 PM
yea I know how to unpack argument packs. Still not my point.
 
@Puppy Interesting, but my question was about the segmentation/paging unit. They are both part of the MMU right?
 
yep
but the OS manages the page tables and also has interrupts for page faults, so it can basically make it do whatever it wants.
the hardware only directly handles the pretty common case of virtual address -> physical memory address
 
I see, thanks a lot
 
user1804599
Thanks, Alot!
 
as for creating a new struct:

template <typename T>
struct has_member_type : decltype(has_member_type_impl::snifae<T>(nullptr) {};
 
12:54 PM
that Alot wanker sure gets thanked for my work often
 
@Veritas Yeah, that's similar to what I do.
 
user1804599
Maybe I should fix my JIT first.
 
user1804599
So that it actually works on all subroutines.
 
@Veritas Oh, I see.
 
@райтфолд use Visual Basic 6.0 error handling model: On Error Resume Next
 
user1804599
12:56 PM
No.
 
user1804599
Exceptions master race.
 
Now that you mention it, that might be why I didn't pick up that style. Don't quite remember.
 

« first day (1623 days earlier)      last day (3308 days later) »