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:09 | reactormonk | how do I interact with JS btw? |
17:50:10 | dom96 | reactormonk: Take a look at times.nim or one of the other module that interfaces with JS |
17:50:18 | dom96 | IIRC it's just `importc` |
17:52:20 | shevy | honk honk |
17:52:32 | reactormonk | TTime* {.final, importc.} = object |
17:52:33 | reactormonk | getDay: proc (): int |
17:52:56 | reactormonk | so I can use TTime#getDay ? |
17:55:23 | reactormonk | The final pragma can be used for an object type to specify that it cannot be inherited from. |
17:55:25 | reactormonk | :-/ |
17:55:37 | dom96 | hrm |
17:55:39 | reactormonk | why does this exist at all? |
17:56:16 | dom96 | So that you can access JS' time functions |
17:56:23 | dom96 | proc newDate(): TTime {.importc: "new Date", nodecl.} |
17:56:33 | dom96 | I suppose the `Date` object has those functions. |
17:56:48 | dom96 | What do you want to do? |
17:57:35 | reactormonk | let's say I want to create my own dates n stuff :-) |
17:58:16 | dom96 | The times module is meant to work the same way for both the C and JS backend I believe |
17:58:21 | dom96 | As is all the of the stdlib heh |
17:58:25 | dom96 | *of the |
17:59:48 | dom96 | I guess you want to know how you can create your own module though for JS. |
18:00:01 | reactormonk | indeed |
18:00:07 | reactormonk | and interact with nodejs, per example |
18:00:52 | reactormonk | although opa looks quite predefined for what I want to achieve :-) |
18:01:01 | dom96 | Well I can't say I have lots of experience with Nimrod's JS backend. |
18:01:09 | dom96 | (Don't you dare use Opa!!) :P |
18:01:38 | dom96 | I'll help you in a sec. brb need to get pizza out of oven |
18:05:22 | reactormonk | why u no like opa? :-) |
18:07:44 | dom96 | I am devoted to Nimrod. |
18:07:58 | dom96 | All other languages are blasphemy :P |
18:08:17 | dom96 | reactormonk: Ok, so what exactly do you want to create? (or is it some kind of a secret project?) |
18:16:32 | reactormonk | nah, just some gaming stuff |
18:16:41 | reactormonk | and gotta go for now |
18:16:53 | reactormonk | iirc, it's github.com/Tass/summoner_wars (or something similar) |
18:18:43 | dom96 | ok |
18:21:16 | * | reactormonk quit (Ping timeout: 245 seconds) |
18:56:04 | Araq | hi guys |
18:56:21 | Araq | the JS backend is documented a bit now: |
18:56:40 | Araq | http://build.nimrod-code.org/docs/nimrodc.html#the-ecmascript-target |
18:57:56 | dom96 | hey |
19:19:47 | dom96 | We really need JS backend tests |
19:19:53 | dom96 | We really need many things. |
19:20:05 | dom96 | Araq: I read some stuff about Rust's traits. |
19:20:42 | dom96 | If 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:55 | Araq | course it works out |
19:22:03 | Araq | I have a test working :P |
19:22:40 | Araq | and rust's traits are very similar to go's interfaces afaik |
19:24:32 | dom96 | Is that a good or a bad thing? heh |
19:26:18 | dom96 | http://www.lazarus.freepascal.org/index.php/topic,17717.html |
19:27:06 | Araq | ah finally |
19:27:29 | Araq | too bad they are about 8 years too late ;-) |
19:27:41 | dom96 | heh |
19:27:47 | Araq | everybody has switched to C# by now ... |
19:28:38 | dom96 | All the companies behind Pascal lost to Microsoft I suppose |
19:28:46 | * | dom96 does not know the history at all |
19:29:35 | dom96 | People are still using it though. |
19:30:03 | dom96 | I only attempted to use Pascal once, and the first thing I did was try to use sockets. |
19:30:11 | dom96 | As you would assume of me heh |
19:30:16 | dom96 | And I was disappointed |
19:31:23 | Araq | wow but at least you tried it ;-) |
19:32:31 | dom96 | Yep, it was my "finding new languages" era. |
19:32:36 | dom96 | I went through many. |
19:32:57 | dom96 | Haskell stuck. And then Nimrod did ;) |
19:40:11 | shevy | haskell |
19:40:16 | shevy | I never got past the monad barrier |
19:40:32 | dom96 | I don't think I did either. |
19:40:43 | dom96 | All my haskell code tries to use as little monads as possible :P |
19:41:00 | shevy | haskell is a really strange language, I never felt as if I understood really much at all |
19:41:24 | shevy | and then this ghci thing... that is about 100 MB in size |
19:41:41 | shevy | in .tar.bz2 format |
19:42:17 | dom96 | heh, yeah. ghc is pretty big. |
19:43:03 | Araq | the haskell compiler is the one I understood the least :-) |
19:43:17 | Araq | I tried to read its code once ;-) |
19:43:19 | Nafai | I <3 Haskell, though I still don't completely understand it |
19:43:32 | shevy | my 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:32 | Nafai | It's my preferred language |
19:44:01 | shevy | oh, I packaged two ruby versions |
19:44:04 | dom96 | I still feel bad for not maintaining my Haskell projects |
19:44:26 | dom96 | Even though one of them has the largest 'stargazers' (lol) count out of all of my projects |
19:44:51 | Araq | watchers are now "stargazers"? |
19:44:52 | shevy | stargazer? |
19:44:56 | dom96 | Araq: yep |
19:45:02 | Araq | github is crazy |
19:45:10 | dom96 | perhaps |
19:45:19 | Araq | the watcher thing made sense |
19:45:22 | dom96 | shevy: Nimrod is like ~9mb |
19:45:47 | Araq | a minimal nimrod version is ~2 MB |
19:46:06 | dom96 | Araq: 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:45 | Araq | it's not because it changed |
19:46:57 | Araq | it's because it was obviously a marketing decision |
19:47:10 | Araq | and marketing doesn't understand programmers ;-) |
19:47:23 | Araq | so they came up with "stargazer" |
19:47:57 | Araq | Nafai: any experience with large haskell projects? |
19:51:52 | shevy | dom96, depends on the type of change |
19:51:56 | dom96 | Araq: I really need to make a start on this. If I don't I will do no work :P (Generalizing asyncio) |
19:52:10 | shevy | in ruby, I hated the encoding change the most, because it gave me nothing I needed to have, but a lot of headache |
19:52:18 | shevy | the syntax changes, I did not mind much at all on the other hand |
19:52:33 | dom96 | Araq: 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:12 | Araq | all I know is that you need to get rid of the explict environment PObject stuff in the callbacks |
19:53:13 | dom96 | shevy: Sure, but I think it is human nature to be opposed to change. |
19:53:27 | Araq | dom96: and use closures instead for them |
19:53:34 | dom96 | shevy: Every time Facebook changes something there is a big outcry, but after a while people just stop whining. |
19:53:35 | Araq | and then you're done |
19:53:52 | dom96 | Araq: That's not what I mean by 'generalizing' |
19:54:11 | Araq | shevy: indeed the unicode stuff was most annoying in python's update too |
19:54:16 | dom96 | The interface is socket specific currently, it shouldn't be. |
19:54:23 | Araq | omg |
19:54:29 | Araq | yes it should |
19:54:34 | Araq | don't generalize it please |
19:54:46 | dom96 | why? |
19:54:49 | shevy | dom96, well. I considered giving up on ruby because of Encoding |
19:54:52 | dom96 | It's asyncio not asyncsock |
19:55:01 | Araq | because it never really works |
19:55:09 | Araq | fine |
19:55:21 | Araq | rename it to asyncsockets then |
19:55:24 | dom96 | lol |
19:55:29 | shevy | now 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:48 | dom96 | Araq: I suppose you're right. |
19:56:18 | dom96 | Araq: It shouldn't be generalized. However async file support should be added. |
19:56:25 | Araq | true |
19:56:35 | Araq | but we need proper coroutines instead |
19:56:47 | dom96 | Poll from GUI toolkits etc will not be able to use the same select/poll anyway so it won't matter |
19:56:47 | Araq | async is a bad workaround |
19:57:24 | Araq | proper continuations are much better than async io |
19:57:45 | dom96 | I will have to see them in action to know. |
19:58:21 | Araq | you only need to look at nodejs to know :P |
19:58:35 | Araq | the callback heavy style is ugly |
19:59:09 | dom96 | Problem is I've never used continuations in any language. |
19:59:12 | Araq | basically they transform the program into continuation passing style (CPS) *manually* |
19:59:19 | dom96 | Not entirely sure how they work |
19:59:47 | Araq | of course that doesn't keep the industry from hyping it ... |
20:00:14 | dom96 | People like using the same language for everything heh |
20:00:46 | dom96 | And 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:16 | shevy | yeah |
20:01:27 | shevy | it is a lot easier to have the brain focus on one language and know it very well, and "think" in that language |
20:02:44 | dom96 | That's why we will have a C backend and a JS backend. |
20:02:54 | dom96 | And then I will write some nice black magic to tie it all together :P |
20:06:18 | shevy | hehe |
20:06:37 | dom96 | Jester already provides some nice magic :D |
20:07:20 | Araq | btw my next pushed will break stuff |
20:07:23 | Araq | *pushes |
20:10:37 | dom96 | Awww D: |
20:11:26 | shevy | yes |
20:11:30 | shevy | only breaking pushes are good pushes |
20:12:35 | Araq | no 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:17 | dom96 | nimbuild -- the lazy man's tool of success |
20:13:44 | Araq | changes that break currently allowed code will come later :P |
20:13:57 | dom96 | Not cool man :P |
20:14:47 | Araq | but it'll fix your "x" in "xyz" bug ;-) |
20:16:36 | * | Trix[a]r_za is now known as Trixar_za |
20:16:43 | dom96 | yay |
20:20:10 | Trixar_za | Btw dom96 |
20:20:19 | Trixar_za | How are you doing the logs page? |
20:20:30 | Trixar_za | So it shows the latest log when you connect to it |
20:20:39 | dom96 | :D |
20:20:58 | dom96 | I save the latest logs to index.html and <date>.html ;) |
20:21:02 | shevy | oh man |
20:21:08 | shevy | I read "dogs" rather than "logs" for a moment |
20:21:26 | Trixar_za | Can't pull that trick :/ |
20:21:29 | Trixar_za | Bleh, I hate php |
20:21:50 | dom96 | Trixar_za: Use Nimrod man. |
20:23:32 | Trixar_za | Yeah Yeah, I have to rewrite this IRC Logger Bot anyway |
20:23:43 | Trixar_za | It's originally written in Java |
20:23:49 | shevy | hehehe |
20:23:58 | dom96 | Trixar_za: Kill it with fire. |
20:24:26 | Trixar_za | http://irc.slitaz.org/ |
20:24:27 | Trixar_za | :P |
20:24:39 | Trixar_za | And yes, my php and java skills are questionable |
20:25:43 | dom96 | I might some time rewrite ElysiaBot in Nimrod. Its basic idea is plugins in any programming language. |
20:25:56 | dom96 | Originally written in Haskell :P |
20:25:57 | Araq | Trixar_za: that's nothing to be ashamed of ;-) |
20:26:46 | Trixar_za | Well, I solve most problems like a Gordian knot |
20:26:48 | Trixar_za | I cheat |
20:26:49 | Trixar_za | :P |
20:28:21 | Trixar_za | Ouch, my grammar sucks |
20:29:52 | Araq | Trixar_za: copied my english, hm? :P |
20:32:01 | * | JStoker quit (Excess Flood) |
20:41:44 | dom96 | http://i.imgur.com/pbmtU.png :D |
20:42:00 | dom96 | Programming circa 1985 :P |
20:43:01 | Araq | porn circa 1985 :P |
20:44:05 | dom96 | hah |
20:46:33 | Trixar_za | You know |
20:46:43 | Trixar_za | You should remove the S (to get BOOB) |
20:47:03 | Trixar_za | then make it move one letter back in the alphabet for each letter |
20:47:05 | Trixar_za | ANNA |
20:47:06 | Trixar_za | :P |
20:47:20 | Trixar_za | Yes, this is the shit I come up when bored with a programming language |
20:53:05 | * | JStoker joined #nimrod |
21:02:48 | fowl | hey 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:04 | dom96 | sure |
21:16:51 | Trixar_za | Hehehe |
21:16:56 | Trixar_za | now for my horrible code to break |
21:17:18 | Trixar_za | if (isset($date) == False) { |
21:17:18 | Trixar_za | $date = date('Y-m-d'); |
21:17:18 | Trixar_za | } |
21:17:24 | Trixar_za | ^--- so sure that won't work |
21:20:18 | Trixar_za | and it doesn't :P |
21:20:36 | Trixar_za | http://irc.slitaz.org/index |
21:20:39 | Trixar_za | Interesting enough that does |
21:20:40 | Trixar_za | :/ |
21:24:14 | dom96 | WARNING: PHP code pasted in channel. Quarantine mode initiated. |
21:24:26 | * | dom96 kills everything with fire :P |
21:24:40 | fowl | php 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:05 | Trixar_za | I just want to know how to check if damn $date is empty :/ |
21:31:14 | Trixar_za | Fuck you php, fuck you |
21:31:15 | Trixar_za | :| |
21:32:00 | fowl | $date == null ? |
21:32:17 | fowl | is_null($date) |
21:33:28 | Trixar_za | I tried isset() and empty() so far |
21:35:31 | Trixar_za | Thank you fowl |
21:35:34 | Trixar_za | is_null worked |
21:52:49 | dom96 | fowl: argh, the AUR doesn't have 6.1.1 |
21:55:08 | fowl | i should have said i was working off git, sry |
21:55:47 | dom96 | Oh no problem. |
21:56:00 | dom96 | AUR has a git package |
21:56:08 | dom96 | Are you sure the git version is not buggy? |
21:56:50 | dom96 | Maybe that's why you're having problems? |
21:56:54 | fowl | the demos that built with it ran fine |
21:57:13 | dom96 | ok. |
22:01:16 | dom96 | Are you using sfml from git too? |
22:02:52 | fowl | yea but the 2.0 rc should work |
22:04:09 | dom96 | getting this: could not import: sfImage_createMaskFromColor |
22:05:23 | fowl | that was added after 2.0rc i believe :/ |
22:06:09 | dom96 | I hope your example doesn't use any of these :P |
22:06:55 | fowl | nah it doesnt use createMaskFromColor |
22:07:25 | Araq | {.deadCodeElim: on.} |
22:07:30 | Araq | for wrappers please |
22:07:33 | dom96 | mmm. |
22:07:41 | dom96 | Was about to ask why it's still imported. |
22:07:46 | Araq | so you don't get import errors for functions that you don't even use ... |
22:08:04 | dom96 | Why isn't dead code elimination on for everything? |
22:08:16 | Araq | dunno |
22:08:20 | dom96 | Well I guess it's good to make sure you don't make importc errors. |
22:08:31 | Araq | perhaps |
22:08:42 | Araq | reason is mostly historical I guess |
22:09:44 | dom96 | fowl: I got it running. |
22:09:54 | dom96 | So I'm guessing the blue ball should bounce off the white line? :P |
22:10:42 | fowl | yea also the balls should be positioned randomly when they're created but setPos(body, pos) doesnt want to do anything |
22:11:01 | Araq | pastebin setpos please |
22:11:23 | fowl | proc setPos*(body: PBody; pos: TVector) {.cdecl, importc: "cpBodySetPos", dynlib: Lib.} |
22:14:07 | Araq | TVector may be passed by ref ... |
22:14:21 | Araq | there is a pragma to force by cop |
22:14:26 | Araq | let me look it up |
22:23:50 | Trixar_za | I would love to meet the woman that would cosplay as Chapter 1 Angora from The Meek webcomic |
22:24:02 | Trixar_za | (In chapter 1 she mostly runs around naked :/) |
22:24:27 | dom96 | I would love to meet a that would cosplay at all |
22:24:31 | dom96 | *a woman |
22:24:44 | dom96 | You know you're tired when you miss words from sentences D: |
22:24:44 | Trixar_za | Me to for that matter |
22:24:52 | dom96 | I knew one. |
22:24:56 | dom96 | Turned out to be a bitch :P |
22:28:03 | Trixar_za | lol |
22:43:50 | dom96 | Well I need to sleep |
22:43:54 | dom96 | See you tomorrow guys |
22:44:50 | Araq | arg |
22:45:17 | Araq | fowl: apparently there is only a pragma to enforce 'byref', not 'bycopy' ... :-/ |
22:45:46 | Araq | what's TVector's size? |
22:50:49 | fowl | tvector is two cpfloats, cpfloats are cdouble or cfloat |
22:50:59 | fowl | depending on how chipmunk is built |
22:51:40 | Araq | hm you're lucky then |
22:51:43 | * | q66 quit (Quit: Quit) |
22:51:46 | Araq | nimrod uses bycopy for those |
22:52:06 | Araq | I hope TVector is .final, pure? |
22:52:11 | Araq | or a tuple? |
22:52:41 | fowl | yea its final pure |
22:53:25 | Araq | or you on windows or linux? |
22:53:30 | fowl | linux |
22:53:31 | Araq | *are |
22:53:40 | Araq | hm |
22:54:18 | fowl | also getPos(body) returns the correct position (though it is just an accessor) |
22:55:13 | Araq | can you check the generated C code? |
22:55:29 | Araq | it helps to use -d:release to make the generated code more readable ;-) |
22:59:39 | * | q66 joined #nimrod |
23:00:21 | fowl | I think this is TVector: static N_INLINE(tvector61214, newvector_62099)(double x, double y); |
23:00:56 | Araq | nah |
23:01:02 | Araq | that's newvector |
23:03:23 | Araq | tvector61214 is TVector |
23:05:09 | fowl | its struct tvector61214 { double X; double Y; }; |
23:07:58 | Araq | well can't see what's wrong with it ... |
23:24:06 | fowl | darn |
23:24:51 | Araq | but you should show me the call to setpos |
23:25:27 | Trixar_za | Night all |
23:25:34 | Araq | good night Trixar_za |
23:26:08 | * | Trixar_za is now known as Trix[a]r_za |
23:26:40 | fowl | https://github.com/fowlmouth/nimrod-chipmunk/blob/master/examples/chipmunk_test.nim#L63 |
23:32:41 | Araq | you don't need '$' in 'echo' btw |
23:35:17 | Araq | pos is set to random numbers... |
23:35:54 | fowl | but the balls still come from (0, 0) |
23:36:06 | Araq | are you sure it's within the proper range? |
23:37:17 | fowl | what? |
23:38:30 | Araq | forget it, try to set 'body.p' directly instead |
23:38:45 | Araq | I guess TBody.p is the position? |
23:39:11 | fowl | yep |
23:39:13 | fowl | that works |
23:39:59 | fowl | this is chipmunk's cpbodysetpos: https://gist.github.com/0dc399b1ecc5a335dd63 |
23:40:02 | Araq | strange ... |
23:40:27 | Araq | dunno what cpBodyActivate does |
23:40:40 | Araq | nor cpBodyAssertSane |
23:41:14 | Araq | if it weren't linux, I'd say you got the calling convention wrong ... |
23:41:39 | Araq | but I have to sleep now |
23:41:42 | Araq | good night |
23:41:54 | fowl | night |