IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1822.59 MB
Powered by
Channel Info
Network: freenodeChannel: #csharp |
Search in www.irclog.org
Log from #csharp at freenode 2006-06-05
[16:12]<wyfaj`>and i have to go in a few mins
[16:12]<sfuym0>hmmm :p
[16:12]<sfuym0>ok
[16:12]<mjzymygo>Remi: it is: http://dotnet.di.unipi.it/content/sscli/docs/doxygen/fx/bcl/datetime_8cs-source.html
[16:13]<zndy_wjfnz>Moridin8: That is the microsecond() part. Now the rest of the function :)
[16:14]<wyfaj`>that asp.net / php benchmark seems rather silly to me.
[16:14]<mjzymygo>Remi: Look into the amount of work the .NET has to do to retrieve tha date values...
[16:14]<dnscr>yep
[16:14]<zndy_wjfnz>thank you wilco`
[16:14]<afd>wilco`: php is faster? :)
[16:14]<dnscr>what is cheapper these days, hardware or programmer hours?
[16:14]<wyfaj`>if anyone wants to benchmark anything, they should benchmark more realistic scenarios, or at least put more important aspects to the test
[16:14]<zndy_wjfnz>Moridin8: Ever seen the date/time modules on *nix?
[16:15]<wyfaj`>but even then i doubt the results of the benchmark would be the factor that someone bases their decision on
[16:15]<zndy_wjfnz>wilco`: and at least use the code on the platform it is ment to be used on
[16:15]<zndy_wjfnz>anyway, i'm coding again. Deadline tonight
[16:16]<wyfaj`>AqD: doubtful, because last time i checked php doesnt include jit compiling etc. besides, its totally irrelevant anyway, since noone with half a brain would use it to develop applications beyond a simple blog :p
[16:17]<mrfjrrg>ok, another stupid question. If I wanted to cast an enum to an int, how would I do it? This doesn't work: (int)DGLevel2Name.DG_MY_RATING
[16:17]<mrfjrrg>Nor does DGLevel2Name.DG_MY_RATING.ToInt32()
[16:17]<wyfaj`>"doesn't work"
[16:17]<wyfaj`>it doesn't win you the lottery?
[16:17]<wyfaj`>it doesn't get you the girls?
[16:17]<sfuym0>wilco`: actuallyt, i saw a linux (i think maybe a firewall or minimal) that used php for startup scripts
[16:17]<mrfjrrg>won't compile
[16:18]<wyfaj`>djlogan: what stops you from actually sharing the compile error?:)
[16:18]<mrfjrrg>lol
[16:18]<mrfjrrg>ICCDll.cs:52: no conversion from `ICCDll.DGLevel2Name' to `int'
[16:19]<wyfaj`>go to its definition and check if its really an enum.
[16:19]<mrfjrrg>I figured the compile error would be obvious, sorry :) and/or it would be easy for somebody to share how to convert an enum to an int
[16:19]<mrfjrrg>it is
[16:19]<wyfaj`>can you paste its declaration?
[16:19]<wyfaj`>definition rather
[16:19]<mrfjrrg> public enum DGLevel2Name
[16:19]<mrfjrrg> {
[16:19]<mrfjrrg> DG_WHO_AM_I =0,
[16:19]<mrfjrrg> DG_PLAYER_ARRIVED =1, ... DG_MY_RATING =52,
[16:19]<mrfjrrg> DG_SOUND =53,
[16:19]<mrfjrrg> DG_PLAYER_ARRIVED_SIMPLE =55,
[16:20]<wyfaj`>weird
[16:20]<mrfjrrg>it should work?
[16:20]<wyfaj`>int x = (int)DGLevel2Name.DG_SOUND; should just work
[16:20]<mrfjrrg>ok
[16:20]<mrfjrrg>I'll play with it
[16:20]<mrfjrrg>thanks
[16:20]<wyfaj`>you must've done something different than what you've pasted :P
[16:21]<mjzymygo>Remi: to be pedantic... ;) URL: http://www.nomorepasting.com/paste.php?pasteID=63273
[16:22]<zndy_wjfnz>Moridin8: I don't understand IL or assembly. But the assembly part looks a lot like the php code :o
[16:22]<mjzymygo>Remi: *LOL*
[16:23]<wyfaj`>that's the worst thing you can say about a 3/4gl language :P
[16:23]<zndy_wjfnz>well, line 18, 24 and 27 are php code afaics
[16:23]<mjzymygo>Remi: right ;) of course...;) I converted the VB to C# for easier comparison visually
[16:24]<wyfaj`>um...
[16:24]<wyfaj`>those are comments
[16:24]<wyfaj`>thats not actual asm
[16:24]<zndy_wjfnz>hmm, like I said: I don't understand assembly :$
[16:24]<mjzymygo>Wilco: like 18/24 and 27 aren't ASM no... the rest is ;)
[16:24]<wyfaj`>the following lines actually implement the higher-level construct
[16:24]<zndy_wjfnz>Moridin8: I thought that was part of it
[16:24]<wyfaj`>lol
[16:25]<wyfaj`>yea that makes sense.... being able to do for loops in ASM, but having to do much more obscure things to simply move some data
[16:25]<wyfaj`>;)
[16:25]<zndy_wjfnz>how should I know?
[16:26]<wyfaj`>deduction :P
[16:26]<wyfaj`>common sense!
[16:26]<zndy_wjfnz>I can only code php and c#-partially
[16:26]<wyfaj`>;)
[16:27]<zndy_wjfnz>like I said to Xiphoris last night: For me a compiler is still some magic thing that converts plain text into some executable app
[16:27]<wyfaj`>ok
[16:27]<mjzymygo>Remi; anyway... .NET will do that loop ~200,000 times faster simply because it converts it to only 17 lines of machine code... remember PHP is interprested.
[16:28]<zndy_wjfnz>Moridin8: They used Zend right? Then it should be byte-compiled or something like that
[16:28]<mjzymygo>Remi: ah.... hehe
[16:28]<mjzymygo>Remi: thats not the same.
[16:28]<mjzymygo>Remi: the bytes are themselves interpreted
[16:28]<mjzymygo>Remi; faster than the standard method though.
[16:29]<azyfm>"bytecode" is a weird term
[16:29]<zndy_wjfnz>hmm, okay
[16:29]<azyfm>is there any form of code on a computer that isn't encoded as bytes?
[16:29]<zndy_wjfnz>i have no idea what the differance is :)
[16:29]<mjzymygo>Arild: ;) yeh. true. hehe
[16:29]<dzdyzzz-wjzc>data on a hard disk isn't quite stored as bytes - at least not in mfm
[16:30]<azyfm>mfm?
[16:30]<zndy_wjfnz>damieng-work: huh? How is it stored then?
[16:30]<mjzymygo>Remi: the difference is... the bytes in .NET are run on the CPU directly. the Bytes created by the Zend engine are run by the Zend-Engine byte interpreter
[16:30]<zndy_wjfnz>Moridin8: ic
[16:31]<dzdyzzz-wjzc>00 is flux, no flux.
[16:31]<mjzymygo>Remi: which accounts for the 200,000% speed difference
[16:31]<dzdyzzz-wjzc>10 is no flux, no flux.
[16:31]<dzdyzzz-wjzc>1 is no flux, flux.
[16:31]<zndy_wjfnz>Moridin8: But why would you need .NET then? Isn't it so that .NET also is some kind of interpreting thing?
[16:31]<mjzymygo>Remi: no.
[16:31]<zyccus>"Except for 1.44 MB floppy disks, this encoding is obsolete"
[16:31]<dzdyzzz-wjzc>so what your byte ends up as... and even how long it'll be... is anyones guess :D
[16:32]<wyfaj`>the jit compiler compiles IL to native code
[16:32]<azyfm>I'm not sure that's a worthwhile distinction, damieng-work - you could just as well say there are no bytes anywhere because electrical voltages aren't bytes
[16:32]<dzdyzzz-wjzc>rikkus - what you quoting?
[16:33]<zndy_wjfnz>wilco`,Moridin8: but if I compile my app, and I move it to another machine, I need to download/install .NET first... I don't get it :)
[16:33]<fyfuym-syfggag>cheeeeeeeeeeeeeeeeeeeeeeeeeeeezer
[16:33]<fyfuym-syfggag>!!!!!
[16:33]<wyfaj`>Remi_Woler: it's jitted at runtime
[16:33]<zndy_wjfnz>but that would make it slow, right?







