00:00:00 | ryeguy | lol that's true |
00:00:03 | ryeguy | those are amusing to read |
00:00:08 | filwit | i have a good idea: we combined popular things: 4Chan raids + Rails articles |
00:00:16 | eigenlicht | I guess they are mad by nature |
00:00:26 | filwit | so.. we storm different IRC channels with pro-nimrod supporters |
00:00:30 | ryeguy | hire 4chan as a marketing firm for your language. what could go wrong? |
00:00:36 | filwit | ^ LOL |
00:00:42 | filwit | that would backfire so fast... |
00:00:46 | IrvMG | Hello, How to create a sha1? |
00:01:07 | Araq | IrvMG: that's a good question. BitPuffin knows the details, I think. |
00:02:43 | ryeguy | you guys want some entertainment? read the blogpost when reddit was rewritten in python (from lisp): http://web.archive.org/web/20060206133929/http://reddit.com/blog/2005/12/night-of-living-python.html |
00:03:45 | ryeguy | the comments, i meant |
00:04:31 | filwit | Reddit was once written in Lisp? |
00:04:36 | ryeguy | yes originally |
00:04:52 | filwit | still python? |
00:04:54 | ryeguy | yes |
00:04:59 | ryeguy | hacker news is written in Arc |
00:05:12 | ryeguy | which is pg's never-finished lisp dialect |
00:05:16 | filwit | new goal: get reddit to rewrite to Nimrod |
00:05:23 | eigenlicht | ryeguy: do you have the link to the article explaining why they chose python? |
00:06:21 | ryeguy | eigenlicht: http://www.codinghorror.com/blog/2007/04/reddit-language-vs-platform.html |
00:07:09 | ryeguy | wait, here's the original post: http://blog.reddit.com/2005/12/on-lisp.html |
00:07:21 | eigenlicht | ryeguy: thanks |
00:07:52 | IrvMG | I need to create a sha1 and "working my websocket" u.u |
00:09:45 | BitPuffin | IrvMG: there is a sha1 package in babel |
00:09:50 | dom96 | IrvMG: OrionPKM can help you |
00:10:06 | dom96 | He wrote a websocket lib IIRC |
00:10:12 | BitPuffin | yep he did :D |
00:10:19 | BitPuffin | and I nagged him to put the sha1 implementation in babel |
00:10:21 | BitPuffin | and he did |
00:13:09 | BitPuffin | boom!! Orthogonalization is IN LINAGL! :D |
00:13:41 | BitPuffin | it was kind of tricky to implement |
00:15:08 | OrionPKM | I have a web socket implementation but it requires modifications to the stdlib of Nimrod to work |
00:15:32 | fowl | we need more drama: http://antirez.com/news/64 |
00:15:40 | OrionPKM | so I'm not open sourcing it until sockets and events are fixed |
00:16:09 | BitPuffin | OrionPKM: pull requests? |
00:16:18 | Araq | OrionPKM: well it would surely help if |
00:16:26 | Araq | a) you told us you had *that* |
00:16:42 | OrionPKM | I did |
00:16:45 | Araq | b) you could make it work without breaking our 'select' |
00:16:46 | BitPuffin | Have I become the official crypto guy of nimrod or what :/ |
00:16:54 | BitPuffin | haha |
00:17:00 | OrionPKM | select is backwards, remember? |
00:17:07 | Araq | oh I do |
00:17:34 | OrionPKM | and it does work but with ugly work arounds |
00:17:45 | Araq | but a workaround should be possible, like import fixed_select |
00:17:56 | Araq | and then later we can sort it out |
00:18:01 | OrionPKM | yeah work around which is why I'm not releasing the source because it has work arounds |
00:18:22 | Araq | well there are ugly workarounds and acceptable workarounds |
00:19:02 | OrionPKM | if someone really needs to use it I will give it to them but I will not put it up on babel |
00:19:35 | fowl | wtf is websockets |
00:19:57 | OrionPKM | it is technically open source right now, it's up on my github repo |
00:20:02 | Araq | well we need to find a solution here. people love websockets, we have them but then not really yet |
00:20:25 | OrionPKM | also |
00:20:30 | OrionPKM | that memory leak was an issue |
00:20:33 | OrionPKM | besides the select issue |
00:20:45 | Araq | well I couldn't reproduce it on linux |
00:20:50 | OrionPKM | i know |
00:21:11 | OrionPKM | https://github.com/onionhammer/onion-nimrod/tree/master/websockets |
00:21:59 | * | IrvMG quit (Ping timeout: 260 seconds) |
00:23:23 | ryeguy | why is there a C and an llvm backend? |
00:23:29 | ryeguy | is either going away? |
00:23:33 | Araq | there is no llvm backend |
00:23:44 | ryeguy | was there? |
00:23:48 | Araq | I started an llvm backend once |
00:24:00 | Araq | it was never finished |
00:24:03 | fowl | ryeguy, you can use clang |
00:24:16 | ryeguy | oh, ok. Just saw a mention of 'llvm backend' leftover in teh docs. |
00:25:47 | NimBot | Araq/Nimrod master 81ba55c Grzegorz Adam Hankiewicz [+0 ±1 -0]: Clarifies wording of newSeq proc docstrings. |
00:25:47 | NimBot | Araq/Nimrod master f967520 Andreas Rumpf [+0 ±1 -0]: Merge pull request #684 from gradha/pr_clarifies_docs... 2 more lines |
00:27:10 | BitPuffin | I really gotta get this whole notifications thing working |
00:27:13 | BitPuffin | or should I |
00:27:15 | BitPuffin | hmm |
00:27:17 | BitPuffin | :P |
00:27:25 | BitPuffin | nope not worth the time atm |
00:33:29 | OrionPKM | so I think my next project might be a better nim plugin for sublime text |
00:40:11 | BitPuffin | I think I'm gonna go to bed |
00:40:16 | BitPuffin | and read some of Real time rendering |
00:40:20 | OrionPKM | night |
00:40:37 | BitPuffin | then tomorrow I'm gonna add all the transformation stuffs to linagl |
00:40:45 | BitPuffin | I consider matrices fairly complete right now |
00:40:56 | BitPuffin | for the moment I'm skipping eigenvalues etc |
00:42:46 | Araq | er dom96 ... when are we gonna prune the git history again? |
00:43:45 | dom96 | dunno |
00:44:05 | Araq | I don't think this will get easier as time passes |
00:44:29 | dom96 | Still need to learn about the drawbacks of doing it. |
00:44:39 | dom96 | Chances are there are many. |
00:44:58 | Araq | sure. Git is a git. |
00:46:53 | filwit | does 'git' mean something in German that it doesn't in english? |
00:47:11 | ryeguy | filwit: http://www.urbandictionary.com/define.php?term=git |
00:47:20 | dom96 | It's actually a British thing |
00:47:37 | filwit | ah, okay |
00:48:11 | BitPuffin | yeah linagl actually seems to offer more matrix stuff than some of its competitors if you don't count the 3d stuff that will be added tomorrow (glm, gl3n) |
00:49:08 | BitPuffin | and truly supports N-Dimensionalness :P |
00:49:12 | BitPuffin | anyways goodnight! |
00:49:32 | fowl | gn |
00:49:33 | Araq | same here, good night |
00:51:24 | dom96 | same here too, 'night. |
00:52:43 | OrionPKM | everyone is leaving me alone :'( |
00:53:02 | * | BitPuffin quit (Quit: WeeChat 0.4.2) |
01:03:51 | * | IrvMG joined #nimrod |
01:12:00 | * | EXetoC quit (Quit: WeeChat 0.4.2) |
01:16:02 | * | Amrykid quit (Excess Flood) |
01:16:19 | * | Amrykid joined #nimrod |
01:29:57 | * | brson joined #nimrod |
01:33:50 | * | gsp quit (Ping timeout: 264 seconds) |
01:48:14 | * | brson quit (Ping timeout: 240 seconds) |
01:49:42 | * | Varaway joined #nimrod |
01:49:54 | * | Varaway is now known as Varriount |
01:50:28 | * | brson joined #nimrod |
01:52:39 | IrvMG | Nimrod 0.9.3 ? |
01:52:54 | filwit | same as git head |
01:53:08 | IrvMG | From github or website? |
01:53:13 | IrvMG | ok :) |
01:53:29 | filwit | 0.9.3 is just the next version, yet to be released |
01:54:15 | fowl | noo |
01:54:25 | fowl | .odd is the working version |
01:54:30 | fowl | next version will be .4 |
01:54:57 | filwit | ahh, okay my bad |
01:55:28 | filwit | i thought you went to sleep... |
01:55:28 | filwit | lol |
01:56:17 | fowl | nah i just woke up |
01:57:21 | IrvMG | (: |
01:59:02 | Zuchto | Hi, I'm currently reading tutorial 2 and I'm wondering about the template example with the log function and debug const. How come it uses an if instead of when? "template log(msg: string) = if debug: stdout.writeln(msg)" |
02:00:54 | IrvMG | Bye |
02:00:58 | * | IrvMG quit () |
02:01:47 | fowl | Zuchto, it should probably be "when" |
02:02:11 | * | fuz joined #nimrod |
02:02:20 | * | fuz quit (Quit: Leaving) |
02:02:28 | Zuchto | oh ok, so if the expression is "const" it really is no benefit of using an if? |
02:02:57 | * | fuz joined #nimrod |
02:03:33 | filwit | if executes are runtime, when at compile-time. I don't think (but don't fully know) if there's anything special for an if statement using a const value |
02:03:49 | fuz | hello, i'm aware of a nimrod target for JS. i was wondering if it were theoretically possible to write enough templates to make it look like javascript but have it transparently optimised away by the compiler through the use of templates? |
02:04:09 | fuz | i.e, javascript source as valid nimrod |
02:04:13 | filwit | hi fuz |
02:04:43 | filwit | Nimrod is indent-style syntax, and even it's macros/templates rely on this principle |
02:05:02 | filwit | however, you could get something very close |
02:05:20 | Zuchto | even if disregarding the syntax style js has things like prototypes and this that doesn't really map as far as I know |
02:05:48 | filwit | yes, but you could recreate prototype inheritance objects |
02:06:06 | filwit | so it's possible, though i'm not sure why you would actually want to do that |
02:06:08 | fuz | you could run the 'fake nimrod code' through anchor ( http://anch.org/anchor.html ) |
02:06:19 | fuz | which are then removed for valid nimrod |
02:06:36 | fuz | mmmm |
02:07:14 | fuz | filwit, it was more of intellectual curiosity. it would let you write in javascript but get benefits from nimrod? |
02:07:48 | filwit | well, when you translate to JS, you sacrifice many of the benefits of Nimrod, simply because JS is a limited language |
02:08:27 | filwit | however, the benefit of the existing JS backend is that you can right type-checked code, with inheritance objects, etc, and have that execute in the browser through JS |
02:08:47 | filwit | i'm a bit confused as to exactly what you want to do, fuz |
02:08:57 | filwit | could you provide an example maybe? |
02:09:59 | fuz | i was thinking about writing enough templates to simulate javascript so that it felt like javascript (you could drop into nimrod when you like, perhaps) take advantage of nimrod's compacting etc |
02:10:55 | fuz | think of it as a gentle introduction into nimrod |
02:11:20 | fowl | you cant change the syntax to be based on curly braces and semicolon-ended statements |
02:11:32 | fuz | like how if you were doing scala, you might begin in java style and move toward scala |
02:11:44 | fowl | you can however write a new parser which uses javascript syntax |
02:11:48 | fuz | fowl, ahh right. i see |
02:13:07 | fuz | i wanted to see how far tempting could go |
02:13:13 | fuz | templating* |
02:14:42 | fuz | basically, i saw this http://nimrod-lang.org/talk01/slides.html#(20) and thought you've just done HAML in nimrod. |
02:14:46 | filwit | templates and macros in Nimrod can do a lot of things, but without a more concrete example of exactly what parts of JS you'd like to emulate, it's hard to judge |
02:15:10 | filwit | the one thing that cannot be done with them, is as fowl said, create curly-bracket syntax |
02:15:23 | fuz | you could use anchor for that |
02:15:27 | filwit | although even that's possible if you're willing to write the parser |
02:15:47 | fuz | i can see that you don't see the benefits or the merits |
02:16:28 | fuz | it's more of a 'for the sake of it' kind of thing |
02:16:45 | fowl | fuz, that example is within the confines of nimrod's syntax |
02:17:00 | filwit | fuz, it's not that i don't see it's merits, it's just i can't judge fully what you're willing to compromise on. I'm not sure Anchor would work, but i don't know anything about that project to comment. |
02:17:15 | fowl | fuz, there is a pluggable syntax for adding new syntaxes |
02:17:25 | fowl | pluggable parser* thing |
02:17:47 | fuz | fowl, i'll have to look into it, i have not even written my first nimrod program yet, i just wanted to see what people thought |
02:18:09 | fuz | can definitely see the power of nimrod, thought this was awesome: http://nimrod-lang.org/talk01/slides.html#(31) |
02:18:58 | fuz | thanks! |
02:19:45 | filwit | fuz, it's an interesting sounding goal. I would recommend learning a bit of Nimrod and then attempting to make what you want. |
02:20:17 | filwit | fuz, there are probably options to accomplish what you want, to one degree or another |
02:20:29 | fuz | indeed |
02:20:46 | fuz | i must sleep now; i will be back to ask questions |
02:20:55 | filwit | g'night |
02:21:04 | * | fuz quit (Quit: Leaving) |
02:33:31 | * | dymk quit (Ping timeout: 245 seconds) |
02:37:47 | * | dymk joined #nimrod |
02:42:14 | * | dymk quit (Ping timeout: 264 seconds) |
02:47:47 | * | dymk joined #nimrod |
03:00:59 | * | mflamer joined #nimrod |
03:02:25 | * | TylerE joined #nimrod |
03:02:45 | * | TylerE quit (Client Quit) |
03:07:48 | * | ryeguy quit () |
03:18:07 | * | ics joined #nimrod |
03:21:26 | * | leex quit (Ping timeout: 240 seconds) |
03:21:43 | * | C0C0_ quit (Ping timeout: 272 seconds) |
03:22:14 | * | C0C0 joined #nimrod |
03:22:15 | * | leex joined #nimrod |
03:29:22 | * | DAddYE joined #nimrod |
03:29:31 | * | DAddYE quit (Remote host closed the connection) |
03:29:38 | * | DAddYE joined #nimrod |
03:38:14 | * | datura quit (Ping timeout: 240 seconds) |
03:55:50 | * | brson quit (Ping timeout: 245 seconds) |
04:04:26 | * | dymk quit (Ping timeout: 264 seconds) |
04:11:21 | * | dymk joined #nimrod |
04:18:14 | * | dymk quit (Ping timeout: 264 seconds) |
04:18:50 | * | dymk joined #nimrod |
04:20:24 | * | DAddYE quit (Remote host closed the connection) |
04:29:58 | * | DAddYE joined #nimrod |
04:30:08 | * | DAddYE quit (Remote host closed the connection) |
04:30:12 | * | DAddYE_ joined #nimrod |
04:49:11 | * | ics quit (Ping timeout: 246 seconds) |
04:50:20 | * | ics joined #nimrod |
04:58:14 | * | mflamer quit (Ping timeout: 240 seconds) |
05:03:00 | * | ryeguy joined #nimrod |
05:09:34 | * | DAddYE_ quit (Remote host closed the connection) |
05:11:04 | ryeguy | when vs if - is it basically that a 'when' is evaluated at compile time? |
05:12:46 | fowl | yea |
05:13:04 | fowl | when is for conditional compiliation (#if/#ifdef) |
05:13:15 | ryeguy | wouldnt the equivalent 'if' just get optimized into that anyway? |
05:14:40 | ryeguy | eh i guess not, since it forces const expressions |
05:14:57 | * | mflamer joined #nimrod |
05:19:29 | fowl | if the if condition (and all the elif conditions) can be evaluated at compiletime it could be optimized away |
05:19:36 | fowl | i dont think it is currently |
05:20:06 | fowl | ryeguy, you can also use when inside an object definition |
05:20:12 | fowl | type TFoo[T] = object |
05:20:25 | fowl | when T is int: more: fields |
05:20:43 | ryeguy | thats neat |
05:20:43 | filwit | ryeguy: when doesn't introduce a scope, if does. that's also a difference |
05:21:17 | filwit | when defined(Something): |
05:21:20 | filwit | var x = 0 |
05:21:23 | filwit | x = 10 |
05:21:25 | filwit | works |
05:21:32 | mflamer | zahary_: Ping |
05:31:53 | * | DAddYE joined #nimrod |
05:31:56 | * | DAddYE quit (Remote host closed the connection) |
05:32:02 | * | DAddYE joined #nimrod |
05:32:48 | * | brson joined #nimrod |
05:34:38 | * | mflamer quit (Ping timeout: 240 seconds) |
05:49:29 | * | mflamer joined #nimrod |
05:59:05 | * | brson quit (Quit: leaving) |
05:59:49 | * | OrionPKM quit (Remote host closed the connection) |
06:03:57 | * | ryeguy quit () |
06:05:36 | * | mflamer quit (Ping timeout: 245 seconds) |
06:08:16 | * | mflamer joined #nimrod |
06:15:43 | * | OrionPKM joined #nimrod |
06:18:56 | * | mflamer quit (Ping timeout: 245 seconds) |
06:21:15 | * | OrionPKM quit (Remote host closed the connection) |
06:22:09 | * | OrionPKM joined #nimrod |
06:22:30 | * | OrionPKM quit (Remote host closed the connection) |
06:40:41 | * | filwit quit (Quit: Leaving) |
07:25:52 | fowl | http://steved-imaginaryreal.blogspot.com/2013/09/nimrod-return-of-pascal.html |
08:16:20 | brihat | thanks fowl |
08:16:55 | brihat | Is there any video talk explaining nimrod? I know Araq's slides, but they are too "heavy" for noobs like me' |
08:27:37 | * | dirkk0 joined #nimrod |
08:28:33 | fowl | brihat, araq did a talk but its not on the internet yet |
08:28:50 | fowl | brihat, i recommend the tutorials |
08:30:20 | dirkk0 | Hi, all. I have a couple of newbie questions - is this the right place to ask them? |
08:33:10 | fowl | yesh |
08:37:08 | dirkk0 | cool - thank you. I successfully compiled nimrod and babel and both seem to be working ok. my question is about how to connect the pieces in terms of modules that get imported. If I look on fowls gist here: https://gist.github.com/fowlmouth/4970500 then it imports sdl. If I try to run this, nimrod complains that there is no libSDL-1.2.0.dylib available. I take it that these are the SDL binaries that needed to be installed first? |
08:39:55 | fowl | yea |
08:40:19 | fowl | http://www.libsdl.org/download-1.2.php |
09:00:51 | * | gsp joined #nimrod |
09:10:48 | dirkk0 | ok, I did that (via configure/make/make install). now I have a /usr/local/lib/libSDL-1.2.0.dylib but not libSDL_gfx.dylib, unfortunately. I couldn't find out how to compile libSDL_gfx but found out that you can do 'brew install sdl_gfx' (I am on a Mac). It is still not working though (stack trace here: http://pastebin.com/9pqcyNW8 ) but this looks rather like a Mac vs SDL problem. |
09:17:36 | fowl | you can take sdl_gfx out of the import line, its not used |
09:21:11 | * | Jackneill joined #nimrod |
09:32:27 | dirkk0 | ok, I did. Didn't change much, though: http://pastebin.com/AnJJx0jk |
09:38:38 | fowl | it looks like its caused from SDL_SetVideoMode |
09:39:59 | fowl | can you try the binary from libsdl.org |
09:45:58 | dirkk0 | I can't see binaries there? I took the .dmg first and copied the SDL.framework over to Libraries/Frameworks - this is what needs to be done for Xcode (which I try to avoid). Then I took the .gz file and compiled via configure/make. |
09:53:30 | Araq | Zuchto: well in most logging frameworks the log level can be changed at runtime, so it can't be a "when" in the real world |
09:54:05 | Araq | the purpose of that example is to show how a template enables lazy evaluation |
10:01:48 | brihat | Morning, Araq |
10:05:35 | Araq | hi |
10:06:30 | brihat | Hope you are sane and not in hangover :) |
10:08:48 | Araq | ha, I drank a single bottle of beer yesterday |
10:22:49 | * | datura joined #nimrod |
10:22:56 | * | DAddYE quit (Remote host closed the connection) |
10:23:04 | * | DAddYE joined #nimrod |
10:28:28 | * | DAddYE quit (Remote host closed the connection) |
10:32:48 | dirkk0 | ok, I successfully compiled a minimal cpp example to check if the SDL installation works in general - it does. |
10:36:59 | * | BitPuffin joined #nimrod |
10:39:51 | * | datura quit (Ping timeout: 260 seconds) |
10:42:43 | * | zielmicha joined #nimrod |
10:54:27 | * | datura joined #nimrod |
10:54:59 | BitPuffin | good mornin |
10:55:00 | BitPuffin | or day |
10:55:03 | BitPuffin | or night |
11:01:10 | brihat | humenta |
11:01:17 | brihat | *huometa, BitPuffin |
11:01:31 | brihat | Ergh.. HUOMENTA!! |
11:02:26 | dirkk0 | @fowl from my googling it seems to have to do with the problem that SDL hijacks the main function somehow. this can partly be fixed by setting some flags in the makefile. Do you now where I can influence that in the Nimrod linking process? |
11:09:23 | fowl | dirkk0, that should only apply to static linking |
11:15:55 | * | achim joined #nimrod |
11:16:35 | zielmicha | Why {.noforward: on.} is not default? |
11:16:57 | zielmicha | Infering from description in manual it shouldn't be slower than .noforward: off., or is it? |
11:17:43 | dirkk0 | ok - any ideas on what I can do to get nearer to the problem? can nmrod compile to cpp? |
11:19:01 | dirkk0 | dumb quesion, sry - it does this already. where can i see the source? |
11:20:20 | dirkk0 | also a stipid question *sigh* -it's in nimcache. |
11:23:16 | fowl | dirkk0, the problem is if that if anybody's ever fixed this error, they havent said *how* |
11:29:24 | * | DAddYE joined #nimrod |
11:34:10 | * | DAddYE quit (Ping timeout: 245 seconds) |
11:35:31 | dirkk0 | @fowl I see. I don't think my feable c knowledge will be sufficient to solve this, but I can at least try: I copied SDLmain.h and .m into nimcache and it compiles ok. what do I need to link? I get Undefined symbols for architecture x86_64: "_Dl_83205", referenced from: _testInit in ccp0VqPg.o |
11:40:35 | fowl | ehm |
11:40:36 | fowl | idk |
11:40:49 | fowl | it will take more than putting the files into nimcache |
11:41:00 | fowl | you'll have to link with SDLmain (library) and include the header |
11:41:34 | fowl | and probably compile with objc mode instead of c |
11:49:50 | dirkk0 | @SDLmain and header include - I did that. Yes, I thought it wasn't that easy. :-) |
11:50:11 | dom96 | zielmicha: The reason it's not default is because it's still experimental. |
11:56:37 | fowl | dirkk0, try compiling normally and running with the environment variable SDL_VIDEODRIVER=x11 |
12:00:38 | fowl | if that works, there is a way to do it with SDL_putenv() you can use instead |
12:01:25 | dirkk0 | holy frag on toast! it works! |
12:02:11 | dirkk0 | do have a minimal SDL example? I am not sure what this does but I basically see only a pink-ish background. |
12:02:53 | dirkk0 | Ah - from the source this *is* a minimal SDL example. :-) |
12:03:53 | fowl | theres another one in nimrod/examples/sdlex.nim |
12:04:06 | fowl | dirkk0, now try this see if it works |
12:04:16 | dirkk0 | will do |
12:04:48 | fowl | proc SDL_putenv (var: cstring) {.importc, dynlib: "libSDL-1.2.0.dylib".} |
12:05:02 | fowl | SDL_putenv "SDL_VIDEODRIVER=x11" |
12:05:29 | dirkk0 | this one needs libSDL_image-1.2.0.dylib which I don't seem to have (yet). |
12:05:43 | dirkk0 | btw is there a reason why we use SDL1.2 over SDL2? |
12:06:03 | fowl | i have an SDL2 wrapper in the fowltek package |
12:06:18 | fowl | https://github.com/fowlmouth/nimlibs |
12:06:29 | * | zielmicha quit (Quit: Page closed) |
12:07:14 | * | zielmicha joined #nimrod |
12:07:15 | dirkk0 | oh? am I supposed to use this rather? |
12:07:52 | fowl | i would ;) |
12:08:22 | dirkk0 | @fowl hehe, ok. :-) |
12:09:38 | dirkk0 | this brings me to another stupid question: how do I install packages in general? I have babel installed in my Ubuntu test environment, but not yet on my Mac. How do I install without babel? |
12:09:52 | dirkk0 | How do I install nimlibs? |
12:10:21 | BitPuffin | dirkk0: babel install fowltek |
12:10:34 | dirkk0 | (something tells me you are working on a game engine :-) - cool! ) |
12:10:46 | dirkk0 | ok, I install babel first. |
12:10:50 | * | achim quit (Quit: Computer has gone to sleep.) |
12:10:57 | BitPuffin | fowl or me dirkk0? |
12:11:00 | BitPuffin | haha |
12:11:02 | fowl | without babel? i guess you could copy the files to ~/.babel/pkgs/fowltek-1.0/ |
12:12:00 | BitPuffin | btw, if a module uses another module, shouldn't the only thing that thing has to do is to import that other module to work? |
12:12:17 | BitPuffin | With matrix.nim (which uses vector.nim) I had to export vector to make it work externally |
12:12:43 | dirkk0 | @bitpuffin I mean fowl but are you, too? |
12:13:20 | Araq | BitPuffin: what? o.O do you have any idea of what that would cause for modularity? |
12:13:33 | BitPuffin | Araq: yeah it's ridiculous |
12:13:42 | BitPuffin | I don't wanna export vector in matrix |
12:13:50 | BitPuffin | makes it pointless to even have vector |
12:13:50 | Araq | why not? |
12:13:56 | Araq | what? |
12:14:22 | Araq | no idea what you mean. "auto export" is not a feature of any module system I'm aware of |
12:15:00 | BitPuffin | Araq: well I mean that matrix*matrix uses vector dot product, and I don't want people importing matrix to also have access to vector dot product |
12:15:07 | dirkk0 | btw - the documentation says 'However, for unknown reasons the symbolic link method does not work on MacOS X.' This here works on a Mac: sudo ln -s /Users/[USERNAME]/Nimrod/bin/nimrod /usr/bin/nimrod |
12:15:22 | BitPuffin | and matrix $ uses vector $ |
12:15:37 | Araq | dirkk0: it works depending on the phase of the moon or something like that. |
12:15:49 | * | achim joined #nimrod |
12:15:52 | BitPuffin | dirkk0: yeah but currently not anything open sauce |
12:16:20 | Araq | er BitPuffin ... sounds you want what the module system already provides ? |
12:18:04 | BitPuffin | Araq: yeah now it worked |
12:18:05 | fowl | BitPuffin, i think you could export vector.`$` only |
12:18:12 | BitPuffin | strange |
12:18:19 | dirkk0 | lol @Araq |
12:19:03 | BitPuffin | it was a while ago since I discovered the issue |
12:19:10 | BitPuffin | so to work around it I exported vector things |
12:19:15 | BitPuffin | but now when removing that it works |
12:19:17 | BitPuffin | :s |
12:19:53 | BitPuffin | oh well good |
12:19:59 | BitPuffin | I am now happy :P |
12:20:29 | dom96 | OT: RIP Paul Walker :\ |
12:21:00 | dirkk0 | @fowl ok, successfully installed babel and imported fowltek(tm). |
12:23:40 | BitPuffin | I guess in order to have the procs row and col work I need to export the type TVector |
12:24:07 | dirkk0 | @fowl you wouldn't happen to have an example handy by chance? |
12:24:32 | BitPuffin | Araq: what is preferred do you think? making it so that it at least compiles when you do mat.row and mat.col but not letting you do vector operations (other than multiplying with matrices etc) |
12:24:44 | BitPuffin | or making it not compile unless you import vector |
12:25:12 | fowl | dirkk0, there are examples in that repository |
12:25:17 | BitPuffin | dom96: wtf he's dead? |
12:25:21 | BitPuffin | dom96: he's like 3 years old what the hell |
12:25:33 | dom96 | BitPuffin: Yep. He ironically died in a car crash. |
12:26:40 | BitPuffin | can't make that stuff up |
12:26:41 | fowl | Speed was a factor in the crash, the Los Angeles County Sheriff's Office said. |
12:26:52 | Araq | BitPuffin: I'd export vector stuff from matrixes, so that it I only need to import matrix and get all the nice vector ops for free |
12:26:56 | fowl | fast? check. furious? still investigating |
12:27:54 | * | gsp quit (Ping timeout: 252 seconds) |
12:27:55 | BitPuffin | Araq: hmmmmm, I'm not sure. That's kind of strange I think when it comes to modularity |
12:28:15 | Araq | BitPuffin: or perhaps do nothing. "import vectors" ain't hard either. |
12:28:54 | BitPuffin | Araq: But then isn't export vector.TVector a nice compromise because at least it makes it so that every proc+template in matrix.nim compiles? |
12:29:11 | BitPuffin | I mean say you only want to get the translation part of a 4x4 matrix |
12:29:17 | Araq | but don't add when not defined(vectors): {.error: "you need to import vectors".} |
12:29:27 | Araq | that's what would be really strange |
12:29:40 | BitPuffin | you'd do var v = m.row(3) |
12:29:48 | BitPuffin | and then maybe you wanna multiply that by some other matrix |
12:29:50 | BitPuffin | it would work |
12:29:55 | BitPuffin | you wouldn't need vector ops for that |
12:29:57 | Araq | oh and the symbol binding rules for templates will change, mitigate your issue |
12:30:19 | BitPuffin | but if you want vector ops you should import vector |
12:30:22 | BitPuffin | seems logical to me |
12:30:32 | BitPuffin | Araq: oh in what way? |
12:31:04 | Araq | so that template t*(x): expr = x.privateField works |
12:31:27 | BitPuffin | actually it already works |
12:31:32 | BitPuffin | I just forgot to specify row idx |
12:31:34 | BitPuffin | lol |
12:32:00 | Araq | well do what seems logical to you |
12:32:01 | fowl | Araq, template safeImport(module):stmt = when not defined(module): import module |
12:32:41 | Araq | fowl: that could be confusing |
12:32:51 | * | EXetoC joined #nimrod |
12:33:02 | BitPuffin | Araq: I don't need to export anything :P |
12:33:13 | * | Araq "that could be confusing" is Araq's new "thought-terminating cliché" |
12:33:47 | BitPuffin | https://gist.github.com/BitPuffin/7733093 works |
12:34:12 | BitPuffin | or hang on |
12:34:16 | BitPuffin | forgot to babel install |
12:35:01 | BitPuffin | hm |
12:35:03 | BitPuffin | still worked! |
12:35:48 | Araq | fowl: seriously, the feature request is something like: when exists("mymodule"): import mymodule |
12:35:57 | BitPuffin | or ahh here we go |
12:36:12 | BitPuffin | same error as before |
12:36:16 | BitPuffin | I think this might be a bug |
12:37:36 | dirkk0 | @fowl 'could not load: libSDL2.so' ? |
12:38:10 | fowl | dirkk0, whats the library called that you have |
12:38:37 | BitPuffin | Araq: https://gist.github.com/BitPuffin/7733141 |
12:39:53 | BitPuffin | Araq: isn't that a bug? |
12:39:57 | Araq | no |
12:40:05 | BitPuffin | why |
12:40:08 | Araq | it's exactly the behaviour I just explained |
12:40:24 | Araq | try to add a: mixin dot |
12:40:33 | Araq | to your proc `*` |
12:41:32 | BitPuffin | oh wait |
12:41:35 | BitPuffin | dot does not exist anymore |
12:41:39 | BitPuffin | it's *. now |
12:41:39 | dirkk0 | fowl: libSDL2.dylib |
12:42:15 | Araq | BitPuffin: good. I am wrong anyway. :-) |
12:42:44 | Araq | stupid language definition, keeps changing and my brain is not up to date |
12:42:46 | BitPuffin | Araq: strange thet the compiler doesn't error on that though |
12:42:57 | BitPuffin | until it is actually used |
12:43:15 | Araq | yeah |
12:43:42 | fowl | dirkk0, babel install fowltek again i just pushed an update |
12:43:44 | Araq | it should error but then dot notation might cause problems, dunno how I solved that issue |
12:45:06 | BitPuffin | Araq: you didn't :P |
12:47:36 | * | gsp joined #nimrod |
12:47:38 | BitPuffin | now it seems like things work like they should |
12:47:48 | BitPuffin | them refactoringz |
12:49:18 | achim | hi there! i just started dabbling in nimrod, and i'm getting a confusing error message (current master on OS X): 'compilation artifact(-992, 645) Error: internal error: expr(196 (invalid data!)); unknown node kind'. has anyone seen this? |
12:49:26 | achim | code is here: https://gist.github.com/achim/7733214 |
12:51:12 | Araq | well closure iterators are still broken |
12:51:12 | Araq | and yeah they shouldn't make it into 0.9.2, my apologies |
12:51:12 | Araq | *have made it |
12:52:33 | dirkk0 | fowl: complains that something is missing now: Hint: used config file '/Users/dirkk/Nimrod/config/nimrod.cfg' [Conf] Error: unhandled exception: No such file or directory [EOS] |
12:56:30 | dirkk0 | sry - my bad, one sec |
12:56:36 | achim | Araq: ok, thanks. so it's not my build that's broken -- good to know :) |
12:57:15 | fowl | Araq, it works for me >_> |
12:57:48 | Araq | fowl: oh ... |
12:58:31 | Araq | achim: report it please and add your OS/CPU information |
12:58:45 | achim | will do |
13:01:17 | fowl | i do mean on HEAD, not 0.9.2 |
13:03:10 | Araq | fowl: are you on mac? |
13:03:52 | fowl | no |
13:05:03 | Araq | well it could be the mac-specific bug that keeps aporia from building on mac then |
13:05:25 | dirkk0 | fowl: I just sent you a pull request |
13:10:13 | fowl | dirkk0, the other sdl2 modules will need the same |
13:11:14 | Araq | brb |
13:11:44 | NimBot | Araq/Nimrod master f6f7cfe Araq [+0 ±2 -0]: better error message for implicitly available modules |
13:11:44 | NimBot | Araq/Nimrod master 21c4503 Araq [+0 ±1 -0]: Merge branch 'master' of github.com:Araq/Nimrod |
13:15:11 | BitPuffin | Araq: is ^ for what we just discussed? |
13:18:19 | dirkk0 | fowl: oh, I see - k, that means I have to install them: that's ttf and image, right? btw - how about OpenGL? |
13:23:07 | dirkk0 | and audio? |
13:26:26 | * | Kingcope joined #nimrod |
13:26:41 | * | Kingcope quit (Read error: Connection reset by peer) |
13:30:57 | fowl | i have to write the wrapper for audio, mixer and net |
13:32:24 | * | DAddYE joined #nimrod |
13:34:49 | fowl | opengl works |
13:36:40 | * | DAddYE quit (Ping timeout: 245 seconds) |
13:58:14 | dirkk0 | fowl: @opengl - cool! @wrappers do you have to do that by hand? wasn't there a c2nimrod converter somewhere? |
13:59:37 | EXetoC | yes, c2nim. should be someone in the docs section |
13:59:41 | EXetoC | *somewhere |
14:02:04 | Araq | BitPuffin: yes |
14:27:55 | * | datura_ joined #nimrod |
14:31:24 | * | datura quit (Ping timeout: 246 seconds) |
14:33:39 | * | DAddYE joined #nimrod |
14:38:45 | * | DAddYE quit (Ping timeout: 272 seconds) |
14:39:21 | * | BitPuffin quit (Ping timeout: 252 seconds) |
14:53:08 | * | OrionPKM joined #nimrod |
14:53:56 | * | OrionPKM quit (Remote host closed the connection) |
14:57:58 | * | OrionPKM joined #nimrod |
14:58:39 | * | OrionPKM quit (Remote host closed the connection) |
15:11:57 | * | OrionPKM joined #nimrod |
15:13:35 | * | xenagi joined #nimrod |
15:22:55 | * | Jackneill quit (Ping timeout: 245 seconds) |
15:23:22 | * | Jackneill joined #nimrod |
15:34:54 | * | gsp quit (Ping timeout: 252 seconds) |
15:35:13 | * | DAddYE joined #nimrod |
15:40:11 | * | DAddYE quit (Ping timeout: 272 seconds) |
15:46:17 | * | datura_ is now known as datura |
16:03:13 | NimBot | Araq/Nimrod master 166f6ea Araq [+0 ±1 -0]: fixes #696 |
16:09:08 | * | gradha joined #nimrod |
16:09:41 | Araq | hey gradha, I think you should fix the ws issue :-) |
16:09:47 | Araq | *whitespace |
16:09:55 | gradha | yeah |
16:10:08 | Araq | ok good |
16:10:15 | gradha | do I know how? |
16:10:48 | * | knz joined #nimrod |
16:10:54 | knz | hoi |
16:10:57 | Araq | sure. just look at how parsexml skips whitespace |
16:10:59 | Araq | hi knz |
16:11:26 | gradha | Araq: ok |
16:17:10 | fowl | Araq, im looking at xlib, TXIM is defined as object but in Xlib.h: typedef struct _XIM *XIM; |
16:18:41 | Araq | fowl: well that sounds about right? what's wrong with it? |
16:19:35 | gradha | Araq: does c2nim know about C++ templates? I have the vague feeling of trying and failing on that |
16:19:51 | Araq | well it can parse Vector<string> |
16:20:01 | Araq | but apart from that there is no template support |
16:20:10 | Araq | I need to go, see you later |
16:20:13 | gradha | bye |
16:20:24 | fowl | Araq, XIM is a pointer to struct _XIM, right? |
16:20:39 | Araq | right? |
16:21:00 | Araq | fowl: fix it, you're responsible for the x11 wrapper now |
16:21:00 | fowl | the functions taking XIM in Xlib.h are taking TXIM in xlib.nim |
16:21:05 | Araq | bye |
16:21:06 | fowl | yay -_- |
16:21:08 | fowl | cya |
16:21:55 | gradha | fowl: maybe you can coerce exhu to help you with x11? IIRC he was doing patisa, a minimal lib based on win32 and x11 |
16:24:04 | gradha | no, it was named paulina https://bitbucket.org/exhu/paulina |
16:24:42 | gradha | presumably he had x11 working in september |
16:29:36 | fowl | how should i coerce him |
16:30:00 | gradha | alcohol seems to work, what was the mime type for that... |
16:30:16 | fowl | gradha, do you know how to delete files from git? do i just fork the project, delete them on my branch then PR that? |
16:30:37 | gradha | presumably you want to remove them from history? otherwise it's just "git rm" |
16:31:30 | gradha | at https://help.github.com/articles/remove-sensitive-data they walk you through removing files form repo history |
16:32:25 | fowl | no i dont want to remove from history, just remove from the file tree |
16:32:39 | gradha | then "git rm" is fine, you first use that, then commit the removal |
16:32:50 | gradha | and just like rm you have "git mv" to rename, though git doesn't really track renames |
16:32:58 | fowl | gradha, im talking about opengl, x11, sdl, lua, etc, all the libs that are to be moved out to babel |
16:33:32 | gradha | git rm then |
16:33:51 | fowl | hrm i wonder why exhu has new x11 wrappers.. |
16:35:45 | * | DAddYE joined #nimrod |
16:37:48 | EXetoC | import "../paulina" oh. undocumented, right? |
16:38:56 | fowl | EXetoC, highly improper |
16:39:11 | gradha | who reads docs anyway |
16:39:49 | fowl | EXetoC, the entry-point is paulina, all other modules should be submodules (paulina uses them, not the other way around) |
16:40:14 | * | DAddYE quit (Ping timeout: 240 seconds) |
16:40:16 | fowl | oh thats from tests/ |
16:40:50 | fowl | still pretty improper |
16:41:33 | fowl | also there's no harm in writing a .babel for your project, then you can install it locally with `babel install`, you dont need to publish it (ping OrionPKM ) |
16:42:14 | gradha | if only bitbucket had some sort of issue tracker to tell exhu about these things… |
16:45:07 | * | Hannibal_Smith joined #nimrod |
16:45:17 | fowl | id rather gripe in person |
16:45:24 | fowl | he should come on irc |
16:48:45 | gradha | people don't even come in person any more, they use bouncers and stuff |
16:51:24 | fowl | my dad introduced me to irc when i was 10 |
16:51:32 | fowl | he used it to get software |
16:52:20 | * | IrvMG joined #nimrod |
16:52:47 | IrvMG | Hello |
16:53:01 | OrionPKM | what's up fowl |
16:53:12 | gradha | Hi IrvMG |
16:54:17 | OrionPKM | you're referring to the websockets? |
16:55:16 | IrvMG | How verify that a file exists? Without "proc open" |
16:55:35 | gradha | os.existsFile |
16:55:37 | IrvMG | OrionPKM, Yep! |
16:55:57 | gradha | IrvMG: note that the file could disappear after that proc returns true… |
16:56:13 | OrionPKM | irvmg i dont want anyone mistaking the library for being in a ready-for-consumption state :p |
16:57:00 | gradha | OrionPKM: isn't that the best strategy to get betatesters? |
16:57:35 | OrionPKM | sure, feel free to submit pull requrests and submit bugs :P |
16:58:00 | IrvMG | xD |
16:59:18 | fowl | OrionPKM, yes |
17:00:00 | fowl | OrionPKM, it makes it a lot easier to test locally than cloning into your project dir |
17:01:12 | OrionPKM | okay okay, i'll add in a .babel |
17:01:55 | fowl | i dont know what websockets is, i do know i've seen at least 4 people ask about it |
17:05:34 | IrvMG | Websockets for online games is very important, in my case u.u |
17:06:12 | OrionPKM | fowl it basically allows you to upgrade standard HTTP requests and keep the requesting socket open to transmit data in two directions |
17:06:59 | OrionPKM | you have to package discrete messages rather than just raw bytes, but thats the only layer on top of a normal TCP socket after upgrading |
17:07:07 | gradha | aka: web chat through firewalls |
17:07:58 | OrionPKM | you can do webchat through firewalls regardless |
17:08:25 | gradha | sure, polling and stuff |
17:08:31 | gradha | ajax and friends |
17:09:02 | OrionPKM | right, traditional polling, long polling, webRTC |
17:09:26 | OrionPKM | webRTC is the most efficient |
17:10:26 | gradha | before webRTC most chat servers would use java or something like that which wouldn't work through firewalls, lazy programmers |
17:10:47 | gradha | OrionPKM: can you do http://www.webtoolkit.eu/wt/examples/chat in nimrod? |
17:11:07 | OrionPKM | what is that |
17:11:35 | gradha | it's a c++ web toolkit, maybe it uses websockets, who knows, this http stuff is new for me |
17:11:47 | OrionPKM | yeah thats websockets |
17:12:29 | OrionPKM | I'll brb, need to restart something |
17:12:33 | * | OrionPKM quit (Remote host closed the connection) |
17:12:34 | gradha | another example of websockets is youtube automatically saving modified description fields during a video upload |
17:13:50 | * | OrionPKM joined #nimrod |
17:16:47 | IrvMG | WebRTC demo https://apprtc.appspot.com |
17:23:43 | datura | gradha: how many proxies support STUN yet? |
17:24:00 | gradha | datura: I don't know what you are talking about |
17:27:39 | datura | gradha: i was talking bullshit. the questions should have been hiw many proxies support websockets, and how many firewalls support STUN. |
17:28:06 | datura | at least in my company websocket connections don't seem to work, and i blame the proxy. |
17:28:36 | datura | and webRTC afaik does p2p connections which are difficult behind a NAT without STUN |
17:29:15 | datura | so - long polling still has it's value. if you don't have a direct connection. |
17:29:56 | OrionPKM | longpolling is a good fallback |
17:30:52 | gradha | datura: very brave of you to volunteer writing a nimrod proxy with supporting all the network options |
17:30:59 | datura | haha :) |
17:32:00 | datura | first io'll need to find out if nimrod's typesystem is powerful enough for me to like it :) |
17:32:26 | gradha | is there any other typesystem you like you could compare to? |
17:32:43 | datura | well, scala and haskell for a start, because i know those best. |
17:32:53 | Hannibal_Smith | Standard ML |
17:33:12 | gradha | rumors say there are haskell fugitives among us |
17:33:16 | dirkk0 | fowl: I see that there are several sdl libs in the standard installation - why not use these? (probably a stupid question again :-/ ) |
17:34:40 | datura | gradha: first thing that sprang to my eye was the "nullable" thingy where i'd prefer an Option/Maybe type that's compiled to null/non-null where possible. |
17:34:40 | * | IrvMG quit (Read error: Connection reset by peer) |
17:34:57 | * | IrvMG joined #nimrod |
17:34:59 | fowl | dirkk0, those are sdl1 |
17:35:21 | fowl | dirkk0, its sdl and its addons |
17:35:29 | gradha | datura: IIRC there's non-null type support planned, Araq has some basic reasoning of this which catches bugs |
17:36:00 | gradha | datura: as for a maybe type, people have submitted gists about that, but I tend to ignore such fancy things |
17:36:12 | datura | fancy? really ;?) |
17:36:27 | datura | to me it's bread and butter, i use them all the time |
17:36:33 | * | gsp joined #nimrod |
17:36:38 | datura | one of the _big_ steps forward from java |
17:36:41 | datura | (in scala) |
17:37:04 | gradha | I guess I happen to program on the wrong side of life |
17:37:18 | * | DAddYE joined #nimrod |
17:37:34 | datura | gradha: why, writing performance-relevant kernel drivers ;?) |
17:38:19 | dirkk0 | fowl: oh, I see, thx. |
17:38:20 | gradha | now I do native mobile apps |
17:38:21 | datura | (i do quite a bit of audio stuff in scala - and that's not exactly a god fit...) |
17:38:43 | fowl | datura, you could make nullable types act like option[t] |
17:39:07 | datura | fowl: for option[option[t]] too? |
17:39:11 | fowl | datura, one way is to defined a converter (some: string): bool = not isNil(some) |
17:39:35 | fowl | then you could do if mystring: echo mystring ; else: echo "mystring is nil" |
17:39:48 | datura | because with option[option[t]] you can only have the innermost option encoded as nullable, but not the outer ones |
17:40:39 | fowl | datura, or use my maybe[t]: https://github.com/fowlmouth/nimlibs/blob/master/fowltek/maybe_t.nim |
17:41:57 | * | DAddYE quit (Ping timeout: 252 seconds) |
17:45:41 | * | gsp quit (Quit: Leaving) |
17:47:44 | fowl | datura, also you can declare a variable like var s: string not nil |
17:49:52 | datura | another question: is thee type-system turing complete? |
17:50:31 | fowl | yes, if you compile to brainfuck |
17:51:08 | datura | so you can have programs where compilations never terminates? probably the price of powerful metaptogramming anyway. |
17:52:21 | fowl | joking..not sure how a type system could be turing complete |
17:52:36 | gradha | me neither, besides you don't need turing complete systems for infinite loops |
17:53:04 | gradha | datura: I guess you are talking about these lazily evaluated infinite thingies in fancy languages? |
17:53:26 | datura | fowl: you can encode SKI calculus in scala's typesystem for example. |
17:53:41 | datura | which is equivalent to lambda calculus and therefore turing complete |
17:54:47 | datura | gradha: it seems the difficult thing in those languages is mostly to make the typeystem as powerful as possible while still making sure compilation terminates |
17:55:33 | gradha | datura: I'm reading stuff in the wikipedia now but its beyond loops, so I don't know what it means |
17:55:35 | datura | i guess in scala you'd get a stack overflow quite soon |
17:58:04 | betawaffle | does nimrod do any kind of TCO? |
17:58:13 | datura | good question |
17:59:12 | gradha | total cost ownership? |
17:59:23 | betawaffle | tail call optimization |
17:59:25 | datura | gradha: what i'm looking for is definitely a "fancy language" - but one where i can take control over low-level details if i have to. |
18:00:14 | datura | if you have a function that calls itself at the end then it can be compiled to a loop. that's TCO. |
18:00:43 | datura | or - if you have a chain of functions where ther last one calls the first at the end. that's a bit more difficult for a compiler. |
18:01:28 | gradha | nimrod compiles to C, and C compilers nowadays have TCO |
18:01:54 | betawaffle | datura: should be easy to test |
18:02:13 | datura | betawaffle: unless you have OO in the mix, yes. |
18:03:29 | gradha | datura: what kind of software you write to need to take control over low-level details? |
18:04:18 | datura | gradha: audio apps - i did a dj tool ala traktor in scala, f.e. |
18:04:56 | datura | no way to get decent latency without a realtime VM and there is none that is free |
18:05:43 | datura | for a while i had a second VM running in which i _only_ rendered audio and never allocated any new objects to keep the GC from interrupting... |
18:05:59 | datura | but that's an interesting hack, but not a solution. |
18:06:26 | knz | anyone toying wih algebraic datatypes in nimrod? |
18:06:28 | Hannibal_Smith | datura, G1 is not good? |
18:06:40 | gradha | datura: isn't that how low level programs do it anyway? one thread fills buffers in soft-real time, another does rendering in a lower priority thread |
18:06:44 | knz | and/or structural pattern matching, maybe using templates |
18:06:45 | datura | Hannibal_Smith: much better than everything that came before it |
18:09:34 | datura | gradha: threads would be ok, i was talking about processes |
18:10:49 | dom96 | knz: IIRC mflamer is but he's not around currently. |
18:11:06 | betawaffle | datura: answer, it segfaults if i don't do -d:release |
18:11:10 | datura | knz: make that GADTs :) |
18:11:35 | betawaffle | so, must be some optimization that is not enabled by default |
18:13:41 | gradha | C compilers don't use TCO unless you are optimizing, for debugging reasons |
18:14:57 | * | IrvMG_ joined #nimrod |
18:15:32 | betawaffle | so, the point is, you can't count on it as a programming pattern like you can in say, erlang |
18:17:20 | fowl | how are you testing that it segfaults without -d:release o_O |
18:17:38 | * | IrvMG quit (Ping timeout: 264 seconds) |
18:18:21 | dom96 | I wonder if TR macros could be used to perform TCO |
18:18:51 | betawaffle | dom96: i would think so |
18:21:09 | EXetoC | that seems a lot more advanced than what is demonstrated by the examples |
18:25:07 | betawaffle | how can i see the generated C code? and/or the nimrod code after all the nimrod-based optimizations |
18:25:09 | knz | TR macros can be used *in theory* to rcognize call patterns that can be optimized, and transform them, but the code would be quite complex |
18:25:30 | gradha | betawaffle: look in the nimcache directory |
18:27:49 | betawaffle | gradha: thanks |
18:28:42 | gradha | betawaffle: there are nimrod flags to embed nimrod source code for easier debugging, but the default already includes line numbers, so it's not hard to follow |
18:29:25 | * | xenagi quit (Quit: Leaving) |
18:31:09 | * | knz left #nimrod (#nimrod) |
18:32:36 | betawaffle | so, it seems that even a completely nothing program generates some useless C code (which isn't removed with -d:release) |
18:32:48 | betawaffle | the program is programResult = 0 |
18:35:40 | gradha | maybe that code is the garbage collector |
18:36:38 | betawaffle | nah, it's initialization code |
18:36:53 | betawaffle | seems to be generated whether it is needed or not |
18:39:18 | * | IrvMG joined #nimrod |
18:39:21 | * | IrvMG_ quit (Ping timeout: 245 seconds) |
18:39:31 | gradha | the hallo example compiled with --gc:none and -d:release gives me a 10KB binary, that's fairly reasonable |
18:41:02 | gradha | the C version compiled with -O3 gives me a 8.3KB. Nimrod sucks, so bloated |
18:41:46 | dom96 | try --opt:size :P |
18:42:04 | betawaffle | what i don't really understand is what does the C version need those 8.3KB for? |
18:42:31 | gradha | betawaffle: possibly all the stuff you otherwise would have to implement in asm |
18:42:49 | betawaffle | which is what? |
18:42:59 | dom96 | printf is a pretty complicated function I would say |
18:43:16 | betawaffle | ok, im more talking about a program that doesn't even use printf |
18:43:19 | betawaffle | simple return 0 |
18:43:52 | gradha | betawaffle: maybe you should ask the guys who write C compilers |
18:46:36 | dirkk0 | http://timelessname.com/elfbin/ |
18:46:59 | betawaffle | thank dirkk0 |
18:47:30 | dirkk0 | yw |
18:48:34 | dirkk0 | the discussion here reminded me of that. I came there because of the asm.js discussion (that asm.js could be the machine language of the future etc). |
18:49:00 | betawaffle | thanks* |
18:55:54 | EXetoC | won't GCC and what have you get rid of those unused symbols? |
18:59:08 | * | IrvMG_ joined #nimrod |
18:59:22 | * | IrvMG_ quit (Client Quit) |
18:59:35 | * | IrvMG quit (Ping timeout: 245 seconds) |
19:02:45 | EXetoC | ok so the generated exe is "big". is this an issue? |
19:07:43 | fowl | if you think nimrod's hello world demo is a big binary, try it in rust or go |
19:08:08 | EXetoC | or D |
19:08:27 | EXetoC | unless they've done something about that already |
19:08:47 | fowl | cya all |
19:09:31 | gradha | bye |
19:09:37 | EXetoC | bb |
19:10:07 | dirkk0 | bye fowl, and thank you very much |
19:10:12 | * | DAddYE joined #nimrod |
19:10:14 | * | DAddYE quit (Remote host closed the connection) |
19:10:20 | * | DAddYE_ joined #nimrod |
19:12:18 | datura | anyone experimented with (functional) reactive programming or incremental computation in nimrod? |
19:27:14 | * | IrvMG joined #nimrod |
19:34:43 | Araq | fyi you can't implement TCO via a TR macro as there is no "goto" command in Nimrod |
19:36:16 | EXetoC | nothing else is missing? |
19:37:11 | Araq | not sure but you can implement CSE with Nimrod's TR macros, so ... |
19:37:14 | * | zahary joined #nimrod |
19:38:39 | * | zahary1 quit (Ping timeout: 252 seconds) |
19:38:59 | Araq | datura: recent versions of nimrod can enforce non-nullability but it surely is not that easy if you distrust algebraic data types for that like I do |
19:42:11 | EXetoC | I wouldn't have a clue how to construct such a pattern, but ok good to know :p |
19:42:35 | Araq | oh the pattern is trivial like {x}(x: expr) |
19:42:49 | Araq | you need to perform all the hard work in the macro :P |
19:45:22 | zielmicha | I'm trying to create macro defining proc. Is there something obviously wrong with "macro foo(name: expr): expr = newProc(name=name, params=[])"? |
19:45:55 | zielmicha | because it crashes compiler (segsegv in gsub) |
19:46:17 | datura | Araq: why do you distrust them? they are there, if you want them or not. you just might have them hardwired into your implementation. |
19:47:37 | EXetoC | Araq: oh -.- |
19:48:20 | Araq | zielmicha: due to a bug you need to do: |
19:48:24 | Araq | result = newProc(...) |
19:49:03 | Araq | though I'm not sure this solves everything. Wait until I finally merged the vm2 branch which makes the macro system much more stable. |
19:50:11 | Araq | datura: the problem is that then you need to ensure null | pointer is still taking up a single word for C interop/efficiency and even then it doesn't work too well |
19:50:15 | OrionPKM | just added F12 definition lookup for nimrod's sublime plugin :D |
19:50:40 | reactormonk | OrionPKM, will happen in emacs next year ;-) |
19:51:05 | Araq | datura: FP is about trees, systems programming is about arrays. Arrays are harder to initialize. |
19:51:08 | gradha | reactormonk: come on, you can do it earlier! |
19:51:15 | OrionPKM | it's still got a ways to go, but it's working hehe |
19:51:34 | OrionPKM | and it's faster than aporia's I think :P |
19:51:57 | Araq | var a: array [3, ref T not nil] # ok ... we enforce explicit initialization here ... |
19:52:17 | datura | Araq: agreed about ensuring the code coming out should use null where possible - but how should that work not well? from the language users perspective i don't see any problem, it might be a bit difficult for the compiler writer of course. |
19:52:18 | Araq | for i in low(a)..high(a): a[i] = notNil() # ok ... |
19:52:43 | Araq | for i in low(a)..high(a): a[i] = notNil(a[i+1]) # uh oh .... |
19:52:53 | datura | hm.. need to think about that. |
19:53:03 | Araq | it gets complex very quickly if you like expressivity |
19:53:14 | EXetoC | "not nil" resulted in an infinite compiler loop at one point. has anyone else encountered this? |
19:53:28 | Araq | EXetoC: no, bug report please |
19:54:07 | zielmicha | Araq: with "result =" it still doesn't work. I checked out and installed branch vm2 and it doesn't work there either :( |
19:57:10 | Araq | alright, still the same segfault? |
20:02:32 | Araq | datura: the only solution that has been attempted is to require array initialization via a single expr like 'var a: array[3, ref T not nil] = [x, y, z]'. |
20:03:12 | Araq | I doubt this suffices for systems programming. |
20:03:19 | datura | damn arrays :) |
20:05:50 | Araq | zielmicha: ask fowl for help. He knows the bugs of Nimrod's macro system inside out. I'm always to busy working on the compiler, not much time left for meta programming. ;-) |
20:26:25 | betawaffle | how do i use c2nim? |
20:28:55 | Araq | edit header.h until c2nim likes it |
20:29:25 | Araq | in theory it can work without any modifications. In practice I've never seen that happening. |
20:30:35 | betawaffle | sorry, what i meant was, how do i run c2nim, is it an executable? if so, i can't find it |
20:30:45 | zielmicha | When it comes to c2nim - what is "correct" way to install it? Not finding anything in docs, I did (cd compiler/c2nim; nimrod c c2nim; ln -s $PWD/c2nom /usr/local/bin) |
20:35:56 | gradha | that should be enough |
20:45:36 | Araq | betawaffle: you need to compile it, nimrod c compiler/c2nim/c2nim should do the trick |
20:47:11 | betawaffle | ok |
20:47:21 | * | mflamer joined #nimrod |
20:53:47 | * | achim quit (Quit: Textual IRC Client: http://www.textualapp.com/) |
21:01:07 | IrvMG | Bye |
21:01:07 | * | IrvMG quit () |
21:05:47 | * | zielmicha quit (Ping timeout: 264 seconds) |
21:07:17 | * | mflamer quit (Ping timeout: 245 seconds) |
21:09:31 | * | ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:11:41 | * | mflamer joined #nimrod |
21:12:26 | Araq | hey mflamer |
21:12:48 | mflamer | Hey Araq |
21:14:46 | * | ics joined #nimrod |
21:19:49 | mflamer | reading through the logs, looks like i missed some FP discussion earlier |
21:33:23 | Araq | do you happen to be on macosx? |
21:36:46 | mflamer | No, win |
21:37:29 | Araq | alright well then I won't ask you to hunt a bug for me ;-) |
21:45:21 | Varriount | Meep. |
21:46:16 | EXetoC | I'm the one who says meep |
21:46:31 | Varriount | M33p |
21:46:31 | gradha | yeah, but what does the fox say? |
21:47:42 | Varriount | Anyone here have a regex for nimrod's numeric literals? I'm trying to improve the sublime text nimrod extension. |
21:49:04 | gradha | isn't that like [\d]+[\d_.]* or something similar? oh, you need suffixes and stuff |
21:49:45 | Varriount | ^ Yeah |
21:50:02 | Araq | check the manual |
21:50:34 | Varriount | Araq, the manual uses PEG (or is it EBNF) notation. |
21:51:02 | Araq | well yeah but translating the PEG to a regex should be straightforward |
21:51:31 | gradha | sounds like a mission for the Amazing Nimrod Translator |
21:51:57 | Varriount | gradha: PEG to Regex? Sounds interesting. |
21:52:10 | gradha | unfortunately I just made that up |
21:52:57 | OrionPKM | araq I'm querying idetools for a .nim file, and I'm getting an error for a .cfg of the same name |
21:53:30 | OrionPKM | i.e. idetools --def of somefile.nim, but nimrod is returning a parse error from somefile.cfg |
21:55:28 | Araq | well nimrod parses the corresponding cfg file for the configuration |
21:55:55 | OrionPKM | settings.cfg(1, 1) Error: identifier expected, but found '[' |
21:56:10 | OrionPKM | using the parsecfg format |
21:57:58 | mflamer | zahary_: you around today? |
22:01:14 | * | Jackneill quit (Remote host closed the connection) |
22:12:10 | * | xenagi joined #nimrod |
22:12:30 | Araq | OrionPKM: actually "settings.nimrod.cfg" should be processed, "settings.cfg" should not. |
22:12:48 | OrionPKM | Araq yeah, suppose that's true |
22:13:00 | Araq | settings.cfg might be processed for reasons of backwards compatibility |
22:13:13 | OrionPKM | but should idetools be processing it anyway? |
22:13:32 | Araq | well idetools processes a nimrod project much like the ordinary compiler does |
22:14:03 | OrionPKM | well could it be a special case to bypass that? |
22:14:16 | * | jimmt is now known as jimmjenn |
22:14:50 | Araq | OrionPKM: please look at compiler/nimconf.nim:247 |
22:15:14 | Araq | projectFile & ".cfg" is still processed but it's deprecated |
22:15:20 | Araq | we can remove it now |
22:16:06 | OrionPKM | should I submit a bug |
22:16:15 | Varriount | Araq, is there any specific reason that the TRune type in the unicode module has 'int' s its base, rather than int32? |
22:16:28 | Varriount | *as its |
22:17:34 | EXetoC | I thought it was int16 |
22:17:47 | Araq | well integer literals have the type "int" so I thought that might help somewhat |
22:17:55 | EXetoC | nvm |
22:18:01 | Araq | the typing rules changed in the meantime though |
22:18:42 | Varriount | irune = int; TRune = distinct irune |
22:18:51 | Araq | so ... I don't know. We can easily make it int32 I think but then it's not important either. |
22:19:00 | OrionPKM | Araq or I can just submit a patch |
22:19:54 | Araq | OrionPKM: is a warning generated? |
22:19:54 | EXetoC | it doesn't matter that the size varies? |
22:20:05 | Varriount | Araq, congratulations, your repository is now the first url to show up in my quick bar when I type 'git' :P |
22:20:14 | OrionPKM | araq a warning? when |
22:20:25 | Araq | if conffile != pd / cfg and existsFile(conffile): |
22:20:26 | Araq | readConfigFile(conffile) |
22:20:28 | Araq | rawMessage(warnConfigDeprecated, conffile) |
22:20:52 | Araq | warnConfigDeprecated: "config file '$1' is deprecated [ConfigDeprecated]", |
22:20:56 | OrionPKM | if we do that, we still ahve the error |
22:21:09 | Araq | well do you get this warning or not? |
22:21:41 | OrionPKM | glah, let me check, I'm only taking the last line of output and verbosity is 0 |
22:21:51 | Araq | EXetoC: why should it matter? for serialization any sane person uses utf-8 anyway |
22:23:11 | OrionPKM | araq no warning |
22:23:42 | Araq | try with --warn[ConfigDeprecated]:on |
22:23:56 | Varriount | Araq, exception: Microsoft's COM API |
22:24:02 | OrionPKM | why does it matter if there's a warning or not? |
22:24:32 | Araq | Varriount: that uses utf-16 or ucs-16 but not 32 bits |
22:24:55 | Araq | or differs COM from the winapi here? |
22:25:36 | Araq | OrionPKM: well to ensure that's really your problem here |
22:25:37 | Varriount | I don't know. All I know is that, during my failed attempt to wrap disphelper, all the strings were prefixed by L, which I believe means that they are widechar strings. |
22:26:02 | Araq | widechar is 16 bits on win I think |
22:26:18 | Araq | also we have toWideCString somewhere in system/ |
22:26:52 | * | Varriount opens system.nim . Varriounts computer explodes. :p |
22:27:11 | * | Hannibal_Smith quit (Quit: Sto andando via) |
22:27:15 | Araq | feel free to refactor it :P |
22:27:22 | Araq | many tried nobody succeeded |
22:28:25 | Varriount | Araq, the main problem with system.nim is it's lack of sections. It wouldn't be so bad if the docs broke the procedures and types into related sections. |
22:29:02 | Araq | yeah well, improving the docs is the easy way out |
22:30:18 | OrionPKM | Araq it's happening |
22:30:31 | OrionPKM | Araq because when I remove the afformentioned lines, it works |
22:31:32 | Varriount | Araq, you make that sound like a bad thing. :3 |
22:32:26 | OrionPKM | If i remove those lines from nimconf.nim ~246 it works |
22:33:03 | Araq | alright hmm |
22:33:24 | Araq | dom96: any idea how many babel packages use the old package.cfg file? |
22:35:36 | dom96 | the what? |
22:36:15 | Araq | jester.cfg vs jester.nimrod.cfg |
22:36:26 | Araq | jester.cfg is deprecated and bites OrionPKM |
22:36:33 | dom96 | I have no idea |
22:40:24 | * | tylere joined #nimrod |
22:40:47 | tylere | I'm tryiing to build master on W64...and it's failing horribly |
22:40:53 | tylere | I'm using latest 64 mingw |
22:40:53 | EXetoC | I would've checked, had there existed a way to install every package without having to specify them all |
22:41:27 | tylere | Lots of errors of the form "src\1_2\something.c fatal error: nimbase.h No such file or directory" |
22:41:57 | Araq | well ... that looks like an installation problem |
22:45:51 | tylere | I just cloned everything off github |
22:45:58 | tylere | first the main repo and then the csources repo |
22:46:38 | tylere | nimbase.h is present in Nimrod/csources/src |
22:46:47 | * | dirkk0 quit (Ping timeout: 250 seconds) |
22:47:03 | Araq | hmm does the build64.bat contain any -I directives? |
22:47:44 | tylere | Just -Ibuild |
22:48:14 | tylere | sample invocation: %CC% %COMP_FLAGS% -Ibuild -c src\1_2\lists.c -o src\1_2\lists.o |
22:48:28 | tylere | COMP_FLAGS is just -w |
22:50:32 | Araq | aha ok |
22:51:37 | Araq | well it's not "src" anymore but "nimcache" and the template contains "-Inimcache" now |
22:52:09 | Araq | I guess the csources repo is seriously outdated |
22:54:38 | gradha | good night, honey badgers |
22:54:44 | * | gradha quit (Quit: bbl, need to watch https://www.youtube.com/watch?v=2IzR_ClTE8Y again) |
22:55:59 | tylere | So the build instructions are no longer accurate? |
22:56:09 | tylere | Weird, I built it on my mac fine this afternoon without issue |
22:59:07 | tylere | Well, adding -Isrc to COMP_FLAGS seems to have worked |
22:59:11 | tylere | at least it's building without complaint |
22:59:24 | Araq | the build instructions are accurate |
22:59:39 | Araq | but we have a template that generates the shell scripts |
22:59:47 | Araq | and another for .bat files |
23:00:24 | Araq | so it looks like a bug that's gone as soon as we push to csources again |
23:00:31 | * | ics quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:00:44 | tylere | cool |
23:01:27 | * | Varriount_ joined #nimrod |
23:01:30 | Varriount_ | tylere, I can help you build nimrod for win64 |
23:01:43 | tylere | I think I have it now, actually |
23:01:47 | tylere | got csources built |
23:01:50 | tylere | so it should bootstrap |
23:01:53 | tylere | but thanks |
23:02:20 | * | ics joined #nimrod |
23:03:52 | Araq | OrionPKM: please rename compiler/nimrod.cfg to compiler/nimrod.nimrod.cfg (gah) and test it a bit before you do the pull request |
23:04:20 | EXetoC | Araq: very few packages seem to even have configs. libtcod.cfg seems to be it, if I'm even looking for the right thing here |
23:04:51 | * | Varriount quit (Ping timeout: 246 seconds) |
23:04:51 | * | Varriount_ is now known as Varriount |
23:05:09 | EXetoC | how is the name of the package config decided? |
23:05:40 | EXetoC | no wait, that's not a package config |
23:06:01 | Araq | yeah it's a compiler config. And thank you EXetoC for the information. :-) |
23:09:45 | Varriount | Araq, we should put something like this up on the front page -> http://www.youtube.com/watch?v=nhdvmEYCQgA |
23:09:47 | EXetoC | ok the window resolution vars confused me |
23:17:34 | Araq | Varriount: lol |
23:19:41 | EXetoC | put it in the background and loop it |
23:22:39 | Varriount | EXetoC, whatcha workin on? |
23:33:05 | Varriount | OrionPKM, Araq, A wild Pull Request Suddenly Appeared! |
23:38:15 | Araq | OrionPKM: indeed, it's wild. fix it please. |
23:45:22 | EXetoC | Varriount: A really bad 2D engine |
23:49:43 | OrionPKM | ugh |
23:53:02 | OrionPKM | have I mentioned how much I hate git? |