On Sat, Oct 14, 2017 at 10:16 PM, Ben Bacarisse wrote:
> "Peter J. Holzer" writes:
>> Which probably boils down to the question: Why did providers offer PHP
>> and not Python? One reason might be that at the time no suitable web
>> framework for Python existed (Zope was released in 1999, and I re
On Sat, Oct 14, 2017 at 10:12 PM, Steve D'Aprano
wrote:
> But be reasonable, I had just asked almost exactly the same question not one
> line earlier:
>
> "If it's read-only, how can the compiler write to it?"
>
> and (as far as I can see) *nobody* thought to actually answer my question
> unti
"Peter J. Holzer" writes:
> On 2017-10-13 21:42, Ben Bacarisse wrote:
>> That's one way to put it. Another is that to use Python I need to buy a
>> new service that is already configured.
>
> That's exactly the same for PHP. You can't use that either unless
> somebody configured to server to us
On Sat, 14 Oct 2017 08:26 pm, Peter J. Holzer wrote:
> On 2017-10-14 01:05, Steve D'Aprano wrote:
>> In context, we are talking about a computer program (the compiler) writing
>> data to memory.
>
> No, I don't think so. You keep talking about that, even though Gregory
> hasn't used those exact
On Sat, 14 Oct 2017 11:41:08 +0200, Peter J. Holzer wrote:
> On 2017-10-13 21:42, Ben Bacarisse wrote:
>> That's one way to put it. Another is that to use Python I need to buy
>> a new service that is already configured.
>
> That's exactly the same for PHP. You can't use that either unless
> so
On 2017-10-13 21:42, Ben Bacarisse wrote:
> That's one way to put it. Another is that to use Python I need to buy a
> new service that is already configured.
That's exactly the same for PHP. You can't use that either unless
somebody configured to server to use it.
The difference is that lots of
On 2017-10-14 01:05, Steve D'Aprano wrote:
> On Sat, 14 Oct 2017 07:15 am, Peter J. Holzer wrote:
>> On 2017-10-13 15:11, alister wrote:
>>> On Sat, 14 Oct 2017 01:48:44 +1300, Gregory Ewing wrote:
Steve D'Aprano wrote:
> I wasn't questioning where the data came from, but how the compile
On Sat, Oct 14, 2017 at 2:46 PM, Steve D'Aprano
wrote:
> On Fri, 13 Oct 2017 09:47 pm, Marko Rauhamaa wrote:
>
>> "Peter J. Holzer" :
>>
>>> On 2017-10-13 05:28, Gregory Ewing wrote:
Not only does "byte" not always mean "8 bits", but
"char" isn't always short for "character"...
>>>
>>>
On Fri, 13 Oct 2017 09:47 pm, Marko Rauhamaa wrote:
> "Peter J. Holzer" :
>
>> On 2017-10-13 05:28, Gregory Ewing wrote:
>>> Not only does "byte" not always mean "8 bits", but
>>> "char" isn't always short for "character"...
>>
>> True.
>
> Well, it does, in my universe. That was cast in stone
On 2017-10-14, Gregory Ewing wrote:
>
>> I doubt that either process is in widespread usage any longer as
>> most manufacturers no incorporate a way to update the firmware of a
>> device
>
> Magnetic core technology died out long before that, due to
> inability to build machines that simulated arm
On Sat, 14 Oct 2017 07:04 am, Peter J. Holzer wrote:
> On 2017-10-13 15:28, Steve D'Aprano wrote:
>> On Sat, 14 Oct 2017 01:30 am, Chris Angelico wrote:
It's just a technique, like greying out certain menu options - clicking
them will do nothing, but you won't get an error message and y
On Sat, 14 Oct 2017 01:51 am, Chris Angelico wrote:
> On Sat, Oct 14, 2017 at 1:32 AM, Steve D'Aprano
> wrote:
>> It seems to me that you're not talking about ROM at all, but ordinary RAM.
>> Then what do you mean by "read only"? A block of memory with a flag that
>> says "unprivileged processes
On Sat, 14 Oct 2017 07:15 am, Peter J. Holzer wrote:
> On 2017-10-13 15:11, alister wrote:
>> On Sat, 14 Oct 2017 01:48:44 +1300, Gregory Ewing wrote:
>>> Steve D'Aprano wrote:
I wasn't questioning where the data came from, but how the compiler can
write to READ ONLY MEMORY which might
alister wrote:
in the past for large quantitys the data in a ROM chip was part of the
chip etching mask
I know, I'm considering the masking process to be a kind of
write operation.
The Apollo lunar lander used a magnetic core store that was hard coded at
the time it was "Woven"
I doubt that
Steve D'Aprano wrote:
For example, pressing delete when there is no text to delete should just
silently do nothing.
That's really just a matter of deciding what should count as
an error and what shouldn't. You've decided that "pressing
Delete when there's nothing to delete does nothing" is a
re
Chris Angelico writes:
> On Sat, Oct 14, 2017 at 8:42 AM, Ben Bacarisse wrote:
>> Chris Angelico writes:
>>
>>> On Fri, Oct 13, 2017 at 10:14 AM, Ben Bacarisse
>>> wrote:
Chris Angelico writes:
> I abbreviated that down to nothing, but since you ask, here's a really
> REALLY sim
On Sat, Oct 14, 2017 at 9:02 AM, Grant Edwards
wrote:
> On 2017-10-13, Chris Angelico wrote:
>
> [regarding PHP vs Python capable web-hosting services]
>
>> Thing is, that's exactly the same for both languages these days. You
>> can get cheap (even zero-dollar) hosting that's preconfigured to be
On 2017-10-13, Chris Angelico wrote:
[regarding PHP vs Python capable web-hosting services]
> Thing is, that's exactly the same for both languages these days. You
> can get cheap (even zero-dollar) hosting that's preconfigured to be
> able to support either. There USED to be a difference, and ev
On Sat, Oct 14, 2017 at 8:42 AM, Ben Bacarisse wrote:
> Chris Angelico writes:
>
>> On Fri, Oct 13, 2017 at 10:14 AM, Ben Bacarisse wrote:
>>> Chris Angelico writes:
I abbreviated that down to nothing, but since you ask, here's a really
REALLY simple run-down of how to use Heroku:
>>>
Chris Angelico writes:
> On Fri, Oct 13, 2017 at 10:14 AM, Ben Bacarisse wrote:
>> Chris Angelico writes:
>>> I abbreviated that down to nothing, but since you ask, here's a really
>>> REALLY simple run-down of how to use Heroku:
>>
>> I think I see what you mean now. You meant no configuratio
On 13/10/2017 15:39, Steve D'Aprano wrote:
On Fri, 13 Oct 2017 11:54 pm, Gregory Ewing wrote:
Neil Cerutti wrote:
I can tell at a glance if a parameter is expected to be
modifiable just by looking at the function signature.
The question is why doesn't anyone feel the need to be
able to do th
On 2017-10-13 15:11, alister wrote:
> On Sat, 14 Oct 2017 01:48:44 +1300, Gregory Ewing wrote:
>> Steve D'Aprano wrote:
>>> I wasn't questioning where the data came from, but how the compiler can
>>> write to READ ONLY MEMORY which might not even be in the same continent
>>> as the compiler that g
On Sat, Oct 14, 2017 at 6:32 AM, Peter J. Holzer wrote:
> On 2017-10-13 14:51, Chris Angelico wrote:
>> On Sat, Oct 14, 2017 at 1:32 AM, Steve D'Aprano
>> wrote:
>>> It seems to me that you're not talking about ROM at all, but ordinary RAM.
>>> Then what do you mean by "read only"? A block of mem
On 2017-10-13 15:28, Steve D'Aprano wrote:
> On Sat, 14 Oct 2017 01:30 am, Chris Angelico wrote:
>>> It's just a technique, like greying out certain menu options - clicking
>>> them will do nothing, but you won't get an error message and you don't want
>>> to allow them anyway, risking more seriou
On 2017-10-13 14:51, Chris Angelico wrote:
> On Sat, Oct 14, 2017 at 1:32 AM, Steve D'Aprano
> wrote:
>> It seems to me that you're not talking about ROM at all, but ordinary RAM.
>> Then what do you mean by "read only"? A block of memory with a flag that
>> says "unprivileged processes are prohib
On 2017-10-13, Steve D'Aprano wrote:
> On Fri, 13 Oct 2017 11:54 pm, Gregory Ewing wrote:
>
>> Neil Cerutti wrote:
>>> I can tell at a glance if a parameter is expected to be
>>> modifiable just by looking at the function signature.
>>
>> The question is why doesn't anyone feel the need to be
>>
On Sat, Oct 14, 2017, Gregory Ewing wrote:
>
Message: 5
>Date: Sat, 14 Oct 2017 01:54:49 +1300
>From: Gregory Ewing
>To: python-list@python.org
>Subject: Re: Lies in education [was Re: The "loop and a half"]
>Message-ID:
>Content-Type: text/plain; charset=IS
alister :
> On Sat, 14 Oct 2017 01:48:44 +1300, Gregory Ewing wrote:
>> I thought it would be fairly obvious that by "put it in read-only
>> memory" I meant "arrange for it to be in a location that is read-only
>> at run time". Obviously it can't be read-only at *compile* time, just
>> as a physic
On 13/10/2017 16:33, Steve D'Aprano wrote:
On Sat, 14 Oct 2017 01:30 am, Chris Angelico wrote:
For a novice, seeing 'Segmentation fault (core dumped)' is better?
Better than silently doing nothing? YES. Absolutely it is.
Chris, you forget that for Bart, his user-base is only himself. If he
On Sat, 14 Oct 2017 01:30 am, Chris Angelico wrote:
>> For a novice, seeing 'Segmentation fault (core dumped)' is better?
>
> Better than silently doing nothing? YES. Absolutely it is.
Chris, you forget that for Bart, his user-base is only himself. If he programs
his home-made system to silently
On Sat, 14 Oct 2017 01:30 am, Chris Angelico wrote:
>> It's just a technique, like greying out certain menu options - clicking
>> them will do nothing, but you won't get an error message and you don't want
>> to allow them anyway, risking more serious consequences.
>
> Even there, you often CAN g
On 13/10/2017 15:59, Julien Salort wrote:
Le 12/10/2017 à 17:57, bartc a écrit :
With a const struct, you are stopped from directly modifying elements,
but if an element is a pointer, nothing stops you writing to what the
pointer points to, unless that has a const target too. And then you've
On Sat, 14 Oct 2017 01:48:44 +1300, Gregory Ewing wrote:
> Steve D'Aprano wrote:
>> I wasn't questioning where the data came from, but how the compiler can
>> write to READ ONLY MEMORY which might not even be in the same continent
>> as the compiler that generated the code.
>
> I thought it would
Le 12/10/2017 à 17:57, bartc a écrit :
With a const struct, you are stopped from directly modifying elements,
but if an element is a pointer, nothing stops you writing to what the
pointer points to, unless that has a const target too. And then you've
going to have problems doing normal updates
On Sat, Oct 14, 2017 at 1:32 AM, Steve D'Aprano
wrote:
> It seems to me that you're not talking about ROM at all, but ordinary RAM.
> Then what do you mean by "read only"? A block of memory with a flag that
> says "unprivileged processes are prohibited from writing here"?
>
> (That's also not a rh
On Fri, 13 Oct 2017 11:54 pm, Gregory Ewing wrote:
> Neil Cerutti wrote:
>> I can tell at a glance if a parameter is expected to be
>> modifiable just by looking at the function signature.
>
> The question is why doesn't anyone feel the need to be
> able to do that for Python functions? Whether a
On Fri, 13 Oct 2017 11:48 pm, Gregory Ewing wrote:
> Steve D'Aprano wrote:
>> I wasn't questioning where the data came from, but how the compiler can
>> write to READ ONLY MEMORY which might not even be in the same continent as
>> the compiler that generated the code.
>
> I thought it would be fa
bartc :
> But what about the poor user reading the code? Or can that now only be
> done with the aid or a browser that analyses 100,000 lines and applies
> that same algorithm?
>
> We mustn't forget the person writing the code, who may have a certain
> type in mind for X, but their (I nearly said
On Sat, Oct 14, 2017 at 12:51 AM, bartc wrote:
> On 13/10/2017 14:16, Chris Angelico wrote:
>>
>> On Sat, Oct 14, 2017 at 12:00 AM, bartc wrote:
>>>
>>> Even if data is actually in write-protected memory, attempts to write to
>>> it
>>> will cause a crash. On my home-made system, they just did no
On 13/10/2017 14:22, Marko Rauhamaa wrote:
BTW, the original reason for C requiring declarations in the first place
wasn't readability. Rather, it was to make compilation possible in the
first place. It is interesting that C++ and Java have taken steps to
remove such information where the compil
Paul Moore :
> To put it another way, in C const is a property of the variable being
> declared, not the value assigned to it. In Python, variables aren't
> declared, and constness is an inherent property of the value (or its
> type). One interesting question which this does raise is whether
> the
On 13 October 2017 at 13:54, Gregory Ewing wrote:
> Neil Cerutti wrote:
>>
>> I can tell at a glance if a parameter is expected to be
>> modifiable just by looking at the function signature.
>
>
> The question is why doesn't anyone feel the need to be
> able to do that for Python functions? Whethe
On 13/10/2017 14:16, Chris Angelico wrote:
On Sat, Oct 14, 2017 at 12:00 AM, bartc wrote:
Even if data is actually in write-protected memory, attempts to write to it
will cause a crash. On my home-made system, they just did nothing. Much more
graceful.
The novice thinks his job is to stop the
Gregory Ewing :
> Neil Cerutti wrote:
>> I can tell at a glance if a parameter is expected to be modifiable
>> just by looking at the function signature.
>
> The question is why doesn't anyone feel the need to be able to do that
> for Python functions? Whether a function modifies things passed to
On Sat, Oct 14, 2017 at 12:00 AM, bartc wrote:
> Even if data is actually in write-protected memory, attempts to write to it
> will cause a crash. On my home-made system, they just did nothing. Much more
> graceful.
The novice thinks his job is to stop the program from crashing. The
expert knows
On 13/10/2017 12:49, Peter J. Holzer wrote:
On 2017-10-13 10:37, Steve D'Aprano wrote:
or written by a dedicated hardware device:
https://en.wikipedia.org/wiki/Programmable_read-only_memory
And in this case there will be a tool which will read the object file
and send the contents of the r
Neil Cerutti wrote:
I can tell at a glance if a parameter is expected to be
modifiable just by looking at the function signature.
The question is why doesn't anyone feel the need to be
able to do that for Python functions? Whether a function
modifies things passed to it is just as important to
Steve D'Aprano wrote:
I wasn't questioning where the data came from, but how the compiler can write
to READ ONLY MEMORY which might not even be in the same continent as the
compiler that generated the code.
I thought it would be fairly obvious that by "put it in
read-only memory" I meant "arran
On 2017-10-13 10:37, Steve D'Aprano wrote:
> On Fri, 13 Oct 2017 05:16 pm, Gregory Ewing wrote:
>> Steve D'Aprano wrote:
>>> On Fri, 13 Oct 2017 03:37 pm, Gregory Ewing wrote:
>>>
If the compiler can tell where p is initially pointing, it could
put the pointer in read-only memory.
>>>
>>
Marko Rauhamaa :
> bartc :
>> 'const' tries to do too many things, most of them poorly, although it
>> does a very good job at adding clutter.
>
> +1
However, I do my best to honor "const" since it's there. I'm even more
Catholic than the Pope and declare:
int main(int argc, const char *const
"Peter J. Holzer" :
> On 2017-10-13 05:28, Gregory Ewing wrote:
>> Not only does "byte" not always mean "8 bits", but
>> "char" isn't always short for "character"...
>
> True.
Well, it does, in my universe. That was cast in stone 10**-32 seconds
after the Big Bang.
Marko
--
https://mail.pyt
bartc :
> 'const' tries to do too many things, most of them poorly, although it
> does a very good job at adding clutter.
+1
Marko
--
https://mail.python.org/mailman/listinfo/python-list
On Fri, 13 Oct 2017 05:16 pm, Gregory Ewing wrote:
> Steve D'Aprano wrote:
>> On Fri, 13 Oct 2017 03:37 pm, Gregory Ewing wrote:
>>
>>>If the compiler can tell where p is initially pointing, it could
>>>put the pointer in read-only memory.
>>
>> If it's read-only, how can the compiler write to i
On 13/10/2017 07:16, Gregory Ewing wrote:
Steve D'Aprano wrote:
On Fri, 13 Oct 2017 03:37 pm, Gregory Ewing wrote:
If the compiler can tell where p is initially pointing, it could
put the pointer in read-only memory.
If it's read-only, how can the compiler write to it?
(I come from the days
On 2017-10-13 05:28, Gregory Ewing wrote:
> Grant Edwards wrote:
>> On 2017-10-13, Stefan Ram wrote:
>>> 1 byte
>>>
>>> addressable unit of data storage large enough to hold
>>> any member of the basic character set of the execution
>>> environment«
>>>
>>>ISO C standard
>
Am 12.10.17 um 01:33 schrieb Chris Angelico:
Yeah. The trouble is that this is a really REALLY bad way to design
something. Have you seen a city that grew one house at a time, and had
streets added to service those houses? Not good.
I tend to disagree. Many European villages have been built th
Chris Angelico wrote:
Certainly not. A byte would be 21 bits!
Only if 21 bits were *also* an addressable unit of storage
in addition to octets. That would be an interesting architecture
indeed.
If you really wanted that, it might be easier just to make
the memory bit-addressable. In which case
Steve D'Aprano wrote:
On Fri, 13 Oct 2017 03:37 pm, Gregory Ewing wrote:
If the compiler can tell where p is initially pointing, it could
put the pointer in read-only memory.
If it's read-only, how can the compiler write to it?
(I come from the days when ROM was actual ROM, burned in at the
On Fri, Oct 13, 2017 at 4:28 PM, Gregory Ewing
wrote:
> Grant Edwards wrote:
>>
>> On 2017-10-13, Stefan Ram wrote:
>>
>>> 1 byte
>>>
>>> addressable unit of data storage large enough to hold
>>> any member of the basic character set of the execution
>>> environment«
>>>
>>>
Grant Edwards wrote:
On 2017-10-13, Stefan Ram wrote:
1 byte
addressable unit of data storage large enough to hold
any member of the basic character set of the execution
environment«
ISO C standard
Hmmm. So an architecture with memory addressed in octets
and Unicode
On Fri, Oct 13, 2017 at 4:16 PM, Steve D'Aprano
wrote:
> On Fri, 13 Oct 2017 03:37 pm, Gregory Ewing wrote:
>
>> If the compiler can tell where p is initially pointing, it could
>> put the pointer in read-only memory.
>
> If it's read-only, how can the compiler write to it?
>
>
> (I come from the
On Fri, 13 Oct 2017 03:37 pm, Gregory Ewing wrote:
> If the compiler can tell where p is initially pointing, it could
> put the pointer in read-only memory.
If it's read-only, how can the compiler write to it?
(I come from the days when ROM was actual ROM, burned in at the factory.)
--
Ste
Grant Edwards wrote:
It sure was an education the first I wrote C code for
a machine where
1 == sizeof char == sizeof int == sizeof long == sizeof float == sizeof double
All were 32 bits.
Unicode-ready -- way ahead of its time!
--
Greg
--
https://mail.python.org/mailman/listinfo/python-list
Stefan Ram wrote:
void
i_know_i_was_passed_a_pointer_to_an_array_and_how_many_elements_are_in_it
( char( *a )[ 4 ] )
{ for( int i = 0; i < 4; ++i )
putchar( ( *a )[ i ]); }
Only because you've statically made the array size part of
the type. Your original example didn't do that; presumably
it
bartc wrote:
(2) Declare data to be put into read-only memory as you say. That's fine
with a 'const int * p', but what about a 'int * const p'?
If the compiler can tell where p is initially pointing, it could
put the pointer in read-only memory. Probably unlikely to happen
in real code, though.
On 2017-10-13, Stefan Ram wrote:
> Grant Edwards writes: There is no such
>>thing as a "byte" in C.
>
> »3.6
>
> 1 byte
>
> addressable unit of data storage large enough to hold
> any member of the basic character set of the execution
> environment«
>
> ISO C st
On 2017-10-12, Steve D'Aprano wrote:
> On Fri, 13 Oct 2017 02:06 am, Grant Edwards wrote:
>
>> It sure was an education the first I wrote C code for
>> a machine where
>>
>> 1 == sizeof char == sizeof int == sizeof long == sizeof float == sizeof
>> double
>>
>> All were 32 bits.
>
>
> Does that
On Fri, Oct 13, 2017 at 10:14 AM, Ben Bacarisse wrote:
> Chris Angelico writes:
>> I abbreviated that down to nothing, but since you ask, here's a really
>> REALLY simple run-down of how to use Heroku:
>
> I think I see what you mean now. You meant no configuration is needed
> because you use (o
On Fri, 13 Oct 2017 02:06 am, Grant Edwards wrote:
> It sure was an education the first I wrote C code for
> a machine where
>
> 1 == sizeof char == sizeof int == sizeof long == sizeof float == sizeof
> double
>
> All were 32 bits.
Does that imply that on that machine 1 byte = 32 bits?
I don'
Chris Angelico writes:
> On Fri, Oct 13, 2017 at 1:09 AM, Ben Bacarisse wrote:
>> Chris Angelico writes:
>>
>>> On Thu, Oct 12, 2017 at 7:32 PM, Thomas Jollans wrote:
On 2017-10-12 07:31, Chris Angelico wrote:
> On Thu, Oct 12, 2017 at 12:19 PM, Ben Bacarisse
> wrote:
>> Pro
Jon Ribbens writes:
> On 2017-10-12, Ben Bacarisse wrote:
>> I see. If I'm reading this right, the app requests are passed through
>> to another server -- uWSGI.
>
> Yes. It doesn't have to be uWSGI; it could be gunicorn, or you could
> probably use Apache's mod_fcgid. As a last resort you coul
On 2017-10-12 03:47, ROGER GRAYDON CHRISTMAN wrote:
Actually, FORTRAN and COBOL and Algol (for its control structures)
Trying to support both of the first two was entertaining --
when you declared a variable, it wasn't enough to say it was an Integer:
you had to also declare whether it was repres
On Fri, Oct 13, 2017 at 1:09 AM, Ben Bacarisse wrote:
> Chris Angelico writes:
>
>> On Thu, Oct 12, 2017 at 7:32 PM, Thomas Jollans wrote:
>>> On 2017-10-12 07:31, Chris Angelico wrote:
On Thu, Oct 12, 2017 at 12:19 PM, Ben Bacarisse
wrote:
> Provided some early part of the URL i
On 2017-10-12, Ben Bacarisse wrote:
> I see. If I'm reading this right, the app requests are passed through
> to another server -- uWSGI.
Yes. It doesn't have to be uWSGI; it could be gunicorn, or you could
probably use Apache's mod_fcgid. As a last resort you could use CGI,
which wouldn't invol
Thomas Jollans writes:
> On 2017-10-12 15:16, Ben Bacarisse wrote:
>> Gregory Ewing writes:
>>
>>> Ben Bacarisse wrote:
That's a different type. I think you mean that a human writing C
(rather than bartc's code generator) would probably design the code to
use tokenrec ** then I
On 2017-10-12, Rhodri James wrote:
> On 12/10/17 16:06, Grant Edwards wrote:
>> On 2017-10-12, Steve D'Aprano wrote:
>>> On Thu, 12 Oct 2017 04:41 pm, Grant Edwards wrote:
>>>
> Even two different C compilers could return different values.
Nope. If sizeof char is not 1, then it's n
Jon Ribbens writes:
> On 2017-10-12, Ben Bacarisse wrote:
>> Chris Angelico writes:
>>> Normally, with a Python-based framework, you don't need _any_ web
>>> server configuration. You simply define your URL routing within the
>>> Python code. The only thing the web server needs to know is where
On 12/10/2017 16:18, Marko Rauhamaa wrote:
Grant Edwards :
Using const with strings in C with amateurish libraries is a headache
because _some_people_ will write their declarations so as to require
pointers to mutable strings even when they have no intention of
mutating them. Those people shoul
On 12/10/17 16:06, Grant Edwards wrote:
On 2017-10-12, Steve D'Aprano wrote:
On Thu, 12 Oct 2017 04:41 pm, Grant Edwards wrote:
Even two
different C compilers could return different values.
Nope. If sizeof char is not 1, then it's not C.
Today I Learned.
It sure was an education the f
On 2017-10-12, Marko Rauhamaa wrote:
> Grant Edwards :
>
>> Using const with strings in C with amateurish libraries is a headache
>> because _some_people_ will write their declarations so as to require
>> pointers to mutable strings even when they have no intention of
>> mutating them. Those peopl
Grant Edwards :
> Using const with strings in C with amateurish libraries is a headache
> because _some_people_ will write their declarations so as to require
> pointers to mutable strings even when they have no intention of
> mutating them. Those people should be hunted down and slapped with a
>
On 2017-10-12 15:16, Ben Bacarisse wrote:
> Gregory Ewing writes:
>
>> Ben Bacarisse wrote:
>>> That's a different type. I think you mean that a human writing C
>>> (rather than bartc's code generator) would probably design the code to
>>> use tokenrec ** then I agree, but the latter is not just
On 2017-10-12, Steve D'Aprano wrote:
> On Thu, 12 Oct 2017 04:41 pm, Grant Edwards wrote:
>
>
>>> Even two
>>> different C compilers could return different values.
>>
>> Nope. If sizeof char is not 1, then it's not C.
>
> Today I Learned.
It sure was an education the first I wrote C code for
a
On 2017-10-12, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> On Thu, Oct 12, 2017 at 6:22 PM, Marko Rauhamaa wrote:
>>> Additionally, you can launder any constant string into a nonconstant
>>> string with strstr(3):
>>>
>>> const char *cs = "hello";
>>> char *s = strstr(cs, "");
>>> s
On 2017-10-12, Neil Cerutti wrote:
> On 2017-10-12, Marko Rauhamaa wrote:
>> Bill :
>>
>>> Marko Rauhamaa wrote:
One example is the surprising fact that string literals in C
are "char *" and not "const char *".
Yep, that's the basis for a lot of the problems with 'const' in C.
Unfortun
On 2017-10-12, Ben Bacarisse wrote:
> Chris Angelico writes:
>> Normally, with a Python-based framework, you don't need _any_ web
>> server configuration. You simply define your URL routing within the
>> Python code. The only thing the web server needs to know is where to
>> find the web app, and
On Thu, 12 Oct 2017 11:01 pm, Stefan Ram quoted:
> Basically I got sick of every single
> aspect of C++ being designed around higher performance
> instead of my productivity.
Unlike C, where every single aspect of the language is designed around higher
performance instead of the developer's produ
Chris Angelico writes:
> On Thu, Oct 12, 2017 at 7:32 PM, Thomas Jollans wrote:
>> On 2017-10-12 07:31, Chris Angelico wrote:
>>> On Thu, Oct 12, 2017 at 12:19 PM, Ben Bacarisse
>>> wrote:
Provided some early part of the URL is handled by PHP, the rest of the
URL path is provided to
On 2017-10-12 14:01, Stefan Ram wrote:
> Many of the quotations are from the previous decade.
Thanks Stefan, that was fun.
> I must say that C++ has improved in this decade (the 2010s),
> and there also is a rennaisance of C and C++ (compared to
> "coffee languages") usage because single-
On 2017-10-12, Marko Rauhamaa wrote:
> Bill :
>
>> Marko Rauhamaa wrote:
>>> One example is the surprising fact that string literals in C
>>> are "char *" and not "const char *".
>>
>> If not, you couldn't pass a string literal to a function
>> having prototype void f(char *s);
>
> That *ought* to
On 2017-10-11, Gregory Ewing wrote:
> Neil Cerutti wrote:
>> I dig const qualifiers, even though I'm comletely fine with
>> their absence from Python.
>
> Out of curiosity, do you have any insights into why you like
> them in C++, if you don't miss them in Python?
I can tell at a glance if a para
Gregory Ewing writes:
> Ben Bacarisse wrote:
>> That's a different type. I think you mean that a human writing C
>> (rather than bartc's code generator) would probably design the code to
>> use tokenrec ** then I agree, but the latter is not just a different way
>> to write the former.
>
> Yes,
Chris Angelico :
> On Thu, Oct 12, 2017 at 8:20 PM, Marko Rauhamaa wrote:
>> BTW, C++ tries to be a bit stricter about "const". It declares two
>> separate prototypes:
>>
>>const char *strstr(const char *, const char *);
>>char *strstr(char *, const char *);
>>
>> http://www.cplusplus.com
On Thursday, October 12, 2017 at 12:33:09 PM UTC+1, Chris Angelico wrote:
> On Thu, Oct 12, 2017 at 8:12 PM, Thomas Jollans wrote:
> > On 2017-10-12 02:51, Chris Angelico wrote:
> >> If it wants new life, it's probably going to need a Linux version,
> >> because that's where a lot of developers han
On Thu, 12 Oct 2017 04:41 pm, Grant Edwards wrote:
>> Even two
>> different C compilers could return different values.
>
> Nope. If sizeof char is not 1, then it's not C.
Today I Learned.
Thank you to everyone who corrected me, even the person who said I was not
educated.
--
Steve
“Cheer
On 12/10/2017 11:39, Stefan Ram wrote:
bartc writes:
(1) Define named constants; except (in C) they can't be used like
constant expressions, you can take their addresses, and accidentally or
maliciously change their values.
When I think of »const«, I do not think of ROM.
»const« makes
On Thu, Oct 12, 2017 at 8:12 PM, Thomas Jollans wrote:
> On 2017-10-12 02:51, Chris Angelico wrote:
>> If it wants new life, it's probably going to need a Linux version,
>> because that's where a lot of developers hang out. The reality is that
>> open source developers are much more likely to deve
On Thu, Oct 12, 2017 at 8:20 PM, Marko Rauhamaa wrote:
> Chris Angelico :
>
>> On Thu, Oct 12, 2017 at 6:22 PM, Marko Rauhamaa wrote:
>>> Additionally, you can launder any constant string into a nonconstant
>>> string with strstr(3):
>>>
>>> const char *cs = "hello";
>>> char *s = strstr(
On Thu, Oct 12, 2017 at 7:32 PM, Thomas Jollans wrote:
> On 2017-10-12 07:31, Chris Angelico wrote:
>> On Thu, Oct 12, 2017 at 12:19 PM, Ben Bacarisse wrote:
>>> Provided some early part of the URL is handled by PHP, the rest of the
>>> URL path is provided to PHP in $_SERVER["PATH_INFO"].
>>
>>
Chris Angelico writes:
> On Thu, Oct 12, 2017 at 12:19 PM, Ben Bacarisse wrote:
>> Chris Angelico writes:
>>
>>> On Thu, Oct 12, 2017 at 11:55 AM, Ben Bacarisse
>>> wrote:
Chris Angelico writes:
> it binds your URLs to
> the concrete file system. That may not seem like too much
1 - 100 of 428 matches
Mail list logo