digitalmars.D - Slices in D vs Go
- Jesse Phillips (3/3) Oct 18 2013 Do to the recent slices discussion I did some investigation on
- Andrei Alexandrescu (4/7) Oct 18 2013 s/compliment/complement/
- anonymous (4/7) Oct 19 2013 [...]
- Jesse Phillips (2/10) Oct 19 2013 Thanks, done.
- Daniel Davidson (21/24) Oct 19 2013 It starts with:
- Daniel Davidson (5/30) Oct 19 2013 Ahh ok. You may want to point to the fact that you are referring
- Jesse Phillips (6/12) Oct 19 2013 No, you are completely correct. I'd copied in the wrong sections.
- Jesse Phillips (6/9) Oct 19 2013 And now it is all formatted.
- Joseph Rushton Wakeling (7/10) Oct 19 2013 It's not a big deal, but your blog's fixed width makes it a
- Jesse Phillips (8/19) Oct 20 2013 Well that is annoying. I don't have a smart phone, so I can't
- David Nadlinger (9/11) Oct 20 2013 If you have a Mac, you can get the iOS emulator that comes with
- Paulo Pinto (5/13) Oct 20 2013 Yes, although if the computer lacks virtualization support it is really
- Iain Buclaw (6/22) Oct 20 2013 Your emulating iOS - regardless of virtualisation support or not it is
- Paulo Pinto (5/28) Oct 20 2013 I was speaking about Android.
- Michel Fortin (9/16) Oct 20 2013 Indeed. And that's because it isn't an emulator. What you run in the
- Jesse Phillips (6/18) Oct 20 2013 Well, there isn't much I can do about it, short of hosting my own
- w0rp (4/4) Oct 22 2013 What's this talk of emulators? Just Google the width of
- w0rp (1/1) Oct 22 2013 Oh, and cool article. I liked it.
- Jesse Phillips (6/10) Oct 22 2013 Well, I can't say that LJ would use the same desktop formatting
- Andrei Alexandrescu (3/6) Oct 21 2013 http://www.reddit.com/r/programming/comments/1owpmp/slices_in_d_vs_go/
Do to the recent slices discussion I did some investigation on what is different in Go. Thus, created this http://he-the-great.livejournal.com/48672.html
Oct 18 2013
On 10/18/13 9:52 PM, Jesse Phillips wrote:Do to the recent slices discussion I did some investigation on what is different in Go. Thus, created this http://he-the-great.livejournal.com/48672.htmls/compliment/complement/ ? Andrei
Oct 18 2013
On Saturday, 19 October 2013 at 05:52:05 UTC, Andrei Alexandrescu wrote:On 10/18/13 9:52 PM, Jesse Phillips wrote:[...]also s/underlining/underlying/http://he-the-great.livejournal.com/48672.htmls/compliment/complement/
Oct 19 2013
On Saturday, 19 October 2013 at 08:45:55 UTC, anonymous wrote:On Saturday, 19 October 2013 at 05:52:05 UTC, Andrei Alexandrescu wrote:Thanks, done.On 10/18/13 9:52 PM, Jesse Phillips wrote:[...]also s/underlining/underlying/http://he-the-great.livejournal.com/48672.htmls/compliment/complement/
Oct 19 2013
On Saturday, 19 October 2013 at 04:52:31 UTC, Jesse Phillips wrote:Do to the recent slices discussion I did some investigation on what is different in Go. Thus, created this http://he-the-great.livejournal.com/48672.htmlIt starts with: int[] original; original.reserve(5); writeln("orig cap: ", original.capacity); // 7 writeln("orig len: ", original.length); // 0 Further down says: "But to discuss behavior we'll need some elements." and immediately proceeds with code accessing original where no data has been added: auto slice = original[1..$]; writeln("slice cap: ", slice.capacity); // 6 writeln("slice len: ", slice.length); // 2 original[0]++; slice[0]++; slice[1]++; writeln("orig: ", original); // [1, 2, 3] I don't know where the [1,2,3] comes from. The first original[1..$] will crash. Maybe you are forgetting the actual initialization of original with data?
Oct 19 2013
On Saturday, 19 October 2013 at 12:08:49 UTC, Daniel Davidson wrote:On Saturday, 19 October 2013 at 04:52:31 UTC, Jesse Phillips wrote:Ahh ok. You may want to point to the fact that you are referring to a larger and complete code file linked at the bottom of the page.Do to the recent slices discussion I did some investigation on what is different in Go. Thus, created this http://he-the-great.livejournal.com/48672.htmlIt starts with: int[] original; original.reserve(5); writeln("orig cap: ", original.capacity); // 7 writeln("orig len: ", original.length); // 0 Further down says: "But to discuss behavior we'll need some elements." and immediately proceeds with code accessing original where no data has been added: auto slice = original[1..$]; writeln("slice cap: ", slice.capacity); // 6 writeln("slice len: ", slice.length); // 2 original[0]++; slice[0]++; slice[1]++; writeln("orig: ", original); // [1, 2, 3] I don't know where the [1,2,3] comes from. The first original[1..$] will crash. Maybe you are forgetting the actual initialization of original with data?
Oct 19 2013
On Saturday, 19 October 2013 at 12:12:19 UTC, Daniel Davidson wrote:No, you are completely correct. I'd copied in the wrong sections. It is supposed to be something you can build, so I'll mention that. (Also fixed spelling)I don't know where the [1,2,3] comes from. The first original[1..$] will crash. Maybe you are forgetting the actual initialization of original with data?Ahh ok. You may want to point to the fact that you are referring to a larger and complete code file linked at the bottom of the page.
Oct 19 2013
On Saturday, 19 October 2013 at 04:52:31 UTC, Jesse Phillips wrote:Do to the recent slices discussion I did some investigation on what is different in Go. Thus, created this http://he-the-great.livejournal.com/48672.htmlAnd now it is all formatted. I'd forgotten vim has TOhtml, though with LJ you'll first need :let g:html_use_css = 0 Also, much easier to format LJ when auto format is off.
Oct 19 2013
On Saturday, 19 October 2013 at 04:52:31 UTC, Jesse Phillips wrote:Do to the recent slices discussion I did some investigation on what is different in Go. Thus, created this http://he-the-great.livejournal.com/48672.htmlIt's not a big deal, but your blog's fixed width makes it a little annoying to read off a smartphone -- it's necessary to keep scrolling back and forth horizontally in order to read the text. Enjoyed reading the article, though :-)
Oct 19 2013
On Sunday, 20 October 2013 at 01:59:14 UTC, Joseph Rushton Wakeling wrote:On Saturday, 19 October 2013 at 04:52:31 UTC, Jesse Phillips wrote:Well that is annoying. I don't have a smart phone, so I can't really test, my tablet seems to remove all the styling which would suggest text would have more flow. And at least for the desktop version, the main site is slightly smaller (due to the panel) http://he-the-great.livejournal.com/ but that isn't a good link to a specific article.Do to the recent slices discussion I did some investigation on what is different in Go. Thus, created this http://he-the-great.livejournal.com/48672.htmlIt's not a big deal, but your blog's fixed width makes it a little annoying to read off a smartphone -- it's necessary to keep scrolling back and forth horizontally in order to read the text. Enjoyed reading the article, though :-)
Oct 20 2013
On Sunday, 20 October 2013 at 18:09:25 UTC, Jesse Phillips wrote:Well that is annoying. I don't have a smart phone, so I can't really testIf you have a Mac, you can get the iOS emulator that comes with Xcode for free. Something similar is probably available for Android as well. You can't really test the "feel" of a website (i.e. how well a more complicated app fits in with the rest of the ecosystem), but for just checking the layout of a page, this has worked well for me. David
Oct 20 2013
Am 20.10.2013 20:12, schrieb David Nadlinger:On Sunday, 20 October 2013 at 18:09:25 UTC, Jesse Phillips wrote:Yes, although if the computer lacks virtualization support it is really slow. -- PauloWell that is annoying. I don't have a smart phone, so I can't really testIf you have a Mac, you can get the iOS emulator that comes with Xcode for free. Something similar is probably available for Android as well. You can't really test the "feel" of a website (i.e. how well a more complicated app fits in with the rest of the ecosystem), but for just checking the layout of a page, this has worked well for me. David
Oct 20 2013
On 20 October 2013 20:13, Paulo Pinto <pjmlp progtools.org> wrote:Am 20.10.2013 20:12, schrieb David Nadlinger:Your emulating iOS - regardless of virtualisation support or not it is equally slow. :o) -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';On Sunday, 20 October 2013 at 18:09:25 UTC, Jesse Phillips wrote:Yes, although if the computer lacks virtualization support it is really slow.Well that is annoying. I don't have a smart phone, so I can't really testIf you have a Mac, you can get the iOS emulator that comes with Xcode for free. Something similar is probably available for Android as well. You can't really test the "feel" of a website (i.e. how well a more complicated app fits in with the rest of the ecosystem), but for just checking the layout of a page, this has worked well for me. David
Oct 20 2013
Am 20.10.2013 21:24, schrieb Iain Buclaw:On 20 October 2013 20:13, Paulo Pinto <pjmlp progtools.org> wrote:I was speaking about Android. The iOS simulator is quite fast in comparisasion with the Android one. -- PauloAm 20.10.2013 20:12, schrieb David Nadlinger:Your emulating iOS - regardless of virtualisation support or not it is equally slow. :o)On Sunday, 20 October 2013 at 18:09:25 UTC, Jesse Phillips wrote:Yes, although if the computer lacks virtualization support it is really slow.Well that is annoying. I don't have a smart phone, so I can't really testIf you have a Mac, you can get the iOS emulator that comes with Xcode for free. Something similar is probably available for Android as well. You can't really test the "feel" of a website (i.e. how well a more complicated app fits in with the rest of the ecosystem), but for just checking the layout of a page, this has worked well for me. David
Oct 20 2013
On 2013-10-20 21:07:40 +0000, Paulo Pinto <pjmlp progtools.org> said:Am 20.10.2013 21:24, schrieb Iain Buclaw:Indeed. And that's because it isn't an emulator. What you run in the iOS simulator is a x86 version of an iOS app linked against the iOS simulator SDK and it runs as a regular OS X process. This works fine because the underlying OS is pretty much the same. -- Michel Fortin michel.fortin michelf.ca http://michelf.caYour emulating iOS - regardless of virtualisation support or not it is equally slow. :o)I was speaking about Android. The iOS simulator is quite fast in comparisasion with the Android one.
Oct 20 2013
On Sunday, 20 October 2013 at 18:12:06 UTC, David Nadlinger wrote:On Sunday, 20 October 2013 at 18:09:25 UTC, Jesse Phillips wrote:Well, there isn't much I can do about it, short of hosting my own blog. Looking at other hosted blogs doesn't lead me to believing that such problems are solved, I've taken the same approach and just set a max-width of 500. Frankly, I'm with Adam on the everything sucks side.Well that is annoying. I don't have a smart phone, so I can't really testIf you have a Mac, you can get the iOS emulator that comes with Xcode for free. Something similar is probably available for Android as well. You can't really test the "feel" of a website (i.e. how well a more complicated app fits in with the rest of the ecosystem), but for just checking the layout of a page, this has worked well for me. David
Oct 20 2013
What's this talk of emulators? Just Google the width of smartphone screens and try resizing your browser window with similar font size settings. It should be close enough to design something decent for phones with.
Oct 22 2013
On Tuesday, 22 October 2013 at 20:49:04 UTC, w0rp wrote:What's this talk of emulators? Just Google the width of smartphone screens and try resizing your browser window with similar font size settings. It should be close enough to design something decent for phones with.Well, I can't say that LJ would use the same desktop formatting for such devices. I'd have to modify the User Agent to pretend it was not a desktop. Anyway, 500 seems good for desktop and mobile. Wouldn't really want to go lower. Thanks and it seems it was quite a hit on Reddit too.
Oct 22 2013
On 10/18/13 9:52 PM, Jesse Phillips wrote:Do to the recent slices discussion I did some investigation on what is different in Go. Thus, created this http://he-the-great.livejournal.com/48672.htmlhttp://www.reddit.com/r/programming/comments/1owpmp/slices_in_d_vs_go/ Andrei
Oct 21 2013