<<25-01-2013>>

00:00:28*SchalaZeal joined #nimrod
00:06:45Araqhi SchalaZeal
00:06:58SchalaZealHey, been a while.
00:09:06Araqtrue; well 'abstract' has been renamed to 'distinct' years ago
00:09:59SchalaZealAh I see
00:10:10SchalaZealmust be looking at old tests or docs
00:11:09SchalaZealI see there's a ton of new pragmas incorporated as well: constructor, raises, tags, immediate...
00:12:40AraqI don't think 'constructor' is implemented yet
00:12:55SchalaZealAh
00:14:39SchalaZealWhat about raises and tags?
00:20:41dom96SchalaZeal: I think it is: http://build.nimrod-code.org/docs/manual.html#effect-system_toc
00:20:50dom96er, http://build.nimrod-code.org/docs/manual.html#effect-system
00:20:54dom96Also hi.
00:22:33SchalaZealHeya
00:23:04SchalaZealI think my memory may be a bit rusty, but I see no way of adding on to an already allocated sequence.
00:23:44dom96add?
00:24:26SchalaZealah, my mistake
00:24:46SchalaZealMy brain's getting old.
00:31:58dom96SchalaZeal: So where have you been all this time?
00:32:42reactormonkno find somewhere in sequtils?
00:33:09SchalaZealWell, for the first few months, Warcraft, before I quit it in early October. Ever since, I've been pursuing gender therapy.
00:33:41SchalaZealas well as looking at free alternatives to Flash animations.
00:34:22dom96ahh, glad to have you back :)
00:34:36SchalaZealI picked up basic/intermediate JavaScript, PHP, and Google's new "Dart" language in the process
00:36:18SchalaZealI 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:58reactormonkSchalaZeal, sure it is, but typechecking helps nontheless
00:40:25SchalaZealyeah... 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:00Araqno nor do I like that
00:42:36Araqyou can always use an emit/asm statement to write pure JS in Nimrod code
00:43:05Araqbut having static typing is the point so it shouldn't be weakened
00:43:09SchalaZealah...... and is an importjs/exportjs pragma planned?
00:43:31Araqer ... it's called 'importc/exportc' *cough*
00:43:53Araqbut apart from that it's all there and working
00:43:59SchalaZealI thought that was C specific, hence the importcpp counterpart
00:44:45Araqit's all misnamed a bit now; importcpp is also available in JS
00:45:04Araqand produces a call like obj.f(x) instead of f(obj, x)
00:45:08SchalaZealSounds confusing I'd think, but ok.
00:45:24Araqhey it's what importcpp does for the C++ backend :P
00:45:50Araqoh and 'cstring' is mapped to JS's native string type ...
00:46:11SchalaZealno I mean importcpp being used in code other than C++
00:46:58Araqwe only need to come up with another term that the 'c' is supposed to stand for :P
00:47:20SchalaZealIf I were to make a wrapper to, say, JQuery, how would I go about mapping types? disinct TObjects?
00:47:24SchalaZealdistinct, even
00:47:49Araqthat's one approach
00:48:29Araqor you introduce new object types
00:48:54SchalaZealempty objects?
00:49:01Araqyeah
00:49:17Araqoh and a JQuery wrapper would be sweet *hint, hint*
00:49:29SchalaZealI see... and I guess it's safe to assume all numeric values are float64?
00:50:11SchalaZealsince JS treats them as such
00:50:41Araqugh hrm not really
00:50:53Araqat least distinguish between int and float please
00:51:20SchalaZealI would if it's possible. I just don't want JS getting confused as to what an int is.
00:51:21Araqnirmod also tries to get integer semantics back for 'int' on JS
00:51:51AraqJS can't get confused it has no static types ;-)
00:52:48SchalaZealawesome sauce
00:52:55SchalaZealJQuery wrapper it is then.
00:54:07Araqdoes jquery include widgets?
00:54:30SchalaZealI believe so. It's a popular alternative to DOM.
00:58:46SchalaZealIt would be sweet to have CreateJS or DartFlash accessible from Nimrod I'd think
01:00:31*codeallergy quit ()
01:02:07Araqsure
01:03:06SchalaZealDart is a mix of both, and easier to read than Java, so I'm trying to make "NimFlash"
01:05:51SchalaZealAlso, when making procs/methods that should be called by an object, I conventionally name the first parameter "this"
01:10:06Araqmost people use 'self' I think
01:11:13SchalaZealWell 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:04reactormonkSchalaZeal, yes, exactly.
01:13:28SchalaZealHmm...I guess a pointer could work
01:15:16AraqI have to sleep now; good night
01:15:30SchalaZealnighters
01:18:28reactormonkaww
01:18:36reactormonkany idea how to iterate over tuples?
01:19:14reactormonkerr, an array of tuples
01:19:45SchalaZealno...not too experienced with iterators
01:21:33reactormonkhow do I partially apply functions? ...
01:22:43SchalaZealI'm afraid I'm not much help... you're likely more experienced than me
01:23:12reactormonkdom96, ping
01:36:31reactormonkso, how can I create procs programatically?
01:40:58SchalaZealYou could use templates
01:57:46reactormonkSchalaZeal, ... :-/
01:58:09reactormonkI need partial application here.
01:58:32reactormonk http://sprunge.us/ITfN
01:59:17reactormonkthe last one should return a partially applied function with the argument item[0]
01:59:23SchalaZealhmm... looks like it can be done with a template to me
01:59:26reactormonkso I have a proc() in the end
01:59:28SchalaZealoh
02:00:10SchalaZealI... don't know how to help
02:27:54SchalaZealWell, jQuery's API reference stumps me as to how to wrap it for Nimrod, so I'm doing EaselJS for now instead.
02:28:12SchalaZealwhich makes use of DOM
02:28:33SchalaZealNimrod doing web animations and games... that'd be funny
02:31:41reactormonka bit of minitest for nimrod... http://docs.seattlerb.org/minitest/
02:53:04SchalaZealDoes the dom module have HTML5 capability yet?
03:09:50apotheonreactormonk: What about minitest and Nimrod . . . ?
03:26:47apotheonreactormonk: Are you talking about creating a Nimrod implementation of the same basic test framework?
03:34:08*fowl quit (Quit: Leaving)
03:48:45ccssneto.o
04:20:44reactormonkapotheon, xactly
04:33:58apotheonreactormonk: Ooh, exciting. Good luck!
04:34:17apotheonreactormonk: Given minitest's reputation, it shouldn't be *too* hard to do.
04:35:54reactormonkapotheon, but first I want the above stuff to get to work
04:38:06apotheonThere 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:12apotheonthe 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:52reactormonkapotheon, 6. I should append a LICENSE file somewhere
04:40:03apotheonThe "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:42reactormonkapotheon, what would you use for stuff you want to be shared?
04:41:04reactormonkapotheon, anything linux-specific GPL sounds fine
04:41:14apotheonreactormonk: 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:27apotheonreactormonk: For stuff I want shared, definitely OWL.
04:41:51apotheonreactormonk: GPL is actually less shareable than copyfree licenses, because of the copyleft license incompatibility problem.
04:42:07reactormonkapotheon, OWL?
04:42:14apotheonOpen Works License
04:42:18reactormonklinky?
04:42:37apotheonhttp://copyfree.org/licenses/owl/license.txt and http://owl.apotheon.org
04:43:04apotheonIt's about equivalent to the MIT/X11 License, but not limited to software use.
04:43:19apotheon(or to the Simplified BSD License but, again, not limited to software use)
04:43:39apotheonCOIL instead of OWL if you want a patent clause.
04:54:23reactormonkapotheon, 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:02apotheonreactormonk: So . . . ?
06:37:20apotheonreactormonk: People who want to use your software might be American.
06:37:56apotheonreactormonk: 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:18apotheonreactormonk: . . . not that I think patent clauses mean a whole lot anyway, but that's a different matter altogether.
06:44:45apotheonWell, g'night.
08:36:30Araqreactormonk: partil application? that's just an anon proc
08:36:34Araq*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:52dom96reactormonk: 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:59reactormonkAraq, where's the syntax documented?
16:50:09reactormonkdom96, my usecase is not that complicated
16:50:51dom96reactormonk: http://build.nimrod-code.org/docs/manual.html#anonymous-procs
16:51:11dom96what is your use case?
16:58:47*zahary joined #nimrod
17:03:17reactormonkdom96, oh. do they keep closure?
17:03:27reactormonkfor item in defaultBindings:
17:03:30reactormonk registerShortcut("Put current window in Tile " + item[0], "", item[1], currentWindowToTile(item[0]))
17:03:58dom96yeah, 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:35NimBotnimrod-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:35NimBotnimrod-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:13reactormonkdom96, maybe change that to ENV['TMPDIR'] or similar
17:51:51dom96why is 'getTempDir' not good enough?
17:52:11reactormonkit is. But then the commit message is misleading
17:53:36dom96True. By /tmp I mean whatever getTempDir returns.
17:59:38*fowl joined #nimrod
18:15:57reactormonkno 'round' proc?
18:16:10dom96what would that do?
18:16:52reactormonkoh, toInt
18:17:23dom96oh, lol.
18:17:41dom96'round' of course.
18:17:53reactormonkno integer division?
18:18:17dom96there is a round in the math module
18:18:35dom96reactormonk: div
18:22:35reactormonkhmm, I just segfaulted the compiler
18:23:31reactormonk http://sprunge.us/ZCFG
18:23:45reactormonkAraq, looks like I'm good ad that
18:24:27dom96the JS backend isn't exactly stable...
18:25:15reactormonklooks like adding nil to the language wasn't the best idea ;>
18:30:20dom96Soon we'll have 'not nil'
18:30:53dom96in fact, maybe we already do
18:31:10dom96"for now the compiler can only catch the most trivial type violations."
18:31:20dom96i see
18:33:24dom96reactormonk: but yeah, submit a bug report
18:45:32reactormonkvar 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:39reactormonkis this even legal nimrod?
18:46:57reactormonkyes, it is
18:46:58dom96yeah, it's valid.
18:52:31reactormonkswitched to array of arrays, next error...
18:54:11reactormonk registerShortcut("Put current window in Tile " & item[0], "", item[1], proc() = nil)
18:54:14reactormonkworks
18:54:20reactormonk registerShortcut("Put current window in Tile " & item[0], "", item[1], proc() = currentClientToTile(item[0]))
18:54:24reactormonkerrors out
18:55:18dom96Yeah, closures are probably very unstable in the JS backend. If they are even implemented at all for ti...
18:55:20dom96*it
19:06:25reactormonk http://sprunge.us/aOWO bt
19:07:28dom96yeah, report any crashes on github
19:08:12reactormonkcan't reproduce it with a small sample
19:09:09dom96I bet it is because it's in a for loop
19:09:13*XAMPP-8 joined #nimrod
19:09:14dom96have you tried reproducing it that way?
19:09:19reactormonknope
20:05:18reactormonkrather hard to reproduce, that one
20:05:41reactormonkI can do it in the current context, but without one, it doesn't work :-/
20:24:07Araqreactormonk: it's not like you *add* 'nil' to the language :P
20:24:21Araqit's a necessary evil
20:24:25Araqvery hard to get rid of
20:24:56Araqand if you do, it still doesn't solve any hard problem
20:26:37Araqit 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:18NimBotAraq/Nimrod 035b3f6 Dominik Picheta [+0 ±1 -0]: Added some tooltip functions to the gtk wrapper.
21:44:18NimBotAraq/Nimrod b0d11af Dominik Picheta [+0 ±1 -0]: Added strutils.unescape and fixed issue with strutils.escape.
21:49:13Araqdom96: proc saveSettings(state: PState)
21:49:30Araqwhere is the state created? it is a global variable?
21:52:01dom96Araq: proc open
21:52:54Araqthanks
22:16:19*gradha joined #nimrod
22:16:35Araqhey gradha
22:16:43gradhahey Araq
22:16:54gradhaany rsa keys in nimrod's repo?
22:18:02AraqI hope not
22:18:12Araqor what do you mean?
22:18:24gradhapity, it could lead to nimrod's public exposure and generate great interest in it
22:18:30gradhayeah, was reading http://it.slashdot.org/story/13/01/25/132203/github-kills-search-after-hundreds-of-private-keys-exposed
22:18:56gradhathe best things are the forks, muahaha
22:21:00dom96"including what was reportedly account credentials for the Google Chrome source code repository."
22:21:02dom96wow.
22:21:18dom96I thought most of those were useless keys.
22:21:22dom96if not all
22:22:23gradhameme: "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:26dom96hah
22:27:22Araqreminds 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:11fowlhow does that end up in a repo?
22:31:28gradhaunless github removes google spidering their repos it doesn't help them to kill their own search
22:31:34fowlbtw i dont use rsa for github i prefer to type in my password each time i push
22:31:42gradhaand if they remove google spidering their business will suck
22:32:57gradhafowl: 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:26gradhahappened 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:00gradhathis was for a government job, so anybody reading the source could impersonate the government's project twitter account
22:34:20gradhawhich is why they ended up putting zips without history
22:34:22gradhasafe choice
22:36:20*comex joined #nimrod
22:38:31gradhaso 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:34gradhaindeed, rust is taking the spotlight http://this-plt-life.tumblr.com/post/41441254767/when-i-checked-out-rust
22:48:30fowli like this one http://this-plt-life.tumblr.com/post/37285848921/when-i-heard-of-gos-error-handling
22:50:25gradhadunno what's the big deal about error returns, I just write code that always succeeds
22:50:31dom96fowl: There is a lot of 'dotfiles' repos. I guess people accidentally commit all of their ~/.ssh
22:51:22fowlgradha: 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:43rkingfowl: These are funny.
22:54:02AraqI don't mind Go's error handling too much; it depends on your problem domain though
22:54:27Araqbut then I also like to "misuse" exceptions to leave deeply nested recursions
22:54:45Araqquite practical in a compiler ;-)
22:54:48gradhaoh, that reminds me, does nimrod have goto?
22:55:02Araq(which is one big recursion)
22:55:18gradhaI mainly use it to avoid exceptions
22:55:21Araqgradha: nope, but it has block+break
22:55:43Araqwhich keep the code "structured" ;-)
22:56:00gradhaah, yes, I remember reading about break being able to specify the block you want to break out from, right?
22:56:13fowlyea
22:56:16fowlblock foo:
22:56:19fowl break foo
22:56:28gradhaok, so that's my goto use
22:57:03Araqyes of course it is
22:57:33Araqit'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)