<<03-01-2013>>

00:22:20*fowl_ joined #nimrod
01:42:41*nolan1 joined #nimrod
01:56:16*shevy joined #nimrod
04:45:58AlexLibman"X times faster" language leads to error. Best to say "uses X% CPU time". And even that can lead to error on multicore systems...
04:49:47AlexLibmanSpeaking of optimization... A lot of programs I'm thinking of would use a lot of data, one example being a rewrite of http://nut.sourceforge.net/ , but with more nutrition data and filtering features (ex. cheapest sources of potassium-sodium*1.5).
04:51:03AlexLibmanIt would probably be based on SQLite, and the vast majority of its processing power would be used by SQLite over a read-only database. (Data could be updated by a different program via incrimental binary patches.)
04:52:12AlexLibmanThe SQL version could be the "debug" version, but the "production" version doesn't need the overhead of SQL query parsing or the added overhead of SQLite functionality that the program doesn't use.
04:54:26AlexLibmanWe're talking futurism here, but an ideal high-productivity language that generates "lean mean" fast-as-C binaries could have the functionality of generating "lean mean" binary datafiles / index files, and the C code for accessing them most efficiently.
04:56:47AlexLibmanJust a long-term feature idea...
05:30:18*nolan1 joined #nimrod
05:52:35shevyhmm
05:52:41shevywhere is my dom96!
05:52:48shevyoh rking is here
05:52:51shevyrking, you write in nimrod?
06:10:03rkingHehe, nope. I like the idea though.
06:24:34AlexLibmanSame here.
06:48:29*silven joined #nimrod
08:00:43reactormonkAlexLibman, time is 5x lower.
11:20:25dom96hi shevy :)
11:29:51dom96Interesting: http://www.pltgames.com/
12:11:32AlexLibmanMildly interesting, but so far their competitions had little relation to what I can admire about a language.
12:12:20AlexLibmanScoring highly in performance and code briefness benchmarks is far more important.
12:13:50dom96true. Their competitions kind of end up with esoteric languages I think.
12:13:57*AlexLibman hopes someone will eventually comment on my datafile idea above, and if such productivity/performance boosting feature ideas would be considered in long-term future Nimrod development.
12:18:17dom96I wish I could answer that, but I have no idea. I'm not sure how you plan to have the language generate binary data files? You could accomplish that with macros I guess.
12:19:12dom96or do you mean the binary that is generated by Nimrod will be able to generate binary data files? well, I don't see any reason it couldn't.
13:03:19*q66 joined #nimrod
13:26:24AlexLibmanNot the language, but an accompanying tool, like sqlite2bin. The language would just replace SQL statements with efficient C code to read the binary data.
13:30:21AlexLibmanWith this feature, Nimrod programs could be faster than C+SQLite ones, and easier to develop than handcrafted code to deal with random-access binary datafiles.
13:32:26*Araq_ joined #nimrod
13:35:07Araq_AlexLibman: not much time here, but the stdlib already has an sql parser that works with a bit of luck at compile time
13:35:33Araq_and then you can indeed use macro to do these sql2whatever transformations
13:36:16Araq_however, I don't think you would gain much but that
13:36:29AlexLibmanInteresting. I'll study what exists a bit later.
13:36:50Araq_you still have all the marshalling overhead to the SQL data model
13:37:32AlexLibmanWith good old binary datafiles and specialized code to access them it's more efficient.
13:38:00AlexLibman(For simple applications that just need to read lots of data in predictable ways, no need for ACID and advanced DB features.)
13:38:08Araq_instead the stdlib should include a module to implement database-like stuff easily
13:38:23Araq_we already have nice support for memory mapped files in the stdlib
13:38:55AlexLibmanOK, I don't want to hold you up. We can talk about this later. Just an idea.
13:39:19Araq_and recently I found out how to do binary encodings efficiently ;-)
13:41:24Araq_see you later
13:42:48AlexLibmanA lot of server-side apps interact with SQL databases. If we could find a way to "compile" those into C code specialized to their SQL statements, it would be a "killer app" feature for Nimrod. It would be the faster and lighter than even C+SQLite.
13:44:39AlexLibmanSQL is designed for flexibility and does a lot of overhead. If we could optimize each data access algorithm at compile time and also generate binary data files optimized for how they're accessed, it could be significantly faster.
13:44:52*zahary joined #nimrod
13:48:48Zormost experienced people I know who work with SQL on a daily basis and on a large scale would hate something like that
13:49:07Zorthey want the SQL they write, and nothing else, because they know what they're doing (also the reason they avoid ORMs like the plague)
14:16:13Trixar_zaPersonally I think SQL is similar to dealing with any protocol (for example FTP)
14:16:34Trixar_zaNo matter how fancy the way you deal with it, underneath it's still the same
16:16:05AlexLibmanSure, many people don't like innovations that threaten their job security. :P
16:16:47AlexLibmanSQL was created for corporate bureaucracy, flexibility, and compatibility. When building an app that accesses local data, priorities are very different.
16:18:18AlexLibmanThe ideal may be to use a RDBMS to put together the data, but what I'm proposing would be ideal for app deployment.
16:19:06AlexLibmanEspecially in situations where data doesn't change during runtime. (i.e. datafiles can be updated with binary diffs)
17:04:29nolan1Can Nimrod's FFI access C++ libraries? Or, more directly, has anyone written a QT binding?
17:04:43*nolan1 ponders Nimrod on Ubuntu for Phones.
17:07:05dom96It can, yes. A QT binding hasn't been written yet though.
17:07:49nolan1Is that something C2Nim can do, or are there other tools for C++?
17:08:48dom96I don't think so no. c2nim only supports C currently.
17:09:04nolan1Thought so but wanted to check. Thanks.
17:11:02dom96nolan1: If you want some examples of how to write C++ bindings take a look at https://github.com/Araq/Nimrod/blob/master/examples/c%2B%2Biface/irrlichtex.nim or fowl_'s sfml bindings: https://github.com/fowlmouth/nimrod-sfml/blob/master/sfml.nim
17:11:25nolan1Thanks, will do.
18:09:11*gradha joined #nimrod
18:13:11gradhain this plt games compo, what does plt stand for?
18:23:11dom96That's a good question
18:25:25gradhasomebody mentioned in the past http://this-plt-life.tumblr.com, not sure if that's the same meaning but I don't know either what PLT means there
18:34:23gradhaYou know you should stop reading a wikipedia entry about a book when you read "This crucial turning point in the plot also..."
18:35:13gradhaeven the crappiest fan blogs/wikis have spoiler warnings, I guess that's too low for wikipedia
18:53:17Araqok so libffi needs mingw and some posix shell to build it on windows
18:53:51Araqbut if I add the built DLL to the git repository for convenience people will complain
18:54:07Araq"thou shalt not add a binary file to git"
18:54:23Araqso any good solutions to this problem?
18:54:55gradhayou could try adding a submodule and put the binary in the submodule, they don't get downloaded by default
18:55:13Araqsubmodules are crap, I'll never use them again
18:55:43AraqI think I'll do what I always do and ignore the git nazis ...
19:00:55gradhathose git nazis, they have gh-pages branches on their repos?
19:02:34Araqwhat are gh-pages branches?
19:03:02gradhagithub offers a pages mechanism were you build a website for your repo through a gh-pages branch
19:03:18gradhaso you put there all your binaries... but it's actually the same repo as your sourcecode
19:03:49gradhahttp://pages.github.com
19:10:08Araqwell I suppose the github guys don't know how to operate git
19:10:31Araqgit doesn't like binary files
19:11:09Araqthere is some special logic in git detecting binary from text files and then git turns into a "dislike" mood
19:11:55gradhadoes it grumble on the commit or something like that?
19:11:59Araqgit disagrees with unix on this point, on unix there is no difference between a text file and a binary file
19:12:08Araq*for unix
19:13:44Araqand then there are even crazier people who say it's all a stream of bytes anyway
19:14:20Araqand that "binary" is all you can get on a computer
19:16:06gradhathat's like a posix filesystem, the names of the files are 255 bytes. Yeah, but what encoding? What, encoding? what do you mean? It's all bytes!
19:16:26gradhaI still remember going from latin1 to utf8
19:16:59gradhait felt so exciting back then, now it looks so silly
19:20:27shevyhey Araq
19:20:31shevyhad a look at https://github.com/munificent/vigil yet?
19:20:41shevy"Vigil is very similar to Python"
19:20:48shevy"Vigil is truly vigilant about not allowing code that fails to pass programmatic specifications"
19:20:51shevyvery odd :D
19:21:21shevyI argued in #ruby about testing code. i.e. if you add a big test suite, you lose a lot of the advantages of dynamic languages - i.e. speed of coding
19:21:58gradhashevy: that only happens if you are the guy writing the test suite
19:22:05Araqwhat do you mean shevy? that test suites need to maintained too? o.O
19:22:17Araqthat tests have to change and adapt?
19:22:46shevyAraq mostly that it costs time to add (or come close to) a 100% test suite
19:23:02Araqblasphemy
19:23:05shevywhen I started with ruby in 2004, testing was not so much emphasized
19:23:50shevygradha yeah, but now... if I have to add tests for all my projects since 2004... that will take me many, many hours :(
19:25:17Araqthat's why you shouldn't do it ;-)
19:26:29Araqnobody seriously argues for dynamic typing and correctness at the same time
19:26:44gradhaAraq: can't google anything about git disliking binaries, found some "git is good storing binaries", plus the only alternatives suggested are git-submodule or http://git-annex.branchable.com
19:27:12gradhamaybe I woke up in the wrong universe
19:28:11Araqgradha: you care way too much about facts, git nazis don't
19:29:13gradhais the dll required before koch is ready or would it be possible to teach koch to download the dll on windows?
19:31:17gradhaI can share some dropbox space if you are interested, though I've heard dropbox disables accounts temporarily based on bandwidth, and seeing how nimrod is the rage this days...
19:31:20Araqthe later
19:49:31Araqactually I'd concat libffi into one big .c file and {.compile.} that
19:49:46Araqso no DLL building would be necessary
19:50:04Araqbut I think libFFI uses GNU's absurd inline assembler syntax
19:50:14Araqso it really only works with mingw ...
20:34:30reactormonkAraq, how come idetools doesn't prove the docstring?
20:34:51Araqyou mean "provide"?
20:35:05reactormonknot returned by the suggestions
20:37:26Araqwell I was lazy and the docstring can have newlines
20:41:37reactormonk\n
20:44:30reactormonkand methods are skMethod ?
20:44:45Araqyes
20:45:01reactormonkand enums skEnum?
20:45:16reactormonkor - just got a list of those for me?
20:49:38Araqsk + Keyword is it
20:51:21reactormonkI'm pretty sure I forget to mention at least two if I don't have a list :-/
20:52:34Araqwhy is it important?
20:54:17reactormonklooks better.
20:54:26Araqhere you go: skParam, # a parameter
20:54:27Araq skGenericParam,
20:54:29Araq skModule, # module identifier
20:54:30Araq skType, # a type
20:54:32Araq skVar, # a variable
20:54:33Araq skLet, # a 'let' symbol
20:54:35Araq skConst, # a constant
20:54:36Araq skResult, # special 'result' variable
20:54:38Araq skProc, # a proc
20:54:39Araq skMethod, # a method
20:54:41Araq skIterator, # an iterator
20:54:42Araq skConverter, # a type converter
20:54:44Araq skMacro, # a macro
20:54:46Araq skTemplate,
20:54:47Araq skField, # a field in a record or object
20:54:49Araq skEnumField, # an identifier in an enum
20:54:50Araq skForVar, # a for loop variable
20:54:52Araq skLabel, # a label (for block statement)
21:03:41reactormonkThanks.
21:13:52*XAMPP joined #nimrod
21:14:41gradhawhat was the switch to tell nimrod the C compiler dump error messages?
21:15:21gradhai get only "Error: execution of an external program failed"
21:15:38gradhathere was a switch to know what is being invoked "below" nimrod
21:15:45gradhaor get its output
21:15:58reactormonkfor a) there's --listCmd
21:17:47Araqit's --parallelBuild:1
21:17:54gradhayes, that one
21:18:02Araqand somebody need to come up with a solution
21:19:20gradhayuck, use of undeclared identifier 'result_130643', let's see if I can make a test case
21:22:44Araqthat looks like a codegen bug :-(
21:26:36gradhaok, there you have it http://pastebin.com/zHL6M99B
21:27:01gradhaI also have problems trying to compile "echo repr(test.keys())"
21:27:34reactormonkgradha, you know there's a proc somewhere to do exactly that?
21:30:29gradhaI believe I pulled a request to make toSeq public... where did it go?
21:31:25AraqI think you never pulled such a thing
21:31:45gradhaindeed https://github.com/Araq/Nimrod/pull/296
21:32:38gradhawell, that's the least of my worries
21:32:57gradhaI don't understand why the repr can't accept an interator, is that a bug or something not possible with repr?
21:33:27Araqhave to take a look, it's a bug if the compiler does not complain
21:33:42Araqbtw that's the 'result' bug
21:33:50Araqyou have to change that template
21:34:15Araqget rid of the 'block' and use: var result {.gensym.}: ... instead
21:34:57gradhayes, that works
21:35:57gradhado I rewrite the pull with that?
21:36:40Araqyes please
21:40:08gradhadone
21:48:18AlexLibmangradha: Reamde by Neal Stephenson?
21:50:09gradhayes, got a reference from somewhere
21:52:12gradhasounds like the book I will force my sister to read so she can tell me if it's any good
21:53:30nolan1How closely is the TTypename convention followed? And why is it a convention to begin with? Seems like a bit of unnecessary ceremony.
21:54:15reactormonknolan1, my point exactly ;-) I suppose the 'normalize identifiers' doesn't really help.
21:55:00Araqhey, I copied it from Delphi and couldn't imagine people would mind it
21:55:05gradhaI follow the convention closely for code I want included in Nimrod
21:55:21Araqposix is full of type_t ...
21:55:26nolan1Ah, OK, so no weird compiler issues or something if I ignore it...
21:55:41nolan1I don't see it in any of the languages I use.
21:55:59Araqyou'll get problems if you name your variables/parameters the same as the type and love metaprogramming
21:56:21nolan1Also, what are the benefits of the result var vs. just returning the result of the last expression in a proc/method?
21:56:39Araqapart from that, I ensured that 'x: x' works reasonably well ...
21:56:56nolan1Oh right, the case insensitivity.
21:57:29Araqnolan1: advantage is that Nimrod guarantees you the "named return value optimization"
21:57:49nolan1Not familiar with that one.
21:59:28AlexLibmanLOL@ vigil's "swear" and "implore"... Reminds me of a gag USB device that delivers increasing levels of electric shock to the user in case of input error.
22:00:08Araqnolan1: the T is in fact there to denote "value semantics" as opposed to a P
22:01:26Araqthere are edge cases like any kind of handle where it doesn't work well, TSocket, TFile etc. ... but then maybe they should have been P
22:01:55nolan1Need to refresh my memory of how values vs. pointers work. Seems though that the value would be the default case, so could just be Object, and the pointer would be non-standard and thus PObject.
22:03:06nolan1Like, if I have an orange, then it's just an orange. It isn't an orange not in a container. But if I have an orange in a box, then it is a boxed orange.
22:03:41nolan1But we don't qualify every object in the real world by stating "an uncontained ball, an uncontained cat," etc.
22:04:06nolan1Unless it's my cat, in which case the qualifier is a warning...
22:05:30reactormonkAraq, or we could just use functional and don't care about value vs. pointer anymore *duck*
22:06:45nolan1Anyhow, not a huge deal, and I probably won't use the conventions in my own code, they just struck me as a bit odd.
22:07:32Araqwhen I code and have efficiency in mind, my coding style for T is vastly different than for P
22:07:40nolan1Also, it seems like the type system is in place to catch cases where a pointer is used instead of a value...
22:07:57nolan1OK.
22:07:59Araqthough granted, maybe the constant reminder is unnecessary
22:08:32Araqbut then many people come from Java/C# and make P the default for everything
22:09:04Araqit often leads to simpler code and more familiar semantics
22:09:25Araqso I can't tell whether T or P is the default ...
22:09:54nolan1Making P the default, or P/T? I'm from Scala and don't feel P/T is a familiar semantic.
22:10:27*nolan1 will look over that section of the tutorial again with this discussion in mind.
22:11:59Araqscala only has P for that matter
22:12:44nolan1Right, but even in C I only have to qualify pointers, not their base types.
22:12:54nolan1Or rather, add extra qualification to pointers...
22:13:09Araqand yet _t is very common in C :P
22:15:10reactormonknolan1, I'm trying to adapt ensime for nimrod :-)
22:17:24nolan1Cool.
22:17:52reactormonknolan1, so I assume you're using emacs?
22:18:17nolan1reactormonk: No, I still think it's a cool idea though. More choice is often a good thing.
22:18:31reactormonknolan1, then go with aporia
22:18:47nolan1I'll look into it, I typically just use Gedit.
22:21:12reactormonknolan1, no idea what gedit can do.
22:21:49Araqyou will love aporia then :-)
22:25:57AlexLibmanNot many copyfree code editors out there, mainly because GTK/Qt/wx aren't (and GPL's psychological reach is much farther that its actual legal restriction).
22:27:38gradhawhat's the mit/bsd choice for GUI?
22:28:39nolan1Also, how difficult is it to run the Nimrod interpreter in my code? Nimrod as a DSL looks promising, and it'd be neat if my apps could pull in a subset of Nimrod to evaluate at runtime.
22:29:25nolan1It looks like the REPL tool might create a separate Nimrod process?
22:31:57AlexLibmanWe don't really have a good copyfree widget toolkit. There's Tcl's Tk, Lua-bound IUP, the U++ weirdness, and little else.
22:33:22Araqnolan1: I'm working on exactly this feature :-)
22:33:29nolan1Awesome.
22:33:46Araqthere will be a Nimrod interpreter in the stdlib
22:34:01AlexLibmanWidgets are a bad idea anyway. There's the term console / textual interfaces, and the new alternative of HTML5+. http://bsd.slashdot.org/comments.pl?sid=3348643&cid=42431429
22:35:28nolan1Nice.
22:36:05AlexLibmanI've discovered that you can simulate spartan textual interfaces quite well in HTML5. Take away the graphics and the silly visual effects and focus on text, and in-browser interfaces become much less annoying. You can make them very keyboard-focused as well.
22:36:29AraqAlexLibman: html has a limited set of widgets and when you need a new one you're basically screwed
22:36:38Araqand need to use lots of JS
22:36:42AlexLibmanI never use widgets. Only text.
22:37:01Araqwhat about a table with sorting features?
22:37:20gradhawhats your opinion on schizofrenic licenses like http://www.freetype.org/license.html ? neither one nor the other?
22:37:36AlexLibmanLinks instead of buttons. Formatting effects for radio / checkbox buttons. Etc.
22:37:51AlexLibmanTables for data are OK.
22:38:53AlexLibmanMy "ANSI terminal nostalgia" approach to HTML5 really changed how I feel about in-browser apps.
22:39:37nolan1I'd like to see someone adapt a MUD codebase to HTML
22:40:03nolan1Accept input from the browser, output results into the page, no more need for telnet or clients.
22:40:27nolan1Slowly progressively enhance the interface. Might breathe a bit of new life into MUDs.
22:40:28AlexLibmangradha: it complicates things and confuses people. When a copyfree and a non-copyfree licenses are in an OR relationship over the entirety of the code, then it's really the same thing as it being copyfree. It's like someone putting you in prison but leaving the door unlocked.
22:41:24AlexLibmanMUDs are more scrolling-console oriented. My HTML5 apps tend to resemble DOS apps that have a menu on top.
22:42:03AlexLibmanLike Turbo Pascal, Norton Commander / FAR, etc.
22:43:01AlexLibmangradha: the problem with mentioning two licenses is you have to investigate what their relationship and code coverage is. Take WebKit or Transmission for example: some parts are under one license, other parts are under a different license...
22:43:59*AlexLibman wonders if a source code file could switch licenses in the middle of the file...
22:44:34gradhanimrod's eval could switch at runtime then
22:47:29AlexLibmanLicenses take all the joy out of being a FLOSS programmer.
22:49:22AraqAlexLibman: it's not that bad if you don't spend your life philosophizing about licenses ;-)
22:50:01AlexLibmanWhen someone uses a license like BSD (the new one obviously) / MIT / ISC / CC0, that's as simple as it gets. (Because some crazy places don't recognize "public domain".) When you have something like http://www.freetype.org/license.html , it's just a pain in the butt for everybody.
22:50:20gradhaI thought support/maintenance takes all the joy out of being any programmer
22:51:26AlexLibmanAraq: it's a means to an end. I want to come up with a software stack that doesn't "hail marx" behind my back. Then I won't have to worry about licenses and just be a developer again.
23:20:22reactormonkAlexLibman, wait, I'll make a pull request so the compiler prints 'hail marx' upon successful compilation :>
23:22:11AlexLibmanUnder Marxism, all compilation would be planned in advance by the proletariat.
23:22:57AlexLibmanCompilers would only run on a central mainframe in Moscow, to prevent Enemies Of The Revolution from using them.
23:23:16reactormonkAlexLibman, planning ahead? Even capitalism, which has somewhat of a better motivation, can't get people to plan ahead.
23:23:45AlexLibmanYes, but Marxism is magic. It'll work this time for sure! :P
23:24:23Araqmarxism really does work, it's just that all the people who tried it did it wrongly :P
23:24:25AlexLibmanIt didn't work the last 1000 times it was tried, in many variations, because the Central Planners didn't have Nimrod.
23:24:52Araqmarxism reminds of C programming ...
23:25:09AlexLibmanSo they couldn't write elegant and efficient programs to calculate how much caviar to import into your local district...
23:25:35Araqit would work if only people would constantly think about the 260 different cases of undefined behaviour
23:26:46AlexLibmanMarxism is a C program where (void*) point at each-other in an endless blame-game.
23:27:44Araqmaybe the guy was right who compared OOP to communism ...
23:31:25reactormonkAraq, works fine in theory?
23:32:14Araq"Communism also looked good in theory, but its base assumptions about human nature and change patterns missed their mark."
23:32:32AlexLibmanCan we name Nimrod's GC after Mario TerĂ¡n, the dope who shot Che Guevara? :P
23:33:22Araqno because nobody knows "Mario Teran" and the name doesn't sound cool either
23:33:28AlexLibmanRead 19th century Austrian economists -- http://en.wikipedia.org/wiki/Austrian_School -- communism never looked good in theory either.
23:33:51Araqyeah after I read it again, I don't like the quote
23:33:56AlexLibmanTeran is a great name for a garbage collector.
23:34:22Araqwhy?
23:34:52AlexLibmanSounds brutal - to the garbage of course. Free the mallocs!
23:36:10reactormonk\o/ http://ompldr.org/vZ3huOQ
23:37:04dom96Damn, that looks nicer than Aporia's. Nice job :P
23:37:13reactormonkdom96, the auto-complete part was auto-complete.el
23:37:21reactormonkI only provided the information
23:37:40dom96ahh, well still.
23:37:44dom96Good work.
23:38:30reactormonk http://sprunge.us/cXBB <- not sure about this. This is the one-char stuff at the right, according to http://cx4a.org/software/auto-complete/manual.html#symbol
23:39:23AlexLibmanBlehmacs.
23:39:25reactormonkdom96, even completion with prefixes works \o/
23:39:29reactormonk... but it's buggy.
23:39:48dom96with prefixes? what do you mean?
23:42:25reactormonkhttp://ompldr.org/vZ3huZQ
23:44:02reactormonkdom96, a rather wierd two-screen setup, see right one.
23:46:23dom96reactormonk: Does the compiler give you those suggestions?
23:46:44reactormonkdom96, yes
23:47:23reactormonkactually... nope.
23:47:32reactormonkit uses the old ones at that point I think
23:48:00reactormonkI think I have a timing problem here
23:49:16dom96I see.
23:51:02reactormonkshouldn't be that hard of a problem to fix this
23:51:50reactormonkthen I can do fancy stuff like adding a for around if you complete an iterator ^^
23:54:51reactormonkdom96, still not sure how to handle overloads
23:55:49dom96I haven't solved that for Aporia either, in fact I haven't even thought about it.
23:56:25reactormonkdom96, I might be using yasnippet for that, so there's a snippet for each function with () and shit
23:57:45dom96Let me know how it goes.
23:57:49dom96I must go to sleep now.
23:57:51dom96Good night
23:57:56reactormonkcya