<< 13-01-2014 >>

00:08:59NimBotVarriount/Nimrod-Sublime plugins/nimcheck 0b573a5 Clay Sweetser [+0 ±1 -0]: Allow user to choose an error to go to. Clean up code.
00:11:04NimBotAraq/Nimrod master 74aa666 Araq [+6 ±0 -0]: added test cases from strange loop event
00:11:04NimBotAraq/Nimrod master 64bd5e7 Araq [+0 ±1 -0]: bugfix: doc generation for actors.nim works again
00:11:49VarriountMan, it's just a flurry of activity today.
00:12:29VarriountOrionPK: Do you think that we should include a nimrod binary with the plugin? Or perhaps a link of some sort?
00:13:16AraqVarriount: and it just gets better, stay tuned
00:14:30*dom96 tunes out
00:15:39*Demos joined #nimrod
00:16:27*io2 quit ()
00:16:56OrionPKvarriount nah, instead if it doesnt find something maybe just launch a new tab w/ instrucions
00:19:24VarriountBah. I just found out that a nice program I bought a couple of years ago is no longer available for download.
00:19:37OrionPKdoh
00:40:01*dmac1 joined #nimrod
00:41:01NimBotVarriount/Nimrod-Sublime master 6e720c2 Varriount [+0 ±1 -0]: Updated license... 2 more lines
00:44:17*dmac1 quit (Ping timeout: 252 seconds)
01:09:51VarriountOrionPK: In the nimrod-sublime repo, in project.py, how much of the 'Utility' class is copied code?
01:10:30NimBotAraq/Nimrod devel af6b805 Araq [+0 ±18 -0]: case consistency improvements
01:10:30NimBotAraq/Nimrod devel 0eb7856 Araq [+0 ±1 -0]: new vm: bugfix
01:10:30NimBotAraq/Nimrod devel 82be2ed Araq [+0 ±1 -0]: bugfix: renderer supports 'ptr' etc. as type constraint
01:10:30NimBotAraq/Nimrod devel f2ea470 Araq [+0 ±2 -0]: fixes db_sqlite
01:10:30NimBot2 more commits.
01:11:25AraqVarriount: check out our new testing framework, you'll love it :P
01:11:35OrionPKVarriount pretty much just Utility.get_project
01:11:55*dmac1 joined #nimrod
01:12:05VarriountOrionPK: It's kinda.. odd, to have a java-like static class pattern
01:12:30OrionPKstatic classes are my jam man, I'm not a python programmer :p
01:13:10VarriountOrionPK: You've been hitting the java too much.
01:13:20OrionPKI never touch java
01:13:35Araqzahary, zahary__ testament/tester has the new tester for now, check it out
01:13:35OrionPKin nimrod basically everything is static functions, unless you make methods :p
01:14:35VarriountJust as a future tip, in python, you typically just use module-level functions instead of having class/object methods decorated with the staticmethod decorator
01:15:05Araqgood night
01:15:05VarriountAraq: Good night
01:15:25OrionPKim not bothered
01:16:10dom96Araq: hehe, funny how you are always against putting things in too many directories and now all tests are categorised into directories :P
01:16:30dom96Is 2014 the year when the stdlib gets categories too? :P
01:29:55dom96Araq: Here is the stack trace I got with mark and sweep: https://gist.github.com/dom96/5b88232dea2d76e87d97
01:32:10VarriountI wonder if there's a way you can tell gdb to trace a program's execution in its entirity, and work backward from the point where a program crashed, like a reverse step
01:34:54dom96good night
01:42:10OrionPKVarriount when u gonna merge ur check plugin?
01:42:46VarriountOrionPK: When I add the command metadata to the other files
01:44:07*dmac1 quit (Quit: Leaving.)
02:35:26*brson quit (Quit: leaving)
02:35:53*brson joined #nimrod
03:00:14*dmac1 joined #nimrod
03:05:21*dmac1 quit (Ping timeout: 272 seconds)
03:51:40*brson quit (Quit: Lost terminal)
03:52:14*brson joined #nimrod
04:00:51*dmac1 joined #nimrod
04:03:53*brson quit (Ping timeout: 272 seconds)
04:05:11*dmac1 quit (Ping timeout: 260 seconds)
04:32:28*fowl quit (Quit: Leaving)
04:36:53*fowl joined #nimrod
04:56:13*Demos quit (Read error: Connection reset by peer)
05:01:00*dmac1 joined #nimrod
05:05:32*dmac1 quit (Ping timeout: 252 seconds)
06:01:23*dmac1 joined #nimrod
06:06:02*dmac1 quit (Ping timeout: 252 seconds)
06:13:03*BitPuffi1 quit (Ping timeout: 260 seconds)
06:54:18*dmac1 joined #nimrod
07:01:19*dmac1 quit (Quit: Leaving.)
07:08:58*fowl quit (Read error: Connection reset by peer)
07:15:25*fowl joined #nimrod
07:16:58*dmac1 joined #nimrod
07:18:06*dmac quit (Disconnected by services)
07:18:09*dmac1 is now known as dmac
07:25:11*dmac quit (Quit: Leaving.)
07:30:35*dmac joined #nimrod
07:58:58*bogomips joined #nimrod
08:16:06*dmac quit (Quit: Leaving.)
08:26:06*Araq_ joined #nimrod
08:27:58*odc joined #nimrod
08:59:21*achim joined #nimrod
09:15:54*girvo joined #nimrod
09:16:20*dmac joined #nimrod
09:16:46girvohi everyone
09:18:24odc'morning
09:20:06girvoI have been playing with c2nim lately, but I am certain that I'm thinking about it the wrong way :(
09:21:07girvoIf theres a nice binary library (a .so in this case) with standard C headers (various .h files), the correct way to access said library would be to run `c2nim' on those `include/SomeLib.h' files, correct?
09:21:33*dmac quit (Ping timeout: 272 seconds)
09:26:52girvobrb
09:30:50fowlgirvo, yes
09:31:57*girvo quit (Ping timeout: 272 seconds)
09:36:16*CarpNet joined #nimrod
09:56:17zahary__I've made a Light Table plugin for nimrod, anyone want to give it a try?
09:56:21zahary__https://github.com/zah/nimrod.lt
10:06:11*radsoc joined #nimrod
10:16:46*dmac joined #nimrod
10:17:23Araq_zahary__: what's wrong with using ERecoverable error in vmgen and catching only that in sem.nim?
10:18:32zahary__I guess nothing, but the vmgen is not using ERecoverable yet?
10:19:09*zahary__ left #nimrod (#nimrod)
10:19:16Araq_yeah ...
10:19:24*zahary__ joined #nimrod
10:21:20*dmac quit (Ping timeout: 265 seconds)
10:38:32*Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310])
10:57:00*achim quit (Quit: Textual IRC Client: http://www.textualapp.com/)
11:16:59*dmac joined #nimrod
11:21:31*dmac quit (Ping timeout: 260 seconds)
11:44:01*Araq_ joined #nimrod
11:46:42Araq_hi bogomips welcome
11:46:50bogomipshello :)
11:53:18*BitPuffi1 joined #nimrod
12:13:56*BitPuffi1 is now known as BitPuffin
12:17:18*dmac joined #nimrod
12:22:25*dmac quit (Ping timeout: 272 seconds)
12:41:45*radsoc quit (Ping timeout: 252 seconds)
12:47:03*Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310])
13:04:06*radsoc joined #nimrod
13:17:38*dmac joined #nimrod
13:22:13*dmac quit (Ping timeout: 248 seconds)
13:22:51dom96zahary__: lots of errors when I created a new file, saved it as test.nim and started typing.
13:23:08*darkf quit (Quit: Leaving)
13:23:58zahary__dom96, I assume you are talking about nimrod.lt?
13:24:03dom96Discovering how to do things in light table is very difficult.
13:24:07dom96zahary__: yes.
13:24:08zahary__can you post a stack trace with an error?
13:24:48dom96https://gist.github.com/dom96/45cdfe4ddf512f78af1a
13:24:54zahary__I've tested in on a few computers so far, but they are all synced to my Dropbox folder so maybe there is something wrong with the installation
13:26:14zahary__hmm, that's an error in the CodeMirror mode (lexer). can I have your source file - maybe it's genuine error
13:27:12*Araq_ joined #nimrod
13:28:22dom96I literally just created a new file called test.nim and started typing
13:31:21zahary__yes, but since that's a lexing problem, it matters what you typed :)
13:31:53dom96I just hit random keys lol
13:31:58zahary__:)
13:32:08dom96Probably something like 'asdafagdgsdafdsdf'
13:37:26zahary__doh, that was easy to fix, but now I'm too lazy to produce a new release
13:37:38dom96lol
13:38:52zahary__would you clone my repo in your plugins folder? I'll be able to push fixed more often
13:39:16zahary__push fixes
13:39:38dom96yeah, I did that.
13:40:59dom96What can your plugin actually do?
13:41:18dom96Does it support suggest and compilation/execution of .nim files?
13:41:57zahary__ok, I pushed a fix
13:42:38zahary__it supports just "def" right now. The next things on my list are suggest and eval
13:48:50*girvo joined #nimrod
13:50:17girvohey all
13:51:12dom96hi girvo
13:51:18girvoI noticed something interesting, when going through some of the wrapper libs, I saw that they came from Pascal libraries. I was wondering how that works?
13:51:31dom96pas2nim :P
13:51:45girvowait
13:51:47girvoseriously? lol
13:51:53girvoI didn't even know that was a thing
13:52:16girvoholy crap, awesome.
13:53:05dom96Yes, the compiler was originally written in pascal.
13:53:21dom96So instead of manually translating it to Nimrod Araq wrote pas2nim to do it quicker.
13:53:41girvoshit, cool. I suppose that explains the similar syntax (which I love)
13:54:43girvoWhat compatibility is better, pascal or C?
13:55:03girvoin terms of linking to a library that already exists, I'm just trying to get a nice API already heh
13:55:12dom96Probably C.
13:55:46girvoOkay. I had a question before about it, but had to bail before getting an answer
13:56:35girvoSay I have a C library as a .so file, the way `c2nim' is supposed to work is by taking the `includes/MyLib.h' headers and converting those? I was trying to play with it today and got stumped
13:56:46dom96yes
13:57:16dom96http://build.nimrod-lang.org/docs/c2nim.html#dynlib-directive
13:57:26Araq_girvo: pascal wrappers have the advantage of having stricter type information but unfortunately they often also contain new bugs, so I don't wrap those anymore
13:57:45*[1]Endy joined #nimrod
13:57:46Araq_wrapping directly from C reduces the chance of an error
13:58:00girvoAraq_: alright, cheers
13:58:04girvodom96: Sweet, thanks!
13:58:05Araq_and yeah, c2nim works but you need to tweak the headers so that it likes them
13:59:23Araq_girvo: check if the stuff hasn't been wrapped for you already; might already be a babel package :-)
13:59:30girvoAraq_: I tried to get it to deal with SDL2's latest headers, but it chokes on lots of it heh
13:59:48Araq_sdl2 is a babel package afaik
14:00:06girvoAraq_: Yeah I did that, there are some handy wrappers in there but I struggled to get them to work D: I need more practice heh
14:00:51girvoAraq_: Fowltek has a wrapper, but its incomplete, apart from that no SDL2 wrappers I could find
14:01:44*[2]Endy joined #nimrod
14:02:03Araq_well ask fowl then, he's here in irc
14:02:15girvoso, now for a really dumb question. The sfml wrapper examples compiled fine, but couldn't find the libcsfml.so files in my include, why would that be?
14:02:24girvooh! lol, neat :)
14:03:08girvofowl: In particles.nim for your sfml wrapper, it says classlib needs to be in path, but the gist underneat 404's, was wondering what it was?
14:03:30*dirkk0 joined #nimrod
14:04:23*[1]Endy quit (Ping timeout: 260 seconds)
14:05:23*aftersha_ joined #nimrod
14:07:21Araq_well I guess you need to install libcsfml.so then?
14:08:36girvoAraq_: See, I had, heh. Thats why I got confused. No big deal, anyway
14:10:16girvoAraq_: With c2nim, I get this a lot on various header files: Error: ';' expected -- usually to do with things like `#if defined ALLEGRO_IPHONE' having no semicolon after it. Whats the typical way of repairing that?
14:11:11fowlgirvo, c2nims pre processor doesnt seem to like "defined x" you have to put parens around it, i have started an allegro5 wrapper you could pick up
14:11:34girvofowl: Ah cool, I ran into the same issue with "extern" calls in SDL2's header
14:11:44girvofowl: I'll gladly have a play with it!
14:11:56fowlgirvo, my sdl2 wrapper isnt incomplete, but sdl2_net and sdl2_mixer are
14:12:39girvofowl: ok cool, I might take another look tonight then
14:13:12fowlgirvo, that note about classlib is old, you need fowltek though, that can be installed through babel
14:13:38girvofowl: yeah I pulled down fowltek through babel yesterday. pretty cool stuff
14:14:42fowlallegro5 so far: https://github.com/fowlmouth/allegro5
14:14:52girvofowl: Oh heck, I totally missed the main fowltek/sdl2.nim file. My bad :/
14:15:25fowlas you can see allegro wrapper is barely started but its nicely sectioned at least :p
14:16:28girvofowl: Hahaha :) I want to get used to c2nim and porting over C-libs, so I'll help work on allegro
14:17:58*dmac joined #nimrod
14:23:01*dmac quit (Ping timeout: 272 seconds)
14:23:29*[1]Endy joined #nimrod
14:24:16*[3]Endy joined #nimrod
14:27:17*[2]Endy quit (Ping timeout: 248 seconds)
14:27:49*[1]Endy quit (Ping timeout: 248 seconds)
14:28:27*radsoc quit (Ping timeout: 252 seconds)
14:32:13*zahary__ is now known as zahary_
14:41:30*aftersha_ quit (Quit: Computer has gone to sleep.)
14:45:36*radsoc joined #nimrod
14:48:32*girvo quit (Quit: Leaving)
15:00:07*faassen joined #nimrod
15:02:26*Araq_ quit (Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310])
15:10:37*aftersha_ joined #nimrod
15:18:18*dmac joined #nimrod
15:22:45*dmac quit (Ping timeout: 248 seconds)
15:27:37*achim joined #nimrod
15:41:05*BitPuffin quit (Quit: WeeChat 0.4.2)
15:41:21*BitPuffin joined #nimrod
15:47:39dom96Seems the Nimrod talk will be late.
15:48:15OrionPKwhat on earth are they doing w/ it
15:48:22OrionPKwas it filmed in front of a green screen?
15:48:27dom96haha
15:48:52dom96Comparing the dates on http://www.infoq.com/strange-loop-2013/ to https://thestrangeloop.com/news/strange-loop-2013-video-schedule it seems that they were all released late.
15:50:01dom96In any case, just keep refreshing http://www.infoq.com/presentations/nimrod
15:51:12dom96oooh
15:51:14BitPuffinI wonder if I can somehow use nimrod as the scripting language for my C++ engine
15:51:19BitPuffinthat would be fun
15:51:19dom96"Note that the date specifies the *week of release*, not a particular day."
15:54:18*aftersha_ quit (Quit: Computer has gone to sleep.)
15:55:10BitPuffinAraq: would the VM allow an applications to execute nimrod code as part of the same process through a library for example?
16:13:04dom96BitPuffin: You know what the easiest to do that would be? To write it in Nimrod not C++ :P
16:16:28BitPuffindom96: well shut up
16:16:32BitPuffindom96: xD
16:16:42BitPuffindom96: I have good reasons to write it in C++
16:16:48dom96*easiest way
16:16:57dom96Oh?
16:17:08BitPuffindom96: yes
16:17:52dom96Tell me these reasons :P
16:18:07EXetoCindustry support?
16:18:38*dmac joined #nimrod
16:18:46BitPuffindom96: every time I talk to recruiters I feel like I have to proove that I know C++
16:18:55BitPuffinis it prove or proove
16:18:57BitPuffinprove maybe
16:18:59BitPuffinno
16:19:00dom96ahh
16:19:01BitPuffinproove
16:19:04dom96it's prove
16:19:08BitPuffinläl
16:19:32Varriount'prove' is one of those wierd english words.
16:19:44Varriount*weird
16:19:45BitPuffinyou mean weird?
16:19:46BitPuffinehehe
16:19:48BitPuffinxD
16:19:49EXetoCweird
16:20:02BitPuffinpff words
16:20:04BitPuffinwho needs them
16:20:26dom96BitPuffin: Why not just make a game using sfml or something in C++ as proof instead of creating a whole engine?
16:20:36BitPuffindom96: because fuck sfml
16:20:40VarriountLanguages are organic, and thus you often get the proverbial platypus cropping up among all the other animals in the grammatical ecosystem.
16:20:47BitPuffindom96: anyways I'm not writing the physics engine by hand
16:21:16BitPuffinVarriount: "proverbial platypus"? Are you trying to show off :P
16:22:37VarriountBitPuffin: Me, show off? That would be as likely as a diamond covered ladybug eating gold aphids.
16:23:14BitPuffinlål
16:23:22BitPuffinEXetoC: start playing dota or be punched
16:23:34dom96BitPuffin: You never play with me anymore.
16:23:43*dmac quit (Ping timeout: 272 seconds)
16:23:47EXetoCdom96: surprised that anyone would want to use some widespread language instead? :p
16:23:53Varriountdom96: I recently looked up sfml, and I kept thinking to myself "what's the catch"?
16:24:09dom96EXetoC: Not surprised just disappointed.
16:24:31BitPuffindom96: that sounded terribly wrong
16:24:39EXetoCyeah well :>
16:24:43BitPuffindom96: yes I do we played like 2-3 days ago
16:24:55BitPuffindom96: It's not like I love C++ all of a sudden
16:24:59BitPuffinso don't be disappoint
16:25:16dom96BitPuffin: Our relationship is falling apart, you're not using Nimrod, we don't play as often as we used to anymore... what happened to us? </3
16:25:21BitPuffinVarriount: I wonder "what's the fuzz about"
16:25:24dom96lol
16:25:28BitPuffindom96: ;_;
16:25:58dom96Varriount: IMO it's a pretty good library
16:26:26BitPuffindom96: and now you are saying sfml is pretty good
16:26:34BitPuffindom96: it's all falling apart
16:26:47dom96lol
16:26:56dom96BitPuffin: I think we should see other people.
16:27:04BitPuffindom96: so now you are cheating on me?
16:27:08dom96BitPuffin: I truly hope we can remain great internet strangers.
16:27:32dom96BitPuffin: I never said that!
16:27:43BitPuffindom96: so now you wanna cheat on me?
16:27:51BitPuffinWhat happened when you said I was the only one..
16:28:02Varriountdom96, BitPuffin: Obligatory xkcd comic -> http://xkcd.com/632/
16:28:04BitPuffinsentence fail
16:32:55dom96Argh. I dislike this period when I feel like I should be revising but I also want to program and then I feel guilty about not revising so I end up doing nothing.
16:33:51bstrieAraq: reading this concurrency post, "When holding a lock at level L one can only acquire new locks of levels < N." <-- is N supposed to be L there?
16:38:25EXetoCBitPuffin: got no time for games like I said
16:38:43dom96EXetoC is wise.
16:40:19BitPuffinEXetoC: stahp
16:40:24dom96OrionPK: Are you making an alternative to jester too?
16:40:27BitPuffinEXetoC: you do play games
16:40:42BitPuffinEXetoC: in fact when I was the wise one you FORCED me to play fo
16:43:01BitPuffindom96: plus you ruined my tries to convince filwit that dota is great
16:43:10dom96lol
16:43:17EXetoCthat was some time ago. anyway, I might consider such games, because they don't require constant attention
16:43:18dom96filwit is too cool for dota
16:43:42BitPuffindota is too cool for everyone
16:44:20OrionPKdom96 im making something higher level than jester for blogging
16:44:43dom96why not build on top of jester then?
16:45:15OrionPKbecause originally i wanted it to be on top of another http server like mongoose
16:45:24OrionPKand I still havent given up on that
16:45:41BitPuffinwould be neat if you could plug jester to different servers
16:45:55dom96you can
16:47:16BitPuffindom96: I don't mean putting jester behind a web server
16:47:28BitPuffinI mean switching out the web server powering jester
16:47:59EXetoCas in using SCGI (http = false)?
16:48:24BitPuffinoh you can do that?
16:48:38dom96of course
16:48:45EXetoCyes, but it doesn't work for me. I need to report that bug
16:48:53dom96that is effectively putting jester behind a web server though
16:49:46dom96I guess you want some sort of feedRequest callback or something.
16:49:55BitPuffinyaman
16:50:25dom96httpserver will soon be good enough :P
16:50:34dom96if only I didn't have exams right now...
16:50:36dom96*sigh*
16:50:49BitPuffinyou've been saying soon since I started using nimrod
16:51:48dom96lol
16:51:53dom96soon can mean many things
16:52:01OrionPKif I could handle a ton of concurrent requests w/ pure nimrod, that'd be nice ;0
16:52:17dom96You will be able to once I finish async
16:52:23dom96new async that is
16:53:46OrionPKwebframe is just a bit better than jester w/ my template stuff
16:54:08EXetoCsoon < ∞
16:54:30OrionPKalso its going to handle pre-compilation of RST and master pages and stuff
16:54:51OrionPKso you'll be able to drop assets/articles etc into a folder and have them get processed and optimized
16:55:59BitPuffinEXetoC: soon = ∞
17:01:56VarriountOrionPK: "Webframe"?
17:02:54OrionPKthe platform I'm building to move my blog onto
17:04:02VarriountOrionPK: link?
17:05:10OrionPKit's not really ready for public consumption
17:05:29OrionPKDom just found it by looking at my github
17:05:50OrionPKthis is why I used my own svn server for familiar :-)
17:06:22VarriountPfft, svn
17:07:00*dirkk0 quit (Quit: This computer has gone to sleep)
17:07:15OrionPKright now it's basically a clone of jester, functionality wise, but it lacks some things jester has and has some things jester does t
17:07:17OrionPKdoesnt
17:08:05BitPuffinsounds like duplication of effort
17:08:21reactormonkwhat encoding does a string have in nimrod?
17:09:39BitPuffinreactormonk: utf-8 I believe
17:09:40OrionPKmaybe, but my slogan is "webframe doesnt joke around" :P
17:09:46BitPuffinlol
17:13:08EXetoCreactormonk: it's just a sequence of bytes. see the unicode module
17:16:40EXetoC"
17:19:08*dmac joined #nimrod
17:20:39EXetoC"åäö".len -> 6, sequtils.toSeq(unicode.runes("åäö")) -> 3
17:21:42*icebattle joined #nimrod
17:22:17OrionPKVarriount so does the folder/filesystem change detection stuff exist in the std lib?
17:22:21BitPuffinEXetoC: ie utf-8
17:23:45*dmac quit (Ping timeout: 265 seconds)
17:27:37EXetoCthe literal you mean?
17:28:41BitPuffinEXetoC: no I mean that's how utf-8 works
17:29:02BitPuffinfor special characters such as ö it uses two characters in order to get enough bytes
17:31:40EXetoCyes but I was referring to this: "Per convention, all strings are UTF-8 strings, but this is not enforced. For example, when reading strings from binary files, they are merely a sequence of bytes"
17:34:18BitPuffinah right
17:34:44EXetoCand he might be able to infer some things based on those results
17:37:42BitPuffinyea
18:01:36*DAddYE joined #nimrod
18:09:44*brson joined #nimrod
18:12:21vbttanyone know when the strangeloop video will be available for general public?
18:12:46Araqbstrie: yes, it's a simple typo
18:13:16*dirkk0 joined #nimrod
18:15:02*dmac joined #nimrod
18:15:09dom96vbtt: http://www.infoq.com/presentations/nimrod
18:16:58*dmac quit (Client Quit)
18:18:49*dmac joined #nimrod
18:21:58vbttdom96:"This is a restricted presentation that can only be viewed by Strange Loop 2013 attendees! The public release of this presentation will be sometime in the next 6 months - date to be determined."
18:22:10dom96Yeah, it's not release yet.
18:22:12dom96*released
18:22:44vbttyup, do you know when it will be?
18:23:01dom96Sometime during this week according to https://thestrangeloop.com/news/strange-loop-2013-video-schedule
18:23:07dom96Other than that I have no idea.
18:23:44vbttnice!
18:33:45*radsoc quit (Ping timeout: 245 seconds)
18:56:45Araqhmmm ... how do I produce different tabs with javascript?
19:07:07*BitPuffin quit (Ping timeout: 272 seconds)
19:09:31OrionPKdifferent tabs?
19:09:36OrionPKbrowser tabs?
19:10:02Araqno, within the same web page
19:10:10Araqall content statically generated
19:10:33OrionPKnot sure what you mean then
19:10:43Araqhttp://www.elated.com/articles/javascript-tabs/
19:10:54Araqthis seems to do what I want but looks rather complex
19:10:54OrionPKoh
19:11:03OrionPKthe basic principal is easy
19:11:10AraqI'm not even sure I need JS for that
19:11:11OrionPKjust hide/show tab content elements tied to links
19:11:28OrionPKyou need JS to change the CSS class/style of elements probably
19:11:39OrionPKwhen you click an associated tab
19:11:59AraqI think I've seen that done with pure CSS
19:12:38OrionPKthere's no ":click" option in CSS.. maybe you could do it with :focus or :active, but it'd be dodgy probably
19:16:20EXetoCclick + anchor?
19:16:46*brson quit (Quit: leaving)
19:16:49Araqmeh I'll just copy&paste
19:17:03*brson joined #nimrod
19:17:16Araqand it won't work because I already have some css and the C part of it is broken by design
19:18:07EXetoCthe purpose is to reduce repetition? you can't use a template engine?
19:19:00EXetoCI don't know what other reasons there are, apart from reducing the amount of GET's
19:22:57discolodaC type parsing is a pita
19:24:57vbtthow much of the nimrod compiler is written in nimrod vs. c?
19:25:58Araqwell I'm talking of the "cascading feature"
19:26:13discolodai think its all nimrod, but im just trying to improve c2nim
19:26:41Araqvbtt: nimbase.h is the only hand-written C in the whole distribution
19:26:47vbttcool
19:27:33*achim quit (Quit: Computer has gone to sleep.)
19:31:20vbtthow can i dump the generated C code?
19:31:56Araqjust look at the nimcache directory, it's kept
19:32:50Araquse --embedsrc
19:33:05Araqthen the compiler produces the nimrod code in comments in the C code
19:33:15vbttAraq: thx
19:35:50Araqdiscoloda: indeed C type parsing makes you mad
19:46:20*pe7ed27 joined #nimrod
19:47:30zaharyAraq, I appreciate the new test persistence backend
19:48:10zaharydo you just explore it with some sqlite viewer or you have some script that you haven't commited? (e.g. to see a diff with the previous commit)
19:48:19AraqI'm writing a html generator :-)
19:48:25Araqwill upload it tonight
19:48:30zaharyok
19:48:39Araqalready works, but I want to have "tabs"
19:48:43Araqone tab per commit
19:48:44zahary:)
19:49:42*[Pete_27] quit (Ping timeout: 276 seconds)
19:49:50AraqI hope this makes development much faster
19:49:57Araqbut we'll see
19:50:31zaharydidn't tablizer preach that directories can't organize anything :P
19:50:31Araqin case you didn't notice, the "spec" part of the test directly indiciates what to do with the test
19:50:56Araqno need for any explicit reject/compile/run distinction
19:51:28*gradha joined #nimrod
19:51:29Araqyeah yeah yeah, tablizer is old stuff though and the file system still is no database
19:52:07zaharyhmm, my git client doesn't show any diffs for the tests. what's new in the specs?
19:52:32Araqand to my defense ... we kepts adding tests beyond its breaking point, there was no conscious design decision involved really
19:52:58Araqthere is nothing new in the specs
19:53:17AraqI noticed the reject/compile/run distinction is not necessary on the directory level
19:53:25zaharythe tests directory certainly looks more impressive the current way :)
19:53:26Araqas the spec already has that information implicitly
19:54:48Araqyeah ... I plan to go through each category individually
19:55:02Araqbut I just noticed we have almost 100 categories ... huh
19:56:04zaharyshould we use symlinks to turn the directories into tags?
19:56:11zaharywindows users might suffer
19:56:41Araqbah, I still dislike symlinks :P
19:56:54AraqI wanted to tag tests in the spec section
19:58:25Araqoh ... I wanted to ask you: what's the relation of "unique" and "destructor"?
19:58:42zaharyunique as in pointers?
19:58:50Araqyes
19:59:05Araqseems useful to conflate both concepts
19:59:20Araqbut I'm not sure about all the consequences
19:59:48zaharythey seem pretty orthogonal to me. naturally, you run the destructor when the unique pointer goes out of scope (considering it hasn't been trasnfered to another proc)
20:02:33Araqwhy orthogonal? you can't really invoke the destructor when the pointer escapes
20:02:58Araqand escaping is tracked with the uniqueness mechanism, sort of
20:04:45Araqhey gradha I reviewed your docgen changes, they look fine to me
20:07:17dom96If the talk were to be released now we may just beat our current user record here.
20:07:41gradhaAraq: do you want them in master, devel, or both?
20:08:14zaharyI see what you mean, but destructors are about the clean up code (manually or automatically written); uniqueness on the other hand is life-time characteristic of the object;
20:09:37zaharyone way to approach unique pointers for example is to limit their use to stack locations (this allows perfect tracking without any runtime checks); in such a world, it woudn't make sense to not allow destructable fields in heap objects
20:09:38*BitPuffin joined #nimrod
20:10:25Araqgradha: devel though I can't see it breaks anything
20:10:51zaharyI was about to say that you also care whether an object will have stack or heap location, but the compiler can indeed determine that with escape analysis for uniques
20:12:05gradhaAraq: all new changes into devel from now on?
20:12:41Araqgradha: yes
20:16:30Araqin fact, I consider the whole proc f(p: ptr T) idea wrong, zahary
20:16:48zaharywhat?
20:17:15Araqit should be explicit whether "p" is stored somewhere or not ...
20:17:29zaharythe idea of raw pointers?
20:17:36Araqyeah
20:17:49Araqproc f(s: cstring)
20:17:53Araqf "valid?"
20:18:10Araqit almost always is unless 'f' stores the cstring somewhere
20:18:33Araqwell let me elaborate
20:18:55Araqwhether the conversion string->cstring is valid depends on what "f" does with the cstring
20:19:30Araqso it would be nice if "f" could tell us that fact
20:20:38Araqand the write tracking does not help either: proc f(s: cstring) {writes: someGlobal.}
20:20:51Araq# still insufficient information about "s"
20:21:00zaharyI was thinking the other night when you asked about lent. besides my argument that regular value accepting procs are "lent", because they don't usually use addr, it occurred to me that "lent" is computable from the definition anyway
20:21:05zaharyso I could say the same here
20:23:20Araqyeah, looks pretty easy to compute whether the pointer is lent or not
20:23:30zaharyyou could track it on a param level; in the body of this proc "s" is not passed to any ...
20:23:59Araqyeah it's quite close to what we do for the write tracking
20:24:27AraqI think I can enhance the algorithm to compute that additionally
20:33:52OrionPKis there a way I can do a template where the input value can either be a raw set of values or a string.. e.g. treat query("something") the same as query(something), where if the input is not a string astToStr is called
20:35:28Varriountzahary: What did you mean, windows users might suffer if there were symlinks?
20:35:53*achim joined #nimrod
20:36:34zaharywell, what does git do whet it sees a symlink? mklink requires admin account IIRC
20:37:03fowlOrionPK, yes use a language with dynamic typing
20:37:06zahary*when it sees*
20:37:14Varriountzahary: Ah, true.
20:37:22OrionPKin nimrod :P
20:37:24AraqOrionPK: seems easy to do
20:37:27gradhaOrionPK: I think you can make a macro for the type checking, and call the macro inside your template on the parameter to get always the string
20:37:38Araqyou can also use overloading
20:37:47OrionPKi think it needs to be immediate
20:38:10Araqtemplate foo(x: expr{string}): expr = x
20:38:22Araqtemplate foo(x: expr): expr = astToStr(x)
20:38:31Araqer, you need
20:38:42Araqtemplate foo(x: string): expr = x
20:40:58AraqVarriount: I don't want symlinks even if they work on windows
20:41:38*DAddYE quit (Remote host closed the connection)
20:44:21*[3]Endy quit (Ping timeout: 248 seconds)
20:44:55*ddl_smurf quit (Quit: ddl_smurf)
20:47:43*achim quit (Quit: Computer has gone to sleep.)
21:00:53vbttstupid q: why cant I define object types with object[name: string, age: int]
21:02:18dom96You might as well just make it a tuple then.
21:02:30gradhavbtt: object variants would be quite difficult to read with that syntax
21:02:47zaharywell, he is asking to support both just like tuples
21:03:49dom96I guess there is no harm in allowing that.
21:06:44*viteqqq joined #nimrod
21:07:10OrionPKaraq Error: illformed AST: string
21:07:13vbttright, just starting out and saw the tuple syntax, very easy. then assumed the object syntax also allows that same shorthand but didn't work :(
21:08:10AraqOrionPK: :-/
21:08:42Araqvbtt: you can't have anonymous object types though
21:08:50OrionPKive never had much luck w/ parameter contraints
21:09:29Araqso I don't think [] for objects buys you anything
21:10:04AraqOrionPK: no, I corrected that version
21:10:21Araqexpr{string} is not valid indeed, expr{lit} would be
21:10:36Araqbut you want simply "string" here
21:10:39OrionPKyeah
21:10:48OrionPKneeds to be immediate though i think
21:11:03Araqyeah
21:11:14vbttAraq: i see. it just allows one-line-definitions.
21:11:43vbttnot a big deal, but i just expected it to work based on the principle of consistency.
21:12:53Araqthat principle is at odds with the principle of organic growth
21:14:13vbttyeah i suppose.
21:14:51OrionPKaraq hmm this works with query() as a template
21:15:01OrionPKbut not as an operator i.e. `?`
21:15:24Araqthat's quite impossible
21:15:43OrionPKmmk
21:15:50vbttobject variants look awesome, btw.
21:16:50Araqusually people are furious they don't work like in ML, vbtt ...
21:18:10vbttmeh, it fits my python/c mind. concise syntax for a common pattern which is easy to understand.
21:18:39vbtti'm not sure how ml is different (i have only superficial knowledge of ocaml)
21:19:03vbttare invalid fields caught at compile time or run time?
21:19:29Araqrun time but the compiler can warn about it too
21:19:42Araqforgot how I named that switch though
21:20:25vbttshouldn't it always be a compile time error?
21:20:37vbttit's most certainly a bug, no?
21:20:44Araqwell that's exactly what people complain about :P
21:21:19Araqbut checking it at runtime allows for lots of idioms which are otherwise nearly impossible
21:21:40vbttAh I see.
21:21:51Araqfor i in 0 .. safeLen(n): echo n.kids[i]
21:22:10vbttwell runtime error is better than nothing.
21:22:17Araqfor i in 0 .. <safeLen(n): echo n.kids[i]
21:22:33Araq--> safeLen returns 0 if n.kids must not be accessed
21:22:46Araqeasy to do in nimrod, impossible in ML
21:23:48vbttsurely safelen() checks that n.kind == WithKids?
21:24:02Araqyes
21:24:18Araqand with proper post conditions for "safeLen" you can do it statically
21:24:22Araqbut we're not there yet
21:24:25vbttah cool.
21:24:52Araqhence a warning "cannot prove field access correct"
21:24:59vbtti was gonna say the complier could even infer the post conditions.
21:25:29vbttthat warming is pretty good - is there a way to 'tag' the line of code to silence the warning?
21:25:45*io2 joined #nimrod
21:25:51Araq{.push warning[FieldAccess]: off.}
21:26:05vbttnice
21:26:26Araqbut you can only surround the whole proc with that .push and .pop
21:27:09vbttoh, I can't do {.with .. .}? i have to write both push and pop?
21:27:32Araqyeah
21:27:58Araqbut hey, "with" is already a keyword ;-)
21:28:50vbttoh well.
21:29:45Araqzahary: I think you missed my remark about how we can support fork&join with a thread local GC'ed heap
21:30:08*DAddYE joined #nimrod
21:30:19*DAddYE quit (Remote host closed the connection)
21:30:25*DAddYE_ joined #nimrod
21:30:42zaharyI missed it indeed
21:31:05Araqit's quite easy to do: the parent thread stops its GC and passes its allocator to the children which then can do new(allocator, x);
21:31:42Araqwhere the "new(allocator)" uses a lock, the version without the allocator doesn't use a lock
21:32:15Araqhence the parent needs to disable the GC for the duration of the fork&join
21:32:24zaharyyou mean the user cooperates by writing his proc differently?
21:32:45Araqand must join() for the child threads
21:32:46zaharyor the compiler generates alternative procs for used inside the parallel blocks
21:33:18*DAddYE_ quit (Client Quit)
21:33:19AraqI'm only talking about the runtime, not about any interface or type system additions
21:33:19vbttparent also needs to disable all new allocations, no?
21:33:31Araqvbtt: yes, it needs to join()
21:33:51*radsoc joined #nimrod
21:34:09Araqafterwards it can continue to run with no locking on "new"
21:34:11vbttso parent cant do anything else between fork and join.
21:34:20Araqyup
21:34:47Araqbut that's not a problem, just use enough child threads to keep the cores busy
21:35:07Araqthe problem is how to design the type system to support it safely
21:35:23vbttok, sounds like a pattern for parallelism.
21:35:30zaharywell, ok, but that's one big issue to figure out. the problem I was going to cite is that the user would find it hard to cooperate, because of the likeliness of calling code not written with parallel tasks in mind
21:36:05zaharyand generating alternative bodies will lead to some code bloat
21:36:21*odc quit (Ping timeout: 251 seconds)
21:37:01Araqha, says the guy who introduced implicit generics :P
21:37:32Araqbut yeah, I'm not thinking about generating alternative bodies
21:37:44zahary:) hey, I'm still advocating the bloated handling of maybeAsgnRef
21:39:04Araqhowever the pattern is quite important and as I said, easily supported with what we already have
21:39:44Araqone idea is that "ref" et. a. becomes "foreign ref" when passed to a thread
21:40:01Araqand new(allocator) returns a "foreign ref"
21:40:55Araqbut this is not sound; we need to introduce proper regions then
21:41:05zaharya TLS run-time solution to detect the mode wouldn't probably be that bad
21:41:36vbttfwiw, I think most parallelism cases can be implemented by building on top iterators.
21:41:41vbtt*top of iterators.
21:41:50Araqoh yeah that was one idea, new without the allocator can check in debug mode the collector hasn't been put into "parallel mode"
21:41:57radsoc /msg Varriount Hi Varriount (sorry for this private message but I don't want to interrupt Araq) I just tried your plugin. Nice. But it made me upgrade to ST3: I couldn't build after installing your package on ST2 (on windows): weird, no? The syntax highlighting is better indeed ("_" support!) but I have a question: why some types are highlighted as keywords (int, string, seq...) and not other one (such as pointer)?
21:42:34zaharywhat is your stackless GC btw?
21:42:52Araqthe pure refcounting gc
21:43:15gradharadsoc: your secret is safe with us
21:43:32radsoclol
21:43:41zaharybased on the advanced papers?
21:43:58Araqno stack tracing and so every library which does nasty stuff such as running your callback on the background thread works
21:45:12vbttit's awesome that i can use type like this: proc f(x): type(x) = return x
21:46:23zaharyso, non-deferred, but does it try to reduce the refcount updates?
21:46:49Araqzahary: I studied the paper in detail and came to the conclusion I can implement something better instead. I'm a bragger, I know, but the paper misses lots of common idioms
21:48:05Araqbut that was already months ago and unfortunately I don't remember the details
21:48:29zaharyalright, but still, you'll be aiming for an advanced algorithm to reduce the refcounts?
21:49:10vbttfwiw, shared allocator doesn't sound that nice. high allocation rate will produce high contention.
21:49:20vbtt=very low scaling factor
21:49:47Araqvbtt: you can do lockfree allocation or lock stripes
21:49:59vbttcould you have thread-local allocators that just merge with the parent memory at join()?
21:50:13Araqhmm, nice
21:50:23Araqthat works :-)
21:50:48vbtttypically each parallel routine will do it's work and then return a ref to an object
21:51:06Araqzahary: I don't even know when I get to implement the pure rc gc ...
21:51:10vbttif each routine is modifying shared data in the parent, it's gonna suck anyway.
21:52:43Araqvbtt: we need "shared ref" at the type system level so that "shared ref <- ref" produces an atomic update somehow
21:53:22Araqor maybe enforces some locking like my "guarded ptr" idea
21:53:35vbttAraq:I'm not sure what specific use case you're going for.
21:54:06EXetoCradsoc: always use non-channel windows, or use /query <nick> :>
21:54:07vbttAraq:have you looked at persistent data structures like the ones clojure uses?
21:54:41vbttwhat does 'shared ref' mean? it's an object shared across threads?
21:55:06Araqpersistent data structures only help by being immutable and so you can read them without any locks
21:55:25Araqthey don't at all help with parallel memory allocations
21:55:31vbttright
21:55:42vbttactually no
21:55:59Araqclojure simply uses jvm's advanced shared heap GC and calls it a day
21:56:14AraqI can't see what to learn from that, sorry
21:57:11Araqvbtt: ok ok
21:57:17vbttit just uses persistent data structures to provide concurrency that's all.
21:57:20vbttanyway, i may be off topic.
21:57:47Araqactually immutability greatly helps the GC, albeit indirectly
21:58:08Araqbecause it's a perfect fit for the 3 color invariant
21:58:12vbtti'm not really sure what you're trying to solve here. there are many use cases for wanting multiple threads - 1) threads operating on different parts of a shared data (e.g array) 2) threads generatign new objects and returning which combines into one structure...
21:58:40gradhathe docgen changes don't work on devel because renderer depends on types and types dependes on renderer
21:59:02vbtt3) concurrency (i.e. threads are mostly working on isolated data with very mostly read-only shared state and very few updates to shared state.
21:59:39Araqwell IME "multiple threads are building a shared hash table" is a key example, it comes up again and again
22:00:02Araqor take simply filling an array in parallel
22:00:10Araqeasy when it's an array of ints
22:00:20Araqcurrently impossible when it's an array of strings
22:00:30Araqthat's what I'm after
22:01:38Araqgradha: check the deps on master and fix devel accordingly if possible
22:01:53gradhazahary: you made types import render for tyFromExpr, how can I avoid the circular dependency? I want types.typeToString
22:03:23Araqvbtt: what "shared ref" means it exactly the question we don't know the answer. could mean "foreign ref", could mean "allocated on a shared GCed heap"
22:05:51zaharygradha, usually dependency cycles are broken by introducing a proc pointer
22:06:17zaharythe depended upon module gets its dependency set from outside
22:06:38vbttAraq: in your examples, contention on the shared data structure is going to kill the performance anyway. To avoid that the workers should mostly run free of contention and at times return large chunks of generated data to the parent.
22:06:49vbttit's trivial with messaging but involves copy overhead.
22:07:56vbtthere's another suggestion. solve this with specially marked data structures that implement two interfaces - one for the parent and one for each worker. when you pass such a data structure to a spawned routine, it can only use the worker interface.
22:08:29vbtthmm, you still need a way to allocate in the parent's memory space.
22:09:12Araqyeah
22:09:19vbttso I think you may need another version of the alloc() function, that can allocate in another 'heap'.
22:09:23Araqalso I think you are slightly misunderstanding my idea
22:09:26vbttok
22:09:51Araq"new()" for the child thread still exists and allocates on this child's heap
22:10:02Araq"new(allocator)" allocates on the parent's heap
22:10:32Araqdepending on what you do in "child", lots of stuff still is not contented
22:10:59gradhazahary: the changes I added to renderer.nim don't really depend on that module, but don't seem to fit into types, maybe I should add a typesrenderer.nim?
22:11:33Araqgradha: yeah sounds good
22:12:25vbttAraq:in practice, if multiple cpus are writing to the same memory pages, theres going to a lot of low level shutting around of data - even if you dont have explicit locking.
22:12:52Araqreally? "same pages"? IME it's only about same cache lines
22:14:18*viteqqq quit (Ping timeout: 252 seconds)
22:15:38vbttdepends on the cpus i guess. if they're multiple caches mapped to the same data..
22:16:46vbtteach core has it's own L1 and L2 cache, no?
22:17:01Araqyes
22:17:07vbttand local caches will grow over time, IMO
22:17:33Araqwell I was ambiguous
22:18:01Araqwhat I mean is that you need to align non-shared data on cache lines to avoid false sharing
22:18:07vbttall I'm suggesting is designing systems that mostly operate on exclusive data with fewer 'sync points' is probably a good idea.
22:18:43Araqvbtt: we agree on this point. also avoiding copies is not all that important afaict
22:19:03vbttso from a high level - generating strings into a shared list - each core generates a list of strings, once each list is a sufficient size (or after a certain time) the list is swapped over to the parent and merged (without copying..)
22:19:40vbttAraq:if avoiding copying is not all that important then just implement message based copying (using the iterator protocol) and be done with it :)
22:20:18Araqwell that's what channels currently do
22:20:34Araqbut passing a tree over a channel causes a copy of the whole tree
22:20:55Araqand then it needs to be copied again into the thread local heap via "recv"
22:21:23Araqnot even Erlang does it this way, I think
22:21:57vbttErlang copies every message, unless you use the 'external' binary objects.
22:22:14vbttwhy do you need two copies?
22:22:38discolodai think Erlang's message queues are multiple writer, single reader
22:24:38Araqvbtt: 'send' requires a copy and so does 'recv'
22:25:17Araqit's possible to use only 1 copy but this doesn't want when you want to implement work stealing
22:25:24Araq*doesn't work
22:28:00vbttyeah erlang doesn't have channels, you send messages to processes directly.
22:28:25vbttor maybe it has channels but the standard messaging is sent to a pid not a channel.
22:29:10*radsoc quit (Ping timeout: 245 seconds)
22:29:24discolodameans any process can allocate memory on behalf of another process when a message is sent
22:29:50vbttAraq: your use cases (generated hash table or list) doesn't require work stealing.
22:30:04Araqthat doesn't change anything, vbtt
22:30:19Araqso send to a process, not to a channel
22:30:45Araqcan you construct the message in the process's heap while the process is running? no you can't
22:31:14Araqso you copy into a locked section of memory, its inbox
22:31:32Araqand then the process can read from that, requiring the second copy
22:31:48vbttwhy not? you allocate a largish arena for local use and allocate within that, once the arena is full, you pass control back to the parent. i think you suggested something similar already.
22:31:48Araqyou can avoid 1 copy by introducing a rendevous
22:32:16AraqI can't see that work for erlang
22:32:22Araqbut anyway
22:32:36Araqthe rendevous stuff is exactly what I'm planning to implement
22:33:04reactormonkDoes a string have an encoding? Or just undefined?
22:33:14reactormonkAka "a list of bytes"
22:33:35Araqreactormonk: depends on how you use it, use the taint mode and check the encoding of your inputs
22:34:02reactormonkAraq, https://github.com/Araq/Nimrod/pull/779
22:34:26NimBotAraq/Nimrod master de30ba7 Satish BD [+0 ±1 -0]: Define $ operator for TRune
22:34:26NimBotAraq/Nimrod master 1988330 Satish BD [+0 ±1 -0]: Define $ operator for TRune
22:34:26NimBotAraq/Nimrod master 1ef50ee Andreas Rumpf [+0 ±1 -0]: Merge pull request #779 from brihat/master... 2 more lines
22:34:56vbttAraq: ok then!
22:36:01vbttAraq: another suggesting that might simplify the semantics of the language while allowing the shared memory allocation: require use of iterators to generate data in the worker routines.
22:36:07reactormonkAraq, https://github.com/Araq/Nimrod/pull/777 on a different topic
22:36:30vbttthe good thing about iterators is the semantics are like adding to a list - you're always growing the result list.
22:37:05vbttso - internally the worker adds items to a buffer arena and when it's full, it's swapped back to the parent with no copying.
22:37:17Araqvbtt: I need to think about that one
22:37:43Araqreactormonk: the convention is clearly haystack needle btw
22:37:48vbttalso - instead of defining any shared ref, I just have write a regular iterator, when it's invoked from spawn() it's automatically uses a different allocator.
22:38:54vbttwhy have the user worry about 'shared ref or ref'?
22:39:41NimBotAraq/Nimrod master 3fcbbb8 Billingsly Wetherfordshire [+0 ±1 -0]: Update os.nim... 2 more lines
22:39:41NimBotAraq/Nimrod master d15ab4c Andreas Rumpf [+0 ±1 -0]: Merge pull request #777 from fowlmouth/patch-4... 2 more lines
22:40:20Araqvbtt: shared memory surely is convenient too
22:40:34OrionPKsomeone should put csources/ in gitignore for the main repo
22:40:41reactormonkAraq, so fileExists?
22:41:53OrionPKwhy not a template for those?
22:42:39AraqOrionPK: the manual says don't use a template when a proc suffices
22:42:48AraqI know nobody cares :P
22:42:55OrionPKlol
22:43:05OrionPKwhats the reasoning for the manual saying that?
22:43:18Araqprincimple of least power or whatever it's called
22:43:21OrionPKdont use a proc when a template suffices :p
22:43:28Araq*principle
22:43:42NimBotVarriount/Nimrod-Sublime plugins/nimcheck eadd0c1 Clay Sweetser [+1 ±1 -1]: Rename nimchecker.py to NimCheck.py... 3 more lines
22:44:19AraqOrionPK: http://en.wikipedia.org/wiki/Rule_of_least_power
22:44:58vbttAraq: perhaps flesh out the use cases a bit? I'm not sure what trade offs you're going for. IME most shared memory uses can be solved by picking the right data structure - e.g. shared read heavy with occasional writes? use persistent ds. shared write heavy with single worker read? use queue (or the iterator approach i described). etc.
22:48:41*dirkk0 quit (Quit: This computer has gone to sleep)
22:48:55Araqreactormonk: delphi uses fileExists so it can't be bad
22:49:36gradhaAllegro (C) too http://www.udel.edu/CIS/software/dist/allegro-4.2.1/docs/html/alleg030.html#file_exists
22:52:26vbttfwiw, i'm looking at the user manual and it's starting to look like a really nice language :)
22:53:04Araqyeah but we lack interfaces and without interfaces you can't write useful software
22:53:04vbttof course there are a few things not to my taste but overall it looks awesome - a great systems type language.
22:53:20vbttis that in the plan for 1.0?
22:53:34AraqI hate interfaces with a passion fwiw
22:54:03reactormonkAraq, ^^
22:54:08vbttdo you really need interfaces?
22:54:11gradhaAraq: on that note I just answered on the forum, maybe you should rebrand generics
22:54:13Araqhave yet to see use cases which are not cargo cult programming, streams are the obvious exception
22:54:59reactormonkAraq, functors?
22:55:15Araqbut we managed to implement streams without interfaces ...
22:55:17Araq:P
22:55:56reactormonkAraq, you can replace interfaces with conventions
22:56:04Araqvbtt: I don't need interfaces and I am happier without them
22:56:12vbttso dont implement them?
22:56:30vbttif you still have polymorphism, you dont really need interfaces.
22:57:02Araqyeah, ... I don't use polymorphism either, but we have that
22:57:07vbttI like implicit interfaces (i.e. duck typing :) - but statically checked would be awesome.
22:58:00Araqmaybe I should implement them and say have fun, they don't really work well with an effects system, but what do I know ...
22:59:38dom96We just need some syntax sugar for what is done in streams.nim
22:59:55vbttif i can create a list of objects of different types, iterate over it and call a method that exist of all types, and it's statically checked, then i'm good. dont need interfaces.
23:00:14Araqdom96: really? why? implementing a stream is no big deal
23:00:32Araqand doesn't come up often
23:00:45vbttthe problem with interfaces-as-a-feature is people get interface-happy.
23:00:48dom96Araq: To keep people happy.
23:01:06Araqvbtt: exactly and they even consider it good code/engineering
23:01:09vbttsoon you'll have addable, subtractable, divisible, addablesubtractable, and every combination thereof.
23:01:12gradhafuck happiness, will nimrod make me money?
23:02:00Araqgradha: I'm not sure what you're implying here
23:02:11OrionPKmoney is for schmucks
23:02:31Araqgradha: that we should optimize for popularity?
23:02:38gradhaI can live on money, but I can't live on happiness, so I would prefer a tool to get the former
23:02:49gradhaAraq: in this case, interfaces == popular
23:02:52OrionPKbut when ur happy u can die happy
23:02:58vbttbtw, if I do 'var x = MyObject()' does it go on the stack or heap?
23:03:03dom96Araq: We're already caving into people's demands.
23:03:06OrionPKinterfaces would be nice..
23:03:18VarriountCan't you get 'interfaces' already by simply using templates and assertions?
23:03:19vbttheh, make sure you're happy too, or you wont like to work on your language :)
23:05:10VarriountAlso, don't the abstract type thingies zaharies been working on pretty much implement interfaces?
23:06:37dom96They do indeed.
23:06:44AraqVarriount: zahary implements "static interfaces" which I like very much
23:06:48vbttyou can always add things to the language, but it's harder to take them away (that's what language designers have been saying anyway)
23:06:57Araqbut people ask for "dynamic interfaces"
23:07:02dom96We should get those finished and change streams to use them
23:07:14Varriount"Dynamic Interfaces"?
23:07:28vbtt..just on that principle, you could leave out interfaces and see how people use the language.
23:07:29vbttwhat's a dynamic interfaces?
23:08:10Araqdom96: that's exactly what doesn't work
23:08:26Araqbecause streams pretty much require dynamic binding to fight excessive code bloat
23:08:27OrionPKdynamic binding
23:08:46Araqvbtt: I made up these terms
23:08:47gradhagood night, honey badgers
23:08:56*gradha quit (Quit: bbl, need to watch http://www.youtube.com/watch?v=dEf4PJZXBxA again)
23:08:57OrionPKnight grader
23:09:11dom96Well then I think that justifies at least some sugar.
23:09:28dom96My selectors module uses the same approach that streams uses.
23:09:41VarriountYou mean, runtime additions of conversion routines for those data structures which fulfill some sort of interface?
23:10:57*BitPuffin quit (Ping timeout: 252 seconds)
23:11:11dom96And if a stream doesn't implement some proc under the interface it is silently ignored. Something which i'm not sure is the best idea.
23:13:26Araqwe could easily crash instead :P
23:13:38dom96Yes, is there a reason we don't?
23:14:10Araqcan't remember
23:14:21Araqusually I have my reasons
23:15:51dom96Perhaps I shouldn't be doing it the way streams is doing it then?
23:15:59vbttbtw, how do I put objects of different types in the same seq?
23:16:23Varriountvbtt: You don't?
23:17:33*DAddYE joined #nimrod
23:17:34Varriountvbtt: If you have a limited number of types that you need to contain, you could use an object type with conditional fields.
23:19:32VarriountIf you aren't concerned about space, you can also use a sequence of tuples the same way. Object varients would take less space though.
23:20:05Varriount(If I"m not mistaken, object varients use unions with the C backend)
23:20:52Araqyes, they use unions
23:20:57vbtthm ok
23:21:23vbttso all objects in a sequence have to be the same type?
23:21:32Araqessentially yes
23:21:54Araqyou can do use inheritance and "ref object" and put different things into the same seq
23:22:34Araqbut if they are different types, why put them into the same seq?
23:23:03Araqusually you want to do the same stuff on every item in a seq
23:23:14Araqwhich is rather hard to do when they are of different types
23:23:52VarriountAraq: What if you have a sequence of abstract types which fulfill an interface?
23:24:33AraqVarriount: I use seq[proc () {.closure.}] then :P
23:24:52vbttAraq: e.g. a sequence of strings interpolated with placeholder objects. then have a function that iterates over it, joining strings and rendering placeholders.
23:25:26vbtti can probably do it with variants, but was trying to avoid another type definition.
23:25:39Araq"sequence of strings interpolated with placeholder objects" sounds exactly like I would never do
23:25:55Varriountvbtt: why placeholder objects?
23:26:26vbttVarriount:e.g. a template that's being rendered
23:26:44vbttyou convert the placeholders to strings a a specific time, then join all strings.
23:27:05Varriountvbtt: That sounds suspiciously like what echo() does to stringify it's arguments
23:28:07vbttthe example is just to demonstrate the need for a sequence of disparate types.
23:28:41Araqthe example is bad to show that, sorry
23:28:52vbttecho renders all params right away. in my example you create the list once, then possibly render it later within different contexts for resolving placeholders.
23:28:59vbttok
23:29:13Araqseq[tuple{s: string, transform: proc (s: string): string]] does the trick
23:29:30Araqseq[tuple[s: string, transform: proc (s: string): string]]
23:30:05Araqif you want polymorphism over the "string" type, you can easily hide that in the closure
23:30:21Araqseq[proc (): string]
23:30:41VarriountOr if you want a quick, dirty, and unsafe solution, look to the above use of refs
23:31:43Araqfor years I keep explaining closures are a cool replacement for common OO idioms
23:31:50Araqnobody listens to me! ;-)
23:32:42VarriountAraq: To be fair, I've known you for less than 6 months, and vbtt has known you for even less.
23:34:33vbttI'm not too committed to OO idioms, in fact I dont like inheritance very much.
23:34:51Araqand what you hide in the closure stays typesafe without any inheritance and type conversions that can fail at runtime
23:34:55vbttBut my example doesn't have anything to do with OO.
23:35:08Araqmaybe not
23:35:23Araqit's about some laziness
23:35:49vbttyes :)
23:36:30vbttand about ad-hoc polymorphism.
23:38:02Araqdepends on your terminology, I know "ad-hoc polymorphism" as a synonym for "overloading"
23:40:07vbttif you're familiar with python then that's what i was getting at. I can add objects of any type to a list, then iterate over it and access methods/fields on each object. if it's missing i get a runtime error. in a statically typed language, I was hoping to do the same but with static checking. or perhaps a requirement that i use a swich/case on typ
23:40:07vbtte.
23:40:45vbttthis might require full program type analysis though.
23:41:10Araqwell there are at least 3 solutions, case object, object + inheritance or closures
23:41:20Araqor a combination of these
23:41:41vbttright - none of them are ad-hoc although all qualify for 'polymorphism' and quite acceptable for a static language.
23:42:08Araqall more verbose than python's solution but you can always try to patch a macro over that
23:42:34vbttit's reasonable even without macros. i'm just getting a feel for the language and testing limits.
23:42:43Araqok
23:44:17*io2 quit ()
23:48:49vbttis nimrod used in production? how unstable are the semantics and standard lib?
23:49:04vbttps: when is 1.0 planned?
23:49:21Araqsome people use it in production but these are quiet
23:49:45Araqsemantics and lib are stable
23:49:58Araq1.0 planned for the end of the year
23:50:06vbttok
23:50:17Araqthe biggest upcoming change is the saner concurrency model
23:50:42*vbtt quit (Remote host closed the connection)
23:51:04*vbtt_ joined #nimrod
23:51:08vbtt_ah, something i am most interested in
23:51:46vbtt_:)
23:51:47Araqwell ok the sockets related stuff is in constant flux
23:51:55Araqso parts of the stdlib are stable
23:52:17*darkf joined #nimrod
23:52:47dom96"Unlike other Windows API functions, ConnectEx() must be loaded at runtime"
23:52:49dom96yay
23:54:02reactormonkI'm looking for a general-purpose server I can run a bit of data collection, via zmq. Anyone knows of good offers?
23:54:23Araqdom96 knows a good offer
23:54:40dom96huh?
23:54:54Araqyou tend to know these things ...
23:55:23dom96I tend to stay away from zmq so no.
23:56:04Araqzmq is just some compiled software
23:56:06reactormonkdom96, I'm interested in a server, not comments about zmq :-P
23:56:19Araqruns on any os, dom96