<<09-08-2012>>

00:00:06*XAMPP joined #nimrod
00:00:10*XAMPP quit (Changing host)
00:00:10*XAMPP joined #nimrod
00:19:43*q66 quit (Quit: Leaving..)
00:29:23*Trix[a]r_za is now known as Trixar_za
01:06:47*Trixar_za is now known as Trix[a]r_za
05:26:06*fowl joined #nimrod
05:26:06*fowl quit (Changing host)
05:26:06*fowl joined #nimrod
06:47:32*XAMPP quit (Read error: Connection reset by peer)
14:38:16*q66 joined #nimrod
14:48:59*Trix[a]r_za is now known as Trixar_za
15:44:11*shevy quit (Ping timeout: 245 seconds)
15:57:08*shevy joined #nimrod
16:00:04*XAMPP joined #nimrod
17:39:24*Trixar_za is now known as Trix[a]r_za
17:45:00*reactormonk joined #nimrod
17:45:09reactormonkhow do I interact with JS btw?
17:50:10dom96reactormonk: Take a look at times.nim or one of the other module that interfaces with JS
17:50:18dom96IIRC it's just `importc`
17:52:20shevyhonk honk
17:52:32reactormonk TTime* {.final, importc.} = object
17:52:33reactormonk getDay: proc (): int
17:52:56reactormonkso I can use TTime#getDay ?
17:55:23reactormonkThe final pragma can be used for an object type to specify that it cannot be inherited from.
17:55:25reactormonk:-/
17:55:37dom96hrm
17:55:39reactormonkwhy does this exist at all?
17:56:16dom96So that you can access JS' time functions
17:56:23dom96proc newDate(): TTime {.importc: "new Date", nodecl.}
17:56:33dom96I suppose the `Date` object has those functions.
17:56:48dom96What do you want to do?
17:57:35reactormonklet's say I want to create my own dates n stuff :-)
17:58:16dom96The times module is meant to work the same way for both the C and JS backend I believe
17:58:21dom96As is all the of the stdlib heh
17:58:25dom96*of the
17:59:48dom96I guess you want to know how you can create your own module though for JS.
18:00:01reactormonkindeed
18:00:07reactormonkand interact with nodejs, per example
18:00:52reactormonkalthough opa looks quite predefined for what I want to achieve :-)
18:01:01dom96Well I can't say I have lots of experience with Nimrod's JS backend.
18:01:09dom96(Don't you dare use Opa!!) :P
18:01:38dom96I'll help you in a sec. brb need to get pizza out of oven
18:05:22reactormonkwhy u no like opa? :-)
18:07:44dom96I am devoted to Nimrod.
18:07:58dom96All other languages are blasphemy :P
18:08:17dom96reactormonk: Ok, so what exactly do you want to create? (or is it some kind of a secret project?)
18:16:32reactormonknah, just some gaming stuff
18:16:41reactormonkand gotta go for now
18:16:53reactormonkiirc, it's github.com/Tass/summoner_wars (or something similar)
18:18:43dom96ok
18:21:16*reactormonk quit (Ping timeout: 245 seconds)
18:56:04Araqhi guys
18:56:21Araqthe JS backend is documented a bit now:
18:56:40Araqhttp://build.nimrod-code.org/docs/nimrodc.html#the-ecmascript-target
18:57:56dom96hey
19:19:47dom96We really need JS backend tests
19:19:53dom96We really need many things.
19:20:05dom96Araq: I read some stuff about Rust's traits.
19:20:42dom96If your plan to use closures for interfaces works out, then I suppose it should be possible to write a nice wrapper around it using macros.
19:21:55Araqcourse it works out
19:22:03AraqI have a test working :P
19:22:40Araqand rust's traits are very similar to go's interfaces afaik
19:24:32dom96Is that a good or a bad thing? heh
19:26:18dom96http://www.lazarus.freepascal.org/index.php/topic,17717.html
19:27:06Araqah finally
19:27:29Araqtoo bad they are about 8 years too late ;-)
19:27:41dom96heh
19:27:47Araqeverybody has switched to C# by now ...
19:28:38dom96All the companies behind Pascal lost to Microsoft I suppose
19:28:46*dom96 does not know the history at all
19:29:35dom96People are still using it though.
19:30:03dom96I only attempted to use Pascal once, and the first thing I did was try to use sockets.
19:30:11dom96As you would assume of me heh
19:30:16dom96And I was disappointed
19:31:23Araqwow but at least you tried it ;-)
19:32:31dom96Yep, it was my "finding new languages" era.
19:32:36dom96I went through many.
19:32:57dom96Haskell stuck. And then Nimrod did ;)
19:40:11shevyhaskell
19:40:16shevyI never got past the monad barrier
19:40:32dom96I don't think I did either.
19:40:43dom96All my haskell code tries to use as little monads as possible :P
19:41:00shevyhaskell is a really strange language, I never felt as if I understood really much at all
19:41:24shevyand then this ghci thing... that is about 100 MB in size
19:41:41shevyin .tar.bz2 format
19:42:17dom96heh, yeah. ghc is pretty big.
19:43:03Araqthe haskell compiler is the one I understood the least :-)
19:43:17AraqI tried to read its code once ;-)
19:43:19NafaiI <3 Haskell, though I still don't completely understand it
19:43:32shevymy compiled ruby, in .tar.bz2 form packaged, and compiled (i.e. a backup of my ruby binary and associated files), is .. ack... 59 MB ... odd
19:43:32NafaiIt's my preferred language
19:44:01shevyoh, I packaged two ruby versions
19:44:04dom96I still feel bad for not maintaining my Haskell projects
19:44:26dom96Even though one of them has the largest 'stargazers' (lol) count out of all of my projects
19:44:51Araqwatchers are now "stargazers"?
19:44:52shevystargazer?
19:44:56dom96Araq: yep
19:45:02Araqgithub is crazy
19:45:10dom96perhaps
19:45:19Araqthe watcher thing made sense
19:45:22dom96shevy: Nimrod is like ~9mb
19:45:47Araqa minimal nimrod version is ~2 MB
19:46:06dom96Araq: meh, currently it hasn't really annoyed me so I will attribute all the hate I see to the fact that people always hate change.
19:46:45Araqit's not because it changed
19:46:57Araqit's because it was obviously a marketing decision
19:47:10Araqand marketing doesn't understand programmers ;-)
19:47:23Araqso they came up with "stargazer"
19:47:57AraqNafai: any experience with large haskell projects?
19:51:52shevydom96, depends on the type of change
19:51:56dom96Araq: I really need to make a start on this. If I don't I will do no work :P (Generalizing asyncio)
19:52:10shevyin ruby, I hated the encoding change the most, because it gave me nothing I needed to have, but a lot of headache
19:52:18shevythe syntax changes, I did not mind much at all on the other hand
19:52:33dom96Araq: meh, I was going to ask you for help but I suppose you don't really know how the API works currently so... D:
19:53:12Araqall I know is that you need to get rid of the explict environment PObject stuff in the callbacks
19:53:13dom96shevy: Sure, but I think it is human nature to be opposed to change.
19:53:27Araqdom96: and use closures instead for them
19:53:34dom96shevy: Every time Facebook changes something there is a big outcry, but after a while people just stop whining.
19:53:35Araqand then you're done
19:53:52dom96Araq: That's not what I mean by 'generalizing'
19:54:11Araqshevy: indeed the unicode stuff was most annoying in python's update too
19:54:16dom96The interface is socket specific currently, it shouldn't be.
19:54:23Araqomg
19:54:29Araqyes it should
19:54:34Araqdon't generalize it please
19:54:46dom96why?
19:54:49shevydom96, well. I considered giving up on ruby because of Encoding
19:54:52dom96It's asyncio not asyncsock
19:55:01Araqbecause it never really works
19:55:09Araqfine
19:55:21Araqrename it to asyncsockets then
19:55:24dom96lol
19:55:29shevynow keep this in mind. on the one hand I love ruby, but on the other hand, there was one single change where I would throw the whole language away and never bother with it again :)
19:55:48dom96Araq: I suppose you're right.
19:56:18dom96Araq: It shouldn't be generalized. However async file support should be added.
19:56:25Araqtrue
19:56:35Araqbut we need proper coroutines instead
19:56:47dom96Poll from GUI toolkits etc will not be able to use the same select/poll anyway so it won't matter
19:56:47Araqasync is a bad workaround
19:57:24Araqproper continuations are much better than async io
19:57:45dom96I will have to see them in action to know.
19:58:21Araqyou only need to look at nodejs to know :P
19:58:35Araqthe callback heavy style is ugly
19:59:09dom96Problem is I've never used continuations in any language.
19:59:12Araqbasically they transform the program into continuation passing style (CPS) *manually*
19:59:19dom96Not entirely sure how they work
19:59:47Araqof course that doesn't keep the industry from hyping it ...
20:00:14dom96People like using the same language for everything heh
20:00:46dom96And black magic which they don't understand but it gives them the appearance that it is automating everything so it saves them time.
20:01:16shevyyeah
20:01:27shevyit is a lot easier to have the brain focus on one language and know it very well, and "think" in that language
20:02:44dom96That's why we will have a C backend and a JS backend.
20:02:54dom96And then I will write some nice black magic to tie it all together :P
20:06:18shevyhehe
20:06:37dom96Jester already provides some nice magic :D
20:07:20Araqbtw my next pushed will break stuff
20:07:23Araq*pushes
20:10:37dom96Awww D:
20:11:26shevyyes
20:11:30shevyonly breaking pushes are good pushes
20:12:35Araqno I mean I'll break lots of tests and then fix the compiler to make them green again as I'm too lazy to run the tester on my machine :P
20:13:17dom96nimbuild -- the lazy man's tool of success
20:13:44Araqchanges that break currently allowed code will come later :P
20:13:57dom96Not cool man :P
20:14:47Araqbut it'll fix your "x" in "xyz" bug ;-)
20:16:36*Trix[a]r_za is now known as Trixar_za
20:16:43dom96yay
20:20:10Trixar_zaBtw dom96
20:20:19Trixar_zaHow are you doing the logs page?
20:20:30Trixar_zaSo it shows the latest log when you connect to it
20:20:39dom96:D
20:20:58dom96I save the latest logs to index.html and <date>.html ;)
20:21:02shevyoh man
20:21:08shevyI read "dogs" rather than "logs" for a moment
20:21:26Trixar_zaCan't pull that trick :/
20:21:29Trixar_zaBleh, I hate php
20:21:50dom96Trixar_za: Use Nimrod man.
20:23:32Trixar_zaYeah Yeah, I have to rewrite this IRC Logger Bot anyway
20:23:43Trixar_zaIt's originally written in Java
20:23:49shevyhehehe
20:23:58dom96Trixar_za: Kill it with fire.
20:24:26Trixar_zahttp://irc.slitaz.org/
20:24:27Trixar_za:P
20:24:39Trixar_zaAnd yes, my php and java skills are questionable
20:25:43dom96I might some time rewrite ElysiaBot in Nimrod. Its basic idea is plugins in any programming language.
20:25:56dom96Originally written in Haskell :P
20:25:57AraqTrixar_za: that's nothing to be ashamed of ;-)
20:26:46Trixar_zaWell, I solve most problems like a Gordian knot
20:26:48Trixar_zaI cheat
20:26:49Trixar_za:P
20:28:21Trixar_zaOuch, my grammar sucks
20:29:52AraqTrixar_za: copied my english, hm? :P
20:32:01*JStoker quit (Excess Flood)
20:41:44dom96http://i.imgur.com/pbmtU.png :D
20:42:00dom96Programming circa 1985 :P
20:43:01Araqporn circa 1985 :P
20:44:05dom96hah
20:46:33Trixar_zaYou know
20:46:43Trixar_zaYou should remove the S (to get BOOB)
20:47:03Trixar_zathen make it move one letter back in the alphabet for each letter
20:47:05Trixar_zaANNA
20:47:06Trixar_za:P
20:47:20Trixar_zaYes, this is the shit I come up when bored with a programming language
20:53:05*JStoker joined #nimrod
21:02:48fowlhey dom96 mind taking a look at my chipmunk wrapper? there is some weirdness going on like body's not setting their mass properly and body.setPos() isnt doing anything
21:03:04dom96sure
21:16:51Trixar_zaHehehe
21:16:56Trixar_zanow for my horrible code to break
21:17:18Trixar_za if (isset($date) == False) {
21:17:18Trixar_za $date = date('Y-m-d');
21:17:18Trixar_za }
21:17:24Trixar_za^--- so sure that won't work
21:20:18Trixar_zaand it doesn't :P
21:20:36Trixar_zahttp://irc.slitaz.org/index
21:20:39Trixar_zaInteresting enough that does
21:20:40Trixar_za:/
21:24:14dom96WARNING: PHP code pasted in channel. Quarantine mode initiated.
21:24:26*dom96 kills everything with fire :P
21:24:40fowlphp is hell. even if you're proficient in it you need to keep the reference page open so you know if the function you need is strlen or str_len
21:31:05Trixar_zaI just want to know how to check if damn $date is empty :/
21:31:14Trixar_zaFuck you php, fuck you
21:31:15Trixar_za:|
21:32:00fowl$date == null ?
21:32:17fowlis_null($date)
21:33:28Trixar_zaI tried isset() and empty() so far
21:35:31Trixar_zaThank you fowl
21:35:34Trixar_zais_null worked
21:52:49dom96fowl: argh, the AUR doesn't have 6.1.1
21:55:08fowli should have said i was working off git, sry
21:55:47dom96Oh no problem.
21:56:00dom96AUR has a git package
21:56:08dom96Are you sure the git version is not buggy?
21:56:50dom96Maybe that's why you're having problems?
21:56:54fowlthe demos that built with it ran fine
21:57:13dom96ok.
22:01:16dom96Are you using sfml from git too?
22:02:52fowlyea but the 2.0 rc should work
22:04:09dom96getting this: could not import: sfImage_createMaskFromColor
22:05:23fowlthat was added after 2.0rc i believe :/
22:06:09dom96I hope your example doesn't use any of these :P
22:06:55fowlnah it doesnt use createMaskFromColor
22:07:25Araq{.deadCodeElim: on.}
22:07:30Araqfor wrappers please
22:07:33dom96mmm.
22:07:41dom96Was about to ask why it's still imported.
22:07:46Araqso you don't get import errors for functions that you don't even use ...
22:08:04dom96Why isn't dead code elimination on for everything?
22:08:16Araqdunno
22:08:20dom96Well I guess it's good to make sure you don't make importc errors.
22:08:31Araqperhaps
22:08:42Araqreason is mostly historical I guess
22:09:44dom96fowl: I got it running.
22:09:54dom96So I'm guessing the blue ball should bounce off the white line? :P
22:10:42fowlyea also the balls should be positioned randomly when they're created but setPos(body, pos) doesnt want to do anything
22:11:01Araqpastebin setpos please
22:11:23fowlproc setPos*(body: PBody; pos: TVector) {.cdecl, importc: "cpBodySetPos", dynlib: Lib.}
22:14:07AraqTVector may be passed by ref ...
22:14:21Araqthere is a pragma to force by cop
22:14:26Araqlet me look it up
22:23:50Trixar_zaI would love to meet the woman that would cosplay as Chapter 1 Angora from The Meek webcomic
22:24:02Trixar_za(In chapter 1 she mostly runs around naked :/)
22:24:27dom96I would love to meet a that would cosplay at all
22:24:31dom96*a woman
22:24:44dom96You know you're tired when you miss words from sentences D:
22:24:44Trixar_zaMe to for that matter
22:24:52dom96I knew one.
22:24:56dom96Turned out to be a bitch :P
22:28:03Trixar_zalol
22:43:50dom96Well I need to sleep
22:43:54dom96See you tomorrow guys
22:44:50Araqarg
22:45:17Araqfowl: apparently there is only a pragma to enforce 'byref', not 'bycopy' ... :-/
22:45:46Araqwhat's TVector's size?
22:50:49fowltvector is two cpfloats, cpfloats are cdouble or cfloat
22:50:59fowldepending on how chipmunk is built
22:51:40Araqhm you're lucky then
22:51:43*q66 quit (Quit: Quit)
22:51:46Araqnimrod uses bycopy for those
22:52:06AraqI hope TVector is .final, pure?
22:52:11Araqor a tuple?
22:52:41fowlyea its final pure
22:53:25Araqor you on windows or linux?
22:53:30fowllinux
22:53:31Araq*are
22:53:40Araqhm
22:54:18fowlalso getPos(body) returns the correct position (though it is just an accessor)
22:55:13Araqcan you check the generated C code?
22:55:29Araqit helps to use -d:release to make the generated code more readable ;-)
22:59:39*q66 joined #nimrod
23:00:21fowlI think this is TVector: static N_INLINE(tvector61214, newvector_62099)(double x, double y);
23:00:56Araqnah
23:01:02Araqthat's newvector
23:03:23Araqtvector61214 is TVector
23:05:09fowlits struct tvector61214 { double X; double Y; };
23:07:58Araqwell can't see what's wrong with it ...
23:24:06fowldarn
23:24:51Araqbut you should show me the call to setpos
23:25:27Trixar_zaNight all
23:25:34Araqgood night Trixar_za
23:26:08*Trixar_za is now known as Trix[a]r_za
23:26:40fowlhttps://github.com/fowlmouth/nimrod-chipmunk/blob/master/examples/chipmunk_test.nim#L63
23:32:41Araqyou don't need '$' in 'echo' btw
23:35:17Araqpos is set to random numbers...
23:35:54fowlbut the balls still come from (0, 0)
23:36:06Araqare you sure it's within the proper range?
23:37:17fowlwhat?
23:38:30Araqforget it, try to set 'body.p' directly instead
23:38:45AraqI guess TBody.p is the position?
23:39:11fowlyep
23:39:13fowlthat works
23:39:59fowlthis is chipmunk's cpbodysetpos: https://gist.github.com/0dc399b1ecc5a335dd63
23:40:02Araqstrange ...
23:40:27Araqdunno what cpBodyActivate does
23:40:40Araqnor cpBodyAssertSane
23:41:14Araqif it weren't linux, I'd say you got the calling convention wrong ...
23:41:39Araqbut I have to sleep now
23:41:42Araqgood night
23:41:54fowlnight