{"id":82,"date":"2008-12-30T23:42:00","date_gmt":"2008-12-30T23:42:00","guid":{"rendered":"http:\/\/catalin.francu.com\/blog\/?p=82"},"modified":"2008-12-30T23:42:00","modified_gmt":"2008-12-30T23:42:00","slug":"error-cast-from-void-to-int-loses-precision","status":"publish","type":"post","link":"https:\/\/catalin.francu.com\/blog\/2008\/12\/error-cast-from-void-to-int-loses-precision\/","title":{"rendered":"error: cast from \u2018void*\u2019 to \u2018int\u2019 loses precision"},"content":{"rendered":"<p>A\u015fa v\u0103 anun\u0163\u0103 un geek c\u0103 \u015fi-a luat laptop nou. \ud83d\ude42 Eroarea de mai sus provine din faptul c\u0103 n-am mai avut p\u00e2n\u0103 acum calculatoare pe 64 de bi\u0163i \u015fi unele din programele pe care le-am scris nu se descurc\u0103 bine \u00een acest context.<\/p>\n<p>Mo\u015f Cr\u0103ciun s-a spart \u00een figuri de s\u0103rb\u0103torile astea, a venit cu un <a href=\"http:\/\/www.notebookreview.com\/default.asp?newsID=4555\">laptop HP dv5t<\/a> cu procesor la 2.53GHz, 4 GB de RAM \u015fi o plac\u0103 grafic\u0103 mai de Doamne-ajut\u0103, cu care chiar pot s\u0103 joc World of Warcraft. Pe laptopul vechi configurasem jocul cu set\u0103ri destul de joase \u015fi parc\u0103 jucam mereu \u00een cea\u0163\u0103 (pentru c\u0103 placa grafic\u0103 nu avea putere s\u0103 afi\u015feze \u00een timp real prea multe detalii). Pe cel nou, cu toate set\u0103rile la maxim, n-am reu\u015fit s\u0103-l fac s\u0103 scad\u0103 sub 25 de cadre pe secund\u0103.<\/p>\n<p>Noul laptop a venit cu Windows Vista pe el, pe care l-am rulat fix 5 minute, ca s\u0103 m\u0103 asigur c\u0103 totul merge ok (sunet, grafic\u0103, leg\u0103tura la internet). Dup\u0103 care am b\u0103gat CD-ul de boot Ubuntu \u015fi acum sunt din nou \u00een minunata lume a Linuxului. Totul merge perfect, o singur\u0103 hib\u0103 are: c\u00e2nd stau pe wireless uneori am laten\u0163\u0103 foarte mare, timp de vreo 10 secunde. Trebuie s\u0103 m\u0103 mai uit un pic, se pare c\u0103 sunt ni\u015fte probleme cu driverele pe 64 de bi\u0163i. Dar per ansamblu nu mi-a venit s\u0103 cred; arhitectura pe 64 bi\u0163i e relativ recent\u0103 \u015fi totu\u015fi Ubuntu o suport\u0103 f\u0103r\u0103 nici un fel de \u201esughi\u0163uri\u201d.<\/p>\n<p>Un alt lucru care m\u0103 bucur\u0103 este c\u0103 anumite aplica\u0163ii merg substan\u0163ial mai repede pe 64 de bi\u0163i. \u00cen particular, programele de \u015fah; coinciden\u0163a c\u0103 procesorul e pe 64 de bi\u0163i \u015fi o tabl\u0103 de \u015fah are 64 de p\u0103trate este foarte fericit\u0103, pentru c\u0103 multe din implement\u0103ri folosesc <a href=\"http:\/\/www.fzibi.com\/cchess\/bitboards.htm\">bitboards<\/a>, o structur\u0103 de date care se axeaz\u0103 din greu pe variabile pe 64 de bi\u0163i. \u00cen particular, vreau s\u0103 m\u0103 apuc s\u0103 rescriu <a href=\"http:\/\/catalin.francu.com\/nilatac\">programul meu de anti\u015fah<\/a> \u015fi s\u0103 vedem cum se mi\u015fc\u0103 comparativ cu vechiul hardware.<\/p>\n<p>Dar toate la vremea lor, mai \u00eent\u00e2i s\u0103 mai juc\u0103m ni\u015fte WoW. \ud83d\ude42 Am ajuns s\u0103 zbor de colo-colo numai fiindc\u0103 \u00eemi place cum se vede tot peisajul de sus \u015fi ce de detalii are.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A\u015fa v\u0103 anun\u0163\u0103 un geek c\u0103 \u015fi-a luat laptop nou. \ud83d\ude42 Eroarea de mai sus provine din faptul c\u0103 n-am mai avut p\u00e2n\u0103 acum calculatoare pe 64 de bi\u0163i \u015fi unele din programele pe care le-am scris nu se descurc\u0103 bine \u00een acest context. Mo\u015f Cr\u0103ciun s-a spart \u00een figuri de s\u0103rb\u0103torile astea, a venit [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[1],"tags":[],"class_list":["post-82","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/catalin.francu.com\/blog\/wp-json\/wp\/v2\/posts\/82","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/catalin.francu.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/catalin.francu.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/catalin.francu.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/catalin.francu.com\/blog\/wp-json\/wp\/v2\/comments?post=82"}],"version-history":[{"count":0,"href":"https:\/\/catalin.francu.com\/blog\/wp-json\/wp\/v2\/posts\/82\/revisions"}],"wp:attachment":[{"href":"https:\/\/catalin.francu.com\/blog\/wp-json\/wp\/v2\/media?parent=82"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/catalin.francu.com\/blog\/wp-json\/wp\/v2\/categories?post=82"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/catalin.francu.com\/blog\/wp-json\/wp\/v2\/tags?post=82"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}