<< 15-02-2014 >>

00:00:14vbttEXetoC:indentation sensitivity is far more acceptable today than case/underscore insensitivity.
00:00:45vbttPython got a lot of hate initially but after using it people realized it's actually quite desirable.
00:01:06EXetoCvbtt: sure
00:01:20sale4onepeople are afraid of new things :)
00:01:44vbttor things that look like old things (cobol) they didn't like
00:01:55Matthias247vbtt: I love the multiple ways to call functions ;)
00:03:23sale4onethats beacuse they realised that new is good and everything else has become obsolete
00:03:37vbttMatthias247:good for you :)
00:03:42Matthias247still undecided about whitespace and case insensitivity. Must try it more for myself
00:04:02vbttis there any real word program written in rust today, btw? (except the compiler)
00:04:10vbtti know go has quite a few.
00:04:19sale4onenice
00:04:23vbtta really good sign is nimrod has so many non trivial ones.
00:04:25EXetoCI know there are a couple of official project
00:04:25sale4onewhat about gui apps in go :D
00:04:30EXetoCs
00:04:39EXetoCservo for example
00:04:51Matthias247they are doing a browser in rust. That's the official project
00:04:59Matthias247besides the compiler
00:05:11*zahary quit (Quit: Leaving.)
00:05:12vbttMatthias247:indentation based blocks work very well.
00:05:59vbttMatthias247:it's very rare anyone using python complains about it. otoh, many people praise it.
00:06:02Matthias247it looks nice for sure. Only a little worried about accidental errors. E.g. due to misbehaving editors. Will see how it works
00:06:23vbttMatthias247: why is it any worse than using {}?
00:06:37vbttor if you have a misbehaving editor, you have bigger problems :)
00:07:31vbttat least you'll get a syntax error for non aligned code - you'll have to perfectly align it to another level in some situations to make it valid code. and it'll be easy to spot.
00:07:36Matthias247now an addiontal whitespace is more easily inserted and a single unclosed { can easily be detected
00:08:27Matthias247that's what I thought. And accidently inserted tabs should also be discovered by the compiler I think
00:08:53renesacmost of the time, yes
00:08:55vbttMatthias247: if the code can be parsed, the compiler wouldn't know it was an accident.
00:09:04vbttmost of the time the code wouldn't make sense.
00:09:26EXetoCyou could disallow mixing. seems reasonable
00:09:28renesacand it is more easy to see wrong identation than a if block with two statments but no {}, for example
00:09:41vbttanyway, i'll let you make your mind on it.
00:09:50Matthias247it says tabulators not allowed :)
00:09:50Araqactually python is worse than nimrod 'cause it allows for tabs
00:09:57vbttright
00:10:01EXetoCoh
00:10:12vbttpython realized the mistake too late.
00:10:16renesacAraq, in python 3 mixing tabs and spaces is a instant error
00:10:20renesacyeah
00:10:27Araqrenesac: really? cool
00:10:53vbttyes they mostly fixed the tabs-spaces issues. ideally they would just disallow tabs but some ppl want them i guess.
00:10:54sale4onecould they just add something to convert them ?
00:11:10sale4oneit should be simple enough
00:11:14vbttsale4one:of course, there are scripts.
00:11:17Varriount|MobileAnd if you absolutely want tabs, you can always use a source code filter
00:11:27*carum joined #nimrod
00:11:32Matthias247sale4one: the question is into how many spaces to convert them :)
00:11:33sale4oneso really thats not even a problem
00:11:49Matthias247and that depends on the editor settings of the person who has written the code
00:11:54vbttMatthias247:that's the issue with mixing tabs and spaces
00:12:02EXetoCyou could apply some heuristics
00:12:07vbttwhich is a flaw in python 2.x but not nimrod
00:12:42vbttin python, the meaning is fixed - 1 tab = 8 spaces i think (or 4)
00:12:51sale4oneI think just tabs should be used, that way anyone can set the things how they want
00:13:05sale4one4
00:13:09vbttsale4one:the problem is aligning continuation lines.
00:13:32vbttyou want to align them to something in the above line.
00:13:43vbttso you're forced to write some spaces there.
00:14:12vbttand then they wont line up for someone with a different editor.
00:14:22vbttanyway, g2g.
00:14:29*vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
00:15:02EXetoCI'm not a fan of vertical alignment
00:15:17sale4onethere needs to be some order
00:15:32sale4oneas I said, Go is the best one when it comes to that
00:16:03Matthias247the best for what?
00:16:38sale4onecoding standards, indetations and all that
00:17:02sale4oneyou can write code as you like
00:17:10sale4onebut still you deliver it uniform
00:17:22Matthias247hmm, there are good coding standards for most languages. And if you have a good IDE it can even auto-enforce it
00:17:49sale4onebut go comes with a formater which you must use
00:18:04Matthias247visual studio let's you only write C# code in the way Microsoft likes :-)
00:18:52sale4oneThat's why I like Go, you have just one standard, not the internal standards of every company/organisation
00:19:39sale4oneI would really like to see everyone use PEAR standards with php, but still every major framework use its own
00:21:04dom96Does Go refuse to compile your code unless you use the formatter?
00:21:14Araqdom96: no
00:21:22sale4onebut it reformats it
00:21:26dom96Well then you don't have to use the formatter.
00:21:54Araqdom96: that's right but when you don't the Go-Nazis come over and punch you in the face
00:22:02*darkf joined #nimrod
00:22:14dom96hah
00:22:15Matthias247I still have no clue for what to use Go - so I'm ok with it :)
00:22:43dom96Is their hobby going through Go github projects and forcing people to use the formatter?
00:22:50sale4onecompiler shows warnings on things like misspositioned { . .. .
00:22:54Araqwhy this is not seen as the fascism that it is, is beyond me
00:23:40Varriount|MobileWait, do they really go through GitHub projects?
00:23:41sale4oneits not, as I said you still write code as you like, its just its being formated later
00:23:52EXetoC[closed] gofmt, biatch!
00:24:21Araqsale4one: that's like saying "you can still say everything as long as nobody can hear you"
00:24:47Araqin other words, fascism :P
00:25:24renesachttp://www.secnetix.de/~olli/Python/block_indentation.hawk <-- this is a good myth busting about python identation
00:25:27EXetoCbut then, can you prove that you did indeed say something?
00:25:43renesacsomeone should link in that embebed forum talk about nimrod
00:25:44sale4onelook at the standards as laws, you have them in democratic countries :D
00:25:56Araqand it's only tolerated when it comes to "coding standards" really
00:26:00dom96I don't get to vote on them though :P
00:26:26Araqjust imagine people telling you how you should put things on your desk
00:26:35dom96The funny thing is that if we were to force a specific style people would go apeshit.
00:26:46Araqor telling you you should wear the company's uniforms
00:26:50dom96And yet everyone wants a common style.
00:27:21renesacof course, everyone must use my prefered style
00:27:36Araq"no, do not put the pencil here! it has to be *above* the paper! Dude!"
00:28:24renesacI don't like nimrod standard of two spaces identation (I prefer 4), but I try to follow it
00:29:08Matthias247Araq: but your pencil is only used by you. But your code is probably read by hundrets of other guys
00:29:24renesacand aporia should really have visible lines for each indentation
00:29:33sale4onethis will go to the infinity :D we all have out opinions :) but of the topic , thanks for welcoming me here :) I will be back for sure and now I need to sleep :D bye and thanks again
00:29:48Araqsale4one: good night
00:29:51renesacit helps a lot in deep nested code (not that such code should be encouraged, but sometimes is needed)
00:29:52*sale4one quit (Read error: Connection reset by peer)
00:30:16Matthias247I think it's good to have a consistent code style inside libraries. But what it exactly looks like is not that important
00:30:37AraqMatthias247: that's a common falicy imho
00:31:11Araq*fallacy
00:31:37Matthias247just had to look up that word :)
00:32:01Araqwhen you have 70K lines of code, that amounts to a book of perhaps 2000 pages
00:32:21Araqnobody reads it
00:32:37Araqyou can skim though and get the larger picture of it
00:33:10Araqcode isn't nearly as often read as people think it is
00:34:44Araqand when you really *read* it, you have to read slowly and carefully because it's *code*
00:35:30renesaca consistent style and naming helps to read faster to get a larger picture of it
00:35:46Araqrenesac: only to some extend
00:35:46Matthias247yes. But in this cases it will be still easier to understand if it's somewhat consistent
00:35:51renesacand at least regarding naming, nimrod compiler/std lib cares
00:35:58renesacand sytle too, of course
00:36:09renesacas it is easier
00:36:29Araqin reality you don't even notice small violations of some "standard"
00:36:45Araqthe human brain is very weak at this
00:37:20Matthias247but probably it's even more problematic when different programming paradigmas and libraries clash together in large projects
00:37:46dom96Araq: I disagree.
00:38:06dom96Araq: You surely heard of grammar nazis.
00:38:20Araqdom96: well?
00:38:53dom96It's very easy for the human brain to notice mistakes in people's grammar.
00:39:20dom96i.e. violations of the English language, which is a standard.
00:41:01Araqdom96: I disagree. How can you explain the fact then that grammar constantly evolves?
00:41:33*vbtt joined #nimrod
00:41:53vbtti rejoined to chime in :)
00:42:12dom96Araq: Because people are too ignorant to stick to some "standard" or too lazy or both.
00:43:09vbttgrammar evolves but slowly. and people generally stick to an accepted convention even with various options.
00:43:36dom96The reason grammar constantly evolves though is because people are not perfect, they make mistakes in their speech.
00:43:39Araqvbtt: if that would be true only K&R style would exist for C
00:43:52Araqbut there are lots of different styles for C
00:44:49Araqand if that would be true, we wouldn't need coding standards at all, instead we *force* people to adhere to them, one way or the other
00:45:06vbttyeah people prefer different styles. the real question is is it desirable to have everyone use the same style.
00:45:16vbttgo forces ppl, pretty much.
00:45:28Araqyou need to *enforce* the consistency or else you don't get consistency
00:45:50vbtti think what you're saying is it is not particularly useful to have a consistent style across different libraries or code bases (or even different parts of a file, perhaps?)
00:46:47Araqyes, consistency is incredibly overrated
00:47:24vbtti'm not as strong as the go guys on this but I do think having the same style across various projects is desirable. and having one style within one project is extremely desirable.
00:47:30Araqand in the real world, it doesn't exist, you have to learn to live without it
00:48:07Araqvbtt: projects in the real world often use different libraries which use different conventions, or they use multiple programming languages
00:48:24vbttyes of course.
00:48:40Araqor you have things like "I want to break the rule for this identifier name because it's mapped to this CSV entry"
00:48:42vbttpeople *learn to live with it* implies that ideally you wouldn't have to 'live with it'
00:49:30vbttso total consistency is impossible - thats true. but is maximizing it desirable?
00:49:54Araqwell some flexibility in reading means I don't have to force my fellow to give up his preferred placement of {}
00:50:00vbttAraq: If I wrote a very useful nimrod stdlib library but used snake_case - would you accept it as is?
00:50:25AraqI personally would
00:50:31vbttok
00:50:49AraqI wouldn't because others wouldn't like it
00:51:17Araqvbtt: flip this question
00:51:41Araqif you have some very useful code, do you refuse to use it because it's not written in your preferred style?
00:51:50vbttvery good question
00:52:00vbttof course not - i will use it.
00:52:11vbttand actually i may not complain much about it either, but other people will.
00:53:08Araqimho the tool should provide the consistency, tools are much better at it
00:53:17vbttyou mean like gofmt?
00:53:22Araqbut this means the tool *renders* it the way I like
00:53:29vbttoh you mean the editors.
00:53:37Araqnot that I have to write/transform it to the common style
00:53:38vbttsame code - different views.
00:54:23vbttperhaps someone should write a fuse filesystem for editing nimrod that can transform the style.
00:54:29vbttthat way every editor will work :)
00:54:40Araqnice idea
00:55:26vbttwhile i'm not a style nazi, I'm not as strong an outlier as Araq.
00:56:19vbttprogrammer specific style is perfectly valid point of view. it's just not the mainstream one.
00:56:40vbttand so many people like go fmt because it lets them avoid style discussions.
00:58:02vbtthmm, i think fuse filesystem will express nimrods philosophy very well.
00:58:10vbttbut then people need to check stuff into github :/
00:58:19vbttwhich style will it use?
00:58:35vbttsadly, the problem is not easily fixed.
00:58:52Araqvbtt: yes and the problem got worse
00:59:10Araqapparently now people really read the code via github
00:59:19Araqthat means in their browsers with no tool support
00:59:31vbttwell you could add tooling to the browser.
00:59:41vbttbrowser plugin, git plugin, etc.
01:00:00Araqyeah but it's lots of work and so Go's worse is better approach really works better
01:00:05vbttthe phrase that comes to mind is..
01:00:08vbttlipstick on a pig.
01:00:39vbttgo is designed to fit in with the current mess.
01:00:57Araqa bit
01:01:29vbttI mean - you can even include a github path directly in your source file. very convinient but bad idea imo.
01:01:39Araqgo has its own unique problems imho when it comes to that
01:03:18vbttyeah
01:03:23vbttanyway, i g2g
01:04:47vbttone last tidbit - the python stdlib was quite inconsistent because they accepted many useful libraries in different styles. however in 3.0 they've tried to make everything consistent.
01:05:02vbttmake whatever you want of that.
01:05:09vbttbye guys
01:05:20Araqit's irrelevant because python distinguishes between these styles
01:05:21*vbtt quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
01:05:49Araqmake python itself style agnostic and it doesn't matter
01:09:18dom96hrm, I may have to implement 'await' in the macro too
01:09:24dom96I need to know whether the user wrote:
01:09:29dom96await proc
01:09:31dom96or
01:09:35dom96var x = await proc
01:09:46dom96argh
01:10:08*carum quit (Remote host closed the connection)
01:10:13Araqthat looks easy enough to distinguish
01:10:29dom96Would have to detect whether it's a proc or var also
01:10:38dom96I can look for nnkCall I guess
01:10:48dom96But yeah, definitely need to do it in the macro
01:10:52dom96no way to do it with a template
01:11:29Araqsysio.nim(171) writeln
01:11:30Araqsystem.nim(1855) raiseEIO
01:11:32AraqError: unhandled exception: cannot write string to file [EIO]
01:11:35Araqwtf?
01:11:47Araqhow can writing to stdout fail like this?
01:12:02dom96if stdout is redirected to a file perhaps
01:14:58*Matthias247 quit (Quit: Matthias247)
01:21:48*Varriount|Mobile quit (Quit: AndroIRC - Android IRC Client ( http://www.androirc.com ))
01:24:52dom96Araq: Do we want the name 'await' btw?
01:25:29Araqyes
01:28:16NimBotAraq/Nimrod devel 07d2622 Araq [+0 ±1 -0]: actors.nim compiles again
01:28:16NimBotAraq/Nimrod devel 707ece8 Araq [+0 ±3 -0]: made 'koch web' work when current dir has a space in it
01:43:26VarriountAraq: Would you accept an additional feature to testament, a command line option specifying what the path/command needed to invoke the nimrod compiler?
01:44:23AraqVarriount: sure and that should even be easy to implement, the default command is some constant
01:44:47VarriountCurrently koch tests uses the nimrod compiler found in the path, which is problematic for me, since I have 3 different nimrod installations on my system
01:45:05Varriount(32 and 64 bit nimbuild, and my own personal build)
01:46:23AraqVarriount: I already said "yes" :P
01:47:14VarriountSorry, force of habit I've picked up from years of persuasive essay writing
01:52:06Araqdom96: a very encouraging article: http://calculist.org/blog/2011/12/14/why-coroutines-wont-work-on-the-web/
01:52:28Araqaccording to this guy, we do it exactly right
01:53:51dom96I still haven't read enough about coroutines to decide whether we need them, but as far as asyncio is concerned they don't seem to be necessary
02:04:01Araqgood night
02:06:02dom96same here
02:06:04dom96bye
02:16:26*nande left #nimrod (#nimrod)
02:28:18*nande joined #nimrod
02:40:53*carum joined #nimrod
03:00:48*dmac joined #nimrod
03:01:36*Demos joined #nimrod
03:01:52Demosdid we get the GSoC application in?
03:20:31*dyu joined #nimrod
03:25:30*nande left #nimrod (#nimrod)
03:29:53VarriountDemos: Yep
03:30:10VarriountDemos: Now all we can do is hope. And code, of course
03:31:10VarriountAraq: If nimrod isn't to get proper coroutines, then iterators will have to make up for that lack (and must become more flexible)
03:54:05*brson quit (Quit: leaving)
03:55:17*athaudia1 quit (Ping timeout: 248 seconds)
04:02:18VarriountDemos: How has the VS integration been going?
04:05:37*athaudia1 joined #nimrod
04:06:43*zahary joined #nimrod
04:08:20VarriountHi zahary
04:08:25VarriountHi athaudia1
04:09:19Demosgood, idetools problems. codfe is on meh github
04:11:06*zahary quit (Ping timeout: 245 seconds)
04:13:39*DAddYE joined #nimrod
04:18:05Demosbasicly I have building, projects, file addition and folder addition (and deletion) working. As well as syntax highlighting
04:18:15Demoscompletions do not work
04:18:40DemosI have not disabled tabulators, and debugging does not work
04:19:01DemosI also want additional syntax coloring based on idetools information
04:19:16Demosand I would /love/ not to have to save dirty buffers to use idetools
04:19:28Demosalthough atm having to spawn a new process for every request is the killer
04:19:34*ddl_smurf quit (Quit: ddl_smurf)
04:20:03DemosI also hacked together a tool that will generate a .nimproj from a nimrod project, it really just recurses through all the children folders and adds .nim files there
04:20:18Demosand makes a build rule for the file you point it at
04:20:58Demosso pretty well, Varriount. If we get into GSoC I will probably end up applying to do the CAAS and tooling project
05:25:49*brson joined #nimrod
05:25:49*brson quit (Client Quit)
05:31:06*brson joined #nimrod
05:40:14*BitPuffin quit (Ping timeout: 252 seconds)
06:11:07*carum quit ()
06:45:42*DAddYE quit (Remote host closed the connection)
06:46:40*skrylar joined #nimrod
06:56:33skrylarout of curiosity has threaded nimrtl support been improved since the 0.9.2 release
06:56:46skrylarlast i read it wasn't tested very much
07:00:46*DAddYE joined #nimrod
07:07:01*dyu quit (Quit: Leaving)
07:28:19VarriountHm. What should I work on now...
07:33:34*Varriount quit (Read error: Connection reset by peer)
07:41:10*aftersha_ joined #nimrod
08:36:47*dmac quit (Ping timeout: 246 seconds)
08:47:46*aftersha_ quit (Quit: Computer has gone to sleep.)
08:52:00*Demos quit (Read error: Connection reset by peer)
09:07:33*DAddYE quit (Remote host closed the connection)
09:38:59*aftersha_ joined #nimrod
09:40:03*awestroke joined #nimrod
10:00:16*zahary joined #nimrod
10:01:55*brson quit (Ping timeout: 260 seconds)
10:11:15*Matthias247 joined #nimrod
10:24:04*aftersha_ quit (Quit: Computer has gone to sleep.)
10:32:19*aftersha_ joined #nimrod
10:35:54*athaudia1 is now known as athaudia
10:44:37*sale4one joined #nimrod
10:45:29sale4onehi all :)
10:49:16*aftersha_ quit (Quit: Computer has gone to sleep.)
10:58:15*sale4one quit (Read error: Connection reset by peer)
11:00:11*awestroke quit (Remote host closed the connection)
11:06:45*aftersha_ joined #nimrod
11:10:56dom96hi
11:13:45*skyfex quit (Ping timeout: 253 seconds)
11:17:16*aftersha_ quit (Quit: Textual IRC Client: www.textualapp.com)
11:17:42*aftersha_ joined #nimrod
11:30:45*skyfex joined #nimrod
11:41:48Araqskrylar: afaict nobody uses nimrtl so no, it hasn't been improved
11:44:08*io2 joined #nimrod
11:46:24dom96Araq: Hey, figured out the cause of that bug I found last night
11:46:28dom96and found another one already heh
11:57:38dom96Araq: Also genSym is seriously broken. Please fix it.
11:59:30*aftersha_ quit (Quit: Computer has gone to sleep.)
12:11:19Araqdom96: I noticed
12:13:03*skyfex quit (Quit: Computer has gone to sleep.)
12:13:08*[1]Endy joined #nimrod
12:13:40*skyfex joined #nimrod
12:13:53Araqping skyfex
12:14:00skyfexpong
12:14:11Araqare you up to fixing some compiler bugs now?
12:15:02skyfexHeh, maybe.. I've mostly been staring at the semantic checking surrounding instantiations of generics
12:16:35skyfexremember from the forums, I was interested in using values in generics
12:17:10*aftersha_ joined #nimrod
12:18:10skyfexbut I think I'm starting to understand the compiler a bit
12:22:33Araqare you familiar with the tester?
12:25:40skyfexnot yet.. I saw some "suite" things at the bottom of some module, is that related?
12:25:55Araqnot really
12:26:08Araqwell I'd like you to fix bug concerning exception handling
12:26:28Araqnimrod c tests/testament/tester
12:26:46Araqtests/testament/tester cat exception
12:26:52Araqtests/testament/tester --print html
12:27:03Araqshould list a couple of tests, all green
12:28:12Araqthen add new tests from the list of github issues
12:28:44Araqthen take a look at ccgstmts.nim, "blockLeaveActions" and the related logic and fix things
12:29:29Araqbut be warned, translating exceptions to C is mind-boggling
12:29:42Araqand much harder than I imagined
12:30:30*oal joined #nimrod
12:31:23Araqhi oal welcome
12:31:31oalHi Araq :)
12:32:11skyfexI'd be glad to give it a shot, can't promise anything though ;)
12:32:30Araqwell feel free to ask questions here
12:33:08*aftersha_ quit (Quit: Computer has gone to sleep.)
12:37:02skyfexAraq: any specific bug, or any related to exceptions?
12:37:41skyfexThings like this? https://github.com/Araq/Nimrod/issues/908
12:39:32Araqskyfex: #391, #688 and #908 but the later might not be relevant
12:40:02Matthias247I don't see an error in this issue. He closes the file before he writes to it?
12:42:15Araqskyfex: exception handling should be easier to fix then generic instantiation though ;-) maybe it's even a good start
12:44:05*skyfex quit (Quit: Computer has gone to sleep.)
12:45:33*skyfex joined #nimrod
12:52:23*sale4one joined #nimrod
12:55:12skyfexWhen I run ./koch temp, it seems to recompile al the modules, even if they haven't changed, is that necessary?
12:59:41Araqno, but --symbolFiles are broken and have been for quite some time now
13:10:54EXetoCAraq: ok so something simple as "import pegs" fails with the C++ backend, but not when -d:release is omitted
13:11:03EXetoCit complains about 'abs' in this case. any idea where to look?
13:13:08AraqI don't know
13:14:21EXetoCs/omitted/included
13:15:23sale4oneWhy do I get error message when I copy the example from tut2.html ? :/
13:16:40sale4onefirst example* (says id is undeclared but it is declared)
13:17:45Araqsale4one: iirc it's a known bug with 0.9.2
13:17:54Araqmaster or devel can handle it
13:17:55Araqbbl
13:20:04sale4onetell me, inhreriting from TObject doesn't count as a real inheritance?
13:29:33*aftersha_ joined #nimrod
13:37:21*[2]Endy joined #nimrod
13:40:16*[1]Endy quit (Ping timeout: 245 seconds)
14:11:44*darkf quit (Quit: Leaving)
14:14:52NimBotAraq/Nimrod newasync 8029a5d Araq [+0 ±3 -0]: more things case consistent
14:14:52NimBotAraq/Nimrod newasync 02662f5 Araq [+0 ±1 -0]: fixes #612
14:14:52NimBotAraq/Nimrod newasync 3829faa Simon Hafner [+1 ±0 -1]: moved tsets test to collections/
14:14:52NimBotAraq/Nimrod newasync 729d61a Araq [+0 ±1 -0]: edited compiler's config
14:14:52NimBot14 more commits.
14:16:45skyfexAraq: Do you mind telling me a bit about how pushSafePoint, popSafePoint, currentexception, popCurrentException, etc?
14:27:49EXetoCAraq: stdlib.h is included in the Nimrod_system.c/cpp, so how are the other source files able to use symbols referenced in that header? abs for example. or does it come from somewhere else?
14:28:10EXetoCmAbsI: "(NI$2)abs($1)",
14:30:40*io2 quit ()
14:33:28skyfexAraq: Hmm, think I'm starting to figure it out..
14:33:37skyfexI'm commenting on https://github.com/Araq/Nimrod/issues/391 as i go aling
14:33:39skyfex*along
14:33:54EXetoCby not linking probably (gcc -c). I suppose it's a link order issue then
14:34:14sale4oneis toUpper() a valid proc on a string ?
14:34:59sale4one*method or what is it
14:36:29sale4oneOk, I found out :)
14:38:53EXetoCor not. I give up
14:47:48*sale4one left #nimrod ("ERC Version 5.3 (IRC client for Emacs)")
14:58:30*noam joined #nimrod
14:58:45*BitPuffin joined #nimrod
15:10:42*PortableEXetoC joined #nimrod
15:13:06*aftersha_ quit (Quit: Computer has gone to sleep.)
15:16:18*aftersha_ joined #nimrod
15:32:17*PortableEXetoC2 joined #nimrod
15:32:18*PortableEXetoC quit (Read error: Connection reset by peer)
15:35:12*PortableEXetoC2 quit (Read error: Connection reset by peer)
15:45:23*sale4one joined #nimrod
15:56:21*ics joined #nimrod
16:01:47AraqEXetoC: you should replace (NI$2)abs($1) by (NI$2) ($1 >= 0? $1 : -$1) and rely on gcc's optimizer
16:02:47Araqor make it #include <math.h> and hope for the best ...
16:05:00skyfexAraq: Never mind my questions earlier.. I think I understand them now
16:05:16skyfexI know why issue 391 happens now.. just need to find out how to fix it
16:05:24OrionPKmorning
16:05:45OrionPKwhat's new today?
16:06:30*ddl_smurf joined #nimrod
16:07:06skyfexBut gotta go... fix it when i get back
16:07:14Araqskyfex: ok great
16:16:36EXetoCAraq: ok. I was just trying to figure out how the targets differ, but aren't those overloads in stdlib.h?
16:17:01AraqEXetoC: c imports 'abs' implicitly, most likely, c++ is stricter
16:18:14EXetoCAraq: I sure didn't expect that to be the case
16:18:27EXetoCI'll resume then
16:27:21*aftersha_ quit (Quit: Computer has gone to sleep.)
16:27:48*aftersha_ joined #nimrod
16:30:24*sale4one quit (Read error: Connection reset by peer)
16:33:38*sale4one joined #nimrod
16:45:21*foodoo joined #nimrod
16:45:41foodoos
16:46:59*aftersha_ quit (Quit: Computer has gone to sleep.)
16:49:12Araqfoodoo"
16:49:14Araq"
16:49:17Araq!
16:49:48foodooI unintentionally touched my mousepad. The letter s should have gone into another window
16:50:33Araqnow the 's' belongs to us
16:50:55foodoowill it be the new channel mascot?
16:51:17Araqdid I mention that people with too many 's' (== '$') need to donate?
16:51:26foodooblood?
16:52:04Araqmost people here live in countries where money is used to pay the bills ...
16:52:32foodooah, you mean bitcoins
16:53:19*Icefoz quit (Quit: leaving)
17:09:39EXetoCAraq: why is abs a special symbol?
17:14:52BitPuffinyou mean a keyword?
17:16:12*foodoo quit (Quit: tiuq)
17:16:22AraqEXetoC: historical reasons I think
17:22:01EXetoCBitPuffin: no but the compiler provides the implementation
17:22:18EXetoCAraq: ok I might try to remove it then
17:22:28AraqEXetoC: ok, thanks
17:28:17*carum joined #nimrod
17:39:27rixxha, can't donate $, don't have any
17:48:24*Demos joined #nimrod
17:51:23*sale4one quit (Ping timeout: 260 seconds)
17:52:50EXetoCAraq: I copied the one for floats. does it need to look like your string? basic tests are working
17:59:38AraqEXetoC: if the tests work that's good enough
18:08:49dom96I am really starting to get used to working on Windows.
18:10:48skrylardom96: uh oh
18:17:47*kudu joined #nimrod
18:17:51*kudu left #nimrod ("WeeChat 0.4.1")
18:20:24*carum quit (Remote host closed the connection)
18:21:52EXetoCAraq: there barely are any, but there's only so much you can test
18:22:08*skrylar is *seriously* considering Tcl bindings just for Tk
18:23:19*aftersha_ joined #nimrod
18:27:26*awestroke joined #nimrod
18:29:52*XAMPP joined #nimrod
18:37:22*Varriount joined #nimrod
18:47:27VarriountAraq: The PR for adding an explicit nimrod command/path option to the tester is up.
18:48:15EXetoCAraq: where should my test go?
18:48:31NimBotAraq/Nimrod devel 435cb1a Zahary Karadjov [+1 ±6 -0]: the delegator pragma becomes a set of dot operators
18:48:31NimBotAraq/Nimrod devel a495452 Zahary Karadjov [+0 ±2 -0]: handle nested case objects in destructor generation
18:48:31NimBotAraq/Nimrod devel 80f9ed2 Zahary Karadjov [+0 ±6 -0]: fix some regressions caused by tyTypeDesc[tyNone]
18:48:31NimBotAraq/Nimrod devel 26ff41a Zahary Karadjov [+3 ±27 -1]: Merge branch 'devel' of gh:/Araq/Nimrod into devel
18:58:03*awestroke quit (Remote host closed the connection)
18:58:27skrylari wish nimrod would obey the CC environment variable instead of calling GCC always
19:00:04EXetoCAraq: nvm. stdlib I suppose
19:02:35Varriountskrylar: You can use a different compiler
19:03:12skrylarVarriount: i mostly just wanted to tell nimrod to use ccache
19:03:18Varriountccache?
19:04:01skrylarccache is a helper for gcc/clang
19:04:23skrylarit basically caches object files and if you ask it to compile the same .c, it will just put the .o back instead
19:04:28skrylarif and only if the output would be identical
19:05:11skrylarso for instance where nimrod keeps deciding the stdlib needs to be built, ccache would omit the need to compile those .c's repeatedly
19:07:41Varriountskrylar: iirc, nimrod's caching mechanism does work, to some extent
19:09:10VarriountFor example, compiling the 'strutils' module 3 times, the first time, all three modules are compiler (strutils, parseutils, and system), the second, only two are compiled (strutils and parseutils), and the third, none are
19:09:38Varriountcompiled, in that context, meaning that a c file is compiled into an object file
19:10:42Varriountskrylar: Would you consider a string a decent way to abstract away type differences between OS file ID's?
19:11:23skrylarwell in my case when i compile my test program, it can end up re-building 3-6 system .c's for some reason or another
19:11:36skrylarright now that doesn't take a whole lot of time, but it seems needless
19:11:52skrylarVarriount: what do you mean by file IDs?
19:12:01*skyfex quit (Quit: Computer has gone to sleep.)
19:12:09Varriountskrylar: File system ID's, like the ones returned by stat
19:12:34*skyfex joined #nimrod
19:12:34VarriountSome OS's have 128 bit ID's, others have 64 bit, etc
19:12:46skrylarwhy wouldn't you use an opaque type at that point?
19:12:52skrylarits not like the user needs to touch it
19:12:54*micklat joined #nimrod
19:13:21VarriountHm. They would probably only need to compare it.
19:13:27skrylaryep
19:13:41skrylarand opaque types like that are cheap thanks to templates
19:13:59Varriountskrylar: Huh? Howso?
19:14:25skrylarVarriount: when ThisOS: type blah_id = distinct(uint64)?
19:14:48skrylarnow you have a uint for that platform that doesn't intermix
19:14:52VarriountOh, that kind of machanism, not the 'template proc' kind of template
19:15:05skrylaryeah, just regular "template foo(...)"
19:15:26skrylarso it compiles to the same C as though you had written it like a special int to begin with
19:15:37skrylarI like that about nimrod
19:16:26skrylarI like how you can do really cheap-as-in-free wrappers in Nimrod for the most part
19:17:00skrylarall though testing for external C lib calls for errors is as sad as always
19:19:37Varriountskrylar: Hm>
19:19:42Varriount*?
19:27:02skrylarVarriount: well typing in "discard" every line is really annoying
19:27:13micklat{.discardable.}
19:27:35micklatbesides, you shouldn't discard it
19:27:44skrylarwhat i usually do is just make the wrapper check the return code and throw nimrod errors
19:28:41*filwit joined #nimrod
19:28:59*surma joined #nimrod
19:29:00micklatis it possible to access a C array whose length is not statically known?
19:29:27micklatI know I can cast it to ptr array[0..999999,int] and index that, but it's kinda ugly
19:30:13filwitmicklat: how else would you do such a thing? C arrays are just pointers.
19:30:29filwithey all
19:30:41micklatI wish I could cast it to ptr array[0.., int], because the upper bound is just made-up
19:30:54VarriountLook! A wild filwit appeared!
19:31:01micklator just deref ptr int, which I apparently can't
19:31:11micklat*index ptr int
19:31:14Varriountmicklat: high(int)?
19:31:17filwitmicklat: array[0..int.max, int] ?
19:31:25micklatok, I guess, thanks
19:31:27filwitmicklat: not sure 'int.max' is a thing.
19:31:34filwitbut i'm sure something like it exists
19:31:46VarriountI think it's int.high
19:31:59micklatgood, thanks
19:32:49filwitmicklat: a better solution would probably be to use the length that your Nimrod code expects for the array instead of int.high though
19:33:06micklatthat's a dynamic quantity
19:33:12filwiti see
19:34:47skrylari'm not sure what you're going to gain by doing that though
19:35:01skrylarif you're setting the bounds to something crazy, a lot of the array APIs are going to act derpy
19:35:43micklatby doing what?
19:35:54skrylarby casting one of C's pointers to an array with INT_MAX length
19:36:14micklatwhat other choice have I got? I need to access elements 0..n-1, and n is not known at compile time
19:36:46skrylaraccess it like you would in C with pointer arithmetic? (unless nimrod doesn't let you do that, i haven't had to check yet)
19:37:14filwitmicklat: you could cast to a raw pointer and use [] on it i think
19:37:31micklatyou mean cast to ptr int? tried it, didn't work.
19:37:48filwitmicklat: cast[ptr int](something)[index] ?
19:37:58micklatnope, does not work
19:38:10micklatbut I can cast to int, do the arithmetic, then cast to ptr.
19:38:14filwitthat doesn't make sense, somehow that should be possible
19:38:31filwitbut i don't know the exact syntax off the top of my head
19:38:32micklatnot sure that ptr arithmetic is an improvement though
19:38:54micklatso I think casting to ptr array[0..int.high, int] is best
19:39:24filwitwell do what works i guess
19:39:33filwitthey're basically the same thing anyways
19:39:50skrylarpointer arithmetic is what C is doing; making it an array is just going to confuse nimrod methods that ever try to use something like 'len' and will put in range checks that are worthless
19:40:01skrylari guess you could surround that area in checks:off
19:40:24filwitAraq, dom96: congrats on submitting to GSoC. Have you found any students yet or gotten any feedback?
19:40:37micklatthis is pretty common when working with C apis. I'm surprised there isn't some established practice.
19:40:40skrylarmight be able to make it a distinct type and inherit [], that way trying to do stuff that won't work isn't considered valid for the type
19:40:52dom96filwit: Demos and Varriount want to participate.
19:40:57filwitmicklat: there's probably some common technique i'm unaware of
19:41:12filwitdom96: that's great! congrats guys.
19:42:26micklatAraq: do you agree that skrylar suggestion (distinct type, overriding [], ptr arithmetic) is the best solution?
19:42:42filwitdom96: btw, i was trying to install babel on Windows yesterday, but it wouldn't compile. Is Babel broken on Windows right now? Or should i report/fixit ?
19:42:58filwitdom96: i'm on Linux atm, so can't give you specific error
19:43:13filwitdom96: but it was a compiler error, and I was using devel
19:43:59filwitdom96: just wondering cause these days I have to spend more time on Windows and can't work on my project there cause OpenGL isn't part of Nimrod anymore
19:44:36EXetoCinstall manually?
19:45:35filwitEXetoC: that's the part that messes up, :P
19:46:46filwiti guess it's silly to ask about an error when i don't know the specifics
19:47:12dom96Yes, just a bit :P
19:47:23*[1]Endy joined #nimrod
19:48:13AraqI have no time, just wanted to say I told you, dom96
19:48:33surmaSo, in the documentation it says, that the tuple/object field operator `.` implicitly dereferences. Why is that not the case for the "method-syntax" (`someVar.function()`)?
19:48:37Araqpackage management doesnt work :P
19:48:42dom96Araq: excuse me?
19:48:58surmaOh, it could be ambiguous, right?
19:49:19Araqsurma: no, it simply an unimplemented feature
19:49:27EXetoCone dir for every test executable plz. so much git output :>
19:49:39*[2]Endy quit (Ping timeout: 252 seconds)
19:49:46surmaAraq: Good to know :)
19:50:05dom96Araq: That's not very nice man.
19:50:13dom96And unfair for that matter.
19:50:46filwiti really like babel, for what it's worth
19:51:21Araqalright, i take it back then
19:51:35*[2]Endy joined #nimrod
19:51:51dom96Araq: Don't piss on my work or you may find yourself without it ;)
19:52:10surmaAnother question I can't seem to answer for the manual: I have a variable `A` of type `T`, and a variable `B` of type `ref T`. How do I make `B` point to `A`?
19:52:17surmafrom the manual*
19:52:29Araqyou cant
19:53:49surmaOh? I thought there were just like pointers just garbage collected. The first paragraph in the manual kinda sounds like that is possible. So, if I want to do that I need to use `ptr` and `.addr()`?
19:53:56surmaBUt then I'm probably doing something wrong, eh?
19:54:35Araqyup
19:54:44*[1]Endy quit (Ping timeout: 246 seconds)
20:07:05VarriountAraq: Any suggestions on what I should work on now? (I got the nimrod-binpath feature for the tester done)
20:07:15Araqexcuse me?
20:07:26AraqI told you to make a list of important failing tests
20:07:37VarriountOh, right, I remember now.
20:07:51Araqor you could fix tests that fail because of nil->discard
20:07:52Araqbrb
20:09:17filwitAraq: i'm trying to consume a module, by name, from within a macro. The consumed module doesn't need to be part of the resulting exe (i just need it's AST). What's the best option for doing this? I remember you mentioning importing some part of the compiler, but I forget which module/proc to use.
20:10:48*micklat quit (Remote host closed the connection)
20:12:31filwitAraq: i see macros.parseStmt() might work if I can read the file from within the macro. i'll try that first.
20:16:11Demosfilwit, I got babel working on windows
20:16:28filwitDemos: did you run into any errors along the way?
20:16:32Demosyou may need to use the master branch compiler or even 0.9.2
20:16:53filwitDemos: okay. next time i'm on Windows i'll try that. Thanks for the tip.
20:16:59Demosthe only issue I have is that only babel.bat is in the path, which is kinda wierd calling it from msys2's shell
20:17:03Demosbut yeah, try that
20:17:53dom96Compiles fine for me on devel.
20:17:56EXetoCAraq: it fails on snprintf too
20:18:07filwitdom96: what version of Windows?
20:18:10dom967
20:18:16filwitah, i'm on 8.1
20:19:14EXetoCAraq: I've conditionally added stdlib.h and stdio.h to nimbase.h and now nimrod can be compiled with cpp
20:20:05filwitparseStmt(readFile"testGen.nim") --> Error: cannot 'importc' variable at compile time
20:20:06DemosU an ib 8.1 as wekk
20:20:19filwitthere's a compiler switch of something to allow file-reading at compile time?
20:20:34filwitDemos: wat?
20:20:37EXetoCAraq: anything wrong with that approach?
20:20:58DemosI am on 8.1 as well. Apperently my fingers migrated a bit there
20:21:08filwitlol, i see
20:21:17filwitI don't use Windows much except for work
20:21:18EXetoCfilwit: gorge?
20:21:21dom96filwit: Try slurp. However, does testGen contain importc?
20:21:40EXetoCI mean staticRead/slurp
20:21:52filwitdom96: no, it doesn't
20:22:01filwitand thanks for the 'slurp', will try
20:22:12EXetoCfilwit: I thought he said that you cannot go that high up in the chain
20:22:33filwitEXetoC: not sure what you mean
20:23:00filwitnice, static read works
20:23:09filwitslurp is just an alias?
20:23:14filwit(why?)
20:24:15filwit(nevermind, don't care. just ocd about these things)
20:24:23dom96because Araq likes the name
20:26:13filwitstatic read is much better, and 'slurp' shouldn't exist at all, IMO, but that's as much as i'm going to press that point.
20:28:44filwiton the plus side, it's awesome that Nimrod has this ability already built-in, so take my criticism with lots of salt
20:30:08filwitin fact, does D/C++ even have something equivalent? I can't think of anything off the top of my head
20:30:30DemosI like slurp. And D can execute almost anything at compile time, c++ can execute some stuff at compile time
20:30:48VarriountC++ Doesn't have anything like it, unless you can't all sorts of external templating systems (like *shudder* autotools
20:30:51Demosc++ can not do stuff like slurp though
20:30:56DemosVarriount, constexpr
20:31:08Demosand relaxed constexpr's in c++14
20:31:11VarriountDemos: *unless you cound
20:31:13Demosbut yeah, nothing like slurp
20:31:40filwitDemos: it's not about executing at compile-time, it's about parsing external files and turning them into AST without any external build-tools
20:31:54filwit(at compile time)
20:32:08Demosright, but constexpr and D's CTFE is as close as those languages come
20:32:19filwiti'm pretty sure on C# has something similar (probably Lisps of course)
20:32:32Demoswell c# has reflection
20:32:43Demosbut that is all runtime
20:34:04filwittrue. though since C# is a VM, you can actually manipulate the AST with some of the new parse/AST utils and submit them for re-compile
20:35:00filwitnot that i advocate that method over Nimrod's approach
20:39:45*aftersha_ quit (Quit: Computer has gone to sleep.)
20:51:35*sale4one joined #nimrod
20:52:33filwit3 lines of code to parse a Nimrod file, convert it to AST, extract a type by name and run through it's children and each a copy of each one to another type... beautiful :D
20:53:01dom96That's awesome.
20:53:17filwityeah, meta-programming in Nimrod kinda puts other languages to shame, haha
20:53:22dom96Wish it only took 3 lines to write the async stuff :P
20:54:22filwitwell it only takes three lines cause of all the work you good folks do for me. and I'll probably need your async stuff in the not-so-distant future, so thanks for the effort
20:55:11dom96Still pretty cool that I can do it all with macros though, no matter how much code it takes.
20:55:36filwiti'm not sure of what you've been doing with that, so I can't really comment
20:56:13dom96Pretty much a clone of C#'s await.
20:56:24filwiti see, very cool
20:56:38filwitdesigned for pragmas ?
20:57:01dom96yes
20:57:12dom96proc foo(): PFuture[string] {.async.} =
20:57:31dom96 var line = await p.recv(sock)
20:57:41dom96 return line
20:57:51dom96well, that's a silly example. But you get the idea.
20:57:59filwityeah, looks nice :)
21:01:41VarriountWould someone mind explaining what C# 'await' is?
21:01:44filwitso {.compileTime.} works on vars too i see. I can expect that a compileTime seq wont bloat the exe?
21:02:42Varriountfilwit: Depends on what you do with the sequence
21:03:30filwitbut in general, the var itself won't bloat the code I assume. Guess i should just test.
21:04:39filwitVarriount: you should just read about async/await: http://msdn.microsoft.com/en-us/library/hh156528.aspx
21:06:47Araqfilwit: compileTime seqs have all sorts of bugs
21:06:53Araqbut code bloat is not among them
21:07:38Araqdom96: what it the most pressing bug?
21:07:41filwitAraq: okay. well if I run into anything i'll fix it.
21:07:48filwitAraq: or try to at least
21:07:56dom96Araq: gensym
21:08:07Araqreally? not the 'nil' bug?
21:08:19dom96ehh, which one is that?
21:08:31dom96I worked around them all.
21:08:56Araqok ...
21:14:14NimBotAraq/Nimrod newasync 38a3c09 Dominik Picheta [+0 ±1 -0]: Async readLine now works. Fixes recv issues.... 6 more lines
21:14:21Araqping zahary, zahary_
21:15:02skrylaroh neat there are already nimrod bindings for tcl
21:15:50zaharypong Araq
21:16:35dom96Araq: https://github.com/Araq/Nimrod/blob/newasync/lib/pure/asyncio2.nim#L622 You like?
21:16:51dom96It's practically the same as the blocking implementation.
21:18:29dom96Araq: Actually the 'void' bug may be more important.
21:20:09zaharydom96: if you remember, one of my gists showed how you can dual compile sync and async version of a proc from the same code
21:21:14dom96Is that really useful though? I'd rather keep things simple.
21:22:39zaharyit's not very useful in the sense that you should actively try to explore parallelism in the async version - e.g. place a few requests in parallel and wait for all of the results to be ready - the sync would be too crippled with such code
21:23:34zaharybut you could drop the explicit Future return type and just use string (the async macro will implicitly make it a future) - that's one of the bits that's needed to keep the code the same
21:25:32Araqah zahary you fix for #797 breaks manyloc/argument_parser
21:25:32dom96I would rather keep it the way it is as it's clearer when you just want the PFuture.
21:26:55zaharythe C# guys don't agree with you
21:27:13dom96Hrm? Don't they do it the same way?
21:27:23dom96except that it's s/PFuture/Task/
21:27:58zaharyI mean the do it as I suggest - the async proc is marked as returning "string", but that's converted to Task[string] under the hood and advanced users are exposed to it
21:28:09zahary* they do it *
21:28:32zaharyAraq, I'll take a look
21:28:45Araqyeah and then you can end up with Task<Task<string>>
21:28:54AraqI agree with dom96, I think
21:29:26dom96zahary: I'm confused. You suggest I just have 'string' instead of 'PFuture[string]'
21:29:40dom96C# has 'Task<string>' in its async methods.
21:29:49dom96Which is not what you suggest?
21:29:57zaharyproc recvLine*(p: PDispatcher, socket: TSocketHandle): string {.async.} =
21:30:20zaharyhmm, maybe I'm mistaken - let me checl
21:32:32dom96Araq: Are we pursuing a deprecation path for sockets/asyncio?
21:33:14Araqdom96: of course; the new stuff is not stable at all, API-wise
21:33:49dom96Araq: ok, should I keep the current naming scheme then? sockets2/asyncio2/net?
21:34:01Araqsure why not
21:34:49zaharyhmm, indeed they use Task<T>; makes me wonder if it's just my memory that's failing or they have changed their plans since I watched the original async/await introduction plans
21:36:24zaharyI personally prefer shorter code and see Future[T] {.async.} as a bit of tautology, but I don't have such a strong feelings about it
21:36:29Varriountdom96: Whats different between sockets2 and sockets?
21:36:39*carum joined #nimrod
21:37:05dom96Varriount: We're splitting up sockets into a low-level 'sockets2' module and a high-level 'net' module.
21:37:18VarriountAh, I see.
21:37:28VarriountThat should probably be noted in the docs.
21:46:33dom96Probably.
21:46:43dom96ooh, async has its own category in the tester.
21:50:19*io2 joined #nimrod
21:56:10Matthias247oh, async IO
21:56:34Matthias247I started with that in rust, but eventually gave up
21:56:34VarriountDemos: Today I learned that Windows Explorer's Search box supports AND and OR operators
21:56:40Matthias247maybe I should continue in nimrod :)
21:59:18DemosVarriount, I did not know that. are they 'and' and 'or' or like & and |?
22:00:14VarriountDemos: Well, 'OR' works, so I'm guessing AND does as well
22:01:05Varriount"type:nim foo OR bar OR baz" will get any files with foo, bar, or baz in their names, that have a type of '.nim'
22:01:27*tinAndi joined #nimrod
22:01:42Demosneat
22:02:42Matthias247getting a good cross-platform API is however very hard
22:03:01tinAndihi, i have a question before i even start using nimrod (just reading docs :)) is there a way to call a proc using it adress?
22:03:11skrylarMatthias247: sockets aren't that different really
22:03:16Matthias247lol
22:03:22skrylarWinsock is a poor microsoftized clone of BSD Sockets afterall
22:03:28Matthias247iocp vs epoll is fundamentally different
22:03:35dom96yep, what Matthias247 said.
22:03:42Matthias247if you stick to synchronous IO, yes, than it's equal
22:03:50skrylaroh you mean the select replacements
22:03:56AraqtinAndi: yes
22:04:09skrylarMatthias247: well Node.js uses a library that does something like that
22:04:24Matthias247yes, libuv
22:04:36Matthias247and for c++ there's also boost asio
22:04:48Matthias247both have a quite different API
22:05:06skrylari'm guessing what you'd want is to have a general class that you feed potential sockets in to, and then have different internal impls for platforms
22:05:08VarriounttinAndi: If you mean, does nimrod support passing procedures, yes it does.
22:05:08Matthias247on uv you simply say: socket.beginReceive and you will get a callback each time data is received
22:05:49tinAndii want to use it for setting up an eventhandler, for windows gui programming
22:05:56Matthias247on asio you say socket.begin_read_some(buffer, size, callback) each time you want to receive something
22:06:26AraqtinAndi: that's entirely possible and not hard
22:06:45Matthias247that's similar to dom96's code, but you provide the buffer
22:07:16dom96hrm, it seems 'await' does not let you escape all callbacks.
22:07:17Matthias247but preallocating the buffer ist wasteful on unix, where you only need it when select tells you so
22:09:14tinAndithank you, so i go on and read more docs ;) on more, should i use the release version of nimrod or should i download the git repo to startup?
22:09:41Matthias247dom96: Dart has a quite nice support for future based APIs which allows you to chain them without too much hassle and the need for async/await: https://www.dartlang.org/docs/tutorials/futures/#calling-multiple-funcs
22:11:14filwittinAndi: I would probably download the git, so you can switch between devel (active development branch) and master (pretty much 0.9.2). Compiling is pretty straight forward.
22:15:04*brson joined #nimrod
22:17:38filwittinAndi: ps, here's a little code example of Nimrod event procedures: https://gist.github.com/PhilipWitte/9025918
22:19:20*zahary quit (Ping timeout: 252 seconds)
22:19:54*[2]Endy quit (Ping timeout: 260 seconds)
22:21:19*carum quit (Remote host closed the connection)
22:22:03dom96Araq: Here is another crash you can fix: https://gist.github.com/dom96/039a0240dcc2625da7d7
22:22:08dom96Compile in newAsync branch
22:24:10tinAndifilwit : wow, this looks real easy and straight, thank you.
22:24:21filwitnp :)
22:29:46*Amrykid quit (Changing host)
22:29:46*Amrykid joined #nimrod
22:36:02skyfexIs there a "5.times: ..." in nimrod?
22:37:13filwitnot much need when you have: for i in 0..4: ...
22:37:52filwitbut i'm not sure if there is such a template or not already in the standard libs
22:38:21skyfexnot much need for "for i in 0..4: " when you have "var i = 0; while i <= 4: inc i" :P
22:38:53Araq*shrug* so add a 'times' template somewhere
22:40:49skyfex*glee* i know it's silly.. but i actually get happy when i can write what I'm thinking rather than to write things so the computer understands it
22:40:59skyfexLike the x.odd? in Ruby, rather than x%2==1
22:41:36Araqyes, I always liked the idea of a rubylike.nim module that supports more ruby idioms
22:42:25skyfexany chance of enabling the use of ! and ? in proc,template and macro names? :P
22:42:36Araqno
22:42:53Araqnot in my nimrod
22:43:13Araqthey bite with user definable operators
22:43:22skyfexFine! I'll make my own nimrod with ! and ? .. and blackjack .. and hookers!
22:43:26filwituse 'isOdd' instead, makes more sense anyways
22:43:46tinAndievent.nim(6, 0) Error: tabulators are not allowed??? is that true?
22:43:53skyfexheh
22:44:04filwittinAndi: yes, you must use spaces
22:44:11Araqyes, use an editor that is not braindead
22:44:47filwittinAndi: recommend Aporia: https://github.com/nimrod-code/Aporia
22:45:11tinAndithank you :) i used my own editor ;) (okay, that's just an easy fix)
22:47:11skyfexfilwit: Yeah, I can survive without ? in proc names. "isFoobar" is totally understandable. But the use of ! in methods in Ruby is actually kind of nice, it creates a nice ideom that reminds library writers to create one method that returns a modified copy of an object, and one that modifies the object directly
22:47:39skyfexNot that I'm gonna argue for it in Nimrod, just mentioning it :)
22:47:56filwitskyfex: i've never used Ruby, and don't know of the idiom you speak of
22:48:02*sale4one quit (Read error: No route to host)
22:48:22tinAndibtw the windows installer does not really works on win64bit (the folder is "Program Files (x86)") even on german systems ;)
22:48:31skyfexif x is an array then "a = x.sort", creates a sorted copy of x in a, while "x.sort!" sorts x in-place
22:48:34filwitskyfex: i just prefer 'isSomething' to 'something?' cause it's more consistent when you need to change 'is', eg, 'hasProp', 'wasSomething', etc
22:48:45skyfexfilwit: sure, i'm with you there
22:49:01Araqskyfex: you're 5 years too late, everybody uses node.js now instead :P
22:49:41*sale4one joined #nimrod
22:50:02skyfexOh, I'm one of those weird folks who use Ruby for other things than making web pages.. I've never even touched Ruby on Rails really ^_^
22:50:06filwittinAndi: I've installed on Win64 (win8). What problems are you having specifically?
22:50:47Araqhe doesn't know it's "program files" even in german now, starting with vista iirc
22:50:50filwitskyfex: well Nimrod gives you quite a bit of expressive power, and should run significantly faster than Ruby :P
22:51:44skyfexfilwit: Yeah, I can imagine using Nimrod for the same things.. Just need to write a replacement for Rake in Nimrod
22:52:16Araqhey, we already have, it's "nake" from fowl
22:53:21filwitskyfex: https://github.com/fowlmouth/nake
22:53:25tinAndii solved them :) as i allready have gcc installed. So i have no probs anymore. but for 32bit progs it's "Program Files (x86)" and for 64bit progs it's "program files" even on german systems (win8.164bits)
22:54:19skyfexAh, should have figured
22:54:56VarriountThe windows installer probably needs it's default path changed to \Nimrod\
22:55:21filwit^ yeah, that's what D does
22:55:23skyfexthat reminds me another small thing I miss from Ruby.. Symbols. But it's such a small thing. If I'd wanted a language with all my favorite features from other languages, I'd have made my own.. and it would probably suck
22:55:39VarriountAnd Gcc, and LLVM/Clang, And MSys
22:56:14skrylarskyfex: eh a symbol in ruby is just a string though
22:56:21Araqskyfex: type sym = distinct string; sym"foo bar"
22:57:21Araqthere are rumors you can do: template `::`(x: expr): sym = astToStr(x)
22:57:31Araq::myCoolSym
22:57:33skyfexskrylar: Well.. not precisely. There are some minor differences: http://www.robertsosinski.com/2009/01/11/the-difference-between-ruby-symbols-and-strings/
22:57:48skrylaryeah i know; they're interned
22:58:00Matthias247is there something like library-local-visiblity or friend declarations? In case you don't want to export a method to all but still want to use it outside of the module
22:58:01filwitAraq: soon... ::::::::::::::::::::::::MySuperSpecialSymbol
22:58:05skyfex^_^
22:58:22EXetoCAraq: so what exactly is implicitly "included" in C? because I had to add stdio.h in addition to stdlib.h
22:58:29AraqMatthias247: templates have friend like lookup rules in devel
22:58:37EXetoC(compile to C++)
22:58:41AraqEXetoC: don't do that
22:58:59Araqwas hard to get rid of these
22:59:10Araqevery #include in nimbase sucks for embedded targets
22:59:41Matthias247Araq: is it only for templates and where can I find a description or example for it?
23:00:11AraqMatthias247: it's for generics too and I'm not sure it's documented
23:00:38Araqtemplate foo*: expr = bar # bar not exported
23:00:52Araqfrom module import foo
23:01:07Araqfoo # expands to bar and is allowed
23:02:15EXetoCAraq: ok but I don't understand this whole implicit thing, and why it's necessary for things like 'rand' as well when compiling to C++
23:02:55AraqEXetoC: there is nothing implicit here, the symbols all have .header: "<stdio.h>" etc.
23:10:15skyfexAraq: When running "koch temp" it recompiles all modules even if they haven't changed.. is that necessary?
23:10:36Araqskyfex: again, for now it is because --symbolFiles are broken
23:10:50skyfexOh, sorry, didn't see that you replied earlier
23:10:57EXetoCwell yeah, but what about 'abs'? did you imply that it is implicitly included as per the standard?
23:11:13Matthias247Araq: I think something for normal functions or types would also be helpful. But all in all I even like C#'s simple internal modifier even more than the friend thing, because it's quite convenient to use
23:11:34VarriountAraq: I've got nearly all of the nil depracation warnings fixed for the tests.
23:11:44AraqEXetoC: 'abs' is simply a bug not caught by the C codegen
23:11:56AraqVarriount: excellent
23:12:29Trixar_zaIf you turn around the b and throw in an i, it's something nobody wants to catch
23:12:33AraqMatthias247: not sure what you mean, but my bet is you don't know about 'export' yet
23:13:05filwitMatthias247: theoretically you can emulate 'internal' package behavior with 'include'
23:13:14skyfexAraq: Managed to fix issue 391, but introduced a regression in one of the other tests >_<
23:13:53Araqskyfex: now you know I told you in detail how we work here :P
23:14:07Matthias247now I know that export is for rexporting names :)
23:14:55filwitAraq: is there 'friend-like' thing you mentioned earlier the 'bind' statement?
23:14:58EXetoC:E
23:16:40Matthias247Araq: internal things can be seen used by everyone in the same compilation unit. That's more restricted than * in Nimrod which allows access to everyone but less restricted than without-*, which can only be seen from the current module
23:17:58filwitMatthias247: put everything in one module, then export what you need. If the module gets too big, divide up the files and then 'include' them into one module
23:19:01*xenagi joined #nimrod
23:19:13Matthias247filwit: that seems the most reasonable way
23:19:25filwitMatthias247: you can put all the sub-files in their own folder for organization, too.
23:20:22skyfexAraq: I see that "break" inserts a copy of the finally blocks it must execute when it breaks out of a try..finally statement. I'm curious, is it impossible to do it so that the code is shared?
23:21:37Araqskyfex: I think so
23:21:54Matthias247can imports be somehow done with aliases in case there would be multiple modules with the same name? like import A as B ?
23:21:56Araqnot too sure but the naive 'goto' surely doesn't work
23:22:17filwitMatthias247: yes, with that exact syntax i believe
23:22:27skrylarMatthias247: you can 'from X import nil' which also requires the qualified name
23:22:33filwit^ that too
23:23:50Matthias247hmm, but you then would also somehow need to specify a filename for A and A' ?
23:24:23Matthias247sorry for the hypothetical questions, just curious :)
23:24:41filwitthere might be a way to do 'from A import nil as B' but i'm not sure
23:25:53filwitnot that it matters much, the 'import nil' thing isn't worth much considering it simply enforces using the module name even if there's not ambiguity
23:26:27filwit(shhh.. Araq. I know i'm a hypocrite :P)
23:27:03Varriountfilwit: I'm sure your musings are making someone, somewhere, squirm in their seats
23:27:17filwit:)
23:29:02VarriountAraq: Has the bug involving yielding within an iterator, when not in a loop in an iterator, been solved?
23:31:41AraqVarriount: dunno
23:31:56VarriountAraq: I'm trying to find the bug.
23:33:12VarriountAraq: https://github.com/Araq/Nimrod/issues/140?source=cc
23:33:27*sale4one quit (Remote host closed the connection)
23:36:37filwitMatthias247: this is often what i do for organization within modules: https://gist.github.com/PhilipWitte/9026767
23:36:43EXetoCAraq: GCC conditionally defines namespaces in certain headers -.-
23:37:07EXetoCsurely that's not standard. don't we have cstdio etc for that?
23:38:00*darkf joined #nimrod
23:38:48EXetoCactually, it's just a matter of injecting std, though I can't remember if it works when such a namespace isn't present
23:38:56Matthias247filwit: hmm, why don't you need to export the other new methods?
23:39:29EXetoCno that can't be a good idea
23:41:03filwitMatthias247: i do, was a typo
23:42:29filwitMatthias247: i was just showing that I make one type the same name as the module, and use it as the 'main' type in the module (meaning it's allocation procs don't get prefixed with 'typdesc'). That way, referencing the type itself and referencing the module name usually appear to be referencing the same construct.
23:43:40filwitMatthias247: eg, 'Canvas.Mesh' (here 'canvas' is the module name) vs 'Canvas.new()' (here 'canvas' is the type name)
23:43:43Matthias247but what would be different if you would use new(T:Color) directly?
23:44:31Matthias247ehm, new(): TColor
23:45:02filwitMatthias247: cause then the proc names collide if they accept the same parameters.
23:45:20EXetoCyeah, we don't have return-type overloading
23:45:32filwitMatthias247: the classic way (the way most people write Nimrod code) is to do 'newMesh', 'newColor', etc
23:45:52Matthias247ah, the info from EXetoC was what I was missing :)
23:46:56Matthias247so this would be somehow an equivalent to a static class method?
23:47:08filwitthough return-type overloading is planned, just not in the immediate future (sometime after 1.0 is released, apparently). When that is the case, I will use 'var c: Canvas = new(...)'
23:47:24filwitMatthias247: yes, basically
23:56:43*skyfex quit (Ping timeout: 272 seconds)
23:58:18EXetoCT(...) is very compact, and that's why I like it
23:58:36*skyfex joined #nimrod