/srv/irclogs.ubuntu.com/2012/12/22/#kubuntu-devel.txt

Quintasanshadeslayer: http://wstaw.org/m/2012/12/22/plasma-desktoprD2665.png00:01
Quintasansup00:01
shadeslayer:D00:01
ScottKshadeslayer: re kraft: Don't update standards version in Ubuntu relative to what Debian has.  It's pointless diff in Ubuntu and Ubuntu policy says not to.00:02
Quintasanwoah00:02
shadeslayeroh00:02
Quintasan12.10 has LVM in options?00:02
shadeslayerScottK: we have a policy for that?00:02
shadeslayerQuintasan: heh yeah00:02
shadeslayerRiddell got it in :P00:02
ScottKYes.00:02
shadeslayerokay, I'll keep that in mind, want me to re-upload? ( just needs fixing of control and changelog though )00:03
* ScottK fixed locally already.00:03
ScottKNo need00:03
shadeslayeroh thx :)00:03
shadeslayerthere wasn't anything involved in updating the policy from what I could tell, so I bumped it00:04
QuintasanI'm surprised I can read this shadeslayer00:04
Quintasanbut this00:05
Quintasanhttp://wstaw.org/m/2012/12/22/plasma-desktopMk2665.png00:05
Quintasangotta loved mixed translations00:05
ScottKshadeslayer: Right, but there's a general policy of not updating because it just makes more diff that we don't care about.00:05
shadeslayerScottK: Understood.00:05
ScottKshadeslayer: BTW, ask about such packages in #ubuntu-motu so we can get you more visibility there. (in the future)00:05
shadeslayerQuintasan: hehe00:05
shadeslayerScottK: okie00:06
* shadeslayer sucks at making himself visible00:06
shadeslayereven stopped blogging :P00:06
Quintasanshadeslayer: oh yea00:07
Quintasandude00:07
Quintasancheck query00:07
RiddellQuintasan: awooga00:08
Riddellshadeslayer: got what in?00:08
shadeslayerRiddell: kde-workspace 4.9.95/raring00:09
QuintasanRiddell: awooga about what?00:09
ScottKshadeslayer: Uploaded.  Thank you for your contribution to Ubuntu.00:09
RiddellQuintasan: awooga for wanting to look into input methods00:11
Quintasanmmkay00:11
shadeslayerScottK: thx :)00:12
yofeluh...00:15
* yofel wanted to check if software-properties-kde works right with py3 and got this instead:00:16
yofel  File "/usr/lib/python3/dist-packages/softwareproperties/kde/SoftwarePropertiesKDE.py", line 38, in <module>00:16
yofel    from PyKDE4.kdecore import ki18n, i18n, KUrl00:16
yofelRuntimeError: the sip module implements API v9.0 but the PyKDE4.kdecore module requires API v9.100:16
yofelI need sip from proposed?00:16
RiddellScottK: uploaded00:18
ScottKyofel: Probably.00:18
ScottKI'll unblock it.00:19
ScottKPyQt is taking longer than i expected.00:19
yofelyep, that worked00:20
ScottKDone.00:20
ScottKRiddell: "For details see the accompanying COPYING-CMAKE-SCRIPTS file."  cmake-modules/* in kajongg is BSD license.00:27
ScottKAnd said license is missing ...00:27
Quintasanapachelogger: ping00:39
QuintasanScottK: You know C well?00:40
ScottKQuintasan: Not at all.00:40
Quintasanhmm00:40
QuintasanRiddell: You?00:40
yofelQuintasan: what's the question anyway?00:48
Quintasanyofel: http://sequoia.ict.pwr.wroc.pl/~mucha/PProg/wyklad07_prezentacja.pdf00:49
Quintasango to page 6300:49
Quintasanwhat the hell00:49
Quintasanint (*piksele)[obraz->wym_x];00:49
Quintasanpiksele=(int(*)[obraz->wym_x]) obraz->piksele; /*inicjujemy go jak trzeba*/00:49
Quintasando?00:49
Quintasanignore the comments since they are in polish00:49
Quintasanyofel: The whole thing apparently creates a dynamicall two dimensional array00:50
Quintasanit seems I killed yofel with that00:53
Quintasan:P00:53
yofelnot really, I'm just getting confused by all the polish00:54
Quintasanignore the comments00:54
Quintasanthey really don't say anything00:54
yofelint (*piksele)[obraz->wym_x]; should be -> piksele defined as pointer to int array with obraz->wym_x elements00:54
yofelthe next line is a "simple" type cast00:55
yofeldefining the data type for the malloc a few lines above00:55
Quintasanshadeslayer: see this?00:56
Quintasanhe knows his stuff00:56
yofelbut I'm still wondering about the 2-dimensionality00:56
shadeslayeryofel: inorite00:57
Quintasanoh00:57
Quintasanthat's the thing00:57
shadeslayeras for int (*piksele)[obraz->wym_x] I've never written such code :P00:57
shadeslayersilly C00:57
Quintasanyofel: Basically he is importing an pbm image00:57
QuintasanwymX would be resolutionX00:57
Quintasanand wymY -> resolutionY00:57
Quintasanobraz -> picture00:57
shadeslayerand what yofel said makes sense now :P00:58
Quintasanif you scroll up00:58
Quintasanyou can see it done ez mode i.e static array00:58
shadeslayerohhh00:58
shadeslayerohhhh okay00:58
Quintasanand the next excerices ask you to rewrite the previous app you were supposed to do00:59
Quintasanusing dynamical array00:59
Quintasandynamical 2d array ofc00:59
Quintasanand I was like00:59
Quintasanhow the hell does this even work00:59
Quintasanhow is this stuff creating twodimensional array?01:00
QuintasanI can see one dimension there01:00
yofelnah, it's using one malloc to allocate the space for the whole 2-dim array and later defines the types to slice it into pieces01:00
Quintasanfor all I see he iterates through piksele like a 2d array01:01
shadeslayer*nod*01:02
yofelwell, yeah01:02
shadeslayeryofel: though isn't piksele a 1d array?01:03
QuintasanI think the array doesn't know it yet :P01:03
shadeslayerhah01:03
yofelnot really, it's an array of 1d arrays01:03
shadeslayeruhhhh01:04
yofelint (*piksele)[obraz->wym_x];01:04
shadeslayerdoes not compute01:04
Quintasanyeah01:04
yofelhm wait, how do I explain this correct01:05
Quintasandon't ask US that :P01:05
shadeslayerafaictl that defines an array of pointers01:05
shadeslayerof length obraz->wym_x01:05
Quintasanapachelogger: halp01:05
yofelI read that as a pointer to an array of int01:06
QuintasanI read that as a mindfuck (excuse the poor wording) for new students01:06
yofelwhich defines that 2nd dimension01:06
shadeslayer:D01:06
Quintasanyofel: Note this is apparently from my friends "introduction to programming" course :D01:07
Quintasan7th lecture I think01:07
shadeslayerI really do fail to see the 2nd dimension there :P01:07
yofelQuintasan: this *IS* introductory material for C01:07
* yofel wished he had C at uni -.-01:07
yofelshadeslayer: the next line does that I believe - it tells it that the allocated space is of 'arrays of int with size obraz->wym_x size' type01:08
QuintasanI don't think this is something to do at 7th lecture whne you spend two lectures introducing X window system01:08
yofelthat will make the for loop skip exact the amount of bytes for one int array on i++01:08
yofelQuintasan: welcome to uni ;P01:09
QuintasanI wish I had this stuff instead of JAva01:09
QuintasanPeople who go to IT course have Java01:09
Quintasanand people who went for automation and robotics have C01:09
Quintasanthe hell01:09
yofelwell, that's what I saw in the company introductions here too, the electronics folk use C, the IT companies Java01:10
yofelso that's pretty close to reality01:11
shadeslayerthat's normal actually :P01:11
shadeslayerQuintasan: thank god you're not learning verilog/VHDL01:11
shadeslayerI cannot parse that stuff no matter how hard I tried01:11
* yofel dropped out before he got to VHDL...01:11
shadeslayerI did basic VHDL01:12
shadeslayerdesigned Flip Flops and switches01:12
shadeslayermux's01:12
QuintasanWTF01:12
yofelQuintasan: do you know how C handles looping through malloc'd arrays?01:12
Quintasanis this01:12
yofelor how that loop works?01:12
yofelbecause it cares about the data type there01:12
Quintasanyofel: I think this would be called pointer arithmetic?01:12
yofelyes, but the pointer arithmetic does an automatic multiplication of the index with sizeof(datatype)01:13
Quintasani.e by +1 it jumps X bytes where X is the number of bytes that certain data type uses?01:13
shadeslayerpiksele=(int(*)[obraz->wym_x]) obraz->piksele < that to me reads as : the pointer to the first element in an array of length wym_x sliced off from obraz->piksele01:13
yofelthat's why the typecast is in there01:13
Quintasanoh christ01:14
yofelshadeslayer: no01:14
Quintasanwhat is this I don't even01:15
yofelthe pointer to the first element of data that is of type "int array of size wym_x"01:15
QuintasanWHAT IS THIS VHDL01:15
QuintasanTAKE IT AWAY01:15
yofelshadeslayer: so piksele[0] would indeed be the first int array01:15
yofelpiksele[1] will be the next01:15
shadeslayerI see01:15
shadeslayerbut then can you resolve piksele[0][1]01:16
yofelthat would be bytes 4-701:16
shadeslayerand shouldn't it be : ( piksele[0])[1]01:16
shadeslayeroh, so that does resolve? I didn't think it could01:16
QuintasanRiddell: I'll be perfectly honest01:17
QuintasanFresh quantal install has nothing01:17
Quintasannothing01:17
shadeslayerwhich is why I was confused01:17
Quintasanthat looks like japanese input01:17
yofelit knows that piksele[0] is the first element, and since it knows the data type of that element it knows that [1] is the 2nd int in there01:17
shadeslayersmart ass compiler01:17
shadeslayerthe code makes sense now I think :P01:18
yofelsince it knows the data type, it knows that piksele[1] is *piksele + sizeof(that data type)01:18
shadeslayerright01:18
shadeslayerand we told it that data type when we added this : piksele=(int(*)[obraz->wym_x]) obraz->piksele 01:18
yofelthat code is nice, but that's really not the way I'm used to doing it01:19
yofelas usually you would replace one of that lines by simply using calloc()01:19
Quintasanhow the hell does piksele[0][1] resolve then?01:20
shadeslayerQuintasan: yofel just explained that01:20
Quintasanso wait01:21
yofelhm...01:21
QuintasanIf I understood it correctly01:21
Quintasanpiksele[0] is not an int but an array of ints?01:22
shadeslayeryofel: C is more convoluted than I thought it was01:22
shadeslayerQuintasan: piksele is an array of pointer to arrays01:22
Quintasanarray of pointers01:22
Quintasanokay01:22
Quintasanthat computes01:22
Quintasanto arrays01:22
Quintasanokay01:22
shadeslayerright01:22
Quintasanthat computes as well01:22
yofelnot really01:22
shadeslayerwhut? 0.o01:23
yofelyou never allocated space for the pointers01:23
QuintasanXD01:23
shadeslayerheh01:23
yofelit's a pointer to an array of arrays01:23
* Quintasan 's brain explodes01:23
shadeslayeroic01:23
yofelit can't be anything else as you only have one variable and one slice of memory01:23
shadeslayeryofel: also, that's just shitty :P01:23
Quintasanyofel: SO piksele[0] (the first element) is a array of ints?01:23
Quintasanand piksele[1] would be another array of its?01:24
yofelshadeslayer: well, that's a pretty sane way to implement a 2-dim dynamic array in C IMHO ^^01:24
Quintasanints*01:24
yofelQuintasan: right01:24
Quintasanholy shit01:24
Quintasanis it any different from01:24
Quintasantab[100][100]?01:24
shadeslayeryofel: what if the resolution is more? :P01:25
yofelnot really, but what memory address that resolves to is a matter of types01:25
shadeslayererm01:25
shadeslayerQuintasan: ^01:25
Quintasanshadeslayer: I don't care01:25
QuintasanI wanted to know if it's different memory wise01:25
shadeslayerQuintasan: welcome to the world where people have images of different resolutions :P01:26
shadeslayerQuintasan: sure it is01:26
Quintasanthat magic with wymX and wymY = 100 vs. int tab[100][100]01:26
shadeslayerthen it's not01:26
shadeslayerbut what if wymX and wymY are 5001:26
yofelwell, I'm not sure, but wouldn't tab[100][100] be on the stack and not on the heap?01:26
shadeslayerthen you're wasting half the space with a static array01:26
Quintasanthey will be different duh01:26
shadeslayeryofel: that too01:26
Quintasanbecause they have different dimensions?01:26
shadeslayerQuintasan: huh?01:27
Quintasanyofel: but they will take the same amount of memory, won't they?01:27
Quintasanprovided the size matches of course01:27
shadeslayerQuintasan: you can't do tab[wymX][wymY] where the two vars are not known01:27
QuintasanI KNOW01:27
Quintasanderp01:27
shadeslayerokay01:28
shadeslayerin terms of mem consumption, it shouldn't be different :P01:28
yofelit won't be different in simply amount of bytes01:28
Quintasandude, I want to know if they will occupy exactly the same amount of memory when wymX and wymY are defined during runtime and they equal 5001:28
yofelas C has no metadata in arrays01:28
shadeslayeryes01:28
shadeslayerthey will be equal01:29
Quintasanin other words01:29
QuintasanSUP BRO I HEARD YOU LIKE DYNAMICAL ARRAYS SO WE PUT 1D DYNAMICAL ARRAY IN YOU 1D DYNAMICAL ARRAY SO YOU CAN INTERATE WHILE YOU MALLOC WHILE YOU ITERATE01:30
shadeslayerjust to make it clear, if wymX/Y are 50, and if you allocate a array of 50x50 , it should be the same01:30
Quintasanside note01:31
Quintasanasian input is non existent with clean installs01:31
Quintasanyofel, shadeslayer: Thanks, my brain is almost no working :P01:33
* Quintasan goes to bed01:33
shadeslayerheh01:33
* yofel is still thinking about the type difinitions01:33
shadeslayerlol01:34
shadeslayerhah01:34
shadeslayeretc/dbus-1/system.d/org.kde.active.clockconfig.conf01:34
shadeslayerxD01:34
shadeslayerI don't think we want that01:35
shadeslayerhm01:35
shadeslayernvm, we do what that01:35
shadeslayerI read that incorrectly01:35
shadeslayeranywho01:41
shadeslayermorning everyone01:41
yofelhm01:41
yofeljust learned something about C too01:41
shadeslayer?01:41
yofelI wasn't sure why piksele was defined as one array pointer just to have its type changed in the next line01:42
yofelbut to be used as an array pointer it has to be defined like that01:42
shadeslayerheh01:43
yofeli.e. it has to be the type of the first element it's later pointing to01:43
shadeslayerI see01:43
yofelotherwise the compiler barfs01:43
yofelor actually more correct: piksele=(int(*)[obraz->wym_x]) obraz->piksele; says that obraz->piksele has elements of the type of the pointer.01:46
yofeldefining the type of the memory, not the pointer01:46
* yofel looks at kde again to let his brain rest01:47
shadeslayer:P01:47
shadeslayerI'm just about done with plasma-mobile01:47
shadeslayerso yay :)01:47
yofel\o/01:47
shadeslayerhttp://paste.kde.org/629672/01:51
shadeslayerjust need to make a -dev package now :D01:51
shadeslayeryofel: does plasma-active-dev sound fine?01:57
yofelsure01:57
shadeslayerplasma-mobile uploaded to ppa:kubuntu-active/ppa02:08
shadeslayerI'll do the rest later on :)02:08
ScottKSigh.07:22
ScottKWorkspace not uploaded.07:22
ScottKRiddell: workspace is a bit confused between ninjas and bzr what's supposed to be uploaded.07:29
apacheloggeroh children11:17
* apachelogger needs coffee11:18
apacheloggerQuintasan_, yofel_, shadeslayer: that line you pasted should be obvious :P11:18
apacheloggerit's an array of size wym_x, named tablica, containing pointers to ints11:19
apacheloggeralso the program technically leaks11:21
apacheloggerso that declaration you pasted is so weird because the code is weird... first of all int* and int[] are treated as if they are the same which of course they are not11:22
apacheloggersecondly a bad compiler would allocate >=5*4bytes on that line11:23
apacheloggeras the code litterally says "there now shall be an array of int pointers 5 cells long"11:23
apacheloggerall nice and fancy11:24
apacheloggernow in the next line however comes what makes it bad code11:24
apacheloggeran allocation on the heap assuming that the two dimensional array created before will be treated linear11:26
apacheloggerit's allocating a memory segment >= x*y*4bytes and telling the compiler it should use that memory segment as the actual variable tablica11:27
apacheloggerthis program now contains the knowledge that an array in C is linear memory11:29
apacheloggerit all had of course been more obvious if the variable had been int** or int[][], but oh well11:31
* apachelogger thinks we should all program arm asm anyway11:31
apacheloggernow coffee11:31
=== yofel_ is now known as yofel
yofelthanks for the enlightment11:40
yofelapachelogger: wait, on which page were you? page 63 has no variable called tablica - that's a few pages before11:44
yofeland even there I don't see an array of pointers to int.11:48
yofelint* tablica[wym_x]; is an array of pointers to int11:48
yofelint (* tablica)[wym_x] is a pointer to an array of ints11:49
yofelapachelogger: or am I reading that the other way around?11:49
Tm_Tpackages on ninjas are good to go for installation on 12.10 ?12:27
yofelTm_T: kate isn't done yet, otherwise yes12:28
Tm_Tok thanks12:34
Riddellyofel: awesome job on quantal there12:51
yofeluh... except kate all packages built by themselves, so it was an easy job really12:51
Riddellssh, just take all the credit :)12:52
yofel:D12:52
Tm_Tyofel: could you prod me when kate is ready to roll too and I go and install them for testing? (:13:05
yofelTm_T: it's done now13:07
Tm_Tooh jolly good thanks13:08
=== smarter_ is now known as smarter
vibhavRiddell: SOrry for pinging at the wrong channel, are you available?15:24
Riddellvibhav: mm?15:29
* yofel finished kubuntu-batch-backport - comments welcome15:30
yofeland I'm off for the rest of the evening 15:30
Riddellthanks yofel 15:30
vibhavRiddell: pm?15:31
=== ronnoc_ is now known as ronnoc
oyis a kubuntu alpha LiveCD available?16:48
ScottKyofel: Everything built by itself, except for the stuff I retried ....16:56
tsimpsonoy: https://wiki.kubuntu.org/RaringRingtail/Alpha1/Kubuntu16:56
ScottKyofel, Riddell, apachelogger: workspace is still missing.16:56
oytsimpson, thanks :-)17:00
apacheloggeryofel: oh, must have looked on the wrong page ^^17:59
apacheloggeryofel: but yeah, while drinking my coffee I realized that I was wrong18:00
apacheloggerit's a pointer to an array18:00
apacheloggerso that won't cause a pointless stack allocation18:00
apacheloggerit's pretty much cheating the compiler though18:00
kubotu::workspace-bugs:: [1093149] [kubuntu] default background not showed @ https://bugs.launchpad.net/bugs/1093149 (by Fabio Marconi)18:01
apacheloggerah 63 is the same thing tho18:02
apacheloggerstill cheating the compiler18:02
apacheloggeri.e. it's not an array it's a memory segment, so accessing it via a pointer to an array and then using the pointer as first dimension is not only not obvious it defeats the purpose of declaring it as an array to begin with18:04
apacheloggerso the way to do it right is either ** (which IMHO would be best seeing as there really is no array as actual data type involved in the allocation) or (*)[][] (to have the compiler help you with not abusing the memory and making it apparent to the reader that this is in fact fixed size)18:07
Riddellvibhav: you had a question?18:29
RiddellScottK: you rejected kdiamond?18:31
Riddelloh it's a soyuz issue18:57
RiddellScottK: kde-workspace uploaded18:57
Riddellkajongg too18:57
RiddellI don't see anything wrong with kshisen, all copyright holders in debian/copyright and FDL18:57
=== jono is now known as Guest89431

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!