00:00:28 | * | SchalaZeal joined #nimrod |
00:06:45 | Araq | hi SchalaZeal |
00:06:58 | SchalaZeal | Hey, been a while. |
00:09:06 | Araq | true; well 'abstract' has been renamed to 'distinct' years ago |
00:09:59 | SchalaZeal | Ah I see |
00:10:10 | SchalaZeal | must be looking at old tests or docs |
00:11:09 | SchalaZeal | I see there's a ton of new pragmas incorporated as well: constructor, raises, tags, immediate... |
00:12:40 | Araq | I don't think 'constructor' is implemented yet |
00:12:55 | SchalaZeal | Ah |
00:14:39 | SchalaZeal | What about raises and tags? |
00:20:41 | dom96 | SchalaZeal: I think it is: http://build.nimrod-code.org/docs/manual.html#effect-system_toc |
00:20:50 | dom96 | er, http://build.nimrod-code.org/docs/manual.html#effect-system |
00:20:54 | dom96 | Also hi. |
00:22:33 | SchalaZeal | Heya |
00:23:04 | SchalaZeal | I think my memory may be a bit rusty, but I see no way of adding on to an already allocated sequence. |
00:23:44 | dom96 | add? |
00:24:26 | SchalaZeal | ah, my mistake |
00:24:46 | SchalaZeal | My brain's getting old. |
00:31:58 | dom96 | SchalaZeal: So where have you been all this time? |
00:32:42 | reactormonk | no find somewhere in sequtils? |
00:33:09 | SchalaZeal | Well, for the first few months, Warcraft, before I quit it in early October. Ever since, I've been pursuing gender therapy. |
00:33:41 | SchalaZeal | as well as looking at free alternatives to Flash animations. |
00:34:22 | dom96 | ahh, glad to have you back :) |
00:34:36 | SchalaZeal | I picked up basic/intermediate JavaScript, PHP, and Google's new "Dart" language in the process |
00:36:18 | SchalaZeal | I was excited to find out Nimrod not only works again for me, but has a JS backend. Though, if compiling to JS, I wonder if TObject or something could be used for loose typed values, seeing as in JS, everything is an object. |
00:36:58 | reactormonk | SchalaZeal, sure it is, but typechecking helps nontheless |
00:40:25 | SchalaZeal | yeah... but say you want to interact with a pure JS library and you have no idea what some variable is, I was thinking it could be used as TObject in the future, or is that already its functionality? |
00:42:00 | Araq | no nor do I like that |
00:42:36 | Araq | you can always use an emit/asm statement to write pure JS in Nimrod code |
00:43:05 | Araq | but having static typing is the point so it shouldn't be weakened |
00:43:09 | SchalaZeal | ah...... and is an importjs/exportjs pragma planned? |
00:43:31 | Araq | er ... it's called 'importc/exportc' *cough* |
00:43:53 | Araq | but apart from that it's all there and working |
00:43:59 | SchalaZeal | I thought that was C specific, hence the importcpp counterpart |
00:44:45 | Araq | it's all misnamed a bit now; importcpp is also available in JS |
00:45:04 | Araq | and produces a call like obj.f(x) instead of f(obj, x) |
00:45:08 | SchalaZeal | Sounds confusing I'd think, but ok. |
00:45:24 | Araq | hey it's what importcpp does for the C++ backend :P |
00:45:50 | Araq | oh and 'cstring' is mapped to JS's native string type ... |
00:46:11 | SchalaZeal | no I mean importcpp being used in code other than C++ |
00:46:58 | Araq | we only need to come up with another term that the 'c' is supposed to stand for :P |
00:47:20 | SchalaZeal | If I were to make a wrapper to, say, JQuery, how would I go about mapping types? disinct TObjects? |
00:47:24 | SchalaZeal | distinct, even |
00:47:49 | Araq | that's one approach |
00:48:29 | Araq | or you introduce new object types |
00:48:54 | SchalaZeal | empty objects? |
00:49:01 | Araq | yeah |
00:49:17 | Araq | oh and a JQuery wrapper would be sweet *hint, hint* |
00:49:29 | SchalaZeal | I see... and I guess it's safe to assume all numeric values are float64? |
00:50:11 | SchalaZeal | since JS treats them as such |
00:50:41 | Araq | ugh hrm not really |
00:50:53 | Araq | at least distinguish between int and float please |
00:51:20 | SchalaZeal | I would if it's possible. I just don't want JS getting confused as to what an int is. |
00:51:21 | Araq | nirmod also tries to get integer semantics back for 'int' on JS |
00:51:51 | Araq | JS can't get confused it has no static types ;-) |
00:52:48 | SchalaZeal | awesome sauce |
00:52:55 | SchalaZeal | JQuery wrapper it is then. |
00:54:07 | Araq | does jquery include widgets? |
00:54:30 | SchalaZeal | I believe so. It's a popular alternative to DOM. |
00:58:46 | SchalaZeal | It would be sweet to have CreateJS or DartFlash accessible from Nimrod I'd think |
01:00:31 | * | codeallergy quit () |
01:02:07 | Araq | sure |
01:03:06 | SchalaZeal | Dart is a mix of both, and easier to read than Java, so I'm trying to make "NimFlash" |
01:05:51 | SchalaZeal | Also, when making procs/methods that should be called by an object, I conventionally name the first parameter "this" |
01:10:06 | Araq | most people use 'self' I think |
01:11:13 | SchalaZeal | Well I haven't used too many languages with that. Hmm.... when I need a generic callback type, can I simply specify `proc()` or will that specifically expect a proc with no arguments and no result? |
01:13:04 | reactormonk | SchalaZeal, yes, exactly. |
01:13:28 | SchalaZeal | Hmm...I guess a pointer could work |
01:15:16 | Araq | I have to sleep now; good night |
01:15:30 | SchalaZeal | nighters |
01:18:28 | reactormonk | aww |
01:18:36 | reactormonk | any idea how to iterate over tuples? |
01:19:14 | reactormonk | err, an array of tuples |
01:19:45 | SchalaZeal | no...not too experienced with iterators |
01:21:33 | reactormonk | how do I partially apply functions? ... |
01:22:43 | SchalaZeal | I'm afraid I'm not much help... you're likely more experienced than me |
01:23:12 | reactormonk | dom96, ping |
01:36:31 | reactormonk | so, how can I create procs programatically? |
01:40:58 | SchalaZeal | You could use templates |
01:57:46 | reactormonk | SchalaZeal, ... :-/ |
01:58:09 | reactormonk | I need partial application here. |
01:58:32 | reactormonk | http://sprunge.us/ITfN |
01:59:17 | reactormonk | the last one should return a partially applied function with the argument item[0] |
01:59:23 | SchalaZeal | hmm... looks like it can be done with a template to me |
01:59:26 | reactormonk | so I have a proc() in the end |
01:59:28 | SchalaZeal | oh |
02:00:10 | SchalaZeal | I... don't know how to help |
02:27:54 | SchalaZeal | Well, jQuery's API reference stumps me as to how to wrap it for Nimrod, so I'm doing EaselJS for now instead. |
02:28:12 | SchalaZeal | which makes use of DOM |
02:28:33 | SchalaZeal | Nimrod doing web animations and games... that'd be funny |
02:31:41 | reactormonk | a bit of minitest for nimrod... http://docs.seattlerb.org/minitest/ |
02:53:04 | SchalaZeal | Does the dom module have HTML5 capability yet? |
03:09:50 | apotheon | reactormonk: What about minitest and Nimrod . . . ? |
03:26:47 | apotheon | reactormonk: Are you talking about creating a Nimrod implementation of the same basic test framework? |
03:34:08 | * | fowl quit (Quit: Leaving) |
03:48:45 | ccssnet | o.o |
04:20:44 | reactormonk | apotheon, xactly |
04:33:58 | apotheon | reactormonk: Ooh, exciting. Good luck! |
04:34:17 | apotheon | reactormonk: Given minitest's reputation, it shouldn't be *too* hard to do. |
04:35:54 | reactormonk | apotheon, but first I want the above stuff to get to work |
04:38:06 | apotheon | There are apparently four five major approaches to licensing in the Ruby community: 1. use the GPL, because you're more of a Linux guy than a Rubyist, and are either a zealot or someone who hasn't bothered to think much about licensing; 2. use the Ruby license (which explicitly dual-licenses with the Simplified BSD License) because you haven't bothered to actually think about licensing; 3. use |
04:38:12 | apotheon | the Simplified BSD License, because it's the dual-license option with Ruby, and the longer Ruby License itself seems unnecessary; 4. use the MIT/X11 License because you care about good licensing; 5. me |
04:38:52 | reactormonk | apotheon, 6. I should append a LICENSE file somewhere |
04:40:03 | apotheon | The "me" option is slightly misnamed. I know others who license similarly -- using the OWL or, occasionally, something "funny" like the WTFPL, Nietzsche PL, Beerware, whatever. |
04:40:42 | reactormonk | apotheon, what would you use for stuff you want to be shared? |
04:41:04 | reactormonk | apotheon, anything linux-specific GPL sounds fine |
04:41:14 | apotheon | reactormonk: Those people are really special cases of 2, who seem to have forgotten, or not realized, that the software won't be under the Ruby License terms by default. The interesting thing about them is that about 80% of the time they will just go with one of the options I suggest when I get in touch to ask about licensing. |
04:41:27 | apotheon | reactormonk: For stuff I want shared, definitely OWL. |
04:41:51 | apotheon | reactormonk: GPL is actually less shareable than copyfree licenses, because of the copyleft license incompatibility problem. |
04:42:07 | reactormonk | apotheon, OWL? |
04:42:14 | apotheon | Open Works License |
04:42:18 | reactormonk | linky? |
04:42:37 | apotheon | http://copyfree.org/licenses/owl/license.txt and http://owl.apotheon.org |
04:43:04 | apotheon | It's about equivalent to the MIT/X11 License, but not limited to software use. |
04:43:19 | apotheon | (or to the Simplified BSD License but, again, not limited to software use) |
04:43:39 | apotheon | COIL instead of OWL if you want a patent clause. |
04:54:23 | reactormonk | apotheon, I'm not american |
05:15:06 | * | XAMPP-8 quit (Ping timeout: 264 seconds) |
05:19:06 | * | Zor quit (Ping timeout: 252 seconds) |
06:20:06 | * | SchalaZeal quit (Quit: Konversation terminated!) |
06:37:02 | apotheon | reactormonk: So . . . ? |
06:37:20 | apotheon | reactormonk: People who want to use your software might be American. |
06:37:56 | apotheon | reactormonk: I get annoyed at people who think public domain dedications work in the US, so they don't care about non-US users and throw a public domain dedication on the software. |
06:38:18 | apotheon | reactormonk: . . . not that I think patent clauses mean a whole lot anyway, but that's a different matter altogether. |
06:44:45 | apotheon | Well, g'night. |
08:36:30 | Araq | reactormonk: partil application? that's just an anon proc |
08:36:34 | Araq | *partial |
09:44:49 | * | FreeArtMan joined #nimrod |
09:50:55 | * | FreeArtMan quit (Remote host closed the connection) |
10:08:54 | * | fowl joined #nimrod |
10:15:06 | * | fowl quit (Ping timeout: 264 seconds) |
10:16:59 | * | fowl joined #nimrod |
10:22:54 | * | fowl quit (Ping timeout: 264 seconds) |
10:34:28 | * | fowl joined #nimrod |
11:26:21 | * | alexrp joined #nimrod |
11:30:15 | * | alexrp is now known as Zor |
13:08:52 | dom96 | reactormonk: I was (still am) planning on creating a nice curry function. |
14:02:56 | * | q66 joined #nimrod |
15:57:04 | * | FreeArtMan joined #nimrod |
16:16:17 | * | zahary1 quit (Ping timeout: 252 seconds) |
16:49:59 | reactormonk | Araq, where's the syntax documented? |
16:50:09 | reactormonk | dom96, my usecase is not that complicated |
16:50:51 | dom96 | reactormonk: http://build.nimrod-code.org/docs/manual.html#anonymous-procs |
16:51:11 | dom96 | what is your use case? |
16:58:47 | * | zahary joined #nimrod |
17:03:17 | reactormonk | dom96, oh. do they keep closure? |
17:03:27 | reactormonk | for item in defaultBindings: |
17:03:30 | reactormonk | registerShortcut("Put current window in Tile " + item[0], "", item[1], currentWindowToTile(item[0])) |
17:03:58 | dom96 | yeah, they should. |
17:18:26 | * | zahary quit (Ping timeout: 252 seconds) |
17:19:30 | * | zahary joined #nimrod |
17:46:54 | * | fowl quit (Ping timeout: 252 seconds) |
17:47:35 | NimBot | nimrod-code/Aporia 1bb5d85 Dominik Picheta [+1 ±4 -0]: When an unsaved file is compiled it will be saved now in the front end... 5 more lines |
17:47:35 | NimBot | nimrod-code/Aporia e85d69b Dominik Picheta [+0 ±2 -0]: When closing files which reside in /tmp the user will be asked for... 2 more lines |
17:51:13 | reactormonk | dom96, maybe change that to ENV['TMPDIR'] or similar |
17:51:51 | dom96 | why is 'getTempDir' not good enough? |
17:52:11 | reactormonk | it is. But then the commit message is misleading |
17:53:36 | dom96 | True. By /tmp I mean whatever getTempDir returns. |
17:59:38 | * | fowl joined #nimrod |
18:15:57 | reactormonk | no 'round' proc? |
18:16:10 | dom96 | what would that do? |
18:16:52 | reactormonk | oh, toInt |
18:17:23 | dom96 | oh, lol. |
18:17:41 | dom96 | 'round' of course. |
18:17:53 | reactormonk | no integer division? |
18:18:17 | dom96 | there is a round in the math module |
18:18:35 | dom96 | reactormonk: div |
18:22:35 | reactormonk | hmm, I just segfaulted the compiler |
18:23:31 | reactormonk | http://sprunge.us/ZCFG |
18:23:45 | reactormonk | Araq, looks like I'm good ad that |
18:24:27 | dom96 | the JS backend isn't exactly stable... |
18:25:15 | reactormonk | looks like adding nil to the language wasn't the best idea ;> |
18:30:20 | dom96 | Soon we'll have 'not nil' |
18:30:53 | dom96 | in fact, maybe we already do |
18:31:10 | dom96 | "for now the compiler can only catch the most trivial type violations." |
18:31:20 | dom96 | i see |
18:33:24 | dom96 | reactormonk: but yeah, submit a bug report |
18:45:32 | reactormonk | var defaultBindings = [("Top", "M-9"), ("Top Left", "M-8"), ("Top Right", "M-0"), ("Left", "M-i"), ("Right", "M-p"), ("Bottom", "M-,"), ("Bottom Left", "M-m"), ("Bottom Right", "M-.")] <- this line freaks it out |
18:45:39 | reactormonk | is this even legal nimrod? |
18:46:57 | reactormonk | yes, it is |
18:46:58 | dom96 | yeah, it's valid. |
18:52:31 | reactormonk | switched to array of arrays, next error... |
18:54:11 | reactormonk | registerShortcut("Put current window in Tile " & item[0], "", item[1], proc() = nil) |
18:54:14 | reactormonk | works |
18:54:20 | reactormonk | registerShortcut("Put current window in Tile " & item[0], "", item[1], proc() = currentClientToTile(item[0])) |
18:54:24 | reactormonk | errors out |
18:55:18 | dom96 | Yeah, closures are probably very unstable in the JS backend. If they are even implemented at all for ti... |
18:55:20 | dom96 | *it |
19:06:25 | reactormonk | http://sprunge.us/aOWO bt |
19:07:28 | dom96 | yeah, report any crashes on github |
19:08:12 | reactormonk | can't reproduce it with a small sample |
19:09:09 | dom96 | I bet it is because it's in a for loop |
19:09:13 | * | XAMPP-8 joined #nimrod |
19:09:14 | dom96 | have you tried reproducing it that way? |
19:09:19 | reactormonk | nope |
20:05:18 | reactormonk | rather hard to reproduce, that one |
20:05:41 | reactormonk | I can do it in the current context, but without one, it doesn't work :-/ |
20:24:07 | Araq | reactormonk: it's not like you *add* 'nil' to the language :P |
20:24:21 | Araq | it's a necessary evil |
20:24:25 | Araq | very hard to get rid of |
20:24:56 | Araq | and if you do, it still doesn't solve any hard problem |
20:26:37 | Araq | it doesn't work that well if you like arrays, functional languages get away with it because they embrace lists instead |
21:02:28 | * | FreeArtMan quit (Quit: Leaving) |
21:04:18 | * | XAMPP-8 quit (Ping timeout: 264 seconds) |
21:17:38 | * | codeallergy joined #nimrod |
21:44:18 | NimBot | Araq/Nimrod 035b3f6 Dominik Picheta [+0 ±1 -0]: Added some tooltip functions to the gtk wrapper. |
21:44:18 | NimBot | Araq/Nimrod b0d11af Dominik Picheta [+0 ±1 -0]: Added strutils.unescape and fixed issue with strutils.escape. |
21:49:13 | Araq | dom96: proc saveSettings(state: PState) |
21:49:30 | Araq | where is the state created? it is a global variable? |
21:52:01 | dom96 | Araq: proc open |
21:52:54 | Araq | thanks |
22:16:19 | * | gradha joined #nimrod |
22:16:35 | Araq | hey gradha |
22:16:43 | gradha | hey Araq |
22:16:54 | gradha | any rsa keys in nimrod's repo? |
22:18:02 | Araq | I hope not |
22:18:12 | Araq | or what do you mean? |
22:18:24 | gradha | pity, it could lead to nimrod's public exposure and generate great interest in it |
22:18:30 | gradha | yeah, was reading http://it.slashdot.org/story/13/01/25/132203/github-kills-search-after-hundreds-of-private-keys-exposed |
22:18:56 | gradha | the best things are the forks, muahaha |
22:21:00 | dom96 | "including what was reportedly account credentials for the Google Chrome source code repository." |
22:21:02 | dom96 | wow. |
22:21:18 | dom96 | I thought most of those were useless keys. |
22:21:22 | dom96 | if not all |
22:22:23 | gradha | meme: "I do not always clone a github repo, but when I do, I fork it so I can keep their private rsa keys safe forever" |
22:24:26 | dom96 | hah |
22:27:22 | Araq | reminds me of that scene for some reason though: http://www.youtube.com/watch?v=pLtMS9bI8g8 |
22:30:50 | * | comex quit (Remote host closed the connection) |
22:31:11 | fowl | how does that end up in a repo? |
22:31:28 | gradha | unless github removes google spidering their repos it doesn't help them to kill their own search |
22:31:34 | fowl | btw i dont use rsa for github i prefer to type in my password each time i push |
22:31:42 | gradha | and if they remove google spidering their business will suck |
22:32:57 | gradha | fowl: I can imagine you having a github repo which was initially private and contained keys (have seen it happen several times), later you make it public and forgot about the private stuff |
22:33:26 | gradha | happened on my previous job where they open sourced some server stuff, it contained private keys embedded in the source for twitter/facebook publishing |
22:34:00 | gradha | this was for a government job, so anybody reading the source could impersonate the government's project twitter account |
22:34:20 | gradha | which is why they ended up putting zips without history |
22:34:22 | gradha | safe choice |
22:36:20 | * | comex joined #nimrod |
22:38:31 | gradha | so now you can program in nimrod, build for the js, create a web app to run on mobile devices, use it on android, emulated on a pc http://androvm.org/blog/ |
22:45:34 | gradha | indeed, rust is taking the spotlight http://this-plt-life.tumblr.com/post/41441254767/when-i-checked-out-rust |
22:48:30 | fowl | i like this one http://this-plt-life.tumblr.com/post/37285848921/when-i-heard-of-gos-error-handling |
22:50:25 | gradha | dunno what's the big deal about error returns, I just write code that always succeeds |
22:50:31 | dom96 | fowl: There is a lot of 'dotfiles' repos. I guess people accidentally commit all of their ~/.ssh |
22:51:22 | fowl | gradha: exactly. id rather write code that should work, and when an exception happens it should stop the program. you cant do that in go |
22:52:43 | rking | fowl: These are funny. |
22:54:02 | Araq | I don't mind Go's error handling too much; it depends on your problem domain though |
22:54:27 | Araq | but then I also like to "misuse" exceptions to leave deeply nested recursions |
22:54:45 | Araq | quite practical in a compiler ;-) |
22:54:48 | gradha | oh, that reminds me, does nimrod have goto? |
22:55:02 | Araq | (which is one big recursion) |
22:55:18 | gradha | I mainly use it to avoid exceptions |
22:55:21 | Araq | gradha: nope, but it has block+break |
22:55:43 | Araq | which keep the code "structured" ;-) |
22:56:00 | gradha | ah, yes, I remember reading about break being able to specify the block you want to break out from, right? |
22:56:13 | fowl | yea |
22:56:16 | fowl | block foo: |
22:56:19 | fowl | break foo |
22:56:28 | gradha | ok, so that's my goto use |
22:57:03 | Araq | yes of course it is |
22:57:33 | Araq | it's based on some paper that I lost years ago |
22:59:15 | * | XAMPP-8 joined #nimrod |
23:41:40 | * | gradha quit (Quit: Leaving) |
23:47:49 | * | q66 quit (Quit: Quit) |